@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
    --ink: #192c2a;
    --muted: #73807d;
    --line: #e3e9e6;
    --paper: #ffffff;
    --canvas: #f5f8f6;
    --forest: #17312e;
    --forest-soft: #24433f;
    --green: #28796d;
    --green-dark: #1d655a;
    --mint: #d9eee6;
    --coral: #df785f;
    --coral-soft: #f8e5df;
    --yellow: #e3bd58;
    --yellow-soft: #f7efcf;
    --red: #b84539;
    --shadow: 0 10px 28px rgba(25, 44, 42, .06);
    font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; font-size: 14px; line-height: 1.55; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { letter-spacing: 0; }

.app-body { min-height: 100vh; }
.sidebar { background: var(--forest); color: #f3f8f5; width: 246px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 26px 16px 20px; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: #f7fbf8; font-size: 16px; font-weight: 700; padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: #143c35; background: #b9e2d3; font-size: 16px; font-weight: 700; }
.nav-caption { color: #91aaa4; text-transform: uppercase; font-size: 10px; font-weight: 700; margin: 42px 10px 11px; }
.nav-caption-spaced { margin-top: 32px; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-link { height: 43px; display: flex; align-items: center; gap: 12px; padding: 0 11px; color: #bdcbc6; border-radius: 6px; font-size: 13px; transition: background .16s, color .16s; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: #2b4e48; color: #fff; font-weight: 600; box-shadow: inset 2px 0 #e3bd58; }
.nav-icon { width: 20px; color: #9dc5b7; font-size: 17px; text-align: center; line-height: 1; }
.sidebar-bottom { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(218,239,229,.12); }
.connection-indicator { color: #c0d0cb; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.connection-indicator span { width: 7px; height: 7px; background: #84c3a7; border-radius: 50%; }
.sidebar-note { color: #78938c; font-size: 10px; margin-top: 7px; }
.main-shell { min-height: 100vh; margin-left: 246px; }
.topbar { height: 92px; background: rgba(255,255,255,.91); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; position: sticky; top: 0; z-index: 4; backdrop-filter: blur(10px); }
.crumb { color: #9aa5a1; font-size: 9px; font-weight: 700; margin-bottom: 3px; }
.crumb span { color: #5b706a; }
.topbar h1 { font-size: 19px; line-height: 1.2; margin: 0; font-weight: 700; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-weight: 700; }
.user-meta { display: flex; flex-direction: column; line-height: 1.35; min-width: 74px; }
.user-meta strong { font-size: 12px; }
.user-meta span { font-size: 10px; color: var(--muted); }
.logout-form { margin: 0 0 0 6px; }
.icon-button { width: 33px; height: 33px; border: 1px solid var(--line); background: white; border-radius: 6px; cursor: pointer; color: #61726e; font-size: 16px; }
.icon-button:hover { color: var(--green); border-color: #bdd6cd; }
.content-area { max-width: 1370px; padding: 34px 42px 18px; margin: 0 auto; }
.page-footer { border-top: 1px solid var(--line); margin-top: 42px; padding: 17px 0 4px; display: flex; justify-content: space-between; color: #9aa5a1; font-size: 10px; }
.notice { padding: 11px 14px; border: 1px solid transparent; border-radius: 5px; margin: 0 0 20px; font-size: 12px; }
.notice-success { color: #216255; background: #e9f5ef; border-color: #cfe7da; }
.notice-error { color: #923e33; background: #fbefec; border-color: #f1d4cc; }
.notice-neutral { color: #665824; background: #fbf5df; border-color: #efe1a9; }
.welcome-line { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 1px 0 24px; }
.welcome-line p { color: var(--muted); margin: 5px 0 0; font-size: 12px; }
.welcome-mark { font-size: 21px; font-weight: 700; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; padding: 0 15px; border: 1px solid transparent; border-radius: 5px; font-weight: 600; font-size: 12px; cursor: pointer; transition: background .16s, transform .16s, border-color .16s; white-space: normal; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: #315e53; background: #fff; border-color: #cfddd6; }
.button-secondary:hover { border-color: #98beae; background: #f7faf8; }
.button-primary span { font-size: 15px; font-weight: 400; }
.button-wide { width: 100%; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.stat-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; min-height: 142px; padding: 18px 20px; overflow: hidden; }
.stat-card > span { color: #687773; font-size: 11px; }
.stat-card > strong { display: block; margin-top: 7px; font-size: 29px; line-height: 1.15; font-weight: 700; }
.stat-card > small { display: block; margin-top: 7px; color: #95a09c; font-size: 10px; }
.stat-card .unit { display: inline; margin-left: 4px; font-size: 12px; color: #8a9691; font-weight: 500; }
.stat-accent { position: absolute; width: 6px; top: 18px; bottom: 18px; right: 0; border-radius: 3px 0 0 3px; }
.accent-mint { background: #8fc9ae; }
.accent-coral { background: var(--coral); }
.accent-yellow { background: var(--yellow); }
.section-block { margin-top: 34px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 0 0 14px; }
.section-heading h2, .page-intro h2 { font-size: 18px; margin: 2px 0 0; }
.eyebrow { color: #7e938d; font-size: 9px; font-weight: 700; }
.link-subtle { color: var(--green-dark); font-size: 11px; font-weight: 600; }
.link-subtle span { padding-left: 4px; font-size: 14px; }
.list-frame { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.assignment-row { min-height: 75px; display: flex; align-items: center; gap: 13px; padding: 13px 17px; border-bottom: 1px solid #edf0ee; }
.assignment-row:last-child { border-bottom: 0; }
.assignment-symbol { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; color: var(--green-dark); background: #e8f1ec; border-radius: 5px; font-size: 10px; font-weight: 700; }
.assignment-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.assignment-info a { width: fit-content; max-width: 100%; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.assignment-info a:hover { color: var(--green-dark); }
.assignment-info span { color: #929e99; font-size: 10px; }
.assignment-side { display: flex; align-items: center; gap: 17px; }
.quiet-count { color: #73817c; font-size: 10px; }
.text-arrow { width: 26px; height: 26px; border: 1px solid var(--line); color: #72827d; display: grid; place-items: center; border-radius: 5px; font-size: 15px; }
.text-arrow:hover { border-color: #a8c9bd; color: var(--green); }
.status { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; border-radius: 4px; font-size: 10px; white-space: nowrap; }
.status-green { background: #e7f3ec; color: #287058; }
.status-amber { background: #faf2d9; color: #85691e; }
.status-red { background: #fae9e5; color: #a4483c; }
.status-neutral { background: #eff2f0; color: #687772; }
.empty-state { min-height: 175px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 28px 20px; color: #74827d; }
.empty-symbol { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 8px; color: #7da797; background: #e7f1eb; border-radius: 50%; }
.empty-state strong { color: #334541; font-size: 12px; }
.empty-state p { margin: 5px 0 0; font-size: 11px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-link { position: relative; min-height: 133px; padding: 16px; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.quick-link:hover { border-color: #b5d2c7; box-shadow: var(--shadow); }
.quick-icon { color: var(--green); font-size: 18px; line-height: 1; margin-bottom: 12px; }
.quick-link strong { font-size: 12px; }
.quick-link > span:not(.quick-icon) { color: var(--muted); font-size: 10px; margin-top: 4px; }
.quick-link b { position: absolute; right: 16px; bottom: 17px; color: var(--green-dark); font-size: 16px; font-weight: 400; }
.page-intro { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 0 0 23px; }
.page-intro h2 { font-size: 20px; }
.page-intro p { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.count-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 4px; background: white; color: #64736e; font-size: 10px; white-space: nowrap; }
.form-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #e9f2ed; padding: 14px 16px; margin-bottom: 20px; border-radius: 6px; }
.form-band > div { display: flex; flex-direction: column; }
.form-band strong { font-size: 12px; }
.form-band > div span { margin-top: 3px; color: #768780; font-size: 10px; }
.inline-form { display: flex; flex: 0 1 530px; gap: 8px; }
.inline-form input { min-width: 0; flex: 1; height: 39px; border: 1px solid #d2dfd8; border-radius: 5px; padding: 0 11px; background: white; }
.class-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.class-card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; min-width: 0; padding: 17px; }
.class-card-top { display: flex; align-items: center; justify-content: space-between; }
.class-monogram { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 5px; color: #215b4f; background: #dcefe5; font-size: 13px; font-weight: 700; }
.class-card:nth-child(3n+2) .class-monogram { color: #9a5144; background: var(--coral-soft); }
.class-card:nth-child(3n) .class-monogram { color: #7c6521; background: var(--yellow-soft); }
.class-count { color: #82908a; font-size: 10px; }
.class-card h3 { margin: 15px 0 3px; font-size: 14px; overflow-wrap: anywhere; }
.class-card > p { min-height: 17px; color: var(--muted); font-size: 10px; margin: 0; }
.card-link { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #edf0ee; margin-top: 15px; padding-top: 11px; color: var(--green-dark); font-size: 10px; font-weight: 600; }
.invite-code { margin-top: 14px; padding: 8px 9px; display: flex; align-items: center; gap: 8px; border-radius: 4px; background: #f5f8f6; }
.invite-code span { color: #82908b; font-size: 9px; }
.invite-code strong { margin-left: auto; color: #315e53; font-size: 12px; letter-spacing: 1px; }
.copy-button { border: 0; padding: 0 2px; color: #71847d; background: transparent; font-size: 15px; cursor: pointer; }
.copy-button:hover { color: var(--green-dark); }
.create-assignment { margin-bottom: 29px; border: 1px solid var(--line); border-radius: 6px; background: white; overflow: hidden; }
.create-assignment summary { min-height: 72px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.create-assignment summary::-webkit-details-marker { display: none; }
.create-plus { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; background: #e3f1ea; color: var(--green); font-size: 20px; }
.create-assignment summary > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.create-assignment summary strong { font-size: 12px; }
.create-assignment summary small { color: #899590; font-size: 10px; }
.summary-arrow { margin-left: auto; font-size: 19px; color: #71817b; transition: transform .15s; }
.create-assignment[open] .summary-arrow { transform: rotate(180deg); }
.assignment-form { border-top: 1px solid var(--line); padding: 19px 18px 18px; }
.form-stack { display: flex; flex-direction: column; gap: 13px; }
.form-stack label { display: flex; flex-direction: column; gap: 6px; color: #43524e; font-size: 11px; font-weight: 600; min-width: 0; }
.form-stack input, .form-stack textarea, .form-stack select, .user-edit-form select { width: 100%; min-height: 39px; border: 1px solid #dce4e0; border-radius: 5px; padding: 9px 10px; outline: none; color: var(--ink); background: white; font-size: 12px; font-weight: 400; }
.form-stack textarea { resize: vertical; min-height: 100px; line-height: 1.65; }
.form-stack input:focus, .form-stack textarea:focus, .form-stack select:focus, .inline-form input:focus { border-color: #77aa97; box-shadow: 0 0 0 3px rgba(40,121,109,.1); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 3px; }
.form-actions > span { color: #85928d; font-size: 10px; }
.optional { color: #9ba5a1; font-weight: 400; }
.compact-heading { margin-top: 26px; }
.assignment-list { margin-top: 0; }
.back-link { display: inline-block; margin-bottom: 18px; color: #667771; font-size: 11px; }
.back-link:hover { color: var(--green); }
.assignment-detail-head { padding: 22px 24px; background: #e8f1ec; border-radius: 6px; }
.detail-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.assignment-detail-head h2 { margin: 14px 0 4px; font-size: 22px; overflow-wrap: anywhere; }
.detail-subline { color: #77857f; font-size: 10px; }
.prompt-section, .submission-section { margin-top: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.prompt-section h3 { font-size: 15px; margin: 5px 0 12px; }
.prose-block { color: #31413c; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }
.rubric-block { margin-top: 20px; padding: 13px 15px; border-left: 3px solid var(--yellow); background: #fbf7e8; }
.rubric-block strong { font-size: 11px; }
.rubric-block p { margin: 5px 0 0; color: #6f6750; font-size: 11px; line-height: 1.7; }
.submission-section .section-heading { align-items: center; }
.grade-result { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; margin-bottom: 18px; }
.grade-score { min-height: 130px; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; background: #e6f2eb; border-radius: 5px; }
.grade-score > span { color: #647c70; font-size: 10px; }
.grade-score strong { color: #206455; font-size: 32px; }
.grade-score small { color: #6f8a7e; font-size: 12px; font-weight: 500; }
.grade-feedback { padding: 15px 16px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.grade-feedback strong { font-size: 11px; }
.grade-feedback p { margin: 6px 0 10px; white-space: normal; color: #596963; font-size: 11px; line-height: 1.75; }
.grade-feedback small { color: #9aa49f; font-size: 9px; }
.response-form { margin-top: 15px; }
.response-form .submit-progress { margin: -5px 0 0; color: var(--green-dark); font-size: 11px; }
.response-form .submit-progress[hidden] { display: none; }
.button.is-loading { cursor: wait; opacity: .8; }
.button:disabled { cursor: wait; }
.submission-table-wrap { width: 100%; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; background: white; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 10px; }
.data-table th { height: 39px; padding: 0 12px; color: #798781; background: #f6f8f7; font-size: 9px; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table td { min-width: 88px; padding: 12px; color: #5d6d66; border-bottom: 1px solid #edf0ee; vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td strong { display: block; color: #283b36; font-size: 10px; }
.data-table td small { display: block; color: #9aa49f; font-size: 9px; margin-top: 3px; }
.data-table .answer-cell { min-width: 220px; max-width: 350px; line-height: 1.6; overflow-wrap: anywhere; }
.data-table .feedback-cell { min-width: 160px; max-width: 270px; line-height: 1.6; }
.table-empty { text-align: center; height: 80px; color: #8b9792 !important; }
.score-chip { display: inline-block; padding: 4px 7px; color: #226451; background: #e6f2eb; border-radius: 4px; white-space: nowrap; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .8fr); align-items: start; gap: 28px; }
.settings-form { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.form-section-title { padding-bottom: 10px; border-bottom: 1px solid #edf0ee; color: #31453f; font-size: 12px; font-weight: 700; }
.settings-form label small { color: #98a29d; font-size: 9px; font-weight: 400; line-height: 1.6; }
.model-test-controls { display: flex; align-items: flex-start; gap: 12px; }
.model-test-controls .button { flex: 0 0 auto; }
.model-test-status { min-width: 0; margin: 0; padding-top: 8px; color: #73817b; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.model-test-status.is-success { color: #266952; }
.model-test-status.is-error { color: #a44439; }
.model-test-status:empty { display: none; }
.settings-note { display: flex; gap: 10px; padding: 12px; border-radius: 5px; background: #fbf5df; }
.note-icon { width: 17px; height: 17px; flex: 0 0 17px; display: grid; place-items: center; border-radius: 50%; color: #856b21; background: #f1e4af; font-size: 10px; font-weight: 700; }
.settings-note p { margin: 0; color: #75693e; font-size: 10px; line-height: 1.65; }
.settings-aside { padding: 19px; border-radius: 6px; background: var(--forest); color: white; }
.settings-aside .eyebrow { color: #a7c4b9; }
.settings-aside h3 { margin: 10px 0 5px; font-size: 15px; }
.settings-aside > p { color: #baccc5; font-size: 10px; line-height: 1.7; }
.aside-divider { height: 1px; margin: 15px 0; background: rgba(255,255,255,.15); }
.aside-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: #a5bab3; font-size: 10px; }
.aside-row strong { color: #eaf3ee; text-align: right; overflow-wrap: anywhere; }
.user-create { margin-bottom: 26px; }
.users-section { margin-top: 23px; }
.role-tag { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 9px; }
.role-admin { color: #985644; background: #f7e8df; }
.role-teacher { color: #3b685b; background: #e3f0e9; }
.role-student { color: #7e6924; background: #f7f0d9; }
.user-edit-form { display: flex; align-items: center; gap: 5px; min-width: 235px; }
.user-edit-form select { width: auto; min-height: 31px; padding: 4px 6px; font-size: 9px; }
.small-button { min-height: 30px; border: 1px solid #d7e3dd; border-radius: 4px; padding: 0 8px; background: #f6faf7; color: #326958; font-size: 9px; cursor: pointer; }
.small-button:hover { border-color: #9fc7b4; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr); background: white; }
.auth-brand-panel { position: relative; min-height: 100vh; display: flex; flex-direction: column; padding: 30px 44px 25px; overflow: hidden; background: var(--forest); color: white; }
.brand-light { align-self: flex-start; }
.auth-promo { width: min(100%, 460px); margin: auto; padding: 30px 0 40px; }
.auth-promo .eyebrow { color: #a6c6b7; }
.auth-promo h1 { font-size: 41px; line-height: 1.3; margin: 13px 0 12px; font-weight: 600; }
.auth-promo h1 span { color: #bce2d0; }
.auth-promo > p { color: #b7c9c2; font-size: 12px; max-width: 330px; line-height: 1.8; }
.learning-preview { margin-top: 34px; padding: 16px 17px 13px; border: 1px solid rgba(216,239,227,.2); border-radius: 6px; background: #21403b; }
.preview-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.12); color: #e9f2ee; font-size: 10px; font-weight: 600; }
.preview-live { display: flex; align-items: center; gap: 5px; color: #adc8bc; font-size: 9px; font-weight: 400; }
.preview-live i { width: 6px; height: 6px; border-radius: 50%; background: #9fd5b7; }
.preview-row { min-height: 56px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 9px; border-bottom: 1px solid rgba(255,255,255,.08); }
.preview-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; color: #d4efe3; background: #39665a; font-size: 9px; }
.preview-index-coral { color: #f6c0ae; background: #784c42; }
.preview-index-yellow { color: #efd992; background: #685b32; }
.preview-row div { display: flex; flex-direction: column; gap: 1px; }
.preview-row strong { color: #e2ece8; font-size: 10px; }
.preview-row small { color: #9cb4aa; font-size: 9px; }
.preview-row b { color: #9fd5b7; font-size: 9px; font-weight: 500; }
.preview-row .preview-next { color: #e6cb77; }
.preview-progress { height: 4px; margin-top: 13px; border-radius: 4px; background: #36524c; }
.preview-progress span { display: block; width: 66%; height: 100%; border-radius: inherit; background: #9acdb4; }
.preview-foot { margin-top: 7px; display: flex; justify-content: space-between; color: #9fb4ac; font-size: 9px; }
.preview-foot strong { color: #e1ece7; }
.auth-brand-foot { color: #8ca79c; font-size: 10px; }
.auth-form-panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 55px 35px 80px; }
.auth-form-wrap { width: min(100%, 370px); }
.auth-form-wrap .eyebrow { color: var(--green); }
.auth-form-wrap h2 { margin: 8px 0 5px; font-size: 25px; }
.muted { color: #85918d; font-size: 11px; }
.auth-form { margin-top: 27px; gap: 15px; }
.auth-form label { gap: 7px; }
.auth-form input { height: 44px; }
.auth-form .button { min-height: 44px; margin-top: 5px; }
.auth-switch { margin-top: 19px; text-align: center; color: #76827d; font-size: 11px; }
.auth-switch a { color: var(--green-dark); font-weight: 700; }
.auth-admin-tip { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--line); color: #9ba49f; font-size: 10px; text-align: center; }
.auth-footer { position: absolute; bottom: 25px; color: #a1aaa6; font-size: 10px; }
.auth-notice { position: fixed; right: 24px; top: 20px; z-index: 10; max-width: min(400px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.install-body { min-height: 100vh; padding: 32px 18px; background: #f0f5f1; }
.install-shell { width: min(100%, 520px); margin: 0 auto; }
.brand-dark { color: var(--ink); padding: 0 2px; }
.install-card { margin-top: 24px; padding: 27px; border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: var(--shadow); }
.install-card h1 { margin: 6px 0 6px; font-size: 24px; }
.install-card > .muted { line-height: 1.75; }
.install-card .form-stack { margin-top: 21px; }
.install-card .form-section-title { margin-top: 4px; }
.form-section-spaced { margin-top: 10px; }
.install-foot { margin: 14px 0 0; color: #84908b; text-align: center; font-size: 10px; }

@media (max-width: 1100px) {
    .sidebar { width: 210px; }
    .main-shell { margin-left: 210px; }
    .topbar { padding: 0 27px; }
    .content-area { padding: 29px 27px 16px; }
    .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .sidebar { position: relative; inset: auto; width: 100%; height: auto; padding: 12px 15px 0; }
    .sidebar .brand { padding: 0 2px; }
    .sidebar .nav-caption, .sidebar-bottom { display: none; }
    .main-nav { flex-direction: row; gap: 2px; overflow-x: auto; margin-top: 12px; padding-bottom: 8px; }
    .nav-link { height: 36px; flex: 0 0 auto; padding: 0 9px; gap: 6px; font-size: 10px; }
    .nav-icon { width: 16px; font-size: 14px; }
    .main-shell { margin-left: 0; min-height: auto; }
    .topbar { height: 72px; padding: 0 18px; }
    .topbar h1 { font-size: 16px; }
    .content-area { padding: 23px 18px 14px; }
    .stats-grid { gap: 9px; }
    .stat-card { min-height: 127px; padding: 14px 12px; }
    .stat-card > strong { font-size: 24px; }
    .stat-card > small { font-size: 9px; }
    .quick-grid { gap: 8px; }
    .quick-link { min-height: 145px; padding: 12px; }
    .form-band { align-items: stretch; flex-direction: column; gap: 10px; }
    .inline-form { flex: auto; width: 100%; }
    .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    .auth-page { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
    .auth-brand-panel { padding: 25px 25px 20px; }
    .auth-promo h1 { font-size: 32px; }
    .auth-form-panel { padding: 45px 24px 70px; }
}

@media (max-width: 560px) {
    .topbar { padding: 0 14px; }
    .crumb { font-size: 8px; }
    .user-meta { display: none; }
    .logout-form { margin-left: 0; }
    .content-area { padding: 19px 13px 12px; }
    .welcome-line { align-items: flex-start; flex-direction: column; gap: 13px; }
    .welcome-mark { font-size: 18px; }
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .stat-card { min-height: 118px; padding: 12px 9px; }
    .stat-card > span { font-size: 9px; }
    .stat-card > strong { font-size: 21px; }
    .stat-card > small { line-height: 1.45; }
    .stat-accent { width: 4px; top: 13px; bottom: 13px; }
    .section-block { margin-top: 27px; }
    .section-heading h2, .page-intro h2 { font-size: 16px; }
    .assignment-row { gap: 9px; padding: 11px 10px; }
    .assignment-symbol { width: 31px; height: 31px; flex-basis: 31px; }
    .assignment-info a { font-size: 11px; }
    .assignment-info span { max-width: 150px; overflow-wrap: anywhere; }
    .assignment-side { gap: 7px; }
    .assignment-side .status { padding: 2px 5px; font-size: 8px; }
    .quiet-count { max-width: 58px; text-align: right; font-size: 8px; }
    .text-arrow { width: 23px; height: 23px; flex: 0 0 23px; }
    .quick-grid { grid-template-columns: 1fr; }
    .quick-link { min-height: 110px; }
    .page-intro { align-items: flex-start; }
    .page-intro .count-pill { margin-top: 12px; }
    .page-intro p { max-width: 260px; line-height: 1.6; }
    .class-grid { grid-template-columns: minmax(0, 1fr); }
    .class-card { padding: 14px; }
    .inline-form { flex-direction: column; }
    .inline-form .button { width: 100%; }
    .field-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .assignment-form { padding: 15px 12px; }
    .form-actions { align-items: stretch; flex-direction: column; }
    .form-actions .button { width: 100%; }
    .form-actions > span { line-height: 1.5; }
    .assignment-detail-head { padding: 17px 14px; }
    .assignment-detail-head h2 { font-size: 18px; }
    .grade-result { grid-template-columns: minmax(0, 1fr); }
    .grade-score { min-height: 105px; }
    .prompt-section, .submission-section { padding: 16px 0; }
    .settings-form { padding: 16px 12px; }
    .data-table { min-width: 750px; }
    .users-table { min-width: 820px; }
    .page-footer { font-size: 9px; }
    .auth-page { grid-template-columns: minmax(0, 1fr); }
    .auth-brand-panel { display: none; }
    .auth-form-panel { min-height: 100vh; padding: 30px 21px 75px; }
    .auth-form-wrap h2 { font-size: 23px; }
    .auth-footer { bottom: 20px; }
    .install-card { padding: 21px 16px; }
    .install-card .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}
