@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #1b2923;
  --muted: #6f7d75;
  --line: #dce5de;
  --paper: #f4f7f3;
  --white: #ffffff;
  --green: #176b4a;
  --green-dark: #104d37;
  --mint: #e2f2e8;
  --gold: #c78b2b;
  --red: #b94d44;
  --shadow: 0 16px 42px rgba(27, 55, 39, .08);
}
body.theme-dark {
  color-scheme: dark;
  --ink: #e8f0ea;
  --muted: #a7b7ac;
  --line: #394a3f;
  --paper: #111a14;
  --white: #1b2820;
  --green: #80cba1;
  --green-dark: #b5e2c6;
  --mint: #294334;
  --shadow: 0 16px 42px rgba(0, 0, 0, .24);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 'DM Sans', sans-serif; }
body.theme-dark label, body.theme-dark .material-group legend { color: #d7e4da; }
body.theme-dark input, body.theme-dark select, body.theme-dark textarea { background: #17231b; color: var(--ink); border-color: var(--line); }
body.theme-dark .currency-input, body.theme-dark .offering-grid, body.theme-dark .edit-form { background: #17231b; border-color: var(--line); }
body.theme-dark .button.secondary { background: #293b30; color: var(--ink); }
body.theme-dark .button.secondary:hover { background: #344a3a; }
body.theme-dark .flash { background: #203a2b; border-color: #355a42; color: #c3e7cf; }
body.theme-dark .flash.error { background: #422a28; border-color: #70403a; color: #ffd0c6; }
body.theme-dark .badge.absent { background: #49322d; color: #ffd1bd; }
body.theme-dark .badge.justified { background: #493f26; color: #f3dfa2; }
body.density-compact .main { padding-top: 24px; padding-bottom: 32px; }
body.density-compact .panel { padding: 15px; margin-bottom: 11px; }
body.density-compact .stat { padding: 13px 15px; }
body.density-compact td { padding-top: 8px; padding-bottom: 8px; }
body.density-compact th { padding-top: 7px; padding-bottom: 7px; }
body.density-compact .nav-link { padding-top: 8px; padding-bottom: 8px; }
body.font-small { zoom: .9; }
body.font-large { zoom: 1.1; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 72px minmax(0, 1fr); transition: grid-template-columns .2s ease; }
.app-shell:has(> .sidebar:hover), .app-shell:has(> .sidebar:focus-within) { grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 5; width: 100%; height: 100vh; overflow: hidden; background: #173d2e; color: #f4fbf6; padding: 27px 12px; display: flex; flex-direction: column; transition: width .2s ease, box-shadow .2s ease; }
.sidebar:hover, .sidebar:focus-within { width: 100%; box-shadow: 10px 0 24px rgba(27, 55, 39, .16); }
.brand { display: flex; align-items: center; justify-content: center; gap: 0; padding: 2px 3px 30px; }
.brand-mark { display: block; flex: 0 0 auto; width: 42px; height: 36px; border-radius: 0; background: url("ebd-logo.png") center / contain no-repeat; color: transparent; font-size: 0; }
.brand > span:last-child, .nav-label { display: none; }
.brand-title, .brand-subtitle { white-space: nowrap; }
.sidebar:hover .brand, .sidebar:focus-within .brand { justify-content: flex-start; gap: 12px; padding-right: 10px; padding-left: 10px; }
.sidebar:hover .brand-mark, .sidebar:focus-within .brand-mark { width: 62px; height: 42px; }
.sidebar:hover .brand > span:last-child, .sidebar:focus-within .brand > span:last-child { display: block; }
.sidebar:hover .nav-label, .sidebar:focus-within .nav-label { display: block; }
.mobile-settings-link { display: none; }
.mobile-menu-toggle { display: none; }
.sidebar-close-toggle { display: none; }
.brand-title { font: 800 15px 'Manrope', sans-serif; letter-spacing: .3px; }
.brand-subtitle { color: #b8d1c1; font-size: 11px; margin-top: 2px; }
.sidebar-account { display: flex; align-items: center; justify-content: center; min-height: 58px; margin-bottom: 18px; padding: 10px 0; border-top: 1px solid rgba(230, 247, 236, .15); border-bottom: 1px solid rgba(230, 247, 236, .15); }
.sidebar-account .account-details { display: none; min-width: 0; }
.sidebar:hover .sidebar-account, .sidebar:focus-within .sidebar-account { justify-content: flex-start; padding-right: 8px; padding-left: 8px; }
.sidebar:hover .sidebar-account .account-details, .sidebar:focus-within .sidebar-account .account-details { display: block; }
.nav-label { color: #9fbdab; text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 0 12px 9px; }
.nav-list { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; justify-content: center; gap: 0; color: #d4e5da; padding: 12px 8px; border-radius: 8px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.nav-text { display: none; }
.sidebar:hover .nav-link, .sidebar:focus-within .nav-link { justify-content: flex-start; gap: 11px; padding-right: 12px; padding-left: 12px; }
.sidebar:hover .nav-text, .sidebar:focus-within .nav-text { display: inline; }
.nav-link:hover, .nav-link.active { background: #285640; color: white; }
.sidebar-logout-form { margin: 0; }
.sidebar-logout-form .nav-link { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.sidebar-logout-form .nav-link:hover, .sidebar-logout-form .nav-link:focus-visible { background: #285640; color: white; }
.nav-icon { width: 28px; flex: 0 0 28px; text-align: center; font-size: 22px; line-height: 1; }
.topline-actions { display: flex; align-items: center; gap: 14px; }
.user-mini { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; background: #d9a94f; color: #183b2c; border-radius: 50%; font-weight: 800; font-size: 12px; }
.profile-avatar { object-fit: cover; }
.user-name { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.user-role { font-size: 11px; color: #b8d1c1; }
.logout { color: #b8d1c1; font-size: 12px; }
.main { min-width: 0; padding: 36px clamp(20px, 4vw, 64px) 56px; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 800 clamp(25px, 3vw, 34px)/1.15 'Manrope', sans-serif; margin: 6px 0 5px; }
.subtitle { color: var(--muted); margin: 0; }
h2 { font: 800 18px 'Manrope', sans-serif; margin-bottom: 5px; }
h3 { font: 700 14px 'Manrope', sans-serif; margin-bottom: 13px; }
.date-chip { border: 1px solid var(--line); border-radius: 8px; background: var(--white); padding: 9px 13px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 25px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-number { font: 800 28px 'Manrope', sans-serif; margin-top: 8px; }
.stat-detail { color: var(--green); font-size: 11px; margin-top: 1px; }
.money-number { font-size: 22px; }
.report-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; align-items: end; }
.report-filters label { display: grid; gap: 6px; }
.people-search-form { display: grid; gap: 6px; max-width: 520px; margin-bottom: 16px; }
.people-search-controls { display: flex; align-items: center; gap: 8px; }
.people-search-controls input { min-width: 0; flex: 1; }
.report-footnote { margin-top: 14px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); gap: 18px; align-items: start; }
.report-subsection { min-width: 0; }
.management-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.manage-record { border-top: 1px solid var(--line); padding: 13px 0; }
.manage-record > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; white-space: normal; }
.manage-record > summary span { color: var(--muted); font-size: 12px; font-weight: 500; text-align: right; }
.manage-record-body { display: grid; gap: 12px; margin-top: 12px; }
.manage-record-body > form { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.manage-record-body > form .button { justify-self: start; }
.age-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.people-create-only .profile-settings > form:not(.settings-form) { display: none; }
input[type="range"] { padding: 0; accent-color: var(--green); }
output { color: var(--green); font-size: 11px; font-weight: 700; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 21px; margin-bottom: 17px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.panel-note { color: var(--muted); font-size: 12px; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field[hidden] { display: none !important; }
.field.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 700; color: #39483f; }
input, select, textarea { width: 100%; border: 1px solid #d4ded7; background: #fff; color: var(--ink); border-radius: 6px; padding: 10px 11px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 74, .12); }
textarea { min-height: 74px; resize: vertical; }
select[multiple] { min-height: 160px; }
.hint { color: var(--muted); font-size: 11px; margin-top: -2px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 6px; background: var(--green); color: white; padding: 10px 15px; font-size: 12px; font-weight: 700; cursor: pointer; }
.button:hover { background: var(--green-dark); }
.button.secondary { color: var(--ink); background: #edf2ee; }
.button.secondary:hover { background: #e0e9e2; }
.confirm-dialog { width: min(420px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); box-shadow: 0 24px 70px rgba(15, 39, 25, .22); }
.confirm-dialog::backdrop { background: rgba(16, 34, 24, .48); backdrop-filter: blur(3px); }
.confirm-dialog-form { padding: 24px; }
.confirm-dialog-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.confirm-dialog-header h2 { margin: 0; font: 800 17px/1.3 'Manrope', sans-serif; }
.confirm-dialog-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #fbf2df; color: #a66d15; }
.confirm-dialog-icon svg { width: 21px; height: 21px; fill: currentColor; }
.confirm-dialog-message { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
body.theme-dark .confirm-dialog-icon { background: #493f26; color: #f3dfa2; }
body.theme-dark .confirm-dialog-actions .button.secondary { background: #293b30; color: var(--ink); }
.button-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 17px; }
.table-wrap { overflow-x: auto; }
.table-wrap:has(> table > tbody > tr:nth-child(n + 11)) { max-height: min(70vh, 640px); overflow: auto; overscroll-behavior: contain; }
.table-wrap:has(> table > tbody > tr:nth-child(n + 11)) thead th { position: sticky; top: 0; z-index: 1; background: var(--white); }
.scroll-list:has(> .manage-record:nth-of-type(n + 11)) { max-height: min(70vh, 640px); overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { font-size: 12px; padding: 12px 9px; border-bottom: 1px solid #edf1ed; vertical-align: middle; }
tfoot { background: #eaf3ec; }
tfoot th, tfoot td { color: var(--green-dark); font-weight: 800; border-top: 2px solid #b6cfbd; }
body.theme-dark tfoot { background: #253a2d; }
body.theme-dark tfoot th, body.theme-dark tfoot td { color: var(--ink); border-top-color: #476653; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 4px 9px; background: var(--mint); color: var(--green-dark); font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge.absent { background: #fff0e9; color: #9e4e27; }
.badge.justified { background: #fff5d9; color: #8c681e; }
.birthday-row td { background: rgba(199, 139, 43, .08); animation: birthday-row-arrive .5s ease-out both; }
.birthday-row:nth-child(2) td { animation-delay: .06s; }
.birthday-row:nth-child(3) td { animation-delay: .12s; }
.birthday-row:nth-child(4) td { animation-delay: .18s; }
.birthday-row:nth-child(5) td { animation-delay: .24s; }
.birthday-badge, .attendance-birthday-badge { display: inline-flex; align-items: center; border-radius: 99px; padding: 3px 8px; background: #fff1cd; color: #805a16; font-size: 10px; font-weight: 800; white-space: nowrap; }
.birthday-row .birthday-badge { animation: birthday-badge-pop .65s cubic-bezier(.2, .8, .2, 1) both; }
.birthday-tab-celebrating { animation: birthday-tab-celebrate 1.8s ease-in-out 2; }
.attendance-birthday-badge { margin-top: 3px; }
body.theme-dark .birthday-badge, body.theme-dark .attendance-birthday-badge { background: #493f26; color: #f3dfa2; }
@keyframes birthday-row-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes birthday-badge-pop {
  0% { opacity: 0; transform: scale(.85); }
  65% { opacity: 1; transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes birthday-tab-celebrate {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 4px rgba(199, 139, 43, .2); }
}
@media (prefers-reduced-motion: reduce) {
  .birthday-row td, .birthday-row .birthday-badge, .birthday-tab-celebrating { animation: none; }
}
.empty { padding: 25px 15px; text-align: center; color: var(--muted); font-size: 13px; }
.flash { padding: 12px 15px; border-radius: 7px; margin-bottom: 18px; font-size: 13px; border: 1px solid #b9dfc8; background: #e8f6ed; color: #20593d; }
.flash.error { border-color: #f0c7bf; background: #fff0ed; color: #984237; }
.attendance-locked { border-left: 4px solid var(--gold); }
.attendance-locked p { max-width: 720px; color: var(--muted); }
.attendance-warning { width: min(440px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.attendance-warning::backdrop { background: rgba(15, 28, 20, .58); }
.attendance-warning h2 { margin-bottom: 8px; }
.attendance-warning p { color: var(--muted); font-size: 13px; }
.attendance-warning form { display: inline-block; margin: 0 0 0 7px; }
.roster { display: grid; border: 1px solid var(--line); border-radius: 6px; }
.roster:has(> .roster-row:nth-child(n + 11)) { max-height: min(62vh, 500px); overflow-y: auto; overscroll-behavior: contain; }
.roster-row { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.5fr); align-items: center; gap: 10px 16px; padding: 8px 11px; border-bottom: 1px solid var(--line); }
.roster-row:last-child { border-bottom: 0; }
.student-name { font-weight: 700; font-size: 13px; }
.student-name.birthday-student { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px 7px; }
.student-email { color: var(--muted); font-size: 11px; }
.student-attendance { display: grid; min-width: 0; gap: 5px; }
.attendance-flags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.attendance-item { display: grid; align-content: start; justify-items: start; gap: 3px; min-width: 0; margin: 0; padding: 0; border: 0; }
.attendance-item legend { float: left; width: 100%; padding: 0; }
.attendance-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.switch-control { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 23px; cursor: pointer; user-select: none; }
.switch-control input[type="checkbox"] { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.switch-track { position: relative; display: inline-block; flex: 0 0 34px; width: 34px; height: 19px; border-radius: 99px; background: #bdc9c0; transition: background .16s ease; }
.switch-track::after { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; content: ""; transition: transform .16s ease; }
.switch-control input:checked + .switch-track { background: var(--green); }
.switch-control input:checked + .switch-track::after { transform: translateX(15px); }
.switch-control input:focus-visible + .switch-track { outline: 3px solid rgba(23, 107, 74, .25); outline-offset: 2px; }
.switch-value { color: var(--muted); font-size: 10px; line-height: 1.2; white-space: nowrap; }
.switch-value::before { content: attr(data-off-label); }
.switch-control input:checked ~ .switch-value { color: var(--green); font-weight: 700; }
.switch-control input:checked ~ .switch-value::before { content: attr(data-on-label); }
.attendance-extra { display: grid; grid-template-columns: auto minmax(120px, 1fr); align-items: center; gap: 8px; }
.attendance-extra > input { min-width: 0; padding: 6px 9px; font-size: 11px; }
.justified-control { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 10px; }
.justified-control input { width: auto; margin: 0; accent-color: var(--gold); }
.material-group:disabled { opacity: .5; }
details { min-width: 120px; }
details summary { color: var(--green); font-weight: 700; cursor: pointer; white-space: nowrap; }
.profile-settings { margin-bottom: 10px; }
.gear-trigger { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; background: var(--white); font-size: 11px; }
.gear-trigger span { font-size: 16px; line-height: 1; }
.settings-form { min-width: 250px; max-width: 330px; }
.personal-settings-form { display: grid; gap: 14px; max-width: 430px; }
.personal-settings-form label { display: grid; gap: 6px; }
.personal-settings-form .check-field { display: flex; align-items: center; gap: 8px; }
.personal-settings-form .check-field input { width: auto; }
.profile-photo-current { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; font-weight: 700; }
.profile-photo-preview { width: 56px; height: 56px; }
.profile-photo-form { display: grid; gap: 12px; }
.profile-photo-form label { display: grid; gap: 6px; }
.profile-photo-form .button, .profile-photo-remove-form .button { justify-self: start; }
.profile-photo-remove-form { margin-top: 10px; }
.password-change-panel { max-width: 620px; }
.password-change-form { display: grid; gap: 14px; max-width: 460px; }
.password-change-form label { display: grid; gap: 6px; }
.password-change-form .button { justify-self: start; }
.edit-form, .delete-form { display: grid; gap: 10px; min-width: 220px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfdfb; }
.edit-form label { display: grid; gap: 5px; }
.edit-form input, .edit-form select { min-width: 0; }
.edit-form select[multiple] { min-height: 110px; }
.edit-form .check-field { display: flex; align-items: center; gap: 8px; }
.edit-form .check-field input { width: auto; }
.notification-panel .attendance-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; }
.button.danger { background: #a7443d; }
.button.danger:hover { background: #853630; }
.delete-form { padding: 0; border: 0; background: transparent; }
.offering-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 15px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 7px; background: #f8fbf8; }
.currency-field { display: grid; gap: 7px; }
.currency-input { display: flex; align-items: center; gap: 8px; border: 1px solid #d4ded7; border-radius: 6px; background: white; padding-left: 11px; color: var(--muted); font-size: 12px; }
.currency-input input { border: 0; box-shadow: none; }
.currency-input input:focus { box-shadow: none; }
.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 8px; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; transform: translateY(-50%); border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible { background: var(--mint); color: var(--green-dark); }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.password-toggle .password-eye-hidden, .password-toggle[aria-pressed="true"] .password-eye-visible { display: none; }
.password-toggle[aria-pressed="true"] .password-eye-hidden { display: block; }
.student-identity { min-width: 0; overflow-wrap: anywhere; }
.attendance-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.attendance-form select { width: auto; min-width: 130px; padding: 8px; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); background: #f3f6f1; }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(30px, 7vw, 88px); background: #173d2e; color: white; }
.login-art:before { content: ''; position: absolute; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; right: -100px; top: 18%; box-shadow: 0 0 0 48px rgba(255,255,255,.035), 0 0 0 96px rgba(255,255,255,.025); }
.login-art > * { position: relative; z-index: 1; }
.login-art h1 { max-width: 580px; font-size: clamp(38px, 5.5vw, 68px); margin: 20px 0; }
.login-art p { max-width: 440px; color: #c6d9cd; font-size: 15px; }
.login-meta { color: #b8d1c1; font-size: 11px; }
.login-side { display: grid; place-items: center; padding: 28px; }
.login-box { width: min(100%, 410px); }
.login-box h2 { font-size: 25px; margin: 10px 0 6px; }
.login-box .panel { padding: 29px; box-shadow: var(--shadow); }
.login-box .field { margin-top: 16px; }
.login-box .button { width: 100%; margin-top: 21px; padding: 12px; }
.setup-caption { color: var(--muted); font-size: 12px; margin-top: 18px; }
.mobile-brand { display: none; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .app-shell:has(> .sidebar:hover), .app-shell:has(> .sidebar:focus-within) { grid-template-columns: 252px minmax(0, 1fr); }
  .topline { align-items: flex-start; flex-direction: column; }
  .topline-actions { width: 100%; justify-content: space-between; }
  .content-grid { grid-template-columns: 1fr; }
  .roster-row { grid-template-columns: minmax(110px, .55fr) minmax(0, 1fr); gap: 8px 12px; }
  .login-wrap { grid-template-columns: .9fr 1.1fr; }
  .login-art { padding: 42px 30px; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .app-shell:has(> .sidebar:hover), .app-shell:has(> .sidebar:focus-within) { grid-template-columns: none; }
  .mobile-menu-toggle { position: fixed; top: auto; right: auto; bottom: calc(18px + env(safe-area-inset-bottom)); left: 18px; z-index: 31; display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: #176b4a; color: white; box-shadow: 0 8px 24px rgba(16, 77, 55, .32); cursor: pointer; }
  .mobile-menu-toggle:hover, .mobile-menu-toggle:focus-visible { background: #104d37; }
  .mobile-menu-toggle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
  .mobile-menu-toggle .menu-close-icon, .mobile-menu-toggle[aria-expanded="true"] .menu-open-icon { display: none; }
  .mobile-menu-toggle[aria-expanded="true"] .menu-close-icon { display: block; }
  .mobile-menu-toggle[aria-expanded="true"] { display: none; }
  .app-shell:has(> .sidebar.mobile-menu-open)::before { position: fixed; inset: 0; z-index: 29; background: rgba(10, 23, 16, .56); content: ""; }
  .sidebar, .sidebar:hover, .sidebar:focus-within { position: fixed; top: 0; right: auto; bottom: 0; left: 0; z-index: 30; width: min(270px, 86vw); height: 100vh; height: 100dvh; max-height: 100dvh; overflow-x: hidden; overflow-y: auto; padding: calc(20px + env(safe-area-inset-top)) 18px calc(88px + env(safe-area-inset-bottom)); border: 1px solid rgba(230, 247, 236, .12); border-left: 0; border-radius: 0 16px 16px 0; box-shadow: 0 18px 48px rgba(12, 35, 23, .3); transform: translateX(-105%); visibility: hidden; pointer-events: none; transition: transform .24s ease, visibility .24s ease, box-shadow .2s ease; }
  .sidebar.mobile-menu-open, .sidebar.mobile-menu-open:hover, .sidebar.mobile-menu-open:focus-within { display: flex; width: min(270px, 86vw); transform: translateX(0); visibility: visible; pointer-events: auto; }
  .sidebar-close-toggle { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 1; display: none; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: #285640; color: white; cursor: pointer; }
  .sidebar.mobile-menu-open .sidebar-close-toggle { display: grid; }
  .sidebar-close-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
  .sidebar.mobile-menu-open .brand { padding-right: 52px; }
  .sidebar .brand, .sidebar:hover .brand, .sidebar:focus-within .brand { justify-content: flex-start; gap: 12px; padding: 2px 5px 16px; }
  .sidebar .brand-mark, .sidebar:hover .brand-mark, .sidebar:focus-within .brand-mark { width: 42px; height: 36px; }
  .sidebar .brand > span:last-child, .sidebar:hover .brand > span:last-child, .sidebar:focus-within .brand > span:last-child { display: block; }
  .sidebar .sidebar-account, .sidebar:hover .sidebar-account, .sidebar:focus-within .sidebar-account { justify-content: flex-start; min-height: 0; margin: 0 0 12px; padding: 10px 5px; }
  .sidebar .sidebar-account .account-details, .sidebar:hover .sidebar-account .account-details, .sidebar:focus-within .sidebar-account .account-details { display: block; }
  .mobile-settings-link { display: none; }
  .sidebar .nav-label, .sidebar:hover .nav-label, .sidebar:focus-within .nav-label { display: block; }
  .sidebar .nav-list, .sidebar:hover .nav-list, .sidebar:focus-within .nav-list { display: grid; overflow: visible; gap: 5px; padding: 0; }
  .sidebar .nav-link, .sidebar:hover .nav-link, .sidebar:focus-within .nav-link { justify-content: flex-start; gap: 11px; font-size: 13px; white-space: nowrap; padding: 10px 12px; }
  .sidebar .sidebar-logout-form { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(230, 247, 236, .15); }
  .sidebar .nav-text, .sidebar:hover .nav-text, .sidebar:focus-within .nav-text { display: inline; }
  .sidebar .nav-icon, .sidebar:hover .nav-icon, .sidebar:focus-within .nav-icon { width: 24px; flex-basis: 24px; font-size: 20px; }
  .topline-actions { align-items: center; flex-direction: row; gap: 8px; }
  .main { padding: 24px 16px 40px; }
  .topline { align-items: flex-start; margin-bottom: 22px; }
  .date-chip { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat { padding: 13px; }
  .stat-number { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .offering-grid { grid-template-columns: 1fr; }
  .report-filters { grid-template-columns: 1fr 1fr; }
  .field.full { grid-column: auto; }
  .panel { padding: 16px; }
  .roster:has(> .roster-row:nth-child(n + 11)) { max-height: min(58vh, 430px); }
  .roster-row { grid-template-columns: 1fr; gap: 4px; padding: 5px 8px; }
  .student-email { display: none; }
  .student-name { font-size: 12px; }
  .attendance-flags { gap: 4px; }
  .attendance-extra { grid-template-columns: auto minmax(0, 1fr); gap: 6px; }
  .attendance-label, .switch-value, .justified-control { font-size: 9px; }
  .switch-control { min-height: 19px; gap: 5px; }
  .switch-track { flex-basis: 30px; width: 30px; height: 17px; }
  .switch-track::after { width: 13px; height: 13px; }
  .switch-control input:checked + .switch-track::after { transform: translateX(13px); }
  .attendance-extra > input { padding: 4px 7px; font-size: 10px; }
  .attendance-form select { flex: 1; }
  .attendance-filter-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 8px; }
  .attendance-filter-form .button { grid-column: 1 / -1; justify-self: start; }
  .manage-record-body > form, .age-edit-form, .notification-panel .attendance-form { grid-template-columns: 1fr; }
  .manage-record > summary { align-items: flex-start; flex-direction: column; }
  .manage-record > summary span { text-align: left; }
  .login-wrap { display: block; }
  .login-art { min-height: 230px; padding: 25px 22px; }
  .login-art h1 { font-size: 34px; margin: 20px 0 8px; }
  .login-art p { font-size: 13px; margin-bottom: 0; }
  .login-meta { display: none; }
  .login-side { padding: 24px 15px; }
  .login-box .panel { padding: 21px; }
}
