:root {
    --sidebar-bg: #111827;
    --sidebar-bg-light: #1f2937;
    --sidebar-width: 260px;
    --accent: #4f46e5;
    --accent-dark: #4338ca;
    --text-light: #94a3b8;
    --topbar-height: 64px;
    --body-bg: #f8fafc;
}

* { box-sizing: border-box; }

body {
    background: var(--body-bg);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    color: #1e293b;
    overflow-x: hidden;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ---------- Fixed Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--text-light);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 24px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

/* Custom Sleek Scrollbar */
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #475569; }

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 20px;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .5px;
    border-bottom: 1px solid #1f2937;
    flex-shrink: 0;
}
.sidebar-brand .brand-icon { color: var(--accent); font-size: 24px; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #1f2937;
    flex-shrink: 0;
}
.sidebar-user .avatar i { font-size: 34px; color: #64748b; }
.sidebar-user .uname { color: #f8fafc; font-weight: 700; font-size: 14px; }
.sidebar-user .urole { font-size: 11px; letter-spacing: .6px; color: #94a3b8; font-weight: 600; }

.sidebar-section {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #64748b;
    padding: 18px 20px 6px;
    text-transform: uppercase;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all .15s ease;
}
.sidebar .nav-link i { width: 18px; font-size: 16px; }
.sidebar .nav-link:hover { background: var(--sidebar-bg-light); color: #fff; }
.sidebar .nav-link.active {
    background: rgba(79, 70, 229, 0.15);
    color: #818cf8;
    border-left: 3px solid var(--accent);
    font-weight: 600;
}

/* ---------- Main Content Area ---------- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Sticky Frosted Glass Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.topbar h4 { margin: 0; font-weight: 700; color: #0f172a; }

.btn-sidebar-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #475569;
    background: #f8fafc;
    transition: all .15s ease;
}
.btn-sidebar-toggle:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.page-body {
    padding: 24px 28px;
    flex: 1;
}

/* ---------- Desktop Collapsed State ---------- */
@media (min-width: 992px) {
    html.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    html.sidebar-collapsed .main-content {
        margin-left: 0 !important;
    }
}

/* ---------- Mobile Responsive Drawer ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .main-content {
        margin-left: 0 !important;
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }
    .sidebar-backdrop {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(2px);
        z-index: 1035;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }
    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }
    .topbar { padding: 0 16px; }
    .page-body { padding: 16px; }
}

/* ---------- Refined Card Boxes & Elevations ---------- */
.card-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.card-box:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.08);
}
.stat-card .icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; flex-shrink: 0;
}
.stat-card .num { font-size: 22px; font-weight: 700; color: #1e2532; }
.stat-card .lbl { font-size: 13px; color: #7c86a1; }

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.table thead th {
    background: #f8f9fc;
    font-size: 12.5px;
    text-transform: uppercase;
    color: #6b7590;
    border-bottom: none;
}
.table td, .table th { vertical-align: middle; }
.student-photo {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; background: #e5e9f2;
}
.badge-active { background: #16a34a; }
.badge-inactive { background: #9ca3af; }

/* ---------- Login page ---------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#eef1fb,#e3e7fb);
}
.login-box {
    display: flex;
    max-width: 900px;
    width: 100%;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(30,37,50,.15);
}
.login-illustration {
    flex: 1;
    background: linear-gradient(160deg,#dfe4fb,#eef0fd);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.login-illustration i { font-size: 90px; color: var(--accent); }
.login-illustration h5 { margin-top: 20px; font-weight: 700; color: #1e2532; }
.login-illustration p { color: #6b7590; font-size: 14px; }
.login-form { flex: 1; padding: 50px 45px; }
.login-form h3 { font-weight: 700; color: #1e2532; }
.login-form p.subtitle { color: #7c86a1; margin-bottom: 24px; }

@media (max-width: 768px) {
    .login-box { flex-direction: column; }
}

.btn-demo { border-color: rgba(99,102,241,.5); color: var(--accent-dark); background: #fff; }
.btn-demo:hover { background: var(--accent); color: #fff; }

/* ---------- Sidebar submenu ---------- */
.sidebar .nav-toggle { justify-content: flex-start; }
.sidebar .nav-toggle .caret { transition: transform .2s; }
.sidebar .nav-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.nav-submenu { display: flex; flex-direction: column; background: #171d29; }
.nav-submenu a {
    color: var(--text-light);
    padding: 8px 18px 8px 46px;
    font-size: 13.5px;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.nav-submenu a:hover { color: #fff; background: var(--sidebar-bg-light); }
.nav-submenu a.active { color: #fff; font-weight: 600; border-left: 3px solid var(--accent); }

.text-accent { color: var(--accent) !important; }
.bg-accent { background: var(--accent) !important; }
.sort-link { color: #1e2532; text-decoration: none; }
.sort-link:hover { color: var(--accent); }

.badge-partial { background: #f59e0b; }

/* ---------- Quick actions ---------- */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qa-btn {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 10px; padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    color: #1e2532; text-decoration: none; font-size: 14px; font-weight: 600;
    flex: 1 1 150px;
}
.qa-btn:hover { background: var(--accent); color: #fff; }
.qa-btn i { color: var(--accent); font-size: 18px; }
.qa-btn:hover i { color: #fff; }

/* ---------- Spreadsheet-style table (bulk edit) ---------- */
.spreadsheet-table th, .spreadsheet-table td { padding: 4px 6px; }
.spreadsheet-table input, .spreadsheet-table select { min-width: 100px; }

/* ---------- Family cards ---------- */
.family-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow: hidden; }
.family-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; cursor: pointer;
}
.family-card-header:hover { background: #f8f9fc; }
.family-collapse { border-top: 1px solid #eef0f5; }

/* ---------- Month status chips ---------- */
.month-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (min-width: 768px) { .month-grid { grid-template-columns: repeat(12, 1fr); } }
.month-chip {
    text-align: center; padding: 8px 4px; border-radius: 8px; font-size: 12px; font-weight: 600;
    color: #fff;
}
.chip-paid { background: #16a34a; }
.chip-unpaid { background: #dc2626; }
.chip-none { background: #9ca3af; }

/* ---------- Profile photo ---------- */
.profile-photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; background: #e5e9f2; }
.profile-photo-icon { font-size: 100px; color: #ccc; }
.student-chip { display: inline-block; background: #eef0fd; color: var(--accent-dark); padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }

/* ---------- Coming soon ---------- */
.coming-soon-icon { font-size: 60px; color: var(--accent); opacity: .6; }

/* ---------- Birthday cards ---------- */
.birthday-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.birthday-card {
    text-align: center; border: 2px dashed var(--accent); border-radius: 12px; padding: 20px;
    background: linear-gradient(160deg,#fdf2f8,#eef1fb);
}
.birthday-card i.bi-balloon-heart-fill { font-size: 30px; color: #ec4899; }
.birthday-photo { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; display: block; margin: 8px auto; }
.birthday-photo-icon { font-size: 70px; color: #c7cbe0; display: block; margin: 8px auto; }
.birthday-card h5 { margin: 6px 0 4px; font-weight: 700; color: var(--accent-dark); }

/* ---------- Print / certificate pages ---------- */
.print-body { background: #eef0f5; }
.print-toolbar { padding: 16px; display: flex; gap: 10px; justify-content: center; }
.print-sheet {
    max-width: 800px; margin: 0 auto 40px; background: #fff; padding: 40px;
    box-shadow: 0 1px 6px rgba(0,0,0,.1); border-radius: 6px;
}
.print-sheet-narrow { max-width: 500px; }
.print-school-header { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid #1e2532; padding-bottom: 14px; }
.print-school-header i { font-size: 48px; color: var(--accent); }
.print-school-header h3 { margin: 0; font-weight: 800; }
.print-school-header p { margin: 2px 0 0; font-size: 13px; color: #6b7590; }
.print-banner { letter-spacing: 1px; text-decoration: underline; }
.declaration { font-size: 13.5px; color: #333; line-height: 1.6; text-align: justify; margin-top: 16px; }
.signature-row { display: flex; justify-content: space-between; margin-top: 60px; font-size: 13px; text-align: center; }
.print-footer { text-align: right; font-size: 11px; color: #9ca3af; margin-top: 30px; }
.certificate-sheet { border: 6px double #1e2532; }
.certificate-table th { width: 22%; color: #4b5563; font-weight: 600; }
.school-seal {
    width: 100px; height: 100px; border: 3px dashed #9ca3af; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #9ca3af; font-size: 12px; font-weight: 700; text-align: center;
}

@media print {
    .no-print, .sidebar, .topbar, .app-wrapper > .sidebar { display: none !important; }
    body { background: #fff; }
    .print-sheet { box-shadow: none; margin: 0; max-width: 100%; }
}

/* ---------- Teacher module ---------- */
.class-pill {
    display: inline-block; background: #eef0fd; color: var(--accent-dark);
    padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; margin: 2px 3px 2px 0;
}
.password-cell { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.password-cell .pw-masked, .password-cell .pw-plain { font-family: monospace; }

.btn-teal { background: #0d9488; border-color: #0d9488; color: #fff; }
.btn-teal:hover { background: #0f766e; border-color: #0f766e; color: #fff; }

.cert-ref-row { display: flex; justify-content: space-between; font-size: 13px; color: #4b5563; margin-top: 10px; }
.cert-attention { letter-spacing: 1px; margin-bottom: 16px; }
.cert-salary-box {
    background: #fef9c3; border: 1px dashed #ca8a04; border-radius: 6px;
    padding: 10px 16px; font-weight: 700; text-align: center; margin: 16px 0; color: #713f12;
}

/* ---------- Parents module ---------- */
#parentModal .modal-body { max-height: 60vh; overflow-y: auto; }
.student-pick-box {
    max-height: 180px; overflow-y: auto; border: 1px solid #e5e9f2; border-radius: 8px; padding: 10px;
}
.selected-children-box {
    min-height: 42px; border: 1px dashed #c7cbe0; border-radius: 8px; padding: 8px 10px;
    display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start;
}
.child-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eef0fd; color: var(--accent-dark); padding: 4px 10px 4px 12px;
    border-radius: 20px; font-size: 12.5px; font-weight: 600;
}
.child-chip small { font-weight: 500; color: #6b7590; }
.child-chip .chip-remove { cursor: pointer; color: #9ca3af; }
.child-chip .chip-remove:hover { color: #dc2626; }

/* ---------- ID Cards module ---------- */
.idcard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) { .idcard-grid { grid-template-columns: 1fr; } }
.idcard {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.12); border: 1px solid #e5e9f2;
    display: flex; flex-direction: column;
}
.idcard-header {
    padding: 12px 16px; color: #fff; display: flex; align-items: center; gap: 12px;
}
.idcard-header .idcard-logo {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2);
    display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.idcard-header .idcard-school-name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.idcard-header .idcard-school-addr { font-size: 10.5px; opacity: .9; }
.idcard-body { padding: 14px 16px; display: flex; gap: 14px; flex: 1; }
.idcard-photo {
    width: 78px; height: 78px; border-radius: 50%; object-fit: cover; background: #e5e9f2;
    border: 3px solid #eef0fd; flex-shrink: 0;
}
.idcard-photo-icon {
    width: 78px; height: 78px; border-radius: 50%; background: #eef0fd; color: #b7bce0;
    display: flex; align-items: center; justify-content: center; font-size: 40px; flex-shrink: 0;
}
.idcard-fields { flex: 1; min-width: 0; }
.idcard-fields .name { font-weight: 800; font-size: 15px; margin-bottom: 4px; color: #1e2532; }
.idcard-fields .row { display: flex; gap: 6px; font-size: 11.5px; color: #4b5563; margin-bottom: 2px; white-space: nowrap; }
.idcard-fields .row .lbl { flex: 0 0 auto; color: #1e2532; font-weight: 600; }
.idcard-fields .row .val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.idcard-body-centered .idcard-fields .row { justify-content: center; }
.idcard-body-centered .idcard-fields .row .val { flex: 0 0 auto; }
.idcard-qr {
    width: 54px; height: 54px; border: 2px dashed #c7cbe0; border-radius: 6px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 9px; color: #9ca3af; font-weight: 700; letter-spacing: 1px;
}
.idcard-qr i { font-size: 22px; color: #c7cbe0; }
.idcard-footer {
    padding: 6px 16px; font-size: 9.5px; text-align: center; letter-spacing: .3px;
    background: #f8f9fc; color: #6b7590; border-top: 1px solid #eef0f5;
}
.idcard-tpl-badge {
    background: #eef0fd; color: var(--accent-dark); font-weight: 700; font-size: 12.5px;
    padding: 6px 14px; border-radius: 20px;
}

/* Template palettes */
.idcard-tpl-1 .idcard-header { background: linear-gradient(120deg,#6366f1,#4f46e5); }
.idcard-tpl-2 .idcard-header { background: linear-gradient(120deg,#0d9488,#0f766e); }
.idcard-tpl-3 .idcard-header { background: #171d29; }
.idcard-tpl-4 .idcard-header { background: linear-gradient(120deg,#f59e0b,#d97706); }
.idcard-tpl-5 .idcard-header { background: linear-gradient(120deg,#db2777,#9d174d); padding: 16px; }

.idcard-tpl-3 { background: #1e2532; }
.idcard-tpl-3 .idcard-fields .name { color: #fff; }
.idcard-tpl-3 .idcard-fields .row { color: #cbd5e1; }
.idcard-tpl-3 .idcard-fields .row b { color: #fff; }
.idcard-tpl-3 .idcard-footer { background: #171d29; color: #8b94ab; border-top-color: #333c4d; }
.idcard-tpl-3 .idcard-photo, .idcard-tpl-3 .idcard-photo-icon { border-color: #333c4d; }
.idcard-tpl-3 .idcard-qr { border-color: #4b5567; color: #6b7590; }
.idcard-tpl-3 .idcard-qr i { color: #4b5567; }

.idcard-tpl-5 .idcard-body { background: linear-gradient(180deg,#fff,#fdf2f8); }
.idcard-tpl-5 .idcard-fields .name { color: #9d174d; }

.idcard-body-centered { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.idcard-qr-float { display: flex; justify-content: flex-end; padding: 0 16px 10px; margin-top: -6px; }
.idcard-qr-float-sm .idcard-qr { width: 42px; height: 42px; font-size: 8px; }
.idcard-qr-float-sm .idcard-qr i { font-size: 18px; }

/* Template 6 — modern portrait: corner color-blocks, portrait photo, icon field rows, barcode */
.idcard-tpl-6 { position: relative; background: #fff; padding-top: 14px; }
.idcard6-decor { position: absolute; border-radius: 50%; z-index: 0; }
.idcard6-decor-tl-a { width: 120px; height: 120px; background: #1e2532; top: -60px; left: -60px; }
.idcard6-decor-tl-b { width: 54px; height: 54px; background: #f59e0b; top: -8px; left: 46px; }
.idcard6-decor-br-a { width: 120px; height: 120px; background: #1e2532; bottom: -60px; right: -60px; }
.idcard6-decor-br-b { width: 54px; height: 54px; background: #f59e0b; bottom: -8px; right: 46px; }
.idcard6-brand {
    position: relative; z-index: 1; display: flex; align-items: center; gap: 6px;
    padding: 4px 0 0 84px; font-weight: 800; font-size: 11px; letter-spacing: .6px;
    text-transform: uppercase; color: #1e2532;
}
.idcard6-brand i { color: var(--accent); }
.idcard6-content { position: relative; z-index: 1; padding: 8px 20px 0; text-align: center; }
.idcard6-photo-wrap {
    width: 84px; height: 100px; margin: 4px auto 10px; border-radius: 14px; overflow: hidden;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #1e2532; background: #eef0fd;
    display: flex; align-items: center; justify-content: center;
}
.idcard6-photo-wrap .idcard6-photo { width: 100%; height: 100%; object-fit: cover; }
.idcard6-photo-wrap .idcard6-photo-icon { font-size: 46px; color: #b7bce0; }
.idcard6-name { font-weight: 800; font-size: 15.5px; color: #1e2532; }
.idcard6-role { font-size: 10.5px; font-weight: 700; color: var(--accent-dark); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.idcard6-fields { text-align: left; margin-bottom: 8px; }
.idcard6-fields .f {
    display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #4b5563;
    padding: 4px 2px; border-bottom: 1px dashed #eef0f5;
}
.idcard6-fields .f i { color: var(--accent); width: 14px; text-align: center; flex-shrink: 0; }
.idcard6-fields .f .lbl { color: #1e2532; font-weight: 600; flex-shrink: 0; }
.idcard6-fields .f .val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idcard6-barcode {
    height: 28px; margin: 2px 0 8px;
    background: repeating-linear-gradient(90deg, #1e2532 0 2px, transparent 2px 4px, #1e2532 4px 5px,
        transparent 5px 9px, #1e2532 9px 12px, transparent 12px 14px, #1e2532 14px 17px, transparent 17px 20px);
}
.idcard6-footer {
    position: relative; z-index: 1; text-align: center; font-size: 9.5px; letter-spacing: .3px;
    color: #6b7590; padding-bottom: 10px;
}

@media print {
    .idcard-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .idcard { box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
    .print-sheet { max-width: 100%; padding: 10px; }
}

/* ---------- Enhanced Color, Badge & Stat Utility Classes ---------- */
.text-indigo { color: #4338ca !important; }
.bg-indigo { background-color: #4f46e5 !important; color: #fff !important; }
.bg-indigo-light { background-color: #eef2ff !important; color: #4338ca !important; }
.border-indigo { border-color: #6366f1 !important; }
.btn-indigo { background-color: #4f46e5 !important; border-color: #4f46e5 !important; color: #fff !important; }
.btn-indigo:hover { background-color: #4338ca !important; border-color: #4338ca !important; color: #fff !important; }
.btn-outline-indigo { border-color: #6366f1 !important; color: #4f46e5 !important; background: transparent; }
.btn-outline-indigo:hover { background-color: #4f46e5 !important; color: #fff !important; }

/* Stat card icon and value support */
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-card .val { font-size: 22px; font-weight: 700; color: #1e2532; }

/* Palette light colors */
.bg-cyan-light { background-color: #e0f2fe !important; }
.text-cyan { color: #0284c7 !important; }
.bg-green-light { background-color: #dcfce7 !important; }
.text-green { color: #16a34a !important; }
.bg-amber-light { background-color: #fef3c7 !important; }
.text-amber { color: #d97706 !important; }
.bg-red-light { background-color: #fee2e2 !important; }
.text-red { color: #dc2626 !important; }

/* Code Badge - High-contrast readable code pills */
.code-badge {
    display: inline-block;
    background: #eef2ff !important;
    color: #4338ca !important;
    border: 1px solid #c7d2fe !important;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.3;
}
