:root {
    --font-body: "Avenir Next", "Century Gothic", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Avenir Next", "Century Gothic", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --green-900: #0f4c3a;
    --green-700: #1f7a4d;
    --green-500: #3aa35d;
    --blue-900: #0b3f75;
    --blue-700: #1366b1;
    --blue-100: #e8f3ff;
    --gold-700: #d8a500;
    --gold-500: #f2c230;
    --gold-100: #fff5c8;
    --orange-700: #d86f16;
    --orange-100: #ffe8c9;
    --ink: #15312a;
    --muted: #5d7268;
    --paper: #f6fbf7;
    --panel: rgba(255, 255, 255, 0.96);
    --border: rgba(24, 82, 67, 0.1);
    --success: #ddf7e8;
    --error: #ffe5e5;
    --danger: #d82828;
    --shadow: 0 18px 44px rgba(17, 54, 108, 0.1);
    --shadow-soft: 0 10px 28px rgba(17, 54, 108, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(58, 163, 93, 0.1), transparent 22%),
        radial-gradient(circle at top right, rgba(45, 140, 255, 0.09), transparent 30%),
        linear-gradient(160deg, #f3f8f6 0%, #f4f8ff 52%, #fafcff 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.site-header h1,
.brand-block h1,
.teacher-brand h1,
.teacher-topbar h2,
.teacher-dashboard-intro h3,
.teacher-panel-head h3,
.announcement-modal-card h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.page-shell {
    min-height: 100vh;
}

a {
    color: var(--blue-700);
    text-decoration: none;
}

a:hover {
    color: var(--green-700);
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    background: rgba(19, 102, 177, 0.08);
    font-weight: 700;
}

.attachment-wrap {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.85rem;
}

.attachment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.attachment-head h3 {
    margin: 0;
}

.attachment-viewer {
    position: relative;
}

.module-fullscreen-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid rgba(19, 102, 177, 0.18);
    border-radius: 10px;
    color: var(--blue-700);
    background: #fff;
    cursor: pointer;
}

.module-fullscreen-btn:hover,
.module-fullscreen-btn:focus-visible {
    color: #fff;
    background: var(--blue-700);
    outline: none;
}

.module-fullscreen-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.module-fullscreen-exit-icon,
.module-fullscreen-btn[aria-pressed="true"] .module-fullscreen-enter-icon {
    display: none;
}

.module-fullscreen-btn[aria-pressed="true"] .module-fullscreen-exit-icon {
    display: block;
}

.attachment-viewer:fullscreen,
.attachment-viewer:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    padding: 0;
    background: #111;
}

.attachment-viewer:fullscreen .attachment-preview,
.attachment-viewer:-webkit-full-screen .attachment-preview {
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
}

.attachment-preview {
    width: 100%;
    min-height: 420px;
    border: 1px solid rgba(19, 102, 177, 0.16);
    border-radius: 18px;
    background: #fff;
}

.image-preview {
    min-height: 0;
    max-height: 520px;
    object-fit: contain;
    padding: 0.4rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(100deg, rgba(12, 48, 40, 0.96), rgba(17, 77, 126, 0.94));
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 32px rgba(10, 32, 63, 0.16);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.35rem;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}

.site-header h1,
.page-title {
    margin: 0;
    font-size: 1.85rem;
}

.site-header h1,
.tagline,
.top-nav a,
.notif-link {
    color: #fff;
}

.tagline,
.muted {
    color: var(--muted);
}

.site-header .tagline {
    color: rgba(255,255,255,0.85);
    font-size: 0.92rem;
}

.top-nav,
.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.top-nav a,
.notif-link {
    padding: 0.62rem 0.95rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    transition: 0.2s ease;
}

.top-nav a:hover,
.notif-link:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.notif-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.notif-bell {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    font-weight: 800;
}

.notif-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.hero,
.panel,
.stats-grid article,
.login-card,
.module-card,
.list-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero,
.panel,
.login-card,
.stats-grid article {
    padding: 1.5rem;
}

.hero-banner {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1rem;
    background:
        linear-gradient(120deg, rgba(12, 48, 40, 0.96), rgba(18, 80, 132, 0.92)),
        linear-gradient(180deg, #fff, #fff);
    color: #fff;
    overflow: hidden;
    position: relative;
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: auto -30px -50px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242,194,48,0.34) 0%, rgba(242,194,48,0) 70%);
}

.hero-banner .muted,
.hero-banner p,
.hero-banner h2,
.hero-banner h3,
.hero-banner .eyebrow {
    color: #fff;
}

.hero-banner .pill {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

.landing-hero {
    min-height: 320px;
    align-items: center;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.hero-side {
    align-self: stretch;
    min-width: 0;
}

.landing-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding-right: 0.5rem;
}

.hero-image-panel {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-width: 0;
    min-height: 260px;
    padding: 30px;
    overflow: hidden;
}

.hero-image-panel::after {
    content: "";
    position: absolute;
    inset: 30px;
    border-radius: 26px;
    background: linear-gradient(90deg, rgba(15, 76, 58, 0.56) 0%, rgba(15, 76, 58, 0.2) 28%, rgba(19, 102, 177, 0.08) 58%, rgba(242, 194, 48, 0.1) 100%);
    pointer-events: none;
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    min-height: 260px;
    object-fit: cover;
    opacity: 0.24;
    filter: saturate(0.78) brightness(0.88);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 34px rgba(5, 29, 53, 0.1);
}


.soft-panel {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

.eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--green-700);
    font-weight: 800;
}

.grid,
.stats-grid,
form,
label,
.stack,
.feature-list {
    display: grid;
    gap: 1rem;
}

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stats-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card {
    position: relative;
    overflow: hidden;
}

 .stats-grid article.stat-card-blue {
    background: linear-gradient(180deg, rgba(232,243,255,0.98), rgba(255,255,255,0.94));
}

 .stats-grid article.stat-card-green {
    background: linear-gradient(180deg, rgba(221,247,232,0.98), rgba(255,255,255,0.94));
}

 .stats-grid article.stat-card-yellow {
    background: linear-gradient(180deg, rgba(255,245,200,0.98), rgba(255,255,255,0.94));
}

 .stats-grid article.stat-card-orange {
    background: linear-gradient(180deg, rgba(255,232,201,0.98), rgba(255,255,255,0.94));
}

.stat-icon {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 0.65rem;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(19, 102, 177, 0.08);
}

.stat-icon-blue {
    background: rgba(19, 102, 177, 0.12);
    color: var(--blue-700);
}

.stat-icon-green {
    background: rgba(31, 122, 77, 0.12);
    color: var(--green-700);
}

.stat-icon-yellow {
    background: rgba(242, 194, 48, 0.24);
    color: #9a7600;
}

.stat-icon-orange {
    background: rgba(216, 111, 22, 0.16);
    color: var(--orange-700);
}

.stat-icon svg {
    width: 18px;
    height: 18px;
}

.stat {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blue-900);
}

.card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}

.btn,
button {
    display: inline-block;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #16664d, #1f6fb8);
    color: #fff;
    padding: 0.84rem 1.12rem;
    cursor: pointer;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(19, 102, 177, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(19, 102, 177, 0.18);
    filter: saturate(1.03);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.96);
    color: #1d5e9f;
    border: 1px solid rgba(29, 94, 159, 0.18);
    box-shadow: var(--shadow-soft);
}

.btn.gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
    color: var(--green-900);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

th,
td {
    padding: 0.95rem;
    border-bottom: 1px solid rgba(24, 82, 67, 0.1);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--blue-900);
    font-size: 0.92rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(19, 102, 177, 0.16);
    border-radius: 14px;
    font: inherit;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: rgba(255,255,255,0.94);
}

label {
    font-weight: 700;
    font-size: 0.92rem;
}

label input[type="checkbox"],
label input[type="radio"] {
    width: auto;
}

.alert {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    font-weight: 700;
}

.success {
    background: var(--success);
}

.error {
    background: var(--error);
}

.login-wrap {
    min-height: calc(100vh - 140px);
    display: grid;
    place-items: center;
    padding: 1.5rem 0;
    font-family: "Avenir Next", "Century Gothic", "Gill Sans", "Segoe UI", sans-serif;
}

.login-card {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    overflow: hidden;
}

.auth-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(232,243,255,0.86));
}

.login-showcase {
    position: relative;
    min-height: 100%;
    padding: 2.2rem;
    display: grid;
    align-content: space-between;
    gap: 1.5rem;
    background-position: center;
    background-size: cover;
    color: #fff;
}

.login-showcase-photo {
    min-height: 640px;
    padding: 0;
    display: grid;
    place-items: start;
    background-position: center;
    background-image: url("../img/login-campus.jpeg");
    background-size: cover;
    background-repeat: no-repeat;
}

.login-showcase-solid {
    background-color: #123d2c;
}

.login-showcase-cdlhub {
    background-color: #fff;
    background-image: url("../img/cdlhub-login-logo.png");
    background-position: center;
    background-size: contain;
}

.login-showcase-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(16, 56, 38, 0.6), rgba(12, 47, 31, 0.6)),
        radial-gradient(circle at top, rgba(41, 106, 67, 0.2), transparent 42%);
    pointer-events: none;
}

.login-showcase-solid::before {
    background:
        linear-gradient(180deg, rgba(12, 47, 31, 0.48), rgba(12, 47, 31, 0.38)),
        radial-gradient(circle at top, rgba(73, 140, 94, 0.16), transparent 42%);
}

.login-showcase-cdlhub::before,
.login-showcase-cdlhub::after {
    display: none;
}

.login-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.login-showcase-logo {
    position: relative;
    z-index: 1;
    width: min(250px, 54%);
    aspect-ratio: 1;
    object-fit: cover;
    background: #fff;
    clip-path: polygon(50% 2%, 88% 16%, 82% 74%, 50% 98%, 18% 74%, 12% 16%);
    padding: 0;
    filter: drop-shadow(0 10px 20px rgba(8, 26, 14, 0.28));
}

.login-showcase-logo-original {
    width: min(180px, 30%);
    margin: 0;
    align-self: start;
    justify-self: start;
    object-fit: contain;
    background: transparent;
    clip-path: none;
    filter: drop-shadow(0 18px 28px rgba(4, 17, 11, 0.34));
}

.login-showcase-identity {
    position: absolute;
    top: 40%;
    left: 1.5rem;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(-40%);
}

.login-showcase-brand {
    display: grid;
    gap: 0.2rem;
    max-width: 18rem;
    padding: 0.6rem 0.9rem 0.7rem;
    border-left: 2px solid rgba(241, 198, 92, 0.7);
    background: linear-gradient(90deg, rgba(9, 35, 24, 0.34), rgba(9, 35, 24, 0));
    backdrop-filter: blur(3px);
}

.login-showcase-brand h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2.35rem);
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: #f7f4ea;
    text-shadow: 0 8px 22px rgba(4, 17, 11, 0.28);
}

.login-showcase-brand p {
    margin: 0;
    font-size: 0.84rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(246, 241, 226, 0.82);
}

.login-showcase-copy,
.login-feature-list {
    position: relative;
    z-index: 1;
}

.login-showcase-copy {
    max-width: 32rem;
}

.login-showcase h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.02;
}

.login-showcase .eyebrow,
.login-showcase p,
.login-showcase strong {
    color: #fff;
}

.login-showcase-text {
    margin: 1rem 0 0;
    max-width: 30rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.88);
}

.login-feature-list {
    display: grid;
    gap: 0.9rem;
}

.login-feature-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.login-feature-item p {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.94rem;
}

.login-feature-badge {
    min-width: 2.6rem;
    padding: 0.45rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.login-form-panel {
    padding: 2.2rem;
    display: grid;
    align-content: center;
    gap: 1.4rem;
    font-family: inherit;
}

.login-form-head h3 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    color: var(--blue-900);
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.login-form-head .eyebrow {
    margin-bottom: 0.7rem;
    font-family: inherit;
    font-size: 0.76rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #5e6f68;
}

.login-form-head .muted {
    margin: 0.75rem 0 0;
    font-size: 0.96rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-form {
    gap: 1.05rem;
}

.login-field {
    gap: 0.5rem;
}

.login-field span {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #44574f;
}

.login-field input {
    padding: 0.92rem 1rem;
    border-radius: 16px;
    border-color: rgba(19, 102, 177, 0.14);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    font-family: inherit;
    letter-spacing: 0.03em;
}

.login-password-wrap {
    position: relative;
}

.login-password-wrap input {
    padding-right: 4.9rem;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1a5f46;
    cursor: pointer;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    color: #0f3325;
}

.login-password-toggle:focus-visible {
    outline: none;
}

.login-field input:focus {
    outline: none;
    border-color: rgba(19, 102, 177, 0.42);
    box-shadow: 0 0 0 4px rgba(19, 102, 177, 0.12);
}

.login-submit {
    width: 100%;
    padding-top: 0.98rem;
    padding-bottom: 0.98rem;
    border-radius: 16px;
    font-family: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.login-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.35rem;
}

.login-forgot-link,
.password-reset-back {
    color: #1769aa;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.login-forgot-link:hover,
.password-reset-back:hover {
    text-decoration: underline;
}

.password-reset-wrap {
    min-height: calc(100vh - 140px);
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.password-reset-card {
    width: min(520px, 100%);
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border-radius: 28px;
    background: linear-gradient(180deg, #fff, #f2f8ff);
    border: 1px solid rgba(19, 102, 177, 0.12);
    box-shadow: 0 24px 60px rgba(18, 50, 88, 0.13);
}

.password-reset-card h1 {
    margin: 0.35rem 0 0.65rem;
    color: var(--blue-900);
    font-size: clamp(1.7rem, 4vw, 2.2rem);
}

.password-reset-card form {
    margin-top: 1.4rem;
    gap: 1rem;
}

.password-reset-notice {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 16px;
    background: #e8f7ef;
    color: #175c3d;
    line-height: 1.55;
}

.password-reset-error {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: #fff0f0;
    color: #9b2525;
}

.password-reset-footer {
    margin-top: 1.25rem;
    text-align: center;
}

.archive-hero {
    align-items: center;
}

.archive-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 800;
}

.archive-schedule-panel {
    margin-bottom: 1.25rem;
}

.archive-schedule-list {
    display: grid;
    gap: 0.7rem;
}

.archive-schedule-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.4fr) minmax(120px, .7fr) minmax(150px, .9fr) minmax(150px, .8fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    border-radius: 16px;
    background: #f6f9fc;
    border: 1px solid rgba(19, 102, 177, 0.1);
}

.archive-course-name strong,
.archive-course-name span {
    display: block;
}

.archive-course-name span {
    color: var(--muted);
    font-size: 0.88rem;
}

.archive-now-form {
    display: flex;
    justify-content: flex-end;
    margin: -0.45rem 0 0.4rem;
}

.archive-now-form button {
    width: auto;
    min-height: 0;
    padding: 0.45rem 0.75rem;
}

.archive-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, .45fr) minmax(150px, .45fr) auto;
    align-items: end;
    gap: 0.7rem;
}

.archive-course-grid,
.archive-trace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.archive-course-card h3 {
    margin-bottom: 0.25rem;
}

.archive-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.archive-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.archive-metrics span {
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    color: #31536f;
    background: #eef6ff;
    font-size: 0.84rem;
}

.archive-readonly-notice {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid #f0d68a;
    border-radius: 16px;
    color: #72520a;
    background: #fff8dc;
    font-weight: 700;
}

.archive-record-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.8rem;
}

.archive-record-list > div {
    padding: 0.8rem;
    border-radius: 14px;
    background: #f6f9fc;
    border: 1px solid rgba(19, 102, 177, 0.09);
}

.archive-record-list p {
    margin: 0.3rem 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .archive-schedule-row,
    .archive-filter-form {
        grid-template-columns: 1fr;
    }
}

.login-help-card {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(245, 250, 255, 0.96), rgba(232, 243, 255, 0.92));
    border: 1px solid rgba(19, 102, 177, 0.12);
}

.login-help-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--green-900);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-help-card p {
    margin: 0;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.pill {
    display: inline-block;
    padding: 0.3rem 0.72rem;
    border-radius: 999px;
    background: var(--gold-100);
    color: var(--green-900);
    font-size: 0.86rem;
    font-weight: 700;
}

.module-card,
.list-card,
.announcement-card,
.notification-card {
    padding: 1rem;
    margin-top: 1rem;
}

.course-module-card {
    padding: 0.85rem 0.95rem;
}

.course-module-head {
    align-items: start;
    gap: 0.85rem;
}

.course-module-head h4 {
    margin: 0 0 0.3rem;
    font-size: 0.98rem;
    line-height: 1.3;
}

.course-module-head p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.course-module-actions {
    gap: 0.55rem;
    align-items: flex-start;
}

.course-module-actions .btn,
.course-module-actions button {
    padding: 0.68rem 0.88rem;
    font-size: 0.84rem;
    min-height: 0;
}

.course-module-attachment {
    margin: 0.7rem 0 0;
    font-size: 0.88rem;
}

.course-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.9rem;
    margin-top: 1.1rem;
    padding: 0 0 0.5rem;
    border-bottom: 1px solid rgba(24, 82, 67, 0.1);
}

.course-section-tab {
    padding: 0 0 0.75rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #62756d;
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.course-section-tab:hover,
.course-section-tab.is-active {
    transform: none;
    box-shadow: none;
    filter: none;
}

.course-section-tab.is-active {
    color: var(--green-900);
    border-bottom-color: var(--green-700);
}

.course-tab-panel {
    margin-top: 1.25rem;
}

.recording-upload-form {
    margin-top: 1rem;
}

.recording-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.recording-card {
    gap: 0.75rem;
}

.recording-preview-wrap {
    margin-top: 0.15rem;
}

.recording-video-preview {
    width: 100%;
    min-height: 260px;
    max-height: 520px;
    background: #0d1612;
    object-fit: contain;
}

.recording-actions {
    margin-top: 0.2rem;
}

.course-week-group {
    margin-top: 1rem;
    border: 1px solid rgba(24, 82, 67, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.62);
    overflow: hidden;
}

.course-week-group:first-of-type {
    margin-top: 0.8rem;
}

.course-week-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, rgba(244, 249, 246, 0.96), rgba(255, 255, 255, 0.94));
    cursor: pointer;
    list-style: none;
}

.course-week-head::-webkit-details-marker {
    display: none;
}

.course-week-head-main {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.course-week-toggle {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #157047, #208e5e);
    color: #fff;
    font-size: 0.76rem;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.course-week-group[open] .course-week-toggle {
    transform: rotate(0deg);
}

.course-week-group:not([open]) .course-week-toggle {
    transform: rotate(-90deg);
}

.course-week-head h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--green-900);
}

.course-week-head .muted {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.course-week-body {
    padding: 0.2rem 0.95rem 0.95rem;
    border-top: 1px solid rgba(24, 82, 67, 0.08);
}

@media (max-width: 768px) {
    .course-section-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.3rem;
    }

    .course-section-tab {
        white-space: nowrap;
        font-size: 0.85rem;
    }

    .course-week-head {
        padding: 0.85rem 0.9rem;
    }

    .course-week-body {
        padding: 0.15rem 0.75rem 0.8rem;
    }
}

.list-card {
    background: rgba(255, 255, 255, 0.94);
}

.list-card strong,
.list-card .muted {
    color: #000;
}

.list-card strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.list-card .muted {
    display: block;
    line-height: 1.5;
    font-weight: 600;
}

.enrolled-student-card {
    padding: 0;
    margin-top: 0.4rem;
}

.enrolled-student-card strong {
    display: block;
    margin-bottom: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 700;
}

.enrolled-student-card .muted {
    font-size: 0.82rem;
    line-height: 1.35;
    font-weight: 600;
}

.notification-card.is-unread {
    border-left: 6px solid var(--danger);
}

.notification-card.is-read {
    opacity: 0.84;
}

.accent-green {
    background: linear-gradient(180deg, rgba(221,247,232,0.95), rgba(255,255,255,0.94));
}

.accent-blue {
    background: linear-gradient(180deg, rgba(232,243,255,0.95), rgba(255,255,255,0.94));
}

.accent-gold {
    background: linear-gradient(180deg, rgba(255,245,200,0.95), rgba(255,255,255,0.94));
}

.quiz-question-block label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

code {
    background: rgba(19, 102, 177, 0.08);
    padding: 0.12rem 0.35rem;
    border-radius: 6px;
}

@media (max-width: 900px) {
    .hero-banner {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-copy {
        padding-right: 0;
    }

    .hero-image-panel {
        min-height: 220px;
        padding: 20px;
    }

    .hero-image-panel::after {
        inset: 20px;
    }

    .hero-image {
        min-height: 220px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .brand-block {
        align-items: center;
    }

    .brand-logo {
        width: 54px;
        height: 54px;
    }

    .attachment-preview {
        min-height: 280px;
    }

    th:nth-child(3),
    td:nth-child(3),
    th:nth-child(4),
    td:nth-child(4) {
        display: none;
    }
}














.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.profile-avatar-large {
    width: 84px;
    height: 84px;
    margin-bottom: 0.85rem;
    background: rgba(19, 102, 177, 0.12);
}

.profile-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-fallback {
    font-weight: 800;
    color: #fff;
}

.profile-summary-card {
    text-align: center;
}

.profile-hero-card {
    align-self: start;
    justify-self: end;
    min-width: 260px;
    padding: 1.25rem;
    border-radius: 22px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 18px 34px rgba(5, 29, 53, 0.18);
    display: grid;
    justify-items: center;
    gap: 0.7rem;
}

.profile-hero-card .muted,
.profile-hero-card strong {
    color: #fff;
}

.profile-summary-text {
    display: grid;
    gap: 0.2rem;
    text-align: center;
}

.profile-hero-card .profile-panel-btn {
    padding: 0.8rem 0.20rem;
    font-size: 0.6rem;
    line-height: 1.1;
    border-radius: 5px;
    min-width: 0;
    box-shadow: none;
}








.course-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.course-showcase-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(24, 82, 67, 0.16);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(11, 63, 117, 0.1);
    display: grid;
}

.course-showcase-cover {
    position: relative;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.course-showcase-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 27, 39, 0.14), rgba(10, 27, 39, 0.04));
}

.course-showcase-body {
    min-height: 160px;
    padding: 1.2rem 1.2rem 1rem;
    display: grid;
    align-content: start;
    gap: 0.9rem;
    background: #fff;
}

.course-showcase-body h3 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
    color: var(--ink);
}

.course-showcase-code {
    margin: 0.3rem 0 0;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--blue-700);
}

.course-showcase-meta {
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
    font-weight: 700;
}

.course-showcase-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.95rem 1.1rem 1rem;
    border-top: 1px solid rgba(24, 82, 67, 0.12);
    background: #fcfcfc;
}

.course-icon-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(19, 102, 177, 0.08);
    color: #4b5563;
    border: 1px solid rgba(19, 102, 177, 0.12);
}

.course-icon-btn:hover {
    background: rgba(19, 102, 177, 0.14);
    color: var(--blue-700);
}


.course-cover-editor {
    margin-top: 1rem;
}

.course-cover-preview-wrap {
    margin-top: 0.9rem;
}

.course-cover-preview {
    position: relative;
    height: 220px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(232,243,255,0.95), rgba(255,255,255,0.98));
    border: 1px solid rgba(19, 102, 177, 0.16);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    cursor: grab;
}

.course-cover-preview:active {
    cursor: grabbing;
}

.course-cover-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 27, 39, 0.14), rgba(10, 27, 39, 0.04));
}

.course-cover-preview-label {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 1;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    color: var(--blue-900);
    font-size: 0.85rem;
    font-weight: 800;
}

.course-showcase-cover {
    background-color: #dbe9f8;
}

.course-showcase-cover.theme-green {
    background-image: linear-gradient(135deg, #24915d, #5ccc89);
}

.course-showcase-cover.theme-orange {
    background-image: linear-gradient(135deg, #ff8856, #ffb56a);
}

.course-showcase-cover.theme-sand {
    background-image: linear-gradient(135deg, #7b6951, #b8a07e);
}

.course-showcase-cover.theme-blue {
    background-image: linear-gradient(135deg, #1878cb, #56acef);
}

.course-showcase-cover.theme-slate {
    background-image: linear-gradient(135deg, #2a313b, #576273);
}

.course-showcase-cover[style] {
    background-size: cover;
    background-repeat: no-repeat;
}

.course-showcase-cover::after {
    background: linear-gradient(180deg, rgba(10, 27, 39, 0.10), rgba(10, 27, 39, 0.02));
}


.course-hero-banner .actions {
    justify-self: stretch;
    width: 100%;
    justify-content: flex-end;
    margin-right: 0;
}

.course-hero-banner .actions .btn {
    margin-left: auto;
    margin-right: 0;
}



.announcements-hero-banner .actions {
    justify-self: stretch;
    width: 100%;
    justify-content: flex-end;
    margin-right: 0;
}

.announcements-hero-banner .actions .btn {
    margin-left: auto;
    margin-right: 0;
}


.assignments-hero-banner .actions {
    justify-self: stretch;
    width: 100%;
    justify-content: flex-end;
    margin-right: 0;
}

.assignments-hero-banner .actions .btn {
    margin-left: auto;
    margin-right: 0;
}
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.gradebook-table {
    min-width: 1180px;
}

.gradebook-table input {
    min-width: 110px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.formula-list {
    display: grid;
    gap: 0.85rem;
}

.formula-list code {
    display: block;
    margin-top: 0.35rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.compact-stack {
    gap: 0.85rem;
}

.inline-form-grid {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
}

.align-end {
    align-self: end;
}

.gradebook-hero {
    align-items: start;
}

.gradebook-actions {
    justify-content: flex-end;
    align-self: stretch;
}

@media (max-width: 768px) {
    .inline-form-grid {
        grid-template-columns: 1fr;
    }

    .gradebook-table {
        min-width: 980px;
    }
}
.itemized-gradebook-table {
    min-width: 1500px;
}

.itemized-gradebook-table th {
    text-align: center;
    white-space: nowrap;
}

.itemized-gradebook-table td {
    text-align: center;
}

.itemized-gradebook-table td:first-child,
.itemized-gradebook-table th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
}

.itemized-gradebook-table .totals-row td {
    background: rgba(232, 243, 255, 0.5);
    font-weight: 700;
}
.attachment-download-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid rgba(19, 102, 177, 0.16);
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
}

.compact-download-card {
    margin-top: 0.85rem;
}

.attachment-download-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(19, 102, 177, 0.1);
    color: var(--blue-700);
    font-size: 1.6rem;
    font-weight: 800;
}

.download-card-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .attachment-download-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }
}

/* Responsive improvements for smartphones and tablets */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem 0.9rem 2.4rem;
    }

    .hero,
    .panel,
    .login-card,
    .stats-grid article {
        padding: 1.25rem;
    }

    .course-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .profile-hero-card {
        justify-self: start;
        min-width: 0;
        width: 100%;
        max-width: 320px;
    }

    .login-card {
        grid-template-columns: 1fr;
    }

    .login-showcase,
    .login-form-panel {
        padding: 1.6rem;
    }

    .login-showcase-cdlhub {
        min-height: min(90vw, 620px);
        padding: 0;
    }
}

@media (max-width: 900px) {
    .site-header {
        align-items: stretch;
    }

    .top-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .top-nav a,
    .notif-link {
        text-align: center;
    }

    .hero-banner,
    .landing-hero {
        grid-template-columns: 1fr;
    }

    .course-hero-banner .actions,
    .announcements-hero-banner .actions,
    .assignments-hero-banner .actions,
    .gradebook-actions {
        justify-content: flex-start;
    }

    .course-hero-banner .actions .btn,
    .announcements-hero-banner .actions .btn,
    .assignments-hero-banner .actions .btn {
        margin-left: 0;
    }

    .login-showcase h2 {
        font-size: 2.2rem;
    }

    .card-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .site-header {
        padding: 0.9rem;
        gap: 0.85rem;
    }

    .brand-block {
        gap: 0.75rem;
        align-items: center;
    }

    .brand-block h1 {
        font-size: 2rem;
        line-height: 1.05;
    }

    .site-header .tagline {
        font-size: 0.95rem;
    }

    .top-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .top-nav a,
    .notif-link {
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }

    .container {
        padding: 1rem 0.75rem 2rem;
    }

    .hero,
    .panel,
    .login-card,
    .stats-grid article,
    .module-card,
    .list-card,
    .announcement-card,
    .notification-card {
        padding: 1rem;
        border-radius: 20px;
    }

    .hero-banner {
        gap: 1rem;
    }

    .login-wrap {
        min-height: auto;
        padding: 0.25rem 0 1rem;
    }

    .login-showcase,
    .login-form-panel {
        padding: 1.15rem;
    }

    .login-showcase h2 {
        font-size: 1.9rem;
    }

    .login-feature-item {
        padding: 0.85rem;
    }

    .page-title {
        font-size: 1.7rem;
        line-height: 1.15;
    }

    .stats-grid,
    .stats-grid-wide,
    .grid.two,
    .grid.three,
    .course-card-grid,
    .inline-form-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        width: 100%;
        gap: 0.65rem;
    }

    .actions .btn,
    .actions button,
    .download-card-actions .btn,
    .attachment-download-card .btn,
    .course-icon-btn {
        width: 100%;
    }

    .btn,
    button {
        text-align: center;
    }

    .course-showcase-body {
        min-height: 0;
        padding: 1rem;
    }

    .course-showcase-actions {
        grid-template-columns: 1fr 1fr;
    }

    .attachment-preview {
        min-height: 220px;
        max-height: 60vh;
    }

    .attachment-head {
        align-items: stretch;
        flex-direction: column;
    }

    .image-preview {
        max-height: 360px;
    }

    .attachment-download-card {
        grid-template-columns: 1fr;
        justify-items: start;
        padding: 1rem;
    }

    .download-card-actions {
        width: 100%;
        justify-content: stretch;
    }

    .download-card-actions .btn {
        width: 100%;
    }

    .table-wrap {
        margin: 0 -0.2rem;
    }

    .panel > table,
    .panel table,
    .table-wrap > table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    th,
    td {
        padding: 0.8rem 0.7rem;
    }

    .itemized-gradebook-table td:first-child,
    .itemized-gradebook-table th:first-child {
        min-width: 180px;
    }

    .profile-hero-card {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .brand-block {
        align-items: flex-start;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
    }

    .brand-block h1 {
        font-size: 1.75rem;
    }

    .top-nav {
        grid-template-columns: 1fr;
    }

    .site-header .tagline {
        font-size: 0.88rem;
    }

    .page-title {
        font-size: 1.45rem;
    }

    .stat {
        font-size: 1.7rem;
    }

    input,
    select,
    textarea {
        padding: 0.75rem 0.8rem;
    }

    .course-showcase-cover {
        height: 132px;
    }

    .course-showcase-actions {
        grid-template-columns: 1fr;
    }
}

.grade-record-panel {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(19, 102, 177, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(232,243,255,0.45), rgba(255,255,255,0.92));
}

.submission-file-preview {
    margin: 1rem 0;
    overflow: hidden;
    border: 1px solid rgba(19, 102, 177, 0.14);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(17, 54, 108, 0.07);
}

.submission-file-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(19, 102, 177, 0.1);
    background: linear-gradient(180deg, #f8fbff, #eef6ff);
}

.submission-document-frame {
    min-height: 620px;
    border: 0;
    border-radius: 0;
}

.submission-document-text {
    max-height: 620px;
    overflow: auto;
    padding: 2rem clamp(1rem, 4vw, 3rem);
    color: #1f2937;
    background: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.75;
    white-space: normal;
}

.submission-preview-unavailable {
    padding: 1.25rem;
    text-align: center;
}

.assignment-reference-link {
    width: min(100%, 560px);
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(19, 102, 177, 0.16);
    border-radius: 14px;
    color: #124f89;
    background: rgba(255, 255, 255, 0.94);
    text-align: left;
    box-shadow: 0 8px 22px rgba(17, 54, 108, 0.08);
}

.assignment-reference-link:hover {
    transform: translateY(-1px);
    background: #fff;
}

.assignment-reference-link small,
.assignment-reference-link strong {
    display: block;
}

.assignment-reference-link small {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.assignment-reference-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #e8f3ff;
    font-size: 1.2rem;
}

.assignment-preview-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    width: min(580px, calc(100vw - 1rem));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: #fff;
    border-left: 1px solid rgba(19, 102, 177, 0.14);
    box-shadow: -22px 0 55px rgba(17, 54, 108, 0.2);
}

.assignment-preview-drawer[hidden] {
    display: none;
}

.assignment-preview-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    color: #fff;
    background: linear-gradient(135deg, #0f4c3a, #1366b1);
}

.assignment-preview-drawer-head small,
.assignment-preview-drawer-head strong {
    display: block;
}

.assignment-preview-drawer-head button {
    width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 22px;
    box-shadow: none;
}

.assignment-preview-drawer-body {
    min-height: 0;
    overflow: auto;
    background: #f3f5f8;
}

.assignment-preview-drawer-body iframe,
.assignment-preview-drawer-body img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: block;
    border: 0;
    object-fit: contain;
    background: #fff;
}

@media (max-width: 640px) {
    .assignment-reference-link {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .assignment-reference-link > span:last-child {
        display: none;
    }
}

.grade-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.grade-record-grid p {
    margin: 0 0 0.35rem;
}

.grade-record-grid strong {
    display: block;
    line-height: 1.45;
    word-break: break-word;
}

.bell-link {
    position: relative;
    padding-left: 0.7rem;
    padding-right: 0.9rem;
}

.bell-link .notif-bell {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.18);
}

.bell-link .notif-bell svg {
    width: 16px;
    height: 16px;
}

.bell-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
}

.bell-link .notif-bell {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.18);
}

.bell-link .notif-bell svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .bell-link {
        width: 100%;
        min-width: 0;
    }
}

.bell-link .notif-bell {
    background: transparent !important;
    box-shadow: none !important;
}

.profile-hero-card {
    min-width: 220px;
    max-width: 250px;
    padding: 1rem;
    border-radius: 20px;
    gap: 0.55rem;
}

.profile-avatar-large {
    width: 72px;
    height: 72px;
    margin-bottom: 0.55rem;
}

.profile-summary-text {
    gap: 0.12rem;
}

.profile-summary-text strong {
    font-size: 0.95rem;
}

.profile-hero-card .muted {
    font-size: 0.82rem;
}

.profile-hero-card .profile-panel-btn {
    padding: 0.55rem 0.7rem;
    font-size: 0.78rem;
    border-radius: 8px;
}

.profile-hero-card {
    min-width: 190px;
    max-width: 215px;
    padding: 0.8rem;
    border-radius: 18px;
    gap: 0.4rem;
}

.profile-avatar-large {
    width: 58px;
    height: 58px;
    margin-bottom: 0.35rem;
}

.profile-summary-text strong {
    font-size: 0.85rem;
}

.profile-hero-card .muted {
    font-size: 0.74rem;
}

.profile-hero-card .profile-panel-btn {
    padding: 0.45rem 0.55rem;
    font-size: 0.68rem;
    border-radius: 7px;
}

.bell-link,
.bell-link:hover {
    background: transparent !important;
    box-shadow: none !important;
}

.bell-link {
    width: 56px;
    min-width: 56px;
    height: 56px;
}

.bell-link .notif-bell {
    width: 34px;
    height: 34px;
}

.bell-link .notif-bell svg {
    width: 20px;
    height: 20px;
}

.bell-link .notif-badge {
    min-width: 24px;
    height: 24px;
    font-size: 0.85rem;
}

.notification-menu {
    position: relative;
}

.notification-toggle {
    border: none;
    cursor: pointer;
    font: inherit;
}

.notification-popover {
    position: absolute;
    top: calc(100% + 0.8rem);
    right: 0;
    width: min(360px, calc(100vw - 1.5rem));
    max-height: 70vh;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(24, 82, 67, 0.14);
    background: rgba(255,255,255,0.98);
    box-shadow: 0 24px 48px rgba(11, 63, 117, 0.18);
    color: var(--ink);
    z-index: 40;
}

.notification-popover-head {
    padding: 1.1rem 1.1rem 0.8rem;
    border-bottom: 1px solid rgba(24, 82, 67, 0.08);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.notification-popover-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.55rem;
}

.notification-popover-head .muted {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
}

.notification-popover-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(19, 102, 177, 0.08);
    color: var(--blue-700);
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

.notification-popover-link:hover {
    background: rgba(19, 102, 177, 0.14);
    color: var(--blue-900);
}

.notification-popover-list {
    max-height: calc(70vh - 92px);
    overflow-y: auto;
    padding: 0.4rem;
}

.notification-popover-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.8rem;
    border-radius: 18px;
    color: var(--ink);
}

.notification-popover-item:hover {
    background: rgba(232,243,255,0.9);
    color: var(--ink);
}

.notification-popover-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(19,102,177,0.14), rgba(19,102,177,0.04));
    color: var(--blue-700);
    font-weight: 800;
}

.notification-popover-body {
    display: grid;
    gap: 0.2rem;
}

.notification-popover-body strong,
.notification-popover-body span,
.notification-popover-body small {
    color: inherit;
}

.notification-popover-body strong {
    font-size: 0.98rem;
    line-height: 1.35;
}

.notification-popover-body span {
    color: var(--muted);
    font-size: 0.88rem;
}

.notification-popover-body small {
    color: var(--blue-700);
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-users-table th {
    font-size: 0.84rem;
    letter-spacing: 0.01em;
}

.admin-users-table td {
    font-size: 0.82rem;
    line-height: 1.45;
}

.admin-users-table .pill {
    padding: 0.24rem 0.62rem;
    font-size: 0.76rem;
}

.admin-users-table code {
    display: inline-block;
    padding: 0.18rem 0.46rem;
    border-radius: 10px;
    background: rgba(19, 102, 177, 0.08);
    color: #214b72;
    font-size: 0.8rem;
    font-family: "Avenir Next", "Century Gothic", "Segoe UI", sans-serif;
    letter-spacing: 0.03em;
}

.admin-users-table .actions {
    gap: 0.55rem;
}

.admin-users-table .actions .btn,
.admin-users-table .actions button {
    padding: 0.72rem 0.96rem;
    font-size: 0.8rem;
    border-radius: 16px;
}

.admin-users-password-note {
    display: inline-block;
    max-width: 12rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #6b7c74;
}

.notification-empty-state {
    padding: 1rem;
    color: var(--muted);
}

@media (max-width: 768px) {
    .notification-menu {
        width: 100%;
    }

    .notification-popover {
        left: 0;
        right: 0;
        width: 100%;
    }

    .notification-popover-head {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-popover-link {
        width: 100%;
    }
}

.notification-popover-item,
.notification-popover-item:hover {
    color: #14231f !important;
}

.notification-popover-body strong {
    color: #14231f !important;
}

.notification-popover-body span {
    color: #2f453d !important;
}

.notification-popover-body small {
    color: #0f5ea8 !important;
}

.teacher-body {
    background:
        radial-gradient(circle at top left, rgba(41, 104, 191, 0.14), transparent 24%),
        radial-gradient(circle at bottom right, rgba(97, 158, 255, 0.09), transparent 28%),
        linear-gradient(180deg, #f3f6fb 0%, #f8fafd 100%);
}

.teacher-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.teacher-sidebar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1.5rem;
    min-height: 100vh;
    padding: 1.5rem 1.2rem;
    background:
        linear-gradient(180deg, rgba(9, 63, 49, 0.99), rgba(17, 94, 71, 0.97)),
        linear-gradient(180deg, #0c4737, #16684f);
    color: #fff;
    box-shadow: 18px 0 44px rgba(8, 45, 35, 0.18);
}

.teacher-brand {
    display: grid;
    gap: 0.45rem;
    justify-items: start;
}

.teacher-brand-logo {
    width: min(210px, 100%);
    height: 168px;
    object-fit: contain;
    object-position: left center;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.teacher-brand h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
    color: #fff;
}

.teacher-brand p {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.teacher-sidebar-nav {
    display: grid;
    gap: 0.7rem;
    align-content: start;
}

.teacher-nav-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.teacher-nav-link:hover,
.teacher-nav-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(51, 163, 120, 0.97), rgba(18, 110, 78, 0.98));
    transform: translateX(3px);
    box-shadow: 0 14px 28px rgba(9, 58, 43, 0.24);
}

.teacher-nav-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.teacher-nav-icon svg {
    width: 18px;
    height: 18px;
}

.teacher-sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.teacher-logout-link {
    background: rgba(255, 255, 255, 0.08);
}

.teacher-main {
    min-width: 0;
    padding: 1.35rem 1.4rem 2rem;
}

.teacher-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 0.6rem 0.4rem 0.4rem;
}

.teacher-topbar-label {
    margin: 0 0 0.2rem;
    color: #6c7d9a;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-topbar h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #17345e;
}

.teacher-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.teacher-icon-btn {
    position: relative;
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    border: 1px solid rgba(31, 76, 147, 0.08);
    background: rgba(255, 255, 255, 0.98);
    color: #1f4c93;
    box-shadow: var(--shadow-soft);
}

.teacher-icon-btn .notif-bell {
    background: transparent;
    box-shadow: none;
}

.teacher-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.45rem 0.7rem 0.45rem 0.45rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.96));
    border: 1px solid rgba(20, 68, 135, 0.08);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
}

.teacher-profile-link:hover {
    color: var(--ink);
}

.teacher-account-menu {
    position: relative;
}

.teacher-account-menu > summary {
    list-style: none;
    cursor: pointer;
}

.teacher-account-menu > summary::-webkit-details-marker {
    display: none;
}

.teacher-account-chevron {
    margin-left: 0.25rem;
    color: #4f6477;
    font-size: 1.15rem;
    transition: transform 0.18s ease;
}

.teacher-account-menu[open] .teacher-account-chevron {
    transform: rotate(180deg);
}

.teacher-account-dropdown {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 95;
    width: 190px;
    overflow: hidden;
    padding: 0.4rem;
    border: 1px solid rgba(19, 102, 177, 0.14);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(17, 54, 108, 0.18);
}

.teacher-account-dropdown a,
.teacher-account-dropdown button {
    width: 100%;
    min-height: 0;
    display: block;
    padding: 0.7rem 0.8rem;
    border: 0;
    border-radius: 10px;
    color: #183b5b;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.teacher-account-dropdown a:hover,
.teacher-account-dropdown button:hover {
    color: #fff;
    background: linear-gradient(135deg, #0f7657, #1769aa);
}

.teacher-account-dropdown form {
    margin: 0;
}

.teacher-profile-link .profile-avatar {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #2d8cff, #79a8ff);
}

.teacher-profile-copy {
    display: grid;
    gap: 0.12rem;
}

.teacher-profile-copy strong {
    color: #17345e;
}

.teacher-profile-copy span {
    color: #6980a2;
    font-size: 0.86rem;
    font-weight: 700;
}

.teacher-container {
    max-width: none;
    margin: 0;
    padding: 0;
}

.teacher-dashboard-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 253, 0.97));
}

.teacher-dashboard-intro h3 {
    margin: 0.1rem 0 0.5rem;
    font-size: 2rem;
    color: #17345e;
}

.teacher-dashboard-mini-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.teacher-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.teacher-kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-radius: 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 38px rgba(26, 54, 99, 0.1);
}

.teacher-kpi-card strong,
.teacher-kpi-card p {
    color: #fff;
    margin: 0;
}

.teacher-kpi-card p {
    margin-top: 0.2rem;
    opacity: 0.86;
}

.teacher-kpi-value {
    min-width: 68px;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
}

.teacher-kpi-green { background: linear-gradient(135deg, #1e7b58, #2ea16d); }
.teacher-kpi-orange { background: linear-gradient(135deg, #d97a1c, #ee9d41); }
.teacher-kpi-purple { background: linear-gradient(135deg, #4f66b7, #6f85d4); }
.teacher-kpi-blue { background: linear-gradient(135deg, #1c67b8, #3b89db); }

.teacher-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.92fr);
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.teacher-dashboard-grid-bottom {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
}

.teacher-dashboard-stack {
    display: grid;
    gap: 1.2rem;
}

.teacher-dashboard-panel {
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 255, 0.96));
    border-color: rgba(23, 52, 94, 0.08);
    box-shadow: 0 20px 42px rgba(16, 43, 86, 0.08);
}

.teacher-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.teacher-panel-head h3 {
    margin: 0;
    font-size: 1.55rem;
    color: #17345e;
}

.teacher-panel-head p {
    margin: 0.25rem 0 0;
}

.teacher-inline-link {
    font-weight: 800;
    color: #2b79d9;
}

.teacher-course-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.teacher-course-card {
    position: relative;
    display: grid;
    align-content: end;
    min-height: 200px;
    padding: 1rem;
    border-radius: 22px;
    overflow: hidden;
    color: #fff;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 -80px 100px rgba(7, 15, 29, 0.32);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.teacher-course-card:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 -90px 110px rgba(7, 15, 29, 0.34), 0 22px 34px rgba(15, 40, 76, 0.12);
}

.teacher-course-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 23, 44, 0.08), rgba(10, 23, 44, 0.52));
}

.teacher-course-card > * {
    position: relative;
    z-index: 1;
}

.teacher-course-card strong,
.teacher-course-card span,
.teacher-course-card small {
    color: #fff;
}

.teacher-course-card strong {
    font-size: 1.5rem;
    line-height: 1.1;
}

.teacher-course-card span,
.teacher-course-card small {
    display: block;
    margin-top: 0.35rem;
}

.teacher-course-card small {
    opacity: 0.92;
    line-height: 1.45;
}

.teacher-course-code {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.55rem;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.teacher-course-math { background-image: linear-gradient(135deg, #375d95, #6485ba); }
.teacher-course-bio { background-image: linear-gradient(135deg, #236a33, #4a9f60); }
.teacher-course-history { background-image: linear-gradient(135deg, #6d5476, #8f74a1); }
.teacher-course-literature { background-image: linear-gradient(135deg, #8a3f2f, #bf6d55); }

.teacher-feed-list {
    display: grid;
    gap: 0.85rem;
}

.teacher-feed-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: start;
    padding: 0.95rem 0;
    border-top: 1px solid rgba(22, 70, 139, 0.08);
}

.teacher-feed-item:first-child {
    border-top: none;
    padding-top: 0;
}

.teacher-feed-item strong {
    display: block;
    color: #17345e;
    margin-bottom: 0.15rem;
}

.teacher-feed-item span {
    color: #5f728d;
    line-height: 1.45;
}

.teacher-feed-dot {
    width: 14px;
    height: 14px;
    margin-top: 0.25rem;
    border-radius: 5px;
    background: linear-gradient(135deg, #ffca3a, #ff8f35);
}

.teacher-schedule-time {
    min-width: 64px;
    padding: 0.42rem 0.5rem;
    border-radius: 12px;
    background: rgba(28, 103, 184, 0.1);
    color: #1c67b8;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.teacher-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.teacher-action-card {
    display: grid;
    gap: 0.25rem;
    padding: 1.1rem 1.2rem;
    border-radius: 18px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 32px rgba(19, 58, 122, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.teacher-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(19, 58, 122, 0.14);
}

.teacher-action-card strong,
.teacher-action-card span {
    color: #fff;
}

.teacher-action-blue { background: linear-gradient(135deg, #1d67b6, #3387df); }
.teacher-action-green { background: linear-gradient(135deg, #217b55, #34a06d); }
.teacher-action-cyan { background: linear-gradient(135deg, #186f9f, #2a97c4); }
.teacher-action-orange { background: linear-gradient(135deg, #cd731d, #e0953f); }

.teacher-progress-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.teacher-progress-card {
    display: grid;
    justify-items: center;
    gap: 0.6rem;
    text-align: center;
    padding: 1rem 0.75rem;
    border-radius: 20px;
    background: rgba(248, 250, 255, 0.78);
    border: 1px solid rgba(22, 70, 139, 0.07);
}

.teacher-progress-card strong {
    color: #17345e;
}

.teacher-progress-card small {
    color: #5f728d;
    line-height: 1.45;
}

.teacher-progress-ring {
    --progress: 0;
    --ring-color: #2d8cff;
    width: 132px;
    height: 132px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--ring-color) calc(var(--progress) * 1%), #e8eef9 0);
    position: relative;
}

.teacher-progress-ring::after {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(23, 52, 94, 0.05);
}

.teacher-progress-ring span {
    position: relative;
    z-index: 1;
    font-size: 1.9rem;
    font-weight: 800;
    color: #17345e;
}

.teacher-empty-state {
    padding: 1rem 0;
    color: #6b7c97;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .teacher-kpi-grid,
    .teacher-progress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-dashboard-grid,
    .teacher-dashboard-grid-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .teacher-shell {
        grid-template-columns: 1fr;
    }

    .teacher-sidebar {
        position: static;
        min-height: auto;
        padding-bottom: 1rem;
    }

    .teacher-sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-main {
        padding: 1rem;
    }

    .teacher-topbar,
    .teacher-dashboard-intro {
        flex-direction: column;
        align-items: stretch;
    }

    .teacher-topbar-actions {
        justify-content: space-between;
    }

    .admin-analytics-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .teacher-sidebar-nav,
    .teacher-kpi-grid,
    .teacher-course-grid,
    .teacher-action-grid,
    .teacher-progress-grid {
        grid-template-columns: 1fr;
    }

    .admin-analytics-bar-chart,
    .admin-analytics-summary-grid {
        grid-template-columns: 1fr;
    }

    .teacher-brand h1,
    .teacher-topbar h2,
    .teacher-dashboard-intro h3 {
        font-size: 1.7rem;
    }

    .teacher-kpi-value {
        min-width: 56px;
        font-size: 2.5rem;
    }

    .teacher-profile-link {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-analytics-bar-track {
        min-height: 120px;
    }
}

.teacher-nav-badge {
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    padding: 0 0.45rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}


.teacher-account-item {
    grid-template-columns: auto 1fr;
}

.teacher-account-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b79d9, #7aa7ff);
    color: #fff;
    font-weight: 800;
}

.teacher-account-meta {
    display: block;
    margin-top: 0.2rem;
    color: #6980a2;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-analytics-bar-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.85rem;
    align-items: end;
    min-height: 260px;
}

.admin-analytics-bar-item {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
}

.admin-analytics-bar-item strong {
    color: #17345e;
    font-size: 0.95rem;
}

.admin-analytics-bar-item span {
    color: #6d7f99;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-analytics-bar-track {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: end;
    padding: 0.55rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(228, 238, 252, 0.92), rgba(242, 246, 255, 0.98));
}

.admin-analytics-bar-fill {
    width: 100%;
    min-height: 12%;
    border-radius: 16px 16px 10px 10px;
    background: linear-gradient(180deg, #49c67b, #2b79d9);
    box-shadow: 0 16px 22px rgba(39, 117, 214, 0.18);
}

.admin-analytics-alert-list {
    display: grid;
    gap: 0.9rem;
}

.admin-analytics-alert-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(23, 52, 94, 0.08);
}

.admin-analytics-alert-card strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #17345e;
}

.admin-analytics-alert-card p {
    margin: 0;
    color: #5f728d;
    line-height: 1.45;
}

.admin-analytics-alert-card span {
    min-width: 62px;
    padding: 0.55rem 0.7rem;
    border-radius: 999px;
    text-align: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.admin-analytics-alert-warning {
    background: rgba(255, 176, 79, 0.11);
}

.admin-analytics-alert-warning span {
    background: linear-gradient(135deg, #ff9a3c, #ffb958);
}

.admin-analytics-alert-danger {
    background: rgba(230, 86, 86, 0.09);
}

.admin-analytics-alert-danger span {
    background: linear-gradient(135deg, #e25656, #f28787);
}

.admin-analytics-alert-info {
    background: rgba(43, 121, 217, 0.09);
}

.admin-analytics-alert-info span {
    background: linear-gradient(135deg, #2b79d9, #63a9ff);
}

.admin-analytics-alert-success {
    background: rgba(60, 164, 96, 0.09);
}

.admin-analytics-alert-success span {
    background: linear-gradient(135deg, #3ca460, #58c47f);
}

.admin-analytics-meter {
    width: 100%;
    height: 10px;
    margin-top: 0.65rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(43, 121, 217, 0.1);
}

.admin-analytics-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #2b79d9, #52c1d9);
}

.admin-analytics-risk-score {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff8f35, #ffb14f);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
}

.admin-analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.admin-analytics-summary-card {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(239, 245, 255, 0.98));
    border: 1px solid rgba(43, 121, 217, 0.08);
}

.admin-analytics-summary-card strong {
    color: #17345e;
    font-size: 1.6rem;
    line-height: 1;
}

.admin-analytics-summary-card span {
    color: #667a97;
    font-size: 0.88rem;
    font-weight: 700;
}


.announcement-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    background: rgba(12, 26, 37, 0.42);
}

.announcement-modal-card {
    width: min(560px, 100%);
    padding: 1.4rem;
    border-radius: 28px;
    border: 1px solid rgba(24, 82, 67, 0.12);
    background: rgba(255,255,255,0.98);
    box-shadow: 0 30px 60px rgba(11, 63, 117, 0.22);
    position: relative;
}

.announcement-modal-card h3 {
    margin: 0.25rem 0 0.55rem;
    color: #10211c;
    font-size: 1.55rem;
    line-height: 1.2;
}

.announcement-modal-meta {
    margin: 0 0 0.9rem;
    color: var(--blue-700);
    font-weight: 700;
}

.announcement-modal-content {
    margin: 0 0 1rem;
    color: #24352f;
    line-height: 1.65;
}

.announcement-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(19, 102, 177, 0.14);
    background: rgba(232,243,255,0.85);
    color: #1d3247;
    box-shadow: none;
    font-size: 1rem;
}

.announcement-close-btn:hover {
    background: rgba(215,232,250,0.95);
    color: #10211c;
}

@media (max-width: 768px) {
    .announcement-modal-card {
        padding: 1.1rem;
        border-radius: 22px;
    }

    .announcement-modal-card h3 {
        font-size: 1.3rem;
    }
}

.teacher-topbar-copy-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.teacher-mobile-menu-btn {
    display: none;
    border: 1px solid rgba(23, 52, 94, 0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.92);
    color: #17345e;
    box-shadow: none;
    padding: 0.7rem 0.95rem;
}

@media (max-width: 1024px) {
    .teacher-mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .teacher-sidebar {
        overflow: hidden;
        transition: max-height 0.28s ease, opacity 0.2s ease, padding 0.2s ease;
        max-height: 540px;
    }

    .teacher-shell.mobile-sidebar-collapsed .teacher-sidebar {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
    }

    .teacher-shell.mobile-sidebar-open .teacher-sidebar {
        max-height: 540px;
        opacity: 1;
        padding-top: 1.1rem;
        padding-bottom: 1rem;
        border-width: 1px;
    }
}

@media (max-width: 768px) {
    .teacher-topbar-copy-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .teacher-mobile-menu-btn {
        min-width: 86px;
    }
}

@media (max-width: 1024px) {
    .teacher-sidebar {
        max-height: 1000px;
    }

    .teacher-shell.mobile-sidebar-open .teacher-sidebar {
        max-height: 1000px;
    }

    .teacher-sidebar-footer {
        display: block;
    }
}
.course-live-class-note {
    margin-top: 0.95rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(31, 123, 216, 0.09);
    color: #17345e;
    display: grid;
    gap: 0.2rem;
}

.course-live-class-note strong {
    color: #11417a;
    font-size: 0.95rem;
}

.course-live-class-note span,
.course-live-class-note small {
    display: block;
}

.course-live-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f8d58, #2d8cff);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    min-width: 156px;
}

.course-live-join-btn:hover {
    color: #fff;
    filter: brightness(1.03);
}

.course-live-session-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1rem;
    align-items: start;
}

.course-live-session-main {
    min-width: 0;
}

.course-live-chat-panel {
    position: sticky;
    top: 84px;
    width: 100%;
    max-width: 300px;
    min-height: 430px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding: 0.8rem;
    border-radius: 18px;
    border: 1px solid rgba(24, 78, 166, 0.16);
    background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
    box-shadow: 0 18px 40px rgba(24, 78, 166, 0.12);
    font-size: 9px;
    color: #163860;
}

.course-live-chat-panel * {
    font-size: 9px;
}

.course-live-chat-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
}

.course-live-chat-head h3 {
    margin: 0.14rem 0 0;
    font-size: 11px;
    color: #11417a;
}

.course-live-chat-kicker {
    margin: 0;
    color: #4074b4;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.course-live-chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #1d5fd3, #1877f2);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.course-live-chat-session {
    display: grid;
    gap: 0.22rem;
    padding: 0.65rem 0.7rem;
    border-radius: 14px;
    background: rgba(24, 119, 242, 0.09);
    border: 1px solid rgba(24, 119, 242, 0.12);
}

.course-live-chat-session strong {
    color: #11417a;
}

.course-live-chat-session span {
    color: #4c6890;
}

.course-live-chat-session.is-empty {
    background: rgba(128, 150, 180, 0.1);
    border-color: rgba(128, 150, 180, 0.16);
}

.course-live-chat-stream {
    min-height: 210px;
    max-height: 280px;
    overflow-y: auto;
    display: grid;
    gap: 0.45rem;
    padding-right: 0.2rem;
}

.course-live-chat-stream::-webkit-scrollbar {
    width: 6px;
}

.course-live-chat-stream::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(24, 119, 242, 0.28);
}

.course-live-chat-message {
    justify-self: start;
    max-width: 92%;
    display: grid;
    gap: 0.2rem;
    padding: 0.55rem 0.6rem;
    border-radius: 12px 12px 12px 4px;
    background: #fff;
    border: 1px solid rgba(24, 78, 166, 0.08);
    box-shadow: 0 8px 20px rgba(22, 56, 96, 0.08);
}

.course-live-chat-message.is-own {
    justify-self: end;
    border-radius: 12px 12px 4px 12px;
    background: linear-gradient(135deg, #1877f2, #0f5fcc);
    color: #fff;
    border-color: transparent;
}

.course-live-chat-message.is-teacher:not(.is-own) {
    background: linear-gradient(135deg, #eaf3ff, #d9ebff);
    border-color: rgba(24, 119, 242, 0.14);
}

.course-live-chat-message header {
    display: grid;
    gap: 0.08rem;
}

.course-live-chat-message header strong {
    font-size: 9px;
    color: inherit;
}

.course-live-chat-message header span,
.course-live-chat-message p {
    margin: 0;
    color: inherit;
    line-height: 1.45;
}

.course-live-chat-form {
    display: grid;
    gap: 0.4rem;
}

.course-live-chat-form textarea {
    min-height: 56px;
    resize: none;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(24, 78, 166, 0.12);
    background: rgba(255, 255, 255, 0.96);
    color: #153b67;
    box-shadow: inset 0 1px 2px rgba(17, 65, 122, 0.05);
}

.course-live-chat-form textarea::placeholder {
    color: #6f86aa;
}

.course-live-chat-form button {
    min-height: 34px;
    padding: 0.5rem 0.75rem;
    border-radius: 11px;
    background: linear-gradient(135deg, #1877f2, #0d5dd1);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 22px rgba(24, 119, 242, 0.2);
}

.course-live-chat-form button[disabled],
.course-live-chat-form textarea[disabled] {
    opacity: 0.68;
    cursor: not-allowed;
}

.course-live-chat-status {
    margin: 0;
    color: #56739c;
    min-height: 1.2em;
}

@media (max-width: 768px) {
    .course-live-join-btn {
        width: 100%;
    }

    .course-live-session-layout {
        grid-template-columns: 1fr;
    }

    .course-live-chat-panel {
        position: static;
        max-width: none;
        min-height: 360px;
    }
}




.course-live-session-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.course-live-class-layout,
.course-chat-page-shell {
    width: 100%;
}

.course-thread-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: rgba(24, 119, 242, 0.12);
    stroke: #1877f2;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.course-chat-empty {
    margin: auto;
    padding: 1.5rem 0.8rem;
    color: #667085;
    text-align: center;
}

.course-live-chat-panel {
    max-width: 360px;
    min-height: 520px;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
}

.course-live-chat-panel * {
    font-size: inherit;
}

.course-live-chat-head {
    padding: 1rem;
    background: linear-gradient(135deg, #1877f2, #0866d8);
    color: #fff;
}

.course-live-chat-head h3 {
    font-size: 16px;
    color: #fff;
}

.course-live-chat-kicker {
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
}

.course-live-chat-badge {
    background: rgba(255, 255, 255, 0.2);
}

.course-live-chat-badge.is-paused {
    background: rgba(20, 33, 50, 0.3);
}

.course-live-chat-session {
    margin: 0 0.8rem;
}

.course-chat-control-form {
    margin-top: 0.35rem;
}

.course-chat-control-btn {
    width: auto;
    min-height: 0;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #fff;
    color: #1457a6;
    border: 1px solid rgba(24, 119, 242, 0.2);
    font-size: 10px;
    font-weight: 800;
    box-shadow: none;
}

.course-live-chat-stream {
    max-height: 330px;
    padding: 0.15rem 0.8rem 0.5rem;
}

.course-live-chat-message {
    position: relative;
    padding: 0.62rem 0.75rem;
    border-radius: 18px 18px 18px 5px;
    background: #f0f2f5;
    border: 0;
    box-shadow: none;
}

.course-live-chat-message.is-own {
    border-radius: 18px 18px 5px 18px;
}

.course-live-chat-message header strong {
    font-size: 11px;
}

.course-live-chat-form {
    gap: 0.45rem;
    padding: 0.8rem;
    border-top: 1px solid #e4e6eb;
}

.course-live-chat-form textarea {
    min-height: 52px;
    padding-right: 5.4rem;
    border-radius: 18px;
    border: 1px solid #e4e6eb;
    background: #f0f2f5;
}

.course-chat-composer {
    position: relative;
}

.course-live-chat-form .course-chat-emoji-toggle,
.course-live-chat-form .course-chat-like-btn {
    position: absolute;
    top: 50%;
    width: 38px;
    height: 38px;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #1877f2;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
}

.course-live-chat-form .course-chat-emoji-toggle {
    right: 2.7rem;
}

.course-live-chat-form .course-chat-like-btn {
    right: 0.25rem;
}

.course-live-chat-form .course-chat-emoji-toggle:hover,
.course-live-chat-form .course-chat-like-btn:hover {
    transform: translateY(-50%) scale(1.12);
    background: transparent;
    color: #0b61c9;
    box-shadow: none;
}

.course-chat-emoji-picker {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.45rem);
    z-index: 5;
    width: 218px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.25rem;
    padding: 0.55rem;
    border: 1px solid #dce6f2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(17, 54, 108, 0.2);
}

.course-chat-emoji-picker[hidden] {
    display: none;
}

.course-chat-emoji-picker button {
    width: 30px;
    height: 30px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font-size: 18px;
}

.course-chat-emoji-picker button:hover {
    transform: none;
    background: #eef5ff;
}

.course-chat-delete-btn {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d7dce2;
    border-radius: 50%;
    background: #fff;
    color: #5d6672;
    font-size: 15px;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(20, 33, 50, 0.16);
}

.course-chat-delete-btn:hover {
    background: #fee2e2;
    color: #b42318;
}

.course-thread-widget {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 72;
    width: min(360px, calc(100vw - 2rem));
}

.course-thread-widget.has-staff-chat {
    bottom: 5.6rem;
}

.course-thread-widget .course-live-chat-panel {
    position: relative;
    top: auto;
    width: 100%;
    max-width: none;
    box-shadow: 0 22px 55px rgba(17, 48, 88, 0.24);
}

.course-thread-widget:not(.is-open) {
    width: auto;
}

.course-thread-widget:not(.is-open) .course-live-chat-panel,
.course-thread-widget.is-open .course-thread-launcher {
    display: none;
}

.course-thread-launcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #1877f2, #0866d8);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 32px rgba(24, 119, 242, 0.34);
    cursor: move;
    touch-action: none;
    user-select: none;
}

.course-thread-launcher .course-thread-icon {
    width: 22px;
    height: 22px;
    fill: rgba(255, 255, 255, 0.18);
    stroke: #fff;
}

.course-thread-head-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.course-thread-close {
    width: 30px;
    height: 30px;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    box-shadow: none;
}

.course-thread-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.course-thread-widget [data-thread-drag-handle] {
    cursor: move;
    touch-action: none;
    user-select: none;
}

@media (max-width: 768px) {
    .course-live-session-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .course-live-chat-panel {
        position: static;
        max-width: none;
        min-height: 440px;
    }

    .course-thread-widget {
        right: 0.75rem;
        bottom: 0.75rem;
        left: auto !important;
        top: auto !important;
        width: min(360px, calc(100vw - 1.5rem));
    }

    .course-thread-widget.has-staff-chat {
        bottom: 5.2rem;
    }

    .course-thread-widget .course-live-chat-panel {
        min-height: min(520px, calc(100vh - 1.5rem));
        max-height: calc(100vh - 1.5rem);
    }
}

.staff-chatbox {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 68;
    display: grid;
    justify-items: end;
    gap: 0.8rem;
}

.staff-chat-toggle {
    min-width: 148px;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(15, 67, 53, 0.12);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(18, 110, 78, 0.98), rgba(11, 77, 58, 0.98));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 18px 34px rgba(8, 45, 35, 0.24);
}

.staff-chat-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #e3342f;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
}

.staff-chat-panel {
    width: min(360px, calc(100vw - 1.5rem));
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(18, 72, 58, 0.12);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 60px rgba(10, 38, 31, 0.2);
}

.staff-chat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem 1rem 0.85rem;
    background: linear-gradient(180deg, rgba(236, 248, 243, 0.96), rgba(255, 255, 255, 0.96));
    border-bottom: 1px solid rgba(18, 72, 58, 0.08);
}

.staff-chat-head strong,
.staff-chat-head small {
    display: block;
}

.staff-chat-head small {
    color: #5a6f68;
    margin-top: 0.25rem;
}

.staff-chat-close {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(18, 72, 58, 0.12);
    background: #fff;
    color: #18322b;
    box-shadow: none;
}

.staff-chat-messages {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.9rem;
    display: grid;
    gap: 0.8rem;
    background: linear-gradient(180deg, rgba(250, 252, 251, 0.92), rgba(242, 247, 245, 0.98));
}

.staff-chat-message {
    max-width: 88%;
    padding: 0.8rem 0.9rem;
    border-radius: 18px 18px 18px 6px;
    background: #ffffff;
    border: 1px solid rgba(18, 72, 58, 0.08);
    box-shadow: 0 10px 24px rgba(16, 48, 39, 0.08);
}

.staff-chat-message.is-own {
    margin-left: auto;
    border-radius: 18px 18px 6px 18px;
    background: linear-gradient(135deg, rgba(29, 143, 103, 0.98), rgba(18, 110, 78, 0.98));
    color: #fff;
}

.staff-chat-message p {
    margin: 0.45rem 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
}

.staff-chat-message-meta {
    display: grid;
    gap: 0.15rem;
}

.staff-chat-message-meta strong {
    font-size: 0.88rem;
}

.staff-chat-message-meta span {
    color: #6a7f78;
    font-size: 0.75rem;
    font-weight: 700;
}

.staff-chat-message.is-own .staff-chat-message-meta span {
    color: rgba(255, 255, 255, 0.78);
}

.staff-chat-empty {
    padding: 1.35rem 1rem;
    text-align: center;
    color: #657871;
    font-weight: 600;
}

.staff-chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    padding: 0.95rem;
    border-top: 1px solid rgba(18, 72, 58, 0.08);
    background: #fff;
}

.staff-chat-form input {
    min-width: 0;
}

.staff-chat-form button {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}

.staff-chatbox.has-unread .staff-chat-toggle {
    animation: staffChatPulse 1.5s ease-in-out infinite;
}

.lesson-access-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1rem;
    line-height: 1;
}

.lesson-access-icon.is-unlocked {
    color: #15724f;
}

.lesson-access-icon.is-locked {
    color: #68756f;
}

.lesson-next-text,
button.lesson-next-text {
    display: inline;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #126b50;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.lesson-next-text:hover,
button.lesson-next-text:hover {
    background: transparent;
    box-shadow: none;
    color: #0b4d3a;
    text-decoration: underline;
    transform: none;
}

.course-module-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

@keyframes staffChatPulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 18px 34px rgba(8, 45, 35, 0.24);
    }
    50% {
        transform: translateY(-2px);
        box-shadow: 0 20px 40px rgba(8, 45, 35, 0.32);
    }
}

@media (max-width: 768px) {
    .staff-chatbox {
        right: 0.8rem;
        bottom: 0.8rem;
    }

    .staff-chat-panel {
        width: min(340px, calc(100vw - 1rem));
    }
}

.teacher-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    gap: 0.55rem;
    overflow: hidden;
    padding: 0.35rem 1.05rem 1rem;
}

.teacher-brand {
    width: 100%;
    justify-items: center;
    transform: translateY(-0.25rem);
    margin-bottom: -0.45rem;
}

.teacher-brand-logo {
    object-position: center;
}

.teacher-brand > div {
    width: 100%;
    justify-self: stretch;
    text-align: left;
}

.teacher-sidebar-nav {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.38) transparent;
}

.teacher-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.teacher-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.teacher-sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.teacher-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.55);
}

.teacher-sidebar-footer {
    margin-top: 0.5rem;
    padding-top: 0.65rem;
}

@media (max-width: 960px) {
    .teacher-sidebar {
        position: static;
        width: auto;
        bottom: auto;
    }
}
@media (min-width: 961px) {
    .teacher-shell {
        display: block;
    }

    .teacher-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
    }

    .teacher-main {
        margin-left: 280px;
        min-height: 100vh;
    }
}

@media (max-width: 960px) {
    .teacher-main {
        margin-left: 0;
    }
}
.hero-banner::after {
    pointer-events: none;
}

.quiz-integrity-warning {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(180, 52, 52, 0.22);
    background: linear-gradient(135deg, rgba(255, 243, 243, 0.98), rgba(255, 232, 232, 0.98));
    color: #7b1e1e;
    box-shadow: 0 16px 40px rgba(122, 30, 30, 0.10);
}

.quiz-integrity-warning strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

.quiz-integrity-warning p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.quiz-integrity-summary {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: #7b1e1e;
    font-size: 0.9rem;
}

.quiz-integrity-summary span,
.quiz-integrity-summary strong {
    background: rgba(123, 30, 30, 0.08);
    border-radius: 999px;
    padding: 0.24rem 0.6rem;
}

.quiz-review-status {
    display: inline-flex;
    margin: 0.45rem 0 0;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #fff6db;
    color: #7a5600;
    font-size: 0.82rem;
    font-weight: 700;
}

.quiz-review-status.is-reviewed,
.quiz-review-state.is-reviewed {
    background: #e5f7ef;
    color: #126a4c;
}

.quiz-attempt-review-card summary {
    cursor: pointer;
}

.quiz-review-state {
    display: inline-flex;
    margin: 0.45rem 0 0 0.5rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #fff6db;
    color: #7a5600;
    font-size: 0.76rem;
    font-weight: 700;
}

.essay-rubric-suggestion {
    margin-top: 0.75rem;
    padding: 0.85rem;
    border: 1px solid rgba(24, 119, 242, 0.16);
    border-radius: 14px;
    background: linear-gradient(180deg, #f7fbff, #eef6ff);
}

.essay-rubric-suggestion-head,
.essay-rubric-breakdown > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.essay-rubric-suggestion-head > span {
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #1877f2;
    color: #fff;
    font-weight: 800;
}

.essay-review-required {
    margin: 0.35rem 0 0.65rem;
    color: #9a3412;
    font-size: 0.82rem;
    font-weight: 800;
}

.essay-rubric-breakdown {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.essay-rubric-breakdown > div {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(24, 119, 242, 0.1);
}

.quiz-attempt-answer-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.quiz-attempt-answer-list article {
    padding: 0.85rem;
    border: 1px solid #e1e9ef;
    border-radius: 12px;
    background: #f9fbfc;
}

.quiz-attempt-answer-list p {
    margin: 0.3rem 0 0;
}

.quiz-manual-review-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dfe7ed;
}

.quiz-teacher-feedback {
    margin: 0.8rem 0 1rem;
    padding: 0.9rem 1rem;
    border-left: 4px solid #18756b;
    border-radius: 10px;
    background: #eff9f6;
}

.quiz-teacher-feedback p {
    margin: 0.35rem 0 0;
}
.quiz-integrity-warning {
    position: sticky;
    top: 1rem;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quiz-integrity-warning-count {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #b42318;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 14px 32px rgba(180, 35, 24, 0.24);
    flex-shrink: 0;
}

.quiz-integrity-warning-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quiz-time-badge {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    width: max-content;
    margin: 0 0 0.85rem auto;
    padding: 0.48rem 0.72rem;
    border: 1px solid #cfe1ec;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #29485d;
    box-shadow: 0 6px 18px rgba(34, 72, 96, 0.12);
    font-size: 0.76rem;
    line-height: 1.1;
    text-align: right;
}

.quiz-time-badge span,
.quiz-time-badge strong {
    display: block;
}

.quiz-time-badge strong {
    margin-top: 0.18rem;
    color: #126a62;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.quiz-time-badge.is-low-time {
    border-color: #efb4ae;
    background: #fff2f0;
}

.quiz-time-badge.is-low-time strong {
    color: #b42318;
}

@media (max-width: 640px) {
    .login-showcase-cdlhub {
        min-height: min(calc(100vw - 2rem), 540px);
    }

    .login-showcase-logo-original {
        width: min(110px, 34%);
        margin: 0;
    }

    .login-showcase-identity {
        top: 38%;
        left: 1rem;
        gap: 0.75rem;
        transform: translateY(-38%);
    }

    .login-showcase-brand {
        max-width: 12rem;
        padding: 0.45rem 0.7rem 0.5rem;
    }

    .login-showcase-brand h2 {
        font-size: 1.2rem;
        letter-spacing: 0.1em;
    }

    .login-showcase-brand p {
        font-size: 0.66rem;
        letter-spacing: 0.18em;
    }

    .quiz-integrity-warning {
        align-items: flex-start;
    }

    .quiz-integrity-warning-count {
        width: 60px;
        height: 60px;
        font-size: 1.45rem;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-quiz-builder-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 1rem;
    align-items: start;
}

.form-quiz-builder {
    display: grid;
    gap: 1rem;
}

.form-quiz-cover-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(27, 63, 111, 0.08);
    box-shadow: 0 12px 30px rgba(34, 63, 124, 0.08);
}

.form-quiz-cover-bar {
    height: 10px;
    background: linear-gradient(90deg, #5945d8, #6b59f0);
}

.form-quiz-cover-body {
    padding: 1.25rem 1.35rem 1.2rem;
    display: grid;
    gap: 0.85rem;
}

.form-quiz-title-field,
.form-quiz-description-field {
    gap: 0.45rem;
}

.form-quiz-title-field input,
.form-quiz-description-field textarea {
    border: none;
    border-bottom: 1px solid rgba(34, 63, 124, 0.16);
    border-radius: 0;
    padding: 0.4rem 0;
    background: transparent;
    box-shadow: none;
}

.form-quiz-title-field input {
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 500;
    color: #1b273b;
}

.form-quiz-description-field textarea {
    min-height: 68px;
    resize: vertical;
    font-size: 1rem;
    color: #506273;
}

.form-quiz-settings-card,
.form-quiz-import-card,
.form-question-card {
    background: #fff;
    border: 1px solid rgba(27, 63, 111, 0.08);
    box-shadow: 0 12px 30px rgba(34, 63, 124, 0.07);
}

.quiz-import-heading h3 {
    margin: 0.15rem 0 0.35rem;
}

.quiz-import-type-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1.25rem 0;
}

.quiz-import-type {
    display: grid;
    gap: 0.35rem;
    min-height: 98px;
    padding: 1rem 1.1rem;
    border: 1px solid #d7e2ee;
    border-radius: 16px;
    background: #fff;
    color: #17324d;
    text-align: left;
    box-shadow: none;
}

.quiz-import-type span {
    color: #66788b;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.45;
}

.quiz-import-type.is-active {
    border-color: #16736a;
    background: linear-gradient(135deg, #edf9f6, #eef6ff);
    color: #105f58;
    box-shadow: 0 8px 22px rgba(18, 102, 94, 0.12);
}

.quiz-import-panel {
    padding: 1.1rem;
    border: 1px solid #dfe8f1;
    border-radius: 16px;
    background: #fbfdff;
}

.quiz-import-panel[hidden] {
    display: none;
}

.quiz-import-panel h4 {
    margin: 0 0 0.4rem;
}

.quiz-import-panel label + label {
    margin-top: 1rem;
}

@media (max-width: 700px) {
    .quiz-import-type-menu {
        grid-template-columns: 1fr;
    }
}

.form-quiz-question-stack {
    gap: 1rem;
}

.form-question-card {
    position: relative;
    padding: 1.3rem 1.4rem 1.2rem;
    border-left: 4px solid #5b49dd;
}

.form-question-topline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, #5b49dd, #7668ec);
    opacity: 0.18;
}

.form-question-toolbar-dots {
    margin: -0.5rem auto 0.65rem;
    width: fit-content;
    color: #9a9fb2;
    letter-spacing: 0.22em;
    font-weight: 800;
}

.form-question-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.form-question-title-wrap h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2c45;
}

.form-question-title-wrap .muted {
    margin: 0.3rem 0 0;
}

.form-question-type-picker {
    min-width: 220px;
    gap: 0;
}

.form-question-type-select {
    width: 100%;
    padding: 0.78rem 2.6rem 0.78rem 1rem;
    border: 1px solid rgba(27, 63, 111, 0.14);
    border-radius: 12px;
    background: #fff;
    color: #2d3d57;
    font-weight: 600;
    white-space: nowrap;
}

.form-question-text-field {
    gap: 0.45rem;
}

.form-question-text-field textarea {
    min-height: 62px;
    border: none;
    border-bottom: 1px solid rgba(34, 63, 124, 0.18);
    border-radius: 0;
    padding: 0.45rem 0;
    background: transparent;
    box-shadow: none;
    resize: vertical;
}

.form-question-options {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.9rem;
}

.form-question-option-field {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 0.15rem;
}

.form-question-option-field > span:last-of-type {
    min-width: 76px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #5f6b84;
}

.form-option-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(103, 114, 132, 0.5);
}

.form-question-option-field input {
    border: none;
    border-bottom: 1px solid rgba(34, 63, 124, 0.18);
    border-radius: 0;
    padding: 0.55rem 0;
    background: transparent;
    box-shadow: none;
}

.form-question-footer {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(27, 63, 111, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.form-question-correct-field {
    min-width: 220px;
    gap: 0.45rem;
}

.form-question-scale-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.75rem;
    flex: 1 1 100%;
}

.form-question-scale-fields label {
    gap: 0.45rem;
}

.form-question-upload-note {
    min-width: 220px;
    max-width: 420px;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(91, 73, 221, 0.06);
    border: 1px solid rgba(91, 73, 221, 0.12);
}

.form-question-upload-note strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #392f8f;
}

.form-question-upload-note p {
    margin: 0;
}

.form-question-card [hidden] {
    display: none !important;
}

.form-question-remove-link {
    padding: 0;
    border: none;
    background: transparent;
    color: #5f6b84;
    box-shadow: none;
    min-height: 0;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-question-remove-link:hover {
    transform: none;
    box-shadow: none;
    filter: none;
    color: #1f2c45;
    text-decoration: underline;
}

.form-quiz-submit-actions {
    margin-top: 0.4rem;
}

.form-quiz-builder-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 0.75rem;
    padding: 0.55rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(27, 63, 111, 0.08);
    box-shadow: 0 12px 26px rgba(34, 63, 124, 0.08);
}

.form-builder-tool {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(27, 63, 111, 0.1);
    background: #fff;
    color: #5d6475;
    box-shadow: none;
}

.form-builder-tool svg {
    width: 20px;
    height: 20px;
}

.form-builder-tool.is-primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #5b49dd, #7668ec);
    box-shadow: 0 12px 24px rgba(91, 73, 221, 0.2);
}

.form-builder-tool:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(34, 63, 124, 0.12);
    filter: none;
}

@media (max-width: 980px) {
    .form-quiz-builder-shell {
        grid-template-columns: 1fr;
    }

    .form-quiz-builder-sidebar {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-items: center;
    }
}

@media (max-width: 768px) {
    .form-question-header {
        grid-template-columns: 1fr;
    }

    .form-question-type-picker,
    .form-question-correct-field {
        min-width: 0;
        width: 100%;
    }

    .form-question-footer {
        align-items: stretch;
    }

    .form-question-scale-fields {
        grid-template-columns: 1fr;
    }
}

.quiz-question-block {
    display: grid;
    gap: 0.75rem;
}

.quiz-question-block label {
    gap: 0.5rem;
    font-weight: 600;
}

/* Calendar of Activities */
.calendar-page-head,
.activity-calendar-toolbar,
.calendar-legend,
.teacher-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.calendar-page-head {
    margin-bottom: 1.25rem;
    align-items: flex-end;
}

.calendar-legend {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.calendar-legend-item,
.activity-calendar-event,
.calendar-agenda-date {
    border-radius: 8px;
    font-weight: 700;
}

.calendar-legend-item {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
}

.calendar-type-academic { background: #dbeafe; color: #1e40af; }
.calendar-type-exam { background: #fef3c7; color: #92400e; }
.calendar-type-holiday { background: #fee2e2; color: #991b1b; }
.calendar-type-school { background: #dcfce7; color: #166534; }

.activity-calendar-card {
    padding: 1.25rem;
    overflow: hidden;
}

.activity-calendar-toolbar {
    margin-bottom: 1rem;
}

.activity-calendar-toolbar h3 {
    margin: 0;
    color: #123c30;
    font-size: 1.35rem;
}

.activity-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.activity-calendar-weekdays {
    background: #064e3b;
    color: #fff;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.activity-calendar-weekdays div {
    padding: 0.7rem 0.4rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 800;
}

.activity-calendar-days {
    border-left: 1px solid #dbe5e1;
    border-top: 1px solid #dbe5e1;
}

.activity-calendar-day {
    min-height: 125px;
    padding: 0.55rem;
    background: #fff;
    border-right: 1px solid #dbe5e1;
    border-bottom: 1px solid #dbe5e1;
}

.activity-calendar-day.is-outside {
    background: #f6f8f7;
    color: #9aa7a2;
}

.activity-calendar-day.is-today {
    box-shadow: inset 0 0 0 2px #15803d;
}

.activity-calendar-date {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    font-weight: 800;
}

.is-today .activity-calendar-date {
    border-radius: 50%;
    background: #15803d;
    color: #fff;
}

.activity-calendar-events {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.35rem;
}

.activity-calendar-event {
    padding: 0.32rem 0.42rem;
    font-size: 0.68rem;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.calendar-month-agenda,
.dashboard-calendar-panel {
    margin-top: 1.25rem;
}

.calendar-agenda-list,
.dashboard-calendar-events {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.calendar-agenda-item {
    display: grid;
    grid-template-columns: minmax(150px, 190px) 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e5ece9;
}

.calendar-agenda-date {
    padding: 0.55rem 0.7rem;
    text-align: center;
    font-size: 0.8rem;
}

.calendar-agenda-item span,
.dashboard-calendar-copy small {
    display: block;
    margin-top: 0.2rem;
    color: #66756f;
}

.dashboard-calendar-events {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-calendar-event {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #dfe8e4;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-calendar-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 63, 48, 0.1);
}

.dashboard-calendar-date {
    flex: 0 0 52px;
    min-height: 55px;
    display: grid;
    place-content: center;
    text-align: center;
    border-radius: 10px;
}

.dashboard-calendar-date strong,
.dashboard-calendar-date small {
    display: block;
}

.dashboard-calendar-date strong { font-size: 1.25rem; }
.dashboard-calendar-date small { font-size: 0.68rem; font-weight: 800; }
.dashboard-calendar-copy { min-width: 0; }
.dashboard-calendar-copy strong { line-height: 1.3; }

@media (max-width: 1100px) {
    .dashboard-calendar-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .activity-calendar-day { min-height: 105px; }
}

@media (max-width: 720px) {
    .calendar-page-head,
    .activity-calendar-toolbar { align-items: stretch; flex-direction: column; }
    .calendar-legend { justify-content: flex-start; }
    .activity-calendar-card { overflow-x: auto; }
    .activity-calendar-grid { min-width: 760px; }
    .dashboard-calendar-events { grid-template-columns: 1fr; }
    .calendar-agenda-item { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Main feature body copy only. Navigation, labels, titles, and controls retain their existing typeface. */
.teacher-container :where(p:not(.eyebrow), li, td, dd, figcaption, blockquote, .muted) {
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
}

.calendar-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.calendar-add-button {
    background: #0f6b4f;
    color: #fff;
    white-space: nowrap;
}

.calendar-upload-card,
.uploaded-calendar-card {
    margin-bottom: 1.25rem;
}

.calendar-upload-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.calendar-upload-file-field,
.calendar-upload-form .actions {
    grid-column: 1 / -1;
}

.calendar-upload-file-field small {
    color: #66756f;
    font-family: Arial, sans-serif;
    font-weight: 400;
}

.uploaded-calendar-image {
    display: block;
    width: min(100%, 1000px);
    max-height: 1100px;
    margin: 1.25rem auto 0;
    object-fit: contain;
    border: 1px solid #dfe8e4;
    border-radius: 12px;
    background: #f8faf9;
}

.uploaded-calendar-frame {
    display: block;
    width: 100%;
    min-height: 760px;
    margin-top: 1.25rem;
    border: 1px solid #dfe8e4;
    border-radius: 12px;
    background: #f8faf9;
}

.calendar-upload-note {
    margin: 1rem 0 0;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: #fff7d6;
    color: #765d0d;
}

@media (max-width: 720px) {
    .calendar-page-actions { justify-content: flex-start; }
    .calendar-upload-form { grid-template-columns: 1fr; }
    .uploaded-calendar-frame { min-height: 520px; }
}

/* Student dashboard KPI panels */
.student-stat-card {
    position: relative;
    isolation: isolate;
    min-height: 100px;
    padding: 1rem 1.25rem !important;
    overflow: hidden;
    border: 0;
    color: #fff;
    box-shadow: 0 14px 30px rgba(10, 30, 42, 0.18);
}

.student-stat-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -25px;
    bottom: -42px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
}

.teacher-container .student-stats-grid > article.student-stat-courses {
    background-color: #e78008 !important;
    background-image: linear-gradient(135deg, #e78008, #f6a52f) !important;
}

.teacher-container .student-stats-grid > article.student-stat-assignments {
    background-color: #5068bf !important;
    background-image: linear-gradient(135deg, #5068bf, #7486d5) !important;
}

.teacher-container .student-stats-grid > article.student-stat-quizzes {
    background-color: #1370bd !important;
    background-image: linear-gradient(135deg, #1370bd, #378bd8) !important;
}

.student-stat-card .muted {
    color: rgba(255, 255, 255, 0.86);
    margin-bottom: 0.45rem;
}

.student-stat-card .stat {
    color: #fff;
    font-size: 1.8rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Mobile and tablet usability hardening */
html {
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    max-width: 100%;
    overflow-x: hidden;
}

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

iframe,
video {
    display: block;
}

.teacher-main,
.teacher-container,
.hero,
.panel,
.module-card,
.list-card,
.card-head > *,
.grid > *,
.actions > * {
    min-width: 0;
}

.teacher-container :where(h1, h2, h3, h4, h5, h6, p, li, td, th, strong, span, a) {
    overflow-wrap: anywhere;
}

input[type="file"] {
    max-width: 100%;
}

@media (max-width: 960px) {
    body.mobile-menu-open {
        overflow: hidden;
    }

    .teacher-shell {
        display: block;
        min-height: 100vh;
    }

    .teacher-sidebar {
        position: fixed;
        z-index: 120;
        inset: 0 auto 0 0;
        width: min(86vw, 320px);
        min-height: 100dvh;
        max-height: 100dvh !important;
        padding: 0.5rem 1rem 1rem !important;
        opacity: 1 !important;
        border-width: 0 !important;
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        box-shadow: 18px 0 44px rgba(4, 31, 24, 0.28);
    }

    .teacher-shell.mobile-sidebar-open .teacher-sidebar {
        max-height: 100dvh !important;
        transform: translateX(0);
    }

    .teacher-shell.mobile-sidebar-collapsed .teacher-sidebar {
        max-height: 100dvh !important;
        transform: translateX(-105%);
    }

    .teacher-shell::after {
        content: "";
        position: fixed;
        z-index: 110;
        inset: 0;
        background: rgba(7, 25, 21, 0.48);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .teacher-shell.mobile-sidebar-open::after {
        opacity: 1;
        visibility: visible;
    }

    .teacher-brand-logo {
        height: 116px;
        width: min(180px, 100%);
    }

    .teacher-sidebar-nav {
        gap: 0.35rem;
        overscroll-behavior: contain;
    }

    .teacher-nav-link {
        min-height: 48px;
        padding: 0.65rem 0.8rem;
    }

    .teacher-main {
        width: 100%;
        margin-left: 0;
        padding: 0.8rem 0.9rem 2rem;
    }

    .teacher-topbar {
        position: sticky;
        z-index: 80;
        top: 0;
        margin: -0.8rem -0.9rem 1rem;
        padding: 0.7rem 0.9rem;
        background: rgba(243, 246, 251, 0.96);
        border-bottom: 1px solid rgba(20, 68, 135, 0.08);
        backdrop-filter: blur(12px);
    }

    .teacher-mobile-menu-btn {
        display: inline-flex;
        min-width: 48px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .teacher-topbar-copy,
    .teacher-profile-copy {
        min-width: 0;
    }

    .teacher-topbar h2 {
        font-size: clamp(1.15rem, 4vw, 1.55rem);
    }

    .hero-banner,
    .landing-hero,
    .teacher-dashboard-grid,
    .teacher-dashboard-grid-bottom,
    .course-live-session-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-banner {
        gap: 0.75rem;
    }

    .attachment-preview,
    .submission-document-frame,
    .uploaded-calendar-frame {
        width: 100%;
        min-height: clamp(280px, 58vh, 620px);
    }

    .assignment-preview-drawer {
        width: min(94vw, 720px);
        max-width: 100%;
    }

    .assignment-preview-drawer-body iframe,
    .assignment-preview-drawer-body img {
        max-width: 100%;
    }

    .table-wrap,
    .panel:has(> table) {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .teacher-main {
        padding-inline: 0.65rem;
    }

    .teacher-topbar {
        gap: 0.55rem;
        margin-inline: -0.65rem;
        padding-inline: 0.65rem;
    }

    .teacher-topbar-copy {
        flex: 1 1 auto;
    }

    .teacher-topbar-label,
    .teacher-profile-copy,
    .teacher-account-chevron {
        display: none;
    }

    .teacher-topbar-actions {
        flex: 0 0 auto;
        gap: 0.4rem;
    }

    .teacher-icon-btn,
    .teacher-profile-link .profile-avatar {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .teacher-profile-link {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .notification-menu {
        width: auto;
    }

    .notification-popover {
        position: fixed;
        top: 64px;
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        max-height: calc(100dvh - 74px);
    }

    .container,
    .hero,
    .panel,
    .login-card,
    .stats-grid article {
        padding: 1rem;
    }

    .hero,
    .panel,
    .module-card,
    .list-card,
    .stats-grid article {
        border-radius: 17px;
    }

    .page-title,
    .teacher-dashboard-intro h3 {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
    }

    .grid.two,
    .grid.three,
    .stats-grid,
    .teacher-kpi-grid,
    .course-card-grid,
    .grade-record-grid,
    .calendar-upload-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .card-head,
    .attachment-head,
    .submission-file-preview-head,
    .form-question-header,
    .form-question-footer,
    .teacher-dashboard-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .actions {
        width: 100%;
        align-items: stretch !important;
    }

    .actions > .btn,
    .actions > button,
    .actions > a.btn,
    form > button[type="submit"],
    .course-showcase-actions .btn,
    .download-card-actions .btn {
        width: 100%;
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    input,
    select,
    textarea,
    button {
        font-size: 16px;
    }

    textarea {
        resize: vertical;
    }

    .login-password-toggle {
        right: 0.35rem;
        min-width: 48px;
        min-height: 44px;
        padding: 0.35rem;
        font-size: 0.76rem;
    }

    label input[type="checkbox"],
    label input[type="radio"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
        margin: 0;
    }

    .quiz-question-block label:has(input[type="checkbox"]),
    .quiz-question-block label:has(input[type="radio"]) {
        grid-template-columns: 22px minmax(0, 1fr);
        align-items: start;
        gap: 0.75rem;
        min-height: 44px;
        padding: 0.65rem 0.7rem;
        border: 1px solid rgba(19, 102, 177, 0.12);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.76);
    }

    .quiz-time-badge {
        position: sticky;
        z-index: 60;
        top: 68px;
        width: 100%;
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .quiz-integrity-warning {
        position: sticky;
        z-index: 65;
        top: 68px;
    }

    .attachment-preview,
    .submission-document-frame,
    .uploaded-calendar-frame {
        min-height: 58vh;
        border-radius: 12px;
    }

    .image-preview,
    video.attachment-preview {
        min-height: 0;
        height: auto;
        max-height: 70vh;
    }

    .attachment-download-card,
    .assignment-reference-link {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .assignment-preview-drawer {
        inset: auto 0 0;
        width: 100%;
        height: min(88dvh, 760px);
        border-radius: 20px 20px 0 0;
    }

    .assignment-preview-drawer-body {
        padding: 0.65rem;
    }

    .panel > table,
    .panel table,
    .table-wrap > table {
        min-width: 680px;
    }

    .course-section-nav {
        margin-inline: -1rem;
        padding-inline: 1rem;
        scroll-snap-type: x proximity;
    }

    .course-section-tab {
        min-height: 44px;
        scroll-snap-align: start;
    }

    .course-module-head,
    .course-module-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .course-module-actions .btn,
    .course-module-actions button {
        width: 100%;
    }

    .announcement-overlay {
        padding: 0.65rem;
        align-items: flex-end;
    }

    .announcement-modal-card {
        width: 100%;
        max-height: 88dvh;
        overflow-y: auto;
        border-radius: 20px 20px 12px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .teacher-sidebar,
    .teacher-shell::after {
        transition: none;
    }
}

/* Responsive lesson document viewer */
.attachment-viewer {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #eef3f7;
}

.module-document-frame {
    display: block;
    width: 100%;
    height: min(72vh, 780px);
    min-height: 480px;
    max-width: 100%;
    border: 0;
    border-radius: inherit;
    background: #fff;
}

.module-viewer-fullscreen-btn {
    position: absolute;
    z-index: 5;
    top: 0.75rem;
    right: 0.75rem;
    width: 46px;
    height: 46px;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(10, 72, 126, 0.94);
    color: #fff;
    box-shadow: 0 8px 24px rgba(5, 28, 48, 0.24);
}

.module-viewer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.module-viewer-open {
    overflow: hidden;
}

.attachment-viewer.is-pseudo-fullscreen {
    position: fixed;
    z-index: 1000;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    background: #111;
}

.attachment-viewer.is-pseudo-fullscreen .attachment-preview,
.attachment-viewer:fullscreen .attachment-preview,
.attachment-viewer:-webkit-full-screen .attachment-preview {
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
}

.attachment-viewer.is-pseudo-fullscreen .module-viewer-fullscreen-btn,
.attachment-viewer:fullscreen .module-viewer-fullscreen-btn,
.attachment-viewer:-webkit-full-screen .module-viewer-fullscreen-btn {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
}

@media (max-width: 640px) {
    .module-reader,
    .attachment-wrap,
    .attachment-viewer {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .module-document-frame {
        width: 100%;
        height: 62dvh;
        min-height: 420px;
    }

    .module-viewer-fullscreen-btn {
        top: 0.55rem;
        right: 0.55rem;
        width: 48px;
        height: 48px;
    }

    .module-viewer-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .module-viewer-actions .btn {
        width: 100%;
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}
