﻿*{margin:0;padding:0;box-sizing:border-box;}

/* ── Global font & smooth baseline ── */
:root{
  --font-sans:'Inter',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:18px;
  --shadow-sm:0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.05);
  --shadow-md:0 4px 12px rgba(0,0,0,.08),0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:0 10px 30px rgba(0,0,0,.1),0 4px 12px rgba(0,0,0,.06);
  --transition:all .18s cubic-bezier(.4,0,.2,1);
}
html{scroll-behavior:smooth;}
body{
  font-family:var(--font-sans);
  font-size:15px;
  line-height:1.6;
  color:#1e293b;
  background:linear-gradient(135deg,#eaf2ff,#f7fff9);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}
body.dark{color:#e2e8f0;}
/* Smooth text selection */
::selection{background:rgba(99,102,241,.18);color:inherit;}
/* Global scrollbar */
::-webkit-scrollbar{width:6px;height:6px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:rgba(99,102,241,.25);border-radius:99px;}
::-webkit-scrollbar-thumb:hover{background:rgba(99,102,241,.45);}
body.dark ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.15);}
/* Smooth focus rings */
:focus-visible{outline:2px solid #6366f1;outline-offset:2px;border-radius:4px;}
/* Smooth button & link transitions */
a{transition:var(--transition);}
button{transition:var(--transition);}
input,select,textarea{
  font-family:var(--font-sans);
  font-size:.88rem;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
/* Bootstrap overrides for font */
.btn,.form-control,.form-select,.card,.modal,.dropdown-menu,.alert,.badge,.nav,.navbar,.table{font-family:var(--font-sans);}
.btn{font-weight:500;letter-spacing:.01em;transition:var(--transition);}
.btn:active{transform:scale(.98);}
.card{border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);border:1px solid #e8edf3;transition:box-shadow .2s;}
body.dark .card{background:#1e293b;border-color:#334155;}
.card:hover{box-shadow:var(--shadow-md);}
.form-control,.form-select{border-radius:var(--radius-sm);border-color:#e2e8f0;font-size:.875rem;}
.form-control:focus,.form-select:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.15);}
.table{font-size:.875rem;}
.modal-content{border-radius:var(--radius-lg);border:none;box-shadow:var(--shadow-lg);}
.dropdown-menu{border-radius:var(--radius-md);border:1px solid #e8edf3;box-shadow:var(--shadow-md);font-size:.875rem;}
.alert{border-radius:var(--radius-md);}
/* Heading smoothness */
h1,h2,h3,h4,h5,h6{font-family:var(--font-sans);font-weight:700;letter-spacing:-.02em;line-height:1.3;}
/* Nepali font override stays scoped */
:root {
    --public-primary: #2563eb;
    --public-secondary: #10b981;
}

.dashboard-topbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.dashboard-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 0;
    background: var(--public-primary, #2563eb);
    color: #fff;
    box-shadow: 0 14px 32px rgba(37, 99, 235, .18);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.dashboard-menu-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, .22);
}
.position-relative .dashboard-menu-toggle {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 70;
}
.dashboard-menu-panel {
    position: absolute;
    top: 72px;
    left: 18px;
    z-index: 60;
    min-width: 220px;
    background: var(--public-primary, #2563eb);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .26);
    padding: 12px;
    margin-top: 0;
}
.student-dashboard-header .dashboard-menu-toggle {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 70;
}
.student-dashboard-header .dashboard-menu-panel {
    position: absolute;
    top: 72px;
    left: 18px;
    right: auto;
}
@media (max-width: 767px) {
    .eims-notification-widget {
        top: 82px;
        right: 14px;
    }

    .eims-notification-panel {
        right: -2px;
    }

    .teacher-hero-notifications,
    .student-hero-notifications {
        top: 14px;
        right: 14px;
    }

    .student-dashboard-header .dashboard-menu-toggle {
        top: 14px;
        left: 14px;
    }
    .student-dashboard-header .dashboard-menu-panel {
        left: 14px;
        right: 14px;
        min-width: auto;
    }
    .position-relative .dashboard-menu-toggle {
        top: 14px;
        left: 14px;
    }
    .position-relative .dashboard-menu-panel {
        left: 14px;
        right: 14px;
        min-width: auto;
    }
    .student-dashboard-header{
        min-height:auto;
        padding-top:82px!important;
    }
    .student-dashboard-header .profile-photo{
        width:118px;
        height:118px;
        border-width:6px;
    }
    .student-dashboard-header h2{
        margin-top:8px;
        font-size:2rem;
        text-align:center;
    }
    .student-dashboard-header .dashboard-name-line{
        justify-content:center;
        text-align:center;
    }
    .student-hero-action-row{
        justify-content:center;
    }
    .student-dashboard-header .text-md-end{
        justify-content:center;
        width:100%;
    }
    .student-info-card p,
    .student-fee-card p{
        display:block;
    }
    .student-info-card p b,
    .student-fee-card p b{
        display:block;
        margin-bottom:4px;
    }
}

.dashboard-menu-panel a,
.dashboard-menu-action {
    display: block;
    width: 100%;
    color: #fff;
    text-decoration: none;
    padding: .85rem 1rem;
    border-radius: 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, .08);
    border: 0;
    text-align: left;
    font-weight: 650;
    transition: background .2s ease;
}

.dashboard-menu-action {
    cursor: pointer;
    display:flex;
    align-items:center;
    gap:8px;
}

.dashboard-menu-action i {
    margin-right: 0;
}

.dashboard-menu-panel a:hover,
.dashboard-menu-action:hover {
    background: rgba(255, 255, 255, .18);
}

.dashboard-menu-panel a:last-child,
.dashboard-menu-action:last-child {
    margin-bottom: 0;
}
.student-menu-language{
    margin:8px 0;
    padding:10px;
    border-radius:14px;
    background:rgba(255,255,255,.1);
}
.student-menu-language .dashboard-language-switcher{
    position:static;
    display:flex;
    width:100%;
    align-items:center;
    gap:8px;
    margin:0;
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
}
.student-menu-language .dashboard-language-switcher i{
    color:#d1fae5;
}
.student-menu-language .dashboard-language-switcher select{
    width:100%;
    min-width:0;
    border:1px solid rgba(255,255,255,.24);
    color:#fff;
    background:rgba(15,23,42,.18);
}
.student-menu-language .dashboard-language-switcher option{
    color:#0f172a;
}

.dark-mode-toggle {
    justify-content: flex-start;
}

.dark-toggle-switch {
    margin-left: auto;
    width: 56px;
    height: 28px;
    border-radius: 999px;
    background: #94a3b8;
    border: 2px solid #64748b;
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    transition: background .35s cubic-bezier(.4,0,.2,1), border-color .35s, box-shadow .35s;
}

/* Sun icon — right side, light mode */
.dark-toggle-switch::before {
    content: "☀";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    line-height: 1;
    color: #fde68a;
    transition: opacity .25s;
    z-index: 1;
    pointer-events: none;
}

/* Moon icon — left side, dark mode */
.dark-mode-toggle.is-on .dark-toggle-switch::before {
    content: "🌙";
    right: auto;
    left: 6px;
    font-size: 11px;
}

/* Dot */
.dark-toggle-switch::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15,23,42,.35);
    transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1), background .35s;
    z-index: 2;
}

/* OFF state = light mode — grey track, white dot */
.dark-toggle-switch {
    background: #94a3b8;
    border-color: #64748b;
}

/* ON state = dark mode — indigo track, yellow dot */
.dark-mode-toggle.is-on .dark-toggle-switch {
    background: #4f46e5;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.25);
}

.dark-mode-toggle.is-on .dark-toggle-switch::after {
    transform: translateX(27px);
    background: #fde68a;
    box-shadow: 0 2px 8px rgba(253,230,138,.5);
}

/* Sidebar toggle — light gradient background needs a solid visible track */
.eims-desktop-sidebar .dark-toggle-switch {
    background: #c7d2fe;
    border-color: #a5b4fc;
}
.eims-desktop-sidebar .dark-toggle-switch::before {
    color: #f59e0b;
}
.eims-desktop-sidebar .dark-toggle-switch::after {
    background: #6366f1;
    box-shadow: 0 1px 4px rgba(99,102,241,.35);
}
.eims-desktop-sidebar .dark-mode-toggle.is-on .dark-toggle-switch {
    background: #22c55e;
    border-color: #86efac;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}
.eims-desktop-sidebar .dark-mode-toggle.is-on .dark-toggle-switch::after {
    background: #fff;
    box-shadow: 0 1px 4px rgba(15,23,42,.2);
}
/* Dark mode — sidebar turns dark, switch back to light-on-dark palette */
body.dark .eims-desktop-sidebar .dark-toggle-switch {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.28);
}
body.dark .eims-desktop-sidebar .dark-toggle-switch::after {
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.25);
}
body.dark .eims-desktop-sidebar .dark-mode-toggle.is-on .dark-toggle-switch {
    background: #22c55e;
    border-color: #86efac;
}

.smart-help-tooltip {
    position: fixed;
    z-index: 7000;
    width: min(360px, calc(100vw - 24px));
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .2), 0 8px 18px rgba(15, 23, 42, .08);
    padding: 14px 15px;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    font-size: .84rem;
    line-height: 1.42;
    font-weight: 600;
}

.smart-help-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.smart-help-tooltip span {
    display: block;
    color: #475569;
    margin-top: 7px;
}

.smart-help-tooltip strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: .94rem;
    line-height: 1.2;
    padding-bottom: 9px;
    border-bottom: 1px solid #e2e8f0;
}

.smart-help-tooltip strong::before {
    content: "?";
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    font-size: .78rem;
    font-weight: 900;
}

.smart-help-tooltip b {
    color: #0f766e;
    font-weight: 900;
}

.chart-help-tooltip {
    text-align: center;
    width: auto;
    min-width: 220px;
    max-width: 280px;
}

.eims-notification-widget {
    position: fixed;
    top: 20px;
    right: 188px;
    z-index: 5000;
}

.eims-notification-button {
    width: 52px;
    height: 52px;
    border: 1px solid rgba(37,99,235,.18);
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 18px 45px rgba(15,23,42,.14);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.eims-notification-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg,#2563eb,#10b981);
    color: #fff;
}

.eims-notification-button i {
    font-size: 1.35rem;
}

.eims-notification-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 900;
    padding: 0 6px;
}

.eims-notification-panel {
    position: absolute;
    top: 62px;
    right: 0;
    z-index: 5050;
    width: min(390px, calc(100vw - 24px));
    max-height: min(560px, calc(100vh - 110px));
    overflow: hidden;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 85px rgba(15,23,42,.24);
}

.eims-notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.eims-notification-head strong,
.eims-notification-head small {
    display: block;
}

.eims-notification-head strong {
    color: #0f172a;
    font-size: 1.05rem;
}

/* Call overlay device selectors */
.inbox-call-device-row { padding: 10px 14px; border-top: 1px solid rgba(255,255,255,0.03); }
.inbox-device-select { background: rgba(15,23,42,0.12); color: #e6eef8; border: 1px solid rgba(255,255,255,0.06); padding: 6px 8px; border-radius: 8px; }
.inbox-device-select:disabled { opacity: .6; }
.inbox-call-controls { display:flex; gap:8px; align-items:center; padding:12px 14px; justify-content:flex-end; }
.inbox-call-videos video { border-radius:8px; background:#000; max-width:100%; }

.eims-notification-head small {
    color: #64748b;
}

.eims-notification-head button {
    border: 0;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 800;
    padding: 8px 12px;
}

.eims-notification-list {
    max-height: 470px;
    overflow-y: auto;
}

.eims-notification-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    padding: 14px 16px;
    color: #0f172a;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.eims-notification-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

.eims-notification-item.is-unread {
    background: #eef6ff;
}

.eims-notification-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg,#2563eb,#10b981);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eims-notification-copy strong,
.eims-notification-copy small,
.eims-notification-copy time {
    display: block;
}

.eims-notification-copy strong {
    font-size: .92rem;
    font-weight: 900;
    margin-bottom: 3px;
}

.eims-notification-copy small {
    color: #475569;
    line-height: 1.35;
}

.eims-notification-copy time {
    color: #94a3b8;
    font-size: .75rem;
    margin-top: 5px;
}

.eims-notification-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2563eb;
    align-self: center;
}

.eims-notification-empty {
    padding: 28px 18px;
    color: #64748b;
    text-align: center;
    font-weight: 700;
}

.teacher-hero-notifications,
.student-hero-notifications {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 75;
}

.teacher-hero-notifications .eims-notification-widget,
.student-hero-notifications .eims-notification-widget {
    position: relative;
    top: auto;
    right: auto;
}

.teacher-hero-notifications .eims-notification-button,
.student-hero-notifications .eims-notification-button {
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.teacher-hero-notifications .eims-notification-panel,
.student-hero-notifications .eims-notification-panel {
    top: 58px;
    right: 0;
}

.admin-topbar-notifications {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 5100;
}

.admin-topbar-notifications .eims-notification-widget {
    position: relative;
    top: auto;
    right: auto;
    z-index: 5100;
}

.admin-topbar-notifications .eims-notification-button {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.admin-topbar-notifications .eims-notification-button i {
    font-size: 1.05rem;
}

.admin-topbar-notifications .eims-notification-panel {
    top: 50px;
    right: 0;
    z-index: 5200;
}

/* Inline topbar bell — user frame headers & main dashboards */
.eims-topbar-notif{position:relative;display:inline-flex;align-items:center;}
.eims-topbar-notif .eims-notification-widget{position:relative !important;top:auto !important;right:auto !important;z-index:110;}
.eims-topbar-notif .eims-notification-button{width:38px !important;height:38px !important;min-width:38px !important;border-radius:10px !important;display:flex !important;align-items:center !important;justify-content:center !important;background:none !important;border:none !important;box-shadow:none !important;color:#475569 !important;font-size:1.22rem !important;cursor:pointer !important;padding:0 !important;position:relative !important;text-decoration:none !important;transform:none !important;transition:background .13s,color .13s !important;}
body.dark .eims-topbar-notif .eims-notification-button{color:#94a3b8 !important;}
.eims-topbar-notif .eims-notification-button:hover{background:#f1f5f9 !important;color:#0f172a !important;text-decoration:none !important;transform:none !important;}
body.dark .eims-topbar-notif .eims-notification-button:hover{background:#1f2937 !important;color:#f8fafc !important;}
.eims-topbar-notif .eims-notification-button i{font-size:1.22rem !important;color:inherit !important;}
.eims-topbar-notif .eims-notification-count{top:-5px !important;right:-5px !important;min-width:16px !important;height:16px !important;font-size:.58rem !important;padding:0 3px !important;}
.eims-topbar-notif .eims-notification-panel{top:46px;right:0;}
@media(max-width:991px){
  .eims-topbar-notif .eims-notification-panel{
    position:fixed;
    top:66px;
    left:8px;
    right:8px;
    width:auto;
    max-width:none;
    max-height:calc(100vh - 82px);
  }
}

.admin-stat-card {
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    min-height: 138px;
    position: relative;
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-stat-card:hover,
.admin-stat-card:focus-visible {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, .32);
    box-shadow: 0 18px 46px rgba(15, 23, 42, .12);
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.admin-stat-top,
.admin-chart-head,
.admin-mini-ledger {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.admin-stat-card small {
    color: #64748b;
    font-weight: 800;
    margin-top: 16px;
}

.admin-stat-card h3 {
    margin: 4px 0 0;
    font-weight: 900;
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    letter-spacing: 0;
}

.admin-stat-note {
    display: block;
    color: #64748b;
    font-size: .82rem;
    margin-top: 6px;
}

.admin-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    font-size: 1.35rem;
}

.admin-stat-action {
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.admin-stat-card.finance {
    border: 1px solid rgba(16, 185, 129, .32);
    background: #fff;
}

.admin-stat-card.finance.expense {
    border-color: rgba(239, 68, 68, .30);
    background: #fff;
}

.admin-stat-card.finance::after {
    content: none;
    position: absolute;
    right: -36px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .10);
}

.admin-stat-card.finance.expense::after {
    background: rgba(239, 68, 68, .10);
}

.admin-stat-card.finance h3 {
    font-size: clamp(1.65rem, 1.9vw, 2rem);
    line-height: 1.16;
    overflow-wrap: anywhere;
}

.admin-stat-card.finance.revenue h3 {
    color: #064e3b;
}

.admin-stat-card.finance.expense h3 {
    color: #7f1d1d;
}

.admin-stat-card.finance .admin-stat-icon {
    background: #f1f5f9;
}

.admin-chart-card {
    border: 1px solid rgba(226, 232, 240, .92);
}

.admin-chart-head {
    margin-bottom: 18px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f766e;
    background: #ccfbf1;
    border: 1px solid #99f6e4;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: .78rem;
    font-weight: 900;
}

.admin-chart-total {
    min-width: 170px;
    text-align: right;
}

.admin-chart-total span {
    display: block;
    color: #64748b;
    font-size: .8rem;
    font-weight: 800;
}

.admin-chart-total strong,
.admin-net-amount {
    display: block;
    font-size: 1.45rem;
    font-weight: 900;
}

.admin-chart-total a {
    color: #2563eb;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.admin-chart-total.positive strong,
.admin-net-amount.positive {
    color: #047857;
}

.admin-chart-total.negative strong,
.admin-net-amount.negative {
    color: #b91c1c;
}

.admin-chart-canvas {
    height: 250px;
}

.admin-chart-canvas canvas {
    width: 100% !important;
    height: 100% !important;
}

.admin-finance-summary {
    background: linear-gradient(135deg, #fff, #f8fafc);
}

.admin-net-amount {
    font-size: 2rem;
    margin-bottom: 16px;
}

.admin-mini-ledger {
    flex-direction: column;
    align-items: stretch;
}

.admin-mini-ledger span {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    color: #64748b;
    font-weight: 700;
}

.admin-mini-ledger b {
    color: #0f172a;
}

.admin-stat-grid.is-compact .admin-stat-card{
    min-height:112px;
    padding:14px!important;
}
.admin-stat-grid.is-compact .admin-stat-icon{
    width:38px;
    height:38px;
    border-radius:12px;
    font-size:1.1rem;
}
.admin-stat-grid.is-compact .admin-stat-card small{
    margin-top:10px;
}
.admin-stat-grid.is-compact .admin-stat-card h3{
    font-size:1.45rem;
}
.sidebar-submenu-heading{
    margin:12px 6px 6px;
    color:#93c5fd;
    font-size:.72rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.settings-switch-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.settings-switch-card{
    display:flex;
    align-items:flex-start;
    gap:12px;
    min-height:86px;
    padding:14px;
    border:1px solid #dbeafe;
    border-radius:14px;
    background:#f8fafc;
    cursor:pointer;
}
.settings-switch-card input{
    margin-top:4px;
    flex:0 0 auto;
}
.settings-switch-card strong,
.settings-switch-card small{
    display:block;
}
.settings-switch-card strong{
    color:#0f172a;
    font-weight:900;
}
.settings-switch-card small{
    color:#64748b;
    margin-top:3px;
    line-height:1.35;
}
.admin-settings-inline-toggle{
    color:#0f172a;
    background:#eef2ff;
    border:1px solid #c7d2fe;
}
.admin-settings-inline-toggle:hover{
    color:#0f172a;
    background:#e0e7ff;
}
.admin-settings-inline-toggle .dark-toggle-switch{
    background:#cbd5e1;
    border-color:#94a3b8;
}
.admin-settings-inline-toggle .dark-toggle-switch::after{
    background:#fff;
    box-shadow:0 1px 4px rgba(15,23,42,.25);
}
.admin-settings-inline-toggle.is-on .dark-toggle-switch{
    background:#22c55e;
    border-color:#86efac;
}
body.dark .admin-settings-inline-toggle .dark-toggle-switch{
    background:#334155;
    border-color:#475569;
}
body.dark .admin-settings-inline-toggle.is-on .dark-toggle-switch{
    background:#22c55e;
    border-color:#86efac;
}
.admin-settings-language .dashboard-language-switcher,
.admin-settings-language-switcher{
    position:static;
    width:100%;
    box-shadow:none;
}
.privacy-security-list{
    display:grid;
    gap:12px;
}
.privacy-security-list span,
.settings-shortcut-grid a{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:14px;
    border:1px solid #dbeafe;
    border-radius:14px;
    background:#f8fafc;
    text-decoration:none;
}
.privacy-security-list i,
.settings-shortcut-grid i{
    width:36px;
    height:36px;
    border-radius:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#e0f2fe;
    color:#0369a1;
    flex:0 0 auto;
}
.privacy-security-list strong,
.privacy-security-list small,
.settings-shortcut-grid strong,
.settings-shortcut-grid small{
    display:block;
}
.privacy-security-list strong,
.settings-shortcut-grid strong{
    color:#0f172a;
    font-weight:900;
}
.privacy-security-list small,
.settings-shortcut-grid small{
    color:#64748b;
    margin-top:3px;
}
.settings-shortcut-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
}
.admin-summary-card-settings{
    display:grid;
    gap:14px;
}
.summary-card-setting-row,
.summary-card-add-form{
    padding:16px;
    border:1px solid #dbeafe;
    border-radius:16px;
    background:#f8fafc;
}
.summary-card-setting-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
}
.summary-card-setting-row .form-control,
.summary-card-setting-row .form-select,
.summary-card-add-form .form-control,
.summary-card-add-form .form-select{
    min-height:44px;
}
.timetable-day-picker{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    padding:10px;
    border:1px solid #dbeafe;
    border-radius:12px;
    background:#f8fafc;
}
.timetable-day-picker .form-check{
    margin:0;
    padding:8px 10px 8px 34px;
    border:1px solid #e2e8f0;
    border-radius:10px;
    background:#fff;
}
.timetable-day-picker .form-check-label{
    color:#0f172a;
    font-weight:700;
}
body.dark .timetable-day-picker{
    border-color:#334155;
    background:#020617;
}
body.dark .timetable-day-picker .form-check{
    border-color:rgba(148,163,184,.28);
    background:rgba(15,23,42,.82);
}
body.dark .timetable-day-picker .form-check-label{
    color:#f8fafc;
}
body.dark .settings-switch-card,
body.dark .privacy-security-list span,
body.dark .settings-shortcut-grid a,
body.dark .summary-card-setting-row,
body.dark .summary-card-add-form{
    background:#0f172a;
    border-color:#334155;
}
body.dark .settings-switch-card strong,
body.dark .privacy-security-list strong,
body.dark .settings-shortcut-grid strong{
    color:#f8fafc;
}
body.dark .settings-switch-card small,
body.dark .privacy-security-list small,
body.dark .settings-shortcut-grid small{
    color:#cbd5e1;
}
body.dark .admin-settings-inline-toggle{
    color:#f8fafc;
    background:#111827;
    border-color:#334155;
}
body.dark .admin-settings-language .dashboard-language-switcher{
    background:#111827;
    border-color:#334155;
}
body.dark .sidebar-submenu-heading{
    color:#bfdbfe;
}
body.dark .sidebar-submenu-panel a,
body.dark .sidebar-submenu-panel .sidebar-tool-button{
    background:rgba(15,23,42,.78);
    border:1px solid rgba(148,163,184,.18);
    color:#dbeafe;
}
body.dark .sidebar-submenu-panel a:hover,
body.dark .sidebar-submenu-panel a.active,
body.dark .sidebar-submenu-panel .sidebar-tool-button:hover{
    background:linear-gradient(135deg,#2563eb,#10b981);
    color:#fff;
}
body.dark .settings-tabs,
body.dark .settings-tabs .nav{
    background:#0f172a;
    border-color:#334155;
}
body.dark .settings-tabs .nav-link{
    color:#bfdbfe;
}
body.dark .settings-tabs .nav-link.active,
body.dark .settings-tabs .nav-link:hover{
    color:#fff;
}

@media (max-width: 1199px) {
    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .topbar{
        align-items:flex-start;
        gap:14px;
        flex-direction:column;
    }
    .topbar > .d-flex{
        width:100%;
        min-width:0;
    }
    .topbar > .d-flex:last-child{
        align-items:stretch!important;
        flex-wrap:wrap;
    }
    .admin-live-search{
        order:3;
        width:100%;
        margin:8px 0 0!important;
    }
    .admin-live-search input{
        width:100%;
    }
    .admin-user-role-line{
        max-width:calc(100% - 58px);
        overflow-wrap:anywhere;
    }
    .admin-chart-card{
        padding:18px!important;
    }
    .settings-tabs .nav{
        flex-wrap:nowrap;
        overflow-x:auto;
        padding-bottom:4px;
    }
    .settings-tabs .nav-link{
        white-space:nowrap;
    }
    .summary-card-setting-head{
        align-items:flex-start;
        flex-direction:column;
    }
}

@media (max-width: 575px) {
    .admin-stat-grid {
        grid-template-columns: 1fr;
    }
    .admin-chart-head {
        flex-direction: column;
    }
    .admin-chart-total {
        min-width: 0;
        text-align: left;
    }
    .main{
        padding:12px;
    }
    .topbar{
        padding:12px;
        border-radius:14px;
    }
    .topbar h4{
        font-size:1rem;
    }
    .topbar small{
        font-size:.78rem;
    }
    .admin-stat-card{
        min-height:112px;
    }
    .admin-chart-canvas{
        height:210px;
    }
    .settings-switch-grid,
    .settings-shortcut-grid{
        grid-template-columns:1fr;
    }
    .permission-table{
        min-width:720px;
    }
}

.sidebar-tools {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.sidebar-submenu {
    margin: 4px 0;
}

.sidebar-submenu summary {
    list-style: none;
}

.sidebar-submenu summary::-webkit-details-marker {
    display: none;
}

.sidebar-submenu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 650;
    cursor: pointer;
    transition: .2s;
}

.sidebar-submenu-toggle:hover,
.sidebar-submenu-toggle.active,
.sidebar-submenu[open] .sidebar-submenu-toggle {
    background: linear-gradient(135deg, #2563eb, #10b981);
    color: #fff;
}

.sidebar-submenu-toggle i:first-child {
    font-size: 1.1rem;
    min-width: 22px;
}

.sidebar-submenu-toggle .bi-chevron-down {
    font-size: .82rem;
    transition: transform .2s ease;
}

.sidebar-submenu[open] .sidebar-submenu-toggle .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-submenu-panel {
    margin: 8px 0 10px 30px;
    padding: 6px 0 6px 10px;
    border-left: 1px solid rgba(148, 163, 184, .24);
    border-radius: 0;
    background: transparent;
}

.sidebar-submenu-panel a,
.sidebar-submenu-panel .sidebar-tool-button {
    margin: 3px 0;
    padding: 10px 11px;
    border-radius: 12px;
    font-size: .92rem;
    line-height: 1.18;
    min-height: 44px;
}

.sidebar-nav a span,
.sidebar-submenu-toggle span,
.sidebar-submenu-panel a span,
.sidebar-tool-button span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.22;
}

.sidebar-submenu-panel a,
.sidebar-submenu-panel .sidebar-tool-button {
    align-items: center;
}

.sidebar-submenu-panel .sidebar-language-switcher .dashboard-language-switcher {
    margin: 4px 0;
}

.sidebar-submenu-panel a:hover,
.sidebar-submenu-panel a.active,
.sidebar-submenu-panel .sidebar-tool-button:hover {
    transform: none;
}

.sidebar-logout-link {
    border: 1px solid rgba(248, 113, 113, .24);
    background: rgba(127, 29, 29, .18);
}

.sidebar-logout-link:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
}

.sidebar-tool-button {
    width: 100%;
    border: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
    padding: 12px 14px;
    margin: 4px 0;
    border-radius: 16px;
    font-weight: 650;
    transition: .2s;
}

.sidebar-tool-button:hover {
    background: linear-gradient(135deg, #2563eb, #10b981);
    color: #fff;
    transform: translateX(4px);
}

.sidebar-tool-button i {
    font-size: 1.1rem;
    min-width: 22px;
}

.sidebar-eims-points .eims-points-badge {
    width: 100%;
    justify-content: flex-start;
    margin-top: 8px;
    gap: 9px;
    min-height: 54px;
    padding: 7px 12px;
    background: linear-gradient(135deg, rgba(251, 191, 36, .18), rgba(255, 255, 255, .10));
    color: #f8fafc;
    border-color: rgba(251, 191, 36, .26);
}

.sidebar-eims-points .eims-points-badge > span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #f8fafc;
    font-size: .86rem;
}

.sidebar-eims-points .eims-points-badge b {
    color: #fff;
    font-size: 1rem;
    letter-spacing: .01em;
}

.sidebar-eims-points .eims-points-badge > span::after {
    content: none;
}

.sidebar-eims-points .eims-points-badge i {
    width: 34px;
    height: 34px;
    font-size: 1rem;
}

.sidebar-eims-points .eims-points-badge > span {
    font-weight: 900;
}

.sidebar-eims-points .eims-points-badge > span:not(:empty) {
    text-shadow: 0 1px 0 rgba(0,0,0,.18);
}

.sidebar-eims-points .eims-points-badge > span {
    overflow-wrap: normal;
}

.sidebar-eims-points .eims-points-badge > span b + * {
    color: #fde68a;
}

.sidebar-language-switcher .dashboard-language-switcher {
    width: 100%;
    margin-top: 8px;
    background: rgba(99,102,241,.09);
    border-color: rgba(99,102,241,.22);
    color: #334155;
    box-shadow: none;
}

.sidebar-language-switcher .dashboard-language-switcher i {
    color: #6366f1;
}

.sidebar-language-switcher .dashboard-language-switcher select {
    color: #334155;
}

.sidebar-language-switcher .dashboard-language-switcher option {
    color: #0f172a;
}

/* Dark mode sidebar — restore white palette */
body.dark .sidebar-language-switcher .dashboard-language-switcher {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.14);
    color: #cbd5e1;
}
body.dark .sidebar-language-switcher .dashboard-language-switcher i {
    color: #34d399;
}
body.dark .sidebar-language-switcher .dashboard-language-switcher select {
    color: #f8fafc;
}

.fee-receipt-print {
    background: #fff;
    color: #0f172a;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    padding: 26px;
}

.receipt-title-row,
.receipt-sign-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.receipt-title-row h2 {
    font-weight: 900;
    margin: 0 0 4px;
}

.receipt-title-row p {
    margin: 0;
    color: #64748b;
}

.receipt-paid-stamp {
    border: 2px solid #16a34a;
    color: #15803d;
    border-radius: 999px;
    padding: 8px 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.receipt-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.receipt-meta-grid div {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}

.receipt-meta-grid span {
    display: block;
    color: #64748b;
    font-size: .82rem;
    margin-bottom: 3px;
}

.receipt-table,
.receipt-table thead,
.receipt-table tbody,
.receipt-table tfoot,
.receipt-table tr,
.receipt-table th,
.receipt-table td {
    background-color: transparent !important;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: transparent;
    --bs-table-active-bg: transparent;
}
.receipt-table tfoot th {
    font-size: 1.02rem;
}

.receipt-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.receipt-sign-row {
    margin-top: 40px;
}

.receipt-sign-row div {
    min-width: 190px;
    text-align: center;
}

.receipt-sign-row span {
    display: block;
    border-top: 1px solid #334155;
    margin-bottom: 8px;
}

.receipt-sign-row p {
    margin: 0;
    color: #64748b;
}

#feeReceiptPrint,
.eims-rcpt-paper #feeReceiptPrint {
    background: #fff;
    color: #0f172a;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    max-width: 960px;
    margin: 0 auto;
    border: 1px solid #dbe3ee;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15,23,42,.12);
}

.eims-rcpt-hdr {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    background:
        linear-gradient(135deg, rgba(15,118,110,.96), rgba(37,99,235,.96)),
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.28), transparent 24%);
    color: #fff;
}

.eims-rcpt-hdr-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: rgba(255,255,255,.92);
    border-radius: 16px;
    padding: 8px;
}

.eims-rcpt-hdr-info {
    flex: 1;
    min-width: 0;
}

.eims-rcpt-hdr-name {
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.1;
}

.eims-rcpt-hdr-sub {
    margin-top: 3px;
    color: rgba(255,255,255,.82);
    font-size: .92rem;
}

.eims-rcpt-hdr-badge {
    border: 1px solid rgba(255,255,255,.56);
    border-radius: 999px;
    padding: 8px 18px;
    background: rgba(255,255,255,.16);
    font-weight: 900;
    letter-spacing: .12em;
}

.eims-rcpt-bdy {
    padding: 24px 26px 26px;
}

.eims-rcpt-invoice-title,
.eims-rcpt-invoice-company,
.eims-rcpt-invoice-rule,
.eims-rcpt-invoice-address,
.eims-rcpt-invoice-strip,
.eims-rcpt-invoice-items,
.eims-rcpt-invoice-totalbox {
    display: none;
}

.eims-rcpt-title-bar,
.eims-rcpt-hero,
.eims-rcpt-meta,
.eims-rcpt-two-col {
    display: grid;
    gap: 14px;
}

.eims-rcpt-title-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.eims-rcpt-tiny-label,
.eims-rcpt-cell-lbl,
.eims-rcpt-hero span {
    display: block;
    color: #64748b;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eims-rcpt-big-val {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
}

.eims-rcpt-print-ref {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 2px 0;
    color: #64748b;
    font-size: .8rem;
    font-weight: 700;
}

.eims-rcpt-hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
}

.eims-rcpt-hero > div {
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #eef6ff);
    padding: 14px 16px;
}

.eims-rcpt-hero strong {
    display: block;
    margin: 4px 0 2px;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 950;
}

.eims-rcpt-hero small {
    color: #64748b;
}

.eims-rcpt-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 20px;
}

.eims-rcpt-cell {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
}

.eims-rcpt-cell-val {
    margin-top: 4px;
    font-weight: 800;
    color: #172033;
    overflow-wrap: anywhere;
}

.eims-rcpt-sec-title {
    margin: 22px 0 10px;
    color: #0f172a;
    font-size: .88rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eims-rcpt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: .86rem;
}

.eims-rcpt-table th,
.eims-rcpt-table td {
    padding: 8px 11px;
    border-bottom: 1px solid #eef2f7;
}

.eims-rcpt-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.eims-rcpt-table tbody tr:last-child td,
.eims-rcpt-table tfoot tr:last-child td {
    border-bottom: 0;
}

.eims-rcpt-table tfoot td,
.eims-rcpt-ledger-table .is-strong td,
.eims-rcpt-ledger-table .is-net td,
.eims-rcpt-ledger-table .is-receipt-total td {
    font-weight: 900;
}

.eims-rcpt-ledger-table .is-discount td,
.eims-rcpt-ledger-table .is-current td,
.eims-rcpt-ledger-table .is-clear td {
    color: #15803d;
}

.eims-rcpt-ledger-table .is-due td,
.eims-rcpt-ledger-table .is-fine td {
    color: #b91c1c;
}

.eims-rcpt-ledger-table .is-net td,
.eims-rcpt-ledger-table .is-receipt-total td {
    background: #ecfdf5;
}

.eims-rcpt-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.eims-rcpt-legacy-summary {
    display: none;
}

.eims-rcpt-summary,
.eims-rcpt-pay-box,
.eims-rcpt-balance {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.eims-rcpt-srow,
.eims-rcpt-prow,
.eims-rcpt-brow {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 13px;
    border-bottom: 1px solid #eef2f7;
}

.eims-rcpt-srow:last-child,
.eims-rcpt-prow:last-child,
.eims-rcpt-brow:last-child {
    border-bottom: 0;
}

.eims-rcpt-srow-total,
.eims-rcpt-srow-net,
.eims-rcpt-prow-total,
.eims-rcpt-brow-paid {
    font-weight: 900;
}

.eims-rcpt-srow-net,
.eims-rcpt-prow-total,
.eims-rcpt-brow-clear {
    background: #ecfdf5;
    color: #166534;
    font-weight: 900;
}

.eims-rcpt-srow-discount {
    color: #15803d;
}

.eims-rcpt-brow-due {
    background: #fef2f2;
    color: #991b1b;
    font-weight: 900;
}

.eims-rcpt-note {
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff7ed;
    color: #7c2d12;
}

.eims-rcpt-sign-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin-top: 36px;
}

.eims-rcpt-sign-row span {
    display: block;
    border-top: 1px solid #334155;
}

.eims-rcpt-sig-line {
    height: 26px;
    border-bottom: 1px solid #334155;
    margin-bottom: 4px;
}

.eims-rcpt-sign-row p {
    margin: 8px 0 0;
    color: #64748b;
    text-align: center;
    font-size: .86rem;
}

.eims-rcpt-footer-txt {
    margin-top: 22px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    text-align: center;
    font-size: .82rem;
}

.eims-rcpt-modal-body {
    background: #eef2f7;
}

.eims-rcpt-preview-tools {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font-weight: 800;
}

.eims-rcpt-paper-wrap {
    max-width: 1020px;
    margin: 0 auto;
    padding: 8px;
}

.eims-rcpt-paper {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(15,23,42,.22);
}

/* ── Invoice receipt ────────────────────────────────────────────────────── */
.eims-inv-wrap {
    padding: 30px 36px 26px;
    font-size: .91rem;
    color: #334155;
    background: #fff;
}

.eims-inv-title {
    text-align: center;
    font-size: 2.9rem;
    font-weight: 300;
    letter-spacing: .22em;
    color: #4a5266;
    text-transform: uppercase;
    line-height: 1;
}

.eims-inv-sep {
    border: 0;
    height: 1px;
    background: #cbd5e1;
    margin: 18px 0 20px;
}

.eims-inv-addr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 18px;
    line-height: 1.55;
}

.eims-inv-addr p { margin: 0 0 10px; }

.eims-inv-field strong {
    display: block;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
}

.eims-inv-field span {
    display: block;
    font-size: .9rem;
    font-weight: 500;
    color: #0f172a;
}

.eims-inv-to-lbl {
    display: block;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
}

.eims-inv-to-name {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px !important;
}

.eims-inv-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.eims-inv-strip > div {
    padding: 10px 14px;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
}

.eims-inv-strip > div:last-child { border-right: 0; }

.eims-inv-strip strong {
    display: block;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: #94a3b8;
}

.eims-inv-strip span {
    display: block;
    font-size: .89rem;
    font-weight: 500;
    color: #0f172a;
    margin-top: 4px;
}

.eims-inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .89rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.eims-inv-table thead tr { background: #f1f5f9; }

.eims-inv-table thead th {
    padding: 10px 12px 9px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #64748b;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
}

.eims-inv-col-sno { width: 44px; }
.eims-inv-col-amt { width: 130px; }

.eims-inv-table tbody tr { border-bottom: 1px solid #f1f5f9; }
.eims-inv-table tbody tr:last-child { border-bottom: 0; }

.eims-inv-table tbody td {
    padding: 10px 12px;
    color: #334155;
    vertical-align: middle;
}

.eims-inv-empty-row td {
    height: 34px;
    border-bottom: 1px solid #f8fafc !important;
    color: transparent;
}

.eims-inv-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    border: 1px solid #e2e8f0;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.eims-inv-trow {
    display: grid;
    grid-template-columns: 150px 130px;
    border-top: 1px solid #f1f5f9;
    min-height: 38px;
    align-items: stretch;
}

.eims-inv-trow span {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 7px 12px;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

.eims-inv-trow strong {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 7px 12px;
    font-size: .9rem;
    font-weight: 600;
    color: #1e293b;
    background: #fff;
}

.eims-inv-trow-total {
    border-top: 1px solid #62608d !important;
}

.eims-inv-trow-total span {
    background: #f4f3ff;
    color: #4c47a0;
    font-size: .69rem;
}

.eims-inv-trow-total strong {
    background: #f4f3ff;
    color: #4c47a0;
    font-size: .96rem;
    font-weight: 700;
}

.eims-inv-trow-due strong    { color: #dc2626; }
.eims-inv-trow-clear strong  { color: #16a34a; }

.eims-inv-remarks {
    margin-bottom: 16px;
    padding: 9px 14px;
    background: #f8fafc;
    border-left: 3px solid #94a3b8;
    font-size: .86rem;
    color: #475569;
    border-radius: 0 5px 5px 0;
}

.eims-inv-note {
    text-align: center;
    padding: 14px 0 4px;
    border-top: 1px solid #e2e8f0;
}

.eims-inv-note strong {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #4a5266;
}

.eims-inv-note span {
    display: block;
    font-size: .82rem;
    color: #94a3b8;
    margin-top: 3px;
}

.eims-inv-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #94a3b8;
}


@media (max-width: 767px) {
    .eims-rcpt-hdr,
    .eims-rcpt-preview-tools {
        align-items: flex-start;
    }

    .eims-rcpt-sign-row {
        grid-template-columns: 1fr;
    }

    .eims-rcpt-hdr {
        flex-wrap: wrap;
    }

    .eims-inv-wrap { padding: 20px 16px 16px; }

    .eims-inv-title { font-size: 2rem; letter-spacing: .15em; }

    .eims-inv-addr {
        grid-template-columns: 1fr;
    }

    .eims-inv-addr .text-end { text-align: left !important; }

    .eims-inv-strip { grid-template-columns: 1fr 1fr; }

    .eims-inv-strip > div:nth-child(2),
    .eims-inv-strip > div:nth-child(4) { border-right: 0; }

    .eims-inv-strip > div:nth-child(3) { border-top: 1px solid #e2e8f0; }

    .eims-inv-trow { grid-template-columns: 110px 100px; }
}

@media print {
    @page {
        size: letter portrait;
        margin: 4mm;
    }

    /* ── Receipt isolation ───────────────────────────────────────────────────
       The JS clones #feeReceiptPrint into a new div#eims-receipt-print-root
       appended directly to <body>, then hides all other body children with
       display:none (collapses their height so only 1 page is generated).
       display:none cascades, but the clone is NOT inside the admin layout,
       so it is never a child of a hidden element.                           */
    html.eims-printing-receipt body > *:not(#eims-receipt-print-root) {
        display: none !important;
    }
    html.eims-printing-receipt #eims-receipt-print-root {
        display: block !important;
        width: 100% !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    /* ── General print-area isolation: popup blocked fallback ────────────── */
    html.eims-printing-area body * {
        visibility: hidden !important;
    }
    html.eims-printing-area .eims-print-target,
    html.eims-printing-area .eims-print-target * {
        visibility: visible !important;
    }
    html.eims-printing-area .eims-print-target {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: #fff !important;
    }

    html,
    body,
    body.eims-receipt-print-document {
        width: auto;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0 !important;
        background: #fff !important;
        overflow: visible !important;
    }

    #feeReceiptPrint {
        width: 100% !important;
        max-width: 190mm !important;
        margin: 0 auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        page-break-inside: auto;
        font-size: 10pt;
    }

    /* ── Receipt header ──────────────────────────────────────────────────── */
    .eims-rcpt-hdr {
        display: flex !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .eims-rcpt-hdr-logo  { width: 12mm; height: 12mm; border-radius: 2mm; }
    .eims-rcpt-hdr-name  { font-size: 13pt; }
    .eims-rcpt-hdr-sub   { font-size: 7.5pt; }
    .eims-rcpt-hdr-badge { padding: 3px 10px; font-size: 8pt; border-radius: 999px; }

    /* ── Invoice body ────────────────────────────────────────────────────── */
    .eims-inv-wrap {
        padding: 4mm 7mm 3mm;
        padding-bottom: 30mm !important;
        font-size: 9pt;
    }

    .eims-inv-title {
        font-size: 22pt;
        font-weight: 300;
        letter-spacing: .18em;
    }

    .eims-inv-sep { margin: 4mm 0 4mm; background: #94a3b8; }

    .eims-inv-addr {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12mm;
        font-size: 8.5pt;
        margin-bottom: 3mm;
        line-height: 1.4;
    }

    .eims-inv-addr p { margin: 0 0 4px; }

    .eims-inv-field strong,
    .eims-inv-to-lbl { font-size: 6.5pt; letter-spacing: .1em; color: #94a3b8; }

    .eims-inv-field span { font-size: 8.5pt; }
    .eims-inv-to-name    { font-size: 8.5pt; }

    .eims-inv-strip {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        margin-bottom: 3.5mm;
        border-radius: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .eims-inv-strip > div { padding: 1.5mm 2.5mm; }
    .eims-inv-strip strong { font-size: 6.2pt; letter-spacing: .1em; color: #94a3b8; }
    .eims-inv-strip span   { font-size: 7.8pt; margin-top: 1px; }

    .eims-inv-table {
        font-size: 8pt;
        border-radius: 0;
    }

    .eims-inv-table thead th { padding: 3.5px 6px; font-size: 6.5pt; }
    .eims-inv-table tbody td { padding: 4px 6px; }
    .eims-inv-empty-row td   { height: 14px; }
    .eims-inv-col-sno { width: 24px; }
    .eims-inv-col-amt { width: 80px; }

    .eims-inv-totals {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        border-radius: 0;
        margin-bottom: 3mm;
    }

    .eims-inv-trow {
        display: grid !important;
        grid-template-columns: 92px 80px;
        min-height: 0;
        border-top-color: #f1f5f9;
    }

    .eims-inv-trow span {
        font-size: 6.3pt;
        padding: 2.5px 6px;
        letter-spacing: .08em;
    }

    .eims-inv-trow strong {
        font-size: 7.8pt;
        padding: 2.5px 6px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .eims-inv-trow-total span,
    .eims-inv-trow-total strong {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .eims-inv-trow-total strong { font-size: 8.2pt; }

    .eims-inv-remarks { font-size: 7pt; padding: 3px 7px; margin-bottom: 2mm; }

    .eims-inv-note { padding: 3px 0; margin-top: 0; }
    .eims-inv-note strong { font-size: 6.8pt; letter-spacing: .08em; }
    .eims-inv-note span   { font-size: 7pt; }

    /* ── Signature ───────────────────────────────────────────────────────── */
    .eims-rcpt-sign-row {
        display: grid !important;
        position: fixed !important;
        bottom: 14mm;
        left: 7mm;
        right: 7mm;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 20px;
    }

    .eims-rcpt-sig-line { display: block !important; height: 8mm !important; border-bottom: 1px solid #334155 !important; margin-bottom: 3px; }
    .eims-rcpt-sign-row > div { display: block !important; text-align: center; }
    .eims-rcpt-sign-row p    { display: block !important; text-align: center; font-weight: 600; font-size: 8pt; margin: 3px 0 0; color: #475569; }

    .eims-inv-footer { display: block !important; position: fixed !important; bottom: 4mm; left: 7mm; right: 7mm; text-align: center; margin-top: 0; padding-top: 3px; font-size: 6.2pt; letter-spacing: .07em; border-top: 1px solid #e2e8f0; }

    .eims-print-header,
    .eims-print-footer,
    .eims-rcpt-preview-tools,
    .modal,
    .btn {
        display: none !important;
    }
}


.dashboard-topbar-title h4 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.dashboard-topbar-title p {
    margin: 0;
    color: #64748b;
}

@media (max-width: 767px) {
    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.login-card h1 {
    font-size: 36px;
    margin-bottom: 25px;
    color: #0f172a;
}

.login-card label {
    display: block;
    margin-top: 15px;
    margin-bottom: 7px;
    font-weight: 600;
}

.login-card input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 16px;
}

.login-card button {
    width: 100%;
    margin-top: 25px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    font-size: 17px;
    cursor: pointer;
}

.login-card button:hover {
    background: #1d4ed8;
}

.error-box {
    background: #fee2e2;
    color: #991b1b;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.login-card p {
    margin-top: 20px;
    color: #64748b;
    text-align: center;
}
/* Fixed login page */
.login-body{
    min-height:100vh;
    background:linear-gradient(135deg,#eaf2ff,#f7fff9);
    font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
.login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}
.login-card{
    width:100%;
    max-width:480px;
    background:rgba(255,255,255,.94);
    border:1px solid rgba(255,255,255,.65);
    border-radius:28px;
    box-shadow:0 24px 70px rgba(15,23,42,.14);
    padding:42px;
    backdrop-filter:blur(16px);
}
.login-card h1{
    font-weight:800;
    letter-spacing:-.04em;
    color:#0f172a;
}
.demo-login{
    font-size:.92rem;
    color:#64748b;
    text-align:center;
    line-height:1.7;
}
.parent-verify-card{max-width:560px}
.parent-verify-card .form-text{color:#64748b;font-size:.86rem}
@media(max-width:576px){.login-card{padding:28px;border-radius:20px}}


/* Premium admin sidebar upgrade */
.app-shell{display:flex;min-height:100vh;background:#eef3f8}.sidebar{width:285px;background:linear-gradient(180deg,#0f172a,#10253f);color:#fff;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;box-shadow:10px 0 35px rgba(15,23,42,.16);transition:transform .28s ease,width .28s ease;z-index:1040}.brand-row{display:flex;align-items:center;justify-content:space-between;padding:22px 18px;border-bottom:1px solid rgba(255,255,255,.1)}.brand{font-size:1.25rem;font-weight:900;letter-spacing:-.02em}.brand span{color:#34d399}.sidebar-close,.sidebar-toggle{border:0;border-radius:14px;background:rgba(255,255,255,.12);color:#fff;width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center}.sidebar-toggle{background:#fff;color:#0f172a;box-shadow:0 8px 24px rgba(15,23,42,.08)}.sidebar-nav{padding:14px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#38bdf8 rgba(255,255,255,.08);flex:1}.sidebar-nav::-webkit-scrollbar{width:8px}.sidebar-nav::-webkit-scrollbar-thumb{background:#38bdf8;border-radius:30px}.sidebar-nav a{display:flex;align-items:center;gap:12px;color:#cbd5e1;text-decoration:none;padding:12px 14px;margin:4px 0;border-radius:16px;font-weight:650;transition:.2s}.sidebar-nav a:hover,.sidebar-nav a.active{background:linear-gradient(135deg,#2563eb,#10b981);color:#fff;transform:translateX(4px)}.sidebar-nav i{font-size:1.1rem;min-width:22px}.main{flex:1;min-width:0;padding:24px;background:linear-gradient(180deg,#f8fafc 0%,#eef3f8 45%,#f8fafc 100%)}.topbar{position:relative;z-index:5000;display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,.92);backdrop-filter:blur(15px);border:1px solid rgba(226,232,240,.9);border-radius:22px;padding:16px 18px;margin-bottom:22px;box-shadow:0 12px 34px rgba(15,23,42,.07)}body.sidebar-collapsed .sidebar{transform:translateX(-100%)}body.sidebar-collapsed .main{margin-left:0}.mobile-backdrop{display:none}.filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.action-bar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.low-attendance{background:#fff1f2!important}.low-attendance td{color:#9f1239}.notice-img{width:70px;height:45px;object-fit:cover;border-radius:10px}.receipt-box{border:1px dashed #94a3b8;border-radius:16px;padding:18px;background:#fff}@media(max-width:991px){.sidebar{position:fixed;left:0;top:0;transform:translateX(-100%)}body.sidebar-open .sidebar{transform:translateX(0)}body.sidebar-open .mobile-backdrop{display:block;position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:1030}.main{padding:16px}.topbar{border-radius:16px}.sidebar-toggle{display:inline-flex}}@media(min-width:992px){body.sidebar-collapsed .sidebar{position:fixed}.sidebar-close{display:inline-flex}}


/* ===== Premium one-page public website ===== */
.public-one-page{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;background:#f8fbff;color:#0f172a;overflow-x:hidden}
.public-nav-glass{background:rgba(255,255,255,.82);backdrop-filter:blur(18px);border-bottom:1px solid rgba(226,232,240,.7);box-shadow:0 10px 30px rgba(15,23,42,.06)}
.public-nav-glass .navbar-brand{font-weight:900;color:#0f172a}.public-nav-glass .navbar-brand span{color:#10b981}.fw-black{font-weight:900}
.public-hero{min-height:100vh;display:flex;align-items:center;padding:120px 0 80px;position:relative;background:radial-gradient(circle at 15% 20%,rgba(37,99,235,.14),transparent 28%),radial-gradient(circle at 90% 10%,rgba(16,185,129,.16),transparent 30%),linear-gradient(135deg,#eef6ff,#f8fffb)}
.public-hero h1{font-size:clamp(2.8rem,6vw,5.6rem);line-height:.96;font-weight:900;letter-spacing:-.07em;margin:18px 0;color:#0f172a}.public-hero h2{font-size:clamp(1.2rem,2.5vw,2rem);font-weight:800;background:linear-gradient(135deg,#2563eb,#10b981);-webkit-background-clip:text;color:transparent}.public-hero p{font-size:1.15rem;color:#475569;max-width:720px}
.hero-badge{display:inline-flex;gap:8px;align-items:center;background:#fff;border:1px solid #dbeafe;border-radius:999px;padding:10px 16px;color:#2563eb;font-weight:800;box-shadow:0 10px 30px rgba(37,99,235,.1)}
.hero-orb{position:absolute;border-radius:999px;filter:blur(8px);opacity:.5}.orb-one{width:240px;height:240px;background:#60a5fa;right:8%;top:18%;animation:floaty 7s ease-in-out infinite}.orb-two{width:180px;height:180px;background:#34d399;left:8%;bottom:12%;animation:floaty 8s ease-in-out infinite reverse}
.hero-dashboard-card{background:rgba(255,255,255,.82);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.8);border-radius:32px;padding:28px;box-shadow:0 30px 80px rgba(15,23,42,.14)}
.live-dot{background:#dcfce7;color:#166534;border-radius:999px;padding:5px 12px;font-size:.8rem;font-weight:800}.mini-stat{background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:18px}.mini-stat b{font-size:1.7rem;display:block}.mini-stat span{color:#64748b}.finance-strip{display:grid;grid-template-columns:1fr 1fr;gap:12px}.finance-strip div{background:linear-gradient(135deg,#2563eb,#10b981);color:#fff;border-radius:20px;padding:15px}.finance-strip small{display:block;opacity:.85}.finance-strip b{font-size:1.2rem}
.public-section{padding:96px 0}.soft-bg{background:linear-gradient(135deg,#f8fbff,#eff6ff)}.section-kicker{text-transform:uppercase;letter-spacing:.14em;color:#2563eb;font-weight:900;font-size:.8rem}.public-section h2{font-size:clamp(2rem,4vw,3.4rem);font-weight:900;letter-spacing:-.05em;color:#0f172a}.public-section p{color:#475569}
.public-stat,.public-card,.team-card,.notice-card,.testimonial-card{background:#fff;border:1px solid #e2e8f0;border-radius:28px;padding:26px;box-shadow:0 18px 55px rgba(15,23,42,.08);transition:.25s}.public-stat:hover,.public-card:hover,.team-card:hover,.notice-card:hover,.testimonial-card:hover{transform:translateY(-6px);box-shadow:0 28px 70px rgba(15,23,42,.12)}
.public-stat{text-align:center}.public-stat b{font-size:2.4rem;color:#2563eb;display:block}.public-stat span{font-weight:800;color:#475569}.card-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(135deg,#dbeafe,#dcfce7);font-size:1.8rem;color:#2563eb;margin-bottom:16px}
.feature-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.feature-grid div{background:#fff;border:1px solid #e2e8f0;border-radius:24px;padding:22px;display:flex;flex-direction:column;gap:6px;box-shadow:0 18px 55px rgba(15,23,42,.08)}.feature-grid i{font-size:1.8rem;color:#10b981}.feature-grid b{font-size:1.1rem}.feature-grid span{color:#64748b}
.team-card{text-align:center}.avatar-circle{width:82px;height:82px;border-radius:50%;display:grid;place-items:center;margin:0 auto 16px;background:linear-gradient(135deg,#2563eb,#10b981);color:#fff;font-size:2rem;font-weight:900}.team-card.staff .avatar-circle{background:linear-gradient(135deg,#0f172a,#64748b)}.subject-cloud{display:flex;flex-wrap:wrap;gap:14px;justify-content:center}.subject-cloud span{background:#fff;border:1px solid #dbeafe;border-radius:999px;padding:12px 18px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.notice-card small{color:#2563eb;font-weight:800}.stars{color:#f59e0b;font-size:1.2rem}.testimonial-card small{display:block;color:#64748b;margin-top:6px}
.contact-cta{background:linear-gradient(135deg,#2563eb,#10b981);color:#fff}.contact-cta h2,.contact-cta p,.contact-cta .section-kicker{color:#fff}.public-footer{background:#0f172a;color:#cbd5e1;padding:28px 0}
.reveal-up{opacity:0;transform:translateY(28px);transition:opacity .75s ease,transform .75s ease}.reveal-up.visible{opacity:1;transform:none}.delay-1{transition-delay:.15s}@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-18px)}}
.permission-table-wrap{max-height:620px;overflow:auto}.permission-table th,.permission-table td{white-space:nowrap}.website-section-list{max-height:720px;overflow:auto;padding-right:6px}.website-section-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:20px;padding:18px;margin-bottom:16px}
body.dark #website-control .card,
body.dark #website-control .card-premium{
    background:#111827!important;
    border-color:#334155!important;
    color:#e5e7eb!important;
}
body.dark #website-control .website-section-card{
    background:#0f172a!important;
    border-color:#334155!important;
    color:#e5e7eb!important;
}
body.dark #website-control h4,
body.dark #website-control h5,
body.dark #website-control label,
body.dark #website-control strong{
    color:#f8fafc!important;
}
body.dark #website-control .text-muted,
body.dark #website-control small,
body.dark #website-control .small{
    color:#cbd5e1!important;
}
body.dark #website-control .form-control,
body.dark #website-control .form-select,
body.dark #website-control textarea{
    background:#020617!important;
    border-color:#475569!important;
    color:#f8fafc!important;
}
body.dark #website-control .form-control::placeholder,
body.dark #website-control textarea::placeholder{
    color:#94a3b8!important;
}
body.dark #website-control .form-check-label,
body.dark #website-control .form-switch label{
    color:#e5e7eb!important;
}
body.dark #website-control input[type="file"]::file-selector-button{
    background:#1f2937;
    border:0;
    color:#f8fafc;
}
body.dark #website-control .theme-chip{
    color:#e5e7eb;
}
body.dark #website-control .settings-map-preview{
    background:#020617;
    border-color:#334155;
}
.theme-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.theme-chip{
    position:relative;
    display:grid;
    grid-template-columns:46px minmax(0,1fr);
    gap:10px;
    align-items:center;
    min-height:68px;
    padding:10px;
    border:1px solid #dbeafe;
    border-radius:16px;
    background:#fff;
    color:#0f172a;
    cursor:pointer;
    transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.theme-chip:hover,
.theme-chip:has(input:focus-visible){
    border-color:#2563eb;
    box-shadow:0 12px 28px rgba(37,99,235,.12);
    transform:translateY(-1px);
}
.theme-chip.is-active,
.theme-chip:has(input:checked){
    border-color:#10b981;
    box-shadow:0 0 0 3px rgba(16,185,129,.14),0 16px 32px rgba(15,23,42,.1);
}
.theme-chip-swatch{
    grid-row:1 / span 2;
    width:46px;
    height:46px;
    border-radius:14px;
    background:linear-gradient(135deg,var(--theme-primary),var(--theme-secondary));
    border:1px solid rgba(15,23,42,.08);
    box-shadow:inset -12px -12px 0 var(--theme-accent);
}
.theme-chip b,
.theme-chip small{
    min-width:0;
    display:block;
}
.theme-chip b{
    align-self:end;
    font-size:.94rem;
    line-height:1.15;
    white-space:normal;
}
.theme-chip small{
    align-self:start;
    color:#64748b;
    font-size:.75rem;
    font-weight:800;
}
body.dark #website-control .theme-chip{
    background:#020617;
    border-color:#334155;
    color:#e5e7eb;
}
body.dark #website-control .theme-chip:hover,
body.dark #website-control .theme-chip:has(input:focus-visible){
    border-color:#60a5fa;
    box-shadow:0 12px 28px rgba(37,99,235,.18);
}
body.dark #website-control .theme-chip.is-active,
body.dark #website-control .theme-chip:has(input:checked){
    border-color:#34d399;
    box-shadow:0 0 0 3px rgba(52,211,153,.16),0 16px 32px rgba(0,0,0,.25);
}
body.dark #website-control .theme-chip small{
    color:#cbd5e1;
}
.settings-tabs .nav-link{border-radius:999px;font-weight:800}
@media(max-width:768px){.feature-grid{grid-template-columns:1fr}.finance-strip{grid-template-columns:1fr}.public-section{padding:70px 0}.public-hero{padding-top:100px}}

/* ===== Phase 3 Main Website Upgrade ===== */
.public-one-page{background:var(--public-gradient,linear-gradient(135deg,#eff6ff,#ecfdf5));color:var(--public-text,#0f172a);font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;overflow-x:hidden}
.public-nav-glass{background:rgba(255,255,255,.82);backdrop-filter:blur(16px);border-bottom:1px solid rgba(15,23,42,.08);box-shadow:0 10px 30px rgba(15,23,42,.06)}
.public-logo{display:flex;align-items:center;gap:10px;font-weight:900;color:var(--public-primary)!important}
.public-logo img{height:48px;width:auto;object-fit:contain}
.public-logo b{color:var(--public-secondary)}
.public-nav-glass .nav-link{font-weight:650;color:#334155}
.public-nav-glass .nav-link:hover{color:var(--public-primary)}
.public-hero{position:relative;min-height:100vh;display:flex;align-items:center;padding:140px 0 90px;overflow:hidden}
.hero-orb{position:absolute;border-radius:999px;filter:blur(8px);opacity:.34;animation:floaty 7s ease-in-out infinite}
.orb-one{width:360px;height:360px;background:var(--public-primary);top:10%;right:-80px}
.orb-two{width:280px;height:280px;background:var(--public-secondary);bottom:5%;left:-60px;animation-delay:1.2s}
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-24px)}}
.hero-badge,.section-kicker{display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(37,99,235,.18);background:rgba(255,255,255,.78);color:var(--public-primary);border-radius:999px;padding:8px 14px;font-weight:800;font-size:.9rem;margin-bottom:14px}
.public-hero h1{font-size:clamp(2.7rem,6vw,5.7rem);font-weight:950;letter-spacing:-.06em;line-height:.95;margin-bottom:18px}
.public-hero h2{font-size:clamp(1.25rem,2vw,2rem);color:var(--public-secondary);font-weight:800}
.public-hero p{font-size:1.12rem;color:#475569;max-width:680px}
.hero-dashboard-card,.public-card,.team-card,.notice-card,.testimonial-card,.contact-form-card,.review-box{background:rgba(255,255,255,.88);border:1px solid rgba(255,255,255,.72);box-shadow:0 24px 70px rgba(15,23,42,.10);border-radius:28px;padding:28px;backdrop-filter:blur(14px)}
.public-section{padding:90px 0}
.soft-bg{background:rgba(255,255,255,.48)}
.section-head{text-align:center;max-width:760px;margin:0 auto 36px}
.section-head h2,.public-section h2{font-size:clamp(2rem,4vw,3.4rem);font-weight:900;letter-spacing:-.045em}
.public-card{transition:.25s ease;height:100%}
.public-card:hover,.team-card:hover,.testimonial-card:hover{transform:translateY(-8px);box-shadow:0 34px 90px rgba(15,23,42,.15)}
.landscape-img{width:100%;height:210px;object-fit:cover;border-radius:20px;margin-bottom:18px;background:#e2e8f0}
.teacher-avatar{width:96px;height:96px;border-radius:50%;object-fit:cover;border:5px solid rgba(37,99,235,.12)}
.team-card{text-align:center;height:100%}
.subject-cloud{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.subject-cloud span{padding:12px 16px;background:#fff;border:1px solid #e2e8f0;border-radius:999px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.notice-public-img{width:100%;height:220px;object-fit:cover;border-radius:18px;margin-bottom:14px}
.stars{color:#f59e0b;letter-spacing:2px}
.contact-cta{background:linear-gradient(135deg,var(--public-primary),var(--public-secondary));color:#fff}
.contact-cta p{color:rgba(255,255,255,.86)}
.contact-form-card{color:#0f172a}
.contact-panel h2,
.contact-panel p,
.contact-panel .section-kicker{
    color:#0f172a;
}
.contact-panel .section-kicker{
    background:#fff;
    border-color:#dbeafe;
    color:var(--public-primary);
}
.contact-map-card{
    overflow:hidden;
    border:1px solid rgba(255,255,255,.72);
    border-radius:28px;
    background:rgba(255,255,255,.9);
    box-shadow:0 24px 70px rgba(15,23,42,.16);
    backdrop-filter:blur(14px);
}
@media(min-width:992px){
    .contact-map-col{
        flex:0 0 60%;
        max-width:60%;
    }
    .contact-form-col{
        flex:0 0 40%;
        max-width:40%;
    }
}
.contact-map-card iframe{
    display:block;
    width:100%;
    min-height:380px;
    height:100%;
    border:0;
}
.contact-map-details{
    padding:22px;
    color:#0f172a;
}
.contact-map-details .section-kicker{
    margin-bottom:10px;
    color:var(--public-primary);
    background:#fff;
}
.contact-map-details h3{
    margin:0 0 14px;
    font-size:1.2rem;
    font-weight:900;
}
.contact-map-links{
    display:grid;
    gap:9px;
}
.contact-map-links a{
    display:flex;
    align-items:center;
    gap:9px;
    color:#334155;
    font-weight:800;
    text-decoration:none;
}
.contact-map-links a:hover{
    color:var(--public-primary);
}
.settings-map-preview{
    overflow:hidden;
    border:1px solid #dbeafe;
    border-radius:16px;
    background:#f8fafc;
}
.settings-map-preview iframe{
    display:block;
    width:100%;
    height:220px;
    border:0;
}
@media(max-width:991px){
    .contact-map-card iframe{
        min-height:320px;
        height:320px;
    }
}
.public-footer{padding:28px 0;background:#0f172a;color:#e5e7eb}
.public-footer a{color:#93c5fd;text-decoration:none}
.public-toast{position:fixed;right:20px;top:92px;z-index:9999;background:#052e16;color:#dcfce7;padding:14px 18px;border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.18)}
.reveal-up{opacity:0;transform:translateY(26px);transition:.7s ease}.reveal-up.visible{opacity:1;transform:none}.delay-1{transition-delay:.15s}
@media(max-width:991px){.public-hero{padding-top:120px}.public-logo span{font-size:1rem}}

/* Filter/sort dropdown upgrade */
.filter-grid{display:none;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;background:#f8fafc;border:1px solid #e2e8f0;padding:16px;border-radius:18px}
.filter-grid.open{display:grid}
.filter-toolbar,.action-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.export-import-group{margin-left:auto;display:flex;gap:8px}
.btn-filter{border-radius:999px;background:linear-gradient(135deg,#2563eb,#14b8a6);color:#fff;border:none;padding:10px 18px}
.sort-select{border-radius:999px;border:1px solid #dbe3ef;padding:10px 14px;background:#fff}
.sidebar-nav{scrollbar-width:thin;scrollbar-color:#38bdf8 rgba(255,255,255,.08)}
.sidebar-nav::-webkit-scrollbar{width:8px}.sidebar-nav::-webkit-scrollbar-thumb{background:#38bdf8;border-radius:99px}
.profile-photo{width:120px;height:120px;border-radius:50%;object-fit:cover;border:6px solid #e0f2fe}
.role-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    width:36px;
    height:36px;
    border-radius:12px;
    padding:0;
    font-size:.78rem;
    font-weight:900;
    line-height:1;
    letter-spacing:.01em;
    border:1px solid transparent;
    box-shadow:0 10px 24px rgba(15,23,42,.08);
    vertical-align:middle;
    white-space:nowrap;
    flex:0 0 auto;
}
.role-badge i{
    font-size:1rem;
    line-height:1;
}
.role-badge-super-admin{background:linear-gradient(135deg,#dc2626,#991b1b);border-color:#fca5a5;color:#fff}
.role-badge-admin{background:linear-gradient(135deg,#e0f2fe,#ecfdf5);border-color:#7dd3fc;color:#075985}
.role-badge-teacher{background:linear-gradient(135deg,#ecfeff,#f0fdfa);border-color:#67e8f9;color:#0f766e}
.role-badge-student{background:linear-gradient(135deg,#eff6ff,#f8fafc);border-color:#93c5fd;color:#1d4ed8}

/* Student dashboard */
.student-dashboard-header{
    overflow:visible;
    min-height:250px;
    border:1px solid rgba(37,99,235,.14);
    background:
        radial-gradient(circle at 16% 28%,rgba(37,99,235,.08),transparent 28%),
        radial-gradient(circle at 84% 18%,rgba(16,185,129,.08),transparent 30%),
        linear-gradient(135deg,#fff,#fbfdff);
    box-shadow:0 22px 56px rgba(15,23,42,.08);
}
.student-dashboard-header .row{
    min-height:210px;
    align-items:center!important;
}
.student-dashboard-header .profile-photo{
    width:148px;
    height:148px;
    border:8px solid #e0f2fe;
    border-radius:50%;
    object-fit:cover;
    box-shadow:0 18px 42px rgba(37,99,235,.16);
}
.student-dashboard-header h2{
    margin:0 0 16px;
    color:#0f172a;
    font-size:clamp(2rem,3vw,3.35rem);
    font-weight:900;
    letter-spacing:0;
}
.student-dashboard-header .dashboard-name-line{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    margin:0;
    color:#334155;
    font-size:1.05rem;
}
.student-dashboard-header .dashboard-name-line strong{
    color:#0f172a;
    font-size:1.1rem;
}
.student-dashboard-header .eims-points-badge{
    margin-top:0;
}
.student-hero-action-row{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.student-dashboard-header .text-md-end{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    flex-wrap:wrap;
}
.student-dashboard-header .text-md-end .btn{
    min-height:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    padding:10px 16px;
    font-weight:800;
}
.student-info-card,
.student-fee-card,
#results,
#attendance,
#notices{
    border:1px solid rgba(15,23,42,.1);
    box-shadow:0 16px 42px rgba(15,23,42,.06);
}
.student-info-card h4,
.student-fee-card h4,
#results h4,
#attendance h4,
#notices h4{
    margin-bottom:18px;
    color:#0f172a;
    font-weight:900;
}
.student-info-card p,
.student-fee-card p{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin:0;
    padding:12px 0;
    border-bottom:1px solid #e2e8f0;
    color:#334155;
}
.student-info-card p:last-of-type,
.student-fee-card p:last-of-type{
    border-bottom:0;
}
.student-info-card p b,
.student-fee-card p b{
    color:#0f172a;
    flex:0 0 auto;
}
.student-fee-card .border,
#results .border,
#notices .border{
    border-color:#dbeafe!important;
    background:#f8fbff;
}
.parent-child-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.parent-child-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:14px 16px;
    background:linear-gradient(135deg,#fff,#f8fbff);
}
.parent-child-card strong{
    display:block;
    color:#0f172a;
    font-size:1.05rem;
}
.parent-child-card span{
    color:#64748b;
    font-weight:600;
}
.role-badge-accountant{background:linear-gradient(135deg,#f0fdf4,#ffffff);border-color:#86efac;color:#166534}
.role-badge-staff{background:linear-gradient(135deg,#f5f3ff,#ffffff);border-color:#c4b5fd;color:#5b21b6}
.role-badge-parent{background:linear-gradient(135deg,#fff7ed,#ffffff);border-color:#fdba74;color:#9a3412}
.role-badge-user{background:linear-gradient(135deg,#f8fafc,#ffffff);border-color:#cbd5e1;color:#334155}
.dashboard-name-line{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}
.dashboard-name-line .role-badge{
    width:46px;
    height:46px;
    border-radius:15px;
    transform:translateY(2px);
}
.dashboard-name-line .role-badge i{
    font-size:1.18rem;
}
.admin-user-role-line{
    display:inline-flex;
    align-items:center;
    gap:9px;
    color:#0f172a;
    font-weight:800;
}
.admin-user-role-line strong{
    display:inline-flex;
    align-items:center;
    min-height:36px;
    border-radius:12px;
    padding:0 13px;
    background:linear-gradient(135deg,#dc2626,#991b1b);
    border:1px solid #fca5a5;
    color:#fff;
    box-shadow:0 10px 24px rgba(220,38,38,.18);
    line-height:1;
}
.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    min-height:24px;
    border-radius:999px;
    padding:.35rem .62rem;
    font-weight:800;
    letter-spacing:0;
    line-height:1;
    vertical-align:middle;
}
.eims-points-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:44px;
    border:1px solid #e6d8ae;
    border-radius:999px;
    padding:8px 16px 8px 10px;
    color:#26324a;
    background:linear-gradient(180deg,#ffffff,#fffaf0);
    box-shadow:0 12px 28px rgba(148, 107, 10, .10);
    font-weight:850;
    line-height:1;
    white-space:nowrap;
    flex:0 0 auto;
}
.eims-points-badge i{
    width:34px;
    height:34px;
    display:inline-grid;
    place-items:center;
    border-radius:50%;
    color:#fff;
    background:linear-gradient(135deg,#f59e0b,#d97706);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 8px 18px rgba(217,119,6,.22);
    font-size:1.05rem;
    flex:0 0 auto;
}
.eims-points-badge b{
    color:#0f172a;
    letter-spacing:.02em;
    margin-right:2px;
}
.eims-points-badge > span{
    display:inline-flex;
    align-items:center;
    gap:4px;
    color:#334155;
}
.eims-points-badge{
    position:relative;
}
.eims-rank-hover{
    position:absolute;
    left:50%;
    bottom:calc(100% + 10px);
    transform:translateX(-50%) translateY(4px);
    z-index:40;
    background:#0f172a;
    color:#fff;
    border-radius:10px;
    padding:7px 10px;
    font-size:.74rem;
    font-weight:850;
    line-height:1;
    opacity:0;
    pointer-events:none;
    box-shadow:0 16px 38px rgba(15,23,42,.22);
    transition:opacity .16s ease, transform .16s ease;
    white-space:nowrap;
}
.eims-points-badge:hover .eims-rank-hover,
.eims-points-badge:focus-within .eims-rank-hover{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}
.eims-points-wallet{
    display:flex;
    align-items:center;
    gap:16px;
    border-radius:18px;
    padding:20px;
    color:#3b2f05;
    background:linear-gradient(135deg,#fff7cc,#ffd65a);
    border:1px solid #e0c15a;
}

.eims-rank-card .table{
    margin-bottom:0;
}
.institute-rank-history-card{
    scroll-margin-top:120px;
}
.institute-rank-score-pill{
    min-width:190px;
    border:1px solid rgba(22,163,74,.24);
    border-radius:8px;
    padding:12px 16px;
    text-align:right;
    background:linear-gradient(135deg,#ecfdf5,#f8fafc);
}
.institute-rank-score-pill span,
.institute-rank-score-pill small,
.rank-factor-box span{
    display:block;
    color:#64748b;
    font-size:.78rem;
    font-weight:800;
}
.institute-rank-score-pill strong{
    display:block;
    color:#065f46;
    font-size:1.8rem;
    font-weight:950;
    line-height:1;
}
.rank-factor-box{
    border:1px solid rgba(15,23,42,.1);
    border-radius:8px;
    padding:12px 14px;
    background:#fff;
}
.rank-factor-box strong{
    display:block;
    margin-top:4px;
    color:#0f172a;
    font-size:1.2rem;
    font-weight:950;
}
/* Settings card — Edit/Save pattern (all cards) */
.eims-ec-view-row{display:block;}
.eims-ec-view-row.d-flex-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
/* Email settings card — Edit/Save/Cancel states */
.eims-saved-badge{background:#dcfce7;color:#166534;border:1px solid #bbf7d0;font-size:.72rem;padding:.28em .65em;border-radius:999px;font-weight:600;}
body.dark .eims-saved-badge{background:#14532d;color:#86efac;border-color:#166534;}
.eims-ec-edit-row{display:none;}
.eims-ec-card input[disabled]:not([type=checkbox]):not([type=radio]),.eims-ec-card select[disabled],.eims-ec-card textarea[disabled]{background:#f8fafc!important;color:#64748b!important;cursor:default;opacity:1;}
.eims-ec-card input[type=checkbox][disabled],.eims-ec-card input[type=radio][disabled]{cursor:default;opacity:.65;}
.eims-ec-card input[type=checkbox][disabled]:checked,.eims-ec-card input[type=radio][disabled]:checked{background-color:#0d6efd!important;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e")!important;}
body.dark .eims-ec-card input[disabled]:not([type=checkbox]):not([type=radio]),body.dark .eims-ec-card select[disabled],body.dark .eims-ec-card textarea[disabled]{background:#1e293b!important;color:#94a3b8!important;}
.career-decision-saved{
    min-width:220px;
    display:grid;
    gap:7px;
    justify-items:start;
}
.career-decision-saved strong{
    color:#0f172a;
    font-size:.95rem;
}
.career-decision-saved small{
    color:#64748b;
    line-height:1.35;
}
.id-card-page{
    min-height:100vh;
    padding:48px 18px;
    background:radial-gradient(circle at 20% 10%,rgba(20,184,166,.16),transparent 28%),linear-gradient(135deg,#eef6ff,#f8fffb);
}
.id-card-shell{
    width:min(980px,100%);
    margin:0 auto;
}
.id-card-toolbar{
    display:flex;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:18px;
}
.virtual-id-card{
    position:relative;
    overflow:hidden;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    width:54mm;
    height:86mm;
    margin:0 auto;
    border-radius:5mm;
    background:linear-gradient(145deg,#ffffff 0%,#f8fbff 58%,#ecfeff 100%);
    border:1px solid rgba(14,165,233,.2);
    box-shadow:0 28px 90px rgba(15,23,42,.18);
    padding:3.4mm;
    color:#0f172a;
}
.id-card-ribbon{position:absolute;inset:0 0 auto 0;width:auto;height:2mm;background:linear-gradient(90deg,#2563eb,#14b8a6,#f59e0b)}
.virtual-id-card::after{content:"";position:absolute;width:34mm;height:34mm;right:-14mm;top:-13mm;border-radius:50%;background:rgba(20,184,166,.12)}
.id-card-head,.id-brand,.id-card-body,.id-card-foot{display:flex;align-items:center;gap:1.5mm;position:relative;z-index:1}
.id-card-head{align-items:flex-start;justify-content:flex-start;margin-bottom:1.4mm}
.virtual-id-card .role-badge{position:absolute;top:0;right:0;width:7.2mm;height:7.2mm;border-radius:2mm;box-shadow:none}
.virtual-id-card .role-badge i{font-size:7.4pt}
.id-brand{min-width:0;width:100%;padding-right:8.7mm}
.id-brand img{width:7.4mm;height:7.4mm;object-fit:contain;border-radius:2.1mm;background:#fff;border:1px solid #e2e8f0;padding:.6mm;flex:0 0 7.4mm}
.id-brand strong,.id-brand span{display:block}
.id-brand strong{font-size:4.55pt;font-weight:950;line-height:1.08;max-width:none;white-space:normal;overflow:visible;text-overflow:clip}
.id-brand span{color:#64748b;font-weight:800;font-size:3.9pt;line-height:1.05}
.id-card-body{flex-direction:column;align-items:center;text-align:center;margin-bottom:1.4mm}
.id-photo-frame{width:17mm;height:17mm;flex:0 0 17mm;border-radius:4.6mm;padding:.7mm;background:linear-gradient(135deg,#2563eb,#14b8a6);box-shadow:0 7px 15px rgba(37,99,235,.16)}
.id-photo-frame img{width:100%;height:100%;object-fit:cover;border-radius:4mm;border:.75mm solid #fff}
.id-main-copy{min-width:0;width:100%}
.id-role{display:inline-flex;border-radius:999px;background:#e0f2fe;color:#075985;border:1px solid #bae6fd;padding:.55mm 1.5mm;font-size:4.2pt;font-weight:950;text-transform:uppercase}
.id-main-copy h1{margin:.85mm 0 .45mm;font-size:10pt;font-weight:950;line-height:1;letter-spacing:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.id-main-copy p{color:#475569;font-size:4.7pt;margin:0 0 1mm;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.id-code{display:inline-flex;align-items:center;max-width:100%;min-height:5.2mm;border-radius:1.6mm;background:#0f172a;color:#fff;padding:0 1.9mm;font-weight:950;letter-spacing:.02em;font-size:5.6pt;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.id-detail-grid{position:relative;z-index:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8mm;margin-bottom:1mm}
.id-detail-grid div{min-width:0;border-radius:1.8mm;background:rgba(255,255,255,.78);border:1px solid #e2e8f0;padding:.65mm .8mm}
.id-detail-grid span,.id-detail-grid strong{display:block}
.id-detail-grid span{color:#64748b;font-size:3.5pt;font-weight:900;text-transform:uppercase;line-height:1}
.id-detail-grid strong{color:#0f172a;font-size:4.25pt;margin-top:.35mm;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.id-card-foot{justify-content:space-between;border-top:1px dashed #cbd5e1;padding-top:.8mm;margin-top:auto}
.id-signature{transform:translateY(1.35mm)}
.id-signature span{display:block;width:15mm;border-top:1px solid #0f172a;margin-bottom:.12mm}
.id-signature strong{display:block;font-size:3.7pt;line-height:1;color:#475569}
.id-qr{width:10.5mm;height:10.5mm;border-radius:1.5mm;background:#fff;border:1px solid #cbd5e1;display:grid;place-items:center;color:#0f172a;padding:.45mm;overflow:hidden}
.id-qr img{display:block;width:9.4mm;height:9.4mm;object-fit:contain}
#eims-qr-canvas{display:block;width:9.4mm;height:9.4mm}
#eims-qr-canvas img,#eims-qr-canvas canvas{display:block!important;width:9.4mm!important;height:9.4mm!important}
.id-qr small{display:none}
@media(max-width:640px){.id-card-page{overflow-x:auto}.virtual-id-card{padding:3.4mm}}
@media print{
    body{background:#fff!important}
    .id-card-toolbar,.footer,.dashboard-language-floating,.eims-notification-widget{display:none!important}
    .id-card-page{padding:0;background:#fff}
    .virtual-id-card{box-shadow:none;margin:0 auto}
}
.institute-contact-strip{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.institute-contact-strip span{
    display:inline-flex;
    align-items:center;
    gap:7px;
    border-radius:999px;
    background:rgba(255,255,255,.74);
    border:1px solid rgba(226,232,240,.86);
    padding:8px 12px;
    color:#475569;
    font-weight:800;
    font-size:.86rem;
}

/* Distinct public website theme layouts, beyond color swaps */
.public-theme-purple_glass .public-hero{background:linear-gradient(135deg,rgba(124,58,237,.16),rgba(6,182,212,.12)),var(--public-gradient);text-align:center}
.public-theme-purple_glass .public-hero .row{justify-content:center}.public-theme-purple_glass .public-hero p{margin-left:auto;margin-right:auto}.public-theme-purple_glass .hero-dashboard-card{border-radius:44px;background:rgba(255,255,255,.58)}
.public-theme-modern_dark{background:#020617;color:#e5e7eb}.public-theme-modern_dark .public-nav-glass,.public-theme-modern_dark .hero-dashboard-card,.public-theme-modern_dark .public-card,.public-theme-modern_dark .team-card,.public-theme-modern_dark .notice-card,.public-theme-modern_dark .testimonial-card,.public-theme-modern_dark .review-box,.public-theme-modern_dark .contact-form-card,.public-theme-modern_dark .contact-map-card{background:#0f172a;border-color:#334155;color:#e5e7eb}.public-theme-modern_dark .public-hero h1,.public-theme-modern_dark .public-section h2,.public-theme-modern_dark .contact-panel h2,.public-theme-modern_dark .contact-map-details h3{color:#f8fafc}.public-theme-modern_dark .public-hero p,.public-theme-modern_dark .public-section p,.public-theme-modern_dark .contact-panel p,.public-theme-modern_dark .contact-map-links a{color:#cbd5e1}
.public-theme-modern_dark .contact-panel .section-kicker,
.public-theme-modern_dark .contact-map-details .section-kicker{
    background:#111827;
    border-color:#334155;
    color:#93c5fd;
}
.public-theme-modern_dark .contact-form-card .form-control,
.public-theme-modern_dark .contact-form-card textarea{
    background:#020617;
    border-color:#475569;
    color:#f8fafc;
}
.public-theme-modern_dark .contact-form-card .form-control::placeholder,
.public-theme-modern_dark .contact-form-card textarea::placeholder{
    color:#94a3b8;
}
.public-theme-modern_dark .contact-map-details{
    color:#e5e7eb;
}
.public-theme-emerald_green .public-hero{background:linear-gradient(180deg,#ecfdf5 0,#fff 70%)}.public-theme-emerald_green .public-card,.public-theme-emerald_green .team-card{border-left:5px solid var(--public-primary);border-radius:18px}
.public-theme-orange_gradient .public-hero{background:linear-gradient(135deg,#fff7ed,#ffffff)}.public-theme-orange_gradient .public-card,.public-theme-orange_gradient .notice-card{box-shadow:10px 10px 0 rgba(249,115,22,.14);border-radius:12px}
.public-theme-cyber_neon .public-one-page,.public-theme-cyber_neon{background:#061826}.public-theme-cyber_neon .public-hero{background:radial-gradient(circle at 20% 20%,rgba(6,182,212,.35),transparent 32%),#061826}.public-theme-cyber_neon .public-hero h1,.public-theme-cyber_neon .public-section h2{color:#e0f2fe}.public-theme-cyber_neon .hero-dashboard-card,.public-theme-cyber_neon .public-card{background:rgba(8,47,73,.84);border-color:#22d3ee;color:#e0f2fe}
.public-theme-minimal_white .public-hero{background:#fff}.public-theme-minimal_white .hero-orb{display:none}.public-theme-minimal_white .hero-dashboard-card,.public-theme-minimal_white .public-card,.public-theme-minimal_white .team-card{box-shadow:none;border-color:#111827;border-radius:4px}
.public-theme-royal_gold .public-hero{background:linear-gradient(135deg,#fffbeb,#fff)}.public-theme-royal_gold .public-card,.public-theme-royal_gold .hero-dashboard-card{border:2px solid #f59e0b;border-radius:6px}
.public-theme-education_blue .public-hero{background:linear-gradient(180deg,#dbeafe,#f8fafc)}.public-theme-education_blue .feature-grid div{border-radius:8px;border-top:4px solid var(--public-primary)}
.public-theme-premium_black{background:#030712;color:#f9fafb}.public-theme-premium_black .public-nav-glass{background:#030712;border-color:#374151}.public-theme-premium_black .public-hero{background:#030712}.public-theme-premium_black .hero-dashboard-card,.public-theme-premium_black .public-card,.public-theme-premium_black .team-card,.public-theme-premium_black .notice-card,.public-theme-premium_black .testimonial-card{background:#111827;border-color:#f59e0b;color:#f9fafb;border-radius:0}.public-theme-premium_black .public-hero h1,.public-theme-premium_black .public-section h2{color:#fff}
.eims-points-wallet > i{
    width:54px;
    height:54px;
    display:grid;
    place-items:center;
    border-radius:18px;
    color:#fff;
    background:#d97706;
    font-size:1.5rem;
}
.eims-points-wallet span,
.eims-points-wallet strong{
    display:block;
}
.eims-points-wallet strong{
    font-size:1.6rem;
    color:#3b2f05;
}



/* Excel-style table filter/sort UI */
.excel-enhanced-table thead th{
    position:relative;
    vertical-align:middle;
    background:linear-gradient(135deg,#2563eb,#14b8a6)!important;
    color:#fff!important;
    white-space:nowrap;
    padding-right:40px!important;
}
.excel-th-title{
    display:inline-block;
    max-width:100%;
    margin-right:8px;
    vertical-align:middle;
}
.excel-filter-wrap{
    position:absolute;
    right:6px;
    top:50%;
    transform:translateY(-50%);
    z-index:5;
}
.excel-filter-btn{
    width:26px;
    height:24px;
    border:1px solid rgba(255,255,255,.45);
    background:#ecfeff;
    color:#155e75;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:4px;
    font-size:12px;
    font-weight:900;
    line-height:1;
    box-shadow:0 1px 2px rgba(37,99,235,.18);
}
.excel-filter-btn:hover,
.excel-filter-btn.is-active{
    background:#dbeafe;
    color:#1d4ed8;
    border-color:#38bdf8;
}
.excel-filter-menu{
    display:none;
    position:fixed;
    left:12px;
    top:12px;
    width:290px;
    max-width:calc(100vw - 24px);
    overflow:auto;
    background:#17477f;
    color:#f8fafc;
    border:1px solid #7dd3fc;
    border-radius:10px;
    box-shadow:0 18px 50px rgba(23,71,127,.32);
    padding:10px;
    z-index:99999;
    text-align:left;
}
.excel-filter-menu.open{display:block;}
.excel-menu-item{
    width:100%;
    border:0;
    background:transparent;
    text-align:left;
    padding:8px 9px;
    border-radius:7px;
    color:#f8fafc;
    font-size:14px;
    font-weight:650;
}
.excel-menu-item:hover{background:#1d5b9c;}
.excel-sort-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.excel-sort-row .excel-menu-item{
    text-align:center;
    background:#1e5b98;
    border:1px solid #93c5fd;
    color:#f8fafc;
    font-weight:700;
}
.excel-sort-row .excel-menu-item:hover{
    background:#256fb8;
}
.excel-menu-sep{
    height:1px;
    background:#7dd3fc;
    margin:8px 0;
}
.excel-search-label{
    font-size:12px;
    color:#bfdbfe;
    margin-bottom:5px;
    font-weight:700;
}
.excel-filter-search{
    width:100%;
    border:1px solid #93c5fd;
    border-radius:7px;
    padding:8px 10px;
    margin-bottom:8px;
    outline:none;
    color:#0f172a;
    background:#e0f2fe;
}
.excel-filter-search:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.excel-check-actions{
    display:flex;
    gap:8px;
    margin-bottom:8px;
}
.excel-mini{
    border:0;
    background:#e0f2fe;
    color:#0f172a;
    border-radius:6px;
    padding:4px 8px;
    font-size:12px;
}
.excel-mini:hover{background:#bfdbfe;}
.excel-value-list{
    max-height:210px;
    overflow:auto;
    border:1px solid #38bdf8;
    background:#1e5b98;
    border-radius:8px;
    padding:6px;
}
.excel-check{
    display:flex;
    align-items:flex-start;
    gap:7px;
    padding:5px 4px;
    font-size:13px;
    color:#f8fafc;
    cursor:pointer;
    font-weight:650;
}
.excel-check:hover{background:#256fb8;}
.excel-check input{
    margin-top:2px;
    accent-color:#ef4444;
}
.excel-menu-footer{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    margin-top:10px;
}
.excel-filter-menu .btn-primary{
    background:#2563eb;
    border-color:#2563eb;
    color:#fff;
}
.excel-filter-menu .btn-primary:hover{
    background:#1d4ed8;
    border-color:#1d4ed8;
}
.excel-filter-menu .btn-outline-secondary{
    background:#1e5b98;
    border-color:#7dd3fc;
    color:#f8fafc;
}
.excel-filter-menu .btn-outline-secondary:hover{
    background:#256fb8;
    color:#fff;
}
.excel-table-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin:0 0 10px;
    padding:10px 12px;
    background:rgba(239,246,255,.9);
    border:1px solid #bfdbfe;
    border-radius:14px;
    box-shadow:0 8px 22px rgba(37,99,235,.08);
}
.excel-table-toolbar .toolbar-title{
    font-weight:700;
    color:#0f172a;
}
.excel-table-toolbar .toolbar-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.date-column-title{
    display:inline-block;
    margin-right:8px;
    vertical-align:middle;
}
.date-column-toggle{
    display:inline-block;
    width:auto;
    min-width:74px;
    max-width:86px;
    padding-top:2px;
    padding-bottom:2px;
    font-size:.72rem;
    vertical-align:middle;
}
th .date-column-toggle{
    color:#0f172a;
    background-color:#ecfeff;
    margin-right:30px;
}
body.dark .excel-table-toolbar{
    background:#123b72;
    border-color:#38bdf8;
}
body.dark .excel-table-toolbar .toolbar-title{color:#f8fafc;}
body.dark .excel-filter-menu{
    background:#17477f;
    color:#f8fafc;
    border-color:#38bdf8;
}
body.dark .excel-menu-item{color:#f8fafc;}
body.dark .excel-menu-item:hover,
body.dark .excel-check:hover{background:#256fb8;}
body.dark .excel-menu-sep{background:#38bdf8;}
body.dark .excel-filter-search{
    background:#e0f2fe;
    border-color:#7dd3fc;
    color:#0f172a;
}
body.dark .excel-value-list{border-color:#38bdf8;background:#1e5b98;}
body.dark .excel-check{color:#f8fafc;}
body.dark .excel-mini{background:#e0f2fe;color:#0f172a;}

body.dark {
    background: #08111f;
    color: #e5edf7;
}

body.dark .main,
body.dark .teacher-dashboard-theme,
body.dark .app-shell {
    background: linear-gradient(180deg,#0b1220 0%,#111827 52%,#0b1220 100%);
    color: #e5edf7;
}

body.dark .card,
body.dark .card-premium,
body.dark .teacher-metric-card,
body.dark .teacher-metric-details,
body.dark .teacher-panel,
body.dark .admin-finance-summary,
body.dark .dashboard-language-switcher,
body.dark .topbar {
    background: #111c2e !important;
    border-color: #243447 !important;
    color: #e5edf7 !important;
    box-shadow: 0 16px 42px rgba(0,0,0,.28);
}

body.dark .teacher-hero,
body.dark .admin-stat-card,
body.dark .admin-chart-card {
    background:
        radial-gradient(circle at 16% 28%,rgba(37,99,235,.18),transparent 28%),
        radial-gradient(circle at 84% 18%,rgba(16,185,129,.16),transparent 30%),
        linear-gradient(135deg,#111c2e,#0f1b2d) !important;
    border-color: #243447 !important;
    color: #e5edf7 !important;
    box-shadow: 0 16px 42px rgba(0,0,0,.28);
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark .teacher-hero h2,
body.dark .teacher-metric-card strong,
body.dark .admin-stat-card h3 {
    color: #f8fafc !important;
}

body.dark p,
body.dark small,
body.dark .text-muted,
body.dark .teacher-hero p,
body.dark .teacher-metric-card span,
body.dark .teacher-pill-row > span,
body.dark .admin-stat-note,
body.dark .admin-stat-action {
    color: #b7c4d6 !important;
}

body.dark .table,
body.dark .table td,
body.dark .table th {
    color: #f8fafc !important;
    border-color: #334155 !important;
    background-color: #111c2e !important;
}

body.dark .table thead,
body.dark .table-light {
    background: #1e3a5f !important;
    color: #f8fafc !important;
}

body.dark .table tbody,
body.dark .table tbody tr,
body.dark .table tbody td {
    background: #0f1b2d !important;
    color: #e5edf7 !important;
}

body.dark .table-hover tbody tr:hover td,
body.dark .table-hover tbody tr:hover {
    background: #172b46 !important;
    color: #fff !important;
}

body.dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    background: #132238 !important;
    color: #f8fafc !important;
}

body.dark .form-control,
body.dark .form-select,
body.dark input,
body.dark textarea,
body.dark select {
    background-color: #0b1220 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark option {
    background: #0b1220;
    color: #f8fafc;
}

body.dark .form-control::placeholder {
    color: #94a3b8;
}

body.dark .teacher-pill-row > span,
body.dark .teacher-pill-row .dashboard-inbox-icon-btn,
body.dark .teacher-pill-row .eims-points-badge,
body.dark .admin-stat-icon,
body.dark .teacher-metric-card i {
    background: #172338 !important;
    border-color: #334155 !important;
}

body.dark .teacher-pill-row .eims-points-badge,
body.dark .eims-points-badge {
    color: #f8fafc !important;
}

body.dark .teacher-pill-row .eims-points-badge > span,
body.dark .teacher-pill-row .eims-points-badge b,
body.dark .eims-points-badge > span,
body.dark .eims-points-badge b {
    color: #f8fafc !important;
    background: transparent !important;
}

body.dark .eims-rank-hover{
    color:#cbd5e1 !important;
    background:#020617;
    border:1px solid #334155;
}

body.dark .role-badge{
    box-shadow:0 12px 28px rgba(0,0,0,.28);
}

body.dark .role-badge-teacher{background:#083344;border-color:#0891b2;color:#cffafe}
body.dark .role-badge-student{background:#172554;border-color:#3b82f6;color:#dbeafe}
body.dark .role-badge-accountant{background:#052e16;border-color:#22c55e;color:#dcfce7}
body.dark .role-badge-staff{background:#2e1065;border-color:#8b5cf6;color:#ede9fe}
body.dark .role-badge-parent{background:#431407;border-color:#f97316;color:#ffedd5}
body.dark .role-badge-admin{background:linear-gradient(135deg,#1d4ed8,#047857);border-color:#38bdf8;color:#fff}
body.dark .role-badge-super-admin{background:linear-gradient(135deg,#dc2626,#991b1b);border-color:#fca5a5;color:#fff}
body.dark .role-badge-user{background:#1e293b;border-color:#64748b;color:#f8fafc}
body.dark .admin-user-role-line{color:#f8fafc}
body.dark .career-decision-saved strong{color:#f8fafc}
body.dark .career-decision-saved small{color:#cbd5e1}

body.dark .dashboard-menu-panel {
    background: #0b1220;
    border: 1px solid #243447;
}

body.dark .footer {
    background: #0b1220;
    color: #b7c4d6;
}

body.dark .teacher-info-list p,
body.dark .teacher-schedule-item,
body.dark .teacher-calendar-detail-panel,
body.dark .teacher-calendar-detail-item,
body.dark .teacher-notice-card,
body.dark .teacher-mini-table {
    background: #0f1b2d !important;
    border-color: #334155 !important;
    color: #e5edf7 !important;
}

body.dark .teacher-calendar-detail-panel {
    box-shadow: 0 18px 45px rgba(0,0,0,.32) !important;
}

body.dark .teacher-info-list b,
body.dark .teacher-info-list span,
body.dark .teacher-schedule-item strong,
body.dark .teacher-schedule-item span,
body.dark .teacher-schedule-item time,
body.dark .teacher-panel-head h4,
body.dark .teacher-calendar-detail-panel strong,
body.dark .teacher-calendar-detail-panel .text-muted,
body.dark .teacher-calendar-detail-item strong,
body.dark .teacher-calendar-detail-item span,
body.dark .teacher-calendar-detail-item small,
body.dark .teacher-calendar-detail-item time,
body.dark .teacher-notice-card h5,
body.dark .teacher-notice-card p,
body.dark .teacher-notice-card small {
    color: #f8fafc !important;
}

body.dark .teacher-calendar-detail-panel .text-muted,
body.dark .teacher-calendar-detail-item span,
body.dark .teacher-calendar-detail-item small {
    color: #cbd5e1 !important;
}

body.dark .teacher-calendar-detail-grid h6 {
    color: #f8fafc !important;
}

body.dark .teacher-calendar-detail-item {
    background: #111f33 !important;
    box-shadow: inset 3px 0 0 rgba(45,212,191,.75);
}

body.dark .teacher-calendar-detail-item time {
    color: #5eead4 !important;
}

body.dark .teacher-chip-list span,
body.dark .badge,
body.dark .hero-badge,
body.dark .section-kicker {
    background: #17324f !important;
    border-color: #3b82f6 !important;
    color: #e0f2fe !important;
}

body.dark .bs-calendar-table,
body.dark .bs-calendar-table th,
body.dark .bs-calendar-table td {
    background: #0f1b2d !important;
    color: #e5edf7 !important;
    border-color: #334155 !important;
}

body.dark .bs-calendar-table td.table-primary {
    background: #1d4ed8 !important;
    color: #fff !important;
}

body.dark .bs-calendar-table td.table-success {
    background: #047857 !important;
    color: #fff !important;
}

body.dark .teacher-calendar-badge {
    background: #172554 !important;
    border-color: #3b82f6 !important;
    color: #dbeafe !important;
}

body.dark .teacher-calendar-badge-class {
    background: #064e3b !important;
    border-color: #34d399 !important;
    color: #d1fae5 !important;
}

body.dark .teacher-calendar-badge-notice {
    background: #7f1d1d !important;
    border-color: #f87171 !important;
    color: #fee2e2 !important;
}

body.dark .teacher-calendar-badge-saait {
    background: #064e3b !important;
    border-color: #6ee7b7 !important;
    color: #d1fae5 !important;
}

body.dark .teacher-calendar-badge-tithi,
body.dark .teacher-calendar-badge-more {
    background: #1e293b !important;
    border-color: #64748b !important;
    color: #e2e8f0 !important;
}

body.dark .btn-outline-secondary,
body.dark .btn-outline-primary,
body.dark .btn-outline-success {
    color: #dbeafe !important;
    border-color: #64748b !important;
}

body.dark .btn-outline-secondary:hover,
body.dark .btn-outline-primary:hover,
body.dark .btn-outline-success:hover {
    color: #fff !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
}

body.dark .student-dashboard-header {
    background:
        radial-gradient(circle at 16% 28%,rgba(37,99,235,.18),transparent 28%),
        radial-gradient(circle at 84% 18%,rgba(16,185,129,.16),transparent 30%),
        linear-gradient(135deg,#111c2e,#0f1b2d) !important;
    border-color: #243447 !important;
}

body.dark .student-dashboard-header h2,
body.dark .student-dashboard-header .dashboard-name-line strong,
body.dark .student-info-card h4,
body.dark .student-fee-card h4,
body.dark #results h4,
body.dark #attendance h4,
body.dark #notices h4 {
    color: #f8fafc !important;
}

body.dark .student-dashboard-header .dashboard-name-line,
body.dark .student-info-card p,
body.dark .student-fee-card p,
body.dark #attendance label {
    color: #d7e3f3 !important;
}

body.dark .student-info-card p,
body.dark .student-fee-card p {
    border-bottom-color: #334155;
}

body.dark .student-info-card p b,
body.dark .student-fee-card p b,
body.dark .student-info-card h6,
body.dark .student-info-card .small b,
body.dark .student-fee-card .border b,
body.dark #results .border b,
body.dark #notices .border b {
    color: #f8fafc !important;
}

body.dark .student-info-card p > :not(b),
body.dark .student-fee-card p > :not(b),
body.dark .student-info-card .small,
body.dark .student-fee-card .border,
body.dark #results .border,
body.dark #notices .border,
body.dark #notices .border p {
    color: #cbd5e1 !important;
}

body.dark .student-fee-card .border,
body.dark #results .border,
body.dark #notices .border {
    background: #0f1b2d !important;
    border-color: #334155 !important;
    box-shadow: inset 3px 0 0 rgba(56,189,248,.28);
}

body.dark .student-fee-card .border .text-muted,
body.dark #results .border .text-muted,
body.dark #notices .border .text-muted,
body.dark #attendance .text-muted,
body.dark #calendarSubtitle {
    color: #b7c4d6 !important;
}

body.dark .student-fee-card .text-warning,
body.dark #results .text-warning,
body.dark #notices .text-warning {
    color: #facc15 !important;
}

body.dark .student-fee-card .text-danger,
body.dark #results .text-danger,
body.dark #notices .text-danger {
    color: #fb7185 !important;
}

body.dark #attendance .form-select {
    background-color: #0b1220 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark #attendance .calendar-view-btn.active,
body.dark #attendance .calendar-view-btn[aria-pressed="true"] {
    background: #64748b !important;
    border-color: #64748b !important;
    color: #fff !important;
}

body.dark #attendance .bs-present,
body.dark #attendance .bs-calendar-table td.bs-present {
    background: #064e3b !important;
    border-color: #34d399 !important;
    color: #d1fae5 !important;
}

body.dark #attendance .bs-absent,
body.dark #attendance .bs-calendar-table td.bs-absent,
body.dark #attendance .bs-public-holiday,
body.dark #attendance .bs-calendar-table td.bs-public-holiday {
    background: #4c1d1d !important;
    border-color: #f87171 !important;
    color: #fee2e2 !important;
}

body.dark #attendance .bs-day-number,
body.dark #attendance .bs-day-status,
body.dark #attendance .bs-public-holiday .bs-day-number,
body.dark #attendance .bs-public-holiday .bs-day-status,
body.dark #attendance .bs-public-holiday .small,
body.dark #attendance .bs-public-holiday .text-muted {
    color: inherit !important;
}

body.dark #attendance .badge.bg-light,
body.dark #attendance .badge.text-dark {
    background: #17324f !important;
    border-color: #3b82f6 !important;
    color: #e0f2fe !important;
}

body.dark #attendance .teacher-calendar-detail-panel,
body.dark #attendance .teacher-calendar-detail-item {
    background: #0f1b2d !important;
    border-color: #334155 !important;
    color: #e5edf7 !important;
}

body.dark #attendance .teacher-calendar-detail-item strong,
body.dark #attendance .teacher-calendar-detail-grid h6 {
    color: #f8fafc !important;
}

body.dark #attendance .teacher-calendar-detail-item span,
body.dark #attendance .teacher-calendar-detail-item small {
    color: #cbd5e1 !important;
}

body.dark #attendance .teacher-calendar-detail-item time {
    color: #5eead4 !important;
}

body.dark .excel-enhanced-table thead th {
    background: linear-gradient(135deg,#1d4ed8,#0f766e) !important;
    color: #fff !important;
}

body.dark th .date-column-toggle,
body.dark .date-column-toggle {
    background: #0b1220 !important;
    color: #fff !important;
    border-color: #64748b !important;
}

body.dark .smart-help-tooltip {
    background: #111827;
    border-color: rgba(94, 234, 212, .28);
    color: #f8fafc;
    box-shadow: 0 24px 70px rgba(0,0,0,.42), 0 8px 18px rgba(20,184,166,.12);
}

body.dark .smart-help-tooltip span {
    color: #cbd5e1;
}

body.dark .smart-help-tooltip strong {
    color: #f8fafc;
    border-bottom-color: rgba(148, 163, 184, .24);
}

body.dark .smart-help-tooltip b {
    color: #5eead4;
}

body.dark .eims-notification-button {
    background: #172338;
    border-color: #334155;
    color: #5eead4;
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

body.dark .eims-notification-button:hover {
    background: linear-gradient(135deg,#2563eb,#0f766e);
    color: #fff;
}

body.dark .eims-notification-count {
    border-color: #0b1220;
}

body.dark .eims-notification-panel {
    background: #0f1b2d;
    border-color: #334155;
    box-shadow: 0 28px 85px rgba(0,0,0,.45);
}

body.dark .eims-notification-head {
    border-color: #334155;
}

body.dark .eims-notification-head strong,
body.dark .eims-notification-item,
body.dark .eims-notification-item:hover,
body.dark .eims-notification-copy strong {
    color: #f8fafc;
}

body.dark .eims-notification-head small,
body.dark .eims-notification-copy small,
body.dark .eims-notification-empty {
    color: #cbd5e1;
}

body.dark .eims-notification-head button {
    background: #17324f;
    color: #dbeafe;
}

body.dark .eims-notification-item {
    background: #0f1b2d;
    border-color: #243447;
}

body.dark .eims-notification-item:hover {
    background: #15243a;
}

body.dark .eims-notification-item.is-unread {
    background: #122b45;
}

body.dark .eims-notification-copy time {
    color: #94a3b8;
}
@media(max-width:768px){
    .excel-table-toolbar{align-items:flex-start;flex-direction:column;}
    .excel-filter-menu{width:270px;}
}

/* Teacher dashboard theme */
.teacher-dashboard-theme{
    min-height:100vh;
    background:linear-gradient(180deg,#f8fafc 0%,#eef5f7 52%,#f8fafc 100%);
}
.eims-section .teacher-dashboard-theme,.eims-dash-wrap .teacher-dashboard-theme{min-height:0;background:none;}
.teacher-dashboard-theme .container{
    max-width:1280px;
}
.teacher-hero{
    overflow:visible;
    border:1px solid #e2e8f0;
    background:linear-gradient(135deg,#fff 0%,#f8fffd 100%);
    color:#0f172a;
    box-shadow:0 18px 46px rgba(15,23,42,.08);
    border-radius:8px;
    min-height:300px;
    display:flex;
    align-items:center;
}
.teacher-menu-toggle{
    background:#0f766e;
    color:#fff;
    box-shadow:0 12px 28px rgba(15,118,110,.18);
}
.teacher-menu-panel{
    background:#0f172a;
}
.teacher-menu-panel a:hover{
    background:rgba(255,255,255,.16);
}
.teacher-menu-language{
    width:100%;
    margin:8px 0;
    background:rgba(255,255,255,.08);
    border-color:rgba(255,255,255,.14);
    color:#fff;
    box-shadow:none;
}
.teacher-menu-language select{
    color:#fff;
}
.teacher-menu-language option{
    color:#0f172a;
}
.teacher-photo-wrap{
    position:relative;
    cursor:pointer;
    display:inline-block;
}
.teacher-photo{
    width:124px;
    height:124px;
    border:5px solid #f8fafc;
    box-shadow:0 14px 34px rgba(15,23,42,.14);
}
.teacher-photo-wrap span{
    position:absolute;
    right:6px;
    bottom:10px;
    width:38px;
    height:38px;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#0f766e;
    color:#fff;
    border:3px solid #fff;
}
.teacher-hero-copy{
    padding-left:0;
    margin-left:-18px;
    max-width:900px;
}
.teacher-kicker{
    display:inline-flex;
    align-items:center;
    border:1px solid #ccfbf1;
    border-radius:999px;
    padding:7px 12px;
    font-size:.82rem;
    font-weight:800;
    color:#0f766e;
    background:#f0fdfa;
}
.teacher-hero h2{
    margin:14px 0 8px;
    font-size:clamp(2rem,4.2vw,3.55rem);
    font-weight:900;
    letter-spacing:0;
    line-height:1.05;
}
.teacher-hero p{
    margin:0;
    color:#475569;
    font-size:1.12rem;
}
.teacher-results-page .container{
    max-width:100%;
    padding-left:18px;
    padding-right:18px;
}
.teacher-results-page .teacher-hero{
    min-height:156px;
    align-items:center;
    padding:28px 34px!important;
    margin-bottom:22px!important;
}
.teacher-results-page .teacher-hero-copy{
    margin-left:0;
    padding-left:0;
    max-width:none;
}
.teacher-results-page .teacher-kicker{
    padding:6px 12px;
    font-size:.78rem;
}
.teacher-results-page .teacher-hero h2{
    margin:10px 0 6px;
    font-size:clamp(2rem,3vw,3rem);
}
.teacher-results-page .teacher-hero p{
    font-size:1rem;
}
.teacher-results-filter label{
    font-size:.88rem;
    font-weight:800;
    color:#0f172a;
    margin-bottom:6px;
}
.teacher-results-filter .form-select,
.teacher-results-filter .form-control{
    min-height:44px;
    font-size:.96rem;
}
.teacher-results-filter .btn{
    min-height:44px;
}
.teacher-pill-row{
    display:flex;
    flex-wrap:nowrap;
    gap:10px;
    margin-top:22px;
    align-items:center;
    max-width:100%;
    overflow:visible;
    padding-bottom:0;
}
.teacher-pill-row > span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:46px;
    border-radius:18px;
    padding:0 14px;
    background:linear-gradient(180deg,#ffffff,#fbfdff);
    border:1px solid #dbe6f3;
    font-weight:800;
    color:#26324a;
    box-shadow:0 12px 26px rgba(15,23,42,.06);
    white-space:nowrap;
    line-height:1;
}
.teacher-pill-row > span > i{
    width:22px;
    height:22px;
    display:inline-grid;
    place-items:center;
    color:#0f766e;
    font-size:1.05rem;
    line-height:1;
}
.teacher-pill-row .eims-points-badge{
    min-height:46px;
    border-radius:18px;
    padding:6px 14px 6px 8px;
    box-shadow:0 12px 26px rgba(148,107,10,.10);
    gap:9px;
}
.teacher-pill-row .dashboard-inbox-icon-btn{
    width:46px;
    height:46px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:18px;
    background:#fff;
    border:1px solid #dbe6f3;
    box-shadow:0 12px 26px rgba(15,23,42,.06);
    padding:0;
    flex:0 0 46px;
}
.teacher-pill-row .dashboard-inbox-icon-btn i{
    font-size:1.25rem;
    line-height:1;
}
.teacher-pill-row .dashboard-inbox-icon-btn .badge{
    position:absolute;
    top:-7px;
    right:-7px;
    min-width:22px;
    height:22px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 6px;
    border-radius:999px;
    font-size:.72rem;
    border:2px solid #fff;
}
@media(max-width:1400px){
    .teacher-pill-row{
        gap:8px;
    }
    .teacher-pill-row > span{
        min-height:42px;
        padding:0 10px;
        font-size:.88rem;
    }
    .teacher-pill-row > span > i{
        width:19px;
        height:19px;
        font-size:.95rem;
    }
    .teacher-pill-row .eims-points-badge{
        min-height:42px;
        padding:5px 10px 5px 6px;
        gap:7px;
        font-size:.88rem;
    }
    .teacher-pill-row .eims-points-badge i{
        width:30px;
        height:30px;
        font-size:.95rem;
    }
    .teacher-pill-row .dashboard-inbox-icon-btn{
        width:42px;
        height:42px;
        flex-basis:42px;
    }
}

/* Student certificates */
.certificate-page{
    min-height:100vh;
    padding:42px 18px 70px;
    background:radial-gradient(circle at 12% 10%, rgba(20,184,166,.16), transparent 32%),linear-gradient(135deg,#f8fbff,#eefdf8);
}

.finance-subject-picker{
    position:relative;
    z-index:30;
}
.finance-subject-picker summary{
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    border:1px solid #dee2e6;
    border-radius:8px;
    padding:10px 14px;
    color:#212529;
    background:#fff;
    cursor:pointer;
    list-style:none;
}
.finance-subject-picker summary::-webkit-details-marker{
    display:none;
}
.finance-subject-picker summary span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.finance-subject-picker[open] summary{
    border-color:#86b7fe;
    box-shadow:0 0 0 .25rem rgba(13,110,253,.25);
}
.finance-subject-picker summary i{
    flex:0 0 auto;
    transition:transform .15s ease;
}
.finance-subject-picker[open] summary i{
    transform:rotate(180deg);
}
.finance-subject-options{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    z-index:1200;
    max-height:260px;
    overflow:auto;
    display:grid;
    gap:4px;
    padding:8px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:8px;
    background:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
}
.finance-subject-options label{
    display:flex;
    align-items:center;
    gap:9px;
    min-height:36px;
    margin:0;
    border-radius:7px;
    padding:7px 9px;
    color:#0f172a;
    cursor:pointer;
}
.finance-subject-options label:hover{
    background:#f1f5f9;
}
.finance-subject-options span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

@media(max-width:768px){
    .finance-subject-options{
        position:static;
        margin-top:8px;
    }
}

@media print{
    .finance-subject-options{
        display:none;
    }
}

/* Complaint attachment deletion notice */
.eims-del-notice{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:3px;
    font-size:.72rem;
    cursor:help;
    margin-top:4px;
    padding:2px 6px;
    border-radius:20px;
    user-select:none;
}
.eims-del-later{
    color:#64748b;
    background:#f1f5f9;
}
.eims-del-soon{
    color:#92400e;
    background:#fef3c7;
}
.eims-del-notice::after{
    content:attr(data-tip);
    position:absolute;
    bottom:calc(100% + 6px);
    left:0;
    transform:none;
    background:#1e293b;
    color:#f8fafc;
    padding:5px 10px;
    border-radius:6px;
    white-space:normal;
    width:max-content;
    max-width:220px;
    font-size:.72rem;
    font-weight:500;
    line-height:1.4;
    opacity:0;
    pointer-events:none;
    transition:opacity .15s ease;
    z-index:1000;
    box-shadow:0 4px 12px rgba(0,0,0,.25);
}
.eims-del-notice::before{
    content:'';
    position:absolute;
    bottom:calc(100% + 1px);
    left:10px;
    transform:none;
    border:5px solid transparent;
    border-top-color:#1e293b;
    opacity:0;
    pointer-events:none;
    transition:opacity .15s ease;
    z-index:1001;
}
.eims-del-notice:hover::after,
.eims-del-notice:hover::before{
    opacity:1;
}

/* Student certificates */
.certificate-toolbar{
    width:min(1120px,100%);
    margin:0 auto 28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}
.certificate-controls{
    flex:1;
    display:grid;
    grid-template-columns:repeat(3,minmax(160px,1fr));
    gap:10px;
}
.student-certificate{
    position:relative;
    width:min(1120px,100%);
    aspect-ratio:1.414 / 1;
    margin:0 auto;
    overflow:hidden;
    border-radius:10px;
    background:
        radial-gradient(circle at 50% 42%,rgba(255,255,255,.96) 0 42%,rgba(255,250,245,.82) 72%,rgba(255,255,255,.9) 100%),
        repeating-linear-gradient(135deg,rgba(15,23,42,.032) 0 1px,transparent 1px 10px),
        repeating-radial-gradient(ellipse at center,rgba(146,64,14,.055) 0 1px,transparent 1px 15px),
        linear-gradient(135deg,#fff 0%,#fff8f0 50%,#f8fbff 100%);
    box-shadow:0 30px 80px rgba(15,23,42,.23),0 2px 0 rgba(255,255,255,.9) inset;
}
.certificate-border{
    position:absolute;
    inset:26px;
    border:2px solid rgba(146,64,14,.7);
    border-radius:4px;
    box-shadow:
        inset 0 0 0 5px rgba(255,255,255,.94),
        inset 0 0 0 7px rgba(180,83,9,.22),
        inset 0 0 0 12px rgba(255,255,255,.7);
    pointer-events:none;
}
.certificate-wave{
    position:absolute;
    pointer-events:none;
}
.certificate-wave-top{
    top:-134px;
    left:-110px;
    width:590px;
    height:290px;
    border-radius:0 0 100% 0;
    background:
        radial-gradient(circle at 88% 82%,rgba(255,255,255,.18),transparent 30%),
        linear-gradient(135deg,#b45309 0%,#9a3f07 62%,#7c2d12 100%);
    box-shadow:0 14px 40px rgba(146,64,14,.22);
}
.certificate-wave-bottom{
    right:-175px;
    bottom:-112px;
    width:850px;
    height:260px;
    border-radius:100% 0 0 0;
    background:
        radial-gradient(circle at 15% 64%,rgba(255,255,255,.24),transparent 34%),
        linear-gradient(95deg,#be123c 0%,#9f1239 42%,#92400e 100%);
    box-shadow:-18px -18px 44px rgba(159,18,57,.12);
}
.certificate-wave-bottom::before,
.certificate-wave-top::before{
    content:"";
    position:absolute;
    inset:24px;
    border:1px solid rgba(255,255,255,.45);
    border-radius:inherit;
}
.certificate-head{
    position:relative;
    z-index:2;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    gap:24px;
    padding:72px 110px 8px;
}
.certificate-brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    width:min(1080px,90%);
    max-width:none;
    text-align:center;
}
.certificate-brand > div{
    min-width:0;
}
.certificate-brand img{
    width:64px;
    height:64px;
    object-fit:contain;
    border-radius:14px;
    background:#fff;
    padding:6px;
    box-shadow:0 14px 30px rgba(15,23,42,.16),0 0 0 1px rgba(146,64,14,.12);
}
.certificate-brand span{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.certificate-brand h1{
    margin:0;
    color:#091426;
    font-size:clamp(1.7rem,2.58vw,2.72rem);
    font-weight:900;
    line-height:1.12;
    letter-spacing:0;
    text-align:center;
    white-space:nowrap;
    overflow:visible;
    text-overflow:clip;
}
.certificate-brand span{
    color:#5b6678;
    font-size:1rem;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
    text-align:center;
}
.certificate-medal{
    position:absolute;
    right:72px;
    top:72px;
    width:104px;
    height:104px;
    display:grid;
    place-items:center;
    align-content:center;
    gap:4px;
    border-radius:50%;
    color:#fff;
    border:2px solid rgba(255,255,255,.72);
    background:
        radial-gradient(circle at 34% 24%,rgba(255,255,255,.34),transparent 28%),
        radial-gradient(circle at 50% 50%,#c46614 0 47%,#9a3f07 48% 100%);
    box-shadow:
        0 18px 38px rgba(146,64,14,.32),
        inset 0 0 0 5px rgba(255,255,255,.2),
        inset 0 0 0 9px rgba(120,53,15,.28);
}
.certificate-medal::before{
    content:"";
    position:absolute;
    inset:9px;
    border-radius:50%;
    border:1px dashed rgba(255,255,255,.58);
}
.certificate-medal::after{
    content:"";
    position:absolute;
    left:50%;
    bottom:-12px;
    width:38px;
    height:30px;
    transform:translateX(-50%);
    background:linear-gradient(135deg,#7f1d1d,#b91c1c);
    clip-path:polygon(0 0,50% 34%,100% 0,84% 100%,50% 72%,16% 100%);
    z-index:-1;
    filter:drop-shadow(0 8px 10px rgba(127,29,29,.24));
}
.certificate-medal i{
    position:relative;
    z-index:1;
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border-radius:50%;
    color:#9a3f07;
    background:#fff8ed;
    font-size:1.25rem;
    box-shadow:0 5px 12px rgba(120,53,15,.22);
}
.certificate-medal span{
    position:relative;
    z-index:1;
    font-size:.76rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
    text-shadow:0 1px 2px rgba(0,0,0,.18);
}
.certificate-copy{
    position:relative;
    z-index:2;
    width:min(770px,74%);
    margin:28px auto 0;
    text-align:center;
}
.certificate-kicker,
.certificate-student-code{
    margin:0;
    color:#334155;
    font-size:.9rem;
    font-weight:800;
    text-transform:uppercase;
}
.certificate-student-name{
    margin:12px 0 0;
    color:#071225;
    font-family:Georgia, "Times New Roman", serif;
    font-size:clamp(2.55rem,5.3vw,5.25rem);
    font-style:italic;
    font-weight:500;
    line-height:1;
}
.certificate-student-code{
    margin-top:10px;
    color:#0f766e;
    letter-spacing:.12em;
}
.certificate-copy h2{
    margin:28px auto 12px;
    color:#08295f;
    font-size:clamp(2.15rem,4.55vw,4.35rem);
    font-weight:950;
    line-height:1;
    text-transform:uppercase;
}
.certificate-body-text{
    width:min(760px,100%);
    margin:0 auto;
    color:#1f2937;
    font-size:1rem;
    line-height:1.55;
}
.certificate-module-box{
    position:relative;
    z-index:2;
    width:min(840px,78%);
    margin:28px auto 0;
    padding:16px 20px;
    border:1px solid rgba(146,64,14,.18);
    border-radius:8px;
    background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.72));
    backdrop-filter:blur(10px);
    text-align:center;
    box-shadow:0 16px 34px rgba(15,23,42,.07);
}
.certificate-module-box span{
    display:block;
    margin-bottom:10px;
    color:#8a3a09;
    font-size:.78rem;
    font-weight:950;
    letter-spacing:.14em;
    text-transform:uppercase;
}
.certificate-module-box div{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
}
.certificate-module-box b{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    border-radius:999px;
    padding:5px 11px;
    color:#0f172a;
    background:#fff;
    border:1px solid rgba(15,23,42,.12);
    font-size:.78rem;
    box-shadow:0 6px 14px rgba(15,23,42,.04);
}
.certificate-foot{
    position:absolute;
    z-index:2;
    left:72px;
    right:72px;
    bottom:52px;
    display:grid;
    grid-template-columns:1fr 1fr auto;
    align-items:end;
    gap:38px;
}
.certificate-signature{
    text-align:center;
    position:relative;
}
.certificate-signature strong{
    display:block;
    min-height:26px;
    border-bottom:2px solid #071225;
    color:#071225;
    font-size:.9rem;
    font-weight:900;
}
.certificate-signature span,
.certificate-qr span{
    display:block;
    margin-top:7px;
    color:#475569;
    font-size:.72rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
    -webkit-text-stroke:2px #fff;
    paint-order:stroke fill;
}
.certificate-qr{
    display:flex;
    flex-direction:column;
    align-items:center;
    position:relative;
    border-radius:8px;
    padding:8px 8px 0;
    background:rgba(255,255,255,.34);
}
#certQrCanvas{
    width:82px;
    height:82px;
    flex-shrink:0;
    display:block;
    margin:0 auto;
}
#certQrCanvas canvas{
    display:none!important;
}
#certQrCanvas img{
    display:block!important;
    width:82px!important;
    height:82px!important;
    margin:0 auto;
}
.certificate-qr img,.certificate-qr canvas{
    width:82px;
    height:82px;
    border:5px solid #fff;
    border-radius:8px;
    box-shadow:0 12px 28px rgba(15,23,42,.2),0 0 0 1px rgba(15,23,42,.08);
}
@media(max-width:900px){
    .certificate-toolbar{
        flex-direction:column;
        align-items:stretch;
    }
    .certificate-controls{
        grid-template-columns:1fr;
    }
    .student-certificate{
        min-width:860px;
    }
    .certificate-page{
        overflow-x:auto;
    }
}
/* ── Certificate progress / locked UI ───────────────────────────────────── */
.cert-progress-wrap{display:flex;align-items:flex-start;justify-content:center;min-height:60vh;padding:32px 16px;}
.cert-progress-card{background:#fff;border:1.5px solid #e2e8f0;border-radius:22px;box-shadow:0 8px 36px rgba(15,23,42,.1);padding:36px 32px;width:min(640px,100%);text-align:center;}
.cert-progress-icon{width:68px;height:68px;border-radius:50%;background:linear-gradient(135deg,#6366f1,#818cf8);display:flex;align-items:center;justify-content:center;margin:0 auto 18px;box-shadow:0 6px 20px rgba(99,102,241,.3);}
.cert-progress-icon i{font-size:2rem;color:#fff;}
.cert-progress-card h4{font-size:1.3rem;font-weight:800;color:#0f172a;margin:0 0 8px;}
.cert-progress-sub{font-size:.9rem;color:#64748b;margin:0 0 24px;line-height:1.5;}
.cert-progress-stats{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:24px;}
.cert-stat-pill{background:#f8fafc;border:1.5px solid #e2e8f0;border-radius:14px;padding:12px 20px;min-width:110px;}
.cert-stat-num{display:block;font-size:1.55rem;font-weight:800;color:#6366f1;line-height:1;}
.cert-stat-att .cert-stat-num{color:#0ea5e9;}
.cert-stat-lbl{display:block;font-size:.72rem;color:#94a3b8;margin-top:4px;font-weight:500;text-transform:uppercase;letter-spacing:.04em;}
.cert-progress-bar-wrap{text-align:left;margin-bottom:4px;}
.cert-subject-list{margin-top:24px;text-align:left;}
.cert-subject-list-head{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;margin-bottom:10px;}
.cert-subject-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-radius:11px;margin-bottom:6px;background:#f8fafc;border:1px solid #e2e8f0;}
.cert-subject-row.is-done{background:#f0fdf4;border-color:#bbf7d0;}
.cert-subject-info{display:flex;align-items:center;gap:10px;flex:1;min-width:0;}
.cert-subject-name{font-size:.88rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cert-subject-badge{flex-shrink:0;}
body.dark .cert-progress-card{background:#1e293b;border-color:#334155;}
body.dark .cert-progress-card h4{color:#f1f5f9;}
body.dark .cert-stat-pill{background:#0f172a;border-color:#334155;}
body.dark .cert-subject-row{background:#0f172a;border-color:#334155;}
body.dark .cert-subject-row.is-done{background:#052e16;border-color:#166534;}
body.dark .cert-subject-name{color:#e2e8f0;}
/* ─────────────────────────────────────────────────────────────────────────── */

@media print{
    @page{size:A4 landscape;margin:0;}

    /* Hide every piece of UI chrome — NOT .certificate-foot */
    .eims-desktop-sidebar,
    .eims-app-header,
    .eims-bottom-nav,
    .eims-bottom-nav-app,
    .eims-bnav-spacer,
    .dashboard-menu-panel,
    .student-dashboard-menu,
    .certificate-toolbar,
    .certificate-page,
    .cert-progress-wrap,
    .dashboard-language-floating,
    .eims-notification-widget,
    .sidebar-language-switcher,
    .eims-dsk-footer,
    .admin-topbar,
    .admin-sidebar,
    .eims-topbar-notif,
    .eims-app-frame > aside,
    .eims-app-frame > .eims-desktop-sidebar,
    footer:not(.certificate-foot),
    .footer,
    .eims-upgrade-banner,
    #dashboardMenuPanel{
        display:none!important;
        visibility:hidden!important;
    }

    /* Flatten all wrapper containers so certificate sits at origin */
    html,body{
        width:297mm!important;
        height:210mm!important;
        margin:0!important;
        padding:0!important;
        overflow:hidden!important;
        background:#fff!important;
    }
    .eims-app-frame,
    .eims-app-content-area,
    .eims-dash-wrap,
    .eims-app-body,
    .px-3,.pb-4{
        display:block!important;
        width:100%!important;
        max-width:none!important;
        margin:0!important;
        padding:0!important;
        background:transparent!important;
        overflow:visible!important;
        box-shadow:none!important;
        border:none!important;
    }

    /* Certificate fills the entire A4 landscape page */
    .student-certificate{
        position:fixed!important;
        top:0!important;
        left:0!important;
        width:297mm!important;
        height:210mm!important;
        max-width:none!important;
        margin:0!important;
        border-radius:0!important;
        box-shadow:none!important;
        break-inside:avoid;
        page-break-inside:avoid;
        print-color-adjust:exact!important;
        -webkit-print-color-adjust:exact!important;
    }

    /* Show canvas (not img) in print — data: URIs don't always render in print preview */
    #certQrCanvas canvas{
        display:block!important;
        width:82px!important;
        height:82px!important;
        max-width:82px!important;
        max-height:82px!important;
        margin:0 auto!important;
        print-color-adjust:exact!important;
        -webkit-print-color-adjust:exact!important;
    }
    #certQrCanvas img{ display:none!important; }
    .certificate-qr{
        display:flex!important;
        flex-direction:column!important;
        align-items:center!important;
    }
}
@media(max-width:1100px){
    .teacher-pill-row > span,
    .teacher-pill-row .eims-points-badge{
        font-size:.8rem;
    }
    .teacher-pill-row > span{
        padding:0 8px;
    }
}
.teacher-metric-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:18px;
}
.teacher-metric-card,.teacher-panel{
    background:#fff;
    border:1px solid #e2e8f0;
    box-shadow:0 14px 34px rgba(15,23,42,.06);
    border-radius:8px;
}
.teacher-metric-card{
    min-height:142px;
    padding:20px 22px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    border:1px solid #e2e8f0;
    text-align:left;
    cursor:pointer;
    transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.teacher-metric-card:hover,
.teacher-metric-card:focus-visible,
.teacher-metric-card.is-active{
    transform:translateY(-2px);
    border-color:#14b8a6;
    box-shadow:0 18px 42px rgba(15,118,110,.12);
    outline:none;
}
.teacher-metric-card.is-active i{
    color:#fff;
    background:#0f766e;
}
.teacher-metric-card i{
    width:44px;
    height:44px;
    border-radius:12px;
    display:grid;
    place-items:center;
    color:#0f766e;
    background:#ccfbf1;
    font-size:1.2rem;
}
.teacher-metric-card span{
    color:#64748b;
    font-weight:800;
    font-size:1rem;
}
.teacher-metric-card strong{
    color:#0f172a;
    font-size:2rem;
    line-height:1;
}
.teacher-metric-details{
    background:#fff;
    border:1px solid #ccfbf1;
    box-shadow:0 12px 32px rgba(15,118,110,.08);
    border-radius:8px;
    padding:26px 30px;
}
.teacher-topic-panel{
    display:none;
}
.teacher-topic-panel.is-active{
    display:block;
}
.teacher-chip-list{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.teacher-chip-list span{
    display:inline-flex;
    align-items:center;
    border:1px solid #99f6e4;
    border-radius:999px;
    padding:9px 13px;
    color:#0f766e;
    background:#f0fdfa;
    font-weight:800;
}
.teacher-panel{
    padding:22px;
}
.teacher-bulk-notice-form{
    margin-top:18px;
}
.teacher-bulk-notice-form .form-label{
    color:#334155;
    font-weight:800;
}
.teacher-bulk-notice-form textarea{
    resize:vertical;
}
.teacher-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}
.teacher-panel-head h4{
    margin:0;
    color:#0f172a;
    font-weight:900;
}
.teacher-panel-head i{
    color:#0f766e;
    font-size:1.35rem;
}
.teacher-summary-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid #99f6e4;
    border-radius:999px;
    background:#f0fdfa;
    color:#0f766e;
    padding:8px 13px;
    font-weight:800;
    line-height:1;
}
.teacher-summary-toggle i{
    font-size:1rem;
    color:inherit;
}
.teacher-summary-toggle:hover,
.teacher-summary-toggle:focus-visible{
    background:#ccfbf1;
    outline:none;
    box-shadow:0 0 0 3px rgba(20,184,166,.16);
}
.teacher-info-list{
    display:grid;
    gap:12px;
}
.teacher-info-list p{
    display:flex;
    justify-content:space-between;
    gap:18px;
    margin:0;
    padding:12px 0;
    border-bottom:1px solid #e2e8f0;
}
.teacher-info-list b{
    color:#0f172a;
}
.teacher-info-list span{
    color:#475569;
    text-align:right;
}
.teacher-schedule-list{
    display:grid;
    gap:12px;
}
.teacher-schedule-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    border:1px solid #e2e8f0;
    border-radius:14px;
    padding:14px;
    background:#f8fafc;
}
.teacher-schedule-item strong,.teacher-schedule-item span{
    display:block;
}
.teacher-schedule-item span{
    color:#64748b;
    margin-top:2px;
}
.teacher-schedule-item time{
    color:#134e4a;
    font-weight:900;
    white-space:nowrap;
}
.teacher-empty-state{
    min-height:180px;
    display:grid;
    place-items:center;
    text-align:center;
    color:#64748b;
}
.teacher-empty-state i{
    font-size:2rem;
    color:#0f766e;
}
.teacher-notice-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:16px;
}
.teacher-mini-table{
    overflow:auto;
}
.teacher-student-search{
    min-width:280px;
}
.teacher-student-search input{
    min-width:220px;
}
.teacher-student-icon-btn,
.teacher-student-clear-btn{
    width:28px;
    height:28px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.teacher-student-icon-btn i,
.teacher-student-clear-btn i{
    font-size:.75rem;
}
.teacher-mini-table .table{
    min-width:520px;
}
.teacher-mini-table th{
    font-size:.78rem;
    color:#64748b!important;
    background:#f8fafc!important;
    text-transform:uppercase;
}
.teacher-mini-table td{
    color:#334155;
}
.bs-calendar-table{
    width:100%;
    border-collapse:collapse;
}
.nepali-calendar-font{
    font-family:"Noto Sans Devanagari","Mangal","Kalimati","Kokila","Nirmala UI",sans-serif;
}
.dashboard-inbox-icon-btn{
    position:relative;
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    min-width:44px;
    padding:0!important;
    line-height:1;
    vertical-align:middle;
}
.dashboard-inbox-icon-btn.w-100{
    width:100%;
}
.dashboard-inbox-icon-btn .bi{
    display:block;
    font-size:1.55rem;
    line-height:1;
}
.dashboard-inbox-icon-btn:hover,
.dashboard-inbox-icon-btn:focus,
.dashboard-inbox-icon-btn:focus-visible{
    background:#16a34a!important;
    border-color:#16a34a!important;
    color:#fff!important;
    box-shadow:0 12px 26px rgba(22,163,74,.22);
    transform:translateY(-1px);
}
.dashboard-inbox-icon-btn:hover .bi,
.dashboard-inbox-icon-btn:focus .bi,
.dashboard-inbox-icon-btn:focus-visible .bi{
    color:#fff!important;
}
.dashboard-inbox-icon-btn .badge{
    position:absolute;
    top:-7px;
    right:-7px;
    min-width:20px;
    height:20px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 5px;
    border:2px solid #fff;
    border-radius:999px;
    font-size:.68rem;
    line-height:1;
}
.dashboard-language-switcher{
    display:inline-flex;
    align-items:center;
    gap:7px;
    border:1px solid #dbeafe;
    border-radius:8px;
    padding:5px 8px;
    background:#fff;
    color:#0f766e;
    box-shadow:0 6px 18px rgba(15,23,42,.06);
}
.dashboard-language-switcher select{
    border:0;
    outline:0;
    background:transparent;
    color:#0f172a;
    font-size:.84rem;
    font-weight:800;
}
.dashboard-language-switcher i{
    color:#16a34a;
}
.dashboard-language-floating{
    position:fixed;
    top:12px;
    right:14px;
    z-index:2500;
}
.dashboard-lang-ne{
    font-family:"Noto Sans Devanagari","Mangal","Kalimati","Kokila","Nirmala UI",system-ui,sans-serif;
}
.admin-bulk-audience{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
.admin-bulk-audience label{
    display:flex;
    align-items:center;
    gap:8px;
    padding:9px 10px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    background:#f8fafc;
    font-weight:700;
    color:#334155;
}
.bs-calendar-table th,
.bs-calendar-table td{
    padding:.65rem .5rem;
    vertical-align:top;
    border:1px solid rgba(15,23,42,.08);
    min-width:42px;
    height:74px;
}
.bs-calendar-table td{
    background:#f8fafc;
}
.bs-calendar-table td.table-primary{
    background:#0d6efd!important;
    color:#fff!important;
}
.bs-calendar-table td.table-success{
    background:#198754!important;
    color:#fff!important;
}
.bs-day-cell{
    position:relative;
    min-height:72px;
}
.bs-day-number{
    font-weight:800;
    margin-bottom:.45rem;
}
.bs-present{
    background:#ecfdf5!important;
    border-color:#86efac!important;
}
.bs-absent{
    background:#fee2e2!important;
    border-color:#fecaca!important;
}
.bs-attendance-open{
    background:#fff7ed!important;
    border-color:#fdba74!important;
    color:#9a3412!important;
}
.bs-attendance-late{
    background:#f5f3ff!important;
    border-color:#c4b5fd!important;
    color:#5b21b6!important;
}
.bs-attendance-missed{
    background:#fff1f2!important;
    border-color:#fda4af!important;
    color:#9f1239!important;
}
.teacher-calendar-has-event{
    background:#f0fdfa;
}
.bs-public-holiday,
.bs-calendar-table td.bs-public-holiday,
.teacher-calendar-has-event.bs-public-holiday{
    background:#fee2e2!important;
    border-color:#fca5a5!important;
    color:#991b1b!important;
}
.bs-public-holiday .bs-day-number,
.bs-public-holiday .bs-day-status,
.bs-public-holiday .small,
.bs-public-holiday .text-muted{
    color:#991b1b!important;
}
.bs-public-holiday .teacher-calendar-badge-notice,
.bs-public-holiday .teacher-calendar-badge-more{
    color:#991b1b;
    background:#fecaca;
    border-color:#f87171;
}
.teacher-calendar-badge-row{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
    margin-top:6px;
}
.teacher-calendar-badge{
    display:inline-flex;
    align-items:center;
    max-width:100%;
    border-radius:999px;
    padding:3px 7px;
    font-size:.68rem;
    line-height:1.15;
    font-weight:800;
    color:#0f172a;
    background:#f8fafc;
    border:1px solid #e2e8f0;
}
.teacher-calendar-badge-class{
    color:#0f766e;
    background:#ccfbf1;
    border-color:#99f6e4;
}
.teacher-calendar-badge-notice{
    color:#7c2d12;
    background:#ffedd5;
    border-color:#fed7aa;
}
.teacher-calendar-badge-saait{
    color:#065f46;
    background:#d1fae5;
    border-color:#6ee7b7;
}
.teacher-calendar-badge-tithi{
    color:#334155;
    background:#f1f5f9;
    border-color:#cbd5e1;
}
.teacher-calendar-badge-more{
    color:#334155;
    background:#e2e8f0;
}
.eims-cal-badge-exam{color:#92400e;background:#fef3c7;border-color:#fcd34d;}
.eims-cal-badge-holiday{color:#991b1b;background:#fee2e2;border-color:#fca5a5;}
body.dark .eims-cal-badge-exam{color:#fbbf24;background:#451a03;border-color:#92400e;}
body.dark .eims-cal-badge-holiday{color:#fca5a5;background:#450a0a;border-color:#991b1b;}
.teacher-calendar-detail-panel{
    border:1px solid #e2e8f0;
    border-radius:16px;
    background:#fff;
    padding:16px;
    box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.teacher-calendar-detail-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}
.teacher-calendar-detail-grid h6{
    margin-bottom:10px;
    color:#0f172a;
    font-weight:900;
}
.teacher-calendar-detail-item{
    border:1px solid #e2e8f0;
    border-radius:14px;
    background:#f8fafc;
    padding:12px;
    margin-bottom:10px;
}
.teacher-calendar-detail-item strong,
.teacher-calendar-detail-item span,
.teacher-calendar-detail-item time,
.teacher-calendar-detail-item small{
    display:block;
}
.teacher-calendar-detail-item strong{
    color:#0f172a;
    font-weight:900;
}
.teacher-calendar-detail-item span,
.teacher-calendar-detail-item small{
    color:#64748b;
}
.teacher-calendar-detail-item time{
    margin-top:4px;
    color:#0f766e;
    font-weight:900;
}
.teacher-notice-card{
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:16px;
    background:#fff;
    box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.teacher-notice-card img{
    width:100%;
    height:150px;
    object-fit:cover;
    border-radius:14px;
    margin-bottom:12px;
}
.teacher-notice-card small{
    color:#0f766e;
    font-weight:900;
}
.teacher-notice-card h5{
    color:#0f172a;
    margin:8px 0;
    font-weight:900;
}
.teacher-notice-card p{
    color:#475569;
    margin:0;
}
@media(max-width:991px){
    .teacher-hero{
        min-height:auto;
        padding-top:76px!important;
    }
    .teacher-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .teacher-hero-copy{
        margin-left:0;
    }
    .teacher-pill-row{
        flex-wrap:nowrap;
        overflow:visible;
    }
}
@media(max-width:575px){
    .teacher-metric-grid{grid-template-columns:1fr;}
    .teacher-hero-copy{text-align:center;}
    .teacher-pill-row{justify-content:flex-start;}
    .teacher-info-list p,.teacher-schedule-item{flex-direction:column;align-items:flex-start;}
    .teacher-info-list span{text-align:left;}
    .teacher-mini-table .table{min-width:0;}
    .teacher-panel{padding:16px;}
}

.teacher-dashboard-theme + .footer{
    margin-top:0!important;
}

body:has(.teacher-dashboard-theme) .dashboard-language-floating{
    display:none;
}

.teacher-hero .col-md-3{
    text-align:left!important;
    display:flex;
    justify-content:center;
}

@media(max-width:767px){
    .teacher-dashboard-theme .container{
        padding-top:1rem!important;
    }
    .teacher-hero .col-md-3{
        justify-content:center;
    }
}

/* Global search results */
.global-search-card{
    border:1px solid #dbeafe;
}
.global-search-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
}
.global-search-head h4{
    font-weight:900;
    color:#0f172a;
}
.global-search-count{
    min-width:92px;
    border-radius:16px;
    padding:12px 16px;
    text-align:center;
    color:#fff;
    background:linear-gradient(135deg,#2563eb,#14b8a6);
}
.global-search-count strong,
.global-search-count span{
    display:block;
}
.global-search-count strong{
    font-size:1.45rem;
    line-height:1;
}
.global-search-count span{
    font-size:.78rem;
    opacity:.9;
    margin-top:4px;
}
.global-search-form{
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
}
.global-search-summary{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    color:#475569;
}
.global-search-summary strong{
    border-radius:999px;
    padding:6px 12px;
    color:#1e3a8a;
    background:#dbeafe;
}
.global-search-empty{
    min-height:220px;
    display:grid;
    place-items:center;
    align-content:center;
    gap:8px;
    text-align:center;
    border:1px dashed #93c5fd;
    border-radius:18px;
    color:#475569;
    background:#f8fbff;
}
.global-search-empty i{
    font-size:2.2rem;
    color:#2563eb;
}
.global-search-empty strong{
    color:#0f172a;
    font-size:1.1rem;
}
.global-search-empty.warning{
    border-color:#fde68a;
    background:#fffbeb;
}
.global-search-empty.warning i{
    color:#d97706;
}
.global-result-group{
    overflow:hidden;
    border:1px solid #dbeafe;
    border-radius:18px;
    background:#fff;
    box-shadow:0 14px 34px rgba(37,99,235,.08);
}
.global-result-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    color:#fff;
    background:linear-gradient(135deg,#1d4ed8,#0f766e);
}
.global-result-title div{
    display:flex;
    align-items:center;
    gap:10px;
}
.global-result-title i{
    font-size:1.1rem;
}
.global-result-title span{
    border-radius:999px;
    padding:5px 10px;
    font-size:.8rem;
    font-weight:800;
    background:rgba(255,255,255,.16);
}
.global-result-list{
    display:grid;
}
.global-result-row{
    display:grid;
    grid-template-columns:42px 1fr auto;
    gap:12px;
    padding:14px 16px;
    border-bottom:1px solid #e2e8f0;
    color:inherit;
    text-decoration:none;
    transition:background .18s ease, transform .18s ease;
}
.global-result-row:hover{
    background:#f8fbff;
    transform:translateX(2px);
}
.global-result-row:last-child{
    border-bottom:0;
}
.global-result-index{
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border-radius:10px;
    color:#1e3a8a;
    font-weight:900;
    background:#dbeafe;
}
.global-result-fields{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.global-result-field{
    display:inline-flex;
    align-items:center;
    gap:7px;
    max-width:100%;
    border:1px solid #dbeafe;
    border-radius:999px;
    padding:7px 10px;
    color:#0f172a;
    background:#f8fafc;
}
.global-result-field b{
    color:#1d4ed8;
}
.global-result-field em{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:420px;
    font-style:normal;
}
.global-result-field mark{
    border-radius:6px;
    padding:1px 4px;
    color:#7c2d12;
    background:#fed7aa;
}
.global-result-open{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:999px;
    color:#fff;
    background:linear-gradient(135deg,#2563eb,#14b8a6);
    align-self:center;
}
.admin-live-search{
    position:relative;
    min-width:260px;
}
.admin-live-search-panel{
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    z-index:6500;
    max-height:430px;
    overflow-y:auto;
    border:1px solid #dbeafe;
    border-radius:8px;
    background:#fff;
    box-shadow:0 24px 70px rgba(15,23,42,.22);
    padding:8px;
}
.admin-live-search-item,
.admin-live-search-all,
.admin-live-search-empty{
    display:grid;
    gap:3px;
    width:100%;
    border-radius:7px;
    padding:10px 11px;
    text-decoration:none;
}
.admin-live-search-item{
    color:#0f172a;
}
.admin-live-search-item:hover{
    background:#eef6ff;
    color:#0f172a;
}
.admin-live-search-type{
    width:max-content;
    max-width:100%;
    border-radius:999px;
    background:#e0f2fe;
    color:#0369a1;
    padding:2px 7px;
    font-size:.68rem;
    font-weight:900;
    text-transform:uppercase;
}
.admin-live-search-item strong{
    font-size:.92rem;
    line-height:1.2;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.admin-live-search-item small{
    color:#64748b;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.admin-live-search-all{
    margin-top:5px;
    color:#2563eb;
    background:#f8fafc;
    font-weight:900;
    text-align:center;
}
.admin-live-search-all:hover{
    background:#dbeafe;
    color:#1d4ed8;
}
.admin-live-search-empty{
    place-items:center;
    color:#64748b;
    font-weight:800;
}
.admin-live-search-empty i{
    color:#0f766e;
    font-size:1.2rem;
}
@media(max-width:768px){
    .global-search-head,
    .global-result-title{
        align-items:flex-start;
        flex-direction:column;
    }
    .global-search-form{
        grid-template-columns:1fr;
    }
    .global-result-row{
        grid-template-columns:1fr;
    }
    .global-result-open{
        display:none;
    }
    .global-result-field{
        border-radius:12px;
        width:100%;
    }
    .global-result-field em{
        max-width:100%;
        white-space:normal;
    }
}

.inbox-shell{
    width:100%;
    height:calc(100vh - 68px);
    min-height:560px;
    max-height:none;
    display:grid;
    grid-template-columns:minmax(300px,360px) minmax(0,1fr);
    overflow:hidden;
    border:1px solid rgba(15,23,42,.08);
    border-radius:8px;
    background:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.10);
}
.inbox-sidebar{
    min-width:0;
    display:grid;
    grid-template-rows:auto minmax(0,1fr);
    border-right:1px solid #e2e8f0;
    background:#f8fafc;
    overflow:hidden;
}
.inbox-sidebar-head{
    min-height:86px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:12px;
    padding:18px;
    color:#0f172a;
    background:#fff;
    border-bottom:1px solid #e2e8f0;
}
.inbox-brand-link{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
    color:inherit;
    text-decoration:none;
    border-radius:16px;
    padding:6px;
    margin:-6px;
    transition:background .2s ease, transform .2s ease;
}
.inbox-brand-link:hover,
.inbox-brand-link:focus-visible{
    background:#eef6ff;
    transform:translateY(-1px);
    outline:0;
}
.inbox-brand-copy{
    display:block;
    min-width:0;
}
.inbox-sidebar-head h2,
.inbox-brand-copy strong{
    display:block;
    font-size:1.35rem;
    margin:0;
    font-weight:900;
    color:#0f172a;
}
.inbox-sidebar-head span,
.inbox-brand-copy small{
    display:block;
    margin-top:3px;
    color:#64748b;
    font-size:.86rem;
}
.inbox-sidebar-head i{
    margin-left:auto;
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:999px;
    color:#fff;
    background:#16a34a;
}
.inbox-sidebar-scroll{
    min-height:0;
    overflow-y:auto;
    display:block;
}
.inbox-brand-logo{
    width:46px;
    height:46px;
    border-radius:8px;
    object-fit:contain;
    border:1px solid #e2e8f0;
    background:#fff;
    padding:4px;
}
.inbox-contact-list{
    min-height:0;
    padding:10px;
}
.inbox-mode-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:10px;
    border-bottom:1px solid #e2e8f0;
    background:#fff;
}
.inbox-mode-tabs a{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border-radius:8px;
    padding:9px 10px;
    color:#475569;
    text-decoration:none;
    font-weight:800;
    background:#f1f5f9;
}
.inbox-mode-tabs a.active{
    color:#166534;
    background:#dcfce7;
}
.inbox-search{
    display:grid;
    grid-template-columns:20px minmax(0,1fr) 28px;
    align-items:center;
    gap:8px;
    margin:10px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    padding:8px 10px;
    color:#64748b;
    background:#fff;
}
.inbox-search input{
    min-width:0;
    border:0;
    outline:0;
    color:#0f172a;
    background:transparent;
}
.inbox-search button{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:999px;
    color:#64748b;
    background:#f1f5f9;
}
.inbox-contact{
    display:grid;
    grid-template-columns:48px minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:12px;
    margin-bottom:6px;
    border-radius:8px;
    color:#0f172a;
    text-decoration:none;
    transition:background .16s ease, box-shadow .16s ease;
}
.inbox-contact:hover{
    background:#eef6ff;
}
.inbox-contact.active{
    background:#dcfce7;
    box-shadow:inset 3px 0 0 #16a34a;
}
.inbox-avatar{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border-radius:999px;
    color:#fff;
    font-weight:900;
    background:linear-gradient(135deg,#16a34a,#2563eb);
}
.inbox-photo-wrap{
    position:relative;
    width:46px;
    height:46px;
    flex:0 0 auto;
}
.inbox-photo-wrap-lg{
    width:54px;
    height:54px;
}
.inbox-photo{
    width:46px;
    height:46px;
    display:block;
    border-radius:999px;
    object-fit:cover;
    background:#e2e8f0;
    border:2px solid #fff;
    box-shadow:0 4px 12px rgba(15,23,42,.12);
}
.inbox-photo-lg{
    width:54px;
    height:54px;
}
.inbox-photo-sm{
    width:34px;
    height:34px;
    flex:0 0 auto;
}
.inbox-team-avatar{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border-radius:999px;
    color:#fff;
    font-weight:900;
    background:linear-gradient(135deg,#0f766e,#2563eb);
    box-shadow:0 4px 12px rgba(15,23,42,.12);
}
.inbox-team-avatar-lg{
    width:54px;
    height:54px;
    font-size:1.15rem;
}
.inbox-team-avatar-sm{
    width:34px;
    height:34px;
    font-size:.72rem;
}
.inbox-presence{
    position:absolute;
    right:1px;
    bottom:1px;
    width:13px;
    height:13px;
    border:2px solid #fff;
    border-radius:999px;
    background:#94a3b8;
}
.inbox-presence.online{
    background:#22c55e;
}
.inbox-presence.offline{
    background:#94a3b8;
}
.inbox-avatar-lg{
    width:54px;
    height:54px;
    font-size:1.05rem;
}
.inbox-avatar-sm{
    width:34px;
    height:34px;
    font-size:.78rem;
}
.inbox-contact-copy{
    min-width:0;
}
.inbox-contact-copy strong,
.inbox-contact-copy small,
.inbox-contact-copy em{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.inbox-contact-copy strong{
    font-size:.96rem;
}
.inbox-contact-copy small{
    display:flex;
    align-items:center;
    gap:6px;
    color:#64748b;
    font-size:.78rem;
}
.inbox-contact-role-badge,
.inbox-contact-team-badge{
    display:inline-grid;
    place-items:center;
    flex:0 0 auto;
}
.inbox-contact-role-badge .role-badge{
    width:22px;
    height:22px;
    min-width:22px;
    min-height:22px;
    padding:0;
    border-radius:7px;
    box-shadow:none;
}
.inbox-contact-role-badge .role-badge i,
.inbox-contact-team-badge i{
    font-size:.78rem;
}
.inbox-contact-team-badge{
    width:22px;
    height:22px;
    border-radius:7px;
    color:#0f766e;
    background:#ccfbf1;
}
.inbox-contact-copy em{
    margin-top:2px;
    color:#475569;
    font-size:.84rem;
    font-style:normal;
}
.inbox-contact-meta{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:5px;
}
.inbox-contact-meta small{
    color:#94a3b8;
    font-size:.72rem;
}
.inbox-contact-meta b{
    min-width:22px;
    height:22px;
    display:grid;
    place-items:center;
    border-radius:999px;
    padding:0 6px;
    color:#fff;
    font-size:.72rem;
    background:#16a34a;
}
.inbox-chat{
    min-width:0;
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto auto;
    background:#efeae2;
    overflow:hidden;
}
.inbox-chat-head{
    min-height:86px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:16px 20px;
    border-bottom:1px solid rgba(15,23,42,.08);
    background:#fff;
}
.inbox-chat-head h3{
    margin:0;
    font-size:1.15rem;
    font-weight:900;
}
.inbox-chat-head span{
    color:#64748b;
    font-size:.86rem;
}
.inbox-expiry-pill{
    display:inline-flex;
    align-items:center;
    gap:7px;
    border:1px solid #bbf7d0;
    border-radius:999px;
    padding:7px 11px;
    color:#166534!important;
    font-weight:800;
    background:#f0fdf4;
}
.inbox-mobile-back{
    display:none;
    width:40px;
    height:40px;
    border:0;
    border-radius:999px;
    color:#0f172a;
    background:#f1f5f9;
}
.inbox-thread{
    min-height:0;
    height:100%;
    overflow-y:auto;
    padding:22px;
    background:
        radial-gradient(circle at 20% 20%,rgba(255,255,255,.45) 0 1px,transparent 1px),
        s;
    background-size:20px 20px;
}
.inbox-message-row{
    display:flex;
    align-items:flex-end;
    gap:9px;
    margin-bottom:12px;
}
.inbox-message-row.mine{
    justify-content:flex-end;
}
.inbox-message-row.theirs{
    justify-content:flex-start;
}
.inbox-bubble{
    max-width:min(68%,680px);
    min-width:64px;
    position:relative;
    border-radius:8px;
    padding:10px 34px 20px 12px;
    color:#0f172a;
    box-shadow:0 2px 8px rgba(15,23,42,.08);
    overflow-wrap:anywhere;
}
.inbox-message-row.mine .inbox-bubble{
    background:#dcf8c6;
    border-bottom-right-radius:2px;
}
.inbox-message-row.theirs .inbox-bubble{
    background:#fff;
    border-bottom-left-radius:2px;
}
.inbox-message-text{
    line-height:1.45;
    white-space:normal;
}
.inbox-inline-flag,
.inbox-composer-flag{
    display:inline-flex;
    align-items:center;
    gap:4px;
    vertical-align:middle;
    margin:0 2px;
    border-radius:6px;
    padding:2px 4px;
    background:rgba(255,255,255,.7);
    box-shadow:0 0 0 1px rgba(15,23,42,.08);
}
.inbox-inline-flag .flag-tile,
.inbox-composer-flag .flag-tile{
    width:24px;
    height:16px;
    display:block;
    border-radius:3px;
    overflow:hidden;
    background:#e5e7eb;
    box-shadow:0 0 0 1px rgba(15,23,42,.08);
}
.inbox-inline-flag small,
.inbox-composer-flag small{
    color:#334155;
    font-size:.58rem;
    font-weight:900;
    line-height:1;
}
.inbox-reply-quote{
    display:grid;
    gap:2px;
    width:100%;
    margin:0 0 8px;
    padding:8px 10px;
    border:0;
    border-left:3px solid #16a34a;
    border-radius:6px;
    background:rgba(255,255,255,.65);
    text-align:left;
    cursor:pointer;
}
.inbox-reply-quote:hover{
    background:#dcfce7;
}
.inbox-message-row.theirs .inbox-reply-quote{
    background:#f8fafc;
}
.inbox-message-row.theirs .inbox-reply-quote:hover{
    background:#ecfdf5;
}
.inbox-reply-quote strong{
    color:#0f766e;
    font-size:.78rem;
    font-weight:900;
}
.inbox-reply-quote span{
    color:#475569;
    font-size:.82rem;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.inbox-message-sender{
    margin-bottom:4px;
    color:#0f766e;
    font-size:.78rem;
    font-weight:900;
}
.inbox-bubble time{
    position:absolute;
    right:10px;
    bottom:4px;
    color:#64748b;
    font-size:.68rem;
}
.inbox-bubble time .bi{
    margin-right:4px;
    color:#f59e0b;
}
/* Call log bubble */
.inbox-call-log-bubble{display:inline-flex;align-items:center;gap:10px;background:#fff;color:#1e293b;border-radius:18px 18px 4px 18px;padding:10px 14px 10px 10px;min-width:195px;max-width:280px;}
.inbox-message-row.mine .inbox-call-log-bubble{background:#dcf8c6;border-radius:18px 18px 2px 18px;}
.inbox-message-row.theirs .inbox-call-log-bubble{background:#fff;border-radius:18px 18px 18px 2px;}
.icl-icon-wrap{position:relative;width:44px;height:44px;flex-shrink:0;}
.icl-icon-circle{width:44px;height:44px;border-radius:50%;background:rgba(0,0,0,.12);display:flex;align-items:center;justify-content:center;font-size:1.1rem;color:#334155;}
.inbox-message-row.mine .icl-icon-circle{background:rgba(0,0,0,.1);color:#166534;}
.icl-direction-badge{position:absolute;bottom:-2px;right:-2px;width:18px;height:18px;background:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:9px;color:#475569;line-height:1;box-shadow:0 0 0 2px rgba(0,0,0,.08);}
.inbox-message-row.mine .icl-direction-badge{color:#166534;}
.icl-missed-dot{position:absolute;bottom:-7px;left:50%;transform:translateX(-50%);width:7px;height:7px;background:#ef4444;border-radius:50%;border:2px solid #dcf8c6;}
.inbox-message-row.theirs .icl-missed-dot{border-color:#fff;}
.icl-body{flex:1;min-width:0;}
.icl-title{display:block;font-size:.9rem;font-weight:700;color:#1e293b;line-height:1.3;}
.icl-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:2px;}
.icl-sub{font-size:.75rem;color:#64748b;line-height:1.2;white-space:nowrap;}
.icl-time{font-size:.68rem;color:#94a3b8;white-space:nowrap;}
.inbox-call-log-bubble.icl-missed .icl-direction-badge{background:#ef4444;color:#fff;}
body.dark .inbox-message-row.mine .inbox-call-log-bubble{background:#1a3a26;}
body.dark .inbox-message-row.theirs .inbox-call-log-bubble{background:#1e293b;}
body.dark .inbox-call-log-bubble{color:#e2e8f0;}
body.dark .icl-title{color:#e2e8f0;}
body.dark .icl-sub{color:#94a3b8;}
body.dark .icl-direction-badge{background:#334155;color:#94a3b8;}
body.dark .icl-missed-dot{border-color:#1a3a26;}
body.dark .inbox-message-row.theirs .icl-missed-dot{border-color:#1e293b;}
.inbox-message-actions{
    position:relative;
    flex-shrink:0;
    align-self:center;
    z-index:5;
}
.inbox-message-action-toggle{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:999px;
    background:rgba(255,255,255,.85);
    color:#475569;
    opacity:1;
    box-shadow:0 1px 4px rgba(15,23,42,.12);
    transition:background .15s ease,color .15s ease,box-shadow .15s ease;
}
.inbox-message-row:hover .inbox-message-action-toggle,
.inbox-message-actions.open .inbox-message-action-toggle{
    opacity:1;
}
.inbox-message-action-toggle:hover,
.inbox-message-actions.open .inbox-message-action-toggle{
    background:#fff;
    color:#0f172a;
    box-shadow:0 2px 8px rgba(15,23,42,.18);
}
/* Mine bubbles — use dark semi-transparent pill */
.inbox-message-row.mine .inbox-message-action-toggle{
    background:rgba(15,23,42,.28);
    color:#e2e8f0;
    opacity:1;
}
.inbox-message-row.mine:hover .inbox-message-action-toggle,
.inbox-message-row.mine .inbox-message-actions.open .inbox-message-action-toggle{
    opacity:1;
    background:rgba(15,23,42,.38);
    color:#fff;
}
.inbox-message-action-menu{
    position:absolute;
    top:28px;
    right:0;
    min-width:152px;
    display:none;
    padding:6px;
    border:1px solid rgba(15,23,42,.1);
    border-radius:8px;
    background:#fff;
    box-shadow:0 16px 35px rgba(15,23,42,.18);
}
.inbox-message-actions.open .inbox-message-action-menu{
    display:grid;
    gap:2px;
}
.inbox-message-action-menu button{
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    border:0;
    border-radius:6px;
    padding:8px 10px;
    background:transparent;
    color:#0f172a;
    text-align:left;
    font-size:.86rem;
}
.inbox-message-action-menu button:hover{
    background:#f1f5f9;
}
.inbox-message-action-menu button.danger{
    color:#dc2626;
}
/* For sent messages, action button is on the LEFT — open menu rightward */
.inbox-message-row.mine .inbox-message-action-menu{
    right:auto;
    left:0;
}
.inbox-message-row.starred .inbox-bubble{
    box-shadow:0 2px 8px rgba(15,23,42,.08), inset 0 0 0 1px rgba(245,158,11,.35);
}
.inbox-message-row.reply-jump-highlight .inbox-bubble{
    animation:inboxReplyJump 1.8s ease;
}
@keyframes inboxReplyJump{
    0%,100%{box-shadow:0 2px 8px rgba(15,23,42,.08);}
    18%,65%{box-shadow:0 0 0 4px rgba(22,163,74,.24),0 10px 26px rgba(22,163,74,.22);}
}
.inbox-chat-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-left:auto;
}

/* Ensure header actions stay right-aligned and responsive */
.inbox-chat-head{ flex-wrap:wrap; }
.inbox-chat-head .inbox-chat-actions{ order:2; }
.inbox-chat-head .inbox-chat-meta{ order:1; flex:1 1 auto; min-width:0; }

.inbox-call-overlay{
    position:fixed;
    inset:0;
    z-index:4000;
    display:grid;
    place-items:center;
    padding:20px;
    background:rgba(15,23,42,.75);
}
.inbox-call-card{
    width:min(980px,100%);
    max-height:calc(100vh - 40px);
    display:grid;
    gap:18px;
    padding:20px;
    border-radius:22px;
    background:#0c1119;
    border:1px solid rgba(255,255,255,.08);
    box-shadow:0 28px 80px rgba(0,0,0,.35);
    overflow:hidden;
}
.inbox-call-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    color:#fff;
}
.inbox-call-header h5{
    margin:0;
    font-size:1.15rem;
    font-weight:800;
}
.inbox-call-header p{
    margin:6px 0 0;
    color:#cbd5e1;
    font-size:.94rem;
    line-height:1.4;
}
.inbox-call-videos{
    display:grid;
    grid-template-columns:1.3fr .8fr;
    gap:16px;
    min-height:380px;
    width:100%;
}
.inbox-call-videos video{
    width:100%;
    height:100%;
    border-radius:18px;
    background:#000;
    object-fit:cover;
    box-shadow:0 20px 40px rgba(0,0,0,.35);
}
.inbox-call-controls{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:12px;
}
.inbox-call-controls .btn{
    min-width:120px;
}
@media(max-width:900px){
    .inbox-call-card{
        width:calc(100vw - 24px);
        max-height:calc(100vh - 24px);
    }
    .inbox-call-videos{
        grid-template-columns:1fr;
        min-height:260px;
    }
}
.inbox-forward-modal{
    position:fixed;
    inset:0;
    z-index:3000;
    display:grid;
    place-items:center;
    padding:18px;
    background:rgba(15,23,42,.45);
}
.inbox-forward-card{
    width:min(420px,100%);
    border-radius:8px;
    background:#fff;
    padding:18px;
    box-shadow:0 24px 60px rgba(15,23,42,.25);
}
.inbox-forward-head,
.inbox-forward-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.inbox-forward-head{
    margin-bottom:14px;
}
.inbox-forward-targets{
    min-height:190px;
}
.inbox-forward-targets option{
    padding:7px 9px;
}
.inbox-forward-help{
    display:block;
    margin-top:8px;
    color:#64748b;
}
.inbox-forward-head h5{
    margin:0;
    font-weight:900;
}
.inbox-forward-close{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:999px;
    background:#f1f5f9;
}
.inbox-forward-actions{
    justify-content:flex-end;
    margin-top:14px;
}
.inbox-attachment{
    display:flex;
    align-items:center;
    gap:9px;
    margin-top:8px;
    border:1px solid rgba(15,23,42,.10);
    border-radius:8px;
    padding:9px 10px;
    color:#075985;
    background:rgba(255,255,255,.62);
    text-decoration:none;
}
.inbox-attachment i{
    font-size:1.2rem;
}
.inbox-attachment span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.inbox-file-preview{
    display:grid;
    gap:7px;
    margin-top:8px;
}
.inbox-file-preview img,
.inbox-file-preview video{
    display:block;
    max-width:min(320px,100%);
    max-height:240px;
    border-radius:8px;
    object-fit:cover;
    background:#0f172a;
}
.inbox-file-preview audio{
    width:min(320px,100%);
}
.inbox-file-preview iframe{
    width:min(360px,100%);
    height:220px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:8px;
    background:#fff;
}
.inbox-composer{
    z-index:3;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) 48px;
    align-items:end;
    gap:10px;
    padding:14px 16px;
    border-top:1px solid rgba(15,23,42,.08);
    background:#f8fafc;
}
.inbox-reply-composer{
    grid-column:1/-1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:9px 12px;
    border-left:3px solid #16a34a;
    border-radius:8px;
    background:#ecfdf5;
}
.inbox-reply-composer div{
    min-width:0;
}
.inbox-reply-composer strong,
.inbox-reply-composer span{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.inbox-reply-composer strong{
    color:#0f766e;
    font-size:.82rem;
    font-weight:900;
}
.inbox-reply-composer span{
    color:#475569;
    font-size:.86rem;
}
.inbox-reply-composer button{
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border:0;
    border-radius:999px;
    background:#d1fae5;
    color:#0f766e;
}
.inbox-message-box{
    position:relative;
    min-width:0;
}
.inbox-message-storage{
    display:none!important;
}
.inbox-message-editor{
    width:100%;
    min-height:46px;
    max-height:120px;
    overflow-y:auto;
    border:1px solid #dbeafe;
    border-radius:8px;
    padding:12px 48px 12px 14px;
    outline:0;
    background:#fff;
    color:#0f172a;
    line-height:1.35;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}
.inbox-message-editor:empty::before{
    content:attr(data-placeholder);
    color:#64748b;
    pointer-events:none;
}
.inbox-message-editor:focus{
    border-color:#16a34a;
    box-shadow:0 0 0 3px rgba(22,163,74,.12);
}
.inbox-composer-tools{
    position:relative;
    display:flex;
    align-items:center;
    gap:7px;
}
.inbox-tool-btn,
.inbox-send-btn{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:999px;
    cursor:pointer;
}
.inbox-tool-btn{
    color:#334155;
    background:#e2e8f0;
    transition:transform .15s ease,background .15s ease,color .15s ease;
}
.inbox-tool-btn:hover{
    transform:translateY(-1px);
    color:#0f766e;
    background:#ccfbf1;
}
.inbox-plus-btn.is-open{
    transform:rotate(45deg);
    color:#0f766e;
    background:#ccfbf1;
}
.inbox-tool-btn input{
    display:none;
}
.inbox-attach-menu{
    position:absolute;
    right:0;
    bottom:calc(100% + 8px);
    left:auto;
    z-index:24;
    width:220px;
    display:grid;
    gap:4px;
    padding:8px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    background:#1f2933;
    box-shadow:0 18px 45px rgba(15,23,42,.34);
}
.inbox-attach-menu-item{
    display:flex;
    align-items:center;
    gap:13px;
    width:100%;
    min-height:48px;
    margin:0;
    border:0;
    border-radius:8px;
    padding:9px 10px;
    color:#e5e7eb;
    background:transparent;
    cursor:pointer;
    font:inherit;
    text-align:left;
}
.inbox-attach-menu-item:hover{
    background:rgba(255,255,255,.08);
}
.inbox-attach-menu-item input{
    display:none;
}
.inbox-camera-fallback{
    display:none;
}
.inbox-attach-menu-item span{
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border-radius:8px;
    color:#fff;
    font-size:1rem;
}
.inbox-attach-menu-item span.document{
    background:#7c3aed;
}
.inbox-attach-menu-item span.gallery{
    background:#0ea5e9;
}
.inbox-attach-menu-item span.camera{
    background:#f97316;
}
#inboxCameraOpen{
    display:none;
}
.inbox-attach-menu-item strong{
    font-size:.92rem;
    font-weight:800;
}
.inbox-camera-modal{
    position:fixed;
    inset:0;
    z-index:3600;
    display:grid;
    place-items:center;
    padding:18px;
    background:rgba(15,23,42,.72);
}
.inbox-camera-card{
    width:min(560px,100%);
    border-radius:8px;
    overflow:hidden;
    background:#0f172a;
    box-shadow:0 28px 80px rgba(0,0,0,.38);
}
.inbox-camera-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    color:#fff;
    background:#111827;
}
.inbox-camera-head h5{
    margin:0;
    font-weight:900;
}
.inbox-camera-head button{
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:999px;
    color:#e5e7eb;
    background:rgba(255,255,255,.08);
}
.inbox-camera-preview{
    position:relative;
    aspect-ratio:4 / 3;
    display:grid;
    place-items:center;
    background:#020617;
}
.inbox-camera-preview video{
    width:100%;
    height:100%;
    object-fit:cover;
}
.inbox-camera-error{
    position:absolute;
    left:16px;
    right:16px;
    bottom:16px;
    margin:0;
    border-radius:8px;
    padding:10px 12px;
    color:#fecaca;
    background:rgba(127,29,29,.82);
}
.inbox-camera-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    padding:14px 16px;
    background:#111827;
}
.inbox-emoji-btn{
    position:absolute;
    right:8px;
    bottom:8px;
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:999px;
    color:#64748b;
    background:#f1f5f9;
}
.inbox-emoji-btn:hover{
    color:#0f766e;
    background:#ccfbf1;
}
.inbox-emoji-panel{
    position:absolute;
    right:0;
    bottom:calc(100% + 4px);
    left:auto;
    z-index:20;
    width:min(420px,86vw);
    max-height:390px;
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:10px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:8px;
    background:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
}
.inbox-emoji-tabs{
    display:flex;
    gap:6px;
    overflow-x:auto;
    padding-bottom:5px;
    border-bottom:1px solid #e2e8f0;
}
.inbox-emoji-tabs button{
    flex:0 0 auto;
    border:0;
    border-radius:999px;
    padding:6px 10px;
    color:#475569;
    background:#f1f5f9;
    font-size:.76rem;
    font-weight:800;
}
.inbox-emoji-tabs button.active,
.inbox-emoji-tabs button:hover{
    color:#fff;
    background:#0f766e;
}
.inbox-emoji-groups{
    min-height:190px;
    max-height:310px;
    overflow-y:auto;
    padding-right:2px;
}
.inbox-emoji-group{
    display:none;
    grid-template-columns:repeat(10,1fr);
    gap:5px;
}
.inbox-emoji-group.active{
    display:grid;
}
.inbox-emoji-group button{
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:6px;
    background:#f8fafc;
    font-size:1.12rem;
    line-height:1;
}
.inbox-emoji-group button:hover{
    background:#e0f2fe;
}
.inbox-emoji-group button.inbox-flag-emoji{
    width:42px;
    height:38px;
    gap:1px;
    padding:3px;
    font-size:.62rem;
}
.inbox-flag-emoji .flag-tile{
    width:26px;
    height:18px;
    display:block;
    border-radius:3px;
    overflow:hidden;
    background:#e5e7eb;
    box-shadow:0 0 0 1px rgba(15,23,42,.08);
}
.inbox-flag-emoji small{
    color:#334155;
    font-size:.56rem;
    font-weight:900;
    line-height:1;
}
.flag-np .flag-tile{clip-path:polygon(0 0,100% 28%,46% 50%,100% 72%,0 100%);background:#dc143c;box-shadow:0 0 0 2px #1d4ed8 inset;}
.flag-in .flag-tile{background:linear-gradient(#ff9933 0 33%,#fff 33% 66%,#138808 66%);}
.flag-gb .flag-tile{background:linear-gradient(33deg,transparent 42%,#fff 42% 47%,#c8102e 47% 53%,#fff 53% 58%,transparent 58%),linear-gradient(-33deg,transparent 42%,#fff 42% 47%,#c8102e 47% 53%,#fff 53% 58%,transparent 58%),linear-gradient(#012169 0 38%,#fff 38% 45%,#c8102e 45% 55%,#fff 55% 62%,#012169 62%),linear-gradient(90deg,#012169 0 38%,#fff 38% 45%,#c8102e 45% 55%,#fff 55% 62%,#012169 62%);}
.flag-us .flag-tile{background:linear-gradient(90deg,#1e3a8a 0 42%,transparent 42%),repeating-linear-gradient(#b91c1c 0 2px,#fff 2px 4px);}
.flag-ca .flag-tile{background:linear-gradient(90deg,#d80621 0 25%,#fff 25% 75%,#d80621 75%);}
.flag-au .flag-tile{background:linear-gradient(135deg,#012169 0 70%,#fff 70% 74%,#012169 74%);}
.flag-jp .flag-tile{background:radial-gradient(circle at 50% 50%,#bc002d 0 28%,transparent 29%),#fff;}
.flag-cn .flag-tile{background:radial-gradient(circle at 24% 28%,#ffde00 0 12%,transparent 13%),#de2910;}
.flag-kr .flag-tile{background:radial-gradient(circle at 50% 50%,#cd2e3a 0 18%,#0047a0 19% 32%,transparent 33%),#fff;}
.flag-bd .flag-tile{background:radial-gradient(circle at 46% 50%,#f42a41 0 28%,transparent 29%),#006a4e;}
.flag-pk .flag-tile{background:radial-gradient(circle at 56% 48%,#fff 0 22%,transparent 23%),linear-gradient(90deg,#fff 0 22%,#01411c 22%);}
.flag-lk .flag-tile{background:linear-gradient(90deg,#00534e 0 18%,#ff9e00 18% 36%,#8d153a 36%);}
.flag-bt .flag-tile{background:linear-gradient(135deg,#ffd520 0 50%,#ff4e12 50%);}
.flag-mv .flag-tile{background:radial-gradient(circle,#fff 0 18%,transparent 19%),linear-gradient(#d21034 0 100%);}
.flag-ae .flag-tile{background:linear-gradient(90deg,#ef3340 0 25%,transparent 25%),linear-gradient(#009739 0 33%,#fff 33% 66%,#000 66%);}
.flag-qa .flag-tile{background:linear-gradient(90deg,#fff 0 28%,#8a1538 28%);}
.flag-sa .flag-tile{background:#006c35;}
.flag-kw .flag-tile{background:linear-gradient(90deg,#111827 0 22%,transparent 22%),linear-gradient(#007a3d 0 33%,#fff 33% 66%,#ce1126 66%);}
.flag-my .flag-tile{background:linear-gradient(90deg,#1e3a8a 0 42%,transparent 42%),repeating-linear-gradient(#cc0001 0 2px,#fff 2px 4px);}
.flag-sg .flag-tile{background:linear-gradient(#ef3340 0 50%,#fff 50%);}
.flag-th .flag-tile{background:linear-gradient(#a51931 0 17%,#fff 17% 30%,#2d2a4a 30% 70%,#fff 70% 83%,#a51931 83%);}
.flag-id .flag-tile{background:linear-gradient(#ce1126 0 50%,#fff 50%);}
.flag-ph .flag-tile{background:linear-gradient(90deg,#fff 0 30%,transparent 30%),linear-gradient(#0038a8 0 50%,#ce1126 50%);}
.flag-de .flag-tile{background:linear-gradient(#000 0 33%,#dd0000 33% 66%,#ffce00 66%);}
.flag-fr .flag-tile{background:linear-gradient(90deg,#0055a4 0 33%,#fff 33% 66%,#ef4135 66%);}
.flag-it .flag-tile{background:linear-gradient(90deg,#009246 0 33%,#fff 33% 66%,#ce2b37 66%);}
.flag-es .flag-tile{background:linear-gradient(#aa151b 0 25%,#f1bf00 25% 75%,#aa151b 75%);}
.flag-pt .flag-tile{background:linear-gradient(90deg,#006600 0 42%,#ff0000 42%);}
.flag-nl .flag-tile{background:linear-gradient(#ae1c28 0 33%,#fff 33% 66%,#21468b 66%);}
.flag-be .flag-tile{background:linear-gradient(90deg,#000 0 33%,#ffd90c 33% 66%,#ef3340 66%);}
.flag-ch .flag-tile{background:linear-gradient(#d52b1e 0 100%);}
.flag-se .flag-tile{background:linear-gradient(90deg,transparent 0 30%,#fecc00 30% 42%,transparent 42%),linear-gradient(#006aa7 0 38%,#fecc00 38% 56%,#006aa7 56%);}
.flag-no .flag-tile{background:linear-gradient(90deg,transparent 0 30%,#fff 30% 36%,#00205b 36% 48%,#fff 48% 54%,transparent 54%),linear-gradient(#ba0c2f 0 36%,#fff 36% 42%,#00205b 42% 58%,#fff 58% 64%,#ba0c2f 64%);}
.flag-dk .flag-tile{background:linear-gradient(90deg,transparent 0 32%,#fff 32% 44%,transparent 44%),linear-gradient(#c60c30 0 40%,#fff 40% 56%,#c60c30 56%);}
.flag-fi .flag-tile{background:linear-gradient(90deg,transparent 0 32%,#002f6c 32% 44%,transparent 44%),linear-gradient(#fff 0 40%,#002f6c 40% 56%,#fff 56%);}
.flag-ie .flag-tile{background:linear-gradient(90deg,#169b62 0 33%,#fff 33% 66%,#ff883e 66%);}
.flag-pl .flag-tile{background:linear-gradient(#fff 0 50%,#dc143c 50%);}
.flag-ua .flag-tile{background:linear-gradient(#005bbb 0 50%,#ffd500 50%);}
.flag-br .flag-tile{background:radial-gradient(circle,#002776 0 18%,transparent 19%),linear-gradient(135deg,transparent 26%,#ffdf00 26% 50%,transparent 50%),#009b3a;}
.flag-ar .flag-tile{background:linear-gradient(#74acdf 0 33%,#fff 33% 66%,#74acdf 66%);}
.flag-mx .flag-tile{background:linear-gradient(90deg,#006847 0 33%,#fff 33% 66%,#ce1126 66%);}
.flag-za .flag-tile{background:linear-gradient(32deg,#000 0 23%,#ffb612 23% 29%,#007a4d 29% 48%,#fff 48% 55%,#de3831 55%);}
.flag-ng .flag-tile{background:linear-gradient(90deg,#008753 0 33%,#fff 33% 66%,#008753 66%);}
.flag-ke .flag-tile{background:linear-gradient(#000 0 30%,#fff 30% 35%,#bb0000 35% 65%,#fff 65% 70%,#006600 70%);}
.flag-eg .flag-tile{background:linear-gradient(#ce1126 0 33%,#fff 33% 66%,#000 66%);}
.inbox-send-btn{
    color:#fff;
    background:#16a34a;
}
/* WhatsApp-style file tray */
.inbox-file-tray{
    display:flex;
    align-items:center;
    padding:8px 12px;
    background:#f0f4f8;
    border-top:1px solid #e2e8f0;
    gap:8px;
    overflow-x:auto;
    min-height:92px;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
}
.inbox-file-tray::-webkit-scrollbar{ height:0; }
body.dark .inbox-file-tray{ background:#1a2535; border-top-color:#334155; }
.inbox-file-tray-items{ display:flex; gap:8px; align-items:center; }
.inbox-file-card{
    position:relative;
    flex-shrink:0;
    width:72px;
    height:72px;
    border-radius:10px;
    overflow:hidden;
    background:#dde3ea;
    scroll-snap-align:start;
    box-shadow:0 1px 4px rgba(0,0,0,.12);
}
body.dark .inbox-file-card{ background:#2d3e50; }
.inbox-file-card-thumb{ width:100%; height:100%; }
.inbox-file-card-thumb img,
.inbox-file-card-thumb video{ width:100%; height:100%; object-fit:cover; display:block; }
.inbox-file-card-doc{
    width:100%; height:100%;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:6px 4px;
}
.inbox-file-card-doc i{ font-size:1.7rem; color:#475569; line-height:1; }
body.dark .inbox-file-card-doc i{ color:#94a3b8; }
.inbox-file-card-doc span{ font-size:.54rem; color:#475569; text-align:center; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; width:100%; line-height:1.2; }
.inbox-file-card-doc small{ font-size:.5rem; color:#94a3b8; }
body.dark .inbox-file-card-doc span{ color:#94a3b8; }
.inbox-file-card-remove{
    position:absolute; top:3px; right:3px;
    width:18px; height:18px;
    border:0; background:rgba(0,0,0,.6); color:#fff;
    border-radius:50%; display:flex; align-items:center; justify-content:center;
    font-size:.6rem; cursor:pointer; padding:0; line-height:1; transition:background .15s;
}
.inbox-file-card-remove:hover{ background:rgba(220,38,38,.9); }
.inbox-empty-chat{
    height:100%;
    min-height:240px;
    display:grid;
    place-items:center;
    align-content:center;
    gap:8px;
    text-align:center;
    color:#64748b;
}
.inbox-empty-chat i{
    font-size:2.4rem;
    color:#16a34a;
}
.inbox-empty-chat strong{
    color:#0f172a;
}
.inbox-typing-row{
    display:flex;
    align-items:flex-end;
    gap:9px;
    margin-bottom:12px;
}
.inbox-typing-bubble{
    display:flex;
    align-items:center;
    gap:5px;
    width:64px;
    height:34px;
    border-radius:8px;
    border-bottom-left-radius:2px;
    padding:0 12px;
    background:#fff;
    box-shadow:0 2px 8px rgba(15,23,42,.08);
}
.inbox-typing-bubble span{
    width:7px;
    height:7px;
    border-radius:999px;
    background:#64748b;
    animation:inboxTypingPulse 1.1s infinite ease-in-out;
}
.inbox-typing-bubble span:nth-child(2){
    animation-delay:.16s;
}
.inbox-typing-bubble span:nth-child(3){
    animation-delay:.32s;
}
@keyframes inboxTypingPulse{
    0%,80%,100%{transform:translateY(0);opacity:.45}
    40%{transform:translateY(-4px);opacity:1}
}
/* ── Tablet (769px–1200px): compact two-column layout ── */
@media(max-width:1200px){
    .inbox-shell{
        height:calc(100vh - 68px);
        min-height:500px;
        max-height:900px;
        grid-template-columns:minmax(260px,300px) minmax(0,1fr);
    }
}
@media(min-width:769px) and (max-width:1200px){
    .inbox-brand-copy strong{ font-size:1.1rem; }
    .inbox-brand-copy small{ font-size:.78rem; }
    .inbox-chat-head h3{ font-size:1.05rem; }
    .inbox-chat-head span{ font-size:.82rem; }
    .inbox-bubble{ max-width:78%; }
    .inbox-expiry-pill{ font-size:.78rem; padding:5px 9px; }
    .inbox-chat-actions .btn{ padding:6px 9px; font-size:.82rem; }
}
/* ── Mobile (≤768px): full-screen sliding panels ── */
@media(max-width:768px){
    body:has(.inbox-shell){ overflow:hidden; }
    .container:has(.inbox-shell){
        width:100%;
        max-width:none;
        padding:0!important;
    }
    .main:has(.inbox-shell){ padding:0; }
    .main:has(.inbox-shell) .topbar,
    .main:has(.inbox-shell) > .alert{ display:none; }
    .inbox-shell{
        position:fixed;
        inset:0;
        z-index:2000;
        width:100vw;
        height:100dvh;
        min-height:0;
        max-height:none;
        display:block;
        border:0;
        border-radius:0;
        box-shadow:none;
        background:#fff;
    }
    .inbox-sidebar,
    .inbox-chat{
        position:absolute;
        inset:0;
        width:100%;
        height:100%;
        border:0;
    }
    .inbox-sidebar{
        display:grid;
        grid-template-rows:auto minmax(0,1fr);
        transform:translateX(0);
        transition:transform .22s ease;
    }
    .inbox-chat{
        display:grid;
        grid-template-rows:64px minmax(0,1fr) auto auto;
        min-height:0;
        transform:translateX(100%);
        transition:transform .22s ease;
    }
    .inbox-shell.is-chat-open .inbox-sidebar{
        transform:translateX(-100%);
        pointer-events:none;
    }
    .inbox-shell.is-chat-open .inbox-chat{
        transform:translateX(0);
    }
    .inbox-shell.is-contact-open .inbox-sidebar{
        transform:translateX(0);
        pointer-events:auto;
    }
    .inbox-shell.is-contact-open .inbox-chat{
        transform:translateX(100%);
    }
    .inbox-sidebar-head{
        min-height:72px;
        padding:12px 14px;
    }
    .inbox-sidebar-head h2,
    .inbox-brand-copy strong{ font-size:1.12rem; }
    .inbox-sidebar-head span,
    .inbox-brand-copy small{ font-size:.76rem; }
    .inbox-brand-logo{ width:40px; height:40px; }
    .inbox-sidebar-head i{ width:38px; height:38px; }
    .inbox-contact-list{
        max-height:none;
        height:auto;
        padding:8px;
    }
    .inbox-contact{
        grid-template-columns:46px minmax(0,1fr) auto;
        gap:10px;
        padding:11px 10px;
        margin-bottom:4px;
    }
    .inbox-contact.active{
        background:#f8fafc;
        box-shadow:none;
    }
    .inbox-mobile-back{
        display:grid;
        place-items:center;
        flex:0 0 auto;
    }
    .inbox-chat-head{
        min-height:64px;
        padding:8px 10px;
        gap:8px;
        align-items:center;
    }
    .inbox-chat-head .gap-3{
        gap:8px!important;
        min-width:0;
        flex:1 1 0;
        overflow:hidden;
    }
    .inbox-chat-head h3{
        max-width:42vw;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        font-size:.96rem;
        margin:0;
    }
    .inbox-chat-head span{
        max-width:52vw;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        font-size:.74rem;
    }
    .inbox-chat-head .inbox-chat-actions{ margin-left:0; }
    .inbox-chat-actions .btn{
        width:38px;
        height:38px;
        padding:0;
        display:grid;
        place-items:center;
    }
    .inbox-expiry-pill{ display:none; }
    .inbox-photo-wrap-lg,
    .inbox-photo-lg{ width:42px; height:42px; }
    .inbox-thread{
        height:auto;
        min-height:0;
        padding:12px 10px;
    }
    .inbox-bubble{
        max-width:84vw;
        padding:9px 34px 19px 10px;
    }
    .inbox-message-row{ margin-bottom:9px; }
    .inbox-message-action-toggle{ opacity:1; }
    .inbox-file-preview img,
    .inbox-file-preview video{ max-width:74vw; max-height:220px; }
    .inbox-file-preview iframe{ width:74vw; height:190px; }
    .inbox-composer{
        position:relative;
        grid-template-columns:auto minmax(0,1fr) 44px;
        gap:8px;
        padding:8px 9px calc(8px + env(safe-area-inset-bottom));
        border-top:1px solid rgba(15,23,42,.08);
    }
    .inbox-message-editor{
        min-height:42px;
        max-height:96px;
        border-radius:22px;
        padding:10px 46px 10px 13px;
    }
    .inbox-tool-btn,
    .inbox-send-btn{ width:42px; height:42px; }
    .inbox-file-tray{ min-height:80px; padding:6px 10px; }
    .inbox-file-card{ width:64px; height:64px; }
    #inboxCameraOpen{ display:flex; }
    .inbox-chat-head{ padding:10px 12px; }
    .inbox-chat-actions{ gap:6px; }
    .inbox-device-select{ width:100%; margin-top:8px; }
    .inbox-call-card{ width:calc(100% - 20px); padding:12px; }
    .inbox-emoji-panel{
        width:min(calc(100vw - 16px),380px);
        max-height:min(340px,50vh);
    }
}
/* ── Small mobile (≤576px) ── */
@media(max-width:576px){
    .inbox-thread{ padding:10px 8px; }
    .inbox-bubble{ max-width:90vw; }
    .inbox-composer{
        grid-template-columns:auto minmax(0,1fr) 40px;
        padding:8px;
        padding-bottom:calc(8px + env(safe-area-inset-bottom));
    }
    .inbox-tool-btn,
    .inbox-send-btn{ width:40px; height:40px; }
    .inbox-attach-menu{ width:210px; right:0; left:auto; }
    .inbox-emoji-panel{
        width:min(calc(100vw - 16px),360px);
        max-height:min(300px,48vh);
    }
    .inbox-emoji-group{
        grid-template-columns:repeat(8,1fr);
    }
    .inbox-camera-modal{ padding:0; }
    .inbox-camera-card{
        width:100%;
        min-height:100dvh;
        display:grid;
        grid-template-rows:auto minmax(0,1fr) auto;
        border-radius:0;
    }
    .inbox-camera-preview{ aspect-ratio:auto; }
    .inbox-message-action-menu{
        right:auto;
        left:0;
    }
    .inbox-message-row.mine .inbox-message-action-menu{
        right:0;
        left:auto;
    }
}
/* ===== Student Dashboard Consistency Refresh ===== */
.student-dashboard-header{
    overflow:hidden;
    border:1px solid rgba(191,219,254,.78);
    border-radius:22px;
    background:
        radial-gradient(circle at 18% 30%,rgba(37,99,235,.12),transparent 28%),
        radial-gradient(circle at 88% 12%,rgba(16,185,129,.12),transparent 26%),
        linear-gradient(135deg,#ffffff 0%,#f8fbff 52%,#f0fdfa 100%);
    box-shadow:0 22px 58px rgba(15,23,42,.09);
}
.student-dashboard-header .row{
    min-height:250px;
}
.student-dashboard-header .profile-photo{
    width:170px;
    height:170px;
    border:10px solid #e0f2fe;
    border-radius:50%;
    object-fit:cover;
    box-shadow:0 22px 44px rgba(37,99,235,.18);
}
.student-dashboard-header h2{
    color:#0f172a;
    font-size:clamp(2.2rem,4vw,3.75rem);
    font-weight:950;
    letter-spacing:0;
    line-height:1;
    margin-bottom:18px;
}
.student-dashboard-header .dashboard-name-line{
    display:flex;
    align-items:center;
    gap:12px;
    color:#334155;
    font-size:1.08rem;
    margin-bottom:0;
}
.student-dashboard-header .dashboard-name-line strong{
    color:#0f172a;
    font-weight:900;
}
.student-dashboard-header .dashboard-name-line .role-badge{
    width:58px;
    height:58px;
    border-radius:18px;
    background:linear-gradient(135deg,#eff6ff,#ffffff);
    border:1px solid #93c5fd;
    box-shadow:0 14px 34px rgba(37,99,235,.13);
}
.student-hero-action-row{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-top:22px!important;
}
.student-hero-action-row .eims-points-badge,
.student-hero-action-row .btn{
    min-height:54px;
    border-radius:18px;
    font-weight:850;
    box-shadow:0 14px 32px rgba(15,23,42,.08);
}
.student-hero-action-row .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 18px;
}
.student-hero-action-row .btn-outline-success{
    background:#fff;
    border-color:#10b981;
    color:#047857;
}
.student-hero-action-row .btn-outline-success:hover{
    background:#10b981;
    color:#fff;
}
.student-hero-action-row .btn-outline-primary{
    width:58px;
    padding:0;
    border-color:#2563eb;
    background:#fff;
}
.student-hero-action-row .btn-outline-primary:hover{
    background:#2563eb;
    color:#fff;
}
.student-hero-notifications .eims-notification-button,
.student-dashboard-header .dashboard-menu-toggle{
    width:58px;
    height:58px;
    border-radius:18px;
}
.student-dashboard-header .dashboard-menu-toggle{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
}
.student-info-card,
.student-fee-card,
#results,
#attendance,
#notices{
    border:1px solid rgba(203,213,225,.9);
    border-radius:18px;
    background:rgba(255,255,255,.96);
    box-shadow:0 18px 48px rgba(15,23,42,.07);
}
.student-info-card h4,
.student-fee-card h4,
#results h4,
#attendance h4,
#notices h4{
    color:#0f172a;
    font-size:clamp(1.45rem,2vw,2rem);
    font-weight:950;
    letter-spacing:0;
    margin-bottom:22px;
}
.student-info-card p,
.student-fee-card p{
    display:grid;
    grid-template-columns:minmax(150px, .85fr) 1fr;
    align-items:center;
    gap:18px;
    padding:14px 0;
    margin:0;
    border-bottom:1px solid #e2e8f0;
    color:#1e293b;
    font-size:1rem;
}
.student-info-card p b,
.student-fee-card p b{
    color:#0f172a;
    font-weight:900;
}
.student-info-card p:not(:has(b)),
.student-fee-card p:not(:has(b)){
    display:block;
}
.student-info-card p:last-of-type,
.student-fee-card p:last-of-type{
    border-bottom:0;
}
.student-fee-card .border,
#results .border,
#notices .border{
    border-color:#dbeafe!important;
    border-radius:16px!important;
    background:linear-gradient(135deg,#ffffff,#f8fbff);
}
@media (max-width: 991px){
    .student-dashboard-header .row{
        min-height:auto;
    }
    .student-dashboard-header .profile-photo{
        width:142px;
        height:142px;
    }
}
@media (max-width: 767px){
    .student-dashboard-header{
        padding:86px 18px 28px!important;
        text-align:center;
    }
    .student-dashboard-header .profile-photo{
        width:124px;
        height:124px;
        border-width:7px;
    }
    .student-dashboard-header h2{
        font-size:2.1rem;
    }
    .student-dashboard-header .dashboard-name-line,
    .student-hero-action-row{
        justify-content:center;
    }
    .student-hero-action-row .btn-outline-success{
        width:100%;
        max-width:270px;
    }
    .student-info-card p,
    .student-fee-card p{
        grid-template-columns:1fr;
        gap:4px;
        text-align:left;
    }
}
/* ===== Student Dashboard Final Consistency Overrides ===== */
.student-dashboard-header{
    overflow:hidden;
    border:1px solid rgba(191,219,254,.78)!important;
    border-radius:22px!important;
    background:radial-gradient(circle at 18% 30%,rgba(37,99,235,.12),transparent 28%),radial-gradient(circle at 88% 12%,rgba(16,185,129,.12),transparent 26%),linear-gradient(135deg,#ffffff 0%,#f8fbff 52%,#f0fdfa 100%)!important;
    box-shadow:0 22px 58px rgba(15,23,42,.09)!important;
}
.student-dashboard-header .row{min-height:250px}
.student-dashboard-header .profile-photo{
    width:170px!important;
    height:170px!important;
    border:10px solid #e0f2fe!important;
    border-radius:50%;
    object-fit:cover;
    box-shadow:0 22px 44px rgba(37,99,235,.18)!important;
}
.student-dashboard-header h2{
    color:#0f172a!important;
    font-size:clamp(2.2rem,4vw,3.75rem)!important;
    font-weight:950!important;
    letter-spacing:0!important;
    line-height:1!important;
    margin-bottom:18px!important;
}
.student-dashboard-header .dashboard-name-line{
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    color:#334155!important;
    font-size:1.08rem!important;
    margin-bottom:0!important;
}
.student-dashboard-header .dashboard-name-line strong{
    color:#0f172a!important;
    font-weight:900!important;
}
.student-dashboard-header .dashboard-name-line .role-badge{
    width:58px!important;
    height:58px!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,#eff6ff,#ffffff)!important;
    border:1px solid #93c5fd!important;
    box-shadow:0 14px 34px rgba(37,99,235,.13)!important;
}
.student-hero-action-row{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    flex-wrap:wrap!important;
    margin-top:22px!important;
}
.student-hero-action-row .eims-points-badge,
.student-hero-action-row .btn{
    min-height:54px!important;
    border-radius:18px!important;
    font-weight:850!important;
    box-shadow:0 14px 32px rgba(15,23,42,.08)!important;
}
.student-hero-action-row .btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0 18px!important;
}
.student-hero-action-row .btn-outline-success{
    background:#fff!important;
    border-color:#10b981!important;
    color:#047857!important;
}
.student-hero-action-row .btn-outline-success:hover{
    background:#10b981!important;
    color:#fff!important;
}
.student-hero-action-row .btn-outline-primary{
    width:58px!important;
    padding:0!important;
    border-color:#2563eb!important;
    background:#fff!important;
}
.student-hero-action-row .btn-outline-primary:hover{
    background:#2563eb!important;
    color:#fff!important;
}
.student-hero-notifications .eims-notification-button,
.student-dashboard-header .dashboard-menu-toggle{
    width:58px!important;
    height:58px!important;
    border-radius:18px!important;
}
.student-dashboard-header .dashboard-menu-toggle{background:linear-gradient(135deg,#2563eb,#1d4ed8)!important}
.student-info-card,
.student-fee-card,
#results,
#attendance,
#notices{
    border:1px solid rgba(203,213,225,.9)!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.96)!important;
    box-shadow:0 18px 48px rgba(15,23,42,.07)!important;
}
.student-info-card h4,
.student-fee-card h4,
#results h4,
#attendance h4,
#notices h4{
    color:#0f172a!important;
    font-size:clamp(1.45rem,2vw,2rem)!important;
    font-weight:950!important;
    letter-spacing:0!important;
    margin-bottom:22px!important;
}
.student-info-card p,
.student-fee-card p{
    display:grid!important;
    grid-template-columns:minmax(150px,.85fr) 1fr!important;
    align-items:center!important;
    gap:18px!important;
    padding:14px 0!important;
    margin:0!important;
    border-bottom:1px solid #e2e8f0!important;
    color:#1e293b!important;
    font-size:1rem!important;
}
.student-info-card p b,
.student-fee-card p b{
    color:#0f172a!important;
    font-weight:900!important;
}
.student-info-card p:last-of-type,
.student-fee-card p:last-of-type{border-bottom:0!important}
.student-fee-card .border,
#results .border,
#notices .border{
    border-color:#dbeafe!important;
    border-radius:16px!important;
    background:linear-gradient(135deg,#ffffff,#f8fbff)!important;
}
@media (max-width:991px){
    .student-dashboard-header .row{min-height:auto}
    .student-dashboard-header .profile-photo{width:142px!important;height:142px!important}
}
@media (max-width:767px){
    .student-dashboard-header{padding:86px 18px 28px!important;text-align:center}
    .student-dashboard-header .profile-photo{width:124px!important;height:124px!important;border-width:7px!important}
    .student-dashboard-header h2{font-size:2.1rem!important}
    .student-dashboard-header .dashboard-name-line,
    .student-hero-action-row{justify-content:center!important}
    .student-hero-action-row .btn-outline-success{width:100%;max-width:270px}
    .student-info-card p,
    .student-fee-card p{grid-template-columns:1fr!important;gap:4px!important;text-align:left}
}
/* ===== Student Dashboard Dark Mode Contrast Fixes ===== */
body.dark .student-dashboard-header{
    background:radial-gradient(circle at 18% 30%,rgba(37,99,235,.22),transparent 30%),radial-gradient(circle at 88% 12%,rgba(16,185,129,.16),transparent 28%),linear-gradient(135deg,#111827 0%,#0f172a 58%,#102033 100%)!important;
    border-color:#334155!important;
    box-shadow:0 22px 58px rgba(0,0,0,.28)!important;
}
body.dark .student-dashboard-header h2,
body.dark .student-info-card h4,
body.dark .student-fee-card h4,
body.dark #results h4,
body.dark #attendance h4,
body.dark #notices h4{
    color:#f8fafc!important;
    text-shadow:none!important;
}
body.dark .student-dashboard-header .dashboard-name-line{
    color:#cbd5e1!important;
}
body.dark .student-dashboard-header .dashboard-name-line strong{
    color:#ffffff!important;
}
body.dark .student-dashboard-header .dashboard-name-line .role-badge{
    background:linear-gradient(135deg,#1e3a8a,#0f172a)!important;
    border-color:#60a5fa!important;
    color:#dbeafe!important;
}
body.dark .student-hero-action-row .eims-points-badge{
    background:linear-gradient(135deg,#fff7ed,#ffffff)!important;
    border-color:#f59e0b!important;
    color:#0f172a!important;
}
body.dark .student-hero-action-row .eims-points-badge,
body.dark .student-hero-action-row .eims-points-badge *{
    color:#0f172a!important;
}
body.dark .student-hero-action-row .btn-outline-success{
    background:#0f172a!important;
    border-color:#34d399!important;
    color:#d1fae5!important;
}
body.dark .student-hero-action-row .btn-outline-success:hover{
    background:#059669!important;
    color:#ffffff!important;
}
body.dark .student-hero-action-row .btn-outline-primary{
    background:#0f172a!important;
    border-color:#60a5fa!important;
    color:#dbeafe!important;
}
body.dark .student-hero-action-row .btn-outline-primary:hover{
    background:#2563eb!important;
    color:#ffffff!important;
}
body.dark .student-info-card,
body.dark .student-fee-card,
body.dark #results,
body.dark #attendance,
body.dark #notices{
    background:#111827!important;
    border-color:#334155!important;
    box-shadow:0 18px 48px rgba(0,0,0,.24)!important;
    color:#dbeafe!important;
}
body.dark .student-info-card p,
body.dark .student-fee-card p{
    color:#c7d2fe!important;
    border-bottom-color:#334155!important;
}
body.dark .student-info-card p b,
body.dark .student-fee-card p b{
    color:#f8fafc!important;
}
body.dark .student-info-card a,
body.dark .student-fee-card a,
body.dark #results a,
body.dark #attendance a,
body.dark #notices a{
    color:#93c5fd!important;
}
body.dark .student-fee-card .border,
body.dark #results .border,
body.dark #notices .border,
body.dark #attendance .border,
body.dark .student-calendar-detail-panel,
body.dark .teacher-calendar-detail-panel{
    background:#0f172a!important;
    border-color:#334155!important;
    color:#dbeafe!important;
}
body.dark .student-fee-card .border *,
body.dark #results .border *,
body.dark #notices .border *,
body.dark #attendance .border *,
body.dark .student-calendar-detail-panel *,
body.dark .teacher-calendar-detail-panel *{
    color:inherit;
}
body.dark .student-fee-card .receipt-box,
body.dark .receipt-box{
    background:#0f172a!important;
    border-color:#475569!important;
    color:#dbeafe!important;
}
body.dark .student-fee-card .receipt-box strong,
body.dark .receipt-box strong{
    color:#f8fafc!important;
}
body.dark .student-fee-card .text-muted,
body.dark .student-info-card .text-muted,
body.dark #results .text-muted,
body.dark #attendance .text-muted,
body.dark #notices .text-muted{
    color:#94a3b8!important;
}
body.dark .student-fee-card .text-warning,
body.dark #results .text-warning,
body.dark #attendance .text-warning,
body.dark #notices .text-warning{
    color:#fbbf24!important;
}
body.dark .student-fee-card .text-danger,
body.dark #results .text-danger,
body.dark #attendance .text-danger,
body.dark #notices .text-danger{
    color:#fb7185!important;
}
body.dark #attendance table,
body.dark #attendance .table,
body.dark #attendance td,
body.dark #attendance th{
    color:#dbeafe!important;
    border-color:#334155!important;
    background:#0f172a!important;
}
body.dark #attendance .form-select,
body.dark #attendance .form-control{
    background:#0f172a!important;
    border-color:#475569!important;
    color:#f8fafc!important;
}
body.dark #attendance .btn-outline-secondary,
body.dark #attendance .btn-outline-primary{
    border-color:#64748b!important;
    color:#e2e8f0!important;
}
body.dark #attendance .badge.bg-light,
body.dark #attendance .badge.text-dark{
    background:#1e3a5f!important;
    color:#e0f2fe!important;
}
body.dark .bs-day-cell,
body.dark .calendar-day,
body.dark .student-calendar-day{
    background:#111827!important;
    color:#dbeafe!important;
}
body.dark .bs-public-holiday,
body.dark .teacher-calendar-has-event{
    color:#f8fafc!important;
}
/* ===== Final Student Dashboard Dark Override ===== */
body.dark .student-dashboard-header h2,
body.dark .student-dashboard-header .dashboard-name-line,
body.dark .student-dashboard-header .dashboard-name-line strong,
body.dark .student-info-card h4,
body.dark .student-fee-card h4,
body.dark #results h4,
body.dark #attendance h4,
body.dark #notices h4{color:#f8fafc!important}
body.dark .student-info-card p,
body.dark .student-fee-card p{color:#dbeafe!important;border-bottom-color:#334155!important}
body.dark .student-info-card p b,
body.dark .student-fee-card p b{color:#f8fafc!important}
body.dark .student-info-card,
body.dark .student-fee-card,
body.dark #results,
body.dark #attendance,
body.dark #notices,
body.dark .student-fee-card .border,
body.dark #results .border,
body.dark #attendance .border,
body.dark #notices .border{background:#111827!important;border-color:#334155!important;color:#dbeafe!important}
body.dark .student-fee-card .border *,
body.dark #results .border *,
body.dark #attendance .border *,
body.dark #notices .border *{color:inherit}
body.dark .receipt-box,
body.dark .student-fee-card .receipt-box{background:#0f172a!important;border-color:#475569!important;color:#dbeafe!important}
body.dark .receipt-box strong,
body.dark .student-fee-card .receipt-box strong{color:#f8fafc!important}
body.dark .student-hero-action-row .eims-points-badge,
body.dark .student-hero-action-row .eims-points-badge *{color:#0f172a!important}

/* Keep the final student dark overrides readable after the broad inherited color rules above. */
body.dark .student-fee-card .border,
body.dark #results .border,
body.dark #attendance .border,
body.dark #notices .border{
    background:#0f1b2d!important;
    border-color:#334155!important;
    color:#dbeafe!important;
    box-shadow:inset 3px 0 0 rgba(56,189,248,.28);
}
body.dark .student-fee-card .border b,
body.dark #results .border b,
body.dark #attendance .border b,
body.dark #notices .border b{
    color:#f8fafc!important;
}
body.dark .student-fee-card .border .text-muted,
body.dark #results .border .text-muted,
body.dark #attendance .border .text-muted,
body.dark #notices .border .text-muted,
body.dark #calendarSubtitle{
    color:#b7c4d6!important;
}
body.dark .student-fee-card .border .text-warning,
body.dark #results .border .text-warning,
body.dark #attendance .border .text-warning,
body.dark #notices .border .text-warning{
    color:#facc15!important;
}
body.dark .student-fee-card .border .text-danger,
body.dark #results .border .text-danger,
body.dark #attendance .border .text-danger,
body.dark #notices .border .text-danger{
    color:#fb7185!important;
}
body.dark #attendance .calendar-view-btn.active,
body.dark #attendance .calendar-view-btn[aria-pressed="true"]{
    background:#64748b!important;
    border-color:#64748b!important;
    color:#fff!important;
}
body.dark #attendance .bs-present,
body.dark #attendance .bs-calendar-table td.bs-present{
    background:#064e3b!important;
    border-color:#34d399!important;
    color:#d1fae5!important;
}
body.dark #attendance .bs-absent,
body.dark #attendance .bs-calendar-table td.bs-absent,
body.dark #attendance .bs-public-holiday,
body.dark #attendance .bs-calendar-table td.bs-public-holiday{
    background:#4c1d1d!important;
    border-color:#f87171!important;
    color:#fee2e2!important;
}
body.dark #attendance .bs-day-number,
body.dark #attendance .bs-day-status,
body.dark #attendance .bs-public-holiday .bs-day-number,
body.dark #attendance .bs-public-holiday .bs-day-status,
body.dark #attendance .bs-public-holiday .small,
body.dark #attendance .bs-public-holiday .text-muted{
    color:inherit!important;
}
body.dark #attendance .teacher-calendar-detail-panel,
body.dark #attendance .teacher-calendar-detail-item{
    background:#0f1b2d!important;
    border-color:#334155!important;
    color:#e5edf7!important;
}
body.dark #attendance .teacher-calendar-detail-item strong,
body.dark #attendance .teacher-calendar-detail-grid h6{
    color:#f8fafc!important;
}
body.dark #attendance .teacher-calendar-detail-item span,
body.dark #attendance .teacher-calendar-detail-item small{
    color:#cbd5e1!important;
}
body.dark #attendance .teacher-calendar-detail-item time{
    color:#5eead4!important;
}

/* Student dashboard menu must float above the hero instead of being clipped by it. */
.student-dashboard-header{
    overflow:visible!important;
    position:relative;
    z-index:20;
}
.student-dashboard-header .dashboard-menu-toggle{
    z-index:120!important;
}
.student-dashboard-header .dashboard-menu-panel{
    z-index:110!important;
    width:min(320px,calc(100vw - 48px));
    max-height:min(760px,calc(100vh - 104px));
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:thin;
    scrollbar-color:rgba(148,163,184,.75) rgba(15,23,42,.18);
}
.student-dashboard-header .dashboard-menu-panel::-webkit-scrollbar{
    width:8px;
}
.student-dashboard-header .dashboard-menu-panel::-webkit-scrollbar-thumb{
    background:rgba(148,163,184,.75);
    border-radius:999px;
}
body.dark .student-dashboard-header .dashboard-menu-panel{
    background:#0f172a!important;
    border:1px solid #334155!important;
    box-shadow:0 28px 70px rgba(0,0,0,.42)!important;
}
body.dark .student-dashboard-header .dashboard-menu-panel a,
body.dark .student-dashboard-header .dashboard-menu-action{
    background:#1f2937!important;
    color:#f8fafc!important;
}
body.dark .student-dashboard-header .dashboard-menu-panel a:hover,
body.dark .student-dashboard-header .dashboard-menu-action:hover{
    background:#263244!important;
    color:#ffffff!important;
}
body.dark .student-menu-language{
    background:#111827!important;
    border:1px solid #334155!important;
}

/* Compact dashboard/menu hero spacing across module/result/dashboard pages. */
.teacher-dashboard-theme .teacher-hero,
.module-page .teacher-hero,
.teacher-results-page .teacher-hero{
    min-height:auto!important;
    padding:22px 28px!important;
    justify-content:flex-start!important;
}
.module-page .teacher-hero{
    margin-bottom:22px!important;
}
.module-page .teacher-hero-copy,
.teacher-results-page .teacher-hero-copy{
    max-width:1100px!important;
    margin-left:0!important;
    padding:6px 72px 6px 6x!important;
}
.teacher-dashboard-theme .teacher-hero-copy{
    padding-left:62px!important;
    margin-left:0!important;
    text-align:left!important;
}
.teacher-dashboard-theme .teacher-hero .row .teacher-hero-copy{
    padding-left:0!important;
}
.teacher-dashboard-theme .teacher-hero > .teacher-hero-copy{
    flex:1 1 auto!important;
    width:auto!important;
}
.module-page .teacher-hero h2,
.teacher-results-page .teacher-hero h2{
    margin:10px 0 8px!important;
    font-size:1.75rem!important;
    font-weight:700!important;
    line-height:1.2!important;
}
.module-page .teacher-hero p,
.teacher-results-page .teacher-hero p{
    max-width:980px;
    font-size:1rem!important;
    line-height:1.45!important;
}
.student-module-page .student-dashboard-header{
    min-height:auto!important;
    padding:28px 34px!important;
}
.student-module-page .student-module-hero{
    padding:8px 92px 8px 124px!important;
    max-width:1120px!important;
}
.student-module-page .student-module-hero h2{
    margin:10px 0 8px!important;
    font-size:1.75rem!important;
    font-weight:700!important;
}

/* Teacher dashboard menu should stay compact and not cover the hero title. */
.teacher-hero{
    overflow:visible!important;
    position:relative;
    z-index:20;
}
.teacher-hero .dashboard-menu-toggle{
    z-index:120!important;
}
.teacher-hero .teacher-menu-panel{
    top:82px!important;
    left:26px!important;
    right:auto!important;
    width:min(280px,calc(100vw - 52px))!important;
    min-width:0!important;
    max-height:min(520px,calc(100vh - 130px))!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:14px!important;
    border-radius:22px!important;
    background:rgba(15,23,42,.96)!important;
    border:1px solid rgba(148,163,184,.28)!important;
    box-shadow:0 28px 70px rgba(15,23,42,.28)!important;
    z-index:130!important;
    scrollbar-width:thin;
    scrollbar-color:rgba(148,163,184,.75) rgba(15,23,42,.18);
}
.teacher-dashboard-theme .card-premium:not(.teacher-hero){
    position:relative;
    z-index:1;
}
.teacher-hero .teacher-menu-panel::-webkit-scrollbar{
    width:8px;
}
.teacher-hero .teacher-menu-panel::-webkit-scrollbar-thumb{
    background:rgba(148,163,184,.75);
    border-radius:999px;
}
.teacher-hero .teacher-menu-panel a,
.teacher-hero .teacher-menu-panel .dashboard-menu-action{
    min-height:52px!important;
    margin-bottom:10px!important;
    padding:12px 16px!important;
    border-radius:16px!important;
    background:#1f2937!important;
    color:#f8fafc!important;
    font-weight:900!important;
}
.teacher-hero .teacher-menu-panel a:hover,
.teacher-hero .teacher-menu-panel .dashboard-menu-action:hover{
    background:#263244!important;
}
@media (min-width:992px){
    .teacher-dashboard-theme > .container{
        overflow-x:hidden;
    }
}
@media (max-width:767px){
    .student-dashboard-header .dashboard-menu-panel{
        width:auto;
        max-height:calc(100vh - 128px);
    }
    .teacher-dashboard-theme .teacher-hero,
    .module-page .teacher-hero,
    .teacher-results-page .teacher-hero,
    .student-module-page .student-dashboard-header{
        padding:84px 18px 24px!important;
    }
    .module-page .teacher-hero-copy,
    .teacher-results-page .teacher-hero-copy,
    .student-module-page .student-module-hero{
        padding:0!important;
        max-width:100%!important;
    }
    .module-page .teacher-hero h2,
    .teacher-results-page .teacher-hero h2,
    .student-module-page .student-module-hero h2{
        font-size:1.5rem!important;
    }
    .teacher-hero .teacher-menu-panel{
        top:76px!important;
        left:14px!important;
        width:min(300px,calc(100vw - 28px))!important;
        max-height:calc(100vh - 124px)!important;
    }
}

/* Polished student dashboard quick menu. */
.student-dashboard-header .student-dashboard-menu{
    width:min(360px,calc(100vw - 48px));
    padding:14px;
    border-radius:22px;
    background:rgba(15,23,42,.96);
    border:1px solid rgba(148,163,184,.28);
    backdrop-filter:blur(18px);
}
.student-dashboard-menu-title{
    position:sticky;
    top:0;
    z-index:2;
    margin:-2px -2px 10px;
    padding:8px 10px 12px;
    color:#cbd5e1;
    background:linear-gradient(180deg,rgba(15,23,42,.98),rgba(15,23,42,.86));
    border-bottom:1px solid rgba(148,163,184,.2);
    font-size:.78rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.student-dashboard-menu a,
.student-dashboard-menu .dashboard-menu-action{
    display:flex;
    align-items:center;
    gap:12px;
    min-height:48px;
    margin-bottom:8px;
    padding:10px 12px;
    border:1px solid rgba(148,163,184,.14);
    border-radius:14px;
    background:rgba(255,255,255,.065);
    color:#f8fafc;
    font-weight:850;
    line-height:1.2;
}
.student-dashboard-menu a i,
.student-dashboard-menu .dashboard-menu-action > i{
    width:34px;
    height:34px;
    flex:0 0 34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:rgba(37,99,235,.22);
    color:#93c5fd;
    font-size:1rem;
}
.student-dashboard-menu a span,
.student-dashboard-menu .dashboard-menu-action > span:first-of-type{
    min-width:0;
}
.student-dashboard-menu a:hover,
.student-dashboard-menu a:focus-visible,
.student-dashboard-menu .dashboard-menu-action:hover,
.student-dashboard-menu .dashboard-menu-action:focus-visible{
    background:rgba(37,99,235,.22);
    border-color:rgba(96,165,250,.45);
    color:#fff;
    transform:translateX(2px);
}
.student-dashboard-menu a:hover i,
.student-dashboard-menu a:focus-visible i,
.student-dashboard-menu .dashboard-menu-action:hover > i,
.student-dashboard-menu .dashboard-menu-action:focus-visible > i{
    background:#2563eb;
    color:#fff;
}
.student-dashboard-menu .dark-mode-toggle{
    margin-top:10px;
    border-color:rgba(45,212,191,.24);
}
.student-dashboard-menu .dark-mode-toggle > i{
    background:rgba(20,184,166,.18);
    color:#5eead4;
}
.student-dashboard-menu .student-menu-language{
    margin:10px 0;
    padding:12px;
    border-radius:16px;
}
.student-dashboard-menu-logout{
    margin-top:10px;
    background:rgba(239,68,68,.14)!important;
    border-color:rgba(248,113,113,.32)!important;
    color:#fecaca!important;
}
.student-dashboard-menu-logout i{
    background:rgba(239,68,68,.2)!important;
    color:#fecaca!important;
}
.student-dashboard-menu-logout:hover,
.student-dashboard-menu-logout:focus-visible{
    background:#dc2626!important;
    border-color:#ef4444!important;
    color:#fff!important;
}
.student-dashboard-menu-logout:hover i,
.student-dashboard-menu-logout:focus-visible i{
    background:rgba(255,255,255,.2)!important;
    color:#fff!important;
}
body.dark .student-dashboard-header .student-dashboard-menu{
    background:rgba(15,23,42,.97)!important;
    border-color:#334155!important;
}
body.dark .student-dashboard-menu-title{
    color:#cbd5e1!important;
    background:linear-gradient(180deg,rgba(15,23,42,.98),rgba(15,23,42,.86));
    border-bottom-color:#334155;
}
body.dark .student-dashboard-header .student-dashboard-menu a,
body.dark .student-dashboard-header .student-dashboard-menu .dashboard-menu-action{
    background:rgba(31,41,55,.86)!important;
    border-color:rgba(71,85,105,.72)!important;
    color:#f8fafc!important;
}
body.dark .student-dashboard-header .student-dashboard-menu a:hover,
body.dark .student-dashboard-header .student-dashboard-menu a:focus-visible,
body.dark .student-dashboard-header .student-dashboard-menu .dashboard-menu-action:hover,
body.dark .student-dashboard-header .student-dashboard-menu .dashboard-menu-action:focus-visible{
    background:#263244!important;
    border-color:#60a5fa!important;
}
@media (max-width:767px){
    .student-dashboard-header .student-dashboard-menu{
        width:auto;
        padding:12px;
    }
    .student-dashboard-menu a,
    .student-dashboard-menu .dashboard-menu-action{
        min-height:46px;
        padding:9px 10px;
    }
}

/* Mobile student menu: prevent title/row overlap and keep the panel inside the viewport. */
@media (max-width:767px){
    .student-dashboard-header .student-dashboard-menu{
        top:76px!important;
        left:12px!important;
        right:auto!important;
        width:min(360px,calc((100vw - 24px) / 2))!important;
        max-height:min(620px,calc(100vh - 124px))!important;
        padding:10px!important;
        border-radius:20px!important;
        overscroll-behavior:contain;
    }
    .student-dashboard-menu-title{
        position:static!important;
        margin:0 0 8px!important;
        padding:8px 10px 10px!important;
        border-radius:14px;
        background:rgba(15,23,42,.72)!important;
        border:1px solid rgba(148,163,184,.22);
        text-align:center;
    }
    .student-dashboard-menu a,
    .student-dashboard-menu .dashboard-menu-action{
        min-height:44px!important;
        margin-bottom:7px!important;
        padding:8px 10px!important;
        border-radius:13px!important;
        gap:10px!important;
        transform:none!important;
    }
    .student-dashboard-menu a i,
    .student-dashboard-menu .dashboard-menu-action > i{
        width:32px!important;
        height:32px!important;
        flex-basis:32px!important;
        border-radius:11px!important;
    }
    .student-dashboard-menu .dark-mode-toggle{
        margin-top:8px!important;
    }
    .student-dashboard-menu .student-menu-language{
        margin:8px 0!important;
        padding:10px!important;
    }
    .student-dashboard-menu-logout{
        margin-top:8px!important;
    }
}

@media (max-width:430px){
    .student-dashboard-header .student-dashboard-menu{
        left:10px!important;
        right:auto!important;
        width:min(260px,calc((100vw - 20px) / 2))!important;
        max-height:calc(100vh - 116px)!important;
    }
    .student-dashboard-menu a,
    .student-dashboard-menu .dashboard-menu-action{
        font-size:.95rem;
    }
}

/* Final student menu stability fix: no sticky title, no hidden first item. */
.student-dashboard-header .student-dashboard-menu{
    top:82px!important;
    width:min(360px,calc(100vw - 48px))!important;
    padding-top:10px!important;
    scroll-padding-top:0;
}
.student-dashboard-menu-title{
    position:static!important;
    top:auto!important;
    z-index:auto!important;
    margin:0 0 10px!important;
    padding:9px 10px!important;
    border-radius:14px!important;
    text-align:center;
}
.student-dashboard-menu a:first-of-type{
    margin-top:0!important;
}
@media (max-width:767px){
    .student-dashboard-header .student-dashboard-menu{
        top:76px!important;
        width:min(360px,calc((100vw - 24px) / 2))!important;
        max-height:min(620px,calc(100vh - 124px))!important;
    }
}
@media (max-width:430px){
    .student-dashboard-header .student-dashboard-menu{
        width:min(260px,calc((100vw - 20px) / 2))!important;
    }
}

/* Student attendance hover status */
.student-attendance-action{
    position:relative;
    display:inline-flex;
}
.student-attendance-action::after{
    content:attr(data-attendance-tooltip);
    position:absolute;
    left:50%;
    bottom:calc(100% + 10px);
    transform:translateX(-50%) translateY(4px);
    width:max-content;
    max-width:280px;
    padding:9px 12px;
    border-radius:12px;
    background:#0f172a;
    color:#f8fafc;
    box-shadow:0 18px 42px rgba(15,23,42,.25);
    font-size:.82rem;
    font-weight:800;
    line-height:1.3;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease;
    z-index:130;
}
.student-attendance-action::before{
    content:"";
    position:absolute;
    left:50%;
    bottom:100%;
    transform:translateX(-50%);
    border:6px solid transparent;
    border-top-color:#0f172a;
    opacity:0;
    transition:opacity .18s ease;
    z-index:131;
}
.student-attendance-action:hover::after{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}
.student-attendance-action:hover::before{
    opacity:1;
}
.student-attendance-action.is-present .btn{
    border-color:#22c55e!important;
}
.student-attendance-action.is-absent .btn{
    border-color:#ef4444!important;
}
.student-attendance-action.is-pending .btn{
    border-color:#f59e0b!important;
}
.student-attendance-button{
    min-height:54px!important;
    border-radius:18px!important;
    padding:0 18px!important;
    font-weight:900!important;
    box-shadow:0 14px 32px rgba(15,23,42,.08)!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:1px solid transparent!important;
}
.student-attendance-button.attendance-btn-marked{
    background:#16a34a!important;
    border-color:#22c55e!important;
    color:#fff!important;
}
.student-attendance-button.attendance-btn-open{
    background:#f59e0b!important;
    border-color:#fbbf24!important;
    color:#111827!important;
}
.student-attendance-button.attendance-btn-late{
    background:#7c3aed!important;
    border-color:#a78bfa!important;
    color:#fff!important;
}
.student-attendance-button.attendance-btn-absent{
    background:#dc2626!important;
    border-color:#ef4444!important;
    color:#fff!important;
}
.student-attendance-button.attendance-btn-disabled,
.student-attendance-button:disabled{
    background:#e2e8f0!important;
    border-color:#cbd5e1!important;
    color:#64748b!important;
    cursor:not-allowed!important;
    opacity:1!important;
    box-shadow:none!important;
}
.student-attendance-button.attendance-btn-open:hover,
.student-attendance-button.attendance-btn-open:focus{
    background:#d97706!important;
    color:#fff!important;
}
body.dark .student-attendance-button.attendance-btn-disabled,
body.dark .student-attendance-button:disabled{
    background:#1e293b!important;
    border-color:#475569!important;
    color:#94a3b8!important;
}
@media (max-width:767px){
    .student-attendance-action{
        width:100%;
        max-width:270px;
    }
    .student-attendance-action .btn{
        width:100%;
    }
    .student-attendance-action::after{
        max-width:min(260px,80vw);
        white-space:normal;
    }
}

/* Attendance status badges (dashboard quick-action card) */
.attendance-badge-present,.attendance-badge-late,.attendance-badge-absent,.attendance-badge-pending,.attendance-badge-default{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;font-size:.78rem;font-weight:700;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.attendance-badge-present{background:#dcfce7;color:#15803d;}
body.dark .attendance-badge-present{background:#052e16;color:#4ade80;}
.attendance-badge-late{background:#fef3c7;color:#b45309;}
body.dark .attendance-badge-late{background:#451a03;color:#fbbf24;}
.attendance-badge-absent{background:#fee2e2;color:#b91c1c;}
body.dark .attendance-badge-absent{background:#450a0a;color:#f87171;}
.attendance-badge-pending{background:#fef9c3;color:#854d0e;}
body.dark .attendance-badge-pending{background:#422006;color:#fde047;}
.attendance-badge-default{background:#f1f5f9;color:#475569;}
body.dark .attendance-badge-default{background:#1e293b;color:#94a3b8;}

/* Syllabus/module pages */
.module-page .card-premium{
    overflow:hidden;
}
.student-module-hero{
    max-width:880px;
    padding:18px 0 8px 112px;
}
.module-kicker,
.module-subject{
    display:inline-flex;
    align-items:center;
    gap:6px;
    color:#2563eb;
    font-size:.78rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.student-module-hero h2{
    margin:8px 0;
    font-size:1.75rem;
    font-weight:700;
    line-height:1.2;
}
.student-module-hero p{
    font-size:.9rem;
    color:#64748b;
    font-weight:500;
}
.module-chip-row{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:16px;
}
.module-filter-form{
    display:grid;
    grid-template-columns:minmax(180px,260px) minmax(180px,260px) auto;
    align-items:end;
    gap:12px;
    margin-top:18px;
    max-width:720px;
}
.module-filter-form label{
    display:block;
    margin-bottom:6px;
    color:#334155;
    font-size:.82rem;
    font-weight:600;
}
.module-filter-form .form-select{
    min-height:44px;
    border-radius:12px;
    font-weight:500;
}
.admin-module-filter{
    max-width:none;
    grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;
}
.module-chip-row span,
.module-meta span{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:8px 12px;
    border-radius:999px;
    background:#eef2ff;
    color:#1e3a8a;
    font-weight:800;
    font-size:.88rem;
}
.module-grid,
.module-list{
    display:grid;
    gap:18px;
}
.module-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.module-card{
    border-color:rgba(37,99,235,.18)!important;
}
.admin-module-row{
    padding:18px;
    border:1px solid #e2e8f0;
    border-radius:18px;
    background:#fff;
}
.module-card-head{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-bottom:14px;
}
.module-card h5{
    margin:7px 0 0;
    font-weight:950;
}
.module-card p{
    color:#334155;
    font-weight:650;
    line-height:1.65;
}
.module-updated{
    flex:0 0 auto;
    color:#64748b;
    font-size:.82rem;
    font-weight:800;
}
.module-resources{
    margin-top:14px;
    padding:14px;
    border-radius:14px;
    border:1px solid #dbeafe;
    background:#f8fafc;
    color:#475569;
    font-weight:700;
    line-height:1.55;
}
.module-file-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    margin-top:14px;
    padding:12px;
    border:1px solid #dbeafe;
    border-radius:14px;
    background:#f8fafc;
}
.module-file-preview-card{
    margin-top:14px;
    overflow:hidden;
    border:1px solid #dbeafe;
    border-radius:16px;
    background:#fff;
}
.module-file-preview-card .module-file-actions{
    margin-top:0;
    border:0;
    border-bottom:1px solid #dbeafe;
    border-radius:0;
}
.module-file-preview{
    display:block;
    width:100%;
    height:360px;
    border:0;
    background:#fff;
}
.module-file-actions strong{
    margin-right:auto;
    color:#1e293b;
    font-weight:900;
}
.module-file-current{
    display:block;
    margin-top:6px;
    color:#64748b;
    font-weight:800;
}
.module-meta,
.module-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:18px;
}
.module-empty-state{
    display:flex;
    flex-direction:column;
    gap:8px;
    align-items:flex-start;
    color:#64748b;
    font-weight:800;
}
.module-empty-state i{
    font-size:2rem;
    color:#2563eb;
}
.module-editor-card textarea{
    resize:vertical;
}
body.dark .student-module-hero p,
body.dark .module-updated,
body.dark .module-empty-state{
    color:#bfdbfe;
}
body.dark .module-kicker,
body.dark .module-subject{
    color:#7dd3fc;
}
body.dark .module-filter-form label{
    color:#dbeafe;
}
body.dark .module-filter-form .form-select{
    background-color:#0b1324;
    border-color:#334155;
    color:#f8fafc;
}
body.dark .module-chip-row span,
body.dark .module-meta span{
    background:#123055;
    color:#dbeafe;
}
body.dark .module-card p{
    color:#dbeafe;
}
body.dark .module-resources{
    background:#0b1324;
    border-color:#334155;
    color:#cbd5e1;
}
body.dark .module-file-actions{
    background:#0b1324;
    border-color:#334155;
}
body.dark .module-file-preview-card{
    background:#0b1324;
    border-color:#334155;
}
body.dark .module-file-preview-card .module-file-actions{
    border-bottom-color:#334155;
}
body.dark .module-file-actions strong{
    color:#e0f2fe;
}
body.dark .module-file-current{
    color:#bfdbfe;
}
body.dark .module-card{
    border-color:#334155!important;
}
body.dark .admin-module-row{
    background:#111827;
    border-color:#334155;
}
@media (max-width:991px){
    .module-grid{
        grid-template-columns:1fr;
    }
    .student-module-hero{
        padding-left:0;
        padding-top:88px;
    }
    .module-filter-form{
        grid-template-columns:1fr;
    }
    .module-file-preview{
        height:300px;
    }
}
@media (max-width:575px){
    .module-card-head{
        flex-direction:column;
    }
    .student-module-hero h2{
        font-size:1.5rem;
    }
}

/* Unique badge treatments: each badge type gets its own visual identity. */
.role-badge-super-admin{
    background:linear-gradient(135deg,#7f1d1d,#ef4444 52%,#f97316)!important;
    border:2px solid #fecaca!important;
    color:#fff!important;
    box-shadow:0 12px 28px rgba(220,38,38,.32)!important;
}
.role-badge-admin{
    background:linear-gradient(135deg,#0f172a,#2563eb 58%,#14b8a6)!important;
    border:2px solid #93c5fd!important;
    color:#eff6ff!important;
    box-shadow:0 12px 28px rgba(37,99,235,.28)!important;
}
.role-badge-teacher{
    background:linear-gradient(135deg,#064e3b,#0d9488 56%,#67e8f9)!important;
    border:2px solid #99f6e4!important;
    color:#ecfeff!important;
    box-shadow:0 12px 28px rgba(13,148,136,.28)!important;
}
.role-badge-student{
    background:linear-gradient(135deg,#1e3a8a,#3b82f6 58%,#dbeafe)!important;
    border:2px solid #bfdbfe!important;
    color:#ffffff!important;
    box-shadow:0 12px 28px rgba(59,130,246,.28)!important;
}
.role-badge-accountant{
    background:linear-gradient(135deg,#14532d,#22c55e 58%,#dcfce7)!important;
    border:2px solid #bbf7d0!important;
    color:#f0fdf4!important;
    box-shadow:0 12px 28px rgba(34,197,94,.26)!important;
}
.role-badge-staff{
    background:linear-gradient(135deg,#4c1d95,#8b5cf6 58%,#f5f3ff)!important;
    border:2px solid #ddd6fe!important;
    color:#ffffff!important;
    box-shadow:0 12px 28px rgba(139,92,246,.28)!important;
}
.role-badge-parent{
    background:linear-gradient(135deg,#7c2d12,#f97316 58%,#ffedd5)!important;
    border:2px solid #fed7aa!important;
    color:#fff7ed!important;
    box-shadow:0 12px 28px rgba(249,115,22,.26)!important;
}
.role-badge-user{
    background:linear-gradient(135deg,#334155,#64748b 58%,#f8fafc)!important;
    border:2px solid #cbd5e1!important;
    color:#ffffff!important;
    box-shadow:0 12px 28px rgba(100,116,139,.24)!important;
}
.teacher-kicker{
    border-radius:999px!important;
    background:linear-gradient(135deg,#ccfbf1,#f0fdfa)!important;
    border:1px dashed #14b8a6!important;
    color:#0f766e!important;
    box-shadow:0 10px 22px rgba(20,184,166,.14)!important;
}
.module-kicker{
    border-radius:12px!important;
    background:#eef2ff!important;
    border-left:5px solid #2563eb!important;
    color:#1d4ed8!important;
    box-shadow:none!important;
}
.module-subject{
    border-radius:8px!important;
    background:linear-gradient(90deg,#1d4ed8,#06b6d4)!important;
    color:#ffffff!important;
    border:0!important;
    padding:6px 10px!important;
    letter-spacing:.12em!important;
    box-shadow:0 10px 20px rgba(37,99,235,.18)!important;
}
.eims-points-badge{
    border-radius:18px!important;
    background:linear-gradient(135deg,#fff7ed,#ffffff)!important;
    border:1px solid #f59e0b!important;
    color:#111827!important;
    box-shadow:0 16px 34px rgba(245,158,11,.2)!important;
}
.admin-rank-badge{
    border-radius:14px!important;
    background:linear-gradient(135deg,#111827,#7c3aed)!important;
    border:1px solid #c4b5fd!important;
    color:#ffffff!important;
    box-shadow:0 16px 34px rgba(124,58,237,.24)!important;
}
.dashboard-inbox-icon-btn .badge{
    min-width:24px!important;
    height:24px!important;
    border-radius:50%!important;
    background:#ef4444!important;
    border:2px solid #fff!important;
    color:#fff!important;
    box-shadow:0 8px 18px rgba(239,68,68,.32)!important;
}
.badge.bg-primary{
    background:linear-gradient(135deg,#1d4ed8,#60a5fa)!important;
    border:1px solid #bfdbfe!important;
    color:#ffffff!important;
}
.badge.bg-success{
    background:linear-gradient(135deg,#15803d,#4ade80)!important;
    border:1px solid #bbf7d0!important;
    color:#ffffff!important;
}
.badge.bg-danger{
    background:linear-gradient(135deg,#b91c1c,#fb7185)!important;
    border:1px solid #fecdd3!important;
    color:#ffffff!important;
}
.badge.bg-warning{
    background:linear-gradient(135deg,#f59e0b,#fde68a)!important;
    border:1px solid #fef3c7!important;
    color:#78350f!important;
}
.badge.bg-info{
    background:linear-gradient(135deg,#0891b2,#a5f3fc)!important;
    border:1px solid #cffafe!important;
    color:#083344!important;
}
.badge.bg-secondary{
    background:linear-gradient(135deg,#475569,#cbd5e1)!important;
    border:1px solid #e2e8f0!important;
    color:#0f172a!important;
}
.badge.bg-dark{
    background:linear-gradient(135deg,#020617,#334155)!important;
    border:1px solid #64748b!important;
    color:#f8fafc!important;
}
.badge.bg-light{
    background:linear-gradient(135deg,#ffffff,#e0f2fe)!important;
    border:1px solid #bfdbfe!important;
    color:#0f172a!important;
}
.teacher-calendar-badge-class{
    background:#ecfdf5!important;
    border:1px solid #86efac!important;
    color:#166534!important;
}
.teacher-calendar-badge-notice{
    background:#eff6ff!important;
    border:1px solid #93c5fd!important;
    color:#1d4ed8!important;
}
.teacher-calendar-badge-saait{
    background:#fff7ed!important;
    border:1px solid #fdba74!important;
    color:#9a3412!important;
}
.teacher-calendar-badge-tithi{
    background:#fdf2f8!important;
    border:1px solid #f9a8d4!important;
    color:#9d174d!important;
}
.teacher-calendar-badge-more{
    background:#f8fafc!important;
    border:1px dashed #94a3b8!important;
    color:#334155!important;
}
body.dark .module-subject{
    background:linear-gradient(90deg,#2563eb,#22d3ee)!important;
    color:#ffffff!important;
}
body.dark .module-kicker{
    background:#172554!important;
    color:#bfdbfe!important;
    border-left-color:#60a5fa!important;
}
body.dark .teacher-kicker{
    background:#042f2e!important;
    border-color:#2dd4bf!important;
    color:#ccfbf1!important;
}

/* Keep the student dashboard role badge readable after unique badge overrides. */
.student-dashboard-header .dashboard-name-line .role-badge-student{
    background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;
    border:2px solid #93c5fd!important;
    color:#ffffff!important;
    box-shadow:0 14px 30px rgba(37,99,235,.28)!important;
}
.student-dashboard-header .dashboard-name-line .role-badge-student i{
    color:#ffffff!important;
    opacity:1!important;
}
body.dark .student-dashboard-header .dashboard-name-line .role-badge-student{
    background:linear-gradient(135deg,#1d4ed8,#0f172a)!important;
    border-color:#60a5fa!important;
    color:#dbeafe!important;
}
body.dark .student-dashboard-header .dashboard-name-line .role-badge-student i{
    color:#dbeafe!important;
}

/* Moodle-inspired course overview and course view */
.course-overview-shell{
    max-width:1320px;
    margin:0 auto 30px;
    padding:0 4px;
}
.course-overview-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:18px;
    margin-bottom:22px;
}
.course-overview-head h3{
    margin:0 0 14px;
    font-size:1.15rem;
    font-weight:700;
    color:#1f2937;
}
.course-overview-head nav{
    display:flex;
    gap:26px;
    border-bottom:1px solid #dbe5ef;
}
.course-overview-head nav a,
.course-overview-head nav span{
    padding:0 0 14px;
    color:#475569;
    font-size:.875rem;
    font-weight:600;
    text-decoration:none;
}
.course-overview-head nav .active{
    color:#00796b;
    border-bottom:3px solid #00796b;
}
.course-overview-tools{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}
.course-overview-tools button,
.course-overview-tools label{
    min-height:40px;
    border:1px solid #cbd5e1;
    background:#fff;
    border-radius:6px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    gap:10px;
    font-size:.875rem;
    color:#475569;
    font-weight:500;
}
.course-overview-tools input{
    border:0;
    outline:0;
    width:min(280px, 38vw);
    min-width:160px;
    font-weight:700;
}
.course-view-icon{
    color:#64748b;
    font-size:1.35rem;
}
.course-view-icon.active{
    color:#00796b;
}
.course-card-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,340px));
    gap:24px;
    align-items:start;
}
.moodle-course-card{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 18px 48px rgba(15,23,42,.09);
    width:100%;
}
.moodle-course-card.is-active{
    outline:3px solid rgba(0,121,107,.2);
}
.moodle-course-image{
    position:relative;
    height:178px;
    background:linear-gradient(135deg,#dbeafe,#ccfbf1);
    overflow:hidden;
}
.moodle-course-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}
.moodle-course-image.no-image{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#00796b;
    font-size:3.2rem;
}
.moodle-course-image.no-image i{
    opacity:.16;
}
.moodle-course-image span{
    position:absolute;
    right:14px;
    bottom:14px;
    padding:6px 10px;
    border-radius:6px;
    background:rgba(255,255,255,.92);
    color:#00796b;
    font-size:.82rem;
    line-height:1;
    font-weight:900;
}
.moodle-course-body{
    padding:18px 20px 20px;
}
.moodle-course-body h4{
    min-height:auto;
    margin:0 0 6px;
    color:#334155;
    font-size:.95rem;
    font-weight:700;
    line-height:1.35;
}
.moodle-course-body p{
    min-height:auto;
    margin:0 0 12px;
    color:#64748b;
    font-size:.85rem;
    font-weight:400;
    line-height:1.45;
}
.moodle-course-teacher{
    display:flex;
    align-items:center;
    gap:9px;
    color:#64748b;
    margin-bottom:16px;
}
.moodle-course-teacher span{
    width:28px;
    height:28px;
    border-radius:50%;
    background:#e2e8f0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#00796b;
}
.moodle-course-teacher em{
    width:28px;
    height:28px;
    border-radius:50%;
    background:#e2e8f0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-style:normal;
    font-weight:900;
}
.moodle-course-progress small{
    display:block;
    font-size:.78rem;
    color:#64748b;
    font-weight:500;
    margin-bottom:8px;
}
.moodle-course-progress div{
    height:7px;
    border-radius:999px;
    background:#e5e7eb;
    overflow:hidden;
}
.moodle-course-progress div span{
    display:block;
    height:100%;
    background:#22c55e;
}
.moodle-course-progress strong{
    display:block;
    margin:10px 0 18px;
    color:#475569;
}
.moodle-course-card .btn{
    float:right;
    border-color:#00796b;
    color:#00796b;
    font-weight:850;
}
.moodle-course-card .btn:hover{
    background:#00796b;
    color:#fff;
}
.moodle-course-view{
    display:grid;
    grid-template-columns:300px minmax(0,1fr);
    gap:28px;
    max-width:1320px;
    margin:0 auto;
}
.moodle-course-menu{
    position:sticky;
    top:20px;
    align-self:start;
    max-height:calc(100vh - 40px);
    overflow:auto;
    padding:18px;
    background:#fff;
    border:1px solid #dbe5ef;
    border-radius:10px;
    box-shadow:0 14px 34px rgba(15,23,42,.07);
}
.moodle-course-menu h4{
    margin:0 0 20px;
    color:#334155;
    font-weight:900;
}
.moodle-menu-section{
    border:1px solid #b7d7d2;
    border-radius:8px;
    overflow:hidden;
    margin-bottom:10px;
}
.moodle-menu-section button{
    width:100%;
    border:0;
    background:#e4f1ef;
    padding:14px 16px;
    display:flex;
    justify-content:space-between;
    color:#64748b;
    font-weight:900;
}
.moodle-menu-section a,
.moodle-menu-activity{
    display:block;
    padding:10px 16px 10px 28px;
    color:#4b5563;
    text-decoration:none;
    font-weight:650;
}
.moodle-menu-section a{
    display:flex;
    align-items:center;
    gap:9px;
}
.moodle-menu-label{
    margin:16px 0 8px;
    color:#64748b;
    font-size:.78rem;
    font-weight:950;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.moodle-menu-activity{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    border-radius:8px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.moodle-menu-activity:hover{
    background:#f1f5f9;
    color:#00796b;
}
.moodle-menu-activity i{
    color:#64748b;
}
.moodle-course-content{
    min-width:0;
}
.moodle-course-banner{
    min-height:250px;
    border-radius:8px;
    overflow:hidden;
    background:linear-gradient(135deg,#020617,#0f172a);
    color:#fff;
    position:relative;
    margin-bottom:26px;
    display:flex;
    align-items:flex-end;
    padding:30px;
}
.moodle-course-banner img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    opacity:.45;
}
.moodle-course-banner div{
    position:relative;
    z-index:1;
}
.moodle-course-banner span{
    display:inline-flex;
    background:#ecfdf5;
    color:#16a34a;
    border-radius:6px;
    padding:6px 9px;
    font-weight:900;
    margin-bottom:10px;
}
.moodle-course-banner h3{
    margin:0 0 8px;
    color:#fff;
    font-weight:950;
}
.moodle-course-banner p{
    color:#e5e7eb;
    margin:0;
}
.moodle-module-section{
    position:relative;
    margin-bottom:22px;
    padding:28px 72px 28px 28px;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:8px;
}
.moodle-section-arrow{
    position:absolute;
    top:28px;
    right:28px;
    color:#00796b;
    font-size:1.35rem;
}
body.dark .course-overview-head h3,
body.dark .moodle-course-body h4,
body.dark .moodle-course-menu h4{
    color:#f8fafc;
}
body.dark .course-overview-tools button,
body.dark .course-overview-tools label,
body.dark .moodle-course-card,
body.dark .moodle-course-menu,
body.dark .moodle-module-section{
    background:#111827;
    border-color:#334155;
}
body.dark .course-overview-tools input{
    background:transparent;
    color:#f8fafc;
}
body.dark .moodle-course-body p,
body.dark .moodle-course-progress small,
body.dark .moodle-course-progress strong,
body.dark .moodle-menu-section a,
body.dark .moodle-menu-activity{
    color:#cbd5e1;
}
body.dark .moodle-menu-section button{
    background:#0f1b2d;
    color:#dbeafe;
}
body.dark .moodle-menu-activity:hover{
    background:#0f1b2d;
    color:#7dd3fc;
}
.module-quick-guide{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin-bottom:16px;
}
.module-quick-guide span{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:38px;
    border-radius:12px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:.82rem;
    font-weight:900;
}
.module-course-tag{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin-top:8px;
    padding:6px 10px;
    border-radius:999px;
    background:#ecfdf5;
    color:#047857;
    font-weight:850;
}
body.dark .module-quick-guide span{
    background:#172554;
    color:#bfdbfe;
}
body.dark .module-course-tag{
    background:#064e3b;
    color:#bbf7d0;
}

/* Calendar refinements: compact day data, readable details, and dark-mode contrast. */
.bs-calendar-table td.student-calendar-day,
.bs-calendar-table td.teacher-calendar-has-event,
.bs-calendar-table td.bs-day-cell{
    min-height:104px;
    height:104px;
}
.student-calendar-chip-row{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
    margin-top:6px;
}
.student-calendar-chip{
    display:inline-flex;
    align-items:center;
    max-width:100%;
    border-radius:999px;
    padding:3px 7px;
    font-size:.68rem;
    line-height:1.15;
    font-weight:850;
    border:1px solid transparent;
    white-space:nowrap;
}
.student-calendar-chip-present{
    background:#dcfce7;
    border-color:#86efac;
    color:#166534;
}
.student-calendar-chip-absent{
    background:#fee2e2;
    border-color:#fca5a5;
    color:#991b1b;
}
.student-calendar-chip-late{
    background:#ede9fe;
    border-color:#a78bfa;
    color:#5b21b6;
}
.student-calendar-chip-open{
    background:#ffedd5;
    border-color:#fb923c;
    color:#9a3412;
}
.student-calendar-chip-missed{
    background:#fef2f2;
    border-color:#f87171;
    color:#b91c1c;
}
.student-calendar-chip-upcoming{
    background:#e0f2fe;
    border-color:#7dd3fc;
    color:#075985;
}
.student-calendar-chip-class{
    background:#dbeafe;
    border-color:#93c5fd;
    color:#1d4ed8;
}
.student-calendar-chip-event{
    background:#fef3c7;
    border-color:#fbbf24;
    color:#92400e;
}
.student-calendar-chip-tithi{
    background:#f5f3ff;
    border-color:#c4b5fd;
    color:#5b21b6;
}
.student-calendar-detail-panel{
    border:1px solid #dbe5ef;
    border-radius:16px;
    background:#fff;
    padding:16px;
    box-shadow:0 10px 28px rgba(15,23,42,.05);
}
.student-attendance-summary-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:10px;
}
.student-attendance-summary-card{
    border:1px solid #dbe5ef;
    border-radius:14px;
    background:#fff;
    padding:12px;
    min-height:98px;
    box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.student-attendance-summary-card span,
.student-attendance-summary-card small{
    display:block;
    color:#64748b;
    font-weight:800;
}
.student-attendance-summary-card strong{
    display:block;
    margin:4px 0;
    color:#0f172a;
    font-size:1.55rem;
    font-weight:950;
}
.student-attendance-summary-card.is-total{
    border-color:#93c5fd;
    background:#eff6ff;
}
.student-attendance-summary-card.is-present{
    border-color:#86efac;
    background:#f0fdf4;
}
.student-attendance-summary-card.is-late{
    border-color:#facc15;
    background:#fefce8;
}
.student-attendance-summary-card.is-absent{
    border-color:#fca5a5;
    background:#fef2f2;
}
.student-attendance-summary-card.is-rate{
    border-color:#99f6e4;
    background:#f0fdfa;
}
.student-yearly-attendance-table .table{
    background:#fff;
}
.student-calendar-detail-item{
    border:1px solid #e2e8f0;
    border-radius:14px;
    background:#f8fafc;
    padding:12px;
    margin:8px 0 10px;
}
.student-calendar-detail-item strong,
.student-calendar-detail-item span,
.student-calendar-detail-item time,
.student-calendar-detail-item small{
    display:block;
}
.student-calendar-detail-item strong{
    color:#0f172a;
    font-weight:900;
}
.student-calendar-detail-item span,
.student-calendar-detail-item small{
    color:#64748b;
}
.student-calendar-detail-item time{
    margin-top:4px;
    color:#0f766e;
    font-weight:900;
}
.student-calendar-event-item{
    background:#fff7ed;
    border-color:#fed7aa;
}
.bs-calendar-table td.table-primary .student-calendar-chip,
.bs-calendar-table td.table-success .student-calendar-chip{
    background:rgba(255,255,255,.94);
    border-color:rgba(255,255,255,.55);
    color:#0f172a;
}
body.dark .bs-calendar-table,
body.dark .bs-calendar-table th,
body.dark .bs-calendar-table td{
    border-color:#334155!important;
}
body.dark .bs-calendar-table th{
    background:#0f172a!important;
    color:#e5e7eb!important;
}
body.dark .bs-calendar-table td{
    background:#111827!important;
    color:#e5e7eb!important;
}
body.dark .bs-calendar-table td.student-calendar-day:hover,
body.dark .bs-calendar-table td.teacher-calendar-has-event:hover{
    background:#162235!important;
}
body.dark .bs-day-number,
body.dark .bs-day-status,
body.dark .student-calendar-day .small,
body.dark .teacher-calendar-has-event .small{
    color:#f8fafc!important;
}
body.dark .bs-calendar-table td.table-primary{
    background:#1d4ed8!important;
    color:#fff!important;
}
body.dark .bs-calendar-table td.table-success{
    background:#047857!important;
    color:#fff!important;
}
body.dark .bs-calendar-table td.bs-present{
    background:#052e1b!important;
    border-color:#15803d!important;
}
body.dark .bs-calendar-table td.bs-absent,
body.dark .bs-calendar-table td.bs-public-holiday{
    background:#3f1216!important;
    border-color:#b91c1c!important;
    color:#fecaca!important;
}
body.dark .bs-calendar-table td.bs-attendance-open{
    background:#431407!important;
    border-color:#fb923c!important;
    color:#fed7aa!important;
}
body.dark .bs-calendar-table td.bs-attendance-late{
    background:#2e1065!important;
    border-color:#a78bfa!important;
    color:#ede9fe!important;
}
body.dark .bs-calendar-table td.bs-attendance-missed{
    background:#3f1216!important;
    border-color:#f87171!important;
    color:#fecaca!important;
}
body.dark .bs-calendar-table td.bs-public-holiday .bs-day-number,
body.dark .bs-calendar-table td.bs-public-holiday .small{
    color:#fecaca!important;
}
body.dark .student-calendar-chip-present{
    background:#14532d;
    border-color:#22c55e;
    color:#dcfce7;
}
body.dark .student-calendar-chip-absent{
    background:#7f1d1d;
    border-color:#f87171;
    color:#fee2e2;
}
body.dark .student-calendar-chip-late{
    background:#4c1d95;
    border-color:#c4b5fd;
    color:#f5f3ff;
}
body.dark .student-calendar-chip-open{
    background:#7c2d12;
    border-color:#fb923c;
    color:#ffedd5;
}
body.dark .student-calendar-chip-missed{
    background:#7f1d1d;
    border-color:#fb7185;
    color:#ffe4e6;
}
body.dark .student-calendar-chip-upcoming{
    background:#0c4a6e;
    border-color:#38bdf8;
    color:#e0f2fe;
}
body.dark .student-calendar-chip-class{
    background:#172554;
    border-color:#60a5fa;
    color:#dbeafe;
}
body.dark .student-calendar-chip-event{
    background:#451a03;
    border-color:#f59e0b;
    color:#fde68a;
}
body.dark .student-calendar-chip-tithi{
    background:#312e81;
    border-color:#a78bfa;
    color:#ede9fe;
}
body.dark .student-calendar-detail-panel,
body.dark .teacher-calendar-detail-panel{
    background:#0f172a!important;
    border-color:#334155!important;
    color:#e5e7eb!important;
}
body.dark .student-attendance-summary-card{
    background:#0f172a;
    border-color:#334155;
}
body.dark .student-attendance-summary-card strong{
    color:#f8fafc;
}
body.dark .student-attendance-summary-card span,
body.dark .student-attendance-summary-card small{
    color:#cbd5e1;
}
body.dark .student-attendance-summary-card.is-total{
    background:#172554;
    border-color:#2563eb;
}
body.dark .student-attendance-summary-card.is-present{
    background:#052e1b;
    border-color:#16a34a;
}
body.dark .student-attendance-summary-card.is-late{
    background:#422006;
    border-color:#eab308;
}
body.dark .student-attendance-summary-card.is-absent{
    background:#3f1216;
    border-color:#dc2626;
}
body.dark .student-attendance-summary-card.is-rate{
    background:#042f2e;
    border-color:#14b8a6;
}
body.dark .student-calendar-detail-panel strong,
body.dark .teacher-calendar-detail-panel strong,
body.dark .student-calendar-detail-panel h6,
body.dark .teacher-calendar-detail-panel h6{
    color:#f8fafc!important;
}
body.dark .student-calendar-detail-item,
body.dark .teacher-calendar-detail-item{
    background:#111827!important;
    border-color:#334155!important;
}
body.dark .student-calendar-detail-item strong,
body.dark .teacher-calendar-detail-item strong{
    color:#f8fafc!important;
}
body.dark .student-calendar-detail-item span,
body.dark .student-calendar-detail-item small,
body.dark .teacher-calendar-detail-item span,
body.dark .teacher-calendar-detail-item small{
    color:#cbd5e1!important;
}
body.dark .student-calendar-detail-item time,
body.dark .teacher-calendar-detail-item time{
    color:#5eead4!important;
}
.bs-calendar-table td.bs-today{
    background:#d1fae5!important;
    border:2px solid #10b981!important;
    box-shadow:inset 0 0 0 2px rgba(16,185,129,.28);
    color:#064e3b!important;
}
.bs-calendar-table td.bs-today .bs-day-number{
    color:#064e3b!important;
}
body.dark .bs-calendar-table td.bs-today,
body.dark #attendance .bs-calendar-table td.bs-today{
    background:linear-gradient(135deg,#064e3b,#115e59)!important;
    border:2px solid #5eead4!important;
    box-shadow:inset 0 0 0 2px rgba(94,234,212,.28),0 0 0 1px rgba(94,234,212,.45),0 14px 30px rgba(20,184,166,.2)!important;
    color:#ecfeff!important;
}
body.dark .bs-calendar-table td.bs-today .bs-day-number,
body.dark .bs-calendar-table td.bs-today .small,
body.dark #attendance .bs-calendar-table td.bs-today .bs-day-number,
body.dark #attendance .bs-calendar-table td.bs-today .small{
    color:#ecfeff!important;
}
body.dark .bs-calendar-table td.bs-today .student-calendar-chip{
    background:rgba(15,23,42,.74)!important;
    border-color:rgba(190,242,100,.72)!important;
    color:#f8fafc!important;
}
@media (max-width:1100px){
    .course-card-grid{
        grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    }
    .moodle-course-view{
        grid-template-columns:1fr;
    }
    .moodle-course-menu{
        position:relative;
        top:auto;
        max-height:none;
        border-right:0;
        border:1px solid #dbe5ef;
        border-radius:8px;
    }
}
@media (max-width:767px){
    .student-attendance-summary-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .course-overview-head{
        align-items:flex-start;
        flex-direction:column;
    }
    .course-card-grid{
        grid-template-columns:1fr;
    }
    .course-overview-tools input{
        width:100%;
    }
    .course-overview-tools button,
    .course-overview-tools label{
        width:100%;
    }
    .module-quick-guide{
        grid-template-columns:1fr;
    }
    .moodle-module-section{
        padding:22px;
    }
    .moodle-section-arrow{
        position:static;
        float:right;
    }
}

/* Mobile shell and call polish */
html,
body{
    max-width:100%;
    overflow-x:hidden;
}
.app-shell,
.main{
    min-width:0;
}
.topbar,
.card,
.card-premium,
.table-responsive{
    max-width:100%;
}
@media (max-width:991px){
    body.sidebar-open{
        overflow:hidden;
    }
    .app-shell{
        display:block;
        width:100%;
        overflow-x:hidden;
    }
    .sidebar{
        width:min(82vw,320px);
        max-width:320px;
        z-index:1060;
    }
    body.sidebar-open .mobile-backdrop{
        z-index:1050;
    }
    .main{
        width:100%;
        max-width:100vw;
        padding:12px;
    }
    .topbar{
        display:grid;
        grid-template-columns:1fr;
        align-items:start;
        gap:12px;
        padding:12px;
        border-radius:18px;
        overflow:hidden;
    }
    .topbar > .d-flex{
        width:100%;
        min-width:0;
        flex-wrap:wrap;
    }
    .topbar > .d-flex:first-child{
        align-items:flex-start!important;
    }
    .topbar > .d-flex:last-child{
        justify-content:flex-start!important;
        gap:10px!important;
    }
    .topbar h4{
        font-size:1.35rem;
        line-height:1.12;
        overflow-wrap:anywhere;
    }
    .topbar small{
        font-size:.88rem;
        line-height:1.25;
    }
    .topbar form,
    .topbar .admin-search-form,
    .topbar .global-search-form{
        order:3;
        width:100%!important;
        min-width:0;
    }
    .topbar input[type="search"],
    .topbar .form-control{
        width:100%;
        min-width:0;
    }
    .admin-topbar-notifications{
        flex:0 0 auto;
    }
    .role-badge,
    .admin-role-badge{
        max-width:calc(100vw - 104px);
        white-space:nowrap;
    }
    .table-responsive{
        width:100%;
        overflow-x:auto;
    }
}
@media (max-width:576px){
    .main{
        padding:10px;
    }
    .sidebar{
        width:min(88vw,300px);
    }
    .brand-row{
        padding:16px 14px;
    }
    .topbar .btn,
    .topbar .role-badge,
    .topbar .admin-role-badge{
        min-height:44px;
    }
    .admin-stat-grid,
    .theme-grid,
    .summary-card-setting-grid,
    .student-attendance-summary-grid{
        grid-template-columns:1fr!important;
    }
}
.inbox-call-overlay{
    z-index:9999;
    padding:16px;
    background:rgba(2,6,23,.55);
}
.inbox-call-card{
    width:min(760px,100%);
    max-height:calc(100dvh - 32px);
    display:flex;
    flex-direction:column;
    overflow:auto;
    border-radius:24px;
}
.inbox-call-videos{
    position:relative;
    display:grid;
    grid-template-columns:1fr;
    gap:0;
    min-height:360px;
    border-radius:20px;
    overflow:hidden;
    background:#020617;
}
.inbox-call-videos video{
    box-shadow:none;
}
#inboxRemoteVideo{
    width:100%;
    height:100%;
    min-height:360px;
    object-fit:cover;
    background:#020617;
}
#inboxLocalVideo{
    position:absolute;
    right:16px;
    bottom:16px;
    width:160px;
    max-width:32%;
    aspect-ratio:9/16;
    height:auto;
    object-fit:cover;
    border:3px solid rgba(255,255,255,.86);
    border-radius:18px;
    box-shadow:0 18px 40px rgba(0,0,0,.35);
}
.inbox-call-controls{
    justify-content:center;
    align-items:center;
}
.inbox-call-controls .btn{
    min-width:0;
    min-height:52px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:0 18px;
}
@media (max-width:767px){
    .inbox-call-overlay{
        padding:0;
        align-items:stretch;
    }
    .inbox-call-card{
        width:100%;
        height:100dvh;
        max-height:100dvh;
        border-radius:0;
    }
    .inbox-call-header{
        padding:14px 16px;
    }
    .inbox-call-videos{
        flex:1;
        min-height:0;
        border-radius:0;
    }
    #inboxRemoteVideo{
        height:100%;
        min-height:0;
    }
    #inboxLocalVideo{
        width:108px;
        right:12px;
        bottom:88px;
        border-radius:16px;
    }
    .inbox-call-device-row{
        padding:10px 12px;
    }
    .inbox-call-device-row .form-select{
        max-width:none!important;
        width:100%;
    }
    .inbox-call-controls{
        position:sticky;
        bottom:0;
        padding:12px;
        background:linear-gradient(180deg,rgba(15,23,42,.78),#0f172a);
    }
    .inbox-call-controls .btn{
        width:auto;
        min-width:52px;
        padding:0 14px;
    }
    .inbox-call-controls .btn i{
        margin:0;
    }
}

/* Shared scroll reveal */
.scroll-animate{
    opacity:0;
    transform:translate3d(0,22px,0) scale(.985);
    transition:
        opacity .62s ease,
        transform .62s cubic-bezier(.2,.8,.2,1),
        box-shadow .62s ease;
    transition-delay:var(--scroll-delay,0ms);
    will-change:opacity,transform;
}
.scroll-animate.is-visible{
    opacity:1;
    transform:translate3d(0,0,0) scale(1);
}
.scroll-animate:nth-child(2n){
    transform:translate3d(0,18px,0) scale(.99);
}
.scroll-animate:nth-child(2n).is-visible{
    transform:translate3d(0,0,0) scale(1);
}
@media (prefers-reduced-motion:reduce){
    .scroll-animate,
    .scroll-animate:nth-child(2n){
        opacity:1!important;
        transform:none!important;
        transition:none!important;
    }
}

/* Payslips */
.payslip-page-head{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:18px;
}
.payslip-page-head h2{
    margin:6px 0 4px;
    color:#0f172a;
    font-weight:950;
}
.payslip-stack{
    display:grid;
    gap:22px;
}
.payslip-card{
    overflow:hidden;
    border:1px solid #dbe5ef;
    border-radius:18px;
    background:#fff;
    box-shadow:0 20px 50px rgba(15,23,42,.08);
}
.payslip-header{
    display:flex;
    justify-content:space-between;
    gap:16px;
    padding:24px;
    background:linear-gradient(135deg,#0f172a,#0f766e);
    color:#fff;
}
.payslip-header h3{
    margin:0 0 6px;
    font-weight:950;
    color:#fff;
}
.payslip-header p,
.payslip-total span{
    margin:0;
    color:#dbeafe;
    font-weight:800;
}
.payslip-total{
    text-align:right;
}
.payslip-total strong{
    display:block;
    margin-top:4px;
    font-size:1.8rem;
    line-height:1;
}
.payslip-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:0;
    padding:18px 24px;
}
.payslip-grid p{
    margin:0;
    padding:12px 14px;
    border-bottom:1px solid #e2e8f0;
}
.payslip-grid b,
.payslip-grid span{
    display:block;
}
.payslip-grid b{
    color:#64748b;
    font-size:.78rem;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.payslip-grid span{
    margin-top:4px;
    color:#0f172a;
    font-weight:850;
}
.payslip-table{
    margin:0;
}
.payslip-table th,
.payslip-table td{
    padding:14px 24px;
}
.payslip-net-row td{
    background:#ecfdf5;
    color:#065f46;
    font-size:1.05rem;
    font-weight:950;
}
.payslip-remarks{
    margin:0;
    padding:18px 24px 22px;
    color:#475569;
}
body.dark .payslip-page-head h2{
    color:#f8fafc;
}
body.dark .payslip-card{
    background:#0f172a;
    border-color:#334155;
}
body.dark .payslip-grid p{
    border-color:#334155;
}
body.dark .payslip-grid b,
body.dark .payslip-remarks{
    color:#cbd5e1;
}
body.dark .payslip-grid span{
    color:#f8fafc;
}
body.dark .payslip-net-row td{
    background:#064e3b;
    color:#dcfce7;
}
@media (max-width:767px){
    .payslip-page-head,
    .payslip-header{
        align-items:flex-start;
        flex-direction:column;
    }
    .payslip-total{
        text-align:left;
    }
    .payslip-grid{
        grid-template-columns:1fr;
        padding:12px 16px;
    }
    .payslip-table th,
    .payslip-table td{
        padding:12px 16px;
    }
}
@media print{
    .payslip-card{
        break-inside:avoid;
        box-shadow:none;
    }
    .payslip-page-head,
    .no-print{
        display:none !important;
    }
    body{background:#fff !important}
}

/* ── Star picker widget ──────────────────────────── */
.star-picker-wrap{ display:flex; flex-direction:column; gap:4px; }
.star-picker{ display:flex; gap:2px; align-items:center; }
.sp-btn{
    background:none; border:none; font-size:2rem; color:#cbd5e1;
    cursor:pointer; padding:0 2px; line-height:1;
    transition:color .12s,transform .1s;
}
.sp-btn.on{ color:#f59e0b; }
.sp-btn:hover{ transform:scale(1.18); }
.sp-label{ font-size:.82rem; font-weight:600; }
.star-empty{ color:#cbd5e1; letter-spacing:2px; }

/* ── Courses page ────────────────────────────────── */
.public-hero-mini{
    padding:80px 0 50px;
    background:linear-gradient(135deg,var(--public-primary,#2563eb) 0%,var(--public-secondary,#10b981) 100%);
    color:#fff;
    text-align:center;
}
.public-hero-mini h1{ color:#fff; font-size:clamp(2rem,5vw,3.6rem); font-weight:950; letter-spacing:-.05em; }
.public-hero-mini p{ color:rgba(255,255,255,.85); font-size:1.1rem; margin:0; }
.course-card{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 18px 50px rgba(15,23,42,.08);
    transition:.25s ease;
}
.course-card:hover{ transform:translateY(-6px); box-shadow:0 28px 70px rgba(15,23,42,.12); }
.course-img-placeholder{
    width:100%; height:200px; background:linear-gradient(135deg,#dbeafe,#dcfce7);
    display:grid; place-items:center; font-size:3rem; color:#2563eb;
}
.course-card-body{ padding:20px; }
.course-card-body h5{ font-size:1.1rem; font-weight:900; margin-bottom:8px; color:#0f172a; }
.course-meta{ font-size:.88rem; color:#64748b; margin-bottom:4px; }
.course-meta i{ margin-right:4px; }
.course-desc{ font-size:.88rem; color:#475569; margin-top:8px; }
.course-avg-rating{ display:flex; align-items:center; gap:8px; margin-top:10px; }
.course-avg-rating small{ font-size:.82rem; color:#64748b; }
.course-reviews-block{ padding:32px; background:#f8fafc; border-radius:24px; border:1px solid #e2e8f0; }
body.dark .course-card{ background:#0f172a; border-color:#334155; }
body.dark .course-card-body h5{ color:#f8fafc; }
body.dark .course-reviews-block{ background:#1e293b; border-color:#334155; }

/* ── Payslip brand header ────────────────────────── */
.payslip-brand{
    display:flex;
    align-items:center;
    gap:18px;
    padding:20px 28px;
    background:linear-gradient(135deg,#f8fafc,#eff6ff);
    border-bottom:3px solid #2563eb;
}
.payslip-logo{
    max-height:64px;
    max-width:140px;
    object-fit:contain;
    flex-shrink:0;
}
.payslip-brand-info{
    flex:1;
    display:flex;
    flex-direction:column;
    gap:3px;
}
.payslip-brand-info strong{
    font-size:1.15rem;
    font-weight:950;
    color:#0f172a;
}
.payslip-brand-info > span{
    font-size:.82rem;
    color:#475569;
}
.payslip-brand-contacts{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
}
.payslip-brand-contacts span{
    font-size:.8rem;
    color:#64748b;
}
.payslip-brand-contacts i{ margin-right:3px; color:#2563eb; }
.payslip-brand-badge{
    font-size:.72rem;
    font-weight:900;
    letter-spacing:.18em;
    color:#fff;
    background:linear-gradient(135deg,#2563eb,#0ea5e9);
    padding:6px 14px;
    border-radius:8px;
    flex-shrink:0;
}
/* Payslip footer */
.payslip-footer{
    padding:22px 28px 26px;
    border-top:1px solid #e2e8f0;
}
.payslip-sign-row{
    display:flex;
    gap:48px;
    margin-bottom:16px;
}
.payslip-sign-box{
    flex:1;
    text-align:center;
}
.payslip-sign-box hr{
    border-top:1px solid #94a3b8;
    margin:0 0 6px;
}
.payslip-sign-box span{
    font-size:.78rem;
    color:#64748b;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.payslip-disclaimer{
    margin:0;
    text-align:center;
    font-size:.76rem;
    color:#94a3b8;
}
body.dark .payslip-brand{
    background:linear-gradient(135deg,#0f172a,#1e293b);
    border-color:#2563eb;
}
body.dark .payslip-brand-info strong{ color:#f8fafc; }
body.dark .payslip-brand-info > span,
body.dark .payslip-brand-contacts span{ color:#94a3b8; }
body.dark .payslip-footer{ border-color:#334155; }
@media(max-width:767px){
    .payslip-brand{ flex-direction:column; align-items:flex-start; gap:12px; }
    .payslip-sign-row{ flex-direction:column; gap:18px; }
}
@media print{
    .payslip-brand{ background:#fff !important; border-color:#000; }
    .payslip-brand-badge{ background:#000 !important; color:#fff !important; }
}

/* =========================================================
   EIMS UNIVERSAL DASHBOARD SYSTEM v2
   Responsive: sidebar (desktop) + mobile app layout
   ========================================================= */
.eims-layout-student{--ea:#0ea5e9;--ea-muted:rgba(14,165,233,.13);--ea-text:#7dd3fc;}
.eims-layout-teacher{--ea:#818cf8;--ea-muted:rgba(129,140,248,.14);--ea-text:#a5b4fc;}
.eims-layout-staff{--ea:#f59e0b;--ea-muted:rgba(245,158,11,.13);--ea-text:#fcd34d;}
.eims-layout-parent{--ea:#10b981;--ea-muted:rgba(16,185,129,.13);--ea-text:#6ee7b7;}
.eims-dash-layout{display:flex;min-height:100vh;background:var(--body-bg,#f1f5f9);}
body.dark .eims-dash-layout{background:#0c1220;}
.eims-dash-sidebar{width:240px;flex-shrink:0;background:linear-gradient(180deg,#0e1a2e 0%,#0b1525 100%);color:#e2e8f0;display:flex;flex-direction:column;position:fixed;top:0;left:0;height:100vh;overflow-y:auto;overflow-x:hidden;z-index:1040;transition:transform .3s ease;border-right:1px solid rgba(255,255,255,.05);}
body.dark .eims-dash-sidebar{background:linear-gradient(180deg,#05090f 0%,#040810 100%);}
.eims-sidebar-brand{display:flex;align-items:center;gap:10px;padding:16px;border-bottom:1px solid rgba(255,255,255,.07);text-decoration:none;}
.eims-sidebar-brand img{width:34px;height:34px;border-radius:10px;object-fit:contain;flex-shrink:0;}
.eims-sidebar-brand-text{font-size:.95rem;font-weight:800;color:#f1f5f9;white-space:nowrap;letter-spacing:-.15px;}
.eims-sidebar-brand-text strong{color:var(--ea,#38bdf8);}
.eims-sidebar-nav{flex:1;padding:8px;overflow-y:auto;scrollbar-width:none;}
.eims-sidebar-nav::-webkit-scrollbar{display:none;}
.eims-nav-section{font-size:.58rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:rgba(255,255,255,.22);padding:11px 8px 4px;display:flex;align-items:center;gap:6px;}
.eims-nav-section::after{content:'';flex:1;height:1px;background:rgba(255,255,255,.07);}
.eims-nav-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;color:rgba(255,255,255,.5);text-decoration:none;font-size:.83rem;font-weight:500;transition:all .13s ease;cursor:pointer;border:0;background:0;width:100%;text-align:left;position:relative;overflow:hidden;}
.eims-nav-item i{font-size:.92rem;width:18px;flex-shrink:0;transition:transform .13s;}
.eims-nav-item:hover{background:rgba(255,255,255,.07);color:rgba(255,255,255,.9);text-decoration:none;}
.eims-nav-item:hover i{transform:scale(1.1);}
.eims-nav-item.active{background:var(--ea-muted,rgba(59,130,246,.13));color:var(--ea-text,#93c5fd);font-weight:600;}
.eims-nav-item.active i{color:var(--ea-text,#93c5fd);}
.eims-nav-item.active::before{content:'';position:absolute;left:0;top:22%;height:56%;width:3px;background:var(--ea,#3b82f6);border-radius:0 3px 3px 0;}
.eims-nav-badge{margin-left:auto;background:#ef4444;color:#fff;font-size:.6rem;font-weight:700;min-width:17px;height:17px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;padding:0 4px;}
.eims-sidebar-footer{padding:8px;border-top:1px solid rgba(255,255,255,.07);}
.eims-nav-logout{color:rgba(252,165,165,.6) !important;}
.eims-nav-logout:hover{background:rgba(239,68,68,.12) !important;color:#f87171 !important;}
.eims-dash-main{flex:1;margin-left:240px;display:flex;flex-direction:column;min-height:100vh;}
.eims-dash-header{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid #e2e8f0;padding:0 18px;height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;}
body.dark .eims-dash-header{background:#1e293b;border-color:#334155;}
.eims-header-left{display:flex;align-items:center;gap:10px;min-width:0;}
.eims-hamburger{display:none;background:0;border:0;width:36px;height:36px;border-radius:8px;font-size:1.25rem;color:#475569;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;}
.eims-header-title{font-size:1rem;font-weight:700;color:#0f172a;margin:0;line-height:1.2;}
body.dark .eims-header-title{color:#f1f5f9;}
.eims-header-sub{font-size:.72rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px;}
.eims-header-right{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.eims-search-wrap{position:relative;display:none;}
.eims-search-wrap input{width:190px;padding:7px 12px 7px 32px;border:1px solid #e2e8f0;border-radius:999px;font-size:.8rem;background:#f8fafc;color:#0f172a;outline:0;transition:width .2s;color-scheme:light;}
body.dark .eims-search-wrap input{background:#0f172a;border-color:#334155;color:#f1f5f9;color-scheme:dark;}
.eims-search-wrap i{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:#94a3b8;font-size:.8rem;}
.eims-user-chip{display:flex;align-items:center;gap:7px;cursor:pointer;padding:4px 8px;border-radius:999px;transition:background .15s;}
.eims-user-chip:hover{background:#f1f5f9;}
body.dark .eims-user-chip:hover{background:#334155;}
.eims-user-avatar{width:32px;height:32px;border-radius:999px;object-fit:cover;flex-shrink:0;}
.eims-user-name{font-size:.8rem;font-weight:600;color:#0f172a;display:block;line-height:1.2;}
body.dark .eims-user-name{color:#f1f5f9;}
.eims-user-role{font-size:.68rem;color:#64748b;display:block;}
.eims-dash-body{flex:1;padding:18px;}
/* Welcome banner */
.eims-welcome-banner{background:linear-gradient(135deg,#3b82f6 0%,#6366f1 100%);border-radius:16px;padding:18px 20px;display:flex;align-items:center;gap:14px;color:#fff;margin-bottom:14px;}
.eims-welcome-banner.teal{background:linear-gradient(135deg,#0d9488,#0891b2);}
.eims-welcome-banner.green{background:linear-gradient(135deg,#16a34a,#059669);}
.eims-welcome-banner.orange{background:linear-gradient(135deg,#ea580c,#d97706);}
.eims-welcome-photo{width:66px;height:66px;border-radius:999px;object-fit:cover;border:3px solid rgba(255,255,255,.4);flex-shrink:0;}
.eims-welcome-photo-label{cursor:pointer;position:relative;display:inline-block;}
.eims-welcome-photo-label .eims-photo-cam{position:absolute;bottom:0;right:0;width:20px;height:20px;border-radius:999px;background:#fff;color:#3b82f6;display:flex;align-items:center;justify-content:center;font-size:.6rem;box-shadow:0 1px 4px rgba(0,0,0,.2);}
.eims-welcome-info h4,.eims-welcome-info h3{color:#fff;margin:0 0 2px;font-weight:700;}
.eims-welcome-sub{opacity:.85;font-size:.76rem;margin:0;}
.eims-role-pill{display:inline-flex;align-items:center;gap:5px;background:rgba(255,255,255,.2);border-radius:999px;padding:3px 10px;font-size:.7rem;font-weight:700;color:#fff;margin-top:4px;}
.eims-rank-tag{display:inline-flex;align-items:center;gap:4px;font-size:.72rem;color:rgba(255,255,255,.9);margin-top:2px;}
/* Stats strip */
.eims-stat-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px;}
.eims-stat-chip{background:#fff;border-radius:12px;padding:14px 10px;text-align:center;box-shadow:0 1px 4px rgba(15,23,42,.07);display:flex;flex-direction:column;align-items:center;gap:3px;transition:box-shadow .2s;}
body.dark .eims-stat-chip{background:#1e293b;box-shadow:none;border:1px solid #334155;}
.eims-stat-chip:hover{box-shadow:0 4px 12px rgba(15,23,42,.1);}
.eims-stat-chip-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1rem;margin-bottom:2px;}
.eims-stat-chip-val{font-size:1.25rem;font-weight:800;color:#0f172a;line-height:1;}
body.dark .eims-stat-chip-val{color:#f1f5f9;}
.eims-stat-chip-lbl{font-size:.65rem;color:#64748b;font-weight:500;}
.eims-stat-chip-link{font-size:.68rem;color:#3b82f6;text-decoration:none;font-weight:600;margin-top:2px;}
/* EIMS pts card */
.eims-pts-card{background:#fff;border-radius:12px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 1px 4px rgba(15,23,42,.07);margin-bottom:14px;}
body.dark .eims-pts-card{background:#1e293b;border:1px solid #334155;}
.eims-pts-icon{width:42px;height:42px;border-radius:999px;background:#fef3c7;display:flex;align-items:center;justify-content:center;font-size:1.15rem;color:#f59e0b;flex-shrink:0;}
.eims-pts-body{flex:1;margin-left:12px;}
.eims-pts-label{font-size:.7rem;color:#64748b;margin:0;}
.eims-pts-value{font-size:1.05rem;font-weight:800;color:#0f172a;margin:0;}
body.dark .eims-pts-value{color:#f1f5f9;}
.eims-pts-link{font-size:.78rem;font-weight:600;color:#3b82f6;text-decoration:none;display:flex;align-items:center;gap:4px;}
/* Quick access */
.eims-quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px;}
.eims-quick-item{background:#fff;border-radius:12px;padding:15px 10px;display:flex;flex-direction:column;align-items:center;gap:7px;text-decoration:none;transition:box-shadow .2s,transform .2s;box-shadow:0 1px 4px rgba(15,23,42,.06);cursor:pointer;border:0;}
body.dark .eims-quick-item{background:#1e293b;border:1px solid #334155;}
.eims-quick-item:hover{box-shadow:0 6px 16px rgba(15,23,42,.1);transform:translateY(-2px);}
.eims-quick-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.15rem;position:relative;}
.eims-quick-label{font-size:.7rem;color:#374151;font-weight:600;text-align:center;}
body.dark .eims-quick-label{color:#94a3b8;}
/* Cards */
.eims-card{background:#fff;border-radius:14px;padding:16px;box-shadow:0 1px 4px rgba(15,23,42,.07);margin-bottom:14px;}
body.dark .eims-card{background:#1e293b;border:1px solid #334155;}
.eims-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.eims-card-title{font-size:.88rem;font-weight:700;color:#0f172a;margin:0;display:flex;align-items:center;gap:6px;}
body.dark .eims-card-title{color:#f1f5f9;}
.eims-card-link{font-size:.75rem;color:#64748b;text-decoration:none;display:flex;align-items:center;gap:3px;}
.eims-card-link:hover{color:#3b82f6;}
/* Schedule */
.eims-schedule-list{display:flex;flex-direction:column;gap:8px;}
.eims-schedule-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;background:#f8fafc;transition:background .15s;}
body.dark .eims-schedule-item{background:#0f172a;}
.eims-schedule-item:hover{background:#eff6ff;}
.eims-schedule-dot{width:9px;height:9px;border-radius:999px;flex-shrink:0;}
.eims-schedule-dot.is-ongoing{background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.2);}
.eims-schedule-dot.is-upcoming{background:#94a3b8;}
.eims-schedule-dot.is-done{background:#e2e8f0;}
.eims-schedule-body{flex:1;min-width:0;}
.eims-schedule-time{font-size:.68rem;color:#64748b;}
.eims-schedule-name{font-size:.83rem;font-weight:600;color:#0f172a;}
body.dark .eims-schedule-name{color:#f1f5f9;}
.eims-schedule-teacher{font-size:.7rem;color:#94a3b8;}
.eims-sched-badge{font-size:.63rem;font-weight:700;padding:2px 8px;border-radius:999px;white-space:nowrap;}
.eims-sched-badge.is-ongoing{background:#dcfce7;color:#15803d;}
.eims-sched-badge.is-upcoming{background:#f1f5f9;color:#64748b;}
.eims-sched-badge.is-done{background:#f1f5f9;color:#94a3b8;}
/* Notices */
.eims-notice-feed{display:flex;flex-direction:column;gap:10px;}
.eims-notice-row{display:flex;align-items:flex-start;gap:12px;padding:12px;border-radius:10px;background:#f8fafc;text-decoration:none;color:inherit;transition:background .15s;}
body.dark .eims-notice-row{background:#0f172a;}
.eims-notice-row:hover{background:#eff6ff;}
.eims-notice-icon{width:38px;height:38px;border-radius:10px;background:#fee2e2;display:flex;align-items:center;justify-content:center;font-size:.95rem;color:#ef4444;flex-shrink:0;}
.eims-notice-body{flex:1;min-width:0;}
.eims-notice-title{font-size:.83rem;font-weight:600;color:#0f172a;margin:0 0 2px;}
body.dark .eims-notice-title{color:#f1f5f9;}
.eims-notice-text{font-size:.73rem;color:#64748b;margin:0 0 4px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.eims-notice-meta{font-size:.66rem;color:#94a3b8;}
.eims-notice-tag{font-size:.6rem;font-weight:700;padding:2px 7px;border-radius:999px;white-space:nowrap;}
.eims-notice-tag.new{background:#dcfce7;color:#15803d;}
.eims-notice-tag.info{background:#dbeafe;color:#1d4ed8;}
.eims-notice-tag.important{background:#fef3c7;color:#92400e;}
/* Info list */
.eims-info-list p{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-bottom:1px solid #f1f5f9;margin:0;font-size:.82rem;}
body.dark .eims-info-list p{border-color:#334155;}
.eims-info-list p:last-child{border-bottom:0;}
.eims-info-list b{color:#374151;font-weight:600;}
body.dark .eims-info-list b{color:#94a3b8;}
.eims-info-list span{color:#0f172a;font-weight:500;}
body.dark .eims-info-list span{color:#f1f5f9;}
/* Banner */
.eims-banner{background:linear-gradient(135deg,#3b82f6,#6366f1);border-radius:16px;padding:18px 22px;display:flex;align-items:center;gap:14px;color:#fff;margin-top:4px;margin-bottom:14px;}
.eims-banner-art{font-size:2.2rem;flex-shrink:0;opacity:.9;}
.eims-banner-body{flex:1;}
.eims-banner-body h5{color:#fff;margin:0 0 3px;font-weight:700;}
.eims-banner-body p{color:rgba(255,255,255,.8);margin:0;font-size:.8rem;}
.eims-banner-btn{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.3);color:#fff;border-radius:999px;padding:7px 16px;font-size:.8rem;font-weight:600;text-decoration:none;white-space:nowrap;display:inline-flex;align-items:center;gap:5px;transition:background .15s;}
.eims-banner-btn:hover{background:rgba(255,255,255,.25);color:#fff;}
/* Bottom nav */
.eims-bottom-nav{display:none;position:fixed;bottom:0;left:0;right:0;z-index:200;background:#fff;border-top:1px solid #e2e8f0;padding:6px 0 calc(6px + env(safe-area-inset-bottom));grid-template-columns:repeat(4,1fr);}
body.dark .eims-bottom-nav{background:#1e293b;border-color:#334155;}
.eims-bnav-item{display:flex;flex-direction:column;align-items:center;gap:2px;text-decoration:none;color:#94a3b8;font-size:.62rem;font-weight:500;padding:4px 6px;transition:color .15s;}
.eims-bnav-item.active{color:#3b82f6;}
.eims-bnav-item i{font-size:1.15rem;}
/* Sidebar overlay */
.eims-sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:1039;}
.eims-sidebar-overlay.is-open{display:block;}
/* Realtime toast */
.eims-realtime-toast{position:fixed;bottom:80px;left:50%;transform:translateX(-50%);background:#1e293b;color:#f1f5f9;border-radius:999px;padding:10px 20px;font-size:.8rem;display:flex;align-items:center;gap:8px;z-index:9999;box-shadow:0 4px 16px rgba(0,0,0,.3);animation:eimsToastIn .3s ease;white-space:nowrap;}
@keyframes eimsToastIn{from{opacity:0;transform:translateX(-50%) translateY(10px);}to{opacity:1;transform:translateX(-50%) translateY(0);}}
/* Global incoming call banner (non-inbox pages) */
#eims-global-call-banner{position:fixed;bottom:90px;right:20px;z-index:99999;display:flex;align-items:center;gap:12px;background:#1e293b;color:#f1f5f9;border-radius:16px;padding:14px 16px;box-shadow:0 8px 32px rgba(0,0,0,.45);min-width:280px;max-width:340px;animation:eimsGcbIn .35s cubic-bezier(.16,1,.3,1);}
@keyframes eimsGcbIn{from{opacity:0;transform:translateY(24px);}to{opacity:1;transform:translateY(0);}}
.eims-gcb-avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#3b82f6,#6366f1);display:flex;align-items:center;justify-content:center;font-size:1.2rem;font-weight:700;flex-shrink:0;}
.eims-gcb-info{flex:1;min-width:0;}
.eims-gcb-info strong{display:block;font-size:.9rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.eims-gcb-info span{display:block;font-size:.75rem;color:#94a3b8;margin-top:2px;}
.eims-gcb-actions{display:flex;gap:8px;flex-shrink:0;}
.eims-gcb-btn{width:38px;height:38px;border-radius:50%;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:.95rem;transition:opacity .15s;}
.eims-gcb-accept{background:#22c55e;color:#fff;text-decoration:none;}
.eims-gcb-accept:hover{background:#16a34a;color:#fff;}
.eims-gcb-reject{background:#ef4444;color:#fff;}
.eims-gcb-reject:hover{background:#dc2626;}
/* Attendance bar */
.eims-attendance-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px;}
/* Classes grid (teacher) */
.eims-class-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-bottom:14px;}
.eims-class-card{background:#fff;border-radius:12px;padding:14px;box-shadow:0 1px 4px rgba(15,23,42,.07);border-left:4px solid #3b82f6;}
body.dark .eims-class-card{background:#1e293b;border:1px solid #334155;border-left:4px solid #3b82f6;}
.eims-class-name{font-size:.88rem;font-weight:700;color:#0f172a;margin:0 0 2px;}
body.dark .eims-class-name{color:#f1f5f9;}
.eims-class-sub{font-size:.75rem;color:#64748b;margin:0 0 10px;}
.eims-class-meta p{font-size:.72rem;display:flex;justify-content:space-between;margin:0;padding:3px 0;}
.eims-class-meta b{color:#374151;}
body.dark .eims-class-meta b{color:#94a3b8;}
/* Donut chart placeholder */
.eims-donut-wrap{display:flex;align-items:center;gap:16px;}
.eims-donut{width:80px;height:80px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-size:1rem;font-weight:800;color:#0f172a;flex-shrink:0;background:conic-gradient(#22c55e var(--pct),#fee2e2 0);}
body.dark .eims-donut{color:#f1f5f9;}
.eims-donut-legend p{font-size:.75rem;display:flex;align-items:center;gap:6px;margin:0 0 4px;}
.eims-donut-dot{width:8px;height:8px;border-radius:999px;flex-shrink:0;}

/* Inbox dark-mode fix */
.inbox-search{color-scheme:light;}
body.dark .inbox-search{background:#1e293b;border-color:#334155;color-scheme:dark;}
.inbox-search input{background:transparent;color:inherit;color-scheme:inherit;}

/* Responsive */
@media(min-width:992px){
    .eims-search-wrap{display:block;}
}

/* ===== App-Style Dashboard UI 2026 ===== */
.eims-dash-wrap{background:#f8fafc;min-height:100vh;padding-bottom:80px;}
.eims-dash-wrap:has(.inbox-shell){padding-bottom:0;overflow:hidden;}
body.dark .eims-dash-wrap{background:#0f172a;}
.eims-welcome-banner{border-radius:22px;padding:22px 20px;margin:14px 16px;position:relative;overflow:hidden;display:flex;align-items:center;gap:16px;}
.eims-wb-green{background:linear-gradient(135deg,#34d399 0%,#059669 55%,#047857 100%);}
.eims-wb-blue{background:linear-gradient(135deg,#3b82f6 0%,#2563eb 60%,#1d4ed8 100%);}
.eims-wb-admin{background:#fff;border:1px solid #e2e8f0;}
body.dark .eims-wb-admin{background:#1e293b;border-color:#334155;}
.eims-welcome-banner::before{content:'';position:absolute;width:100px;height:100px;border-radius:50%;background:rgba(255,255,255,.1);top:-30px;right:20px;pointer-events:none;}
.eims-welcome-banner::after{content:'';position:absolute;width:60px;height:60px;border-radius:50%;background:rgba(255,255,255,.07);bottom:-10px;right:80px;pointer-events:none;}
.eims-banner-photo{width:74px;height:74px;border-radius:50%;object-fit:cover;border:3.5px solid rgba(255,255,255,.92);flex-shrink:0;box-shadow:0 4px 14px rgba(0,0,0,.18);}
.eims-banner-avatar{width:68px;height:68px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;font-size:2rem;flex-shrink:0;color:rgba(255,255,255,.9);}
.eims-wb-admin .eims-banner-avatar{background:#e8eaf6;color:#3949ab;}
.eims-banner-txt{flex:1;min-width:0;}
.eims-welcome-sub{font-size:.76rem;color:rgba(255,255,255,.88);margin:0 0 2px;display:block;}
.eims-welcome-name{font-size:1.25rem;font-weight:800;color:#fff;margin:0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;letter-spacing:-.2px;}
.eims-wb-admin .eims-welcome-sub{color:#94a3b8;}
.eims-wb-admin .eims-welcome-name{color:#0f172a;}
body.dark .eims-wb-admin .eims-welcome-name{color:#f8fafc;}
.eims-role-pill{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;font-size:.7rem;font-weight:700;background:rgba(255,255,255,.2);color:#fff;border:1px solid rgba(255,255,255,.3);}
.eims-role-pill-admin{background:#e8eaf6;color:#3949ab;border-color:#c5cae9;}
body.dark .eims-role-pill-admin{background:#1e3a8a;color:#bfdbfe;border-color:#1e40af;}
.eims-role-pill i{font-size:.68rem;}
.eims-rank-badge{display:inline-flex;align-items:center;gap:5px;background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);border-radius:999px;padding:3px 10px;font-size:.7rem;font-weight:700;color:#fff;}
.eims-rank-badge i{color:#fbbf24;}
.eims-stat-row{display:grid;background:#fff;border-radius:16px;margin:0 16px 14px;overflow:hidden;border:1px solid #f1f5f9;box-shadow:0 2px 8px rgba(0,0,0,.04);}
body.dark .eims-stat-row{background:#1e293b;border-color:#334155;}
.eims-stat-row-4{grid-template-columns:repeat(4,1fr);}
.eims-stat-cell{padding:13px 6px;text-align:center;border-right:1px solid #f1f5f9;}
body.dark .eims-stat-cell{border-color:#334155;}
.eims-stat-cell:last-child{border-right:none;}
.eims-stat-icon{font-size:1rem;display:block;margin-bottom:3px;}
.eims-stat-val{display:block;font-size:1.05rem;font-weight:800;color:#0f172a;line-height:1.15;}
body.dark .eims-stat-val{color:#f8fafc;}
.eims-stat-lbl{display:block;font-size:.63rem;color:#94a3b8;margin-top:2px;}
.eims-section-head{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 10px;}
.eims-section-head h6{margin:0;font-size:.9rem;font-weight:800;color:#0f172a;}
body.dark .eims-section-head h6{color:#f8fafc;}
.eims-view-all{font-size:.78rem;color:#2563eb;text-decoration:none;font-weight:600;}
.eims-qa-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 16px;}
.eims-qa-item{background:#fff;border-radius:18px;padding:16px 8px 14px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;text-decoration:none;border:1px solid #f1f5f9;box-shadow:0 2px 8px rgba(0,0,0,.05);transition:transform .15s,box-shadow .15s;cursor:pointer;}
body.dark .eims-qa-item{background:#1e293b;border-color:#334155;}
.eims-qa-item:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.10);text-decoration:none;}
.eims-qa-icon{width:54px;height:54px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:1.45rem;position:relative;flex-shrink:0;}
.eims-qa-label{font-size:.7rem;font-weight:700;color:#374151;line-height:1.25;text-align:center;}
body.dark .eims-qa-label{color:#94a3b8;}
.eims-qa-badge{position:absolute;top:-5px;right:-5px;min-width:16px;height:16px;padding:0 3px;background:#ef4444;border-radius:999px;color:#fff;font-size:.58rem;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid #fff;}
body.dark .eims-qa-badge{border-color:#1e293b;}
.qi-blue{background:#eff6ff;color:#2563eb;} .qi-green{background:#f0fdf4;color:#16a34a;} .qi-teal{background:#f0fdfa;color:#0d9488;} .qi-orange{background:#fff7ed;color:#ea580c;} .qi-red{background:#fef2f2;color:#dc2626;} .qi-purple{background:#faf5ff;color:#9333ea;} .qi-yellow{background:#fefce8;color:#ca8a04;} .qi-indigo{background:#eef2ff;color:#4f46e5;} .qi-pink{background:#fdf4ff;color:#a21caf;} .qi-cyan{background:#ecfeff;color:#0891b2;} .qi-slate{background:#f8fafc;color:#475569;}
.eims-notice-list{display:flex;flex-direction:column;gap:10px;padding:0 16px;}
.eims-notice-card{background:#fff;border-radius:14px;padding:14px;border:1px solid #f1f5f9;box-shadow:0 1px 4px rgba(0,0,0,.04);display:flex;gap:12px;align-items:flex-start;text-decoration:none;color:inherit;}
body.dark .eims-notice-card{background:#1e293b;border-color:#334155;}
.eims-notice-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.08);}
.eims-ni{width:42px;height:42px;border-radius:12px;background:#fff7ed;color:#ea580c;display:flex;align-items:center;justify-content:center;font-size:1.1rem;flex-shrink:0;}
.eims-nb{flex:1;min-width:0;}
.eims-nb-row{display:flex;align-items:center;gap:6px;margin-bottom:3px;}
.eims-nb-title{font-weight:700;font-size:.83rem;color:#0f172a;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body.dark .eims-nb-title{color:#f8fafc;}
.eims-nb-new{background:#16a34a;color:#fff;font-size:.6rem;font-weight:800;padding:2px 7px;border-radius:999px;white-space:nowrap;flex-shrink:0;}
.eims-nb-desc{font-size:.74rem;color:#64748b;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:3px;}
.eims-nb-date{font-size:.68rem;color:#94a3b8;}
.eims-sched-list{display:flex;flex-direction:column;gap:10px;padding:0 16px;}
.eims-sched-card{background:#fff;border-radius:14px;padding:14px;border:1px solid #f1f5f9;box-shadow:0 1px 4px rgba(0,0,0,.04);display:flex;align-items:center;gap:12px;}
body.dark .eims-sched-card{background:#1e293b;border-color:#334155;}
.eims-sched-icon{width:44px;height:44px;border-radius:13px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-size:1.1rem;flex-shrink:0;}
.eims-sched-body{flex:1;min-width:0;}
.eims-sched-title{font-weight:700;font-size:.83rem;color:#0f172a;margin:0 0 2px;display:block;}
body.dark .eims-sched-title{color:#f8fafc;}
.eims-sched-time{font-size:.7rem;color:#64748b;}
.eims-sched-status{padding:4px 10px;border-radius:999px;font-size:.66rem;font-weight:700;white-space:nowrap;flex-shrink:0;}
.eims-sched-ongoing{background:#d1fae5;color:#065f46;}
body.dark .eims-sched-ongoing{background:#064e3b;color:#6ee7b7;}
.eims-sched-upcoming{background:#f1f5f9;color:#475569;}
body.dark .eims-sched-upcoming{background:#334155;color:#94a3b8;}
.eims-child-card{background:#fff;border-radius:16px;margin:0 16px 14px;padding:16px;border:1px solid #f1f5f9;box-shadow:0 2px 8px rgba(0,0,0,.04);}
body.dark .eims-child-card{background:#1e293b;border-color:#334155;}
.eims-child-head{display:flex;align-items:center;gap:12px;margin-bottom:14px;}
.eims-child-photo{width:52px;height:52px;border-radius:50%;object-fit:cover;border:2px solid #e2e8f0;}
.eims-child-name-txt{font-weight:800;font-size:.9rem;color:#0f172a;display:block;}
body.dark .eims-child-name-txt{color:#f8fafc;}
.eims-child-meta{font-size:.73rem;color:#64748b;}
.eims-child-viewbtn{margin-left:auto;display:inline-flex;align-items:center;gap:3px;padding:5px 12px;border-radius:999px;border:1px solid #2563eb;color:#2563eb;font-size:.7rem;font-weight:700;text-decoration:none;white-space:nowrap;flex-shrink:0;}
.eims-child-stats{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #f1f5f9;padding-top:13px;}
body.dark .eims-child-stats{border-color:#334155;}
.eims-child-stat{text-align:center;}
.eims-child-stat strong{display:block;font-size:1rem;font-weight:800;}
.eims-child-stat span{display:block;font-size:.65rem;color:#94a3b8;margin-top:2px;}
.c-green strong{color:#16a34a;} .c-blue strong{color:#2563eb;} .c-purple strong{color:#9333ea;}
.eims-pts-card{background:#fff;border-radius:16px;margin:0 16px 14px;padding:13px 16px;border:1px solid #f1f5f9;box-shadow:0 2px 8px rgba(0,0,0,.04);display:flex;align-items:center;gap:13px;}
body.dark .eims-pts-card{background:#1e293b;border-color:#334155;}
.eims-pts-icon{width:44px;height:44px;border-radius:13px;background:#fefce8;color:#ca8a04;display:flex;align-items:center;justify-content:center;font-size:1.25rem;flex-shrink:0;}
.eims-pts-body{flex:1;}
.eims-pts-label{font-size:.68rem;color:#94a3b8;display:block;margin-bottom:1px;}
.eims-pts-value{font-size:1rem;font-weight:800;color:#0f172a;}
body.dark .eims-pts-value{color:#f8fafc;}
.eims-pts-link{display:flex;align-items:center;gap:3px;font-size:.76rem;color:#2563eb;text-decoration:none;font-weight:600;white-space:nowrap;}
.eims-motiv-banner{margin:0 16px 14px;border-radius:20px;padding:20px;background:linear-gradient(135deg,#2563eb 0%,#4f46e5 60%,#7c3aed 100%);display:flex;align-items:center;gap:16px;overflow:hidden;position:relative;}
.eims-motiv-banner::before{content:'';position:absolute;width:80px;height:80px;border-radius:50%;background:rgba(255,255,255,.08);top:-20px;right:40px;pointer-events:none;}
.eims-motiv-icon{width:50px;height:50px;border-radius:50%;background:rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;font-size:1.45rem;color:#fff;flex-shrink:0;}
.eims-motiv-text h5{font-size:.95rem;font-weight:800;color:#fff;margin:0 0 4px;}
.eims-motiv-text p{font-size:.76rem;color:rgba(255,255,255,.85);margin:0;}
.eims-adm-stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 16px 14px;}
.eims-adm-stat-card{background:#fff;border-radius:14px;padding:14px 8px;text-align:center;border:1px solid #f1f5f9;box-shadow:0 2px 6px rgba(0,0,0,.04);}
body.dark .eims-adm-stat-card{background:#1e293b;border-color:#334155;}
.eims-adm-stat-icon{width:34px;height:34px;border-radius:10px;margin:0 auto 6px;display:flex;align-items:center;justify-content:center;font-size:.95rem;}
.eims-adm-stat-val{display:block;font-size:1rem;font-weight:800;color:#0f172a;}
body.dark .eims-adm-stat-val{color:#f8fafc;}
.eims-adm-stat-lbl{display:block;font-size:.63rem;color:#94a3b8;margin-top:2px;}
.eims-sys-overview{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0 16px;}
.eims-sys-card{background:#fff;border-radius:16px;padding:16px;border:1px solid #f1f5f9;box-shadow:0 2px 8px rgba(0,0,0,.04);}
body.dark .eims-sys-card{background:#1e293b;border-color:#334155;}
.eims-sys-label{font-size:.68rem;color:#94a3b8;margin:0 0 3px;display:block;}
.eims-sys-val{font-size:1.5rem;font-weight:900;color:#0f172a;margin:0 0 8px;display:block;}
body.dark .eims-sys-val{color:#f8fafc;}
.eims-bottom-nav-app{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #e2e8f0;display:grid;grid-template-columns:repeat(4,1fr);z-index:200;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -2px 12px rgba(0,0,0,.06);}
body.dark .eims-bottom-nav-app{background:#1e293b;border-color:#334155;}
.eims-bnav-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 4px 8px;text-decoration:none;color:#94a3b8;font-size:.6rem;font-weight:600;gap:2px;border:none;background:none;cursor:pointer;position:relative;transition:color .15s;}
.eims-bnav-btn.active{color:#2563eb;}
body.dark .eims-bnav-btn.active{color:#60a5fa;}
.eims-bnav-btn i{font-size:1.2rem;display:block;}
.eims-bnav-dot{position:absolute;top:6px;left:50%;transform:translateX(8px);min-width:15px;height:15px;padding:0 3px;background:#ef4444;border-radius:999px;color:#fff;font-size:.55rem;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid #fff;}
body.dark .eims-bnav-dot{border-color:#1e293b;}
.eims-bnav-spacer{height:76px;}
/* ── Mobile "More" bottom sheet ── */
.eims-more-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.48);z-index:8990;opacity:0;pointer-events:none;transition:opacity .25s;}
.eims-more-backdrop.open{opacity:1;pointer-events:auto;}
.eims-more-sheet{position:fixed;bottom:0;left:0;right:0;background:#fff;border-radius:22px 22px 0 0;z-index:9000;padding:10px 16px calc(env(safe-area-inset-bottom,0px) + 88px);transform:translateY(100%);transition:transform .3s cubic-bezier(.34,1.2,.64,1);max-height:82vh;overflow-y:auto;box-shadow:0 -8px 40px rgba(15,23,42,.18);}
body.dark .eims-more-sheet{background:#0f172a;border-top:1px solid #1e293b;}
.eims-more-sheet.open{transform:translateY(0);}
.eims-more-handle{width:40px;height:4px;background:#e2e8f0;border-radius:2px;margin:0 auto 14px;}
body.dark .eims-more-handle{background:#334155;}
.eims-more-title{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#94a3b8;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid #f1f5f9;}
body.dark .eims-more-title{border-color:#1e293b;}
.eims-more-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.eims-more-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:14px 6px 10px;border-radius:14px;text-decoration:none;color:#1e293b;font-size:.65rem;font-weight:600;background:#f8fafc;border:none;cursor:pointer;min-height:70px;transition:background .15s,color .15s;-webkit-tap-highlight-color:transparent;text-align:center;}
body.dark .eims-more-item{background:#1e293b;color:#cbd5e1;}
.eims-more-item i{font-size:1.3rem;color:#6366f1;}
body.dark .eims-more-item i{color:#818cf8;}
.eims-more-item.active,.eims-more-item:active{background:#ede9fe;color:#4f46e5;}
.eims-more-item.active i,.eims-more-item:active i{color:#4f46e5;}
body.dark .eims-more-item.active{background:#312e81;color:#a5b4fc;}
body.dark .eims-more-item.active i{color:#a5b4fc;}
.eims-more-logout,.eims-more-logout i{color:#dc2626!important;}
body.dark .eims-more-logout,.eims-more-logout i{color:#f87171!important;}
.eims-more-badge{position:absolute;top:6px;right:8px;background:#ef4444;color:#fff;font-size:.52rem;font-weight:800;border-radius:999px;padding:1px 5px;min-width:16px;text-align:center;line-height:1.4;}
@media(min-width:768px){.eims-more-sheet,.eims-more-backdrop{display:none!important;}}
@media(min-width:768px) and (max-width:991.98px){
.eims-dash-wrap{max-width:540px;margin:0 auto;box-shadow:0 0 40px rgba(0,0,0,.08);}
.eims-bottom-nav-app{max-width:540px;left:50%;transform:translateX(-50%);border:none;border-top:1px solid #e2e8f0;}
body.dark .eims-bottom-nav-app{border-color:#334155;}
}

/* ── Responsive App Frame: Professional Sidebar v2 ── */
.eims-app-frame{--ea:#2563eb;--ea-muted:rgba(37,99,235,.13);--ea-text:#93c5fd;}
.eims-frame-student{--ea:#0ea5e9;--ea-muted:rgba(14,165,233,.13);--ea-text:#7dd3fc;}
.eims-frame-teacher{--ea:#818cf8;--ea-muted:rgba(129,140,248,.14);--ea-text:#a5b4fc;}
.eims-frame-staff{--ea:#f59e0b;--ea-muted:rgba(245,158,11,.13);--ea-text:#fcd34d;}
.eims-frame-parent{--ea:#10b981;--ea-muted:rgba(16,185,129,.13);--ea-text:#6ee7b7;}
.eims-frame-admin{--ea:#6366f1;--ea-muted:rgba(99,102,241,.13);--ea-text:#a5b4fc;}
.eims-frame-accountant{--ea:#0f766e;--ea-muted:rgba(15,118,110,.13);--ea-text:#5eead4;}
.eims-app-frame{display:flex;min-height:100vh;background:#f1f5f9;}
body.dark .eims-app-frame{background:#0c1220;}
.eims-app-content-area{flex:1;min-width:0;overflow-x:hidden;display:flex;flex-direction:column;}
.eims-desktop-sidebar{width:252px;min-width:252px;background:linear-gradient(160deg,#eef3ff 0%,#e8edfd 40%,#f0f4ff 100%);display:flex;flex-direction:column;position:fixed;left:0;top:0;height:100vh;overflow-y:auto;overflow-x:hidden;flex-shrink:0;border-right:none;box-shadow:none;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.1) transparent;z-index:400;transform:translateX(-100%);visibility:hidden;transition:transform .32s cubic-bezier(.4,0,.2,1),visibility 0s linear .32s;}
/* Mobile open state */
body.eims-sidebar-open .eims-desktop-sidebar{transform:translateX(0);visibility:visible;transition:transform .32s cubic-bezier(.4,0,.2,1),visibility 0s linear 0s;box-shadow:4px 0 32px rgba(0,0,0,.28);}
/* Sidebar backdrop overlay */
.eims-sidebar-overlay{position:fixed;inset:0;background:rgba(10,20,40,.55);z-index:399;opacity:0;visibility:hidden;transition:opacity .32s,visibility 0s linear .32s;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);}
body.eims-sidebar-open .eims-sidebar-overlay{opacity:1;visibility:visible;transition:opacity .32s,visibility 0s linear 0s;}
/* Mobile close button inside sidebar */
.eims-sidebar-close-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:none;background:rgba(99,102,241,.1);color:#6366f1;font-size:15px;cursor:pointer;position:absolute;top:14px;right:14px;z-index:1;transition:background .15s;}
.eims-sidebar-close-btn:hover{background:rgba(99,102,241,.2);}
body.dark .eims-sidebar-close-btn{background:rgba(255,255,255,.1);color:#a5b4fc;}
body.dark .eims-sidebar-close-btn:hover{background:rgba(255,255,255,.18);}
/* Page content entrance animation */
.eims-app-content-area{animation:eimsPageIn .28s cubic-bezier(.4,0,.2,1) both;}
@keyframes eimsPageIn{from{opacity:0;}to{opacity:1;}}
.eims-desktop-sidebar::-webkit-scrollbar{width:3px;}
.eims-desktop-sidebar::-webkit-scrollbar-thumb{background:rgba(99,102,241,.2);border-radius:3px;}
body.dark .eims-desktop-sidebar{background:linear-gradient(160deg,#131c2e 0%,#0f1827 100%);border-right:none;box-shadow:none;}
.eims-dsk-brand{display:flex;align-items:center;gap:10px;padding:18px 52px 15px 16px;border-bottom:1px solid rgba(99,102,241,.15);text-decoration:none;font-size:.98rem;font-weight:800;color:#0f172a;letter-spacing:-.2px;line-height:1;position:relative;}
@media(min-width:992px){.eims-dsk-brand{padding-right:16px;}}
/* Hide old floating mobile menu panel when sidebar is in use */
@media(max-width:991px){.eims-app-frame .dashboard-menu-panel{display:none!important;}}
.eims-dsk-brand:hover{text-decoration:none;}
.eims-dsk-brand em{font-style:normal;color:var(--ea,#2563eb);}
body.dark .eims-dsk-brand{border-bottom-color:rgba(255,255,255,.07);color:#f1f5f9;}
.eims-dsk-logo{width:34px;height:34px;border-radius:10px;object-fit:contain;flex-shrink:0;}
.eims-dsk-brand-text{font-size:.98rem;font-weight:800;color:#0f172a;letter-spacing:-.2px;line-height:1;}
body.dark .eims-dsk-brand-text{color:#f1f5f9;}
.eims-dsk-brand-text em{font-style:normal;color:var(--ea,#2563eb);}
.eims-dsk-user{display:flex;align-items:center;gap:11px;padding:14px 14px 12px;background:rgba(99,102,241,.06);border-bottom:1px solid rgba(99,102,241,.15);}
body.dark .eims-dsk-user{background:rgba(255,255,255,.04);border-bottom-color:rgba(255,255,255,.06);}
a.eims-dsk-user{text-decoration:none;transition:background .15s;cursor:pointer;}
a.eims-dsk-user:hover{background:rgba(99,102,241,.13);}
body.dark a.eims-dsk-user:hover{background:rgba(255,255,255,.08);}
.eims-dsk-user-photo{width:40px;height:40px;border-radius:12px;object-fit:cover;border:2px solid var(--ea,#2563eb);box-shadow:0 0 0 3px var(--ea-muted,rgba(37,99,235,.13));flex-shrink:0;}
.eims-dsk-user-info{min-width:0;flex:1;}
.eims-dsk-user-name{font-size:.82rem;font-weight:700;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;line-height:1.3;text-decoration:none;}
body.dark .eims-dsk-user-name{color:#f1f5f9;}
.eims-dsk-user-role{display:inline-flex;align-items:center;gap:4px;font-size:.61rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--ea,#2563eb);background:var(--ea-muted,rgba(37,99,235,.1));padding:2px 8px;border-radius:999px;margin-top:4px;}
.eims-dsk-nav{padding:8px 8px 4px;display:flex;flex-direction:column;gap:1px;flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;}
.eims-dsk-nav::-webkit-scrollbar{display:none;}
.eims-dsk-section{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:#7c86c4;padding:12px 10px 4px;display:flex;align-items:center;gap:6px;}
body.dark .eims-dsk-section{color:rgba(255,255,255,.25);}
.eims-dsk-section::after{content:'';flex:1;height:1px;background:rgba(99,102,241,.2);}
body.dark .eims-dsk-section::after{background:rgba(255,255,255,.07);}
.eims-dsk-link{display:flex;align-items:center;gap:12px;padding:10px 13px;border-radius:10px;color:#374151;font-size:.9rem;font-weight:500;font-family:var(--font-sans);text-decoration:none;transition:var(--transition);border:none;background:none;cursor:pointer;width:100%;text-align:left;position:relative;overflow:hidden;}
body.dark .eims-dsk-link{color:rgba(255,255,255,.5);}
.eims-dsk-link i{font-size:1rem;width:20px;text-align:center;flex-shrink:0;transition:transform .14s;}
.eims-dsk-link:hover{background:rgba(99,102,241,.1);color:#1e1b4b;text-decoration:none;}
body.dark .eims-dsk-link:hover{background:rgba(255,255,255,.07);color:rgba(255,255,255,.9);}
.eims-dsk-link:hover i{transform:scale(1.1);}
.eims-dsk-link.active{background:rgba(99,102,241,.14);color:#4338ca;font-weight:600;text-decoration:none;}
body.dark .eims-dsk-link.active{background:var(--ea-muted,rgba(37,99,235,.14));color:var(--ea-text,#93c5fd);}
.eims-dsk-link.active i{color:#4338ca;}
body.dark .eims-dsk-link.active i{color:var(--ea-text,#93c5fd);}
.eims-dsk-link.active::before{content:'';position:absolute;left:0;top:22%;height:56%;width:3px;background:#6366f1;border-radius:0 3px 3px 0;}
body.dark .eims-dsk-link.active::before{background:var(--ea,#2563eb);}
.eims-dsk-link.is-logout{color:rgba(185,28,28,.6) !important;}
body.dark .eims-dsk-link.is-logout{color:rgba(252,165,165,.6) !important;}
.eims-dsk-link.is-logout:hover{background:rgba(239,68,68,.08) !important;color:#dc2626 !important;}
body.dark .eims-dsk-link.is-logout:hover{background:rgba(239,68,68,.12) !important;color:#f87171 !important;}
.eims-dsk-badge{display:inline-flex;align-items:center;justify-content:center;background:#ef4444;color:#fff;font-size:.58rem;font-weight:800;border-radius:999px;padding:1px 5px;min-width:16px;margin-left:2px;line-height:1;}
.eims-dsk-footer{padding:8px;border-top:1px solid rgba(99,102,241,.18);flex-shrink:0;display:flex;flex-direction:column;gap:1px;}
body.dark .eims-dsk-footer{border-top-color:rgba(255,255,255,.07);}
.eims-app-header{background:#ebf0fe;display:flex;align-items:center;justify-content:space-between;height:58px;padding:0 16px;position:fixed !important;top:0 !important;left:0 !important;right:0 !important;z-index:300 !important;border-bottom:1px solid #e2e8f0;box-shadow:0 1px 4px rgba(0,0,0,.06);}
body.dark .eims-app-header{background:#1e293b;border-color:#334155;box-shadow:0 2px 12px rgba(0,0,0,.5);}
.eims-app-header-logo{font-size:1.1rem;font-weight:800;color:#0f172a;letter-spacing:-.3px;}
body.dark .eims-app-header-logo{color:#f1f5f9;}
.eims-app-header-logo em{font-style:normal;color:#6366f1;}
.eims-app-hbtn{width:38px;height:38px;border:none;background:none;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#475569;font-size:1.22rem;cursor:pointer;padding:0;position:relative;text-decoration:none;transition:background .13s,color .13s;}
body.dark .eims-app-hbtn{color:rgba(255,255,255,.6);}
.eims-app-hbtn:hover{background:#f1f5f9;color:#0f172a;text-decoration:none;}
body.dark .eims-app-hbtn:hover{background:rgba(255,255,255,.08);color:#fff;}
.eims-notif-dot{position:absolute;top:3px;right:3px;min-width:16px;height:16px;padding:0 3px;background:#ef4444;border-radius:999px;color:#fff;font-size:.58rem;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid #fff;}
body.dark .eims-notif-dot{border-color:#1e293b;}
.eims-app-header--admin .eims-notif-dot,.eims-frame-student .eims-app-header .eims-notif-dot{border-color:#fff;}
body.dark .eims-app-header--admin .eims-notif-dot,body.dark .eims-frame-student .eims-app-header .eims-notif-dot{border-color:#1e293b;}
@media(min-width:992px){
  .eims-desktop-sidebar{transform:none!important;visibility:visible!important;transition:none!important;}
  .eims-sidebar-overlay,.eims-sidebar-close-btn{display:none!important;}
  .eims-app-content-area{margin-left:252px;border-left:1px solid #dde5f8;}
  body.eims-sidebar-collapsed .eims-app-content-area{margin-left:0;}
  body.eims-sidebar-collapsed .eims-desktop-sidebar{transform:translateX(-100%)!important;}
  .eims-dash-wrap{max-width:100% !important;margin:0 !important;box-shadow:none !important;background:#f5f7fb;min-height:calc(100vh - 58px);}
  body.dark .eims-dash-wrap{background:#0c1220;}
  .eims-app-content-area>footer.footer{margin-left:0;}
  .eims-bottom-nav-app{display:none !important;}
  .eims-bnav-spacer{display:none;}
  .eims-app-header{position:fixed;top:0;left:0;right:0;z-index:300;border-radius:0;}
  body.eims-sidebar-collapsed .eims-desktop-sidebar{display:none !important;}
  body:not(.eims-sidebar-collapsed) .eims-app-frame .dashboard-menu-panel{left:268px !important;}
  body.dark .eims-app-content-area{border-left-color:rgba(255,255,255,.06);}
  body.eims-sidebar-collapsed .eims-app-content-area{border-left:none;}
}
@media(min-width:1200px){
  .eims-desktop-sidebar{width:264px;min-width:264px;}
  .eims-app-content-area{margin-left:264px;}
  body.eims-sidebar-collapsed .eims-app-content-area{margin-left:0;}
  .eims-qa-grid{grid-template-columns:repeat(4,1fr);}
}
@media(min-width:1400px){
  .eims-qa-grid{grid-template-columns:repeat(5,1fr);}
}
/* ── EIMS frame: footer offset + body padding ── */
.eims-app-frame~footer.footer{padding-left:0;}
@media(min-width:992px){
  .eims-app-frame~footer.footer{margin-left:252px;}
  body.eims-sidebar-collapsed .eims-app-frame~footer.footer{margin-left:0;}
}
@media(min-width:1200px){.eims-app-frame~footer.footer{margin-left:264px;}}
.eims-dash-wrap .adm-dash-wrap,.eims-dash-wrap>.container,.eims-dash-wrap>.container-fluid{padding-top:24px;padding-bottom:24px;padding-left:24px;padding-right:24px;}
@media(max-width:575.98px){.eims-dash-wrap .adm-dash-wrap,.eims-dash-wrap>.container,.eims-dash-wrap>.container-fluid{padding-left:14px;padding-right:14px;}}
/* ── Admin sidebar submenu (details/summary) ── */
.eims-dsk-submenu{margin:0;padding:0;list-style:none;}
.eims-dsk-submenu>summary{list-style:none;cursor:pointer;user-select:none;}
.eims-dsk-submenu>summary::-webkit-details-marker,.eims-dsk-submenu>summary::marker{display:none;}
.eims-dsk-chevron{font-size:.72rem;flex-shrink:0;margin-left:auto;opacity:.45;transition:transform .2s ease,opacity .15s;}
.eims-dsk-submenu[open]>.eims-dsk-link .eims-dsk-chevron{transform:rotate(180deg);opacity:.75;}
.eims-dsk-submenu-panel{padding:3px 0 4px 14px;margin-left:20px;border-left:2px solid #e2e8f0;}
body.dark .eims-dsk-submenu-panel{border-left-color:rgba(255,255,255,.07);}
.eims-dsk-sub-link{font-size:.79rem !important;padding:7px 10px !important;border-radius:8px !important;}
.eims-dsk-sub-link i{font-size:.85rem;opacity:.7;}
.eims-dsk-sub-lang{padding:4px 8px 2px;}
/* ── Admin topbar search ── */
.eims-app-header-brand{display:flex;align-items:center;gap:9px;text-decoration:none;}
.eims-app-header-brand:hover{text-decoration:none;}
.eims-app-header-logo-img{width:32px;height:32px;border-radius:8px;object-fit:contain;flex-shrink:0;}
.eims-app-header--admin{gap:10px;background:#ebf0fe !important;border-bottom:1px solid #e2e8f0 !important;box-shadow:0 1px 4px rgba(0,0,0,.06) !important;}
body.dark .eims-app-header--admin{background:#1e293b !important;border-color:#334155 !important;}
.eims-app-header--admin .eims-app-header-logo{color:#0f172a !important;}
body.dark .eims-app-header--admin .eims-app-header-logo{color:#f1f5f9 !important;}
.eims-app-header--admin .eims-app-header-logo em{color:#6366f1 !important;}
.eims-app-header--admin .eims-app-hbtn{color:#475569 !important;}
body.dark .eims-app-header--admin .eims-app-hbtn{color:#94a3b8 !important;}
.eims-app-header--admin .eims-app-hbtn:hover{background:#f1f5f9 !important;color:#0f172a !important;}
body.dark .eims-app-header--admin .eims-app-hbtn:hover{background:#334155 !important;color:#f1f5f9 !important;}
.eims-app-header--admin .eims-notif-dot{border-color:#fff !important;}
body.dark .eims-app-header--admin .eims-notif-dot{border-color:#1e293b !important;}
.eims-admin-search{position:relative;display:none;align-items:center;flex:1;max-width:280px;}
@media(min-width:768px){.eims-admin-search{display:flex;}}
.eims-admin-search-icon{position:absolute;left:10px;color:#94a3b8;font-size:.82rem;pointer-events:none;}
.eims-admin-search-input{width:100%;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:10px;padding:7px 12px 7px 32px;color:#0f172a;font-size:.82rem;outline:none;transition:background .15s,border-color .15s;}
body.dark .eims-admin-search-input{background:#0f172a;border-color:#334155;color:#f1f5f9;}
.eims-admin-search-input::placeholder{color:#94a3b8;}
.eims-admin-search-input:focus{background:#fff;border-color:#6366f1;}
body.dark .eims-admin-search-input:focus{background:#1e293b;border-color:#6366f1;}
/* Live search dropdown panel */
.admin-live-search-panel{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1.5px solid #e0e7ff;border-radius:14px;box-shadow:0 8px 32px rgba(99,102,241,.13),0 2px 8px rgba(15,23,42,.07);z-index:6500;overflow-y:auto;overflow-x:hidden;max-height:min(420px,60vh);padding:4px 0;}
body.dark .admin-live-search-panel{background:#1e293b;border-color:#334155;box-shadow:0 8px 32px rgba(0,0,0,.4);}
.admin-live-search-item{display:flex;flex-direction:column;gap:2px;padding:9px 14px;text-decoration:none;color:#1e293b;transition:background .1s;}
.admin-live-search-item:hover{background:#eef2ff;text-decoration:none;color:#1e293b;}
body.dark .admin-live-search-item{color:#e2e8f0;}
body.dark .admin-live-search-item:hover{background:rgba(99,102,241,.15);color:#f1f5f9;}
.admin-live-search-type{font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--ea,#6366f1);}
.admin-live-search-item strong{font-size:.84rem;font-weight:600;color:#0f172a;}
body.dark .admin-live-search-item strong{color:#f1f5f9;}
.admin-live-search-item small{font-size:.74rem;color:#64748b;}
body.dark .admin-live-search-item small{color:#94a3b8;}
.admin-live-search-all{display:block;text-align:center;padding:8px 14px;font-size:.78rem;color:#6366f1;border-top:1px solid #e0e7ff;text-decoration:none;font-weight:500;}
.admin-live-search-all:hover{background:#eef2ff;color:#4f46e5;text-decoration:none;}
body.dark .admin-live-search-all{color:#a5b4fc;border-top-color:#334155;}
body.dark .admin-live-search-all:hover{background:rgba(99,102,241,.12);}
.admin-live-search-empty{display:flex;align-items:center;gap:8px;padding:12px 14px;color:#94a3b8;font-size:.82rem;}
body.dark .admin-live-search-empty{color:rgba(255,255,255,.3);}
/* Notification widget inside topbar */
.eims-topbar-notif{display:flex;align-items:center;}
.eims-topbar-user-badge{display:flex;align-items:center;gap:8px;padding:4px 12px 4px 4px;background:#f1f5f9;border-radius:999px;border:1px solid #e2e8f0;cursor:default;transition:background .15s;}
body.dark .eims-topbar-user-badge{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.1);}
.eims-topbar-avatar{width:30px;height:30px;border-radius:50%;object-fit:cover;border:2px solid #6366f1;flex-shrink:0;}
.eims-topbar-role-pill{font-size:.72rem;font-weight:700;color:#4338ca;letter-spacing:.04em;white-space:nowrap;}
body.dark .eims-topbar-role-pill{color:#a5b4fc;}
@media(max-width:575.98px){.eims-topbar-role-pill{display:none;}.eims-topbar-user-badge{padding:2px 2px;background:none;border:none;}}
.eims-section{margin-bottom:16px;}
@media(max-width:991.98px){
    .eims-dash-sidebar{transform:translateX(-100%);box-shadow:4px 0 24px rgba(0,0,0,.2);}
    .eims-dash-sidebar.is-open{transform:translateX(0);}
    .eims-dash-main{margin-left:0;}
    .eims-hamburger{display:flex !important;}
    .eims-bottom-nav{display:grid;}
    .eims-dash-body{padding:14px 14px calc(74px + env(safe-area-inset-bottom));}
    .eims-stat-strip{gap:8px;}
    .eims-stat-chip{padding:10px 6px;}
    .eims-class-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));}
}
@media(max-width:575.98px){
    .eims-stat-chip-icon{width:32px;height:32px;font-size:.88rem;}
    .eims-stat-chip-val{font-size:.95rem;}
    .eims-stat-chip-lbl{font-size:.58rem;}
    .eims-quick-grid{gap:7px;}
    .eims-quick-icon{width:40px;height:40px;font-size:1rem;}
    .eims-welcome-banner{padding:14px 16px;gap:10px;}
    .eims-welcome-photo{width:58px;height:58px;}
    .eims-banner{flex-direction:column;text-align:center;padding:14px;}
    .eims-banner-btn{align-self:center;}
}

/* =====================================================
   ADM DASHBOARD v2 — New Admin/Super Admin Design
   ===================================================== */
.adm-dash-wrap{padding:24px 24px 32px;min-width:0;}
.adm-welcome-bar{margin-bottom:20px;}
/* ── Admin Profile Page ── */
.adm-profile-wrap{display:grid;grid-template-columns:1fr 300px;gap:20px;align-items:start;}
@media(max-width:900px){.adm-profile-wrap{grid-template-columns:1fr;}}
.adm-profile-card,.adm-profile-links-card{background:#fff;border-radius:18px;border:1px solid #e8edf3;box-shadow:0 2px 12px rgba(0,0,0,.05);overflow:hidden;}
body.dark .adm-profile-card,body.dark .adm-profile-links-card{background:#1e293b;border-color:#334155;}
.adm-profile-photo-area{display:flex;align-items:center;gap:24px;padding:28px 28px 24px;border-bottom:1px solid #f1f5f9;}
body.dark .adm-profile-photo-area{border-bottom-color:#334155;}
.adm-profile-photo-ring{position:relative;flex-shrink:0;}
.adm-profile-photo-img{width:96px;height:96px;border-radius:50%;object-fit:cover;border:3px solid #6366f1;box-shadow:0 0 0 4px rgba(99,102,241,.15);}
.adm-profile-photo-edit{position:absolute;bottom:0;right:0;width:28px;height:28px;background:#6366f1;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:.78rem;cursor:pointer;border:2px solid #fff;transition:background .15s;}
.adm-profile-photo-edit:hover{background:#4f46e5;}
body.dark .adm-profile-photo-edit{border-color:#1e293b;}
.adm-profile-name{font-size:1.15rem;font-weight:700;color:#0f172a;margin:0 0 4px;}
body.dark .adm-profile-name{color:#f1f5f9;}
.adm-profile-role-badge{display:inline-block;background:rgba(99,102,241,.12);color:#4338ca;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;padding:3px 10px;border-radius:999px;}
body.dark .adm-profile-role-badge{background:rgba(99,102,241,.2);color:#a5b4fc;}
.adm-profile-email{font-size:.82rem;color:#64748b;margin:6px 0 0;display:flex;align-items:center;gap:5px;}
body.dark .adm-profile-email{color:#94a3b8;}
/* Details form */
.adm-profile-details-form{padding:24px 28px 28px;}
.adm-profile-section-title{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#6366f1;display:flex;align-items:center;gap:7px;padding-bottom:10px;border-bottom:1px solid #e8edf3;margin-bottom:16px;}
body.dark .adm-profile-section-title{color:#a5b4fc;border-bottom-color:#334155;}
.adm-profile-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
@media(max-width:600px){.adm-profile-fields{grid-template-columns:1fr;}}
.adm-profile-field--full{grid-column:1/-1;}
.adm-profile-field{display:flex;flex-direction:column;gap:5px;}
.adm-profile-field label{font-size:.75rem;font-weight:600;color:#64748b;letter-spacing:.03em;}
body.dark .adm-profile-field label{color:#94a3b8;}
.adm-profile-field input,.adm-profile-field select,.adm-profile-field textarea{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:9px 12px;font-size:.87rem;color:#0f172a;outline:none;transition:border-color .15s,box-shadow .15s;width:100%;resize:vertical;}
body.dark .adm-profile-field input,body.dark .adm-profile-field select,body.dark .adm-profile-field textarea{background:#0f172a;border-color:#334155;color:#f1f5f9;}
.adm-profile-field input:focus,.adm-profile-field select:focus,.adm-profile-field textarea:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.12);}
.adm-profile-form-footer{margin-top:24px;display:flex;justify-content:flex-end;}
.adm-profile-save-btn{background:#6366f1;border-color:#6366f1;padding:9px 24px;font-size:.88rem;font-weight:600;}
.adm-profile-save-btn:hover{background:#4f46e5;border-color:#4f46e5;}
.adm-profile-upload-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding:12px 16px;background:#f8fafc;border-radius:10px;border:1px solid #e2e8f0;}
body.dark .adm-profile-upload-actions{background:#0f172a;border-color:#334155;}
.adm-profile-file-name{font-size:.8rem;color:#475569;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;}
body.dark .adm-profile-file-name{color:#94a3b8;}
.adm-profile-save-btn{background:#6366f1;border-color:#6366f1;}
.adm-profile-save-btn:hover{background:#4f46e5;border-color:#4f46e5;}
.adm-profile-links-card{padding:8px;}
.adm-profile-links-title{font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:#94a3b8;padding:10px 14px 6px;margin:0;}
.adm-profile-link{display:flex;align-items:center;gap:11px;padding:11px 14px;border-radius:10px;color:#374151;font-size:.88rem;text-decoration:none;transition:background .13s;}
body.dark .adm-profile-link{color:#cbd5e1;}
.adm-profile-link:hover{background:#f1f5f9;text-decoration:none;}
body.dark .adm-profile-link:hover{background:rgba(255,255,255,.06);}
.adm-profile-link i:first-child{font-size:1rem;color:#6366f1;width:20px;text-align:center;}
.adm-profile-link.text-danger i:first-child{color:#ef4444;}
.eims-topbar-user-badge{text-decoration:none;}
.eims-topbar-user-badge:hover{text-decoration:none;background:#e8edfc !important;}
body.dark .eims-topbar-user-badge:hover{background:rgba(255,255,255,.12) !important;}
.adm-welcome-title{font-size:1.25rem;font-weight:700;color:var(--eims-text,#111827);margin:0;}
.adm-welcome-title span{color:#2563eb;}
.adm-welcome-sub{font-size:.85rem;color:#6b7280;margin:2px 0 0;}

/* Stat row */
.adm-stat-row{display:flex;gap:14px;margin-bottom:20px;}
.adm-stat-card{flex:1 1 0;min-width:0;background:#fff;border-radius:12px;padding:18px 16px;display:flex;align-items:center;gap:14px;box-shadow:0 1px 4px rgba(0,0,0,.07);border:1px solid #f1f5f9;}
body.dark .adm-stat-card{background:#1e293b;border-color:#334155;}
.adm-stat-icon{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.35rem;flex-shrink:0;}
.adm-stat-body{min-width:0;flex:1;}
.adm-stat-label{font-size:.72rem;color:#6b7280;margin:0 0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.adm-stat-val{font-size:1.55rem;font-weight:800;line-height:1.1;margin:0 0 3px;color:var(--eims-text,#111827);}
.adm-stat-note{font-size:.72rem;margin:0;font-weight:600;}
body.dark .adm-stat-label{color:#94a3b8;}
@media(max-width:1399.98px){
  .adm-stat-row{gap:10px;}
  .adm-stat-card{padding:14px 10px;gap:10px;}
  .adm-stat-icon{width:40px;height:40px;font-size:1.05rem;}
  .adm-stat-label{font-size:.65rem;white-space:normal;}
  .adm-stat-val{font-size:1.3rem;}
  .adm-stat-note{font-size:.65rem;}
}
@media(max-width:767.98px){.adm-stat-row{flex-wrap:wrap;}.adm-stat-card{flex:1 1 calc(50% - 7px);}}
@media(max-width:479.98px){.adm-stat-card{flex:1 1 100%;}}

/* Mid row */
.adm-mid-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,380px);gap:16px;margin-bottom:16px;}
@media(max-width:1099.98px){.adm-mid-row{grid-template-columns:1fr;}}

/* Cards */
.adm-att-card,.adm-admit-card,.adm-fees-card,.adm-notice-card,.adm-qa-card{background:#fff;border-radius:12px;padding:20px;box-shadow:0 1px 4px rgba(0,0,0,.07);border:1px solid #f1f5f9;}
body.dark .adm-att-card,body.dark .adm-admit-card,body.dark .adm-fees-card,body.dark .adm-notice-card,body.dark .adm-qa-card{background:#1e293b;border-color:#334155;}
.adm-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:10px;flex-wrap:wrap;}
.adm-card-title{font-size:.95rem;font-weight:700;color:var(--eims-text,#111827);margin:0;}
body.dark .adm-card-title{color:#f1f5f9;}
.adm-view-all{font-size:.78rem;color:#2563eb;font-weight:600;text-decoration:none;white-space:nowrap;}
.adm-view-all:hover{text-decoration:underline;}
.adm-chart-wrap{height:200px;position:relative;margin-bottom:14px;}
.adm-att-summary{display:flex;gap:12px;flex-wrap:wrap;}
.adm-att-chip{flex:1;min-width:110px;background:#f8fafc;border-radius:8px;padding:12px;display:flex;align-items:center;gap:10px;}
body.dark .adm-att-chip{background:#0f172a;}
.adm-att-chip-icon{font-size:1.2rem;}
.adm-att-chip p{margin:0;line-height:1.2;}
.adm-att-chip-val{font-size:1.1rem;font-weight:800;color:var(--eims-text,#111827);}
body.dark .adm-att-chip-val{color:#f1f5f9;}
.adm-att-chip-lbl{font-size:.72rem;color:#6b7280;}
.adm-att-chip-pct{font-size:.8rem;font-weight:700;}

/* Recent admissions */
.adm-admit-list{display:flex;flex-direction:column;gap:12px;}
.adm-admit-row{display:flex;align-items:center;gap:12px;}
.adm-admit-avatar{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:.85rem;flex-shrink:0;}
.adm-admit-info{flex:1;min-width:0;}
.adm-admit-name{font-size:.85rem;font-weight:700;color:var(--eims-text,#111827);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
body.dark .adm-admit-name{color:#f1f5f9;}
.adm-admit-meta{font-size:.75rem;color:#6b7280;margin:0;}
.adm-admit-right{text-align:right;flex-shrink:0;}
.adm-admit-date{font-size:.72rem;color:#9ca3af;margin:0 0 3px;}
.adm-admit-badge{font-size:.65rem;background:#dcfce7;color:#16a34a;padding:2px 7px;border-radius:20px;font-weight:700;}

/* Bottom row */
.adm-bot-row{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:20px;}
@media(max-width:1199.98px){.adm-bot-row{grid-template-columns:1fr 1fr;}}
@media(max-width:767.98px){.adm-bot-row{grid-template-columns:1fr;}}

/* Fees chart */
.adm-fees-chart-wrap{padding:8px 0 4px;}
.adm-fees-donut-label{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:1.4rem;font-weight:800;color:var(--eims-text,#111827);pointer-events:none;}
body.dark .adm-fees-donut-label{color:#f1f5f9;}
.fees-chart-type-bar{display:flex;gap:4px;margin-bottom:6px;}
.fees-ct-btn{flex:1;padding:5px 4px;border:1.5px solid #e5e7eb;background:transparent;border-radius:7px;color:#64748b;font-size:13px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;line-height:1.2;}
.fees-ct-btn.active,.fees-ct-btn:hover{background:var(--eims-primary,#6366f1);border-color:var(--eims-primary,#6366f1);color:#fff;}
body.dark .fees-ct-btn{border-color:#334155;color:#94a3b8;}
body.dark .fees-ct-btn.active,body.dark .fees-ct-btn:hover{background:var(--eims-primary,#818cf8);border-color:var(--eims-primary,#818cf8);color:#fff;}
.adm-fees-summary{display:flex;flex-direction:column;gap:8px;}
.adm-fees-row{display:flex;justify-content:space-between;align-items:center;font-size:.82rem;padding:4px 0;border-bottom:1px solid #f1f5f9;}
body.dark .adm-fees-row{border-color:#334155;}
.adm-fees-row span{color:#6b7280;}
.adm-fees-row strong{font-weight:700;}

/* Notice board */
.adm-notice-list{display:flex;flex-direction:column;gap:0;}
.adm-notice-row{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid #f1f5f9;text-decoration:none;}
body.dark .adm-notice-row{border-color:#334155;}
.adm-notice-row:last-child{border-bottom:none;}
.adm-notice-icon{width:32px;height:32px;border-radius:8px;background:#fef9c3;color:#ca8a04;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:.85rem;}
.adm-notice-body{flex:1;min-width:0;}
.adm-notice-title{font-size:.82rem;font-weight:600;color:var(--eims-text,#111827);margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
body.dark .adm-notice-title{color:#f1f5f9;}
.adm-notice-date{font-size:.7rem;color:#9ca3af;margin:2px 0 0;}

/* Quick actions */
.adm-qa-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
@media(max-width:479.98px){.adm-qa-grid{grid-template-columns:repeat(2,1fr);}}
.adm-qa-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px 8px;border-radius:12px;background:var(--qa-bg,#f1f5f9);color:var(--qa-c,#374151);text-decoration:none;font-size:.72rem;font-weight:700;text-align:center;transition:transform .15s,box-shadow .15s;}
.adm-qa-btn i{font-size:1.4rem;color:var(--qa-c);}
.adm-qa-btn:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.12);color:var(--qa-c);}

/* Topbar inbox button (desktop) */
.admin-topbar-inbox{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0;color:#374151;text-decoration:none;font-size:1.05rem;transition:background .15s,color .15s,box-shadow .15s;box-shadow:0 2px 8px rgba(15,23,42,.06);flex-shrink:0;}
.admin-topbar-inbox:hover{background:#e0f2fe;color:#0284c7;border-color:#bae6fd;box-shadow:0 4px 14px rgba(2,132,199,.15);}
.admin-topbar-inbox-badge{position:absolute;top:-5px;right:-5px;background:#ef4444;color:#fff;border-radius:50%;min-width:18px;height:18px;font-size:.54rem;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 3px;border:2px solid #fff;line-height:1;}
body.dark .admin-topbar-inbox{background:#1e293b;border-color:#334155;color:#94a3b8;}
body.dark .admin-topbar-inbox:hover{background:#0c4a6e;color:#38bdf8;border-color:#0369a1;}
body.dark .admin-topbar-inbox-badge{border-color:#1e293b;}

/* Settings — visual theme picker */
.st-theme-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:4px;}
.st-theme-card{position:relative;border:2px solid #e2e8f0;border-radius:12px;overflow:hidden;cursor:pointer;transition:border-color .18s,box-shadow .18s,transform .15s;background:#fff;user-select:none;}
.st-theme-card:hover{border-color:#94a3b8;transform:translateY(-1px);box-shadow:0 4px 16px rgba(0,0,0,.1);}
.st-theme-card.is-active{border-color:var(--st-p,#0284c7);box-shadow:0 0 0 3px rgba(2,132,199,.14);}
.st-theme-swatch{display:flex;height:28px;}
.st-theme-swatch-p{flex:2;background:var(--st-p);}
.st-theme-swatch-s{flex:1;background:var(--st-s);}
.st-theme-info{padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:6px;}
.st-theme-name{font-size:.68rem;font-weight:700;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;}
.st-theme-check{width:16px;height:16px;border-radius:50%;border:2px solid #cbd5e1;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .18s,border-color .18s;font-size:.58rem;color:transparent;}
.st-theme-card.is-active .st-theme-check{background:var(--st-p,#0284c7);border-color:var(--st-p,#0284c7);color:#fff;}
body.dark .st-theme-card{background:#1e293b;border-color:#334155;}
body.dark .st-theme-card:hover{border-color:#475569;}
body.dark .st-theme-name{color:#e2e8f0;}
body.dark .st-theme-check{border-color:#475569;}

/* ============= MOBILE-ONLY COMPONENTS (mob-*) ============= */
.eims-mob-view{padding:8px 4px 80px;}
.mob-welcome-card{background:#fff;border-radius:14px;padding:16px;margin:0 12px 10px;box-shadow:0 1px 4px rgba(0,0,0,.08);display:flex;align-items:center;gap:14px;}
body.dark .mob-welcome-card{background:#1e293b;}
.mob-welcome-photo{width:70px;height:70px;border-radius:50%;object-fit:cover;border:3px solid #e2e8f0;flex-shrink:0;}
.mob-welcome-sub{font-size:.72rem;color:#6b7280;margin:0;}
.mob-welcome-name{font-size:1.1rem;font-weight:800;color:#111827;margin:2px 0 4px;}
body.dark .mob-welcome-name{color:#f1f5f9;}
.mob-rank-badge{display:inline-flex;align-items:center;gap:4px;background:#fef9c3;color:#ca8a04;border-radius:20px;padding:3px 10px;font-size:.72rem;font-weight:700;}
.mob-teacher-banner,.mob-parent-banner{border-radius:14px;padding:18px 16px;margin:12px 12px 0;display:flex;align-items:center;gap:14px;}
.mob-teacher-banner{background:linear-gradient(135deg,#1d4ed8,#3b82f6);}
.mob-parent-banner{background:linear-gradient(135deg,#15803d,#22c55e);}
.mob-t-photo,.mob-p-photo{width:68px;height:68px;border-radius:50%;object-fit:cover;border:3px solid rgba(255,255,255,.35);flex-shrink:0;}
.mob-t-welcome,.mob-p-welcome{font-size:.7rem;color:rgba(255,255,255,.8);margin:0;}
.mob-t-name,.mob-p-name{font-size:1.05rem;font-weight:800;color:#fff;margin:2px 0 4px;}
.mob-t-role-badge{display:inline-flex;align-items:center;gap:4px;background:rgba(255,255,255,.2);color:#fff;border-radius:20px;padding:3px 10px;font-size:.7rem;font-weight:600;}
.mob-p-sub{font-size:.76rem;color:rgba(255,255,255,.9);margin:0;}
.mob-stat-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:0 12px;margin:10px 0;}
.mob-stat-chip{background:#fff;border-radius:12px;padding:10px 5px;text-align:center;box-shadow:0 1px 3px rgba(0,0,0,.07);}
body.dark .mob-stat-chip{background:#1e293b;}
.mob-stat-icon{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.8rem;margin:0 auto 4px;}
.mob-stat-val{font-size:1.05rem;font-weight:800;color:#111827;margin:0;}
body.dark .mob-stat-val{color:#f1f5f9;}
.mob-stat-lbl{font-size:.63rem;color:#6b7280;margin:2px 0 0;}
.mob-pts-strip{background:#fff;border-radius:12px;margin:10px 12px 0;padding:12px 14px;display:flex;align-items:center;gap:12px;box-shadow:0 1px 3px rgba(0,0,0,.07);}
body.dark .mob-pts-strip{background:#1e293b;}
.mob-pts-icon{width:40px;height:40px;border-radius:50%;background:#fff7ed;color:#ea580c;font-size:1rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.mob-pts-label{font-size:.7rem;color:#6b7280;margin:0;}
.mob-pts-val{font-size:1rem;font-weight:800;color:#111827;margin:1px 0 0;}
body.dark .mob-pts-val{color:#f1f5f9;}
.mob-pts-link{margin-left:auto;color:#3b82f6;font-size:.76rem;font-weight:600;white-space:nowrap;border:1.5px solid #3b82f6;border-radius:20px;padding:4px 12px;text-decoration:none;flex-shrink:0;}
.mob-learn-banner{background:linear-gradient(135deg,#312e81,#4f46e5);border-radius:14px;margin:10px 12px;padding:14px 16px;display:flex;align-items:center;gap:12px;}
.mob-learn-icon{width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.2);color:#fff;font-size:1.1rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.mob-learn-banner h5{color:#fff;font-size:.9rem;font-weight:800;margin:0 0 3px;}
.mob-learn-banner p{color:rgba(255,255,255,.82);font-size:.73rem;margin:0;}
.mob-section{padding:12px 12px 0;}
.mob-section-title{font-size:.88rem;font-weight:800;color:#111827;margin:0 0 10px;}
body.dark .mob-section-title{color:#f1f5f9;}
.mob-sec-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.mob-sec-head .mob-section-title{margin:0;}
.mob-view-all{font-size:.76rem;color:#6b7280;text-decoration:none;}
.mob-qa-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
.mob-qa-item{background:#fff;border-radius:12px;padding:13px 6px;display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;box-shadow:0 1px 3px rgba(0,0,0,.06);position:relative;}
body.dark .mob-qa-item{background:#1e293b;}
.mob-qa-icon{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.1rem;}
.mob-qa-item span{font-size:.67rem;color:#374151;font-weight:600;text-align:center;}
body.dark .mob-qa-item span{color:#cbd5e1;}
.mob-qa-badge::after{content:attr(data-badge);position:absolute;top:6px;right:14px;background:#ef4444;color:#fff;border-radius:50%;width:17px;height:17px;font-size:.58rem;font-weight:700;display:flex;align-items:center;justify-content:center;}
.mob-notice-item{background:#fff;border-radius:12px;padding:12px;margin-bottom:8px;display:flex;gap:10px;align-items:flex-start;box-shadow:0 1px 3px rgba(0,0,0,.06);}
body.dark .mob-notice-item{background:#1e293b;}
.mob-notice-icon{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:.85rem;flex-shrink:0;}
.mob-notice-body{flex:1;min-width:0;}
.mob-notice-title{font-size:.82rem;font-weight:700;color:#111827;margin:0 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body.dark .mob-notice-title{color:#f1f5f9;}
.mob-notice-text{font-size:.7rem;color:#6b7280;margin:0 0 2px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.mob-notice-date{font-size:.64rem;color:#9ca3af;margin:0;}
.mob-notice-badge{flex-shrink:0;font-size:.6rem;font-weight:700;padding:2px 8px;border-radius:12px;white-space:nowrap;margin-top:2px;}
.mob-sched-item{background:#fff;border-radius:12px;padding:12px;margin-bottom:8px;display:flex;gap:10px;align-items:center;box-shadow:0 1px 3px rgba(0,0,0,.06);}
body.dark .mob-sched-item{background:#1e293b;}
.mob-sched-icon{width:36px;height:36px;border-radius:10px;background:#eff6ff;color:#3b82f6;display:flex;align-items:center;justify-content:center;font-size:.88rem;flex-shrink:0;}
.mob-sched-body{flex:1;}
.mob-sched-name{font-size:.82rem;font-weight:700;color:#111827;margin:0;}
body.dark .mob-sched-name{color:#f1f5f9;}
.mob-sched-time{font-size:.7rem;color:#6b7280;margin:2px 0 0;}
.mob-sched-badge{font-size:.64rem;font-weight:700;padding:3px 9px;border-radius:12px;white-space:nowrap;}
.mob-sched-badge.is-ongoing{background:#dcfce7;color:#16a34a;}
.mob-sched-badge.is-upcoming{background:#e0f2fe;color:#0284c7;}
.mob-sched-badge.is-done{background:#f1f5f9;color:#6b7280;}
.mob-card{background:#fff;border-radius:14px;padding:14px;box-shadow:0 1px 3px rgba(0,0,0,.07);}
body.dark .mob-card{background:#1e293b;}
.mob-card-title{font-size:.82rem;font-weight:700;color:#111827;margin:0 0 10px;}
body.dark .mob-card-title{color:#f1f5f9;}
.mob-child-row{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.mob-child-avatar{width:40px;height:40px;border-radius:50%;background:#e0f2fe;color:#0284c7;display:flex;align-items:center;justify-content:center;font-size:1.05rem;flex-shrink:0;}
.mob-child-name{font-size:.84rem;font-weight:700;color:#111827;margin:0;}
body.dark .mob-child-name{color:#f1f5f9;}
.mob-child-sub{font-size:.7rem;color:#6b7280;margin:2px 0 0;}
.mob-view-profile-btn{font-size:.7rem;color:#3b82f6;border:1.5px solid #3b82f6;border-radius:20px;padding:4px 10px;text-decoration:none;white-space:nowrap;margin-left:auto;}
.mob-child-stats{display:grid;grid-template-columns:1fr 1px 1fr 1px 1fr;padding-top:12px;border-top:1px solid #f1f5f9;text-align:center;}
body.dark .mob-child-stats{border-color:#334155;}
.mob-cstat-val{font-size:1rem;font-weight:800;color:#111827;margin:0;}
body.dark .mob-cstat-val{color:#f1f5f9;}
.mob-cstat-lbl{font-size:.64rem;color:#6b7280;margin:2px 0 0;}
.mob-cstat-sep{background:#f1f5f9;}
body.dark .mob-cstat-sep{background:#334155;}
.mob-admin-welcome{background:#fff;border-radius:14px;padding:16px;margin:12px 12px 0;box-shadow:0 1px 3px rgba(0,0,0,.07);text-align:center;}
body.dark .mob-admin-welcome{background:#1e293b;}
.mob-admin-avatar{width:68px;height:68px;border-radius:50%;background:#e0e7ff;color:#4f46e5;font-size:1.7rem;display:flex;align-items:center;justify-content:center;margin:0 auto 10px;}
.mob-admin-welcome-sub{font-size:.72rem;color:#6b7280;margin:0 0 2px;}
.mob-admin-name{font-size:1.1rem;font-weight:800;color:#111827;margin:0 0 6px;}
body.dark .mob-admin-name{color:#f1f5f9;}
.mob-admin-role-badge{display:inline-flex;align-items:center;gap:4px;background:#fef9c3;color:#ca8a04;border-radius:20px;padding:4px 12px;font-size:.74rem;font-weight:700;}
.mob-admin-panel{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
.mob-admin-panel-item{background:#fff;border-radius:12px;padding:14px 6px;display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;box-shadow:0 1px 3px rgba(0,0,0,.06);position:relative;}
body.dark .mob-admin-panel-item{background:#1e293b;}
.mob-admin-panel-icon{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.1rem;}
.mob-admin-panel-item span{font-size:.72rem;color:#374151;font-weight:600;text-align:center;}
body.dark .mob-admin-panel-item span{color:#cbd5e1;}
.mob-admin-panel-badge{position:absolute;top:5px;right:5px;background:#ef4444;color:#fff;border-radius:50%;width:17px;height:17px;font-size:.58rem;font-weight:700;display:flex;align-items:center;justify-content:center;}
.mob-overview-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 12px;margin:10px 0 0;}
.mob-att-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.mob-att-chip{background:#fff;border-radius:10px;padding:12px 10px;display:flex;align-items:center;gap:8px;box-shadow:0 1px 3px rgba(0,0,0,.07);}
body.dark .mob-att-chip{background:#1e293b;}
.mob-att-chip-icon{font-size:1.1rem;flex-shrink:0;}
.mob-att-chip p{margin:0;line-height:1.25;}
.mob-att-chip-val{font-size:1.05rem;font-weight:800;color:#111827;}
body.dark .mob-att-chip-val{color:#f1f5f9;}
.mob-att-chip-lbl{font-size:.63rem;color:#6b7280;}
.mob-att-chip-pct{font-size:.72rem;font-weight:700;}
.mob-overview-card{background:#fff;border-radius:12px;padding:14px;box-shadow:0 1px 3px rgba(0,0,0,.06);overflow:hidden;}
body.dark .mob-overview-card{background:#1e293b;}
.mob-ov-label{font-size:.7rem;color:#6b7280;margin:0;}
.mob-ov-val{font-size:1.3rem;font-weight:800;color:#111827;margin:2px 0 8px;}
body.dark .mob-ov-val{color:#f1f5f9;}
.mob-ov-bars{display:flex;align-items:flex-end;gap:3px;height:36px;}
.mob-ov-bar{flex:1;border-radius:2px 2px 0 0;background:#3b82f6;opacity:.75;}
.mob-ov-line-svg{width:100%;height:36px;}
.mob-admin-bnav{display:none;}
@media(max-width:991.98px){
  .mob-admin-bnav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid #f1f5f9;z-index:1050;padding:8px 0 6px;}
  body.dark .mob-admin-bnav{background:#0f172a;border-color:#1e293b;}
  .mob-admin-bnav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;color:#6b7280;text-decoration:none;font-size:.6rem;font-weight:600;}
  .mob-admin-bnav a i{font-size:1.1rem;}
  .mob-admin-bnav a.active{color:#3b82f6;}
  .eims-frame-admin .eims-dash-wrap{padding-bottom:76px;}
}
/* Mobile settings collapsible submenu */
.mob-settings-group{margin-bottom:8px;}
.mob-settings-group summary{list-style:none;margin-bottom:0;}
.mob-settings-group summary::-webkit-details-marker{display:none;}
.mob-settings-summary{display:flex;align-items:center;gap:8px;width:100%;color:#fff;padding:.85rem 1rem;border-radius:14px;background:rgba(255,255,255,.08);border:0;text-align:left;font-weight:650;cursor:pointer;transition:background .2s;}
.mob-settings-summary:hover{background:rgba(255,255,255,.18);}
.mob-settings-chevron{margin-left:auto;font-size:.75rem;transition:transform .25s ease;}
.mob-settings-group[open] .mob-settings-chevron{transform:rotate(180deg);}
.mob-settings-sub{padding-left:8px;margin-top:4px;border-left:2px solid rgba(148,163,184,.25);margin-left:10px;}
.mob-settings-sub a{font-size:.8rem!important;padding:.5rem .85rem!important;background:rgba(255,255,255,.04)!important;border-radius:10px!important;color:rgba(255,255,255,.72)!important;margin-bottom:4px!important;}
.mob-settings-sub a:hover{background:rgba(255,255,255,.13)!important;color:#fff!important;}
/* Permission table: fix sticky thead z-index bleeding over mobile menu */
.permission-table thead.sticky-top{z-index:1!important;}
@media(max-width:991.98px){.permission-table thead.sticky-top{position:static!important;}}
/* Permission table: compact layout on small screens */
@media(max-width:575px){
  .permission-table{min-width:420px;font-size:.75rem;}
  .permission-table th,.permission-table td{white-space:normal;padding:.3rem .4rem;}
  .permission-table-wrap{overflow-x:auto;}
}
/* ── Suppress floating header.php widgets inside app-frame ── */
body:has(.eims-app-frame) > .dashboard-language-floating{display:none !important;}
body:has(.eims-app-frame) > .eims-notification-widget{display:none !important;}
/* ── Fix: teacher sub-page hero – reduce heading size, weight, spacing ── */
.teacher-dashboard-theme .teacher-hero h2,
.module-page .teacher-hero h2,
.teacher-results-page .teacher-hero h2,
.payslip-page-head h2{
    font-size:clamp(1.4rem,2vw,2rem) !important;
    font-weight:700 !important;
    margin:6px 0 4px !important;
    line-height:1.2 !important;
    letter-spacing:-.02em !important;
}
body.dark .teacher-dashboard-theme .teacher-hero h2,
body.dark .module-page .teacher-hero h2,
body.dark .teacher-results-page .teacher-hero h2,
body.dark .payslip-page-head h2{color:#f1f5f9 !important;}
.teacher-dashboard-theme .teacher-hero p,
.module-page .teacher-hero p,
.teacher-results-page .teacher-hero p,
.payslip-page-head p{
    font-size:.875rem !important;
    line-height:1.5 !important;
    margin:0 !important;
    color:#64748b !important;
}
body.dark .teacher-dashboard-theme .teacher-hero p,
body.dark .module-page .teacher-hero p,
body.dark .teacher-results-page .teacher-hero p,
body.dark .payslip-page-head p{color:#94a3b8 !important;}
.teacher-kicker{
    font-size:.72rem !important;
    padding:3px 10px !important;
    font-weight:600 !important;
}
.teacher-dashboard-theme .teacher-hero,
.module-page .teacher-hero,
.teacher-results-page .teacher-hero{
    padding:14px 20px !important;
    margin-bottom:16px !important;
    min-height:auto !important;
}
.teacher-hero .teacher-hero-copy{
    padding-left:0 !important;
    padding-right:0 !important;
    margin-left:0 !important;
}
/* ── Fixed Topbar (all roles) ── */
.eims-app-header{position:fixed !important;top:0;left:0;right:0;z-index:300 !important;}
.eims-dash-wrap{padding-top:58px;}
@media(min-width:992px){
  .eims-app-header{padding-left:268px !important;}
  body.eims-sidebar-collapsed .eims-app-header{padding-left:16px !important;}
}
@media(min-width:1200px){
  .eims-app-header{padding-left:280px !important;}
  body.eims-sidebar-collapsed .eims-app-header{padding-left:16px !important;}
}

/* ═══ INBOX v2 — WhatsApp style ═══ */
.inbox-shell{display:flex;height:calc(100vh - 56px);background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(0,0,0,.08);}
/* Sidebar */
.inbox-sidebar{display:flex;flex-direction:column;width:340px;min-width:280px;border-right:1px solid #e9ecef;background:#fff;overflow:hidden;}
.inbox-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 12px;border-bottom:1px solid #f0f2f5;}
.inbox-heading{font-size:1.25rem;font-weight:700;color:#0f172a;margin:0;}
.inbox-icon-btn{width:36px;height:36px;border:none;background:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#54656f;font-size:1.1rem;cursor:pointer;transition:background .15s;}
.inbox-icon-btn:hover{background:#f0f2f5;}
body.dark .inbox-icon-btn:hover{background:#1e293b;}
/* Tabs */
.inbox-tabs-row{display:flex;gap:0;padding:8px 12px 0;border-bottom:1px solid #f0f2f5;}
.inbox-tab-btn{flex:1;border:none;background:transparent;font-size:.82rem;font-weight:600;color:#8696a0;padding:8px 4px;cursor:pointer;border-bottom:2px solid transparent;transition:color .15s,border-color .15s;}
.inbox-tab-btn.active{color:#0f766e;border-bottom-color:#0f766e;}
.inbox-tab-count{background:#0f766e;color:#fff;border-radius:10px;font-size:.7rem;padding:1px 5px;margin-left:4px;}
/* Search */
.inbox-search-row{display:flex;align-items:center;gap:8px;padding:8px 12px;}
.inbox-search-wrap{flex:1;display:flex;align-items:center;gap:8px;background:#f0f2f5;border-radius:8px;padding:6px 12px;}
.inbox-search-wrap i{color:#8696a0;font-size:.9rem;flex-shrink:0;}
.inbox-search-wrap input{border:none;background:transparent;flex:1;font-size:.88rem;color:#0f172a;outline:none;}
.inbox-search-clear{border:none;background:transparent;color:#8696a0;cursor:pointer;padding:0;font-size:.8rem;}
body.dark .inbox-search-wrap{background:#1e293b;}
body.dark .inbox-search-wrap input{color:#f1f5f9;}
/* Contact list */
.inbox-contact-list{flex:1;overflow-y:auto;overflow-x:hidden;}
.inbox-contact{display:flex;align-items:center;gap:12px;padding:10px 16px 10px 13px;text-decoration:none;color:inherit;border-bottom:1px solid #f5f5f5;transition:background .12s;cursor:pointer;border-left:3px solid transparent;}
.inbox-contact:hover{background:#f5f5f5;}
.inbox-contact.active{background:#ebf5fb;border-left:3px solid #0f766e;}
body.dark .inbox-contact.active{background:#1e293b;}
body.dark .inbox-contact:hover{background:#1e2533;}
.inbox-contact-avt{position:relative;flex-shrink:0;}
.inbox-contact-avt .inbox-photo{width:48px;height:48px;border-radius:50%;object-fit:cover;}
.inbox-contact-avt .inbox-presence{width:11px;height:11px;border-radius:50%;position:absolute;bottom:2px;right:2px;border:2px solid #fff;}
.inbox-contact-avt .inbox-presence.online{background:#25d366;}
.inbox-contact-avt .inbox-presence.offline{background:#94a3b8;}
.inbox-contact-avt .inbox-team-avatar{width:48px;height:48px;border-radius:50%;background:#e2e8f0;display:flex;align-items:center;justify-content:center;font-size:1.2rem;color:#64748b;}
.inbox-contact-body{flex:1;min-width:0;}
.inbox-contact-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:2px;}
.inbox-contact-top strong{font-size:.9rem;font-weight:600;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.inbox-contact-time{font-size:.72rem;color:#8696a0;white-space:nowrap;flex-shrink:0;}
.inbox-contact-btm{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.inbox-contact-prev{font-size:.8rem;color:#8696a0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;}
.inbox-unread-badge{background:#25d366;color:#fff;border-radius:50%;min-width:20px;height:20px;font-size:.7rem;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px;flex-shrink:0;}
.inbox-empty-list{padding:16px;font-size:.85rem;color:#8696a0;text-align:center;}
/* Chat area */
.inbox-chat{flex:1;display:flex;flex-direction:column;min-width:0;background:#f0f2f5;}
body.dark .inbox-chat{background:#111b21;}
.inbox-chat-head{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:#fff;border-bottom:1px solid #e9ecef;min-height:62px;}
body.dark .inbox-chat-head{background:#1f2c34;border-bottom-color:#2a3942;}
.inbox-chat-head .inbox-contact-avt .inbox-photo{width:42px;height:42px;}
.inbox-contact-avt.inbox-contact-avt--lg .inbox-photo{width:42px;height:42px;border-radius:50%;object-fit:cover;}
.inbox-contact-avt.inbox-contact-avt--lg .inbox-team-avatar{width:42px;height:42px;font-size:1.1rem;}
.inbox-contact-avt--lg .inbox-presence{width:11px;height:11px;bottom:1px;right:1px;}
.inbox-chat-name{font-size:.95rem;font-weight:700;color:#0f172a;line-height:1.2;}
.inbox-chat-status{font-size:.78rem;color:#8696a0;display:flex;align-items:center;gap:4px;}
.inbox-online-dot{width:7px;height:7px;border-radius:50%;background:#25d366;display:inline-block;flex-shrink:0;}
.inbox-chat-actions{display:flex;align-items:center;gap:2px;}
body.dark .inbox-chat-name{color:#e9edef;}
/* Thread */
.inbox-thread{flex:1;overflow-y:auto;padding:16px 8%;display:flex;flex-direction:column;gap:2px;}
/* Date separator */
.inbox-date-sep{text-align:center;margin:12px 0;position:relative;}
.inbox-date-sep span{background:#fff;color:#8696a0;font-size:.75rem;font-weight:600;padding:4px 12px;border-radius:8px;display:inline-block;box-shadow:0 1px 2px rgba(0,0,0,.08);}
body.dark .inbox-date-sep span{background:#2a3942;color:#8696a0;}
/* Messages */
.inbox-message-row{display:flex;align-items:flex-end;gap:8px;margin-bottom:2px;}
.inbox-message-row.mine{flex-direction:row-reverse;}
.inbox-message-row .inbox-photo-sm,.inbox-message-row .inbox-msg-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover;flex-shrink:0;}
.inbox-bubble{max-width:65%;padding:8px 12px 6px;border-radius:8px;position:relative;word-wrap:break-word;}
.inbox-message-row.theirs .inbox-bubble{background:#fff;border-radius:0 8px 8px 8px;box-shadow:0 1px 2px rgba(0,0,0,.08);}
.inbox-message-row.mine .inbox-bubble{background:#d9fdd3;border-radius:8px 0 8px 8px;}
body.dark .inbox-message-row.theirs .inbox-bubble{background:#202c33;}
body.dark .inbox-message-row.mine .inbox-bubble{background:#005c4b;}
.inbox-message-text{font-size:.9rem;line-height:1.4;color:#0f172a;}
body.dark .inbox-message-text{color:#e9edef;}
.inbox-bubble-meta{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:4px;}
.inbox-bubble-meta time{font-size:.7rem;color:#8696a0;}
.inbox-time-ago{font-size:.65rem;color:#94a3b8;font-weight:500;background:rgba(0,0,0,.06);border-radius:10px;padding:1px 5px;line-height:1.4;}
.mine .inbox-bubble-meta .inbox-time-ago{background:rgba(0,0,0,.12);color:rgba(255,255,255,.65);}
body.dark .inbox-time-ago{background:rgba(255,255,255,.08);color:#94a3b8;}
body.dark .mine .inbox-bubble-meta .inbox-time-ago{background:rgba(0,0,0,.2);color:rgba(255,255,255,.5);}
.inbox-del-hint{position:relative;display:inline-flex;align-items:center;font-size:.82rem;color:#64748b;cursor:default;line-height:1;}
.mine .inbox-bubble-meta .inbox-del-hint{color:#3d7a5e;}
body.dark .inbox-del-hint{color:#94a3b8;}
body.dark .mine .inbox-bubble-meta .inbox-del-hint{color:#6ee7b7;}
.inbox-del-hint::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 7px);left:0;right:auto;transform:none;background:#1e293b;color:#f8fafc;padding:5px 10px;border-radius:7px;font-size:.7rem;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:200;}
.inbox-del-hint::before{content:'';position:absolute;bottom:calc(100% + 2px);left:6px;right:auto;transform:none;border:5px solid transparent;border-top-color:#1e293b;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:200;}
.mine .inbox-bubble-meta .inbox-del-hint::after{left:auto;right:0;}
.mine .inbox-bubble-meta .inbox-del-hint::before{left:auto;right:6px;}
.inbox-del-hint:hover::after,.inbox-del-hint:hover::before{opacity:1;}
.inbox-read-receipt{font-size:.85rem;color:#53bdeb;}
.inbox-star-icon{font-size:.7rem;color:#f59e0b;}
.inbox-edited-label{font-size:.7rem;color:#8696a0;}
/* Empty chat */
.inbox-empty-chat{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#8696a0;}
.inbox-empty-chat i{font-size:3rem;}
.inbox-empty-chat strong{font-size:1rem;color:#0f172a;}
body.dark .inbox-empty-chat strong{color:#e9edef;}
/* Composer */
.inbox-composer{background:#fff;border-top:1px solid #e9ecef;padding:8px 12px;display:flex!important;flex-direction:column!important;gap:0;width:100%;box-sizing:border-box;grid-template-columns:none!important;position:relative;}
body.dark .inbox-composer{background:#1f2c34;border-top-color:#2a3942;}
.inbox-composer-row{display:flex!important;align-items:center;gap:4px;width:100%;box-sizing:border-box;}
.inbox-message-box{flex:1;min-width:0;background:#f0f2f5;border-radius:8px;padding:8px 12px;display:flex;align-items:center;}
body.dark .inbox-message-box{background:#2a3942;}
.inbox-message-storage{display:none;}
.inbox-message-editor{flex:1;outline:none;font-size:.9rem;min-height:20px;max-height:120px;overflow-y:auto;color:#0f172a;line-height:1.4;}
body.dark .inbox-message-editor{color:#e9edef;}
.inbox-message-editor:empty::before{content:attr(data-placeholder);color:#8696a0;pointer-events:none;}
.inbox-composer-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;}
.inbox-composer-tools{position:relative;}
.inbox-send-btn{width:42px;height:42px;border:none;border-radius:50%;background:#0f766e;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1rem;cursor:pointer;transition:background .15s;flex-shrink:0;}
.inbox-send-btn:hover{background:#0e6b62;}
/* Details panel */
.inbox-details-panel{width:300px;border-left:1px solid #e9ecef;background:#fff;display:flex;flex-direction:column;overflow-y:auto;}
body.dark .inbox-details-panel{background:#111b21;border-left-color:#2a3942;}
.inbox-details-panel.d-none{display:none!important;}
.inbox-details-head{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid #f0f2f5;font-weight:700;font-size:1rem;color:#0f172a;}
body.dark .inbox-details-head{color:#e9edef;border-bottom-color:#2a3942;}
.inbox-details-profile{display:flex;flex-direction:column;align-items:center;padding:20px 16px;gap:8px;border-bottom:1px solid #f0f2f5;}
.inbox-details-avatar-wrap{width:80px;height:80px;}
.inbox-details-avatar{width:80px;height:80px;border-radius:50%;object-fit:cover;}
.inbox-details-name{font-size:1rem;font-weight:700;color:#0f172a;text-align:center;}
.inbox-details-status{font-size:.82rem;color:#8696a0;display:flex;align-items:center;gap:4px;}
.inbox-details-status.is-online .inbox-online-dot,.inbox-details-status .inbox-online-dot{display:inline-block;}
body.dark .inbox-details-name{color:#e9edef;}
.inbox-details-section{padding:12px 16px;border-bottom:1px solid #f0f2f5;}
body.dark .inbox-details-section{border-bottom-color:#2a3942;}
.inbox-details-section-title{font-size:.78rem;font-weight:700;color:#8696a0;text-transform:uppercase;letter-spacing:.04em;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;}
.inbox-details-see-all{font-size:.78rem;color:#0f766e;text-decoration:none;}
.inbox-details-about-row{font-size:.85rem;color:#0f172a;padding:2px 0;}
body.dark .inbox-details-about-row{color:#e9edef;}
.inbox-details-media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;}
.inbox-details-option{display:flex;align-items:center;gap:10px;padding:10px 0;cursor:pointer;font-size:.88rem;color:#0f172a;border-bottom:1px solid #f5f5f5;}
.inbox-details-option:last-child{border-bottom:none;}
.inbox-details-option i{font-size:1rem;color:#54656f;width:20px;text-align:center;}
.inbox-details-option.danger{color:#ef4444;}
.inbox-details-option.danger i{color:#ef4444;}
body.dark .inbox-details-option{color:#e9edef;border-bottom-color:#2a3942;}
.inbox-details-toggle{position:relative;display:inline-flex;cursor:pointer;}
.inbox-details-toggle input{opacity:0;width:0;height:0;position:absolute;}
.inbox-toggle-track{width:36px;height:20px;background:#ccc;border-radius:10px;transition:background .2s;}
.inbox-details-toggle input:checked + .inbox-toggle-track{background:#0f766e;}
/* Admin vs non-admin wrapper fix */
.container .inbox-shell{margin:-20px -12px;width:calc(100% + 24px);height:calc(100vh - 100px);border-radius:8px;}
/* Responsive */
@media(max-width:991px){
  .inbox-sidebar{width:100%;position:absolute;left:0;top:0;bottom:0;z-index:10;transition:transform .25s;}
  .inbox-chat{width:100%;}
  .inbox-details-panel{position:absolute;right:0;top:0;bottom:0;z-index:10;}
  .inbox-shell{position:relative;height:calc(100vh - 56px);}
}
/* Dark mode adjustments */
body.dark .inbox-shell{background:#111b21;}
body.dark .inbox-sidebar{background:#111b21;border-right-color:#2a3942;}
body.dark .inbox-sidebar-head{border-bottom-color:#2a3942;}
body.dark .inbox-contact{border-bottom-color:#1e2a30;}
body.dark .inbox-contact-avt .inbox-presence{border-color:#111b21;}
body.dark .inbox-contact-top strong{color:#e9edef;}
body.dark .inbox-tabs-row{border-bottom-color:#2a3942;}
body.dark .inbox-composer-row .inbox-icon-btn{color:#8696a0;}
/* ─── Inbox v2 conflict overrides ─── */
.inbox-sidebar-head .inbox-icon-btn i,
.inbox-sidebar-head .inbox-icon-btn i.bi{width:auto!important;height:auto!important;display:inline!important;background:transparent!important;color:inherit!important;border-radius:0!important;margin-left:0!important;place-items:unset!important;}
.inbox-sidebar-head{min-height:0!important;}
.inbox-shell{max-height:none!important;min-height:0!important;display:flex!important;}
.inbox-page-outer{padding:0!important;margin:0!important;flex:1;display:flex;flex-direction:column;overflow:hidden;height:calc(100vh - 58px);}
body:has(.inbox-page-outer){overflow:hidden;}
.inbox-page-outer .inbox-shell{flex:1;height:auto!important;max-height:none!important;border-radius:0!important;box-shadow:none!important;width:100%!important;}
.main:has(.inbox-shell){height:100vh;display:flex!important;flex-direction:column;overflow:hidden;}
.main:has(.inbox-shell) .inbox-shell{flex:1;height:auto!important;max-height:none!important;border-radius:0!important;box-shadow:none!important;width:100%!important;}
.inbox-sidebar{display:flex!important;flex-direction:column!important;}
.inbox-shell > .student-dashboard-menu{
  width:min(300px,calc(100vw - 16px))!important;
  padding:8px!important;
  border-radius:18px!important;
  background:rgba(15,23,42,.96)!important;
  border:1px solid rgba(148,163,184,.25)!important;
  box-shadow:0 18px 44px rgba(15,23,42,.28)!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
}
.inbox-shell > .student-dashboard-menu .student-dashboard-menu-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  margin:0 0 6px!important;
  padding:7px 8px!important;
  text-align:left!important;
}
.inbox-shell > .student-dashboard-menu a,
.inbox-shell > .student-dashboard-menu .dashboard-menu-action{
  min-height:38px!important;
  margin-bottom:4px!important;
  padding:6px 9px!important;
  gap:9px!important;
  border-radius:12px!important;
  font-size:.875rem!important;
}
.inbox-shell > .student-dashboard-menu a i,
.inbox-shell > .student-dashboard-menu .dashboard-menu-action > i{
  width:28px!important;
  height:28px!important;
  flex:0 0 28px!important;
  border-radius:9px!important;
  font-size:.82rem!important;
}
.inbox-shell > .student-dashboard-menu .dark-mode-toggle,
.inbox-shell > .student-dashboard-menu .student-dashboard-menu-logout{
  margin-top:4px!important;
}
.inbox-shell > .inbox-dashboard-menu{
  width:min(300px,calc(100vw - 16px))!important;
  max-width:calc(100vw - 16px)!important;
  padding:8px!important;
  border-radius:18px!important;
  background:rgba(15,23,42,.96)!important;
  border:1px solid rgba(148,163,184,.25)!important;
  box-shadow:0 18px 44px rgba(15,23,42,.28)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(148,163,184,.5) transparent;
}
.inbox-shell > .inbox-dashboard-menu::-webkit-scrollbar{width:5px;}
.inbox-shell > .inbox-dashboard-menu::-webkit-scrollbar-thumb{
  background:rgba(148,163,184,.5);
  border-radius:999px;
}
.inbox-shell > .inbox-dashboard-menu .student-dashboard-menu-title{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  margin:0 0 6px!important;
  padding:7px 8px!important;
  text-align:left!important;
}
.inbox-shell > .inbox-dashboard-menu a,
.inbox-shell > .inbox-dashboard-menu .dashboard-menu-action{
  width:100%!important;
  min-height:38px!important;
  margin:0 0 4px!important;
  padding:6px 9px!important;
  gap:9px!important;
  border-radius:12px!important;
  font-size:.875rem!important;
  line-height:1.2!important;
}
.inbox-shell > .inbox-dashboard-menu a i,
.inbox-shell > .inbox-dashboard-menu .dashboard-menu-action > i{
  width:28px!important;
  height:28px!important;
  flex:0 0 28px!important;
  border-radius:9px!important;
  font-size:.82rem!important;
}
.inbox-shell > .inbox-dashboard-menu .dark-mode-toggle,
.inbox-shell > .inbox-dashboard-menu .student-dashboard-menu-logout{
  margin-top:4px!important;
}
.inbox-message-row{display:flex!important;align-items:flex-end!important;width:100%;flex-direction:row!important;margin-bottom:4px!important;}
.inbox-message-row.mine{justify-content:flex-end!important;flex-direction:row!important;}
.inbox-message-row.theirs{justify-content:flex-start!important;flex-direction:row!important;}
.inbox-tick-sent{color:#94a3b8;font-size:.82rem;}
.inbox-tick-read{color:#53bdeb;font-size:.82rem;}
.inbox-details-toggle{display:inline-flex;align-items:center;cursor:pointer;flex-shrink:0;}
.inbox-details-toggle input[type=checkbox]{opacity:0;width:0;height:0;position:absolute;}
.inbox-toggle-track{display:inline-block;width:42px;height:24px;background:#ccc;border-radius:12px;transition:background .2s;position:relative;flex-shrink:0;}
.inbox-toggle-track::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .2s;}
.inbox-details-toggle input:checked + .inbox-toggle-track{background:#0f766e;}
.inbox-details-toggle input:checked + .inbox-toggle-track::after{transform:translateX(18px);}
.inbox-thread-search{background:#fff;border-bottom:1px solid #e9ecef;padding:6px 12px;flex-shrink:0;}
.inbox-thread-search-inner{display:flex;align-items:center;gap:6px;background:#f0f2f5;border-radius:8px;padding:6px 10px;}
.inbox-thread-search-inner i.bi-search{color:#8696a0;flex-shrink:0;}
.inbox-thread-search-inner input{border:none;background:transparent;flex:1;font-size:.88rem;color:#0f172a;outline:none;}
#inboxThreadSearchCount{font-size:.78rem;color:#8696a0;white-space:nowrap;}
mark.inbox-search-hl{background:#fef08a;color:inherit;border-radius:2px;padding:0 1px;}
.inbox-media-thumb{width:100%;height:70px;object-fit:cover;border-radius:6px;cursor:pointer;transition:opacity .15s;}
.inbox-media-thumb:hover{opacity:.8;}
.inbox-details-no-media{font-size:.8rem;color:#8696a0;grid-column:1/-1;}
.inbox-details-option{display:flex!important;align-items:center!important;}
/* ── Fix double time display ── */
.inbox-bubble .inbox-bubble-meta time{position:static!important;right:auto!important;bottom:auto!important;color:#8696a0;font-size:.72rem;}
.inbox-bubble{padding:8px 12px 6px!important;}
/* ── inbox-message-box ── */
.inbox-message-box{flex:1!important;min-width:0!important;width:auto!important;}
.inbox-message-box .inbox-message-editor{border:none!important;background:transparent!important;padding:0!important;border-radius:0!important;min-height:22px!important;max-height:100px!important;box-shadow:none!important;outline:none!important;}
.inbox-message-box .inbox-message-editor:empty::before{color:#8696a0;}
/* ── Filter dropdown ── */
.inbox-filter-dropdown{position:absolute;top:calc(100% + 4px);right:0;background:#fff;border:1px solid #e9ecef;border-radius:10px;box-shadow:0 4px 20px rgba(0,0,0,.12);z-index:200;min-width:190px;padding:4px 0;overflow:hidden;}
body.dark .inbox-filter-dropdown{background:#233138;border-color:#2a3942;}
.inbox-filter-dropdown button{display:flex;align-items:center;gap:8px;width:100%;padding:9px 16px;border:none;background:transparent;font-size:.86rem;color:#0f172a;cursor:pointer;text-align:left;transition:background .12s;}
.inbox-filter-dropdown button:hover{background:#f0f2f5;}
.inbox-filter-dropdown button.active{color:#0f766e;font-weight:600;}
body.dark .inbox-filter-dropdown button{color:#e9edef;}
body.dark .inbox-filter-dropdown button:hover{background:#1e2e36;}
/* ── New chat modal ── */
.inbox-new-chat-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:1050;display:flex;align-items:flex-start;justify-content:center;padding-top:80px;}
.inbox-new-chat-modal.d-none{display:none!important;}
.inbox-new-chat-card{background:#fff;border-radius:14px;width:380px;max-width:95vw;max-height:70vh;display:flex;flex-direction:column;box-shadow:0 8px 40px rgba(0,0,0,.22);overflow:hidden;}
body.dark .inbox-new-chat-card{background:#233138;}
.inbox-new-chat-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e9ecef;font-weight:700;font-size:.95rem;color:#0f172a;flex-shrink:0;}
body.dark .inbox-new-chat-head{border-bottom-color:#2a3942;color:#e9edef;}
.inbox-new-chat-search-row{padding:8px 12px;border-bottom:1px solid #e9ecef;flex-shrink:0;}
body.dark .inbox-new-chat-search-row{border-bottom-color:#2a3942;}
.inbox-new-chat-search{display:flex;align-items:center;gap:8px;background:#f0f2f5;border-radius:8px;padding:7px 10px;}
body.dark .inbox-new-chat-search{background:#2a3942;}
.inbox-new-chat-search i{color:#8696a0;flex-shrink:0;}
.inbox-new-chat-search input{border:none;background:transparent;flex:1;font-size:.88rem;color:#0f172a;outline:none;}
body.dark .inbox-new-chat-search input{color:#e9edef;}
.inbox-new-chat-list{overflow-y:auto;flex:1;}
.inbox-new-chat-item{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;transition:background .12s;text-decoration:none;color:inherit;}
.inbox-new-chat-item:hover{background:#f0f2f5;}
body.dark .inbox-new-chat-item:hover{background:#1e2e36;}
.inbox-new-chat-item-avt{width:42px;height:42px;border-radius:50%;background:#e2e8f0;display:flex;align-items:center;justify-content:center;font-size:.82rem;font-weight:700;color:#475569;flex-shrink:0;overflow:hidden;}
.inbox-new-chat-item-avt img{width:100%;height:100%;object-fit:cover;border-radius:50%;}
.inbox-new-chat-item-info strong{display:block;font-size:.88rem;color:#0f172a;font-weight:600;}
.inbox-new-chat-item-info small{font-size:.78rem;color:#8696a0;}
body.dark .inbox-new-chat-item-info strong{color:#e9edef;}
/* ── Non-member team contacts ── */
.inbox-contact.non-member{opacity:.55;cursor:default!important;}
.inbox-non-member-badge{font-size:.68rem;padding:1px 5px;background:#e2e8f0;border-radius:4px;color:#64748b;margin-left:4px;display:inline-flex;align-items:center;gap:2px;}
body.dark .inbox-non-member-badge{background:#2a3942;color:#94a3b8;}
/* ── Document attachment card ── */
.inbox-file-preview .inbox-attachment{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#f0f2f5;border-radius:8px;text-decoration:none;color:#0f172a;margin-top:4px;font-size:.85rem;max-width:260px;transition:background .12s;}
.inbox-file-preview .inbox-attachment:hover{background:#e2e8f0;}
body.dark .inbox-file-preview .inbox-attachment{background:#2a3942;color:#e9edef;}
.inbox-file-preview .inbox-attachment i.bi-file-earmark-arrow-down{font-size:1.2rem;color:#0f766e;flex-shrink:0;}
.inbox-file-preview .inbox-attachment span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* ── Media grid document tiles ── */
.inbox-media-doc-thumb{width:100%;height:70px;border-radius:6px;background:#f0f2f5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;text-decoration:none;color:#0f172a;font-size:.65rem;overflow:hidden;padding:4px;transition:opacity .15s;}
.inbox-media-doc-thumb:hover{opacity:.8;}
.inbox-media-doc-thumb i{font-size:1.5rem;color:#0f766e;}
body.dark .inbox-media-doc-thumb{background:#2a3942;color:#e9edef;}
/* ══ Call overlay v2 — floating window ══ */
.inbox-call-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(2,6,23,.55);pointer-events:none;}
/* Transparent backdrop when call is active — inbox stays visible/usable */
.inbox-call-overlay.is-active-call{background:transparent!important;}
.inbox-call-card{width:min(560px,100%);height:min(560px,90vh);display:flex;flex-direction:column;background:linear-gradient(180deg,#0f172a 0%,#0a1020 100%);border:1px solid rgba(255,255,255,.1);border-radius:24px;overflow:hidden;box-shadow:0 32px 80px rgba(0,0,0,.55);pointer-events:all;user-select:none;}
/* Mobile: full-screen call card with always-visible controls */
@media(max-width:768px){
  .inbox-call-overlay{padding:0!important;align-items:stretch!important;}
  .inbox-call-card{width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;}
  .inbox-call-hover-controls{opacity:1!important;pointer-events:all!important;position:relative!important;bottom:auto!important;left:auto!important;right:auto!important;background:rgba(2,6,23,.9)!important;padding:8px 0 0!important;}
  .inbox-call-active{flex:1;min-height:0;}
  .inbox-call-controls{flex-wrap:wrap;gap:10px!important;padding:10px 12px 16px!important;}
  .inbox-call-ctrl{min-width:56px!important;height:56px!important;}
  .inbox-call-device-row{display:none!important;}
  .inbox-call-incoming{padding:40px 20px 28px!important;}
  .inbox-call-incoming-btns{gap:40px!important;}
  .inbox-call-incoming-btn .call-ctrl-icon{width:72px!important;height:72px!important;font-size:1.6rem!important;}
}
/* Floating/draggable mode */
.inbox-call-card.is-floating{position:fixed;z-index:10000;border-radius:20px;width:min(560px,96vw);cursor:default;}
.inbox-call-card.is-floating .inbox-call-header{cursor:grab;}
.inbox-call-card.is-floating .inbox-call-header:active{cursor:grabbing;}
/* Maximized */
.inbox-call-card.is-maximized{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;border-radius:0!important;top:0!important;left:0!important;}
/* Minimized pip */
.inbox-call-card.is-minimized{position:fixed!important;bottom:24px!important;right:24px!important;width:auto!important;min-width:260px!important;max-width:340px!important;border-radius:16px!important;}
.inbox-call-card.is-minimized .inbox-call-active,.inbox-call-card.is-minimized .inbox-call-incoming,.inbox-call-card.is-minimized .inbox-call-hover-controls,.inbox-call-card.is-minimized .inbox-call-controls,.inbox-call-card.is-minimized .inbox-call-device-row{display:none!important;}
.inbox-call-card.is-minimized .inbox-call-header{padding:10px 14px;border-bottom:none;gap:8px;flex-wrap:nowrap;}
.inbox-call-card.is-minimized .inbox-call-header-info{flex-direction:row;align-items:center;gap:8px;min-width:0;flex:1;}
.inbox-call-card.is-minimized .inbox-call-header-info h5{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.9rem;margin:0;}
.inbox-call-card.is-minimized .inbox-call-header-info p{display:none;}
.inbox-call-card.is-minimized .inbox-call-header-actions{flex-shrink:0;gap:4px;}
.inbox-call-card.is-minimized .inbox-call-timer{font-size:.82rem;min-width:36px;}
.inbox-call-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px 8px;border-bottom:1px solid rgba(255,255,255,.06);}
.inbox-call-header-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;}
.inbox-call-header h5,#inboxCallTitle{margin:0;font-size:1rem;font-weight:700;color:#f1f5f9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#inboxCallStatus{margin:0;font-size:.76rem;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.inbox-call-header-actions{display:flex;align-items:center;gap:8px;}
.inbox-call-timer{font-size:.82rem;font-weight:600;color:#22d3ee;min-width:36px;text-align:right;flex-shrink:0;}
.inbox-call-type-pill{display:inline-flex;align-items:center;gap:4px;font-size:.7rem;font-weight:600;background:rgba(34,211,238,.12);color:#22d3ee;border:1px solid rgba(34,211,238,.2);border-radius:999px;padding:2px 8px;align-self:flex-start;}
.inbox-call-header-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;}
.inbox-call-hdr-btn{width:28px;height:28px;border:none;background:rgba(255,255,255,.08);border-radius:50%;color:#94a3b8;font-size:.85rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s;}
.inbox-call-hdr-btn:hover{background:rgba(255,255,255,.15);color:#f1f5f9;}
/* Incoming call state */
.inbox-call-incoming{display:flex;flex-direction:column;align-items:center;gap:10px;padding:32px 20px 24px;}
.inbox-call-incoming-avatar{width:80px;height:80px;border-radius:50%;background:linear-gradient(135deg,#0ea5e9,#2563eb);display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:800;color:#fff;flex-shrink:0;box-shadow:0 0 0 8px rgba(14,165,233,.15);}
.inbox-call-incoming-name{margin:4px 0 0;font-size:1.15rem;font-weight:700;color:#f1f5f9;}
.inbox-call-incoming-type{margin:0;font-size:.85rem;color:#94a3b8;display:flex;align-items:center;gap:5px;}
.inbox-call-incoming-btns{display:flex;gap:28px;margin-top:12px;}
.inbox-call-incoming-btn{display:flex;flex-direction:column;align-items:center;gap:6px;background:none;border:none;cursor:pointer;padding:0;}
.inbox-call-incoming-btn .call-ctrl-icon{width:62px;height:62px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.4rem;transition:transform .15s;}
.inbox-call-incoming-btn:hover .call-ctrl-icon{transform:scale(1.08);}
.inbox-call-incoming-btn.reject .call-ctrl-icon{background:#ef4444;color:#fff;}
.inbox-call-incoming-btn.accept .call-ctrl-icon{background:#22c55e;color:#fff;}
.inbox-call-incoming-btn .call-ctrl-label{font-size:.75rem;font-weight:600;color:#94a3b8;}
/* Active call video area — fills all available card height */
.inbox-call-active{position:relative;background:#020617;overflow:hidden;flex:1;display:flex;flex-direction:column;}
.inbox-call-videos{position:relative;flex:1;min-height:0;background:#020617;}
.inbox-remote-videos-grid{position:absolute;inset:0;background:#020617;display:flex;align-items:center;justify-content:center;}
.inbox-remote-video{width:100%;height:100%;object-fit:cover;background:#020617;}
.inbox-local-video-pip{position:absolute;right:12px;bottom:12px;width:120px;aspect-ratio:3/4;object-fit:cover;border-radius:14px;border:2px solid rgba(255,255,255,.7);box-shadow:0 8px 24px rgba(0,0,0,.5);z-index:2;background:#020617;transform:scaleX(-1);}
.inbox-call-audio-placeholder{display:flex;flex-direction:column;align-items:center;padding:24px 16px;}
/* Hover-reveal controls overlay */
.inbox-call-hover-controls{position:absolute;bottom:0;left:0;right:0;z-index:5;background:linear-gradient(to top,rgba(0,0,0,.88) 0%,transparent 100%);padding:40px 0 0;opacity:0;transition:opacity .25s ease;pointer-events:none;}
.inbox-call-active:hover .inbox-call-hover-controls{opacity:1;pointer-events:all;}
/* Controls */
.inbox-call-controls{display:flex;align-items:center;justify-content:center;gap:14px;padding:12px 18px 16px;background:transparent;border-top:none;}
.inbox-call-ctrl{display:flex;flex-direction:column;align-items:center;gap:5px;border:none;background:rgba(255,255,255,.12);border-radius:999px;padding:0;cursor:pointer;min-width:64px;height:64px;justify-content:center;transition:background .15s,transform .12s;color:#f1f5f9;}
.inbox-call-ctrl:hover{background:rgba(255,255,255,.22);transform:scale(1.05);}
.inbox-call-ctrl.active{background:rgba(239,68,68,.25);color:#f87171;}
.inbox-call-ctrl.danger{background:#ef4444 !important;color:#fff !important;}
.inbox-call-ctrl.danger:hover{background:#dc2626 !important;}
.inbox-call-ctrl .call-ctrl-icon{font-size:1.2rem;line-height:1;}
.inbox-call-ctrl .call-ctrl-label{font-size:.65rem;font-weight:600;color:#94a3b8;line-height:1;}
.inbox-call-ctrl.danger .call-ctrl-label{color:rgba(255,255,255,.8);}
/* Device row inside hover overlay */
.inbox-call-device-row{padding:6px 16px 0;border-top:none;}
.inbox-device-select{background:rgba(15,23,42,.7);color:#94a3b8;border:1px solid rgba(255,255,255,.08);border-radius:8px;font-size:.78rem;padding:5px 8px;}
/* Call log bubble time */
.icl-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.icl-time{font-size:.72rem;color:#78a09e;margin-left:auto;white-space:nowrap;}
.inbox-message-row.theirs .icl-time{color:#94a3b8;}
/* call-log-row alignment */
.inbox-message-row.call-log-row{justify-content:center;}
.inbox-message-row.call-log-row.mine{justify-content:flex-end;}
/* ── Student topbar: white background ── */
.eims-frame-student .eims-app-header{background:#ebf0fe !important;border-bottom:1px solid #e2e8f0 !important;box-shadow:0 1px 4px rgba(0,0,0,.06) !important;}
body.dark .eims-frame-student .eims-app-header{background:#1e293b !important;border-color:#334155 !important;}
.eims-frame-student .eims-app-header-logo{color:#0f172a !important;}
body.dark .eims-frame-student .eims-app-header-logo{color:#f1f5f9 !important;}
.eims-frame-student .eims-app-header-logo em{color:#0ea5e9 !important;}
.eims-frame-student .eims-app-hbtn{color:#475569 !important;}
body.dark .eims-frame-student .eims-app-hbtn{color:#94a3b8 !important;}
.eims-frame-student .eims-app-hbtn:hover{background:#f1f5f9 !important;color:#0f172a !important;}
body.dark .eims-frame-student .eims-app-hbtn:hover{background:#334155 !important;color:#f1f5f9 !important;}
.eims-frame-student .eims-notif-dot{border-color:#fff !important;}
body.dark .eims-frame-student .eims-notif-dot{border-color:#1e293b !important;}
/* ── Teacher topbar: white background ── */
.eims-frame-teacher .eims-app-header{background:#ebf0fe !important;border-bottom:1px solid #e2e8f0 !important;box-shadow:0 1px 4px rgba(0,0,0,.06) !important;}
body.dark .eims-frame-teacher .eims-app-header{background:#1e293b !important;border-color:#334155 !important;}
.eims-frame-teacher .eims-app-header-logo{color:#0f172a !important;}
body.dark .eims-frame-teacher .eims-app-header-logo{color:#f1f5f9 !important;}
.eims-frame-teacher .eims-app-header-logo em{color:#6366f1 !important;}
.eims-frame-teacher .eims-app-hbtn{color:#475569 !important;}
body.dark .eims-frame-teacher .eims-app-hbtn{color:#94a3b8 !important;}
.eims-frame-teacher .eims-app-hbtn:hover{background:#f1f5f9 !important;color:#0f172a !important;}
body.dark .eims-frame-teacher .eims-app-hbtn:hover{background:#334155 !important;color:#f1f5f9 !important;}
.eims-frame-teacher .eims-notif-dot{border-color:#fff !important;}
body.dark .eims-frame-teacher .eims-notif-dot{border-color:#1e293b !important;}
/* ── Staff topbar: white background ── */
.eims-frame-staff .eims-app-header{background:#ebf0fe !important;border-bottom:1px solid #e2e8f0 !important;box-shadow:0 1px 4px rgba(0,0,0,.06) !important;}
body.dark .eims-frame-staff .eims-app-header{background:#1e293b !important;border-color:#334155 !important;}
.eims-frame-staff .eims-app-header-logo{color:#0f172a !important;}
body.dark .eims-frame-staff .eims-app-header-logo{color:#f1f5f9 !important;}
.eims-frame-staff .eims-app-header-logo em{color:#f59e0b !important;}
.eims-frame-staff .eims-app-hbtn{color:#475569 !important;}
body.dark .eims-frame-staff .eims-app-hbtn{color:#94a3b8 !important;}
.eims-frame-staff .eims-app-hbtn:hover{background:#f1f5f9 !important;color:#0f172a !important;}
body.dark .eims-frame-staff .eims-app-hbtn:hover{background:#334155 !important;color:#f1f5f9 !important;}
.eims-frame-staff .eims-notif-dot{border-color:#fff !important;}
body.dark .eims-frame-staff .eims-notif-dot{border-color:#1e293b !important;}
/* ── Parent topbar: white background ── */
.eims-frame-parent .eims-app-header{background:#ebf0fe !important;border-bottom:1px solid #e2e8f0 !important;box-shadow:0 1px 4px rgba(0,0,0,.06) !important;}
body.dark .eims-frame-parent .eims-app-header{background:#1e293b !important;border-color:#334155 !important;}
.eims-frame-parent .eims-app-header-logo{color:#0f172a !important;}
body.dark .eims-frame-parent .eims-app-header-logo{color:#f1f5f9 !important;}
.eims-frame-parent .eims-app-header-logo em{color:#10b981 !important;}
.eims-frame-parent .eims-app-hbtn{color:#475569 !important;}
body.dark .eims-frame-parent .eims-app-hbtn{color:#94a3b8 !important;}
.eims-frame-parent .eims-app-hbtn:hover{background:#f1f5f9 !important;color:#0f172a !important;}
body.dark .eims-frame-parent .eims-app-hbtn:hover{background:#334155 !important;color:#f1f5f9 !important;}
.eims-frame-parent .eims-notif-dot{border-color:#fff !important;}
body.dark .eims-frame-parent .eims-notif-dot{border-color:#1e293b !important;}
/* ── Accountant topbar: white background ── */
.eims-frame-accountant .eims-app-header{background:#ebf0fe !important;border-bottom:1px solid #e2e8f0 !important;box-shadow:0 1px 4px rgba(0,0,0,.06) !important;}
body.dark .eims-frame-accountant .eims-app-header{background:#1e293b !important;border-color:#334155 !important;}
.eims-frame-accountant .eims-app-header-logo{color:#0f172a !important;}
body.dark .eims-frame-accountant .eims-app-header-logo{color:#f1f5f9 !important;}
.eims-frame-accountant .eims-app-header-logo em{color:#0f766e !important;}
.eims-frame-accountant .eims-app-hbtn{color:#475569 !important;}
body.dark .eims-frame-accountant .eims-app-hbtn{color:#94a3b8 !important;}
.eims-frame-accountant .eims-app-hbtn:hover{background:#f1f5f9 !important;color:#0f172a !important;}
body.dark .eims-frame-accountant .eims-app-hbtn:hover{background:#334155 !important;color:#f1f5f9 !important;}
.eims-frame-accountant .eims-notif-dot{border-color:#fff !important;}
body.dark .eims-frame-accountant .eims-notif-dot{border-color:#1e293b !important;}
/* ── Mobile admin search bar ── */
.mob-admin-search-bar{display:none;}
.mob-admin-search-bar.open{display:block;}
/* ═══ END INBOX v2 ═══ */

/* ── Inbox sidebar desktop toggle ── */
@media(min-width:992px){
  .inbox-sidebar.is-hidden{display:none!important;}
  .inbox-shell.sidebar-hidden .inbox-sidebar{display:none!important;}
  .inbox-sidebar-toggle-btn{display:flex;}
}
.inbox-sidebar-toggle-btn{width:34px;height:34px;border:none;background:rgba(255,255,255,.1);border-radius:8px;color:#f1f5f9;font-size:1.05rem;cursor:pointer;align-items:center;justify-content:center;transition:background .15s;display:none;}
.inbox-sidebar-toggle-btn:hover{background:rgba(255,255,255,.2);}
body.dark .inbox-sidebar-toggle-btn{background:rgba(255,255,255,.07);}
body.dark .inbox-sidebar-toggle-btn:hover{background:rgba(255,255,255,.13);}

/* ══ Dark mode patch ══ */
body.dark .inbox-sidebar-head{background:#1e293b!important;color:#e2e8f0;}
body.dark .inbox-sidebar-head h2,body.dark .inbox-heading{color:#f1f5f9!important;}
body.dark .inbox-sidebar-head i,body.dark .inbox-sidebar-head a{color:#94a3b8!important;}
body.dark .inbox-sidebar{background:#0f172a!important;}
body.dark .inbox-tabs-row{background:#0f172a!important;border-bottom-color:#334155!important;}
body.dark .inbox-tab-btn{color:#94a3b8!important;}
body.dark .inbox-tab-btn.active{color:#818cf8!important;border-bottom-color:#818cf8!important;}
body.dark .inbox-search-row{background:#0f172a!important;}
body.dark .inbox-search-wrap{background:#1e293b!important;border-color:#334155!important;}
body.dark .inbox-search-wrap input{color:#f1f5f9!important;background:#1e293b!important;}
body.dark .inbox-search-wrap input::placeholder{color:#64748b!important;}
body.dark .rank-factor-box{background:#1e293b!important;border-color:#334155!important;}
body.dark .rank-factor-box strong{color:#e2e8f0!important;}
body.dark .rank-factor-box span{color:#94a3b8!important;}
body.dark .institute-rank-score-pill{background:linear-gradient(135deg,#0f2d20,#0d2035)!important;border-color:#1e3a2e!important;}
body.dark .institute-rank-score-pill strong{color:#34d399!important;}
body.dark .institute-rank-score-pill span,body.dark .institute-rank-score-pill small{color:#94a3b8!important;}
body.dark .admin-bulk-audience label{background:#1e293b!important;border-color:#334155!important;color:#e2e8f0!important;}
body.dark .admin-bulk-audience label:hover{background:#263548!important;}
body.dark .certificate-page{background:linear-gradient(135deg,#0f172a,#0d1b2d)!important;}
body.dark .certificate-toolbar .btn-outline-secondary{border-color:#475569;color:#e2e8f0;background:#1e293b;}
body.dark .certificate-toolbar .btn-outline-secondary:hover{background:#263548;border-color:#64748b;}
body.dark .certificate-controls .form-control,
body.dark .certificate-controls .form-select{background:#1e293b!important;border-color:#334155!important;color:#e2e8f0!important;}
body.dark .border.rounded{background:#1e293b;border-color:#334155!important;}
body.dark .inbox-icon-btn{color:#94a3b8!important;background:transparent!important;}
body.dark .inbox-icon-btn:hover{background:#1e293b!important;color:#f1f5f9!important;}

/* Inbox — EduCare native dark (#0c1220 frame / #131c2e elevated) */
body.dark .inbox-shell{background:#0c1220!important;border-color:#1e2d4a!important;}
body.dark .inbox-sidebar{background:#0c1220!important;}
body.dark .inbox-sidebar-head{background:#131c2e!important;color:#e2e8f0;border-bottom-color:#1e2d4a!important;}
body.dark .inbox-sidebar-head h2,body.dark .inbox-heading{color:#f1f5f9!important;}
body.dark .inbox-sidebar-head i,body.dark .inbox-sidebar-head a{color:#94a3b8!important;}
body.dark .inbox-tabs-row{background:#0c1220!important;border-bottom-color:#1e2d4a!important;}
body.dark .inbox-tab-btn{color:#64748b!important;}
body.dark .inbox-tab-btn.active{color:#818cf8!important;border-bottom-color:#818cf8!important;}
body.dark .inbox-search-row{background:#0c1220!important;}
body.dark .inbox-search-wrap{background:#131c2e!important;border-color:#1e2d4a!important;}
body.dark .inbox-search-wrap input{color:#f1f5f9!important;background:#131c2e!important;}
body.dark .inbox-search-wrap input::placeholder{color:#475569!important;}
body.dark .inbox-contact{border-bottom-color:#1e2d4a!important;}
body.dark .inbox-contact-avt .inbox-presence{border-color:#0c1220!important;}
body.dark .inbox-contact-prev{color:#475569!important;}
body.dark .inbox-contact-time{color:#475569!important;}
body.dark .inbox-unread-badge{background:#6366f1!important;}
body.dark .inbox-contact-top strong{color:#e2e8f0!important;}
body.dark .inbox-contact.active{background:#131c2e!important;border-left-color:#818cf8!important;}
body.dark .inbox-contact:hover{background:#0f1729!important;}
body.dark .inbox-chat{background:#0c1220!important;}
body.dark .inbox-chat-head{background:#131c2e!important;border-bottom-color:#1e2d4a!important;}
body.dark .inbox-chat-name{color:#f1f5f9!important;}
body.dark .inbox-chat-status{color:#64748b!important;}
body.dark .inbox-date-sep span{background:#131c2e!important;color:#64748b!important;border:1px solid #1e2d4a;}
body.dark .inbox-message-row.theirs .inbox-bubble{background:#131c2e!important;}
body.dark .inbox-message-row.mine .inbox-bubble{background:#312e81!important;}
body.dark .inbox-message-text{color:#e2e8f0!important;}
body.dark .inbox-bubble-meta time{color:#475569!important;}
body.dark .inbox-composer{background:#131c2e!important;border-top-color:#1e2d4a!important;}
body.dark .inbox-message-box{background:#0c1220!important;border:1px solid #1e2d4a;}
body.dark .inbox-message-editor{color:#f1f5f9!important;}
body.dark .inbox-empty-chat{color:#64748b!important;}
body.dark .inbox-empty-chat strong{color:#e2e8f0!important;}
body.dark .inbox-thread-search{background:#131c2e!important;border-bottom-color:#1e2d4a!important;}
body.dark .inbox-thread-search-inner{background:#0c1220!important;}
body.dark .inbox-thread-search-inner input{color:#f1f5f9!important;}
body.dark .inbox-filter-dropdown{background:#131c2e!important;border-color:#1e2d4a!important;}
body.dark .inbox-filter-dropdown button{color:#e2e8f0!important;}
body.dark .inbox-filter-dropdown button:hover{background:#1a2440!important;}
body.dark .inbox-new-chat-card{background:#131c2e!important;}
body.dark .inbox-new-chat-head{color:#f1f5f9!important;border-bottom-color:#1e2d4a!important;}
body.dark .inbox-new-chat-search-row{border-bottom-color:#1e2d4a!important;}
body.dark .inbox-new-chat-search{background:#0c1220!important;}
body.dark .inbox-new-chat-search input{color:#f1f5f9!important;}
body.dark .inbox-new-chat-item:hover{background:#1a2440!important;}
body.dark .inbox-new-chat-item-info strong{color:#f1f5f9!important;}
body.dark .inbox-details-panel{background:#0c1220!important;border-left-color:#1e2d4a!important;}
body.dark .inbox-details-head{color:#f1f5f9!important;border-bottom-color:#1e2d4a!important;}
body.dark .inbox-details-name{color:#f1f5f9!important;}
body.dark .inbox-details-section{border-bottom-color:#1e2d4a!important;}
body.dark .inbox-details-about-row{color:#e2e8f0!important;}
body.dark .inbox-details-option{color:#e2e8f0!important;border-bottom-color:#1e2d4a!important;}
#inboxThread{background-color:#f1f5f9;background-image:radial-gradient(rgba(99,102,241,.13) 1.5px,transparent 1.5px);background-size:22px 22px;}
body.dark #inboxThread{background-color:#0c1220!important;background-image:radial-gradient(rgba(129,140,248,.07) 1.5px,transparent 1.5px)!important;background-size:22px 22px;}

/* ── EIMS Points page ──────────────────────────────────────────── */
.eims-pts-page{max-width:900px;}
.eims-pts-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:24px;}
.eims-pts-header-left{display:flex;align-items:center;gap:14px;}
.eims-pts-title-icon{width:44px;height:44px;border-radius:12px;background:linear-gradient(135deg,#fde68a,#f59e0b);color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.3rem;flex-shrink:0;box-shadow:0 4px 14px rgba(245,158,11,.28);}
.eims-pts-title{font-size:1.35rem;font-weight:800;color:#0f172a;margin:0 0 2px;letter-spacing:-.02em;}
body.dark .eims-pts-title{color:#f1f5f9;}
.eims-pts-sub{font-size:.82rem;color:#64748b;margin:0;}
.eims-pts-wallet{display:flex;align-items:center;gap:16px;background:linear-gradient(135deg,#6366f1 0%,#4f46e5 55%,#7c3aed 100%);border-radius:var(--radius-lg);padding:20px 24px;margin-bottom:24px;box-shadow:0 8px 24px rgba(99,102,241,.22);}
.eims-pts-wallet-icon{width:48px;height:48px;border-radius:12px;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;font-size:1.5rem;color:#fff;flex-shrink:0;}
.eims-pts-wallet-label{display:block;font-size:.72rem;font-weight:600;color:rgba(255,255,255,.78);text-transform:uppercase;letter-spacing:.07em;margin-bottom:3px;}
.eims-pts-wallet-val{font-size:1.65rem;font-weight:900;color:#fff;line-height:1.1;}
.eims-pts-wallet-val span{font-size:.9rem;font-weight:600;opacity:.8;margin-left:4px;}
.eims-pts-wallet-total .eims-pts-wallet-val{font-size:1.15rem;}
.eims-pts-breakdown{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;margin-bottom:16px;}
.eims-pts-cat{background:#fff;border:1px solid #e8edf3;border-radius:var(--radius-md);padding:16px;box-shadow:var(--shadow-sm);transition:box-shadow .2s,transform .15s;}
body.dark .eims-pts-cat{background:#1e293b;border-color:#334155;}
.eims-pts-cat:hover{box-shadow:var(--shadow-md);transform:translateY(-1px);}
.eims-pts-cat-head{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.eims-pts-cat-icon{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:.95rem;flex-shrink:0;}
.eims-pts-cat-info{min-width:0;}
.eims-pts-cat-name{display:block;font-size:.68rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.06em;}
.eims-pts-cat-score{display:block;font-size:1.1rem;font-weight:800;color:#0f172a;line-height:1.15;}
body.dark .eims-pts-cat-score{color:#f1f5f9;}
.eims-pts-cat-score em{font-size:.72rem;font-weight:500;color:#94a3b8;font-style:normal;}
.eims-pts-bar-track{height:5px;background:#f1f5f9;border-radius:99px;overflow:hidden;margin-bottom:8px;}
body.dark .eims-pts-bar-track{background:#334155;}
.eims-pts-bar-fill{height:100%;border-radius:99px;transition:width .5s cubic-bezier(.4,0,.2,1);}
.eims-pts-cat-meta{font-size:.7rem;color:#94a3b8;margin:0;line-height:1.4;}
.eims-pts-formula{display:flex;align-items:flex-start;gap:8px;font-size:.78rem;color:#64748b;background:#f8fafc;border:1px solid #e8edf3;border-radius:var(--radius-sm);padding:10px 14px;margin-bottom:24px;}
body.dark .eims-pts-formula{background:#1e293b;border-color:#334155;color:#94a3b8;}
.eims-pts-formula .bi{flex-shrink:0;margin-top:2px;color:#6366f1;}
.eims-pts-events{background:#fff;border:1px solid #e8edf3;border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow-sm);}
body.dark .eims-pts-events{background:#1e293b;border-color:#334155;}
.eims-pts-events-head{margin-bottom:14px;}
.eims-pts-events-title{font-size:1rem;font-weight:700;color:#0f172a;margin:0 0 2px;}
body.dark .eims-pts-events-title{color:#f1f5f9;}
.eims-pts-events-sub{font-size:.78rem;color:#64748b;margin:0;}
.eims-pts-managed-note{display:flex;align-items:center;gap:10px;font-size:.88rem;color:#64748b;background:#f8fafc;border:1px solid #e8edf3;border-radius:var(--radius-md);padding:16px 20px;margin-top:4px;}
body.dark .eims-pts-managed-note{background:#1e293b;border-color:#334155;color:#94a3b8;}
.eims-pts-managed-note .bi{color:#6366f1;font-size:1.1rem;flex-shrink:0;}
@media(max-width:640px){
  .eims-pts-breakdown{grid-template-columns:1fr 1fr;}
  .eims-pts-wallet{flex-wrap:wrap;gap:12px;}
  .eims-pts-wallet-total{width:100%;text-align:left!important;}
  .eims-pts-wallet-val{font-size:1.35rem;}
}
@media(max-width:380px){.eims-pts-breakdown{grid-template-columns:1fr;}}

/* EIMS Points professional account overview */
.eims-pts-page{width:100%;max-width:1180px;margin:0 auto;padding-top:22px;}
.eims-pts-header{margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid #e2e8f0;}
.eims-pts-title-icon{width:42px;height:42px;border-radius:8px;background:#fff7ed;border:1px solid #fed7aa;color:#ea580c;box-shadow:none;}
.eims-pts-title{font-size:1.5rem;letter-spacing:0;}
.eims-pts-sub{font-size:.86rem;}
.eims-pts-page-status{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #bbf7d0;border-radius:999px;background:#f0fdf4;color:#166534;font-size:.76rem;font-weight:700;white-space:nowrap;}
.eims-pts-overview{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr);gap:16px;margin-bottom:18px;}
.eims-pts-balance-card{display:flex;align-items:center;gap:18px;min-height:142px;padding:24px;background:#fff;border:1px solid #e2e8f0;border-left:4px solid #f59e0b;border-radius:8px;box-shadow:0 4px 14px rgba(15,23,42,.05);}
.eims-pts-balance-icon{width:54px;height:54px;border-radius:8px;background:#fff7ed;border:1px solid #fed7aa;color:#ea580c;display:flex;align-items:center;justify-content:center;font-size:1.55rem;flex-shrink:0;}
.eims-pts-balance-copy{min-width:0;}
.eims-pts-balance-label{display:block;margin-bottom:4px;color:#64748b;font-size:.73rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;}
.eims-pts-balance-value{display:block;color:#0f172a;font-size:2.25rem;font-weight:850;line-height:1.05;}
.eims-pts-balance-value small{font-size:.9rem;font-weight:700;color:#475569;}
.eims-pts-balance-copy p{margin:8px 0 0;color:#64748b;font-size:.8rem;line-height:1.45;}
.eims-pts-account-facts{display:flex;flex-direction:column;justify-content:center;padding:8px 20px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 14px rgba(15,23,42,.05);}
.eims-pts-fact{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid #eef2f7;}
.eims-pts-fact:last-child{border-bottom:0;}
.eims-pts-fact span{color:#64748b;font-size:.76rem;}
.eims-pts-fact strong{color:#0f172a;font-size:.8rem;font-weight:750;text-align:right;}
.eims-pts-cat,.eims-pts-events{border-color:#e2e8f0;border-radius:8px;box-shadow:0 3px 10px rgba(15,23,42,.04);}
.eims-pts-info-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:16px;margin-bottom:16px;}
.eims-pts-panel{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:20px;box-shadow:0 3px 10px rgba(15,23,42,.04);}
.eims-pts-panel-head{display:flex;align-items:center;gap:11px;margin-bottom:16px;}
.eims-pts-panel-icon{width:38px;height:38px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:1rem;}
.eims-pts-panel-icon.is-blue{background:#eff6ff;color:#2563eb;}
.eims-pts-panel-icon.is-teal{background:#ecfdf5;color:#059669;}
.eims-pts-panel h5{margin:0 0 2px;color:#0f172a;font-size:.94rem;font-weight:800;}
.eims-pts-panel-head p{margin:0;color:#94a3b8;font-size:.72rem;}
.eims-pts-panel-copy{margin:0 0 16px;color:#64748b;font-size:.8rem;line-height:1.6;}
.eims-pts-feature-list{display:grid;gap:9px;}
.eims-pts-feature-list div{display:flex;align-items:flex-start;gap:9px;color:#475569;font-size:.78rem;}
.eims-pts-feature-list .bi{color:#10b981;margin-top:1px;}
.eims-pts-detail-list{display:grid;}
.eims-pts-detail-list>div{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid #eef2f7;}
.eims-pts-detail-list>div:last-child{border-bottom:0;}
.eims-pts-detail-list span{color:#64748b;font-size:.76rem;}
.eims-pts-detail-list strong{color:#0f172a;font-size:.77rem;text-align:right;}
.eims-pts-active{display:inline-flex;align-items:center;gap:5px;color:#047857!important;}
.eims-pts-managed-note{display:flex;align-items:center;gap:12px;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:14px 16px;margin-top:0;}
.eims-pts-managed-note>.bi{width:34px;height:34px;border-radius:8px;background:#eef2ff;color:#4f46e5;display:flex;align-items:center;justify-content:center;font-size:.95rem;flex-shrink:0;}
.eims-pts-managed-note strong,.eims-pts-managed-note span{display:block;}
.eims-pts-managed-note strong{margin-bottom:2px;color:#0f172a;font-size:.78rem;}
.eims-pts-managed-note span{color:#64748b;font-size:.72rem;}
body.dark .eims-pts-page-status{background:#052e16;border-color:#166534;color:#86efac;}
body.dark .eims-pts-header{border-bottom-color:#334155;}
body.dark .eims-pts-title-icon,body.dark .eims-pts-balance-icon{background:#431407;border-color:#7c2d12;color:#fdba74;}
body.dark .eims-pts-balance-card,body.dark .eims-pts-account-facts,body.dark .eims-pts-panel{background:#1e293b;border-color:#334155;box-shadow:none;}
body.dark .eims-pts-balance-value,body.dark .eims-pts-fact strong,body.dark .eims-pts-panel h5,body.dark .eims-pts-detail-list strong,body.dark .eims-pts-managed-note strong{color:#f1f5f9;}
body.dark .eims-pts-fact,body.dark .eims-pts-detail-list>div{border-bottom-color:#334155;}
body.dark .eims-pts-feature-list div{color:#cbd5e1;}
body.dark .eims-pts-managed-note{background:#172033;border-color:#334155;color:#cbd5e1;}
body.dark .eims-pts-managed-note>.bi{background:#312e81;color:#c7d2fe;}
@media(max-width:760px){
  .eims-pts-overview,.eims-pts-info-grid{grid-template-columns:1fr;}
  .eims-pts-account-facts{padding:4px 18px;}
}
@media(max-width:520px){
  .eims-pts-page{padding-top:16px;}
  .eims-pts-header{align-items:flex-start;}
  .eims-pts-page-status{margin-left:54px;}
  .eims-pts-balance-card{align-items:flex-start;padding:20px;}
  .eims-pts-balance-value{font-size:1.85rem;}
  .eims-pts-balance-value small{display:block;margin-top:5px;}
  .eims-pts-panel{padding:17px;}
}

/* Accountant fee summary */
.fee-summary-page{width:100%;max-width:1280px;margin:0 auto;padding:24px 24px 64px;}
.fee-summary-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px;padding-bottom:18px;border-bottom:1px solid #e2e8f0;}
.fee-summary-eyebrow{display:block;margin-bottom:4px;color:#0f766e;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;}
.fee-summary-heading h1{margin:0;color:#0f172a;font-size:1.65rem;font-weight:850;letter-spacing:0;}
.fee-summary-heading p{margin:5px 0 0;color:#64748b;font-size:.86rem;}
.fee-summary-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.fee-summary-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:9px 14px;border-radius:7px;font-size:.78rem;font-weight:750;text-decoration:none;transition:background .15s,border-color .15s,color .15s;}
.fee-summary-btn.primary{background:#0f766e;border:1px solid #0f766e;color:#fff;}
.fee-summary-btn.primary:hover{background:#115e59;color:#fff;}
.fee-summary-btn.secondary{background:#fff;border:1px solid #cbd5e1;color:#334155;}
.fee-summary-btn.secondary:hover{border-color:#0f766e;color:#0f766e;}
.fee-summary-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px;}
.fee-summary-metric{position:relative;min-width:0;padding:18px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 3px 10px rgba(15,23,42,.04);overflow:hidden;}
.fee-summary-metric>i{display:flex;align-items:center;justify-content:center;width:34px;height:34px;margin-bottom:16px;border-radius:7px;font-size:.95rem;}
.fee-summary-metric span{display:block;margin-bottom:5px;color:#64748b;font-size:.72rem;font-weight:650;}
.fee-summary-metric strong{display:block;overflow:hidden;color:#0f172a;font-size:1.22rem;font-weight:850;text-overflow:ellipsis;white-space:nowrap;}
.fee-summary-metric.is-green{border-top:3px solid #16a34a}.fee-summary-metric.is-green>i{background:#f0fdf4;color:#16a34a}
.fee-summary-metric.is-blue{border-top:3px solid #2563eb}.fee-summary-metric.is-blue>i{background:#eff6ff;color:#2563eb}
.fee-summary-metric.is-violet{border-top:3px solid #7c3aed}.fee-summary-metric.is-violet>i{background:#faf5ff;color:#7c3aed}
.fee-summary-metric.is-amber{border-top:3px solid #d97706}.fee-summary-metric.is-amber>i{background:#fffbeb;color:#d97706}
.fee-summary-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:16px;margin-bottom:16px;}
.fee-summary-panel{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:20px;box-shadow:0 3px 10px rgba(15,23,42,.04);}
.fee-summary-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;}
.fee-summary-panel-head h2{margin:0 0 3px;color:#0f172a;font-size:.95rem;font-weight:800;}
.fee-summary-panel-head p{margin:0;color:#94a3b8;font-size:.72rem;}
.fee-summary-panel-head>i{color:#0f766e;font-size:1.1rem;}
.fee-summary-chart{display:flex;align-items:flex-end;gap:12px;height:220px;padding-top:14px;}
.fee-summary-bar-item{display:grid;grid-template-rows:20px 1fr 28px;align-items:end;justify-items:center;gap:5px;min-width:0;flex:1;height:100%;}
.fee-summary-bar-value{max-width:100%;overflow:hidden;color:#64748b;font-size:.64rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap;}
.fee-summary-bar-track{position:relative;width:min(42px,70%);height:100%;overflow:hidden;border-radius:5px 5px 2px 2px;background:#f1f5f9;}
.fee-summary-bar-track span{position:absolute;right:0;bottom:0;left:0;min-height:8px;border-radius:5px 5px 2px 2px;background:#0f766e;}
.fee-summary-bar-item small{color:#64748b;font-size:.64rem;text-align:center;line-height:1.15;}
.fee-summary-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px;}
.fee-summary-facts div{padding:12px;background:#f8fafc;border:1px solid #eef2f7;border-radius:7px;text-align:center;}
.fee-summary-facts span,.fee-summary-facts strong{display:block;}
.fee-summary-facts span{margin-bottom:4px;color:#64748b;font-size:.65rem;}
.fee-summary-facts strong{color:#0f172a;font-size:.88rem;}
.fee-summary-methods{display:grid;gap:2px;}
.fee-summary-methods>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 2px;border-bottom:1px solid #eef2f7;}
.fee-summary-methods>div:last-child{border-bottom:0;}
.fee-summary-methods span{display:flex;align-items:center;gap:8px;color:#64748b;font-size:.75rem;}
.fee-summary-methods span i{color:#0f766e;font-size:.48rem;}
.fee-summary-methods strong{color:#0f172a;font-size:.76rem;}
.fee-summary-details{margin-top:16px;}
.fee-summary-count{padding:5px 9px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:.68rem;font-weight:700;}
.fee-summary-filters{display:grid;grid-template-columns:minmax(200px,1.6fr) repeat(3,minmax(130px,.7fr)) auto auto;gap:9px;align-items:end;margin-bottom:18px;padding:14px;background:#f8fafc;border:1px solid #eef2f7;border-radius:8px;}
.fee-summary-filters label span{display:block;margin-bottom:5px;color:#475569;font-size:.68rem;font-weight:700;}
.fee-summary-filters input,.fee-summary-filters select{width:100%;height:38px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#0f172a;font-size:.76rem;outline:none;}
.fee-summary-filters input:focus,.fee-summary-filters select:focus{border-color:#0f766e;box-shadow:0 0 0 3px rgba(15,118,110,.1);}
.fee-summary-filter-btn,.fee-summary-reset{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:38px;border-radius:6px;font-size:.75rem;font-weight:700;}
.fee-summary-filter-btn{padding:0 13px;border:1px solid #0f766e;background:#0f766e;color:#fff;}
.fee-summary-reset{width:38px;border:1px solid #cbd5e1;background:#fff;color:#475569;text-decoration:none;}
.fee-summary-table{width:100%;border-collapse:collapse;}
.fee-summary-table th{padding:10px 12px;border-bottom:1px solid #cbd5e1;color:#64748b;font-size:.68rem;font-weight:750;text-align:left;text-transform:uppercase;white-space:nowrap;}
.fee-summary-table td{padding:12px;border-bottom:1px solid #eef2f7;color:#475569;font-size:.75rem;vertical-align:middle;}
.fee-summary-table td strong{display:block;color:#0f172a;font-size:.77rem;}
.fee-summary-table td small{display:block;margin-top:2px;color:#94a3b8;font-size:.66rem;}
.fee-summary-method{display:inline-flex;padding:4px 8px;border-radius:999px;background:#ecfdf5;color:#047857;font-size:.68rem;font-weight:700;}
.fee-summary-view{display:inline-flex;align-items:center;gap:5px;color:#0f766e;font-size:.72rem;font-weight:750;text-decoration:none;white-space:nowrap;}
.fee-summary-empty{width:100%;padding:28px 12px;color:#94a3b8;font-size:.78rem;text-align:center;}
body.dark .fee-summary-heading{border-bottom-color:#334155;}
body.dark .fee-summary-heading h1,body.dark .fee-summary-metric strong,body.dark .fee-summary-panel-head h2,body.dark .fee-summary-facts strong,body.dark .fee-summary-methods strong,body.dark .fee-summary-table td strong{color:#f1f5f9;}
body.dark .fee-summary-btn.secondary,body.dark .fee-summary-metric,body.dark .fee-summary-panel{background:#1e293b;border-color:#334155;box-shadow:none;}
body.dark .fee-summary-facts div,body.dark .fee-summary-filters{background:#172033;border-color:#334155;}
body.dark .fee-summary-facts div,body.dark .fee-summary-methods>div,body.dark .fee-summary-table td{border-color:#334155;}
body.dark .fee-summary-bar-track{background:#334155;}
body.dark .fee-summary-filters input,body.dark .fee-summary-filters select,body.dark .fee-summary-reset{background:#1e293b;border-color:#475569;color:#f1f5f9;}
body.dark .fee-summary-table th{border-bottom-color:#475569;}
@media(max-width:1050px){
  .fee-summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}
  .fee-summary-grid{grid-template-columns:1fr;}
  .fee-summary-filters{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:640px){
  .fee-summary-page{padding:18px 14px 48px;}
  .fee-summary-heading{align-items:flex-start;flex-direction:column;}
  .fee-summary-actions{width:100%;}
  .fee-summary-btn{flex:1;}
  .fee-summary-metrics{grid-template-columns:1fr 1fr;gap:8px;}
  .fee-summary-metric{padding:14px;}
  .fee-summary-metric strong{font-size:1rem;}
  .fee-summary-chart{gap:6px;height:190px;}
  .fee-summary-bar-value{display:none;}
  .fee-summary-facts{grid-template-columns:1fr;}
  .fee-summary-filters{grid-template-columns:1fr;}
  .fee-summary-filter-btn{width:100%;}
  .fee-summary-reset{width:100%;}
}


.inbox-e2e-notice{display:flex;align-items:center;justify-content:center;gap:7px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:9px 16px;margin:14px auto 8px;max-width:420px;font-size:.8rem;color:#166534;line-height:1.4;text-align:center;}
.inbox-e2e-notice .bi-lock-fill{font-size:.85rem;color:#16a34a;flex-shrink:0;}
body.dark .inbox-e2e-notice{background:#052e16;border-color:#14532d;color:#86efac;}
body.dark .inbox-e2e-notice .bi-lock-fill{color:#4ade80;}

/* ── Mobile menu panel: unified dark style for all role dashboards ── */
.eims-app-frame .dashboard-menu-panel{background:rgba(15,23,42,.96);border:1px solid rgba(148,163,184,.25);border-radius:22px;}
body.dark .eims-app-frame .dashboard-menu-panel{background:rgba(6,10,18,.97);border-color:rgba(148,163,184,.18);}

/* ── Stat row 4-col: responsive 2-col on small phones ── */
@media(max-width:479.98px){
  .eims-stat-row-4{grid-template-columns:repeat(2,1fr);}
  .eims-stat-cell:nth-child(2){border-right:none;}
  .eims-stat-cell:nth-child(3),.eims-stat-cell:nth-child(4){border-top:1px solid #f1f5f9;}
  body.dark .eims-stat-cell:nth-child(3),body.dark .eims-stat-cell:nth-child(4){border-top-color:#334155;}
  .eims-banner-photo{width:60px;height:60px;}
  .eims-welcome-name{font-size:1.1rem;}
  .eims-welcome-banner{padding:14px 16px;gap:12px;}
}

/* ── Attendance quick-action card ── */
.eims-attendance-card{background:#fff;border-radius:16px;padding:14px 16px;border:1px solid #f1f5f9;box-shadow:0 2px 8px rgba(0,0,0,.04);display:flex;align-items:center;justify-content:space-between;gap:12px;}
body.dark .eims-attendance-card{background:#1e293b;border-color:#334155;}
.eims-attendance-card-lbl{font-size:.75rem;color:#64748b;margin-bottom:3px;}
body.dark .eims-attendance-card-lbl{color:#94a3b8;}

/* ── Mobile layout: full-width header & nav, correct clearance ── */
@media(max-width:991.98px){
  .eims-app-header{width:100%;box-sizing:border-box;}
  .eims-bottom-nav-app{width:100%;box-sizing:border-box;}
  .eims-dash-wrap{padding-bottom:0;}
  .eims-bnav-spacer{height:72px;}
}

/* ── Mobile student menu: backdrop overlay ── */
@media(max-width:991.98px){
  body.dashboard-menu-open::before{content:'';position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:395;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);}
  .eims-app-header{z-index:450!important;}
  .eims-bottom-nav-app{z-index:450!important;}
}

/* ── Mobile student menu: container ── */
.eims-app-frame .dashboard-menu-panel{
  padding:10px;
  max-height:min(calc(100svh - 70px),calc(100vh - 70px));
  overflow-y:auto;
  overscroll-behavior:contain;
}
/* close button in menu title */
.student-dashboard-menu-title{display:flex;align-items:center;justify-content:space-between;}
.eims-menu-close-btn{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:8px;color:#cbd5e1;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;font-size:.78rem;cursor:pointer;flex-shrink:0;transition:background .15s,color .15s;}
.eims-menu-close-btn:hover{background:rgba(255,255,255,.22);color:#fff;}

/* ── Mobile student menu: compact items so all fit on screen ── */
@media(max-width:991.98px){
  .eims-app-frame .student-dashboard-menu a,
  .eims-app-frame .student-dashboard-menu .dashboard-menu-action{
    min-height:38px!important;padding:5px 10px!important;margin-bottom:3px!important;gap:10px!important;font-size:.875rem!important;
  }
  .eims-app-frame .student-dashboard-menu a i,
  .eims-app-frame .student-dashboard-menu .dashboard-menu-action > i{
    width:30px!important;height:30px!important;flex:0 0 30px!important;border-radius:10px!important;font-size:.85rem!important;
  }
  .eims-app-frame .student-dashboard-menu-title{
    font-size:.72rem!important;padding:6px 8px 7px!important;margin-bottom:6px!important;
  }
  .eims-app-frame .student-dashboard-menu .dark-mode-toggle{margin-top:4px!important;}
  .eims-app-frame .student-dashboard-menu .student-menu-language{display:none!important;}
  .eims-app-frame .student-dashboard-menu-logout{margin-top:4px!important;}
  /* subtle bottom fade to hint at scroll */
  .eims-app-frame .dashboard-menu-panel::after{
    content:'';position:sticky;bottom:0;left:0;right:0;height:20px;display:block;
    background:linear-gradient(to bottom,transparent,rgba(15,23,42,.8));
    pointer-events:none;margin:0 -10px -10px;
  }
}

/* ── Admin-style bottom nav (student frame): matches admin dashboard white/light aesthetic ── */
.eims-frame-student .eims-bottom-nav-app{
  background:#fff;
  border-top:1px solid #e2e8f0;
  box-shadow:0 -2px 16px rgba(15,23,42,.08);
}
body.dark .eims-frame-student .eims-bottom-nav-app{background:#1e293b;border-top-color:#334155;box-shadow:0 -2px 16px rgba(0,0,0,.3);}
.eims-frame-student .eims-bnav-btn{color:#94a3b8;}
.eims-frame-student .eims-bnav-btn.active{color:#2563eb;}
body.dark .eims-frame-student .eims-bnav-btn.active{color:#60a5fa;}
.eims-frame-student .eims-bnav-dot{border-color:#fff;}
body.dark .eims-frame-student .eims-bnav-dot{border-color:#1e293b;}

.eims-frame-student .eims-more-sheet{background:#fff;border-top:1px solid #e2e8f0;box-shadow:0 -2px 16px rgba(15,23,42,.08);}
body.dark .eims-frame-student .eims-more-sheet{background:#1e293b;border-top-color:#334155;box-shadow:0 -2px 16px rgba(0,0,0,.3);}
.eims-frame-student .eims-more-handle{background:#cbd5e1;}
body.dark .eims-frame-student .eims-more-handle{background:#475569;}
.eims-frame-student .eims-more-title{color:#64748b;border-bottom-color:#e2e8f0;}
body.dark .eims-frame-student .eims-more-title{color:#94a3b8;border-bottom-color:#334155;}
.eims-frame-student .eims-more-item{background:#f8fafc;color:#1e293b;border:1px solid #e2e8f0;}
body.dark .eims-frame-student .eims-more-item{background:#273449;color:#cbd5e1;border-color:#334155;}
.eims-frame-student .eims-more-item i{color:#60a5fa;}
.eims-frame-student .eims-more-item.active,.eims-frame-student .eims-more-item:active{background:rgba(56,189,248,.14);color:#38bdf8;border-color:rgba(56,189,248,.18);}
.eims-frame-student .eims-more-item.active i,.eims-frame-student .eims-more-item:active i{color:#38bdf8;}
.eims-frame-student .eims-more-logout,.eims-frame-student .eims-more-logout i{color:#f87171!important;}
.eims-frame-student .eims-more-backdrop{background:rgba(0,0,0,.65);}

/* ── Stat row: always single 4-column row, compact at narrow widths ── */
@media(max-width:479.98px){
  .eims-stat-row-4{grid-template-columns:repeat(4,1fr)!important;}
  .eims-stat-cell:nth-child(2){border-right:1px solid #f1f5f9!important;}
  body.dark .eims-stat-cell:nth-child(2){border-right-color:#334155!important;}
  .eims-stat-cell:nth-child(3),.eims-stat-cell:nth-child(4){border-top:none!important;}
  .eims-stat-cell{padding:10px 3px!important;}
  .eims-stat-val{font-size:.88rem!important;}
  .eims-stat-icon{font-size:.82rem!important;margin-bottom:2px!important;}
  .eims-stat-lbl{font-size:.56rem!important;}
}

/* ── Compact layout at very narrow phones (<360px): reduce zoom, icon-only nav ── */
@media(max-width:359.98px){
  .eims-welcome-banner{padding:10px 12px!important;gap:8px!important;margin:8px 12px!important;}
  .eims-banner-photo{width:48px!important;height:48px!important;}
  .eims-welcome-name{font-size:.95rem!important;}
  .eims-role-pill{font-size:.6rem!important;padding:2px 7px!important;margin-top:2px!important;}
  .eims-stat-row{margin:0 12px 10px!important;}
  .eims-stat-cell{padding:8px 2px!important;}
  .eims-stat-val{font-size:.82rem!important;}
  .eims-stat-icon{font-size:.75rem!important;}
  .eims-stat-lbl{font-size:.52rem!important;}
  /* Icon-only bottom nav reclaims ~14px of vertical space */
  .eims-bnav-btn{padding:11px 4px!important;font-size:0!important;line-height:0;}
  .eims-bnav-btn i{font-size:1.25rem!important;line-height:1;}
  .eims-bnav-spacer{height:48px!important;}
}

/* ===== Pay Slip v2 UI ===== */
.pv2-wrap{padding:14px 14px 32px;}
.pv2-filter-bar{display:flex;align-items:flex-end;gap:10px;margin-bottom:18px;flex-wrap:wrap;}
.pv2-filter-group{display:flex;flex-direction:column;gap:4px;}
.pv2-filter-group label{font-size:.7rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.05em;}
.pv2-select-wrap{position:relative;display:flex;align-items:center;}
.pv2-select-wrap>i{position:absolute;left:10px;color:#94a3b8;font-size:.8rem;pointer-events:none;}
.pv2-select{height:40px;border:1px solid #e2e8f0;border-radius:10px;padding:0 14px 0 32px;font-size:.85rem;background:#fff;color:#0f172a;min-width:150px;cursor:pointer;-webkit-appearance:none;appearance:none;}
.pv2-select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.15);}
.pv2-view-btn{height:40px;padding:0 18px;border-radius:10px;font-weight:600;font-size:.875rem;}
.pv2-back-btn{display:inline-flex;align-items:center;gap:5px;font-size:.825rem;color:#64748b;text-decoration:none;border:1px solid #e2e8f0;border-radius:10px;padding:0 14px;height:40px;white-space:nowrap;background:#fff;}
.pv2-back-btn:hover{color:#0f172a;background:#f8fafc;border-color:#cbd5e1;}

/* Top grid */
.pv2-top-grid{display:grid;grid-template-columns:1fr 290px;gap:14px;margin-bottom:14px;align-items:start;}

/* Shared card */
.pv2-card{background:#fff;border-radius:16px;border:1px solid rgba(15,23,42,.08);box-shadow:0 2px 16px rgba(15,23,42,.05);overflow:hidden;}

/* Main card: header row */
.pv2-header-row{display:flex;align-items:flex-start;gap:0;padding:20px 22px;border-bottom:1px solid #f1f5f9;}
.pv2-emp-block{display:flex;align-items:flex-start;gap:14px;flex:1;min-width:0;}
.pv2-emp-photo{width:68px;height:68px;border-radius:50%;object-fit:cover;border:2px solid #e2e8f0;flex-shrink:0;}
.pv2-emp-info{min-width:0;}
.pv2-emp-name-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:7px;}
.pv2-emp-name{font-size:1rem;font-weight:700;color:#0f172a;margin:0;line-height:1.2;}
.pv2-emp-id-badge{background:#eff6ff;color:#1d4ed8;font-size:.65rem;font-weight:700;border-radius:6px;padding:3px 8px;border:1px solid #bfdbfe;white-space:nowrap;flex-shrink:0;}
.pv2-detail-table{border-collapse:collapse;}
.pv2-detail-table td{font-size:.775rem;color:#475569;padding:2px 0;vertical-align:top;line-height:1.5;}
.pv2-detail-table td:first-child{min-width:105px;color:#94a3b8;padding-right:4px;}
.pv2-header-divider{width:1px;background:#f1f5f9;margin:0 18px;align-self:stretch;flex-shrink:0;}
.pv2-company-block{display:flex;align-items:flex-start;gap:11px;flex-shrink:0;}
.pv2-company-logo-wrap{width:42px;height:42px;border-radius:10px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;}
.pv2-company-logo{width:38px;height:38px;object-fit:contain;}
.pv2-company-info{display:flex;flex-direction:column;gap:3px;}
.pv2-company-info strong{font-size:.85rem;font-weight:700;color:#0f172a;}
.pv2-company-info span{font-size:.72rem;color:#64748b;display:flex;align-items:center;gap:4px;}

/* Earnings / Deductions tables */
.pv2-tables-row{display:grid;grid-template-columns:1fr 1fr;}
.pv2-table-block{padding:18px 22px;}
.pv2-table-block:first-child{border-right:1px solid #f1f5f9;}
.pv2-section-label{font-size:.68rem;font-weight:800;letter-spacing:.1em;margin-bottom:10px;}
.pv2-label-green{color:#16a34a;}
.pv2-label-red{color:#dc2626;}
.pv2-table{width:100%;border-collapse:collapse;font-size:.78rem;}
.pv2-table thead th{color:#64748b;font-weight:600;padding:6px 0;border-bottom:1px solid #f1f5f9;}
.pv2-table tbody td{padding:7px 0;border-bottom:1px solid #f8fafc;color:#334155;}
.pv2-total-row th{padding:9px 0;font-size:.8rem;font-weight:700;border-top:1px solid #f1f5f9;}
.pv2-total-green{background:#f0fdf4;}
.pv2-total-green th{color:#16a34a;}
.pv2-total-red{background:#fef2f2;}
.pv2-total-red th{color:#dc2626;}

/* Net Pay card */
.pv2-net-card{padding:22px 20px;display:flex;flex-direction:column;align-items:center;text-align:center;}
.pv2-net-label{font-size:.68rem;font-weight:800;color:#64748b;letter-spacing:.12em;text-transform:uppercase;margin-bottom:5px;}
.pv2-net-amount{font-size:1.75rem;font-weight:800;color:#0f172a;line-height:1.1;margin-bottom:5px;}
.pv2-net-words{font-size:.68rem;color:#64748b;margin-bottom:10px;line-height:1.45;max-width:220px;}
.pv2-paid-badge{background:#dcfce7;color:#16a34a;font-size:.68rem;font-weight:700;border-radius:20px;padding:4px 16px;border:1px solid #bbf7d0;}
.pv2-divider{width:100%;margin:14px 0;border:0;border-top:1px solid #f1f5f9;}
.pv2-pay-details{width:100%;display:flex;flex-direction:column;gap:7px;}
.pv2-pay-row{display:grid;grid-template-columns:18px 1fr auto;gap:7px;align-items:center;font-size:.73rem;text-align:left;}
.pv2-pdi{color:#94a3b8;display:flex;}
.pv2-pay-row span:nth-child(2){color:#64748b;}
.pv2-pay-row span:nth-child(3){color:#0f172a;font-weight:500;word-break:break-word;}
.pv2-net-actions{width:100%;}
.pv2-btn-download{background:#1d4ed8;border-color:#1d4ed8;font-size:.85rem;}
.pv2-btn-download:hover{background:#1e40af;border-color:#1e40af;}

/* Summary cards */
.pv2-summary-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px;}
.pv2-stat-card{background:#fff;border-radius:14px;border:1px solid rgba(15,23,42,.07);box-shadow:0 1px 8px rgba(15,23,42,.04);padding:16px 18px;display:flex;align-items:center;gap:13px;}
.pv2-stat-icon{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:1.15rem;flex-shrink:0;}
.pv2-stat-green .pv2-stat-icon{background:#f0fdf4;color:#16a34a;}
.pv2-stat-red .pv2-stat-icon{background:#fef2f2;color:#dc2626;}
.pv2-stat-blue .pv2-stat-icon{background:#eff6ff;color:#1d4ed8;}
.pv2-stat-label{font-size:.68rem;color:#94a3b8;font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin-bottom:2px;}
.pv2-stat-value{font-size:1.05rem;font-weight:700;color:#0f172a;}
.pv2-val-green{color:#16a34a!important;}
.pv2-val-red{color:#dc2626!important;}
.pv2-val-blue{color:#1d4ed8!important;}

/* YTD card */
.pv2-ytd-card{padding:18px 22px;margin-bottom:14px;}
.pv2-ytd-title{font-size:.68rem;font-weight:800;color:#16a34a;letter-spacing:.1em;margin-bottom:12px;}
.pv2-ytd-scroll{overflow-x:auto;}
.pv2-ytd-table{width:100%;border-collapse:collapse;font-size:.8rem;white-space:nowrap;}
.pv2-ytd-table th{padding:8px 14px;color:#64748b;font-weight:600;border-bottom:2px solid #f1f5f9;text-align:left;}
.pv2-ytd-table td{padding:10px 14px;color:#334155;font-weight:500;}

/* Footer */
.pv2-footer{display:flex;justify-content:space-between;align-items:center;padding:10px 2px 0;font-size:.72rem;color:#94a3b8;border-top:1px solid #f1f5f9;margin-top:6px;}

/* Responsive */
@media(max-width:991px){
    .pv2-top-grid{grid-template-columns:1fr;}
    .pv2-net-card{align-items:flex-start;text-align:left;}
    .pv2-net-words{max-width:none;}
}
@media(max-width:767px){
    .pv2-header-row{flex-direction:column;gap:14px;}
    .pv2-header-divider{width:100%;height:1px;margin:2px 0;}
    .pv2-tables-row{grid-template-columns:1fr;}
    .pv2-table-block:first-child{border-right:none;border-bottom:1px solid #f1f5f9;}
    .pv2-summary-row{grid-template-columns:1fr;}
    .pv2-filter-bar{gap:8px;}
}

/* Dark mode */
body.dark .pv2-card{background:#1e293b;border-color:#334155;}
body.dark .pv2-emp-name{color:#f1f5f9;}
body.dark .pv2-detail-table td{color:#94a3b8;}
body.dark .pv2-detail-table td:first-child{color:#64748b;}
body.dark .pv2-company-info strong{color:#f1f5f9;}
body.dark .pv2-company-info span{color:#94a3b8;}
body.dark .pv2-emp-id-badge{background:#1e3a5f;border-color:#1d4ed8;color:#93c5fd;}
body.dark .pv2-header-row{border-color:#334155;}
body.dark .pv2-header-divider{background:#334155;}
body.dark .pv2-tables-row{border-top:none;}
body.dark .pv2-table-block:first-child{border-color:#334155;}
body.dark .pv2-table thead th{color:#64748b;border-color:#334155;}
body.dark .pv2-table tbody td{color:#cbd5e1;border-color:#0f172a;}
body.dark .pv2-total-green{background:rgba(22,163,74,.1);}
body.dark .pv2-total-red{background:rgba(220,38,38,.1);}
body.dark .pv2-total-row th{border-color:#334155;}
body.dark .pv2-net-amount{color:#f1f5f9;}
body.dark .pv2-net-label{color:#94a3b8;}
body.dark .pv2-net-words{color:#94a3b8;}
body.dark .pv2-divider{border-color:#334155;}
body.dark .pv2-pay-row span:nth-child(2){color:#94a3b8;}
body.dark .pv2-pay-row span:nth-child(3){color:#e2e8f0;}
body.dark .pv2-stat-card{background:#1e293b;border-color:#334155;}
body.dark .pv2-stat-value{color:#f1f5f9;}
body.dark .pv2-stat-label{color:#64748b;}
body.dark .pv2-ytd-card{border-color:#334155;}
body.dark .pv2-ytd-table th{border-color:#334155;color:#64748b;}
body.dark .pv2-ytd-table td{color:#cbd5e1;}
body.dark .pv2-select{background:#1e293b;border-color:#334155;color:#f1f5f9;}
body.dark .pv2-back-btn{border-color:#334155;color:#94a3b8;background:#1e293b;}
body.dark .pv2-back-btn:hover{background:#334155;color:#f1f5f9;}
body.dark .pv2-footer{color:#475569;border-color:#334155;}
body.dark .pv2-company-logo-wrap{background:#0f172a;}

@media print {
    @page {
        size: letter portrait;
        margin: 4mm;
    }

    body.eims-receipt-print-document,
    body.eims-receipt-print-document * {
        overflow: visible !important;
    }

    body.eims-receipt-print-document {
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body.eims-receipt-print-document #feeReceiptPrint {
        width: 100% !important;
        max-width: 178mm !important;
        margin: 0 auto !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
    }

    body.eims-receipt-print-document #feeReceiptPrint .eims-rcpt-bdy {
        padding: 8mm 9mm 7mm !important;
    }

    body.eims-receipt-print-document #feeReceiptPrint .eims-rcpt-sign-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
