/* ===========================
   Dashboard Specific Styles
   Modern Admin Dashboard Design
   =========================== */

/* ===========================
   Dashboard Cards
   =========================== */
.dashboard-card {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e3e6f0;
}

.dashboard-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.dashboard-card-icon {
    font-size: 2rem;
    color: #007bff;
}

/* ===========================
   Info Boxes (Small Stats)
   =========================== */
.info-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border-left: 4px solid #007bff;
}

.info-box:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 2rem;
    margin-right: 1rem;
    color: #fff;
}

.info-box-icon.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.info-box-icon.bg-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.info-box-icon.bg-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.info-box-icon.bg-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.info-box-icon.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.info-box-content {
    flex: 1;
}

.info-box-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-weight: 600;
}

.info-box-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.info-box-progress {
    margin-top: 0.5rem;
}

.info-box-progress-bar {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.info-box-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

/* ===========================
   Small Box (Compact Stats)
   =========================== */
.small-box {
    position: relative;
    border-radius: 0.5rem;
    padding: 1.5rem;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.small-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.small-box:hover::before {
    top: -60%;
    right: -60%;
}

.small-box:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.small-box .inner {
    position: relative;
    z-index: 1;
}

.small-box .inner h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.small-box .inner p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.small-box .icon {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: 0.2;
    z-index: 0;
}

.small-box .small-box-footer {
    position: relative;
    display: block;
    padding: 0.5rem 0 0 0;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-decoration: none;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.small-box .small-box-footer:hover {
    color: #fff;
}

.small-box.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.small-box.bg-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.small-box.bg-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.small-box.bg-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.small-box.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ===========================
   Chart Container
   =========================== */
.chart-container {
    position: relative;
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.chart-tools {
    display: flex;
    gap: 0.5rem;
}

/* ===========================
   Activity Timeline
   =========================== */
.timeline {
    position: relative;
    padding: 0;
    margin: 0;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 60px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 18px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    z-index: 1;
}

.timeline-icon.bg-primary {
    background: #007bff;
}

.timeline-icon.bg-success {
    background: #28a745;
}

.timeline-icon.bg-warning {
    background: #ffc107;
}

.timeline-icon.bg-danger {
    background: #dc3545;
}

.timeline-content {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.timeline-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.timeline-time {
    font-size: 0.875rem;
    color: #6c757d;
}

.timeline-body {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #495057;
}

/* ===========================
   Product/Item List
   =========================== */
.product-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.product-list-item:hover {
    background-color: #f8f9fa;
}

.product-list-item:last-child {
    border-bottom: none;
}

.product-img {
    width: 50px;
    height: 50px;
    border-radius: 0.375rem;
    object-fit: cover;
    margin-right: 1rem;
}

.product-info {
    flex: 1;
}

.product-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.product-description {
    font-size: 0.875rem;
    color: #6c757d;
}

.product-tools {
    display: flex;
    gap: 0.5rem;
}

/* ===========================
   User Panel
   =========================== */
.user-panel {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.user-panel-image {
    margin-right: 1rem;
}

.user-panel-image img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-panel-info {
    flex: 1;
}

.user-panel-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.user-panel-status {
    font-size: 0.875rem;
    color: #6c757d;
}

.user-panel-status.online::before {
    content: '?';
    color: #28a745;
    margin-right: 0.25rem;
}

/* ===========================
   Progress Bars
   =========================== */
.progress-group {
    margin-bottom: 1rem;
}

.progress-group-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-group-label {
    font-weight: 600;
    color: #495057;
}

.progress-group-value {
    color: #6c757d;
}

.progress-bar-custom {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-bar-fill.bg-primary {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.progress-bar-fill.bg-success {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.progress-bar-fill.bg-warning {
    background: linear-gradient(90deg, #fa709a 0%, #fee140 100%);
}

.progress-bar-fill.bg-danger {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

/* ===========================
   Description List
   =========================== */
.description-list {
    margin: 0;
    padding: 0;
}

.description-item {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.description-item:last-child {
    border-bottom: none;
}

.description-header {
    flex: 0 0 35%;
    font-weight: 600;
    color: #495057;
}

.description-text {
    flex: 1;
    color: #6c757d;
}

/* ===========================
   Alert Boxes
   =========================== */
.alert-custom {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-custom.alert-primary {
    background-color: #cfe2ff;
    border-color: #b6d4fe;
    color: #084298;
}

.alert-custom.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-custom.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-custom.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

/* ===========================
   Callout Boxes
   =========================== */
.callout {
    background-color: #fff;
    border-left: 4px solid #e9ecef;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.callout.callout-primary {
    border-left-color: #007bff;
}

.callout.callout-success {
    border-left-color: #28a745;
}

.callout.callout-warning {
    border-left-color: #ffc107;
}

.callout.callout-danger {
    border-left-color: #dc3545;
}

.callout-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .info-box {
        flex-direction: column;
        text-align: center;
    }
    
    .info-box-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .small-box .icon {
        font-size: 3rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-icon {
        left: 8px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
}

/* ===========================
   RTL Support for Dashboard
   =========================== */
[dir="rtl"] .info-box-icon {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .small-box .icon {
    right: auto;
    left: 1.5rem;
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 30px;
}

[dir="rtl"] .timeline-icon {
    left: auto;
    right: 18px;
}

[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 60px;
}

[dir="rtl"] .callout {
    border-left: none;
    border-right: 4px solid #e9ecef;
}

[dir="rtl"] .callout.callout-primary {
    border-right-color: #007bff;
}

[dir="rtl"] .callout.callout-success {
    border-right-color: #28a745;
}

[dir="rtl"] .callout.callout-warning {
    border-right-color: #ffc107;
}

[dir="rtl"] .callout.callout-danger {
    border-right-color: #dc3545;
}