:root {
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --card-shadow-hover: 0 10px 25px rgba(0,0,0,.1);
    --radius: 12px;
    --radius-sm: 8px;
}

* { font-family: 'Inter', sans-serif; }
body { background: #f1f5f9; }

/* ===== SIDEBAR (ULTRA-ATTRACTIVE MODERN DESIGN & SMOOTH MOBILE SCROLL) ===== */
#sidebar-wrapper {
    min-width: var(--sidebar-width); max-width: var(--sidebar-width);
    height: 100vh; max-height: 100vh;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000;
    overflow-y: auto !important; overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    transition: margin 0.3s ease, transform 0.3s ease;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
}
#sidebar-wrapper::-webkit-scrollbar { width: 5px; }
#sidebar-wrapper::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.35); border-radius: 10px; }
#sidebar-wrapper::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.15); }
#sidebar-wrapper.collapsed { margin-left: calc(-1 * var(--sidebar-width)); }

.sidebar .sidebar-brand {
    padding: 22px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
}
.sidebar .sidebar-brand h5 {
    font-weight: 800; font-size: 17px; color: #ffffff;
    letter-spacing: 0.2px; text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.sidebar .sidebar-brand small,
.sidebar .sidebar-address {
    font-size: 11px; color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500; letter-spacing: 0.3px; line-height: 1.35;
    margin-top: 4px; text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.sidebar .nav-link {
    padding: 11px 18px; font-size: 13.5px; font-weight: 600;
    color: rgba(255, 255, 255, 0.82); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 4px 12px; border-radius: 10px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; overflow: hidden;
}
.sidebar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.sidebar .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.12) 100%);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 700;
}
.sidebar .nav-link i {
    width: 22px; text-align: center; font-size: 16px; margin-right: 8px;
    transition: transform 0.2s ease;
}
.sidebar .nav-link:hover i, .sidebar .nav-link.active i {
    transform: scale(1.15);
}

/* Sidebar Overlay */
#sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5); z-index: 998; backdrop-filter: blur(2px);
    transition: opacity 0.3s;
}
#sidebar-overlay.show { display: block; }

/* ===== PAGE CONTENT ===== */
#page-content-wrapper {
    margin-left: var(--sidebar-width); min-height: 100vh;
    transition: margin 0.3s ease;
    position: relative;
}
#page-content-wrapper .top-bar {
    height: var(--topbar-height);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    backdrop-filter: blur(10px);
    position: relative; z-index: 10;
}

/* ===== CARDS ===== */
.card { border: none; box-shadow: var(--card-shadow); border-radius: var(--radius); transition: box-shadow 0.2s, transform 0.2s; background: #fff; }
.card:hover { box-shadow: var(--card-shadow-hover); }
.stat-card { padding: 20px 24px; border-radius: var(--radius); background: #fff; border: 1px solid #e2e8f0; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.stat-card h3 { font-size: 26px; font-weight: 700; margin: 0; line-height: 1.2; }
.stat-card p { font-size: 12.5px; margin: 0; opacity: .6; font-weight: 500; }
.stat-card .icon { width: 48px; height: 48px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-mini .card-body { padding: 16px; }

/* ===== TABLES ===== */
.table { margin-bottom: 0; font-size: 13.5px; }
.table th { font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; padding: 12px 14px; border-bottom: none; white-space: nowrap; }
.table td { padding: 12px 14px; vertical-align: middle; border-color: #f1f5f9; }
.table tbody tr:hover { background: #f8fafc; }
.table-dark th { background: var(--dark); color: #fff; }
.table-primary th { background: var(--primary); color: #fff; }
.table-responsive { border-radius: var(--radius); }

/* ===== BUTTONS ===== */
.btn { border-radius: var(--radius-sm); font-weight: 500; font-size: 13.5px; padding: 7px 14px; transition: all 0.2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 4px 12px rgba(79,70,229,.3); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-success:hover { background: #059669; border-color: #059669; box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-warning { background: var(--warning); border-color: var(--warning); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-outline-warning { color: var(--warning); border-color: var(--warning); }
.btn-outline-warning:hover { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-outline-danger { color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-outline-info { color: var(--info); border-color: var(--info); }
.btn-outline-info:hover { background: var(--info); border-color: var(--info); color: #fff; }

/* ===== BADGES ===== */
.badge { font-weight: 500; padding: 5px 10px; border-radius: 6px; }

/* ===== FORMS ===== */
.form-control, .form-select { border-radius: var(--radius-sm); border-color: #e2e8f0; font-size: 13.5px; padding: 8px 12px; transition: border-color 0.2s, box-shadow 0.2s; }
.form-control:focus, .form-select:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.form-label { font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 5px; }

/* ===== MODALS ===== */
.modal-content { border: none; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.15); }
.modal-header { border-bottom: 1px solid #f1f5f9; padding: 16px 20px; }
.modal-header .modal-title { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid #f1f5f9; padding: 12px 20px; }

/* ===== ALERTS ===== */
.alert { border-radius: var(--radius-sm); border: none; font-size: 13.5px; font-weight: 500; }

/* ===== NAV TABS ===== */
.nav-tabs .nav-link { font-size: 13.5px; font-weight: 500; color: #64748b; border: none; border-bottom: 2px solid transparent; padding: 10px 16px; }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; font-weight: 600; }

/* ===== LOGIN ===== */
.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(4, 7, 17, 1) 0%, rgba(13, 18, 36, 1) 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    top: -100px;
    left: -100px;
    filter: blur(120px);
    opacity: 0.4;
    z-index: 1;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    bottom: -120px;
    right: -120px;
    filter: blur(140px);
    opacity: 0.35;
    z-index: 1;
}
.login-card {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: loginFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-card:hover {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.login-card h3 {
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.5px;
}
.login-card p {
    color: rgba(255, 255, 255, 0.65) !important;
}
.login-card .form-label {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
}
.login-card .form-control {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    padding: 10px 14px !important;
}
.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}
.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.25) !important;
    color: #ffffff !important;
}
.login-card .input-group-text {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}
.login-card .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}
.login-card .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}
.login-card .form-check-label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
}
.login-card .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border: none !important;
    padding: 12px !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4) !important;
}
.login-card .btn-primary:hover {
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.55) !important;
    transform: translateY(-2px) !important;
}

/* ===== INVOICE ===== */
.invoice-box { background: #fff; padding: 30px; border: 1px solid #e2e8f0; border-radius: var(--radius); }

/* ===== PAGE HEADER ===== */
h4.mb-0 { font-weight: 700; font-size: 20px; color: var(--dark); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== DARK PAGE THEME OVERRIDES ===== */
#page-content-wrapper.dark-mode .card { background: #1e293b; border-color: #334155; }
#page-content-wrapper.dark-mode .card-header { background: #1e293b; color: #e2e8f0; border-color: #334155; }
#page-content-wrapper.dark-mode .card-header.bg-white { background: #1e293b; color: #e2e8f0; }
#page-content-wrapper.dark-mode .table { color: #e2e8f0; }
#page-content-wrapper.dark-mode .table th { background: #0f172a; color: #cbd5e1; }
#page-content-wrapper.dark-mode .table td { border-color: #1e293b; }
#page-content-wrapper.dark-mode .table tbody tr:hover { background: #1e293b; }
#page-content-wrapper.dark-mode .form-control, #page-content-wrapper.dark-mode .form-select { background: #0f172a; border-color: #334155; color: #e2e8f0; }
#page-content-wrapper.dark-mode .form-control:focus, #page-content-wrapper.dark-mode .form-select:focus { background: #1e293b; border-color: #4f46e5; color: #fff; }
#page-content-wrapper.dark-mode .form-label { color: #cbd5e1; }
#page-content-wrapper.dark-mode h4.mb-0 { color: #f1f5f9; }
#page-content-wrapper.dark-mode .text-muted { color: #94a3b8 !important; }
#page-content-wrapper.dark-mode .badge.bg-primary { background: #4f46e5 !important; }
#page-content-wrapper.dark-mode .modal-content { background: #1e293b; color: #e2e8f0; }
#page-content-wrapper.dark-mode .modal-header { border-color: #334155; }
#page-content-wrapper.dark-mode .modal-footer { border-color: #334155; }

/* ===== PRINT ===== */
@media print {
    .no-print { display: none !important; }
    .invoice-box { border: none; box-shadow: none; }
    body { background: #fff; }
    #sidebar-wrapper, .top-bar { display: none !important; }
    #page-content-wrapper { margin-left: 0 !important; }
}

/* ===== KHATA ===== */
.khata-entry { border-left: 3px solid var(--primary); }
.khata-entry.payment { border-left-color: var(--success); }

/* ===== SORT ICONS ===== */
.sortable-table thead th { cursor: pointer; user-select: none; position: relative; }
.sortable-table thead th:hover { background: rgba(0,0,0,.05); }
.sort-icon { opacity: .4; transition: all .2s; font-size: 10px; }
.sortable-table thead th:hover .sort-icon { opacity: .8; }
.sort-icon.bi-arrow-up, .sort-icon.bi-arrow-down { opacity: 1; color: #fff; }

/* ===== ICON BOX ===== */
.icon-box { display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; transition: transform .2s; }
.icon-box:hover { transform: scale(1.05); }

/* ===== STAT MINI CARDS ===== */
.stat-mini { border: none; border-radius: 12px; transition: all .2s; }
.stat-mini:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }

/* ===== FILTER BAR ===== */
.filter-bar { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.filter-bar .form-control, .filter-bar .form-select { font-size: 12.5px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.stat-card, .card { animation: fadeIn 0.3s ease-out; }

/* ===== THEME PICKER ===== */
.theme-manager-card { border: none; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.theme-manager-card .card-header { font-weight: 600; font-size: 14px; }
.theme-color-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.theme-color-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 8px 4px; border: 2px solid transparent; border-radius: 10px;
    background: #f8fafc; cursor: pointer; transition: all 0.25s;
}
.theme-color-btn:hover { background: #eef2ff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.theme-color-btn.active { border-color: var(--primary); background: #eef2ff; box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.theme-color-circle {
    width: 40px; height: 40px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; color: #fff;
    font-size: 16px; font-weight: 700; transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.theme-color-btn:hover .theme-color-circle { transform: scale(1.1); }
.theme-color-btn.active .theme-color-circle { transform: scale(1.15); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.theme-color-circle .bi-check-lg { opacity: 0; transition: opacity 0.2s; font-size: 18px; }
.theme-color-btn.active .theme-color-circle .bi-check-lg { opacity: 1; }
.theme-color-name { font-size: 10px; font-weight: 600; color: #64748b; line-height: 1; }
.theme-color-btn.active .theme-color-name { color: var(--primary); }
.theme-section-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #94a3b8; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.theme-section-title::after {
    content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.live-preview-box {
    border: 2px dashed #c7d2fe; border-radius: 16px; padding: 12px;
    background: linear-gradient(135deg,#f5f3ff,#eef2ff); min-height: 140px; transition: all 0.3s;
}
.live-preview-box:hover { border-color: #818cf8; }
.preview-mini-layout { display: flex; border-radius: 12px; overflow: hidden; height: 140px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.preview-mini-sidebar { width: 60px; min-width: 60px; padding: 0; color: #fff; overflow: hidden; }
.preview-mini-sidebar .ps-brand { font-size: 9px; letter-spacing: .5px; }
.preview-mini-sidebar .ps-icon { width: 16px; height: 16px; background: rgba(255,255,255,.15); border-radius: 4px; margin: 3px auto; }
.preview-mini-sidebar .ps-icon.active { background: rgba(255,255,255,.9); }
.preview-mini-main { flex: 1; background: #f1f5f9; display: flex; flex-direction: column; }
.preview-mini-topbar { height: 22px; display: flex; align-items: center; padding: 0 8px; gap: 4px; }
.preview-mini-topbar .pt-dot { width: 5px; height: 5px; border-radius: 50%; }
.preview-mini-content { flex: 1; padding: 6px; display: flex; gap: 4px; }
.preview-mini-content .pmc { flex: 1; background: #fff; border-radius: 4px; border: 1px solid #e2e8f0; }
.preview-mini-footer { font-size: 7px; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
        box-shadow: none;
        transition: margin 0.3s ease;
    }
    #sidebar-wrapper.mobile-open {
        margin-left: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,.3);
    }
    #page-content-wrapper {
        margin-left: 0 !important;
    }
    #page-content-wrapper .top-bar {
        height: 56px;
    }
    .container-fluid { padding: 12px !important; }
    h4.mb-0 { font-size: 17px; }
}

@media (max-width: 768px) {
    .container-fluid { padding: 10px !important; }
    h4.mb-0 { font-size: 16px; }
    .btn { font-size: 12px; padding: 6px 10px; }
    .badge { font-size: 10px; padding: 4px 7px; }
    .form-label { font-size: 12px; }
    .form-control, .form-select { font-size: 13px; padding: 7px 10px; }

    .stat-card { padding: 14px 16px; }
    .stat-card h3 { font-size: 22px; }
    .stat-card p { font-size: 11px; }
    .stat-card .icon { width: 40px; height: 40px; font-size: 18px; }

    .table { font-size: 12px; }
    .table th { font-size: 10px; padding: 8px 10px; }
    .table td { font-size: 12px; padding: 8px 10px; }

    .modal-body { padding: 14px; }
    .modal-header { padding: 12px 14px; }
    .modal-footer { padding: 10px 14px; }

    .card-body { padding: 14px; }
    .card-header { padding: 10px 14px; }

    .invoice-box { padding: 16px; }

    .login-card { padding: 24px; border-radius: 16px; }

    .d-flex.justify-content-between { flex-wrap: wrap; gap: 8px; }
    .row.g-3 > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
    .row.g-4 > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
    .mb-3, .mb-4 { margin-bottom: 12px !important; }

    .theme-color-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 6px; }
    .theme-color-circle { width: 34px; height: 34px; font-size: 14px; }
    .theme-color-name { font-size: 9px; }
    .theme-color-btn { padding: 6px 2px; }

    .live-preview-box { padding: 8px; min-height: 120px; }
    .preview-mini-layout { height: 120px; }
    .preview-mini-sidebar { width: 45px; min-width: 45px; }

    .nav-tabs .nav-link { font-size: 12px; padding: 8px 10px; }

    .btn-group-mobile { display: flex; flex-wrap: wrap; gap: 4px; }
    .btn-group-mobile .btn { flex: 1; min-width: auto; font-size: 11px; padding: 5px 8px; text-align: center; justify-content: center; }
}

@media (max-width: 576px) {
    .container-fluid { padding: 8px !important; }
    h4.mb-0 { font-size: 15px; }

    .stat-card { padding: 12px; }
    .stat-card h3 { font-size: 20px; }
    .stat-card .icon { width: 36px; height: 36px; font-size: 16px; border-radius: 8px; }

    .theme-color-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 5px; }
    .theme-color-circle { width: 30px; height: 30px; font-size: 12px; }
    .theme-color-btn { padding: 5px 2px; gap: 4px; }
    .theme-color-name { font-size: 8px; }
    .theme-manager-card .card-body { padding: 10px; }
    .theme-manager-card .card-header { font-size: 12px; padding: 8px 12px; }

    .preview-mini-layout { height: 100px; }
    .preview-mini-sidebar { width: 35px; min-width: 35px; }
    .preview-mini-sidebar .ps-brand { font-size: 7px; }
    .preview-mini-sidebar .ps-icon { width: 12px; height: 12px; margin: 2px auto; }
    .preview-mini-topbar { height: 16px; }
    .preview-mini-topbar .pt-dot { width: 3px; height: 3px; }
    .preview-mini-content { padding: 3px; gap: 2px; }
    .preview-mini-content .pmc { border-radius: 2px; }

    .row.g-3 > [class*="col-"],
    .row.g-4 > [class*="col-"] { padding-left: 6px; padding-right: 6px; }

    .d-flex.gap-3 { gap: 6px !important; }
    .d-flex.gap-2 { gap: 4px !important; }

    .modal-dialog { margin: 8px; }
    .modal-content { border-radius: 10px; }
}

@media (max-width: 400px) {
    .theme-color-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .stat-card h3 { font-size: 18px; }
    h4.mb-0 { font-size: 14px; }
    .login-card { padding: 20px; }
    .login-card h3 { font-size: 20px; }
    .btn { font-size: 11px; padding: 5px 8px; }
}

/* ===== MOBILE UTILITY ===== */
.mobile-full-width { width: 100% !important; max-width: 100% !important; }
.mobile-mt-2 { margin-top: 8px; }
.mobile-mb-2 { margin-bottom: 8px; }
.mobile-text-center { text-align: center; }
.mobile-hide { display: none; }
.mobile-show { display: block; }
.text-truncate-mobile { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; display: inline-block; }

/* ===== PREMIUM POLISHED ADDITIONS ===== */
.card, .stat-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover, .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
}
.sidebar .nav-link {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    transform: translateX(4px);
}
/* Styled DataTables Search & Pagination */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    outline: none;
    transition: all 0.2s;
    font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #475569 !important;
    transition: all 0.2s;
    padding: 4px 10px !important;
    margin: 0 2px;
    font-size: 12px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
