/* ===== ITA Dashboard Styles - Enhanced ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-deeper: #1e3a5f;
    --primary-light: #dbeafe;
    --primary-50: #eff6ff;
    --secondary: #6b7280;
    --success: #059669;
    --success-light: #d1fae5;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0891b2;
    --info-light: #cffafe;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1), 0 8px 10px -5px rgba(0,0,0,0.04);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', 'Prompt', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%);
    background-attachment: fixed;
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ===== Header Bar ===== */
.header-bar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #1d4ed8 100%);
    padding: 16px 0;
    color: #fff;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.header-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.header-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.brand-subtitle {
    font-size: 0.82rem;
    opacity: 0.85;
    font-weight: 400;
}

.header-info {
    font-size: 0.82rem;
    opacity: 0.9;
}

.header-info i {
    margin-right: 5px;
}

/* ===== Sub Navigation ===== */
.sub-nav {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sub-nav-links {
    display: flex;
    gap: 4px;
}

.sub-nav-links a {
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.sub-nav-links a i {
    margin-right: 6px;
}

.sub-nav-links a:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.sub-nav-links a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--primary);
}

.sub-nav-date {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - 160px);
}

/* ===== Filter Section ===== */
.filter-section {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 49px;
    z-index: 99;
}

.filter-section .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.filter-section .form-label i {
    margin-right: 4px;
}

.filter-section .form-select {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    padding: 7px 12px;
    background-color: var(--gray-50);
    transition: var(--transition);
    cursor: pointer;
}

.filter-section .form-select:hover {
    border-color: var(--gray-300);
    background-color: #fff;
}

.filter-section .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background-color: #fff;
}

.filter-section .btn {
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 7px 18px;
    transition: var(--transition);
}

.filter-section .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.filter-section .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.filter-section .btn-outline-secondary {
    border: 1.5px solid var(--gray-300);
    color: var(--gray-600);
}

.filter-section .btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

/* ===== Stat Cards ===== */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: transparent;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:nth-child(1)::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, #059669, #34d399); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #dc2626, #f87171); }

.stat-body {
    padding: 22px 22px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.stat-icon-blue {
    background: linear-gradient(135deg, var(--primary-light), #bfdbfe);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.stat-icon-green {
    background: linear-gradient(135deg, var(--success-light), #a7f3d0);
    color: var(--success);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

.stat-icon-orange {
    background: linear-gradient(135deg, var(--warning-light), #fde68a);
    color: var(--warning);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

.stat-icon-red {
    background: linear-gradient(135deg, var(--danger-light), #fecaca);
    color: var(--danger);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.stat-footer {
    padding: 8px 22px;
    font-size: 0.75rem;
    font-weight: 500;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-footer i {
    margin-right: 4px;
}

.stat-footer-blue { background: var(--primary-50); color: #1d4ed8; }
.stat-footer-green { background: #f0fdf4; color: #15803d; }
.stat-footer-orange { background: #fffbeb; color: #b45309; }
.stat-footer-red { background: #fef2f2; color: #b91c1c; }

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 0;
    transition: var(--transition);
    background: #fff;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--gray-800);
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.card-header-icon {
    font-size: 1.05rem;
    margin-right: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-body {
    padding: 20px;
}

/* ===== Charts ===== */
.chart-container {
    position: relative;
    height: 340px;
    width: 100%;
}

.chart-container-sm {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ===== Table ===== */
.table-responsive {
    max-height: 520px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.table {
    margin-bottom: 0;
    font-size: 0.85rem;
    border-collapse: separate !important;
    border-spacing: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--gray-200);
    border-top: none;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--gray-700);
    letter-spacing: 0.3px;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 1;
    transition: var(--transition);
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
    border-top: none;
    transition: var(--transition);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.04) !important;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.table tbody tr:nth-child(even):hover {
    background-color: rgba(37, 99, 235, 0.04) !important;
}

/* Shading column groups in wide tables */
.col-shade {
    background-color: rgba(37, 99, 235, 0.02) !important;
}
tr:nth-child(even) .col-shade {
    background-color: rgba(37, 99, 235, 0.038) !important;
}
tr:hover .col-shade {
    background-color: rgba(37, 99, 235, 0.06) !important;
}

/* Quota Category Header Colors with soft tones and distinct accents */
.quota-hdr-learn { background: #e0f2fe !important; color: #0369a1 !important; border-bottom: 3px solid #0284c7 !important; font-weight: 700 !important; }
.quota-hdr-act1 { background: #e0e7ff !important; color: #4338ca !important; border-bottom: 3px solid #4f46e5 !important; font-weight: 700 !important; }
.quota-hdr-act2 { background: #dcfce7 !important; color: #15803d !important; border-bottom: 3px solid #16a34a !important; font-weight: 700 !important; }
.quota-hdr-act3 { background: #ccfbf1 !important; color: #0f766e !important; border-bottom: 3px solid #0d9488 !important; font-weight: 700 !important; }
.quota-hdr-sport { background: #ffedd5 !important; color: #c2410c !important; border-bottom: 3px solid #ea580c !important; font-weight: 700 !important; }
.quota-hdr-kondee { background: #f3e8ff !important; color: #6b21a8 !important; border-bottom: 3px solid #8b5cf6 !important; font-weight: 700 !important; }
.quota-hdr-opt { background: #fce7f3 !important; color: #be185d !important; border-bottom: 3px solid #ec4899 !important; font-weight: 700 !important; }

/* Sticky Columns for Wide Tables (min-width: 992px) */
@media (min-width: 992px) {
    .table-sticky-cols {
        position: relative;
    }
    /* First 4 columns sticky on the left */
    .table-sticky-cols thead tr:first-child th:nth-child(1),
    .table-sticky-cols tbody tr td:nth-child(1) {
        position: sticky;
        left: 0;
        z-index: 3;
        width: 50px;
        min-width: 50px;
        box-shadow: 1px 0 0 var(--gray-200);
    }
    .table-sticky-cols thead tr:first-child th:nth-child(2),
    .table-sticky-cols tbody tr td:nth-child(2) {
        position: sticky;
        left: 50px;
        z-index: 3;
        width: 100px;
        min-width: 100px;
        box-shadow: 1px 0 0 var(--gray-200);
    }
    .table-sticky-cols thead tr:first-child th:nth-child(3),
    .table-sticky-cols tbody tr td:nth-child(3) {
        position: sticky;
        left: 150px;
        z-index: 3;
        width: 280px;
        min-width: 280px;
        box-shadow: 1px 0 0 var(--gray-200);
    }
    .table-sticky-cols thead tr:first-child th:nth-child(4),
    .table-sticky-cols tbody tr td:nth-child(4) {
        position: sticky;
        left: 430px;
        z-index: 3;
        width: 90px;
        min-width: 90px;
        box-shadow: 2px 0 0 var(--gray-300); /* Thicker right border for the sticky group */
    }

    /* Assign background to sticky cells to avoid transparent overlapping */
    .table-sticky-cols tbody tr:nth-child(odd) td:nth-child(-n+4) {
        background-color: #ffffff;
    }
    .table-sticky-cols tbody tr:nth-child(even) td:nth-child(-n+4) {
        background-color: #f8fafc;
    }
    .table-sticky-cols tbody tr:hover td:nth-child(-n+4) {
        background-color: rgba(37, 99, 235, 0.05) !important;
    }

    /* Sticky headers should stay above sticky columns */
    .table-sticky-cols thead th {
        z-index: 4 !important;
    }
    /* Sticky header corners */
    .table-sticky-cols thead tr:first-child th:nth-child(-n+4) {
        background-color: #f1f5f9;
        box-shadow: 1px 1px 0 var(--gray-200);
    }
    .table-sticky-cols thead tr:first-child th:nth-child(4) {
        box-shadow: 2px 1px 0 var(--gray-300);
    }
}

/* Modern Status Badges */
.table-badge-all {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    display: inline-block;
}
.table-badge-success {
    background-color: rgba(5, 150, 105, 0.1);
    color: var(--success);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    display: inline-block;
}
.table-badge-warning {
    background-color: rgba(217, 119, 6, 0.1);
    color: var(--warning);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    display: inline-block;
}
.table-badge-danger {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    display: inline-block;
}

/* Badges in table */
.badge-year {
    background: linear-gradient(135deg, var(--primary-light), #bfdbfe);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-block;
}

.badge-month {
    background: linear-gradient(135deg, var(--warning-light), #fde68a);
    color: #b45309;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-block;
}

.badge-service {
    background: linear-gradient(135deg, var(--gray-100), #e2e8f0);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.82rem;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
}

.bg-count {
    background: linear-gradient(135deg, var(--primary-light), #bfdbfe);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 14px;
    border-radius: 8px;
    display: inline-block;
    text-align: center;
    min-width: 44px;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 50px 20px 40px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3.5rem;
    opacity: 0.2;
    margin-bottom: 12px;
    display: block;
    color: var(--gray-400);
}

.empty-state h6 {
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 4px;
}

/* ===== Month Checkboxes ===== */
.month-checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-height: 33px;
}

.month-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
    user-select: none;
    font-size: 0.78rem;
}

.month-checkbox-item:hover {
    border-color: var(--gray-300);
    background: #fff;
}

.month-checkbox-item.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    font-weight: 600;
}

.month-checkbox-item.all-checkbox {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.month-checkbox-item.all-checkbox.active {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: #fff;
}

.month-checkbox-input {
    display: none;
}

.month-checkbox-label {
    line-height: 1.4;
    white-space: nowrap;
}

.month-checkbox-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* ===== Filter Badge ===== */
.filter-badge {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-light));
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.filter-status {
    font-size: 0.78rem;
    color: var(--gray-500);
    padding: 5px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    font-weight: 500;
}

/* ===== Loading ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner-custom {
    width: 44px;
    height: 44px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Footer ===== */
.footer {
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 16px 0;
    margin-top: 40px;
    font-size: 0.82rem;
    color: var(--gray-500);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.02);
}

.footer i {
    margin-right: 4px;
}

/* ===== Loading Row ===== */
.loading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* ===== Fade Animation ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, #e8ecf1 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-text {
    height: 14px;
    margin: 4px 0;
}

.skeleton-badge {
    height: 24px;
    border-radius: 20px;
}

.skeleton-value {
    height: 32px;
    border-radius: 8px;
    margin: 2px 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Pagination ===== */
.pagination {
    gap: 2px;
}

.page-item .page-link {
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px !important;
    margin: 0;
    background: #fff;
    transition: var(--transition);
    cursor: pointer;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

.page-item .page-link:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-800);
    z-index: 0;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.page-item.disabled .page-link {
    background: var(--gray-50);
    color: var(--gray-400);
    cursor: not-allowed;
    opacity: 0.6;
}

.page-item:first-child .page-link,
.page-item:last-child .page-link {
    font-size: 0.7rem;
}

/* ===== Toast ===== */
.toast-container {
    z-index: 1055;
}

.toast-custom {
    background: #fff;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px;
    min-width: 280px;
    border-left: 4px solid var(--primary);
    font-size: 0.85rem;
}

.toast-custom.success {
    border-left-color: var(--success);
}

.toast-custom.error {
    border-left-color: var(--danger);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-bar {
        padding: 12px 0;
    }
    
    .header-bar::before {
        opacity: 0.3;
    }
    
    .brand-title {
        font-size: 1.05rem;
    }
    
    .brand-subtitle {
        font-size: 0.72rem;
    }
    
    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-body {
        padding: 16px 16px 12px;
    }
    
    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .chart-container {
        height: 240px;
    }
    
    .chart-container-sm {
        height: 220px;
    }
    
    .sub-nav-date {
        display: none;
    }
    
    .card-body {
        padding: 14px;
    }

    .filter-section {
        top: 43px;
    }
}

@media (max-width: 576px) {
    .stat-card {
        margin-bottom: 0;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px 10px;
        font-size: 0.78rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-body {
        padding: 14px 14px 10px;
        gap: 12px;
    }

    .sub-nav {
        padding: 8px 0;
    }
    
    .sub-nav-links a {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== Badge Counter ===== */
.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    font-weight: 600;
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* ===== Button Export ===== */
.btn-outline-success {
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    padding: 5px 14px;
    border: 1.5px solid var(--success);
    color: var(--success);
    transition: var(--transition);
    font-weight: 500;
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, var(--success), #047857);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
    transform: translateY(-1px);
}

/* ===== Container spacing ===== */
.container {
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1340px;
    }
}