@import url("pages.css");

:root {
    color-scheme: light;
    --ink: #18251f;
    --ink-soft: #52625a;
    --ink-muted: #7a8981;
    --canvas: #f5f6f2;
    --surface: #ffffff;
    --surface-soft: #eef1ec;
    --surface-warm: #f5efe8;
    --line: #dfe5df;
    --line-strong: #cbd5ce;
    --sage-900: #1d392f;
    --sage-800: #234238;
    --sage-700: #35584c;
    --sage-600: #4f7468;
    --sage-200: #c9d8d0;
    --sage-100: #e4ece7;
    --sage-50: #f1f6f3;
    --clay: #b96f4f;
    --clay-soft: #f3e2d9;
    --blue: #557591;
    --blue-soft: #e2ebf1;
    --rose: #a95e66;
    --rose-soft: #f5e3e5;
    --amber: #a46f24;
    --amber-soft: #f9edda;
    --success: #2f7357;
    --success-soft: #e0f0e7;
    --danger: #a6484e;
    --danger-soft: #fae9ea;
    --shadow-xs: 0 1px 2px rgba(24, 37, 31, .04);
    --shadow-sm: 0 5px 18px rgba(24, 37, 31, .055);
    --shadow-md: 0 16px 42px rgba(24, 37, 31, .09);
    --shadow-lg: 0 28px 70px rgba(24, 37, 31, .16);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --sidebar-width: 252px;
    --brand-color: #315f50;
    font-family: Inter, Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }

body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; }

:focus-visible { outline: 3px solid rgba(79, 116, 104, .28); outline-offset: 2px; }

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.app-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.rotate-180 { display: inline-flex; transform: rotate(180deg); }

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    width: var(--sidebar-width);
    padding: 24px 18px 18px;
    flex-direction: column;
    background: var(--brand-color);
    color: #fff;
    overflow-y: auto;
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { position: relative; display: inline-flex; align-items: end; justify-content: center; gap: 3px; width: 39px; height: 39px; border-radius: 13px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.brand-mark span { display: block; width: 5px; border-radius: 8px 8px 2px 2px; background: #dce9df; transform: rotate(-12deg); }
.brand-mark span:nth-child(1) { height: 15px; opacity: .76; }
.brand-mark span:nth-child(2) { height: 24px; }
.brand-mark span:nth-child(3) { height: 18px; opacity: .86; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; letter-spacing: -.02em; }
.brand-copy small { margin-top: 5px; color: rgba(255, 255, 255, .64); font-size: 9px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }

.nav-list { display: flex; flex: 1; flex-direction: column; gap: 5px; margin-top: 36px; }
.nav-section-label { padding: 0 12px 8px; color: rgba(255, 255, 255, .42); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-section-spaced { margin-top: 23px; }
.nav-list a { position: relative; display: flex; min-height: 45px; padding: 0 12px; align-items: center; gap: 12px; border-radius: 12px; color: rgba(255, 255, 255, .72); font-size: 13px; font-weight: 650; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-list a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-list a.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 #bcd0c3; }
.nav-list a.active .app-icon { color: #d9e9de; }
.nav-list a .app-icon { width: 19px; height: 19px; }
.nav-badge { min-width: 21px; height: 20px; margin-left: auto; padding: 1px 6px; border-radius: 20px; background: #dbe9df; color: var(--sage-900); font-size: 10px; font-weight: 800; text-align: center; }
.teacher-nav-note { display: flex; margin-top: 14px; padding: 12px; align-items: center; gap: 9px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .72); }
.teacher-nav-note .app-icon { width: 18px; height: 18px; }
.teacher-nav-note > span { display: flex; flex-direction: column; }
.teacher-nav-note strong { font-size: 10px; }
.teacher-nav-note small { color: rgba(255, 255, 255, .48); font-size: 8px; }

.sidebar-footer { display: grid; gap: 8px; margin-top: 26px; }
.location-card { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 12px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 13px; background: rgba(255, 255, 255, .055); }
.location-dot { width: 7px; height: 7px; border-radius: 50%; background: #8fc6a5; box-shadow: 0 0 0 4px rgba(143, 198, 165, .12); }
.location-card > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.location-card small { color: rgba(255, 255, 255, .48); font-size: 9px; text-transform: uppercase; }
.location-card strong { margin-top: 2px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.location-card .app-icon { color: rgba(255, 255, 255, .42); }
.view-switch { display: flex; min-height: 39px; padding: 8px 11px; align-items: center; gap: 9px; border-radius: 10px; color: rgba(255, 255, 255, .58); font-size: 11px; font-weight: 650; }
.view-switch:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.main-column { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; height: 72px; padding: 0 clamp(22px, 4vw, 54px); align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(203, 213, 206, .72); background: rgba(245, 246, 242, .9); backdrop-filter: blur(16px); }
.topbar-context, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.mode-label { color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.demo-pill { display: inline-flex; height: 26px; padding: 0 10px; align-items: center; gap: 6px; border: 1px solid var(--sage-200); border-radius: 100px; background: var(--sage-50); color: var(--sage-700); font-size: 10px; font-weight: 750; }
.demo-pill span { width: 6px; height: 6px; border-radius: 50%; background: #65a07f; }
.icon-button { display: inline-flex; width: 40px; height: 40px; padding: 0; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-soft); cursor: pointer; transition: .18s ease; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-soft); color: var(--ink); transform: translateY(-1px); }
.notification-button { position: relative; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border: 2px solid var(--surface); border-radius: 50%; background: var(--clay); box-sizing: content-box; }
.profile-chip { display: flex; min-width: 185px; height: 48px; padding: 5px 8px 5px 5px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.profile-avatar, .person-avatar { display: inline-flex; width: 36px; height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 50%; background: var(--sage-700); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.profile-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.25; }
.profile-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: var(--ink-muted); font-size: 9px; }
.profile-chip > .app-icon { color: var(--ink-muted); }
.menu-button { display: none; }

.page-content { width: min(1510px, 100%); min-height: calc(100vh - 72px); margin: 0 auto; padding: 40px clamp(22px, 4vw, 54px) 60px; }
.page-intro { display: flex; margin-bottom: 30px; align-items: flex-end; justify-content: space-between; gap: 28px; }
.eyebrow, .panel-kicker { display: block; margin-bottom: 7px; color: var(--sage-600); font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.page-intro h1 { margin-bottom: 7px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 3vw, 43px); font-weight: 500; line-height: 1.08; }
.page-intro h1:focus { outline: none; }
.page-intro p { max-width: 660px; margin-bottom: 0; color: var(--ink-soft); font-size: 14px; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.button { display: inline-flex; min-height: 43px; padding: 0 17px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; background: transparent; font-size: 12px; font-weight: 750; line-height: 1.2; cursor: pointer; transition: .18s ease; }
.button .app-icon { width: 17px; height: 17px; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button-primary { background: var(--brand-color); color: #fff; box-shadow: 0 6px 16px rgba(35, 66, 56, .16); }
.button-primary:hover { background: var(--sage-700); box-shadow: 0 9px 20px rgba(35, 66, 56, .2); }
.button-secondary { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.button-secondary:hover { border-color: #aebdb3; background: var(--surface-soft); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #8f3c42; }
.button-soft { background: var(--sage-50); color: var(--sage-800); }
.button-soft:hover { background: var(--sage-100); }
.button-quiet { min-height: 38px; padding: 0 12px; border-color: var(--line); background: var(--surface); }
.button-lg { min-height: 51px; padding: 0 22px; border-radius: 14px; font-size: 13px; }
.button-full { width: 100%; }
.text-link, .text-button { display: inline-flex; padding: 0; align-items: center; gap: 6px; border: 0; background: none; color: var(--sage-700); font-size: 11px; font-weight: 800; cursor: pointer; }
.text-link:hover, .text-button:hover { color: var(--sage-900); }
.text-link .app-icon { width: 15px; height: 15px; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-head h2, .section-title h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.panel-head.compact h2 { font-size: 20px; }
.panel-head .panel-kicker, .section-title .panel-kicker { margin-bottom: 4px; }

.result-banner { display: flex; margin: -8px 0 22px; padding: 14px 16px; align-items: flex-start; gap: 11px; border: 1px solid; border-radius: 13px; }
.result-success { border-color: #bbd9c9; background: var(--success-soft); color: #285f49; }
.result-error { border-color: #e8c6c9; background: var(--danger-soft); color: #8f3f45; }
.result-icon { display: inline-flex; width: 27px; height: 27px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.result-icon .app-icon { width: 16px; height: 16px; }
.result-banner strong { display: block; font-size: 12px; }
.result-banner p { margin: 2px 0 0; font-size: 12px; }

.field { display: grid; gap: 7px; }
.field > span { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.field input, .field select, .field textarea, .select-wrap select, .search-box input {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    outline: none;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
    transition: border .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 92px; padding-top: 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .select-wrap select:focus, .search-box input:focus { border-color: var(--sage-600); box-shadow: 0 0 0 3px rgba(79, 116, 104, .12); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field-full { grid-column: 1 / -1; }
.field-help { margin-top: -2px; color: var(--ink-muted); font-size: 10px; }
.password-input { position: relative; display: block; }
.field .password-input input { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 5px; display: inline-grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.password-toggle:focus-visible { outline: 2px solid var(--sage-600); outline-offset: 1px; }
.password-toggle .app-icon { width: 18px; height: 18px; }
.password-eye-hide { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-show { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-hide { display: block; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; padding: 22px; place-items: center; background: rgba(20, 31, 26, .55); backdrop-filter: blur(5px); }
.modal-card { width: min(550px, 100%); max-height: calc(100vh - 44px); padding: 25px; overflow-x: hidden; overflow-y: auto; border: 1px solid rgba(255, 255, 255, .4); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg); }
.modal-head { display: flex; margin-bottom: 8px; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-head h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 500; }
.modal-help { margin-bottom: 22px; color: var(--ink-soft); font-size: 12px; }
.modal-card .field + .field { margin-top: 15px; }
.modal-card .form-grid .field + .field { margin-top: 0; }
.modal-actions { display: flex; margin-top: 24px; justify-content: flex-end; gap: 10px; }
.info-strip { display: flex; margin-top: 17px; padding: 11px 13px; align-items: flex-start; gap: 9px; border-radius: 11px; background: var(--sage-50); color: var(--sage-700); font-size: 11px; }
.info-strip .app-icon { width: 16px; height: 16px; }
.warning-strip { display: flex; margin-top: 17px; padding: 12px 13px; align-items: flex-start; gap: 9px; border: 1px solid #ecd7b5; border-radius: 11px; background: var(--amber-soft); color: #75501d; font-size: 10px; line-height: 1.5; }
.warning-strip .app-icon { width: 17px; height: 17px; flex: 0 0 auto; }
.warning-strip strong { display: block; }
.amount-danger, .text-clay { color: var(--danger) !important; }
.amount-ok { color: var(--success) !important; }
.subtle-copy { color: var(--ink-muted); font-size: 9px; }
.status-pill { display: inline-flex; width: fit-content; min-height: 24px; padding: 0 8px; align-items: center; gap: 5px; border-radius: 100px; background: var(--surface-soft); color: var(--ink-soft); font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.status-pill b { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-success { background: var(--success-soft); color: var(--success); }
.status-warning { background: var(--amber-soft); color: var(--amber); }
.status-danger { background: var(--danger-soft); color: var(--danger); }
.status-muted { background: var(--surface-soft); color: var(--ink-muted); }

.empty-page { display: grid; min-height: 65vh; max-width: 550px; margin: auto; place-content: center; text-align: center; }
.empty-page h1 { margin-bottom: 10px; font-family: Georgia, "Times New Roman", serif; font-size: 42px; font-weight: 500; }
.empty-page p { margin-bottom: 24px; color: var(--ink-soft); }
.empty-page .button { justify-self: center; }

.mobile-nav { display: none; }
.nav-backdrop { display: none; }
.sidebar-footer form { margin: 0; }
.sidebar-footer .view-switch { width: 100%; border: 0; background: transparent; cursor: pointer; }
.technology-credit { display: block; margin-top: 10px; color: var(--ink-muted); font-size: 9px; text-align: center; }
.activation-result { display: flex; margin: -8px 0 22px; padding: 18px; align-items: center; justify-content: space-between; gap: 18px; }
.activation-result h2 { margin: 3px 0; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; }
.activation-result p { margin: 0 0 10px; color: var(--ink-soft); font-size: 11px; }
.activation-result input { width: min(620px, 100%); padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-size: 10px; }
.activation-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.access-account-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; }
.access-account-row > span { display: grid; gap: 2px; }
.access-account-row small { color: var(--ink-soft); }
.mfa-setup { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; }
.mfa-qr { display: grid; width: 190px; justify-items: center; gap: 7px; text-align: center; }
.mfa-qr img { display: block; width: 180px; height: 180px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.mfa-qr small, .mfa-manual p { color: var(--ink-soft); font-size: 10px; }
.mfa-manual { margin: 12px 0 18px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.mfa-manual summary { color: var(--sage-800); font-size: 11px; font-weight: 800; cursor: pointer; }
.mfa-manual code { display: block; padding-top: 5px; overflow-wrap: anywhere; }
.feedback-form { max-width: 780px; padding: 24px; }
.check-line { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-soft); font-size: 11px; }
.check-line input { margin-top: 2px; }
.import-panel { display: flex; padding: 22px; align-items: center; justify-content: space-between; gap: 20px; }
.import-panel h2 { margin: 3px 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.import-panel p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.template-links { display: flex; margin: 12px 0 22px; gap: 12px; color: var(--ink-muted); font-size: 10px; }
.template-links a { color: var(--sage-700); font-weight: 800; text-decoration: underline; }
.import-errors { color: var(--danger); font-size: 10px; }
.setup-grid { display: grid; margin-bottom: 22px; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.setup-step { display: flex; padding: 18px; align-items: center; gap: 13px; }
.setup-step > b { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--sage-100); color: var(--sage-800); }
.setup-step span { display: grid; margin-right: auto; gap: 3px; }
.setup-step small { color: var(--ink-muted); }
.setup-schedule { padding: 24px; }
.setup-schedule .form-grid { margin-top: 20px; }
.template-summary { display: grid; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); gap: 6px; color: var(--ink-soft); font-size: 11px; }
.catalog-actions { display: flex; margin-top: 13px; justify-content: flex-end; gap: 13px; }

.account-page { display: grid; min-height: 100vh; padding: 28px 16px; place-items: center; background: radial-gradient(circle at 15% 5%, var(--sage-100), transparent 38%), var(--canvas); }
.account-card { width: min(430px, 100%); padding: 34px; }
.account-card-wide { width: min(580px, 100%); }
.account-brand { display: inline-flex; margin-bottom: 36px; }
.account-card h1 { margin: 7px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 500; }
.account-card > p { margin: 0 0 25px; color: var(--ink-soft); line-height: 1.55; }
.account-card .result-banner { margin: 0 0 18px; }
.account-form { display: grid; gap: 17px; }
.account-form .button { margin-top: 4px; }
.first-access-note { margin: -8px 0 20px; line-height: 1.5; }
.first-access-note strong { display: block; margin-bottom: 2px; }
.first-access-link { display: flex; width: fit-content; margin-top: 7px; align-items: center; gap: 5px; color: var(--sage-700); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.first-access-link .app-icon { width: 14px; height: 14px; }
.first-access-steps { display: grid; gap: 10px; margin: 0 0 22px; }
.first-access-step { display: flex; padding: 13px; align-items: flex-start; gap: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.first-access-step > b { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 50%; background: var(--sage-700); color: white; font-size: 11px; }
.first-access-step span { display: grid; gap: 2px; }
.first-access-step small { color: var(--ink-soft); line-height: 1.45; }
.first-access-steps + .button, .first-access-steps + .info-strip { margin-top: 0; }
.account-card > .button + .button { margin-top: 10px; }
.activation-next-step { margin-top: 0; line-height: 1.5; }
.account-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 10px; text-align: center; }
.demo-access { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: var(--surface-soft); color: var(--ink-soft); font-size: 10px; }
.demo-access summary { cursor: pointer; font-weight: 800; }
.demo-access p { margin: 9px 0 0; line-height: 1.7; }
.security-steps { display: grid; margin: 0 0 24px; padding-left: 22px; gap: 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.security-steps code { display: inline-block; padding: 3px 7px; border-radius: 6px; background: var(--surface-soft); color: var(--ink); font-weight: 800; letter-spacing: .08em; }

#blazor-error-ui { position: fixed; right: 20px; bottom: 20px; z-index: 999; display: none; max-width: 520px; padding: 14px 46px 14px 16px; border: 1px solid #e8c6c9; border-radius: 13px; background: var(--danger-soft); color: var(--danger); box-shadow: var(--shadow-md); font-size: 12px; }
#blazor-error-ui .reload { margin-left: 8px; font-weight: 800; text-decoration: underline; }
#blazor-error-ui .dismiss { position: absolute; top: 7px; right: 8px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }

@media (max-width: 1050px) {
    :root { --sidebar-width: 225px; }
    .page-content { padding-inline: 28px; }
    .profile-chip { min-width: 44px; width: 44px; padding: 4px; }
    .profile-copy, .profile-chip > .app-icon { display: none; }
}

@media (max-width: 820px) {
    .sidebar { width: min(290px, 86vw); visibility: hidden; pointer-events: none; transform: translateX(-102%); transition: transform .22s ease, visibility 0s linear .22s; box-shadow: var(--shadow-lg); }
    .nav-open .sidebar { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
    .nav-backdrop { position: fixed; inset: 0; z-index: 45; display: block; width: 100%; height: 100%; border: 0; background: rgba(18, 29, 24, .4); }
    .main-column { margin-left: 0; }
    .topbar { height: 64px; padding: 0 18px; }
    .menu-button { display: inline-flex; }
    .topbar-context { margin-right: auto; margin-left: 10px; }
    .mode-label { display: none; }
    .topbar-actions .icon-button { display: none; }
    .page-content { min-height: calc(100vh - 64px); padding: 28px 17px 92px; }
    .page-intro { align-items: flex-start; flex-direction: column; gap: 18px; }
    .page-actions { width: 100%; justify-content: stretch; }
    .page-actions .button { flex: 1; }
    .mobile-nav { position: fixed; right: 12px; bottom: 10px; left: 12px; z-index: 44; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border: 1px solid rgba(203, 213, 206, .85); border-radius: 18px; background: rgba(255, 255, 255, .93); box-shadow: 0 16px 40px rgba(24, 37, 31, .18); backdrop-filter: blur(16px); }
    .mobile-nav a { display: flex; min-height: 54px; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border-radius: 13px; color: var(--ink-muted); font-size: 9px; font-weight: 750; }
    .mobile-nav a .app-icon { width: 19px; height: 19px; }
    .mobile-nav a.active { background: var(--sage-100); color: var(--sage-800); }
    .mobile-nav.is-teacher { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .topbar-context .demo-pill { font-size: 9px; }
    .page-intro h1 { font-size: 34px; }
    .page-actions { display: grid; grid-template-columns: 1fr; }
    .modal-backdrop { padding: 10px; align-items: end; }
    .modal-card { max-height: 92vh; padding: 20px 17px; border-radius: 22px 22px 14px 14px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .account-card { padding: 26px 20px; }
    .account-card h1 { font-size: 30px; }
    .activation-result { align-items: stretch; flex-direction: column; }
    .activation-actions { display: grid; grid-template-columns: 1fr; }
    .activation-actions .button { width: 100%; }
    .access-account-row { align-items: stretch; flex-direction: column; }
    .mfa-setup { grid-template-columns: 1fr; }
    .mfa-qr { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
