/* Shared Student Dashboard Layout */
:root {
    --student-primary: #a51c62;
    --student-primary-2: #c43a7b;
    --student-primary-soft: #fce8f2;
    --student-blue: #2584b8;
    --student-blue-soft: #e5f4fb;
    --student-purple: #a51c62;
    --student-purple-soft: #fce8f2;
    --student-warning: #e67e22;
    --student-warning-soft: #fff1e3;
    --student-danger: #ef4444;
    --student-bg: #f8f7fa;
    --student-card: #ffffff;
    --student-text: #322635;
    --student-muted: #756d78;
    --student-border: #eee6ec;
    --student-sidebar-width: 304px;
    --student-sidebar-collapsed-width: 94px;
    --student-navbar-height: 78px;
    --student-navbar-z: 3000;
    --student-bottom-nav-height: 68px;
    --student-bottom-nav-z: 3100;
    --student-radius-xl: 30px;
    --student-radius-lg: 24px;
    --student-radius-md: 18px;
    --student-content-max: 1320px;
    --student-shadow-soft: 0 18px 50px rgba(99, 34, 70, 0.08);
    --student-shadow-card: 0 12px 32px rgba(15, 23, 42, 0.08);
    --student-transition: 220ms ease;
}

* { box-sizing: border-box; }

html {
    overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

body.student-dashboard-body,
body.student-dashboard-body.student-dashboard-body {
    min-height: 100vh;
    margin: 0;
    padding-top: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 14%, rgba(250, 204, 21, 0.18), transparent 28rem),
        radial-gradient(circle at 88% 10%, rgba(196, 58, 123, 0.15), transparent 30rem),
        linear-gradient(135deg, #f8fcff 0%, var(--student-bg) 50%, #fffaf0 100%);
    color: var(--student-text);
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body.student-sidebar-open { overflow: hidden; }

.student-skip-link {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 5000;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--student-primary);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-140%);
    transition: none;
}

.student-skip-link:focus { }

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

.student-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(4px);
}

.student-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.student-sidebar {
    position: fixed;
    top: calc(var(--student-navbar-height) + 14px);
    right: 18px;
    bottom: 18px;
    z-index: 1050;
    display: flex;
    width: calc(var(--student-sidebar-width) - 18px);
    border-radius: 34px;
}

.student-sidebar-shell {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    padding: 16px;
    border: 1px solid rgba(165, 28, 98, 0.10);
    border-radius: inherit;
    background:
        radial-gradient(circle at 18% 8%, rgba(254, 243, 199, 0.86), transparent 9rem),
        radial-gradient(circle at 84% 20%, rgba(219, 234, 254, 0.78), transparent 11rem),
        rgba(255, 255, 255, 0.94);
    box-shadow: var(--student-shadow-soft);
    backdrop-filter: blur(18px);
}

.student-sidebar-shell::before {
    content: '';
    position: absolute;
    inset: auto 22px 16px auto;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: rgba(196, 58, 123, 0.09);
    pointer-events: none;
}

.student-sidebar-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0 14px;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.18);
}

.student-sidebar-brand-link {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color: var(--student-primary);
    text-decoration: none;
}

.student-sidebar-logo-wrap {
    position: relative;
    display: grid;
    flex: 0 0 52px;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(165, 28, 98, 0.13);
}

.student-sidebar-logo-wrap > i {
    position: absolute;
    top: -7px;
    left: -7px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--student-warning), #fb7185);
    color: #fff;
    font-size: 0.78rem;
}

.student-sidebar-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 14px;
}

.student-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 1.08rem;
    font-weight: 950;
    line-height: 1.15;
    white-space: nowrap;
}

.student-sidebar-brand-text small {
    color: var(--student-warning);
    font-size: 0.72rem;
    font-weight: 850;
}

.student-sidebar-collapse,
.student-navbar-toggle,
.student-navbar-btn,
.student-navbar-user-trigger {
    border: 0;
    cursor: pointer;
}

.student-sidebar-collapse {
    display: inline-grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-inline-start: auto;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--student-primary-soft), #fff);
    color: var(--student-primary);
    font-size: 1.15rem;
    box-shadow: inset 0 0 0 1px rgba(165, 28, 98, 0.10);
}

.student-sidebar-collapse:hover,
.student-sidebar-collapse:focus-visible,
.student-navbar-toggle:hover,
.student-navbar-toggle:focus-visible,
.student-navbar-btn:hover,
.student-navbar-btn:focus-visible {
}

.student-sidebar-student-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 6px;
    padding: 12px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fffb);
    box-shadow: inset 0 0 0 1px rgba(165, 28, 98, 0.08);
}

.student-sidebar-avatar {
    display: inline-grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--student-purple), #ec4899);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 950;
}

.student-sidebar-student-card span:not(.student-sidebar-avatar) {
    display: block;
    color: var(--student-muted);
    font-size: 0.72rem;
    font-weight: 850;
}

.student-sidebar-student-card strong {
    display: block;
    max-width: 150px;
    overflow: hidden;
    color: var(--student-text);
    font-size: 0.92rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-sidebar-nav {
    position: relative;
    z-index: 1;
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    scrollbar-width: thin;
}

.student-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.student-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 22px;
    color: var(--student-muted) !important;
    font-size: 0.98rem;
    font-weight: 900;
    text-decoration: none !important;
}

.student-nav-link::before {
    content: '';
    position: absolute;
    inset: 10px auto 10px -6px;
    width: 6px;
    border-radius: 999px;
    background: transparent;
}

.student-nav-link:hover,
.student-nav-link:focus-visible {
    background: rgba(252, 232, 242, 0.82);
    color: var(--student-primary) !important;
}

.student-nav-link.active {
    border-color: rgba(196, 58, 123, 0.18);
    background: linear-gradient(135deg, #ffffff, var(--student-primary-soft));
    color: var(--student-primary) !important;
    box-shadow: 0 14px 26px rgba(165, 28, 98, 0.12);
}

.student-nav-link.active::before {
    background: linear-gradient(180deg, var(--student-warning), #fb7185);
}

.student-nav-icon {
    display: inline-grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: #fff;
    color: var(--student-primary);
    font-size: 1.18rem;
    box-shadow: inset 0 0 0 1px rgba(165, 28, 98, 0.08), 0 8px 18px rgba(15, 23, 42, 0.04);
}

.student-nav-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    line-height: 1.2;
}

.student-nav-text { white-space: nowrap; }

.student-nav-copy small {
    margin-top: 3px;
    color: var(--student-muted);
    font-size: 0.68rem;
    font-weight: 800;
    opacity: 0.84;
    white-space: nowrap;
}

.student-nav-arrow {
    color: #cbd5e1;
    font-size: 0.82rem;
}

.student-nav-link:hover .student-nav-arrow,
.student-nav-link.active .student-nav-arrow {
    color: var(--student-warning);
}

.student-sidebar-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    overflow: hidden;
    border-radius: 26px;
    background:
        radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.42), transparent 5rem),
        linear-gradient(135deg, var(--student-primary), var(--student-primary-2));
    color: #fff;
    box-shadow: 0 18px 38px rgba(165, 28, 98, 0.24);
}

.student-sidebar-card-avatar {
    display: inline-grid;
    flex: 0 0 48px;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.4rem;
}

.student-sidebar-card h5 { margin: 0 0 4px; font-size: 0.94rem; font-weight: 950; }
.student-sidebar-card p { margin: 0; font-size: 0.76rem; font-weight: 800; line-height: 1.55; opacity: 0.92; }

.student-layout-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    margin-right: var(--student-sidebar-width);
    padding-top: var(--student-navbar-height);
}

.student-navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: var(--student-navbar-z);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--student-navbar-height);
    margin: 0 !important;
    gap: 16px;
    padding: 12px 26px;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(226, 232, 240, 0.78);
    backdrop-filter: blur(18px);
}

.student-navbar-start,
.student-navbar-end {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.student-navbar-toggle {
    display: none;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 17px;
    background: #fff;
    color: var(--student-primary);
    font-size: 1.55rem;
}

.student-navbar-title {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.student-navbar-title span {
    color: var(--student-muted);
    font-size: 0.74rem;
    font-weight: 850;
}

.student-navbar-title strong {
    color: var(--student-text);
    font-size: 1.04rem;
    font-weight: 950;
}

.student-navbar-subject {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 360px;
    padding: 9px 14px;
    border: 1px solid rgba(165, 28, 98, 0.12);
    border-radius: 999px;
    background: var(--student-primary-soft);
    color: var(--student-primary);
    font-size: 0.84rem;
    font-weight: 850;
    white-space: nowrap;
}

.student-navbar-subject strong {
    overflow: hidden;
    max-width: 180px;
    text-overflow: ellipsis;
}

.student-navbar-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 17px;
    background: #fff;
    color: var(--student-primary);
    font-size: 1.16rem;
}

.student-navbar-badge {
    position: absolute;
    top: 10px;
    left: 11px;
    width: 9px;
    height: 9px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--student-danger);
}

.student-navbar-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 7px 5px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--student-text);
}

.student-navbar-user-trigger:hover,
.student-navbar-user-trigger:focus-visible { }

.student-navbar-avatar {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--student-warning), #f97316);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 950;
}

.student-navbar-user-info { flex-direction: column; align-items: flex-start; line-height: 1.15; }
.student-navbar-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; font-weight: 950; }
.student-navbar-role { color: var(--student-primary); font-size: 0.72rem; font-weight: 850; }
.student-navbar-chevron { color: var(--student-muted); font-size: 0.78rem; }

.student-profile-menu,
.student-notif-menu {
    padding: 14px !important;
    border: 1px solid var(--student-border) !important;
    border-radius: 22px !important;
    box-shadow: var(--student-shadow-card) !important;
}

.student-profile-menu { min-width: 240px; }
.student-notif-menu { width: min(330px, calc(100vw - 28px)); }

.student-dropdown-header { padding: 4px 8px 10px; text-align: center; }
.student-dropdown-header h5 { margin: 0 0 4px; font-size: 0.98rem; font-weight: 950; }
.student-dropdown-header p { margin: 0; color: var(--student-muted); font-size: 0.78rem; font-weight: 750; }

.student-profile-menu .dropdown-item {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.86rem;
    font-weight: 850;
}

.student-profile-menu .dropdown-item:hover { background: var(--student-primary-soft); color: var(--student-primary); }
.student-profile-menu .dropdown-item.text-danger:hover { background: #fff1f2; color: var(--student-danger); }

.student-notif-header h6 { margin: 0 0 10px; font-size: 0.92rem; font-weight: 950; }
.student-notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 16px; background: var(--student-warning-soft); }
.student-notif-icon { font-size: 1.25rem; }
.student-notif-body p { margin: 0 0 2px; font-size: 0.84rem; font-weight: 850; line-height: 1.45; }
.student-notif-body small { color: var(--student-muted); font-size: 0.72rem; font-weight: 750; }

.student-dashboard-page-container {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 18px 28px 28px;
}

.student-dashboard-page-container > main,
.student-dashboard-page-container > .container {
    width: min(100%, var(--student-content-max));
    max-width: var(--student-content-max);
    margin-right: auto !important;
    margin-left: auto !important;
}

.student-dashboard-page-container > :first-child,
.student-dashboard-page-container > main.container,
.student-dashboard-page-container > .container:first-child {
    margin-top: 0 !important;
}

.student-dashboard-page-container > main.my-5,
.student-dashboard-page-container > .container.my-5,
.student-dashboard-page-container > main.mt-5,
.student-dashboard-page-container > .container.mt-5 {
    margin-top: 0 !important;
}

.student-dashboard-page-container > main:first-child > :first-child,
.student-dashboard-page-container > .container:first-child > :first-child {
    margin-top: 0 !important;
}

.student-dashboard-page-container > main:first-child > .saya-student-hero:first-child {
    padding-top: 24px !important;
}

.student-dashboard-page-container .edu-breadcrumb,
.student-dashboard-page-container .breadcrumb,
.student-dashboard-page-container .edu-back-section,
.student-dashboard-page-container .back-section {
    margin-top: 0 !important;
}

.student-dashboard-page-container .btn:not(.btn-close),
.student-dashboard-page-container button:not(.btn-close),
.student-dashboard-page-container a:not(.dropdown-item):not(.student-nav-link):not(.student-bottom-nav-item),
.student-dashboard-page-container select,
.student-dashboard-page-container textarea,
.student-profile-menu .dropdown-item,
.student-notif-menu .dropdown-item {
    min-height: 56px;
}

.student-dashboard-page-container input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    min-height: 52px;
}

.student-dashboard-page-container .form-control,
.student-dashboard-page-container .form-select {
    min-height: 52px;
    font-size: 1rem;
}

.student-dashboard-page-container textarea.form-control {
    min-height: 112px;
}

.student-dashboard-page-container input[type="checkbox"],
.student-dashboard-page-container input[type="radio"] {
    min-width: 22px;
    min-height: 22px;
}

.student-dashboard-page-container .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.student-dashboard-page-container table {
    vertical-align: middle;
}

.student-dashboard-page-container .badge,
.student-dashboard-page-container [class*="badge"],
.student-dashboard-page-container [class*="pill"] {
    line-height: 1.45;
    white-space: normal;
}

.student-dashboard-page-container .modal-dialog {
    max-width: min(100% - 24px, var(--bs-modal-width, 500px));
    margin-right: auto;
    margin-left: auto;
}

.student-dashboard-page-container .modal-content {
    max-height: calc(100dvh - 24px);
}

.student-dashboard-page-container .modal-header,
.student-dashboard-page-container .modal-footer {
    gap: 10px;
}

.student-dashboard-page-container .modal-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.student-dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 28px;
    border-top: 1px solid var(--student-border);
    background: rgba(255, 255, 255, 0.70);
    color: var(--student-muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.student-footer-brand { color: var(--student-primary); font-weight: 950; }

body.student-sidebar-collapsed .student-sidebar { width: calc(var(--student-sidebar-collapsed-width) - 18px); }
body.student-sidebar-collapsed .student-layout-main { margin-right: var(--student-sidebar-collapsed-width); }
body.student-sidebar-collapsed .student-sidebar-brand-text,
body.student-sidebar-collapsed .student-nav-copy,
body.student-sidebar-collapsed .student-nav-arrow,
body.student-sidebar-collapsed .student-sidebar-card div,
body.student-sidebar-collapsed .student-sidebar-student-card div { display: none; }
body.student-sidebar-collapsed .student-sidebar-shell { align-items: center; padding-inline: 12px; }
body.student-sidebar-collapsed .student-sidebar-brand { flex-direction: column; width: 100%; }
body.student-sidebar-collapsed .student-sidebar-collapse { margin: 0; }
body.student-sidebar-collapsed .student-nav-link { justify-content: center; padding-inline: 10px; }
body.student-sidebar-collapsed .student-nav-link::before { left: -8px; }
body.student-sidebar-collapsed .student-sidebar-student-card,
body.student-sidebar-collapsed .student-sidebar-card { justify-content: center; padding: 12px; }

@media (max-width: 1199.98px) {
    body:not(.student-sidebar-open) .student-sidebar { width: calc(var(--student-sidebar-collapsed-width) - 18px); }
    body:not(.student-sidebar-open) .student-layout-main { margin-right: var(--student-sidebar-collapsed-width); }
    body:not(.student-sidebar-open) .student-sidebar-brand-text,
    body:not(.student-sidebar-open) .student-nav-copy,
    body:not(.student-sidebar-open) .student-nav-arrow,
    body:not(.student-sidebar-open) .student-sidebar-card div,
    body:not(.student-sidebar-open) .student-sidebar-student-card div { display: none; }
    body:not(.student-sidebar-open) .student-sidebar-shell { align-items: center; padding-inline: 12px; }
    body:not(.student-sidebar-open) .student-sidebar-brand { flex-direction: column; width: 100%; }
    body:not(.student-sidebar-open) .student-sidebar-collapse { margin: 0; }
    body:not(.student-sidebar-open) .student-nav-link { justify-content: center; padding-inline: 10px; }
    body:not(.student-sidebar-open) .student-sidebar-student-card,
    body:not(.student-sidebar-open) .student-sidebar-card { justify-content: center; padding: 12px; }
}

@media (max-width: 991.98px) {
    .student-sidebar {
        top: calc(var(--student-navbar-height) + 10px);
        right: 12px;
        bottom: 12px;
        width: min(324px, calc(100vw - 24px)) !important;
        transform: translateX(calc(100% + 26px));
    }

    .student-sidebar.show { transform: translateX(0); }
    .student-sidebar-shell { align-items: stretch !important; padding: 16px !important; }
    .student-sidebar-brand { flex-direction: row !important; }
    .student-sidebar-brand-text,
    .student-nav-copy,
    .student-nav-arrow,
    .student-sidebar-card div,
    .student-sidebar-student-card div { display: flex !important; }
    .student-nav-link { justify-content: flex-start !important; padding-inline: 12px !important; }
    .student-sidebar-collapse { display: none; }
    .student-layout-main { margin-right: 0 !important; }
    .student-navbar-toggle { display: grid; }
    .student-navbar { padding-inline: 16px; }
    .student-dashboard-page-container { padding: 16px 14px 24px; }
    .student-dashboard-page-container > main,
    .student-dashboard-page-container > .container {
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    :root { --student-navbar-height: 72px; }
    .student-navbar { min-height: var(--student-navbar-height); }
    .student-navbar-title span { display: none; }
    .student-navbar-subject { display: none; }
    .student-navbar-end { gap: 8px; }
    .student-dashboard-footer { flex-direction: column; text-align: center; }
    .student-dashboard-page-container .card,
    .student-dashboard-page-container article,
    .student-dashboard-page-container .edu-unit-card,
    .student-dashboard-page-container .edu-lesson-card,
    .student-dashboard-page-container .edu-result-card,
    .student-dashboard-page-container .hw-card,
    .student-dashboard-page-container .game-card {
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .student-navbar { padding-inline: 10px; gap: 8px; }
    .student-navbar-start,
    .student-navbar-end { gap: 8px; }
    .student-navbar-title strong { max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .student-navbar-toggle,
    .student-navbar-btn { width: 46px; height: 46px; min-width: 46px; min-height: 46px; }
    .student-navbar-user-trigger { min-height: 46px; padding: 3px 4px; }
    .student-navbar-avatar { width: 42px; height: 42px; }
    .student-navbar-chevron,
    .student-navbar-user-info { display: none; }
    .student-dashboard-page-container { padding: 12px 10px 20px; }
    .student-profile-menu,
    .student-notif-menu {
        width: min(100vw - 20px, 330px);
        max-width: calc(100vw - 20px);
        padding: 10px !important;
    }
    .student-dashboard-page-container .modal-dialog {
        max-width: calc(100% - 16px);
        margin: 8px auto;
    }
    .student-dashboard-page-container .modal-header,
    .student-dashboard-page-container .modal-footer {
        padding: 14px 16px;
    }
    .student-dashboard-page-container .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }
    .student-dashboard-page-container .modal-footer > * {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .student-navbar-title strong { max-width: 96px; }
    .student-navbar-start,
    .student-navbar-end { gap: 6px; }
    .student-dashboard-page-container { padding-inline: 8px; }
}

/* ============================================ */
/* Subject Banner & Switcher                    */
/* ============================================ */

.student-subject-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    border-radius: 16px;
}

.student-subject-banner-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.student-subject-banner-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #166534;
    opacity: 0.8;
}

.student-subject-banner-name {
    font-size: 1.15rem;
    font-weight: 900;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-subject-banner-icon {
    font-size: 1.1rem;
    color: #22c55e;
}

.student-subject-banner-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.student-subject-banner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 56px;
    padding: 10px 20px;
    border: 2px solid #166534;
    border-radius: 14px;
    background: #fff;
    color: #166534;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.student-subject-banner-btn:hover {
    background: #166534;
    color: #fff;
}

.student-subject-banner-btn:focus-visible {
    outline: 3px solid #166534;
    outline-offset: 2px;
}

.student-subject-banner-btn i {
    font-size: 0.8rem;
}

.student-subject-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 64px;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    text-align: start;
    position: relative;
}

.student-subject-card:hover {
    border-color: var(--edu-primary, #a51c62);
    background: #f0fdf4;
}

.student-subject-card:focus-visible {
    outline: 3px solid var(--edu-primary, #a51c62);
    outline-offset: 2px;
}

.student-subject-card.active {
    border-color: var(--edu-primary, #a51c62);
    background: #f0fdf4;
}

.student-subject-card-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.student-subject-card-icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.student-subject-card-label {
    flex: 1;
    font-weight: 800;
    font-size: 1.05rem;
    color: #1f2937;
}

.student-subject-card-check {
    color: var(--edu-primary, #a51c62);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.student-subject-card-arrow {
    color: #9ca3af;
    font-size: 1.1rem;
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .student-subject-banner {
        padding: 10px 14px;
        margin: 0 0 12px;
        border-radius: 12px;
    }

    .student-subject-banner-name {
        font-size: 1rem;
    }

    .student-subject-banner-btn {
        min-height: 48px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .student-subject-card {
        min-height: 56px;
        padding: 12px 14px;
    }

    .student-subject-card-label {
        font-size: 0.95rem;
    }
}

/* ============================================ */
/* Bottom Navigation Bar (Mobile primary nav)    */
/* ============================================ */

.student-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--student-bottom-nav-z);
    background: #ffffff;
    border-top: 1px solid var(--student-border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.student-bottom-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: var(--student-bottom-nav-height);
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2px;
}

.student-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: relative;
    min-width: 0;
    min-height: 56px;
    padding: 4px 2px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--student-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
    gap: 1px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: visible;
}

.student-bottom-nav-item:active {
}

.student-bottom-nav-item.active,
.student-bottom-nav-item:hover {
    color: var(--student-primary);
    background: var(--student-primary-soft);
}

.student-bottom-nav-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    font-size: 1.4rem;
}

.student-bottom-nav-item.active .student-bottom-nav-icon {
}

.student-bottom-nav-emoji {
    font-size: 1.35rem;
    line-height: 1;
    display: block;
}

.student-bottom-nav-label {
    display: block;
    line-height: 1.15;
    font-size: 0.66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 850;
}

.student-bottom-nav-item.active .student-bottom-nav-label {
    font-weight: 950;
    color: var(--student-primary);
}

.student-bottom-nav-indicator {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--student-primary);
}

/* Show bottom nav on mobile/tablet */
@media (max-width: 991.98px) {
    .student-bottom-nav {
        display: block;
    }

    body.student-has-bottom-nav .student-dashboard-page-container {
        padding-bottom: calc(var(--student-bottom-nav-height) + env(safe-area-inset-bottom, 0) + 12px);
    }
}

/* Hide bottom nav on desktop */
@media (min-width: 992px) {
    .student-bottom-nav {
        display: none !important;
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .student-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

/* ============================================ */
/* Mobile Drawer (sidebar on mobile)            */
/* ============================================ */

.student-sidebar-drawer-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 14px;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.18);
}

.student-sidebar-drawer-title {
    font-size: 1.05rem;
    font-weight: 950;
    color: var(--student-text);
}

.student-sidebar-drawer-close {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--student-primary-soft);
    color: var(--student-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--student-transition);
}

.student-sidebar-drawer-close:hover { }

/* On mobile: hide primary nav items, show drawer header */
@media (max-width: 991.98px) {
    .student-nav-primary-list {
        display: none;
    }

    .student-nav-divider {
        display: none;
    }

    .student-sidebar-drawer-header {
        display: flex;
    }

    .student-sidebar-nav {
        padding-top: 4px;
    }

    .student-nav-secondary-list .student-nav-link {
        min-height: 56px;
        padding: 12px 14px;
        border-radius: 18px;
    }

    .student-nav-secondary-list .student-nav-link.active {
        background: linear-gradient(135deg, #ffffff, var(--student-primary-soft));
        border-color: rgba(196, 58, 123, 0.18);
        box-shadow: 0 8px 20px rgba(165, 28, 98, 0.10);
    }

    .student-nav-secondary-sep {
        height: 1px;
        margin: 8px 12px;
        background: var(--student-border);
        list-style: none;
    }

    #studentSidebar.show .student-dashboard-page-container {
        pointer-events: none;
    }
}

.student-nav-language {
    padding: 16px 12px 4px;
    border-top: 1px dashed rgba(100, 116, 139, 0.18);
    margin-top: 8px;
}

.student-nav-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--student-primary-soft);
    color: var(--student-primary);
    font-size: 0.88rem;
    font-weight: 850;
    cursor: default;
    user-select: none;
}

.student-nav-lang-item i {
    font-size: 1.1rem;
}

.student-nav-lang-check {
    margin-right: auto;
    font-weight: 950;
    color: var(--student-primary);
}

/* On desktop: show primary items, show divider, hide drawer header */
@media (min-width: 992px) {
    .student-sidebar-drawer-header {
        display: none !important;
    }

    .student-nav-primary-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .student-nav-divider {
        display: block;
        margin: 8px 12px;
        border: 0;
        border-top: 1px dashed rgba(100, 116, 139, 0.18);
    }

    .student-nav-secondary-sep {
        height: 1px;
        margin: 8px 12px;
        background: var(--student-border);
        list-style: none;
    }
}

