/* Shared dashboard layout, theme, and responsive styles. */

body {
    background: #0b1120;
    min-height: 100vh;
    overflow-y: auto;
}

body.bg-gray-50 {
    background-color: #0b1120;
}

.student-dashboard-layout :is(h1, h2, h3, h4) {
    font-family: "Poppins", "Noto Sans Sinhala", "Inter", sans-serif;
}

.student-dashboard-layout :is(.font-mono, code, kbd, samp) {
    font-family: "JetBrains Mono", "Noto Sans Sinhala", monospace;
}

.student-dashboard-layout {
    font-family: "Inter", "Noto Sans Sinhala", sans-serif;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
}

.student-dashboard-brandbar {
    position: sticky;
    top: 0;
    z-index: 30;
    flex: 0 0 auto;
}

.student-dashboard-shell {
    flex: 1 0 auto;
    min-height: calc(100vh - 3.5rem);
    align-items: stretch;
}

.student-dashboard-shell > aside {
    position: sticky;
    top: 3.5rem;
    align-self: flex-start;
    height: calc(100vh - 3.5rem);
    flex-shrink: 0;
}

.student-dashboard-shell > #student-navigation-sidebar {
    width: 16rem;
    transition: width .25s ease, opacity .18s ease, transform .25s ease;
}

.student-dashboard-shell > #student-navigation-sidebar.student-navigation-collapsed {
    width: 0;
    min-width: 0;
    flex-basis: 0;
    overflow: hidden;
    border: 0;
    opacity: 0;
    transform: translateX(-1rem);
    pointer-events: none;
}

.student-dashboard-shell > .dashboard-main {
    min-width: 0;
    min-height: calc(100vh - 3.5rem);
    height: auto;
    max-height: none;
    overflow: visible;
}

.student-dashboard-shell.student-navigation-collapsed > .dashboard-main > main {
    max-width: none;
}

.student-dashboard-shell.student-timeline-active {
    flex: 0 0 auto;
    min-height: 0;
}

.student-dashboard-shell.student-timeline-active > aside {
    align-self: stretch;
    height: auto;
}

.student-dashboard-shell.student-timeline-active > .dashboard-main {
    min-height: 0;
}

.student-dashboard-shell.student-timeline-active #teacher-posts-list {
    max-height: none;
    overflow: visible;
}

.student-live-player-frame {
    isolation: isolate;
    overflow: hidden;
}

.student-live-player-frame:fullscreen,
.student-live-player-frame:-webkit-full-screen {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    background: #000;
}

.student-live-player-frame:fullscreen #liveVideo,
.student-live-player-frame:-webkit-full-screen #liveVideo {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}

.student-live-player-watermark {
    z-index: 2;
    opacity: .92;
}

.student-session-watermark {
    position: absolute;
    z-index: 2;
    max-width: 72%;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, .55);
    font: 600 clamp(9px, 1vw, 12px)/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: .025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
    pointer-events: none;
    opacity: .5;
    transform: translate(-50%, -50%);
}

.student-session-watermark[hidden] {
    display: none;
}

.student-live-player-controls {
    z-index: 3;
    min-height: 4.5rem;
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(0, 0, 0, .86));
    opacity: 1;
    transform: translateY(0);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    visibility: visible;
}

.student-live-player-frame.controls-hidden .student-live-player-controls {
    opacity: 0;
    pointer-events: none;
    transform: translateY(.5rem);
    visibility: hidden;
}

.student-live-player-button {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.student-live-player-button:hover,
.student-live-player-button:focus-visible {
    background: rgba(255, 255, 255, .16);
}

.student-live-player-time {
    flex: 0 0 auto;
    color: #f8fafc;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
}

.student-live-player-seek {
    min-width: 2rem;
    flex: 1 1 auto;
    accent-color: #6366f1;
}

.student-live-player-frame:not(.vod-playback) .student-live-player-seek {
    display: none;
}

.student-live-player-frame.live-playback .student-live-player-spacer {
    display: block;
    flex: 1 1 auto;
}

.student-live-player-frame:not(.live-playback) .student-live-player-spacer {
    display: none;
}

.student-live-player-volume {
    width: 4.5rem;
    flex: 0 0 auto;
    accent-color: #6366f1;
}

.student-live-player-frame:fullscreen .student-live-player-controls,
.student-live-player-frame:-webkit-full-screen .student-live-player-controls {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
}

@media (max-width: 480px) {
    .student-live-player-controls {
        gap: .35rem;
        padding-right: .5rem;
        padding-left: .5rem;
    }
    .student-live-player-volume {
        display: none;
    }
    .student-live-player-button {
        width: 2rem;
    }
}

.dashboard-main {
    background: #0b1120;
    color: #e2e8f0;
    color-scheme: dark;
    font-size: 14px;
}

.student-dashboard-shell [class~="text-[11px]"] { font-size: 12px !important; }

.student-dashboard-shell [class~="text-xs"] { font-size: 12px !important; }

.student-dashboard-shell [class~="text-sm"] { font-size: 13px !important; }

.student-dashboard-shell [class~="text-md"] { font-size: 14px !important; }

.student-dashboard-shell [class~="text-base"] { font-size: 14px !important; }

.student-dashboard-shell [class~="text-lg"] { font-size: 16px !important; }

.student-dashboard-shell [class~="text-xl"] { font-size: 18px !important; }

.student-dashboard-shell [class~="text-2xl"] { font-size: 22px !important; }

#tab-paid-classes > section[aria-labelledby="paid-class-receipts-title"],
#tab-paid-classes > section[aria-labelledby="paid-class-teachers-title"] {
    border-color: rgba(129, 140, 248, .42) !important;
    background: linear-gradient(145deg, rgba(20, 27, 48, .96), rgba(13, 18, 34, .98)) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

#tab-paid-classes [class~="bg-slate-50"],
#tab-paid-classes [class~="bg-white"] {
    background-color: #111827 !important;
}

#tab-paid-classes [class~="border-slate-200"],
#tab-paid-classes [class~="border-slate-300"] {
    border-color: rgba(129, 140, 248, .32) !important;
}

#tab-paid-classes [class~="text-slate-900"] {
    color: #f8fafc !important;
}

#tab-paid-classes [class~="text-slate-700"] {
    color: #dbeafe !important;
}

#tab-paid-classes [class~="text-slate-600"],
#tab-paid-classes [class~="text-slate-500"] {
    color: #a3aec7 !important;
}

#tab-paid-classes [class~="text-indigo-600"],
#tab-paid-classes [class~="text-indigo-700"] {
    color: #a99fff !important;
}

#tab-paid-classes [class~="bg-indigo-50"] {
    background-color: rgba(123, 110, 255, .16) !important;
}

#tab-paid-classes #paid-class-receipts article,
#tab-paid-classes #paid-classes-list [data-paid-class-teacher],
#tab-paid-classes #paid-classes-list [data-paid-class-group],
#tab-paid-classes #paid-classes-list article {
    border-color: rgba(129, 140, 248, .34) !important;
    background: linear-gradient(135deg, #18233b, #111827) !important;
}

#tab-paid-classes #paid-classes-list [data-paid-class-teacher]:hover,
#tab-paid-classes #paid-classes-list [data-paid-class-group]:hover {
    border-color: rgba(103, 232, 249, .62) !important;
    background: linear-gradient(135deg, #1d2b49, #172039) !important;
}

.dashboard-main > header {
    background-color: #111827 !important;
    border-color: #263244 !important;
}

.dashboard-main [class~="bg-white"],
.dashboard-main [class~="bg-gray-50"],
.dashboard-main [class~="bg-gray-100"] {
    background-color: #111827 !important;
}

.dashboard-main [class*="border-gray-"] {
    border-color: #293548 !important;
}

.dashboard-main [class*="text-gray-"] {
    color: #cbd5e1 !important;
}

.dashboard-main [class*="hover:bg-gray-"]:hover {
    background-color: #1e293b !important;
}

.dashboard-main input,
.dashboard-main select,
.dashboard-main textarea {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

.dashboard-main input::placeholder {
    color: #94a3b8;
}

#material-file {
    min-height: 3.2rem;
    padding: .4rem;
    border: 1px dashed #506483 !important;
    border-radius: .9rem !important;
    background: rgba(8, 15, 27, .62) !important;
    color: #cbd5e1 !important;
}

#material-file::file-selector-button {
    margin-right: .8rem;
    padding: .55rem .85rem;
    border: 0;
    border-radius: .6rem;
    background: #263b5b;
    color: #dbeafe;
    font-weight: 650;
    cursor: pointer;
}

#material-file::file-selector-button:hover {
    background: #31466b;
}

#material-classification-fields {
    padding: 1rem;
    border: 1px solid rgba(71, 94, 128, .42);
    border-radius: 1rem;
    background: rgba(8, 15, 27, .42);
}

#material-classification-fields label {
    color: #d7deea !important;
}

#material-classification-fields select {
    min-height: 2.9rem;
    padding: .7rem .85rem;
    border: 1px solid #34435d !important;
    border-radius: .75rem !important;
    background-color: #0c1423 !important;
    color: #e5eaf4 !important;
}

#material-classification-fields select:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, .13);
    outline: none;
}

#subscribed-teachers-list > div {
    min-height: 2.8rem;
    border: 1px solid rgba(71, 85, 105, .46);
    background: rgba(30, 41, 59, .58) !important;
}

#teacher-posts-list > article header {
    align-items: center;
    gap: .65rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid rgba(71, 85, 105, .45);
}

#teacher-posts-list > article header img,
#teacher-posts-list > article header > span {
    width: 2rem;
    height: 2rem;
}

#teacher-posts-list .teacher-post-image {
    display: block;
    width: 100%;
    max-height: 20rem;
    margin-top: .75rem;
    border: 1px solid rgba(71, 85, 105, .56);
    border-radius: .65rem;
    background: rgba(2, 6, 23, .35);
    object-fit: contain;
}

#teacher-posts-list .teacher-post-image[hidden] {
    display: none;
}

#teacher-posts-list > article h3 {
    margin-top: .75rem;
    font-size: .95rem;
    line-height: 1.4;
}

#teacher-posts-list > article p {
    line-height: 1.5;
}

#teacher-posts-list > article footer {
    border-color: rgba(71, 85, 105, .45) !important;
    margin-top: .75rem !important;
    padding-top: .65rem !important;
}

#teacher-posts-list button[data-post-like] {
    min-width: 6.2rem;
    justify-content: center;
    border: 1px solid transparent;
    background: rgba(30, 41, 59, .52);
}

#teacher-posts-list button[data-post-like]:hover {
    border-color: rgba(251, 113, 133, .22);
    background: rgba(159, 18, 57, .15);
}

#question-submit-button {
    min-height: 2.9rem;
    padding: .75rem 1.25rem;
    border: 1px solid rgba(199, 210, 254, .16);
    border-radius: .8rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 8px 20px rgba(79, 70, 229, .25);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

#question-submit-button:not(:disabled):hover {
    box-shadow: 0 12px 26px rgba(79, 70, 229, .36);
    filter: brightness(1.08);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    #tab-recordings .qa-hero {
        align-items: flex-start;
    }
    #tab-recordings .qa-hero-art {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 1rem;
        font-size: 1.4rem;
    }
    #student-questions-list [data-answer-node] {
        margin-left: 0 !important;
    }
    .student-site-footer-inner {
        padding: 2.2rem 1.25rem 1.2rem;
    }
    .student-site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.7rem 1.2rem;
    }
    .student-footer-brand {
        grid-column: 1 / -1;
    }
}

.dashboard-main .answer-depth-1 {
    margin-left: 8px;
}

.dashboard-main .answer-depth-2 {
    margin-left: 16px;
}

.dashboard-main .answer-depth-3 {
    margin-left: 24px;
}

.dashboard-main .answer-depth-4 {
    margin-left: 32px;
}

.dashboard-main .answer-depth-5 {
    margin-left: 40px;
}

.dashboard-main .answer-depth-6 {
    margin-left: 48px;
}

.dashboard-main .answer-depth-7 {
    margin-left: 56px;
}

.dashboard-main .answer-depth-8 {
    margin-left: 64px;
}

.student-dashboard-brandbar {
    border-color: rgba(100, 116, 139, .3) !important;
    background:
        radial-gradient(ellipse at 12% 0, rgba(34, 211, 238, .12), transparent 34%),
        linear-gradient(105deg, #101a2b, #111827 62%, #172033) !important;
    box-shadow: 0 8px 24px rgba(2, 6, 23, .2);
}

.student-dashboard-brandbar > span {
    letter-spacing: .045em;
}

.student-dashboard-brandbar > span > i {
    color: #67e8f9 !important;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, .28));
}

#navigation-collapse-button {
    border-color: rgba(148, 163, 184, .25) !important;
    background: rgba(30, 41, 59, .55);
}

#navigation-collapse-button:hover {
    border-color: rgba(103, 232, 249, .48) !important;
    background: rgba(8, 145, 178, .18) !important;
    color: #cffafe !important;
}

.student-dashboard-shell > #student-navigation-sidebar {
    border-right: 1px solid rgba(100, 116, 139, .22);
    background:
        radial-gradient(ellipse at 0 0, rgba(99, 102, 241, .11), transparent 42%),
        linear-gradient(180deg, #101a2b, #0d1524 72%, #111827) !important;
    box-shadow: 8px 0 28px rgba(2, 6, 23, .12);
}

#student-navigation-sidebar nav a {
    min-height: 2.9rem;
    border: 1px solid transparent;
    color: #b9c6d8 !important;
    font-size: .92rem;
    font-weight: 550;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

#student-navigation-sidebar nav a:hover:not([class~="bg-indigo-600"]) {
    border-color: rgba(148, 163, 184, .13);
    background: rgba(51, 65, 85, .48) !important;
    color: #f1f5f9 !important;
    transform: translateX(2px);
}

#student-navigation-sidebar nav a[class~="bg-indigo-600"] {
    border-color: rgba(103, 232, 249, .24);
    background: linear-gradient(110deg, #4f46e5, #2563eb 68%, #0e7490) !important;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .2), inset 0 1px rgba(255, 255, 255, .12);
    color: #fff !important;
}

#nav-timetable:not([class~="bg-indigo-600"]) i { color: #a5b4fc; }

#nav-teacher-timeline:not([class~="bg-indigo-600"]) i { color: #67e8f9; }

#nav-free-classes:not([class~="bg-indigo-600"]) i { color: #86efac; }

#nav-materials:not([class~="bg-indigo-600"]) i { color: #fcd34d; }

#nav-recordings:not([class~="bg-indigo-600"]) i { color: #fda4af; }

#student-navigation-sidebar > div:last-child {
    border-color: rgba(100, 116, 139, .22) !important;
}

#logout-btn {
    color: #fda4af !important;
}

#logout-btn:hover {
    background: rgba(190, 24, 93, .2) !important;
    color: #ffe4e6 !important;
}

.dashboard-main {
    background:
        radial-gradient(ellipse at 92% 0, rgba(14, 116, 144, .09), transparent 34%),
        #0a1020 !important;
}

.dashboard-main > header {
    background:
        linear-gradient(105deg, rgba(21, 32, 51, .98), rgba(17, 24, 39, .98) 62%, rgba(20, 35, 53, .98)) !important;
    box-shadow: 0 8px 24px rgba(2, 6, 23, .12);
}

#student-name {
    color: #f1f5f9 !important;
}

#student-email {
    color: #94a3b8 !important;
}

.dashboard-main > header .rounded-full.bg-indigo-600 {
    border: 2px solid rgba(103, 232, 249, .5);
    background: linear-gradient(145deg, #4f46e5, #0891b2) !important;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, .1);
}

#subscribed-teachers-list > div {
    border-color: rgba(52, 211, 153, .2);
    background: linear-gradient(100deg, rgba(16, 185, 129, .1), rgba(30, 41, 59, .6)) !important;
}

#subscribed-teachers-list > div > span:first-child {
    color: #d1fae5 !important;
}

#teacher-posts-list > article {
    border-left: 3px solid rgba(129, 140, 248, .68) !important;
    background: linear-gradient(120deg, rgba(30, 35, 68, .88), rgba(16, 25, 42, .98) 70%) !important;
}

#teacher-posts-list > article:nth-child(3n + 2) {
    border-left-color: rgba(103, 232, 249, .7) !important;
    background: linear-gradient(120deg, rgba(16, 47, 60, .8), rgba(16, 25, 42, .98) 70%) !important;
}

#teacher-posts-list > article:nth-child(3n) {
    border-left-color: rgba(251, 191, 36, .72) !important;
    background: linear-gradient(120deg, rgba(55, 42, 30, .68), rgba(16, 25, 42, .98) 70%) !important;
}

#teacher-posts-list > article header {
    border-color: rgba(148, 163, 184, .2);
}

#teacher-posts-list > article header img {
    border-color: rgba(103, 232, 249, .3);
}

#teacher-posts-list button[data-post-comments] {
    border-color: rgba(103, 232, 249, .2) !important;
    background: rgba(8, 145, 178, .1);
    color: #a5f3fc !important;
}

#teacher-posts-list button[data-post-comments]:hover {
    border-color: rgba(103, 232, 249, .45) !important;
    background: rgba(8, 145, 178, .2);
}

#question-submit-button {
    border-color: rgba(240, 171, 252, .25);
    background: linear-gradient(120deg, #7c3aed, #c026d3);
    box-shadow: 0 8px 20px rgba(147, 51, 234, .2);
}

#question-submit-button:not(:disabled):hover {
    box-shadow: 0 12px 26px rgba(192, 38, 211, .28);
}

.dashboard-main button:focus-visible,
.dashboard-main a:focus-visible,
.student-dashboard-brandbar button:focus-visible,
#student-navigation-sidebar a:focus-visible,
#logout-btn:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 3px;
}

#subscribed-teachers-list > div {
    border-radius: .8rem;
    box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.desk-panel-description {
    margin-top: .2rem;
    color: #91a2b9;
    font-size: .75rem;
    line-height: 1.4;
}

#subscribed-teachers-list {
    display: grid;
    gap: .75rem;
}

.live-waiting-panel {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(251, 191, 36, .32);
    border-radius: 1rem;
    background:
        radial-gradient(ellipse at 0 0, rgba(245, 158, 11, .12), transparent 52%),
        linear-gradient(120deg, #172235, #111827);
    color: #e2e8f0;
    box-shadow: 0 12px 28px rgba(2, 6, 23, .2);
}

.live-waiting-panel[hidden] {
    display: none;
}

.live-waiting-icon {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(251, 191, 36, .24);
    border-radius: .9rem;
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
}

#live-waiting-title {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.5;
}

#live-waiting-message {
    margin: .3rem 0 .65rem;
    color: #cbd5e1;
    font-size: .875rem;
    line-height: 1.55;
}

.live-waiting-status {
    color: #fcd34d;
    font-size: .78rem;
    font-weight: 650;
}

.live-waiting-status i {
    margin-right: .25rem;
}

@media (max-width: 767px) {
    .student-dashboard-shell {
        flex-direction: column;
    }
    .student-dashboard-shell > #student-navigation-sidebar {
        position: sticky;
        top: 3.5rem;
        z-index: 20;
        width: 100%;
        height: auto;
        min-height: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: 0;
        border-bottom: 1px solid rgba(100, 116, 139, .22);
    }
    #student-navigation-sidebar > div:first-child {
        min-width: 0;
        flex: 1;
    }
    #student-navigation-sidebar nav {
        display: flex;
        width: 100%;
        gap: .25rem;
        overflow-x: auto;
        margin-top: 0;
        padding: .35rem .5rem;
        scrollbar-width: none;
    }
    #student-navigation-sidebar nav::-webkit-scrollbar {
        display: none;
    }
    #student-navigation-sidebar nav > :not([hidden]) ~ :not([hidden]) {
        margin-block-start: 0;
    }
    #student-navigation-sidebar nav a {
        flex: 0 0 auto;
        min-height: 2.75rem;
        padding: .55rem .65rem;
        white-space: nowrap;
    }
    #student-navigation-sidebar > div:last-child {
        flex: 0 0 auto;
        padding: .35rem .5rem;
        border-top: 0;
        border-left: 1px solid rgba(100, 116, 139, .22);
    }
    #student-navigation-sidebar #logout-btn {
        width: auto;
        white-space: nowrap;
    }
}

.student-dashboard-shell h1,
.student-dashboard-shell h2 {
    font-size: 22px !important;
}

.student-dashboard-shell h3,
.student-dashboard-shell h4 {
    font-size: 18px !important;
}

.student-dashboard-shell button {
    min-height: 32px !important;
    height: auto !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.student-dashboard-shell button i,
.student-dashboard-shell button svg {
    width: 14px !important;
    height: 14px !important;
    font-size: 12px !important;
}

.student-dashboard-shell button[class~="h-8"][class~="w-8"],
.student-dashboard-shell button[class~="h-9"][class~="w-9"],
.student-dashboard-shell button[class~="h-10"][class~="w-10"] {
    width: 32px !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 !important;
}

.student-dashboard-shell input,
.student-dashboard-shell select,
.student-dashboard-shell textarea {
    font-size: 13px !important;
}

.student-dashboard-shell [class~="p-2"] { padding: .375rem !important; }

.student-dashboard-shell [class~="p-3"] { padding: .5625rem !important; }

.student-dashboard-shell [class~="p-4"] { padding: .75rem !important; }

.student-dashboard-shell [class~="p-5"] { padding: .9375rem !important; }

.student-dashboard-shell [class~="p-6"] { padding: 1.125rem !important; }

.student-dashboard-shell [class~="p-8"] { padding: 1.5rem !important; }

.student-dashboard-shell [class~="px-2"] { padding-inline: .375rem !important; }

.student-dashboard-shell [class~="px-3"] { padding-inline: .5625rem !important; }

.student-dashboard-shell [class~="px-4"] { padding-inline: .75rem !important; }

.student-dashboard-shell [class~="px-5"] { padding-inline: .9375rem !important; }

.student-dashboard-shell [class~="px-6"] { padding-inline: 1.125rem !important; }

.student-dashboard-shell [class~="px-8"] { padding-inline: 1.5rem !important; }

.student-dashboard-shell [class~="py-2"] { padding-block: .375rem !important; }

.student-dashboard-shell [class~="py-3"] { padding-block: .5625rem !important; }

.student-dashboard-shell [class~="py-4"] { padding-block: .75rem !important; }

.student-dashboard-shell [class~="py-5"] { padding-block: .9375rem !important; }

.student-dashboard-shell [class~="py-6"] { padding-block: 1.125rem !important; }

.student-dashboard-shell [class~="py-8"] { padding-block: 1.5rem !important; }

.student-dashboard-shell [class~="gap-3"] { gap: .5625rem !important; }

.student-dashboard-shell [class~="gap-4"] { gap: .75rem !important; }

.student-dashboard-shell [class~="gap-5"] { gap: .9375rem !important; }

.student-dashboard-shell [class~="gap-6"] { gap: 1.125rem !important; }

.student-dashboard-shell [class~="space-y-3"] > :not([hidden]) ~ :not([hidden]) { margin-block-start: .5625rem !important; }

.student-dashboard-shell [class~="space-y-4"] > :not([hidden]) ~ :not([hidden]) { margin-block-start: .75rem !important; }

.student-dashboard-shell [class~="space-y-5"] > :not([hidden]) ~ :not([hidden]) { margin-block-start: .9375rem !important; }

.student-dashboard-shell [class~="space-y-6"] > :not([hidden]) ~ :not([hidden]) { margin-block-start: 1.125rem !important; }

.student-dashboard-shell > #student-navigation-sidebar {
    width: 4.5rem !important;
}

#student-navigation-sidebar > div:first-child {
    width: 100%;
}

#student-navigation-sidebar nav {
    display: grid;
    gap: .5rem;
    margin-top: 1rem;
    padding-inline: .5rem;
}

#student-navigation-sidebar nav a,
#student-navigation-sidebar #logout-btn {
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    place-items: center;
    gap: 0;
    padding: .5rem !important;
    text-align: center;
}

#student-navigation-sidebar nav a .nav-label,
#student-navigation-sidebar #logout-btn .nav-label {
    display: none;
}

#student-navigation-sidebar nav a > i,
#student-navigation-sidebar #logout-btn > i {
    margin: 0 !important;
    font-size: 1.1rem !important;
}

#student-navigation-sidebar nav #student-qna-unread-count:not(.hidden) {
    position: absolute;
    top: .15rem;
    right: .15rem;
    display: block;
    min-width: .8rem;
    padding: 0 .18rem !important;
    font-size: .55rem !important;
    line-height: 1rem !important;
}

#student-navigation-sidebar > div:last-child {
    padding: .5rem !important;
}

@media (max-width: 767px) {
    .student-dashboard-shell > #student-navigation-sidebar {
        width: 100% !important;
    }
    #student-navigation-sidebar > div:first-child {
        width: auto;
        flex: 1;
    }
    #student-navigation-sidebar nav {
        display: flex;
        justify-content: flex-start;
        gap: .35rem;
        padding-inline: .4rem;
    }
    #student-navigation-sidebar nav a {
        width: 2.75rem;
        min-width: 2.75rem;
    }
    #student-navigation-sidebar > div:last-child {
        padding: .35rem !important;
    }
    #student-navigation-sidebar #logout-btn {
        width: 2.5rem;
        min-width: 2.5rem;
    }
}

/* Multi-color accents keep each learning area distinct without changing layout. */

.dashboard-main {
    background:
        radial-gradient(ellipse at 92% 0, rgba(14, 116, 144, .08), transparent 34%),
        #0a0f1d !important;
}

#session-status {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .2rem .48rem;
    border: 1px solid rgba(52, 211, 153, .2);
    border-radius: 999px;
    background: rgba(16, 185, 129, .08);
    color: #a7f3d0 !important;
}

#session-status::before {
    width: .42rem;
    height: .42rem;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .48);
    content: "";
    animation: dashboard-online-pulse 1.8s ease-out infinite;
}

@keyframes dashboard-online-pulse {
    70% { box-shadow: 0 0 0 .38rem rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

#student-navigation-sidebar nav a[class~="bg-indigo-600"] {
    border-color: rgba(103, 232, 249, .3);
    background: linear-gradient(110deg, #0891b2, #2563eb 72%, #0e7490) !important;
    box-shadow: 0 8px 22px rgba(8, 145, 178, .2), inset 0 1px rgba(255, 255, 255, .12);
    color: #fff !important;
}

#student-navigation-sidebar nav a[class~="bg-indigo-600"] i { color: #fff !important; }

#student-navigation-sidebar nav a:hover:not([class~="bg-indigo-600"]) {
    border-color: rgba(103, 232, 249, .16);
    background: rgba(8, 145, 178, .1) !important;
}

@media (prefers-reduced-motion: reduce) {
    #session-status::before,
    #tab-teacher-timeline .teacher-timeline-live-status i,
    #tab-timetable .premium-server-status i { animation: none; }
}
