:root {
    --navy: #0b1f45;
    --text: #17223b;
    --muted: #68758d;
    --line: #dfe5ec;
    --soft: #f5f8fa;
    --teal: #078b78;
    --teal-dark: #057160;
    --teal-soft: #e5f6f2;
    --blue: #1f66c2;
    --blue-soft: #eaf3ff;
    --amber: #db8a00;
    --amber-soft: #fff5df;
    --green: #36a852;
    --green-soft: #e9f7ed;
    --red: #d94452;
    --red-soft: #fff0f1;
    --violet: #6040a7;
    --violet-soft: #f2effa;
    --shadow: 0 8px 24px rgba(19, 35, 61, .06);
    --radius: 12px;
    --sidebar: 248px;
    --page: #ffffff;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --sidebar-bg: #fbfcfd;
    --topbar-bg: rgba(255, 255, 255, .95);
    --field-bg: #ffffff;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    background: var(--page);
    transition: color .2s, background .2s;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: var(--sidebar-bg);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 76px;
    padding: 0 22px;
    color: var(--navy);
}
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    color: white;
    background: linear-gradient(145deg, #0c9c87, #03695d);
    box-shadow: 0 5px 12px rgba(7, 139, 120, .22);
}
.brand-mark img { display: block; width: 34px; height: 34px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; line-height: 1.1; letter-spacing: -.02em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; font-weight: 500; }
.main-nav { display: grid; gap: 5px; padding: 28px 10px; }
.main-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 9px;
    color: #536078;
    font-size: 15px;
    font-weight: 560;
    transition: background .18s, color .18s, transform .18s;
}
.main-nav a:hover { background: #f0f5f5; color: var(--teal-dark); transform: translateX(2px); }
.main-nav a.active { color: var(--teal-dark); background: #eaf5f3; }
.main-nav a.active::before {
    position: absolute;
    left: -10px;
    width: 3px;
    height: 100%;
    border-radius: 0 3px 3px 0;
    background: var(--teal);
    content: "";
}
.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: auto;
    padding: 18px 20px;
    border-top: 1px solid var(--line);
}
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 13px; }
.sidebar-footer small { color: var(--muted); font-size: 11px; }
.avatar {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--teal);
    font-weight: 750;
}
.avatar.has-photo { overflow: hidden; background: var(--soft); }
.avatar img, .teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.app-main { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 24px;
    height: 76px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: var(--topbar-bg);
    backdrop-filter: blur(12px);
}
.global-search, .local-search {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: #8490a3;
}
.global-search {
    width: min(560px, 48vw);
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field-bg);
}
.global-search input, .local-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.school-year { display: flex; align-items: center; gap: 7px; color: var(--navy); font-weight: 650; white-space: nowrap; }
.icon-button {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: var(--navy);
    background: transparent;
    cursor: pointer;
}
.icon-button:hover { background: var(--soft); }
.theme-toggle { margin-left: auto; }
.theme-moon { display: none; }
.theme-sun, .theme-moon { line-height: 0; }
.topbar-actions { margin-left: 0; }
.login-theme-toggle { position: fixed; z-index: 10; top: 18px; right: 18px; color: var(--navy); background: var(--surface); box-shadow: var(--shadow); }
.notification-center { position: relative; }
.notification-badge {
    position: absolute;
    top: 1px;
    right: 0;
    display: grid;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    place-items: center;
    border: 2px solid white;
    border-radius: 10px;
    color: white;
    background: var(--teal);
    font-size: 9px;
    font-weight: 800;
}
.notification-panel { position: absolute; z-index: 55; top: calc(100% + 10px); right: 0; width: min(390px, calc(100vw - 32px)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 20px 55px rgba(15, 34, 50, .2); }
.notification-panel[hidden] { display: none; }
.notification-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notification-panel > header strong, .notification-panel > header small { display: block; }
.notification-panel > header strong { color: var(--navy); font-size: 13px; }
.notification-panel > header small { margin-top: 2px; color: var(--teal-dark); font-size: 10px; font-weight: 700; }
.notification-panel > header > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--teal-dark); background: var(--teal-soft); }
.notification-list { max-height: min(420px, calc(100vh - 190px)); overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 9px; padding: 12px 15px; border-bottom: 1px solid var(--line); color: inherit; background: transparent; }
.notification-item:hover { background: var(--soft); }
.notification-item > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: transparent; }
.notification-item.unread > i { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.notification-item span, .notification-item strong, .notification-item small, .notification-item time { display: block; }
.notification-item strong { color: var(--navy); font-size: 11px; }
.notification-item small { margin-top: 3px; color: var(--text); font-size: 10px; line-height: 1.45; }
.notification-item time { margin-top: 5px; color: var(--muted); font-size: 9px; }
.notification-item.unread { background: #f4fbfa; }
.notification-empty { display: grid; min-height: 150px; place-items: center; align-content: center; gap: 8px; color: var(--muted); font-size: 11px; }
.notification-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--muted); background: var(--soft); font-size: 9px; }
.notification-panel > footer form { flex: 0 0 auto; }
.notification-clear-button { padding: 0; border: 0; color: #a72f3b; background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.notification-clear-button:hover { text-decoration: underline; }
.mobile-menu { display: none; }
.content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 28px; flex: 1; }
.app-footer { padding: 10px 24px 16px; color: var(--muted); font-size: 9px; line-height: 1.4; text-align: center; }
.app-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.app-footer a:hover { color: var(--teal-dark); }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(25px, 2.4vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, background .15s, border .15s;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--teal); box-shadow: 0 6px 16px rgba(7, 139, 120, .18); }
.button.primary:hover { background: var(--teal-dark); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button.secondary { border-color: var(--line); color: var(--navy); background: white; }
.button.ghost { border-color: transparent; color: var(--muted); background: var(--soft); }
.button.danger { color: var(--red); border-color: var(--red-soft); background: var(--red-soft); }
.button.small { min-height: 32px; padding: 0 11px; font-size: 12px; }
.button.wide { width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.workflow-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
    display: flex;
    min-width: 0;
    min-height: 120px;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 2px 9px rgba(19, 35, 61, .025);
}
.stat-icon { display: grid; width: 55px; height: 55px; place-items: center; border-radius: 50%; }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.amber { color: var(--amber); background: var(--amber-soft); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.violet { color: var(--violet); background: var(--violet-soft); }
.stat small, .stat strong, .stat em { display: block; }
.stat > span:last-child { min-width: 0; }
.stat small { color: #4a5871; font-size: 13px; }
.stat strong { margin: 1px 0; color: var(--navy); font-size: 28px; line-height: 1.15; letter-spacing: -.03em; }
.stat em { color: var(--muted); font-size: 10px; font-style: normal; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(285px, 1fr); gap: 16px; }
.workflow-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.workflow-column, .panel, .kanban-column {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: 0 2px 10px rgba(19, 35, 61, .025);
}
.workflow-column { display: flex; min-width: 0; flex-direction: column; padding: 14px 10px 8px; }
.workflow-column > header { display: flex; align-items: center; gap: 8px; padding: 0 6px 10px; }
.workflow-column h2, .panel-heading h2, .kanban-column h2 { margin: 0; color: var(--navy); font-size: 16px; letter-spacing: -.015em; }
.workflow-column > header span {
    display: grid;
    min-width: 25px;
    height: 22px;
    padding: 0 6px;
    place-items: center;
    border-radius: 7px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 11px;
    font-weight: 800;
}
.request-card-list, .kanban-list { display: grid; gap: 9px; }
.request-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    transition: border .16s, box-shadow .16s, transform .16s;
}
.request-card:hover { transform: translateY(-1px); border-color: #bdcbd5; box-shadow: var(--shadow); }
.request-card-top { display: flex; justify-content: space-between; gap: 10px; }
.request-card-top a { color: var(--blue); font-size: 12px; font-weight: 750; }
.request-card-top time { color: var(--muted); font-size: 11px; }
.request-card h3 { margin: 6px 0 0; color: var(--navy); font-size: 14px; }
.request-card p { overflow: hidden; margin: 2px 0 10px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.request-file-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.request-file-actions a { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 7px; border-radius: 6px; color: var(--teal-dark); background: var(--teal-soft); font-size: 11px; font-weight: 750; }
.request-metrics { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: #34425b; font-size: 12px; }
.request-stage-times { display: grid; gap: 4px; margin: 0 0 10px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.request-stage-times span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.request-stage-times small { color: var(--muted); font-size: 9px; font-weight: 700; }
.request-stage-times time { color: var(--text); font-size: 9px; font-weight: 650; }
.request-stage-times span.pending { opacity: .55; }
.request-card-compact { padding: 10px 11px; }
.compact-status { color: var(--green); font-size: 9px; font-weight: 750; }
.compact-request-main { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.compact-request-main > div { min-width: 0; }
.compact-request-main h3 { margin-top: 5px; font-size: 12px; }
.compact-request-main p { margin: 1px 0 5px; font-size: 10px; }
.compact-request-main > strong { flex: 0 0 auto; color: var(--teal-dark); font-size: 11px; }
.compact-stage-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 1px 0 6px; }
.compact-stage-times span { min-width: 0; padding: 4px 5px; border-radius: 5px; background: var(--soft); }
.compact-stage-times small, .compact-stage-times time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-stage-times small { color: var(--muted); font-size: 7px; font-weight: 700; }
.compact-stage-times time { margin-top: 1px; color: var(--text); font-size: 8px; font-weight: 650; }
.compact-stage-times span.pending { opacity: .5; }
.compact-request-totals { display: flex; flex-wrap: wrap; gap: 5px 9px; color: var(--muted); font-size: 9px; }
.tags, .detail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span, .detail-tags span {
    padding: 2px 6px;
    border: 1px solid #e1e7ed;
    border-radius: 5px;
    color: #40506b;
    background: #f7f9fb;
    font-size: 10px;
    line-height: 1.5;
}
.tags .tag-warn { border-color: #ffe0ad; color: #a96000; background: var(--amber-soft); }
.tags .tag-kind { margin-left: auto; border-color: #dce8f6; color: var(--navy); background: #eef4fa; }
.column-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 13px 6px 5px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}
.dashboard-rail { display: grid; align-content: start; gap: 12px; }
.panel-heading { display: flex; min-height: 55px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.panel-heading small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.activity-list { padding: 2px 14px; }
.activity-list a { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.activity-list a:last-child { border: 0; }
.activity-dot { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: white; background: var(--blue); }
.activity-dot.status-in_progress { background: var(--amber); }
.activity-dot.status-ready { background: var(--green); }
.activity-dot.status-delivered { background: var(--green); }
.activity-dot.status-cancelled { background: var(--red); }
.activity-list strong, .activity-list small { display: block; }
.activity-list strong { font-size: 12px; }
.activity-list small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.activity-list time { color: var(--muted); font-size: 10px; }
.chart-panel { padding-bottom: 7px; }
.chart-total { display: block; padding: 12px 17px 0; color: var(--navy); font-size: 27px; letter-spacing: -.03em; }
.mini-chart { height: 120px; margin: 2px 12px 0; }
.mini-chart svg { width: 100%; height: 100%; overflow: visible; }
.empty-state { padding: 26px 12px; border: 1px dashed #ccd5df; border-radius: 9px; color: var(--muted); text-align: center; font-size: 12px; }

.flash { margin-bottom: 16px; padding: 12px 15px; border-radius: 8px; font-weight: 650; }
.flash-success { color: #12633f; background: #e8f7ef; }
.flash-error { color: #9c2630; background: var(--red-soft); }
.field, .stack-form label { display: grid; gap: 7px; color: #36435a; font-size: 12px; font-weight: 700; }
.field-label { display: block; color: #36435a; font-size: 12px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #d6dde5;
    border-radius: 7px;
    outline: none;
    color: var(--text);
    background: white;
    font-size: 13px;
    font-weight: 500;
    transition: border .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(7, 139, 120, .1); }
.stack-form { display: grid; gap: 15px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.help { color: var(--muted); font-size: 10px; font-weight: 500; }
.request-form { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.request-wizard-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    padding: 28px;
    place-items: center;
    background: rgba(7, 20, 35, .58);
    backdrop-filter: blur(5px);
}
.request-wizard {
    display: flex;
    width: min(1040px, 100%);
    height: min(760px, calc(100vh - 56px));
    min-height: 560px;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: 0 28px 80px rgba(4, 18, 31, .3);
}
.wizard-header { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 24px 32px 18px; }
.wizard-header small { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.wizard-header h1 { margin: 4px 0 0; color: var(--navy); font-size: 25px; letter-spacing: -.03em; }
.wizard-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.wizard-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
    background: var(--soft);
    transform: rotate(45deg);
}
.wizard-close:hover { color: var(--navy); }
.wizard-progress { display: grid; width: 100%; grid-template-columns: repeat(6, 1fr); padding: 0 32px 19px; border-bottom: 1px solid var(--line); }
.wizard-progress button { position: relative; display: grid; min-width: 0; justify-items: center; gap: 5px; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.wizard-progress button::before { position: absolute; z-index: 0; top: 13px; right: 50%; left: -50%; height: 2px; background: var(--line); content: ""; }
.wizard-progress button:first-child::before { display: none; }
.wizard-progress button.complete::before, .wizard-progress button.active::before { background: var(--teal); }
.wizard-progress button:disabled { cursor: default; }
.wizard-progress button > span { position: relative; z-index: 1; display: grid; width: 28px; height: 28px; place-items: center; border: 2px solid var(--line); border-radius: 50%; color: var(--muted); background: white; font-size: 10px; font-weight: 800; }
.wizard-progress button.active > span, .wizard-progress button.complete > span { border-color: var(--teal); color: white; background: var(--teal); }
.wizard-progress small { overflow: hidden; width: 100%; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wizard-progress button.active small { color: var(--teal-dark); }
.wizard-body { width: 100%; min-height: 0; padding: 26px 32px; overflow-y: auto; flex: 1; }
.wizard-step { display: grid; width: min(780px, 100%); margin: 0 auto; gap: 18px; }
.wizard-intro { display: flex; align-items: center; gap: 14px; }
.wizard-intro-icon { display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--teal); background: var(--teal-soft); }
.wizard-intro h2 { margin: 0; color: var(--navy); font-size: 18px; }
.wizard-intro p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.pdf-dropzone { display: grid; min-height: 220px; padding: 26px; place-items: center; align-content: center; gap: 8px; border: 2px dashed #b8c7d5; border-radius: 14px; color: var(--teal); background: var(--soft); text-align: center; cursor: pointer; transition: border .15s, background .15s; }
.pdf-dropzone:hover, .pdf-dropzone:focus-within, .pdf-dropzone.drag-active { border-color: var(--teal); background: var(--teal-soft); }
.pdf-dropzone.drag-active { border-style: solid; box-shadow: inset 0 0 0 2px rgba(7, 139, 120, .12); transform: scale(1.005); }
.pdf-dropzone.invalid { border-color: var(--red); background: var(--red-soft); }
.pdf-dropzone.invalid span { color: var(--red); font-weight: 700; }
.pdf-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pdf-dropzone strong { color: var(--navy); font-size: 15px; }
.pdf-dropzone span { max-width: 480px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pdf-dropzone small { color: var(--muted); font-size: 9px; }
.wizard-callout { padding: 11px 13px; border-radius: 8px; color: #3f5c6d; background: var(--blue-soft); font-size: 10px; text-align: center; }
.student-request-option { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid #abd9d1; border-radius: 9px; color: #17614d; background: var(--teal-soft); cursor: pointer; }
.student-request-option input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--teal); }
.student-request-option > svg { flex: 0 0 auto; }
.student-request-option span, .student-request-option strong, .student-request-option small { display: block; }
.student-request-option strong { color: var(--teal-dark); font-size: 11px; }
.student-request-option small { margin-top: 3px; color: #4c6d68; font-size: 9px; line-height: 1.45; }
.destination-student-count, .quantity-destination-context { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid #abd9d1; border-radius: 9px; color: #17614d; background: var(--teal-soft); }
.destination-student-count > svg { flex: 0 0 auto; }
.destination-student-count strong, .destination-student-count small,
.quantity-destination-context strong, .quantity-destination-context small { display: block; }
.destination-student-count strong, .quantity-destination-context strong { color: var(--teal-dark); font-size: 11px; }
.destination-student-count small, .quantity-destination-context small { margin-top: 3px; color: #4c6d68; font-size: 9px; line-height: 1.45; }
.page-count-card { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.page-count-card input { max-width: 210px; color: var(--teal-dark); font-size: 26px; font-weight: 800; }
.wizard-step > .field, .wizard-step > .form-row, .wizard-step > .segmented { margin-top: 0; }
.wizard-footer { display: flex; width: 100%; min-height: 76px; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 32px; border-top: 1px solid var(--line); background: #fbfcfd; }
.wizard-footer > span { margin-right: auto; color: var(--muted); font-size: 10px; font-weight: 700; }
.wizard-footer .button { min-width: 125px; }
.request-wizard .request-summary { position: static; padding: 24px; box-shadow: none; }
.form-main { display: grid; gap: 16px; }
.form-section { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.form-section > header { display: flex; gap: 12px; margin-bottom: 20px; }
.form-section > header > span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--teal);
    font-size: 12px;
    font-weight: 800;
}
.form-section h2 { margin: 0; color: var(--navy); font-size: 17px; }
.form-section header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.form-section > .field, .form-section > .form-row, .form-section > .segmented { margin-top: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice > span { display: grid; min-height: 64px; align-content: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); font-size: 11px; font-weight: 750; }
.choice small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 500; }
.choice input:checked + span { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 1px var(--teal); }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.check-grid label { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: #42506a; font-size: 11px; cursor: pointer; }
.check-grid input, .check-line input { width: auto; min-height: auto; }
.segmented { display: inline-flex; width: fit-content; padding: 3px; border-radius: 8px; background: var(--soft); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 7px 12px; border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.segmented input:checked + span { color: var(--navy); background: white; box-shadow: 0 2px 6px rgba(19,35,61,.08); }
.request-summary { position: sticky; top: 96px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.request-summary h2 { margin: 0; color: var(--navy); font-size: 17px; }
.request-summary > div > p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.request-summary dl { margin: 22px 0; }
.request-summary dl div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #edf1f4; }
.request-summary dt { color: var(--muted); font-size: 11px; }
.request-summary dd { margin: 0; color: var(--navy); font-size: 12px; font-weight: 750; text-align: right; }
.summary-note { display: flex; gap: 9px; margin-bottom: 17px; padding: 11px; border-radius: 8px; color: #17614d; background: var(--teal-soft); font-size: 10px; }
.cancel-panel { margin-top: 18px; border-color: var(--red-soft); }
.cancel-panel .panel-heading { border-bottom-color: var(--red-soft); }
.cancel-panel .panel-heading h2 { color: var(--red); }
.cancel-panel form { padding: 16px; }

.table-panel { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.local-search { width: 260px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; }
.status-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.status-filters a { padding: 6px 9px; border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.status-filters a.active { color: var(--teal-dark); background: var(--teal-soft); }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid #ebeff3; text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #fbfcfd; font-size: 10px; letter-spacing: .02em; text-transform: uppercase; }
.table-sort { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; cursor: pointer; }
.table-sort i { width: 0; height: 0; border-right: 4px solid transparent; border-bottom: 5px solid currentColor; border-left: 4px solid transparent; opacity: .25; }
th[data-sort-direction="desc"] .table-sort i { border-top: 5px solid currentColor; border-bottom: 0; opacity: 1; }
th[data-sort-direction="asc"] .table-sort i { opacity: 1; }
td { color: #38465e; font-size: 11px; }
td strong, td small { display: block; }
td strong { color: var(--navy); font-size: 11px; }
td small { margin-top: 2px; color: var(--muted); font-size: 9px; }
tr:last-child td { border-bottom: 0; }
.row-action { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; color: var(--blue); }
.row-action:hover { background: var(--blue-soft); }
.status-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 750; }
.status-badge.large { padding: 7px 12px; font-size: 11px; }
.status-in_progress { color: #a86100; background: var(--amber-soft); }
.status-ready { color: #13753b; background: var(--green-soft); }
.status-delivered { color: #13753b; background: var(--green-soft); }
.status-cancelled, .status-rejected { color: #a92e39; background: var(--red-soft); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.detail-panel { overflow: hidden; }
.document-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.document-preview { margin: 0 18px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); scroll-margin-top: 82px; }
.document-preview header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: white; }
.document-preview strong, .document-preview small { display: block; }
.document-preview strong { color: var(--navy); font-size: 11px; }
.document-preview small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.document-preview header a { display: flex; align-items: center; gap: 4px; color: var(--blue); font-size: 10px; font-weight: 700; }
.document-preview iframe { display: block; width: 100%; height: min(72vh, 780px); min-height: 520px; border: 0; background: #dfe3e7; }
.document-unavailable { display: flex; gap: 10px; margin: 0 18px 18px; padding: 13px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); background: var(--soft); }
.document-unavailable strong, .document-unavailable small { display: block; }
.document-unavailable strong { color: var(--navy); font-size: 11px; }
.document-unavailable small { margin-top: 2px; font-size: 9px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 8px 18px 18px; }
.detail-list div { padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 3px 0 0; color: var(--navy); font-size: 12px; font-weight: 700; }
.detail-tags { padding: 0 18px 18px; }
.detail-tags span { padding: 5px 8px; font-size: 10px; }
.note { margin: 0 18px 18px; padding: 14px; border-radius: 8px; background: var(--soft); }
.note strong { color: var(--navy); font-size: 11px; }
.note p { margin: 6px 0 0; color: #526078; font-size: 11px; }
.detail-grid aside { display: grid; gap: 14px; }
.action-panel, .timeline-panel { padding-bottom: 16px; }
.request-workflow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 14px 16px 0; }
.request-workflow span { display: grid; gap: 5px; justify-items: center; color: var(--muted); font-size: 9px; font-weight: 700; text-align: center; }
.request-workflow i { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--soft); font-style: normal; }
.request-workflow span.done, .request-workflow span.current { color: var(--teal-dark); }
.request-workflow span.done i, .request-workflow span.current i { color: white; border-color: var(--teal); background: var(--teal); }
.request-workflow span.current i { box-shadow: 0 0 0 3px var(--teal-soft); }
.action-panel form { padding: 16px; }
.timeline { display: grid; gap: 0; margin: 0; padding: 16px 18px 4px; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 17px 1fr; gap: 10px; min-height: 60px; }
.timeline li::before { position: absolute; top: 15px; bottom: -3px; left: 5px; width: 1px; background: #dce3e9; content: ""; }
.timeline li:last-child::before { display: none; }
.timeline li > span { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 4px; border: 3px solid var(--teal-soft); border-radius: 50%; background: var(--teal); }
.timeline strong, .timeline small { display: block; }
.timeline strong { color: var(--navy); font-size: 11px; }
.timeline small { color: var(--muted); font-size: 9px; }
.timeline p { margin: 4px 0; color: #536078; font-size: 10px; }

.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kanban-column { padding: 12px; background: #fafcfd; }
.kanban-column > header { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 13px; }
.kanban-column header p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.kanban-pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 8px; padding: 10px 4px 1px; border-top: 1px solid var(--line); }
.kanban-pagination a { display: flex; align-items: center; gap: 4px; color: var(--blue); font-size: 9px; font-weight: 750; }
.kanban-pagination a:last-child { justify-self: end; }
.kanban-pagination strong { color: var(--muted); font-size: 9px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.status-dot.status-in_progress { background: var(--amber); }
.status-dot.status-ready { background: var(--green); }
.status-dot.status-delivered { background: var(--green); }
.kanban-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: -4px 4px 8px; }
.kanban-card-actions > :only-child { grid-column: 1 / -1; }
.quick-action { margin: 0; }
.quick-action button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 6px; padding: 6px; border: 0; border-radius: 6px; color: var(--teal-dark); background: var(--teal-soft); font-size: 9px; font-weight: 750; cursor: pointer; }
.quick-action button.quick-action-back { color: var(--navy); background: var(--soft); }
.quick-action-delete { display: flex; min-height: 30px; align-items: center; justify-content: center; gap: 6px; padding: 6px; border: 0; border-radius: 6px; color: #a33636; background: #fff0f0; font-size: 9px; font-weight: 750; cursor: pointer; }
.confirmation-modal { width: min(470px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 14px; color: var(--text); background: transparent; box-shadow: 0 24px 70px rgba(9, 23, 43, .28); }
.confirmation-modal::backdrop { background: rgba(9, 23, 43, .62); backdrop-filter: blur(3px); }
.confirmation-modal-card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.confirmation-modal-card > header { display: flex; gap: 13px; align-items: flex-start; }
.confirmation-modal-card h2 { margin: 0; color: var(--navy); font-size: 20px; }
.confirmation-modal-card header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.confirmation-modal-card > p { margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.confirmation-modal-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #b42318; background: #fee4e2; }
.confirmation-modal-card form { display: flex; justify-content: flex-end; gap: 8px; }
.confirmation-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.backup-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.backup-action-card .panel-heading > svg { color: var(--teal); }
.backup-card-body { display: grid; gap: 16px; padding: 20px; }
.backup-action-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.backup-security-note { color: var(--muted); font-size: 10px; line-height: 1.5; }
.backup-restore-card .backup-card-body { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.backup-upload-form { padding-left: 16px; border-left: 1px solid var(--line); }
.stored-backup-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 13px 18px; border-top: 1px solid var(--line); }
.stored-backup-list article:first-child { border-top: 0; }
.stored-backup-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: var(--teal-dark); background: var(--teal-soft); }
.stored-backup-list article > span:nth-child(2), .stored-backup-list strong, .stored-backup-list small { display: block; min-width: 0; }
.stored-backup-list strong { color: var(--navy); font-size: 11px; }
.stored-backup-list small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.archive-notice { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; padding: 13px 16px; color: #7a4b00; border: 1px solid #efd49e; border-radius: 10px; background: #fff8e8; }
.archive-notice > svg { flex: 0 0 auto; }
.archive-notice span, .archive-notice strong { display: block; }
.archive-notice span { font-size: 10px; }
.archive-notice strong { margin-bottom: 2px; color: #633d00; font-size: 11px; }
.year-picker label { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.year-picker select { min-width: 145px; min-height: 34px; }
.table-result-count { padding: 9px 16px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 10px; }
.table-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.table-pagination span { color: var(--muted); font-size: 10px; font-weight: 700; }

.reports-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.donut-layout { display: grid; grid-template-columns: 190px 1fr; gap: 25px; align-items: center; padding: 25px; }
.donut-chart { width: 180px; height: 180px; }
.legend { display: grid; gap: 12px; }
.legend span { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; color: #47556d; font-size: 11px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend strong { color: var(--navy); }
.bar-list { display: grid; gap: 17px; padding: 24px; }
.bar-list span { display: flex; justify-content: space-between; margin-bottom: 5px; color: #46546c; font-size: 11px; }
.bar-list strong { color: var(--navy); }
.bar-list i { display: block; height: 7px; overflow: hidden; border-radius: 4px; background: #edf1f4; }
.bar-list a, .stacked-bar-row a { color: var(--blue); text-decoration: none; }
.bar-list a:hover, .stacked-bar-row a:hover, .report-table td a:hover { color: var(--teal-dark); text-decoration: underline; }
.bar-list b { display: block; height: 100%; border-radius: 4px; background: var(--teal); }
.report-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
    padding: 16px;
}
.report-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.report-filters input, .report-filters select { width: 100%; min-width: 0; min-height: 38px; }
.format-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.format-stat { display: grid; grid-template-columns: auto 1fr 1fr; gap: 22px; align-items: center; padding: 18px 22px; }
.format-stat > span { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 12px; color: white; background: var(--teal); font-size: 18px; font-weight: 800; }
.format-stat small, .format-stat strong { display: block; }
.format-stat small { color: var(--muted); font-size: 10px; }
.format-stat strong { margin-top: 2px; color: var(--navy); font-size: 22px; }
.legacy-report-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; align-items: start; }
.legacy-report-side { display: grid; gap: 16px; }
.stacked-bar-list { display: grid; gap: 10px; padding: 18px; }
.stacked-bar-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(120px, auto) auto; gap: 8px; align-items: center; }
.stacked-track { display: flex; min-width: 0; height: 22px; overflow: hidden; border-radius: 4px; background: var(--soft); }
.stacked-track i { display: flex; min-width: 3px; align-items: center; justify-content: center; overflow: hidden; color: white; font-style: normal; }
.stacked-track span { padding: 0 5px; font-size: 9px; font-weight: 750; }
.stack-tests { background: #2563eb; }
.stack-others { background: #0f9f7f; }
.stacked-bar-row > strong { overflow: hidden; color: var(--blue); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stacked-bar-row > small { color: var(--muted); font-size: 9px; }
.stacked-legend { display: flex; gap: 14px; justify-content: flex-end; padding-top: 6px; color: var(--muted); font-size: 9px; }
.stacked-legend span { display: flex; gap: 5px; align-items: center; }
.stacked-legend i { width: 10px; height: 10px; border-radius: 2px; }
.report-filter-actions { display: flex; align-self: end; gap: 6px; }
.report-jumps { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; }
.report-jumps a { padding: 7px 10px; border-radius: 7px; color: var(--muted); background: var(--soft); font-size: 10px; font-weight: 700; white-space: nowrap; }
.report-jumps a:hover { color: var(--teal-dark); background: var(--teal-soft); }
.report-section { margin-top: 18px; scroll-margin-top: 82px; }
.report-wide-chart { margin-bottom: 18px; }
.report-line-chart { height: 220px; padding: 18px 20px 12px; }
.report-line-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.annual-evolution { margin-top: 18px; }
.annual-chart-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.annual-totals { display: flex; gap: 24px; text-align: right; }
.annual-totals small, .annual-totals strong { display: block; }
.annual-totals small { color: var(--muted); font-size: 9px; }
.annual-totals strong { margin-top: 2px; color: var(--navy); font-size: 16px; }
.report-multi-chart { height: 300px; overflow-x: auto; overflow-y: hidden; }
.report-multi-chart svg { min-width: 760px; }
.multi-chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 4px 20px 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.multi-chart-legend span { display: flex; gap: 6px; align-items: center; }
.multi-chart-legend span::before { width: 18px; height: 3px; border-radius: 2px; background: var(--series-color, #0f766e); content: ""; }
.report-table { margin-top: 16px; overflow: hidden; }
.report-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 22px; }
.report-detail-identity { display: flex; min-width: 0; align-items: center; gap: 16px; }
.report-detail-avatar, .report-detail-icon { display: grid; width: 72px; height: 72px; flex: 0 0 auto; overflow: hidden; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 22px; font-weight: 800; }
.report-detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.report-detail-identity small, .report-detail-identity h2, .report-detail-identity p { display: block; margin: 0; }
.report-detail-identity small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.report-detail-identity h2 { margin-top: 3px; color: var(--navy); font-size: 24px; }
.report-detail-identity p { margin-top: 7px; color: var(--muted); font-size: 11px; }
.report-detail-totals { display: flex; gap: 24px; text-align: right; }
.report-detail-totals small, .report-detail-totals strong { display: block; }
.report-detail-totals small { color: var(--muted); font-size: 9px; }
.report-detail-totals strong { margin-top: 3px; color: var(--navy); font-size: 22px; }
.report-detail-breakdowns { margin-top: 18px; }
.legend > a { display: contents; color: inherit; text-decoration: none; }
.quota-meter { position: relative; display: block; width: 125px; height: 18px; overflow: hidden; border-radius: 9px; background: var(--soft); }
.quota-meter i { display: block; height: 100%; background: var(--teal); }
.quota-meter.warning i { background: var(--amber); }
.quota-meter.over i { background: var(--red); }
.quota-meter em { position: absolute; inset: 0; display: grid; place-items: center; color: var(--navy); font-size: 9px; font-style: normal; font-weight: 800; }

.settings-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.settings-tabs a { padding: 10px 13px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.settings-tabs a.active { border-color: var(--teal); color: var(--teal-dark); }
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-menu { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.settings-menu a { display: flex; justify-content: space-between; padding: 9px 10px; border-radius: 7px; color: #55627a; font-size: 11px; font-weight: 650; }
.settings-menu a.active { color: var(--teal-dark); background: var(--teal-soft); }
.settings-menu span { color: var(--muted); }
.settings-content { overflow: hidden; }
.catalog-list { padding: 7px 17px; }
.catalog-list article { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 9px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf1f4; }
.catalog-list article.inactive, .attribute-card.inactive, .option-tags span.inactive { opacity: .48; }
.catalog-list i { width: 10px; height: 10px; border-radius: 3px; }
.catalog-list strong, .catalog-list small { display: block; }
.catalog-list strong { color: var(--navy); font-size: 11px; }
.catalog-list small { color: var(--muted); font-size: 9px; }
.inline-create { padding: 18px; border-top: 1px solid var(--line); background: #fbfcfd; }
.inline-create h3 { margin: 0 0 13px; color: var(--navy); font-size: 13px; }
.inline-create > .field, .inline-create > .form-row { margin-bottom: 12px; }
.settings-two-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 16px; align-items: start; }
.settings-content > .stack-form { padding: 18px; }
.attribute-card { padding: 15px 18px; border-bottom: 1px solid var(--line); }
.attribute-card > header { display: flex; align-items: center; justify-content: space-between; }
.attribute-actions { display: flex; align-items: center; gap: 7px; }
.attribute-card strong, .attribute-card small { display: block; }
.attribute-card strong { color: var(--navy); font-size: 12px; }
.attribute-card small { color: var(--muted); font-size: 9px; }
.option-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.option-tags > span { display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 6px; color: #40506a; background: var(--soft); font-size: 9px; }
.option-tags form { display: inline; }
.option-tags button { padding: 0; border: 0; color: var(--red); background: transparent; cursor: pointer; }
.option-form { display: grid; grid-template-columns: 1fr 1fr 82px auto; gap: 7px; }
.option-form input { min-height: 34px; padding: 6px 8px; font-size: 10px; }
.option-tags a { color: inherit; text-decoration: none; }
.option-tags a:hover { color: var(--teal); text-decoration: underline; }
.compact-editor { position: relative; }
.compact-editor > summary { list-style: none; cursor: pointer; }
.compact-editor > summary::-webkit-details-marker { display: none; }
.compact-editor[open] > summary { color: white; border-color: var(--teal); background: var(--teal); }
.compact-editor > form { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; display: grid; width: min(360px, calc(100vw - 48px)); gap: 9px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 18px 45px rgba(18, 38, 55, .18); }
.compact-editor label { display: grid; gap: 4px; color: #536078; font-size: 9px; font-weight: 700; }
.compact-editor input, .compact-editor select { min-width: 0; min-height: 34px; padding: 7px 9px; font-size: 10px; }
.check-line { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.simple-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 15px; }
.simple-list span { padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.simple-list strong, .simple-list small { display: block; }
.simple-list strong { color: var(--navy); font-size: 11px; }
.simple-list small { color: var(--muted); font-size: 9px; }
.teacher-settings { grid-template-columns: minmax(0, 1.8fr) minmax(285px, .7fr); }
.table-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.user-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.user-actions .button { gap: 5px; }
.teacher-table th:last-child, .teacher-table td:last-child { position: sticky; right: 0; z-index: 2; background: var(--surface); box-shadow: -10px 0 16px -16px rgba(10, 29, 48, .55); }
.teacher-table th:last-child { z-index: 3; background: #fbfcfd; }
.teacher-table .inactive-row td:last-child { background: var(--surface); }
.inactive-row { opacity: .58; }
.teacher-identity { display: flex; align-items: center; gap: 10px; }
.teacher-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; overflow: hidden; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 12px; font-weight: 750; }
.form-note { display: grid; gap: 3px; padding: 11px 12px; border-radius: 8px; color: var(--muted); background: var(--soft); }
.form-note strong { color: var(--navy); font-size: 10px; }
.form-note small { font-size: 9px; line-height: 1.45; }
.operational-settings-form { display: grid; gap: 16px; }
.operational-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.retention-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.retention-summary span { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.retention-summary strong, .retention-summary small { display: block; }
.retention-summary strong { color: var(--navy); font-size: 14px; }
.retention-summary small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.email-template-settings { overflow: visible; }
.email-template-settings .panel-heading { align-items: flex-start; }
.template-placeholders { display: flex; max-width: 48%; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.template-placeholders code { padding: 3px 6px; font-size: 9px; }
.email-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px; }
.email-template-grid fieldset { min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }
.email-template-grid legend { padding: 0 7px; color: var(--navy); font-size: 12px; font-weight: 800; }
.email-template-grid label { display: grid; gap: 7px; margin-bottom: 13px; color: #36435a; font-size: 11px; font-weight: 700; }
.email-template-grid label:last-child { margin-bottom: 0; }
.email-template-grid textarea { min-height: 235px; line-height: 1.55; }
.operational-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--soft); }
.operational-settings-actions span { color: var(--muted); font-size: 10px; }
.cleanup-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 16px 18px; }
.cleanup-panel strong, .cleanup-panel small { display: block; }
.cleanup-panel strong { color: var(--navy); font-size: 12px; }
.cleanup-panel small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.mail-test-form { display: flex; align-items: center; gap: 10px; }
.mail-test-form input { min-width: 250px; }
.school-year-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 14px 18px; }
.school-year-toolbar > div strong, .school-year-toolbar > div small { display: block; }
.school-year-toolbar > div strong { color: var(--navy); font-size: 13px; }
.school-year-toolbar > div small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.school-year-toolbar form label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; font-weight: 700; }
.school-year-toolbar select { min-width: 145px; }
.setup-notice { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; padding: 13px 16px; color: #075f51; border: 1px solid #9bd9cf; border-radius: 10px; background: #edfaf7; }
.setup-notice > svg { flex: 0 0 auto; }
.setup-notice span, .setup-notice strong { display: block; }
.setup-notice span { font-size: 10px; }
.setup-notice strong { margin-bottom: 2px; color: #064e43; font-size: 11px; }
.bulk-class-counts { margin-bottom: 16px; }
.bulk-class-counts > form { padding: 16px 18px 18px; }
.bulk-class-grid { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 9px; }
.bulk-class-grid label { display: grid; grid-template-columns: 1fr 62px auto; align-items: center; gap: 6px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.bulk-class-grid span { color: var(--navy); font-size: 11px; font-weight: 800; }
.bulk-class-grid input { width: 62px; min-height: 34px; padding: 6px; text-align: center; }
.bulk-class-grid small { color: var(--muted); font-size: 8px; }
.bulk-class-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.school-settings-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .65fr); gap: 16px; align-items: start; }
.school-settings-side { display: grid; gap: 16px; }
.school-class-picker { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.curriculum-form { padding: 18px; }
.curriculum-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.curriculum-heading > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.curriculum-heading strong, .curriculum-heading small { display: block; }
.curriculum-heading strong { color: var(--navy); font-size: 16px; }
.curriculum-heading small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.curriculum-subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 560px; overflow-y: auto; padding: 2px; }
.curriculum-subjects label { position: relative; cursor: pointer; }
.curriculum-subjects input { position: absolute; opacity: 0; pointer-events: none; }
.curriculum-subjects span { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.curriculum-subjects strong { color: var(--navy); font-size: 10px; line-height: 1.25; }
.curriculum-subjects small { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.curriculum-subjects input:checked + span { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 1px var(--teal); }
.curriculum-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.readonly-curriculum { padding: 18px; }
.readonly-subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.readonly-subjects > span { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.readonly-subjects strong { color: var(--navy); font-size: 10px; }
.readonly-subjects small { color: var(--muted); font-size: 9px; }
.transition-note { padding: 11px; border-radius: 7px; color: var(--muted); background: var(--soft); font-size: 11px; }
.transition-note.blocked { color: #9c2630; background: var(--red-soft); font-weight: 700; }
.school-add-subject { border-top: 1px solid var(--line); }
.class-remove-form { padding: 0 16px 16px; }
.empty-state.compact { margin: 18px; }
.empty-state.compact strong, .empty-state.compact small { display: block; }
.empty-state.compact small { margin-top: 4px; }
.school-entity-list { display: grid; padding: 0 16px 8px; }
.subject-list { max-height: 520px; overflow-y: auto; }
.school-entity-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.school-entity-list article.inactive { opacity: .55; }
.school-entity-list article > span { min-width: 0; }
.school-entity-list strong, .school-entity-list small { display: block; }
.school-entity-list strong { overflow: hidden; color: var(--navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.school-entity-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.school-entity-editor > summary { list-style: none; cursor: pointer; }
.school-entity-editor > summary::-webkit-details-marker { display: none; }
.school-entity-editor[open] { grid-column: 1 / -1; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.school-entity-editor[open] > summary { display: none; }
.school-entity-editor form { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: end; }
.school-entity-editor label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.school-entity-editor input { min-width: 0; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--field-bg); }
.school-create-form { border-top: 1px solid var(--line); }
.school-create-form h3 { margin: 0; color: var(--navy); font-size: 13px; }

.login-page { display: flex; min-height: 100vh; flex-direction: column; background: #f3f7f7; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); width: min(1040px, calc(100% - 40px)); min-height: 620px; margin: 5vh auto; overflow: hidden; border: 1px solid #dbe4e6; border-radius: 18px; background: white; box-shadow: 0 24px 70px rgba(20, 45, 60, .12); }
.login-intro { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 45px; overflow: hidden; color: white; background: #0b3242; }
.login-intro::after { position: absolute; right: -120px; bottom: -150px; width: 420px; height: 420px; border: 90px solid rgba(23, 173, 146, .16); border-radius: 50%; content: ""; }
.brand-login { position: relative; z-index: 1; height: auto; padding: 0; color: white; }
.brand-login > span:last-child { max-width: 360px; }
.brand-login strong { font-size: 21px; letter-spacing: -.01em; }
.brand-login small { line-height: 1.35; }
.brand-login small { color: #a9c5cd; }
.login-copy { position: relative; z-index: 1; max-width: 520px; }
.login-copy h1 { margin: 0; font-size: clamp(34px, 5vw, 57px); line-height: 1.05; letter-spacing: -.045em; }
.login-copy p { max-width: 500px; margin: 20px 0 0; color: #bed1d6; font-size: 16px; line-height: 1.7; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 55px; }
.login-card h2 { margin: 0; color: var(--navy); font-size: 29px; letter-spacing: -.035em; }
.login-card > div > p { margin: 6px 0 28px; color: var(--muted); }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 10px; }
.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.login-remember { align-items: flex-start; color: var(--muted); font-size: 10px !important; line-height: 1.45; }
.login-remember input { margin-top: 2px; }
.google-login { justify-content: center; color: #26354a; border: 1px solid #cfd8e3; background: white; }
.google-login:hover { border-color: #aebdce; background: #f8fafc; }
.google-login:disabled { color: #7b8798; border-color: #d8dee7; background: #f3f5f8; cursor: not-allowed; opacity: .8; }
.google-mark { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #4285f4; background: white; font-size: 14px; font-weight: 800; }
.google-login-help { display: block; margin-top: 10px; color: var(--muted); font-size: 9px; line-height: 1.5; text-align: center; }
.google-login-pending { color: #9a6400; }
.demo-accounts { display: grid; gap: 4px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.demo-accounts strong { color: var(--navy); }
.demo-accounts code { padding: 2px 4px; border-radius: 3px; color: #36506d; background: var(--soft); }
.sidebar-scrim { display: none; }

@media (max-width: 1180px) {
    :root { --sidebar: 210px; }
    .content { padding: 22px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .request-form { grid-template-columns: minmax(0, 1fr) 270px; }
    .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-filters { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
    .bulk-class-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 900px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; left: 0; transform: translateX(-102%); width: 250px; transition: transform .22s ease; box-shadow: 20px 0 50px rgba(10,30,50,.14); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(9,23,43,.35); }
    body.sidebar-open .sidebar-scrim { display: block; }
    .mobile-menu { display: grid; }
    .topbar { padding: 0 18px; }
    .global-search { width: min(440px, 55vw); }
    .school-year { display: none; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workflow-board, .kanban { grid-template-columns: 1fr; }
    .workflow-column { min-height: 0; }
    .request-form, .detail-grid, .settings-layout, .settings-two-columns, .school-settings-grid, .operational-settings-grid, .email-template-grid { grid-template-columns: 1fr; }
    .request-summary { position: static; }
    .settings-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .readonly-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reports-grid { grid-template-columns: 1fr; }
    .legacy-report-grid { grid-template-columns: 1fr; }
    .report-filters { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 640px) {
    html, body, .app-shell, .app-main, .topbar, .content { width: 100%; max-width: 100%; min-width: 0; }
    .app-main { overflow: hidden; }
    .content { padding: 18px 14px 40px; }
    body { font-size: 16px; }
    .topbar { height: 64px; gap: 8px; padding: 0 12px; }
    .global-search { flex: 1 1 0; width: 0; max-width: calc(100% - 44px); height: 42px; padding: 0 10px; }
    .global-search input { font-size: 14px; }
    .topbar-actions { display: flex; gap: 0; }
    .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 20px; }
    .page-heading .button { width: 100%; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .workflow-stats { grid-template-columns: 1fr; }
    .stat { min-height: 94px; overflow: hidden; gap: 10px; padding: 13px; }
    .stat small { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
    .stat-icon { width: 39px; height: 39px; }
    .stat-icon .icon { width: 19px; height: 19px; }
    .stat strong { font-size: 22px; }
    .stat em { display: none; }
    .dashboard-rail { grid-template-columns: 1fr; }
    .dashboard-grid, .workflow-board, .workflow-column, .request-card-list, .request-card { width: 100%; max-width: 100%; min-width: 0; }
    .request-card-top > * { min-width: 0; }
    .request-card-top time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .request-card-top a, .request-card-top time { font-size: 13px; }
    .request-card h3 { font-size: 16px; }
    .request-card p, .request-metrics { font-size: 14px; }
    .request-stage-times { gap: 6px; padding: 10px; }
    .request-stage-times small, .request-stage-times time { font-size: 12px; }
    .request-card-compact { padding: 12px; }
    .compact-status { font-size: 12px; }
    .compact-request-main h3 { font-size: 15px; }
    .compact-request-main p, .compact-request-main > strong, .compact-request-totals { font-size: 12px; }
    .compact-stage-times small { font-size: 10px; }
    .compact-stage-times time { font-size: 11px; }
    .tags span, .detail-tags span { font-size: 12px; }
    .request-file-actions a, .column-link { min-height: 40px; font-size: 13px; }
    .activity-list strong { font-size: 14px; }
    .activity-list small { font-size: 13px; }
    .activity-list time { font-size: 12px; }
    .form-section { padding: 17px; }
    .request-wizard-overlay { padding: 0; place-items: stretch; }
    .request-wizard { width: 100%; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
    .wizard-header { padding: 18px 18px 14px; }
    .wizard-header h1 { font-size: 21px; }
    .wizard-header p { max-width: 270px; font-size: 12px; line-height: 1.4; }
    .wizard-progress { padding: 0 14px 14px; }
    .wizard-progress small { display: none; }
    .wizard-body { padding: 22px 16px; }
    .wizard-step { gap: 16px; }
    .pdf-dropzone { min-height: 210px; padding: 22px 16px; }
    .pdf-dropzone span { width: 100%; font-size: 13px; }
    .wizard-footer { min-height: 72px; padding: 12px 14px; }
    .wizard-footer > span { display: none; }
    .wizard-footer .button { min-width: 0; flex: 1; }
    .request-wizard .request-summary { padding: 18px; }
    .notification-panel { position: fixed; top: 66px; right: 12px; left: 12px; width: auto; }
    .notification-panel > footer { align-items: stretch; flex-direction: column; }
    .notification-clear-button { width: 100%; padding: 8px; border-radius: 7px; background: rgba(167, 47, 59, .08); }
    .field, .field-label, .stack-form label { font-size: 14px; }
    input, select, textarea { min-height: 46px; font-size: 16px; }
    .button { min-height: 44px; font-size: 14px; }
    .button.small { min-height: 38px; font-size: 13px; }
    .choice > span { font-size: 14px; }
    .choice small, .form-section header p, .help { font-size: 12px; }
    .destination-student-count strong, .quantity-destination-context strong, .student-request-option strong { font-size: 13px; }
    .destination-student-count small, .quantity-destination-context small, .student-request-option small { font-size: 11px; }
    th { font-size: 12px; }
    td { font-size: 14px; }
    td strong { font-size: 14px; }
    td small, .table-secondary { font-size: 12px; }
    .status-badge { font-size: 12px; }
    .form-row, .form-row.three, .choice-grid { grid-template-columns: 1fr; }
    .target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .choice > span { min-height: 58px; }
    .tags .tag-kind { margin-left: 0; }
    .table-toolbar { align-items: stretch; flex-direction: column; }
    .report-filters { grid-template-columns: 1fr 1fr; }
    .format-stats { grid-template-columns: 1fr; }
    .format-stat { grid-template-columns: auto 1fr 1fr; gap: 12px; padding: 14px; }
    .format-stat > span { width: 44px; height: 44px; font-size: 15px; }
    .format-stat strong { font-size: 17px; }
    .stacked-bar-row { grid-template-columns: minmax(80px, 1fr) minmax(90px, auto); }
    .stacked-bar-row > small { display: none; }
    .report-filter-actions { grid-column: 1 / -1; }
    .report-filter-actions .button { flex: 1; }
    .report-line-chart { height: 170px; padding: 12px; }
    .annual-totals { width: 100%; justify-content: space-between; text-align: left; }
    .annual-totals strong { font-size: 14px; }
    .report-detail-hero { align-items: stretch; flex-direction: column; }
    .report-detail-totals { justify-content: space-between; text-align: left; }
    .report-detail-avatar, .report-detail-icon { width: 56px; height: 56px; }
    .local-search { width: 100%; }
    .status-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
    .status-filters a { white-space: nowrap; }
    .detail-list { grid-template-columns: 1fr; }
    .document-actions { width: 100%; }
    .document-actions .button { flex: 1; }
    .document-preview { margin: 0 12px 12px; }
    .document-preview header { align-items: flex-start; flex-direction: column; }
    .document-preview iframe { height: 68vh; min-height: 430px; }
    .donut-layout { grid-template-columns: 1fr; justify-items: center; }
    .legend { width: 100%; }
    .settings-tabs { overflow-x: auto; }
    .kanban-card-actions { gap: 8px; }
    .quick-action button, .quick-action-delete { min-height: 42px; font-size: 12px; }
    .kanban-pagination a, .kanban-pagination strong { min-height: 40px; font-size: 12px; }
    .confirmation-modal-card { padding: 20px; }
    .confirmation-modal-card form { align-items: stretch; flex-direction: column-reverse; }
    .confirmation-modal-card form .button { width: 100%; }
    .confirmation-modal-actions { align-items: stretch; flex-direction: column-reverse; }
    .confirmation-modal-actions .button { width: 100%; }
    .backup-settings-grid, .backup-restore-card .backup-card-body { grid-template-columns: 1fr; }
    .backup-upload-form { padding-top: 16px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
    .backup-action-buttons { align-items: stretch; flex-direction: column; }
    .backup-action-buttons .button, .backup-action-buttons form { width: 100%; }
    .stored-backup-list article { grid-template-columns: auto minmax(0, 1fr); }
    .stored-backup-list article form { grid-column: span 1; }
    .stored-backup-list article form .button { width: 100%; }
    .settings-tabs a { white-space: nowrap; }
    .teacher-table, .teacher-table tbody { display: block; width: 100%; }
    .teacher-table thead { display: none; }
    .teacher-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
    .teacher-table td { display: grid; min-width: 0; padding: 8px 0; border: 0; white-space: normal; }
    .teacher-table td::before { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; content: attr(data-label); }
    .teacher-table .teacher-name-cell { display: block; grid-column: 1 / -1; padding: 0 0 11px; border-bottom: 1px solid var(--line); }
    .teacher-table .teacher-name-cell::before, .teacher-table .user-actions::before { display: none; }
    .teacher-table .teacher-identity strong { font-size: 15px; white-space: normal; }
    .teacher-table .teacher-avatar { width: 46px; height: 46px; font-size: 15px; }
    .teacher-table td.user-actions { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); background: transparent; box-shadow: none; }
    .teacher-table .user-actions form, .teacher-table .user-actions .button { width: 100%; }
    .teacher-table .user-actions > .button:only-child { grid-column: 1 / -1; }
    .teacher-table code { overflow-wrap: anywhere; white-space: normal; }
    .teacher-settings .responsive-table { overflow: visible; }
    .email-template-settings .panel-heading { align-items: stretch; flex-direction: column; }
    .template-placeholders { max-width: none; justify-content: flex-start; }
    .operational-settings-actions, .cleanup-panel { align-items: stretch; flex-direction: column; }
    .mail-test-form { align-items: stretch; flex-direction: column; }
    .mail-test-form input { min-width: 0; width: 100%; }
    .operational-settings-actions .button, .cleanup-panel .button { width: 100%; }
    .settings-menu { grid-template-columns: 1fr; }
    .school-year-toolbar { align-items: stretch; flex-direction: column; }
    .school-year-toolbar form label { align-items: stretch; flex-direction: column; }
    .bulk-class-grid, .readonly-subjects { grid-template-columns: 1fr; }
    .bulk-class-grid label { grid-template-columns: 1fr 76px auto; }
    .bulk-class-grid input { width: 76px; }
    .bulk-class-actions { align-items: stretch; flex-direction: column; }
    .bulk-class-actions .button { width: 100%; }
    .simple-list { grid-template-columns: 1fr; }
    .curriculum-heading { align-items: flex-start; flex-direction: column; }
    .curriculum-subjects { grid-template-columns: 1fr; max-height: none; }
    .curriculum-subjects strong { font-size: 14px; }
    .curriculum-subjects small { font-size: 12px; }
    .curriculum-actions .button { width: 100%; }
    .option-form { grid-template-columns: 1fr; }
    .school-entity-list article { grid-template-columns: minmax(0, 1fr) auto; }
    .school-entity-list article > form { grid-column: 2; }
    .school-entity-editor[open] { grid-column: 1 / -1; }
    .school-entity-editor form { grid-template-columns: 1fr; }
    .login-shell { display: block; width: min(100% - 24px, 480px); min-height: 0; margin: 12px auto; }
    .login-intro { min-height: 280px; padding: 28px; }
    .login-copy h1 { font-size: 35px; }
    .login-copy p { font-size: 13px; }
    .login-card { padding: 30px 25px 36px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

html[data-theme="dark"] {
    --navy: #eef6ff;
    --text: #dbe7f3;
    --muted: #91a2b7;
    --line: #2a3a4d;
    --soft: #172536;
    --teal: #20bfa5;
    --teal-dark: #5ee1ca;
    --teal-soft: #123d3a;
    --blue: #67a7ff;
    --blue-soft: #172f50;
    --amber: #f5ad2f;
    --amber-soft: #483415;
    --green: #64d77d;
    --green-soft: #173b27;
    --red: #ff7b87;
    --red-soft: #47242b;
    --violet: #b69aff;
    --violet-soft: #30294a;
    --shadow: 0 10px 30px rgba(0, 0, 0, .22);
    --page: #0c1420;
    --surface: #121e2c;
    --surface-raised: #172536;
    --sidebar-bg: #0f1926;
    --topbar-bg: rgba(12, 20, 32, .94);
    --field-bg: #101c2a;
    color-scheme: dark;
}
html[data-theme="dark"] .theme-sun { display: none; }
html[data-theme="dark"] .theme-moon { display: inline; }
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .workflow-column,
html[data-theme="dark"] .kanban-column,
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .settings-menu,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .compact-editor > form,
html[data-theme="dark"] .simple-list span {
    background: var(--surface);
}
html[data-theme="dark"] .form-section { background: var(--surface); }
html[data-theme="dark"] .button.secondary { color: var(--text); border-color: var(--line); background: var(--surface-raised); }
html[data-theme="dark"] .button.secondary:hover { background: #203247; }
html[data-theme="dark"] .notification-panel { background: var(--surface); box-shadow: 0 22px 60px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .notification-item.unread { background: #102a2b; }
html[data-theme="dark"] .notification-item:hover { background: var(--surface-raised); }
html[data-theme="dark"] .notification-badge { color: #062c27; border-color: var(--surface); }
html[data-theme="dark"] .segmented { background: var(--surface-raised); }
html[data-theme="dark"] .segmented span { color: #b9c9dc; }
html[data-theme="dark"] .segmented input:checked + span { color: #062c27; background: var(--teal); box-shadow: none; }
html[data-theme="dark"] .request-wizard { background: #0e1a29; }
html[data-theme="dark"] .wizard-progress button > span { background: #0e1a29; }
html[data-theme="dark"] .wizard-progress button.active > span,
html[data-theme="dark"] .wizard-progress button.complete > span { background: var(--teal); }
html[data-theme="dark"] .wizard-footer { background: #111f30; }
html[data-theme="dark"] .pdf-dropzone { border-color: #395069; background: #132235; }
html[data-theme="dark"] .pdf-dropzone:hover,
html[data-theme="dark"] .pdf-dropzone:focus-within,
html[data-theme="dark"] .pdf-dropzone.drag-active { border-color: var(--teal); background: var(--teal-soft); }
html[data-theme="dark"] .pdf-dropzone.invalid { border-color: var(--red); background: var(--red-soft); }
html[data-theme="dark"] .wizard-callout { color: var(--text); }
html[data-theme="dark"] .student-request-option { color: #a9eadf; border-color: #245d55; background: #12302e; }
html[data-theme="dark"] .student-request-option strong { color: #c4fff4; }
html[data-theme="dark"] .student-request-option small { color: #a9cfc8; }
html[data-theme="dark"] .destination-student-count,
html[data-theme="dark"] .quantity-destination-context { color: #a9eadf; border-color: #245d55; background: #12302e; }
html[data-theme="dark"] .destination-student-count strong,
html[data-theme="dark"] .quantity-destination-context strong { color: #c4fff4; }
html[data-theme="dark"] .destination-student-count small,
html[data-theme="dark"] .quantity-destination-context small { color: #a9cfc8; }
html[data-theme="dark"] .global-search,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    color: var(--text);
    border-color: var(--line);
    background: var(--field-bg);
}
html[data-theme="dark"] .global-search input,
html[data-theme="dark"] .local-search input {
    border: 0;
    background: transparent;
    box-shadow: none;
}
html[data-theme="dark"] .main-nav a { color: #a7b7ca; }
html[data-theme="dark"] .main-nav a:hover,
html[data-theme="dark"] .main-nav a.active { color: var(--teal-dark); background: #15332f; }
html[data-theme="dark"] .stat small,
html[data-theme="dark"] .request-metrics,
html[data-theme="dark"] td,
html[data-theme="dark"] .note p,
html[data-theme="dark"] .timeline p,
html[data-theme="dark"] .legend span,
html[data-theme="dark"] .bar-list span,
html[data-theme="dark"] .settings-menu a,
html[data-theme="dark"] .compact-editor label,
html[data-theme="dark"] .field,
html[data-theme="dark"] .field-label,
html[data-theme="dark"] .stack-form label,
html[data-theme="dark"] .check-grid label {
    color: #aebdd0;
}
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .inline-create,
html[data-theme="dark"] .choice > span,
html[data-theme="dark"] .upload-zone,
html[data-theme="dark"] .request-summary,
html[data-theme="dark"] .responsive-table,
html[data-theme="dark"] .table-toolbar {
    background: var(--surface);
}
html[data-theme="dark"] .document-preview header { background: var(--surface-raised); }
html[data-theme="dark"] .tags span,
html[data-theme="dark"] .detail-tags span,
html[data-theme="dark"] code {
    color: #b9c9dc;
    border-color: #34465b;
    background: #18283a;
}
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .catalog-list article,
html[data-theme="dark"] .attribute-card,
html[data-theme="dark"] .activity-list li {
    border-color: var(--line);
}
html[data-theme="dark"] .teacher-table th:last-child { background: var(--surface-raised); }
html[data-theme="dark"] .donut-chart circle:last-of-type { fill: var(--surface); }
html[data-theme="dark"] .donut-chart text { fill: var(--text); }
html[data-theme="dark"] .mini-chart line { stroke: #2d4054; }
html[data-theme="dark"] .report-line-chart line { stroke: #2d4054; }
html[data-theme="dark"] .report-jumps a,
html[data-theme="dark"] .quota-meter { background: var(--field-bg); }
html[data-theme="dark"] .quota-meter em { color: var(--text); }
html[data-theme="dark"] .archive-notice { color: #f4cf83; border-color: #60481e; background: #332713; }
html[data-theme="dark"] .archive-notice strong { color: #ffe0a3; }
html[data-theme="dark"] .setup-notice { color: #a9eadf; border-color: #245d55; background: #12302e; }
html[data-theme="dark"] .setup-notice strong { color: #c4fff4; }
html[data-theme="dark"] .retention-summary span,
html[data-theme="dark"] .operational-settings-actions { background: var(--surface-raised); }
html[data-theme="dark"] .email-template-grid label { color: #aebdd0; }
html[data-theme="dark"] .google-login { color: var(--text); border-color: var(--line); background: var(--surface-raised); }
html[data-theme="dark"] .google-login:hover { background: #203247; }
html[data-theme="dark"] .quick-action-delete { color: #ffb4ae; background: #3b2024; }
html[data-theme="dark"] .confirmation-modal-icon { color: #ffb4ae; background: #482126; }
html[data-theme="dark"] .login-page { background: var(--page); }
