* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #eaf2ff, #f7fff9);
}
: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: 42px;
    height: 23px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.32);
    position: relative;
    flex: 0 0 auto;
    transition: background .2s ease, border-color .2s ease;
}

.dark-toggle-switch::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    left: 3px;
    top: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.22);
    transition: transform .2s ease;
}

.dark-mode-toggle.is-on .dark-toggle-switch {
    background: #22c55e;
    border-color: #86efac;
}

.dark-mode-toggle.is-on .dark-toggle-switch::after {
    transform: translateX(18px);
}

.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;
}

.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:#fff;
}
.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;
}

@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-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(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .14);
    color: #cbd5e1;
    box-shadow: none;
}

.sidebar-language-switcher .dashboard-language-switcher i {
    color: #34d399;
}

.sidebar-language-switcher .dashboard-language-switcher select {
    color: #f8fafc;
}

.sidebar-language-switcher .dashboard-language-switcher option {
    color: #0f172a;
}

.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 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;
}

.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}
.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}
.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;
}
.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}
.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{background:#0f172a;border-color:#334155;color:#e5e7eb}.public-theme-modern_dark .public-hero h1,.public-theme-modern_dark .public-section h2{color:#f8fafc}.public-theme-modern_dark .public-hero p,.public-theme-modern_dark .public-section p{color:#cbd5e1}
.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%);
}
.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;
    }
}

/* 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{
    text-align:center;
    position:relative;
    border-radius:8px;
    padding:8px 8px 0;
    background:rgba(255,255,255,.34);
}
.certificate-qr img{
    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;
    }
}
@media print{
    body{
        background:#fff!important;
    }
    .certificate-page{
        min-height:auto;
        padding:0;
        background:#fff!important;
    }
    .certificate-toolbar,
    .dashboard-language-floating,
    .eims-notification-widget{
        display:none!important;
    }
    .student-certificate{
        width:297mm;
        height:210mm;
        max-width:none;
        margin:0;
        border-radius:0;
        box-shadow:none;
        page-break-inside:avoid;
        print-color-adjust:exact;
        -webkit-print-color-adjust:exact;
    }
    @page{
        size:A4 landscape;
        margin:0;
    }
}
@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;
}
.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-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:280px;
}
.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 - 260px);
    min-height:560px;
    max-height:760px;
    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),
        #efeae2;
    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;
}
.inbox-message-actions{
    position:absolute;
    top:6px;
    right:6px;
    z-index:5;
}
.inbox-message-action-toggle{
    width:24px;
    height:24px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:999px;
    background:transparent;
    color:#64748b;
    opacity:0;
    transition:opacity .15s ease,background .15s ease,color .15s ease;
}
.inbox-bubble: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:rgba(15,23,42,.08);
    color:#0f172a;
}
.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;
}
.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; }

@media (max-width: 767px){
  .inbox-chat-head{ padding:10px 12px; align-items:center; }
  .inbox-chat-head h3{ font-size:1rem; }
  .inbox-chat-actions{ gap:6px; }
  .inbox-chat-actions .btn{ padding:8px; }
  .inbox-device-select{ width:100%; margin-top:8px; }
  .inbox-call-card{ width:calc(100% - 20px); padding:12px; }
}

.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;
    left:0;
    bottom:56px;
    z-index:24;
    width:250px;
    display:grid;
    gap:4px;
    padding:8px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:8px;
    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:54px;
    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;
}
.inbox-file-name{
    min-height:22px;
    padding:0 18px 10px 74px;
    color:#475569;
    font-size:.84rem;
    background:#f8fafc;
}
.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}
}
@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(-28%);
        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;
    }
    .inbox-chat-head .gap-3{
        gap:8px!important;
        min-width:0;
    }
    .inbox-chat-head h3{
        max-width:46vw;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        font-size:1rem;
    }
    .inbox-chat-head span{
        max-width:56vw;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        font-size:.76rem;
    }
    .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:82vw;
        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-name{
        min-height:0;
        max-height:36px;
        overflow:hidden;
        padding:0 10px 6px 60px;
        font-size:.76rem;
    }
}
@media(max-width:992px){
    .inbox-shell{
        height:auto;
        min-height:0;
        grid-template-columns:1fr;
    }
    .inbox-sidebar{
        border-right:0;
        border-bottom:1px solid #e2e8f0;
    }
    .inbox-contact-list{
        max-height:none;
    }
    .inbox-chat{
        min-height:620px;
    }
    .inbox-bubble{
        max-width:82%;
    }
}
@media(max-width:576px){
    .inbox-thread{
        padding:14px;
    }
    .inbox-chat-head{
        padding:12px;
    }
    .inbox-expiry-pill{
        display:none;
    }
    .inbox-bubble{
        max-width:88%;
    }
    .inbox-composer{
        grid-template-columns:auto minmax(0,1fr) 44px;
        padding:10px;
    }
    .inbox-tool-btn,
    .inbox-send-btn{
        width:42px;
        height:42px;
    }
    .inbox-attach-menu{
        width:236px;
    }
    .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;
    }
}
@media(max-width:768px){
    #inboxCameraOpen{
        display:flex;
    }
    .inbox-shell{
        position:fixed;
        inset:0;
        width:100vw;
        height:100dvh;
        min-height:0;
        max-height:none;
        display:block;
        grid-template-columns:none;
    }
    .inbox-contact-list{
        max-height:none!important;
        height:auto;
    }
    .inbox-chat{
        min-height:0;
        height:100%;
        grid-template-rows:64px minmax(0,1fr) auto 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:clamp(2rem,3.4vw,3.6rem)!important;
    line-height:1.05!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:clamp(2rem,3.4vw,3.6rem)!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:2.1rem!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;
    }
}

/* 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:clamp(2rem,4vw,4rem);
    font-weight:950;
}
.student-module-hero p{
    color:#64748b;
    font-weight:700;
}
.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:900;
}
.module-filter-form .form-select{
    min-height:44px;
    border-radius:12px;
    font-weight:800;
}
.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:2rem;
    }
}

/* 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.45rem;
    font-weight:900;
    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-weight:750;
    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:50px;
    border:1px solid #cbd5e1;
    background:#fff;
    border-radius:6px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:#475569;
    font-weight:800;
}
.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:58px;
    margin:0 0 10px;
    color:#334155;
    font-size:1.05rem;
    font-weight:900;
    line-height:1.35;
}
.moodle-course-body p{
    min-height:42px;
    margin:0 0 14px;
    color:#64748b;
    font-weight:650;
    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;
    color:#64748b;
    font-weight:700;
    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;
    }
}
