:root {
  font-family: 'Baloo Bhaina 2', 'Segoe UI', sans-serif;
  color: #20212c;
  background: #f8f9fc;
  font-synthesis: none;
  --primary: #6355f5;
  --primary-hover: #5142dd;
  --primary-soft: #f0eeff;
  --ink: #20212c;
  --muted: #878b9a;
  --line: #e9eaf0;
  --surface: #fff;
  --background: #f8f9fc;
  --hero: #edf2ff;
  --green: #238a6a;
  --green-soft: #edf8f2;
  --red: #c66770;
  --red-soft: #fff0f2;
  --orange: #b3832b;
  --orange-soft: #fff8ea;
  --shadow: 0 2px 9px #20214503;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #edecf5;
  --muted: #9c9aad;
  --line: #333244;
  --surface: #222131;
  --background: #191824;
  --primary: #a59aff;
  --primary-hover: #b6adff;
  --primary-soft: #34304d;
  --hero: #292740;
  --green: #83d0b1;
  --green-soft: #203b33;
  --red: #ed9ca5;
  --red-soft: #442b36;
  --orange: #e5ba6c;
  --orange-soft: #3b3327;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--primary); }
button { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 29px; line-height: 1.4; font-weight: 700; letter-spacing: -.5px; }
h2 { font-size: 17px; line-height: 1.55; font-weight: 700; }
h3 { font-size: 15px; line-height: 1.5; font-weight: 650; }
strong { font-weight: 650; }
small { display: block; font-size: 12px; color: var(--muted); }
.icon { flex-shrink: 0; vertical-align: middle; }
.sr-only { width: 1px; height: 1px; padding: 0; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 20px; top: -70px; padding: 10px 18px; background: var(--surface); border: 1px solid var(--primary); z-index: 30; border-radius: 10px; }
.skip-link:focus { top: 10px; }
.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 32px 20px 20px; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand strong { font-size: 22px; font-weight: 750; letter-spacing: -.5px; }
.sidebar .brand { margin: 0 12px 51px; }
.sidebar-caption { color: var(--muted); font-size: 10px; letter-spacing: 1.3px; font-weight: 600; margin: 0 14px 14px; }
.sidebar-nav { display: grid; gap: 8px; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: 12px; font-size: 15px; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--background); color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.nav-symbol { display: grid; place-items: center; }
.sidebar-bottom { margin-top: auto; padding-top: 30px; }
.sidebar-profile { border-top: 1px solid var(--line); margin-top: 22px; padding: 22px 8px 0; display: flex; gap: 11px; align-items: center; }
.sidebar-profile strong { display: block; font-size: 13px; }
.sidebar-profile small { font-size: 11px; }
.coach-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.workspace { margin-left: 232px; }
.topbar { min-height: 82px; padding: 0 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { font-size: 12px; color: var(--muted); }
.breadcrumb span { padding: 0 15px; color: var(--line); }
.topbar-right { display: flex; align-items: center; gap: 21px; margin-left: auto; }
.demo-badge { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.demo-badge i { width: 6px; height: 6px; border-radius: 50%; background: #aaa1ef; }
.icon-button { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 10px; }
.icon-button:hover, .icon-button.active { background: var(--primary-soft); color: var(--primary); }
.mobile-brand, .bottom-nav { display: none; }
main { max-width: 1200px; padding: 35px 44px 24px; margin: 0 auto; outline: none; min-height: calc(100dvh - 82px); }
/* Route changes focus main for screen readers. Only the skip link needs a visual marker. */
main:focus-visible { outline: none; }
main[data-skip-focus]:focus-visible :is(.page-heading, .detail-toolbar) h1,
main[data-skip-focus]:focus-visible > .empty-state h3,
main[data-skip-focus]:focus-visible .profile-identity h2 { outline: 2px solid var(--primary-ink); outline-offset: 4px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 28px; }
.page-heading p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 19px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid transparent; transition: background .15s, box-shadow .15s; line-height: 1.5; }
.primary { background: var(--primary); color: white; box-shadow: 0 3px 7px #6355f510; }
:root[data-theme='dark'] .primary { color: #191528; }
.primary:hover { background: var(--primary-hover); box-shadow: 0 4px 12px #6355f522; }
.outline { background: var(--surface); border-color: #d8dce7; }
.outline:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.full { width: 100%; }
.text-link, .text-button { color: var(--primary); font-size: 12px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.text-link .icon { width: 15px; height: 15px; }
.text-link:hover { text-decoration: underline; }
.text-button { padding: 4px 0; border: 0; background: transparent; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.subtle { font-size: 12px; color: var(--muted); }
.section { margin-top: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.section-heading h2 { font-size: 15px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--primary); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 28px; }
.next-lesson { background: var(--hero); border-radius: 16px; padding: 25px 26px; }
.next-lesson h2 { font-size: 29px; line-height: 1.4; margin: 8px 0 3px; letter-spacing: -.6px; }
.next-lesson h3 { font-size: 15px; }
.next-lesson p { font-size: 12px; color: var(--muted); margin: 7px 0 18px; }
.next-lesson .button { min-height: 45px; }
.next-lesson .button .icon { width: 17px; height: 17px; }
.lesson-list { display: grid; gap: 12px; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 17px; transition: border-color .15s; }
.lesson-row:hover, .student-item:hover, .lesson-card:hover { border-color: var(--primary); }
.lesson-row strong { display: block; font-size: 14px; margin-bottom: 4px; }
.lesson-row small { font-size: 11px; }
.lesson-row > .icon { width: 17px; color: var(--muted); }
.time-tile { display: grid; place-items: center; background: var(--background); width: 56px; height: 48px; border-radius: 8px; font-size: 12px; font-weight: 650; flex-shrink: 0; }
.member-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.member-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 15px 12px; transition: background .15s; }
.member-tile:hover { background: var(--primary-soft); }
.member-tile .avatar { width: 32px; height: 32px; font-size: 10px; border-radius: 10px; margin-bottom: 9px; }
.member-tile strong { display: block; font-size: 13px; }
.member-tile small { font-size: 10px; margin-top: 4px; }
.expiry-widget { padding: 22px; }
.expiry-widget h2 { font-size: 15px; }
.count-badge { background: var(--orange-soft); color: var(--orange); padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.count-badge.purple { color: var(--primary); background: var(--primary-soft); }
.expiry-line { display: flex; justify-content: space-between; gap: 9px; margin: 15px 0; font-size: 12px; }
.expiry-line a { font-weight: 550; }
.expiry-line a:hover { color: var(--primary); }
.expiry-line > span { color: var(--orange); white-space: nowrap; font-size: 11px; }
.expiry-widget .button { font-size: 12px; min-height: 37px; padding: 6px; margin-top: 5px; color: var(--primary); }
.expiry-widget .button .icon { width: 15px; height: 15px; }
.quick-links { margin-top: 28px; }
.quick-link { display: flex; align-items: center; gap: 12px; padding: 14px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.quick-link > .icon:first-child { color: var(--muted); }
.quick-link > .icon:last-child { width: 16px; margin-left: auto; color: var(--muted); }
.quick-link:hover { color: var(--primary); }
.storage-note { display: flex; gap: 10px; margin-top: 30px; color: var(--muted); }
.storage-note .icon { width: 17px; margin-top: 3px; }
.storage-note p { font-size: 11px; line-height: 1.8; }
.storage-note p span { opacity: .8; font-size: 10px; }
.page-footer { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.page-footer span { margin: 0 7px; }
.week-panel { background: #24223d; color: white; border-radius: 17px; padding: 22px; max-width: 760px; }
.week-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.week-heading h2 { text-transform: capitalize; font-size: 17px; }
.week-heading p { color: #aaa7c5; font-size: 11px; }
.week-actions { display: flex; align-items: center; gap: 4px; }
.week-actions .icon-button { width: 29px; height: 32px; color: #e1dfff; }
.week-actions .icon-button:hover { background: #ffffff18; }
.week-today { border: 1px solid #ffffff28; background: transparent; color: white; padding: 4px 9px; border-radius: 7px; font-size: 10px; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; margin-top: 20px; }
.day { display: flex; align-items: center; flex-direction: column; border: 0; border-radius: 10px; background: transparent; padding: 12px 3px 9px; gap: 7px; color: #bdb9d5; font-size: 11px; }
.day strong { font-size: 22px; line-height: 1.1; font-weight: 600; }
.day i { width: 4px; height: 4px; border-radius: 50%; background: transparent; margin-top: 4px; }
.day i.has-lessons { background: currentColor; }
.day:hover { background: #ffffff10; }
.day.selected { background: white; color: #6355f5; box-shadow: 0 4px 12px #0002; }
.schedule-list { display: grid; gap: 18px; }
.timeline-row { display: grid; grid-template-columns: 58px 1fr; gap: 13px; }
.timeline-time { font-size: 13px; padding-top: 20px; color: var(--muted); }
.timeline-time span { display: block; font-size: 11px; opacity: .8; margin-top: 5px; }
.lesson-card { display: block; padding: 20px 22px; }
.lesson-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-card-top > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 12px; }
.lesson-card-top .icon { width: 15px; height: 15px; }
.lesson-card h3 { font-size: 19px; margin: 12px 0 5px; }
.lesson-card p { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.lesson-card p .icon { width: 14px; height: 14px; }
.lesson-card-bottom { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 17px; padding-top: 13px; font-size: 11px; color: var(--muted); }
.lesson-card-bottom span { display: inline-flex; align-items: center; gap: 6px; }
.lesson-card-bottom span:last-child { color: var(--primary); }
.lesson-card-bottom .icon { width: 15px; height: 15px; }
.badge { font-size: 10px; padding: 4px 8px; border-radius: 6px; display: inline-flex; align-items: center; white-space: nowrap; line-height: 1.6; font-weight: 550; }
.badge.present { color: var(--green); background: var(--green-soft); }
.badge.absent { color: var(--red); background: var(--red-soft); }
.badge.pending, .badge.neutral { color: var(--muted); background: var(--background); border: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; margin-bottom: 17px; }
.back-link .icon { width: 16px; height: 16px; }
.back-link:hover { color: var(--primary); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.detail-card { padding: 22px; margin-bottom: 20px; }
.detail-card > h2 { margin-bottom: 15px; }
.detail-card > p { font-size: 13px; color: var(--muted); }
.feature-icon { background: var(--primary-soft); color: var(--primary); border-radius: 12px; width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; }
.lesson-detail-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.detail-list { margin: 16px 0 0; font-size: 12px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-weight: 550; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-row strong { display: block; font-size: 13px; }
.person-row small { font-size: 10px; margin-top: 3px; }
a.person-row:hover { color: var(--primary); }
.person-row > .icon { color: var(--muted); width: 16px; }
.avatar { display: grid; place-items: center; flex-shrink: 0; height: 42px; width: 42px; border-radius: 12px; background: var(--primary-soft); color: #8172c5; font-size: 12px; font-weight: 650; }
.avatar.color-1 { background: #f9f0e9; color: #b49277; }
.avatar.color-2 { background: #edf6f1; color: #7da08c; }
:root[data-theme='dark'] .avatar.color-1 { background: #40332c; }
:root[data-theme='dark'] .avatar.color-2 { background: #273b33; }
.empty-state { border: 1px dashed var(--line); border-radius: 15px; padding: 42px 20px; text-align: center; width: 100%; }
.empty-icon { display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); width: 45px; height: 45px; border-radius: 14px; margin-bottom: 14px; }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { color: var(--muted); font-size: 12px; }
.empty-state .button { margin-top: 18px; }
.form-card { padding: 28px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; font-size: 12px; min-width: 0; }
.field > span { color: var(--ink); font-weight: 550; }
input, select, textarea { width: 100%; min-height: 45px; border: 1px solid #d9dce6; border-radius: 9px; background: var(--surface); color: var(--ink); padding: 10px 13px; font-size: 13px; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: var(--muted); font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 2px solid var(--primary-soft); outline-offset: 1px; }
textarea { resize: vertical; min-height: 93px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field-help { margin: -5px 0 19px; color: var(--muted); font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 12px; }
.form-error { color: var(--red); font-size: 12px; }
.form-error:not(:empty) { padding: 13px; border-radius: 8px; background: var(--red-soft); margin: 8px 0 15px; }
.roster-fieldset { border: 0; margin: 8px 0 20px; padding: 0; min-width: 0; }
.roster-fieldset legend { font-size: 14px; font-weight: 650; }
.roster-fieldset legend span { color: var(--muted); font-weight: 400; }
.roster-fieldset > p { margin: 6px 0 10px; }
.checkbox-person { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.checkbox-person input { width: 17px; height: 17px; min-height: auto; accent-color: var(--primary); margin: 0; flex-shrink: 0; }
.checkbox-person strong { font-size: 13px; }
.checkbox-person small { font-size: 10px; }
.checkbox-person .subtle { margin-left: auto; white-space: nowrap; font-size: 11px; }
.search-box { position: relative; margin-bottom: 17px; }
.search-box > .icon { position: absolute; left: 15px; top: 14px; color: var(--muted); width: 18px; height: 18px; }
.search-box input { padding-left: 43px; background: var(--surface); border-color: var(--line); }
.filter-tabs { display: flex; gap: 5px; padding: 5px; background: #eeedf4; border-radius: 11px; margin-bottom: 24px; max-width: 650px; }
:root[data-theme='dark'] .filter-tabs { background: #2d2b3d; }
.filter-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 8px 7px; border-radius: 8px; white-space: nowrap; }
.filter-tabs button span { font-size: 10px; margin-left: 5px; }
.filter-tabs button.active { color: var(--primary); background: var(--surface); box-shadow: 0 2px 5px #211d3c08; font-weight: 600; }
.student-grid { display: grid; gap: 12px; }
.student-item { display: flex; align-items: center; gap: 14px; padding: 20px; transition: border-color .15s; }
.student-item strong { font-size: 14px; }
.student-item small { font-size: 11px; margin-top: 4px; }
.student-status { font-size: 10px; color: var(--muted); display: block; margin-top: 3px; }
.student-item > .icon { width: 16px; height: 16px; color: var(--muted); }
.balance-badge { display: inline-block; padding: 5px 9px; color: var(--primary); background: var(--primary-soft); font-size: 11px; border-radius: 7px; white-space: nowrap; font-weight: 550; }
.balance-badge.low { color: var(--orange); background: var(--orange-soft); }
.profile-card { padding: 28px 20px 23px; text-align: center; margin-bottom: 20px; }
.profile-card .avatar { margin: 0 auto 15px; width: 62px; height: 62px; border-radius: 19px; font-size: 18px; }
.profile-card h2 { font-size: 21px; margin-bottom: 7px; }
.profile-phone { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.profile-phone .icon { width: 15px; height: 15px; margin-right: 4px; }
.package-card { padding: 22px; margin-bottom: 20px; background: var(--primary-soft); border-color: transparent; }
.package-card h2 { margin-top: 6px; font-size: 19px; }
.package-card p { font-size: 12px; color: var(--muted); margin: 5px 0 15px; }
.package-card small { font-size: 10px; margin-top: 9px; }
.low-package { background: var(--orange-soft); }
.low-package h2, .low-package .eyebrow { color: var(--orange); }
progress { display: block; appearance: none; height: 6px; width: 100%; overflow: hidden; border-radius: 6px; border: 0; background: var(--line); color: var(--primary); }
progress::-webkit-progress-bar { background: var(--line); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--primary); border-radius: 6px; }
.low-package progress::-webkit-progress-value { background: #d7ad64; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row strong { font-size: 12px; }
.history-row small { font-size: 10px; margin-top: 5px; }
.history-row:hover strong { color: var(--primary); }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 16px; border-radius: 11px; background: var(--background); font-size: 12px; margin-bottom: 20px; color: var(--muted); }
.notice .icon { width: 20px; height: 20px; margin-top: 1px; }
.notice strong { font-size: 13px; display: block; margin-bottom: 3px; }
.notice p { font-size: 12px; line-height: 1.7; }
.notice.warning { background: var(--orange-soft); color: var(--orange); }
.expiry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.expiry-card { padding: 20px; }
.expiry-card h3 { font-size: 13px; }
.expiry-card small { font-size: 10px; }
.balance-label { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 22px 0 8px; font-size: 11px; color: var(--muted); }
.balance-label strong { font-size: 11px; font-weight: 500; }
.profile-link { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 20px; color: var(--primary); font-size: 12px; }
.profile-link .icon { width: 16px; height: 16px; }
.attendance-intro { display: flex; align-items: center; gap: 14px; padding: 21px; margin-bottom: 25px; }
.attendance-intro h2 { font-size: 16px; }
.attendance-intro p { font-size: 11px; color: var(--muted); margin-top: 4px; }
.attendance-heading { margin-bottom: 8px; }
.attendance-counts { display: flex; gap: 15px; font-size: 11px; margin-bottom: 19px; color: var(--muted); }
.attendance-counts span:first-child { color: var(--green); }
.attendance-counts span:nth-child(2) { color: var(--red); }
.attendance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.attendance-person { margin: 0; padding: 20px; min-width: 0; }
.attendance-person h3 { font-size: 13px; }
.attendance-person small { font-size: 10px; margin-top: 3px; }
.status-options { display: grid; grid-template-columns: 1fr 1fr 1.45fr; gap: 5px; margin-top: 18px; }
.status-option { position: relative; cursor: pointer; }
.status-option input { position: absolute; opacity: 0; inset: 0; min-height: 0; margin: 0; padding: 0; width: 100%; height: 100%; cursor: pointer; }
.status-option > span { display: flex; align-items: center; justify-content: center; min-height: 35px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 10px; gap: 3px; padding: 4px 2px; }
.status-option .icon { width: 12px; height: 12px; }
.status-option.selected.present > span { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.status-option.selected.absent > span { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.status-option.selected.pending > span { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.status-option:has(input:focus-visible) > span { outline: 3px solid var(--primary); outline-offset: 2px; }
.save-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 24px 0; }
.save-bar p { color: var(--muted); font-size: 11px; display: flex; gap: 7px; align-items: center; }
.save-bar p .icon { width: 15px; height: 15px; }
.success-banner { background: var(--green-soft); border-radius: 14px; padding: 24px; display: flex; gap: 16px; align-items: center; color: var(--green); margin-bottom: 23px; }
.success-banner > span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid currentColor; border-radius: 50%; flex-shrink: 0; }
.success-banner h2 { font-size: 19px; }
.success-banner p { font-size: 12px; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.stat-card { padding: 21px; }
.stat-card > span { color: var(--muted); font-size: 12px; }
.stat-card > strong { display: block; font-size: 34px; line-height: 1.3; font-weight: 650; margin: 9px 0 4px; }
.stat-card strong small { font-size: 20px; display: inline; color: inherit; margin-left: 2px; }
.stat-card p { color: var(--muted); font-size: 11px; }
.stat-card.accent { background: var(--primary-soft); border-color: transparent; }
.stat-card.accent > strong { color: var(--primary); }
.stat-card.present > strong { color: var(--green); }
.stat-card.absent > strong { color: var(--red); }
.stat-card.pending > strong { color: var(--muted); }
.summary-note { padding: 18px 0 0; border-top: 1px solid var(--line); font-size: 12px; }
.summary-note p { color: var(--muted); margin-top: 6px; }
.report-filters { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 15px; padding: 20px; align-items: end; }
.report-filters .field { margin: 0; }
.report-filters .button { height: 45px; }
.report-filters .form-error { grid-column: 1 / -1; }
.report-filters .form-error:empty { display: none; }
.period-label { font-size: 11px; color: var(--muted); margin: 20px 0 13px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 23px; align-items: start; }
.chart-layout { display: flex; align-items: center; gap: 25px; padding: 17px 0 6px; }
.donut { width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--primary) 0 var(--present), #e9a5ae var(--present) var(--present-absent), #dddfe8 var(--present-absent) 100%); padding: 17px; flex-shrink: 0; }
.donut > div { width: 100%; height: 100%; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut strong { font-size: 29px; line-height: 1.3; }
.donut span { font-size: 10px; color: var(--muted); }
.chart-legend { display: grid; gap: 16px; flex: 1; }
.chart-legend > div { display: grid; grid-template-columns: 7px 1fr auto; gap: 5px 7px; align-items: center; font-size: 10px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 50%; background: #dddfe8; }
.chart-legend i.present { background: var(--primary); }
.chart-legend i.absent { background: #e9a5ae; }
.chart-legend strong { font-size: 11px; }
.chart-legend small { grid-column: 2 / -1; font-size: 9px; }
.report-students .rate { color: var(--primary); font-size: 13px; }
.report-footnote { color: var(--muted); font-size: 11px; line-height: 1.8; }
.settings-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.settings-grid .field { margin: 0; }
.settings-grid .detail-card > p { margin-bottom: 13px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.theme-option { border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: var(--surface); text-align: left; }
.theme-option.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.theme-option > span:last-child { display: flex; align-items: center; gap: 6px; font-size: 11px; margin-top: 10px; }
.theme-option > span:last-child > .icon { width: 14px; height: 14px; }
.theme-option > span:last-child > .icon:last-child:not(:first-child) { margin-left: auto; }
.theme-preview { display: flex; height: 49px; background: #f6f7fb; border-radius: 5px; padding: 7px; gap: 5px; }
.theme-preview > i { width: 20%; background: #e0e2e9; border-radius: 2px; }
.theme-preview > span { display: grid; gap: 5px; flex: 1; align-content: start; }
.theme-preview b { display: block; height: 3px; border-radius: 3px; background: #c3c5d1; }
.theme-preview b:first-child { width: 60%; background: #8c89a6; }
.theme-preview b:last-child { width: 45%; background: #8e80f6; }
.theme-preview.dark { background: #25233d; }
.theme-preview.dark > i { background: #39364f; }
.theme-preview.dark b { background: #625f7d; }
.theme-preview.system { background: linear-gradient(90deg, #f6f7fb 50%, #25233d 50%); }
#toast { position: fixed; bottom: 30px; left: calc(50% + 116px); transform: translate(-50%, 15px); max-width: min(520px, calc(100vw - 40px)); padding: 13px 20px; color: white; background: #28253e; box-shadow: 0 5px 20px #0002; border-radius: 11px; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: #9b4152; }
@media (min-width: 1440px) {
  main { padding-top: 45px; }
  .home-grid { gap: 36px; }
}
@media (max-width: 1190px) {
  .sidebar { width: 205px; padding-inline: 15px; }
  .workspace { margin-left: 205px; }
  main { padding: 28px; }
  .topbar { padding-inline: 28px; }
  .home-grid { gap: 20px; grid-template-columns: minmax(0, 1.3fr) minmax(245px, 1fr); }
  .attendance-grid, .report-grid, .expiry-grid, .settings-grid { grid-template-columns: 1fr; }
  .chart-layout { max-width: 450px; }
  .theme-options { max-width: 420px; }
  .report-filters { grid-template-columns: 1fr 1fr; }
  #toast { left: calc(50% + 102px); }
}
@media (max-width: 900px) {
  .sidebar { width: 180px; padding-inline: 12px; }
  .sidebar .brand { margin-left: 8px; }
  .sidebar .brand strong { font-size: 20px; }
  .sidebar-caption { font-size: 9px; margin-left: 10px; letter-spacing: .8px; }
  .sidebar .nav-item { font-size: 13px; gap: 10px; padding-inline: 12px; }
  .sidebar-profile { padding-inline: 0; gap: 7px; }
  .sidebar-profile strong { font-size: 11px; }
  .sidebar-profile small { font-size: 9px; }
  .workspace { margin-left: 180px; }
  .home-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 0; }
  .home-aside .quick-links, .home-aside .storage-note { display: none; }
  .home-aside { margin-top: 5px; }
  .home-aside .expiry-widget { margin-bottom: 0; }
  .page-heading { gap: 10px; }
  h1 { font-size: 26px; }
  .page-heading .compact { padding: 9px 12px; font-size: 11px; gap: 5px; }
  #toast { left: calc(50% + 90px); }
}
@media (width < 1024px) {
  body { background: var(--surface); font-size: 14px; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .mobile-brand { display: inline-flex; }
  .mobile-brand strong { font-size: 19px; }
  .mobile-brand img { width: 24px; height: 22px; }
  .brand { gap: 8px; }
  .desktop-only { display: none !important; }
  .topbar { min-height: 61px; padding: 0 16px; position: sticky; top: 0; z-index: 12; gap: 10px; }
  .topbar-right { gap: 12px; }
  .demo-badge { font-size: 9px; gap: 5px; }
  .demo-badge i { width: 5px; height: 5px; }
  .topbar .icon-button { width: 32px; height: 35px; }
  .topbar .icon-button .icon { width: 20px; height: 20px; }
  main { padding: 21px 16px calc(90px + env(safe-area-inset-bottom)); min-height: calc(100dvh - 61px); max-width: 580px; }
  .page-heading { margin-bottom: 22px; align-items: center; }
  h1 { font-size: 25px; line-height: 1.4; }
  .page-heading p { font-size: 11px; margin-top: 2px; }
  .page-heading .compact { padding: 8px 10px; min-height: 36px; font-size: 10px; gap: 4px; }
  .page-heading .compact .icon { width: 15px; height: 15px; }
  .page-heading:has(.compact) h1 { font-size: 24px; }
  .page-heading:has(.compact) p { max-width: 215px; }
  .home-grid { display: flex; flex-direction: column; gap: 0; }
  .next-lesson { padding: 18px 16px 16px; border-radius: 14px; }
  .next-lesson .eyebrow { font-size: 9px; letter-spacing: .1px; }
  .next-lesson h2 { font-size: 24px; margin-top: 8px; }
  .next-lesson h3 { font-size: 13px; margin-top: 1px; }
  .next-lesson p { font-size: 10px; margin: 6px 0 13px; }
  .next-lesson .button { font-size: 12px; min-height: 44px; }
  .section { margin-top: 24px; }
  .section-heading { margin-bottom: 12px; }
  .section-heading h2 { font-size: 14px; }
  .text-link { font-size: 10px; }
  .lesson-row { padding: 13px 12px; border-radius: 12px; gap: 11px; }
  .time-tile { width: 48px; height: 43px; font-size: 11px; }
  .lesson-row strong { font-size: 12px; margin-bottom: 3px; }
  .lesson-row small { font-size: 9px; }
  .lesson-row > .icon { width: 14px; height: 14px; }
  .member-tiles { gap: 9px; }
  .member-tile { padding: 12px; background: var(--background); border-color: transparent; border-radius: 9px; }
  .member-tile .avatar { display: none; }
  .member-tile strong { font-size: 12px; }
  .member-tile small { font-size: 9px; margin-top: 7px; }
  .home-aside { margin-top: 25px; }
  .expiry-widget { padding: 16px; border-radius: 13px; }
  .expiry-widget h2 { font-size: 13px; }
  .expiry-widget .section-heading { margin-bottom: 8px; }
  .expiry-line { margin: 7px 0; font-size: 11px; }
  .expiry-line > span { font-size: 10px; }
  .expiry-widget .button { min-height: 33px; padding: 4px; margin-top: 9px; font-size: 10px; }
  .bottom-nav { position: fixed; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 9px max(8px, calc((100vw - 580px) / 2)) calc(10px + env(safe-area-inset-bottom)); min-height: 70px; background: var(--surface); border-top: 1px solid var(--line); z-index: 15; }
  .bottom-nav .nav-item { padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 10px; border-radius: 0; background: transparent; justify-content: center; }
  .bottom-nav .nav-symbol { padding: 4px 14px; border-radius: 10px; }
  .bottom-nav .nav-item.active .nav-symbol { background: var(--primary-soft); }
  .bottom-nav .icon { width: 19px; height: 19px; }
  .page-footer { margin-top: 29px; font-size: 9px; padding-top: 16px; }
  .home-grid + .page-footer { margin-top: 23px; }
  .week-panel { padding: 17px 12px 13px; border-radius: 14px; }
  .week-heading { padding: 0 3px; }
  .week-heading h2 { font-size: 15px; }
  .week-heading p { font-size: 10px; }
  .week-days { gap: 4px; margin-top: 16px; }
  .day { font-size: 10px; padding: 10px 1px 8px; gap: 8px; }
  .day strong { font-size: 20px; }
  .day i { width: 3px; height: 3px; }
  .timeline-row { grid-template-columns: 44px 1fr; gap: 8px; }
  .timeline-time { font-size: 11px; }
  .timeline-time span { font-size: 10px; }
  .lesson-card { padding: 15px; border-radius: 12px; }
  .lesson-card-top > span:first-child { font-size: 10px; gap: 4px; }
  .lesson-card-top .icon { display: none; }
  .lesson-card h3 { font-size: 17px; }
  .lesson-card p { font-size: 11px; }
  .lesson-card-bottom { font-size: 10px; gap: 4px; }
  .lesson-card-bottom > span:last-child { font-size: 0; }
  .lesson-card-bottom > span:last-child .icon { width: 17px; }
  .badge { font-size: 9px; padding: 3px 6px; }
  .back-link { font-size: 11px; margin-bottom: 14px; }
  .detail-card { padding: 17px; border-radius: 13px; margin-bottom: 16px; }
  .detail-card > h2 { font-size: 15px; }
  .detail-card > p { font-size: 12px; }
  .detail-list { font-size: 11px; }
  .form-card { padding: 18px; }
  .field { font-size: 12px; margin-bottom: 17px; }
  input, select, textarea { font-size: 16px; }
  input[type='date'], input[type='time'], select { font-size: 13px; }
  input[type='date'], input[type='time'] { min-width: 0; max-width: 100%; }
  .field input::placeholder { font-size: 12px; }
  .two-col { gap: 11px; }
  .field-help { font-size: 10px; }
  .checkbox-person { gap: 9px; }
  .checkbox-person .avatar { width: 33px; height: 33px; border-radius: 10px; font-size: 10px; }
  .checkbox-person strong { font-size: 11px; }
  .checkbox-person .subtle { font-size: 9px; }
  .form-actions .button { flex: 1; }
  .search-box input { font-size: 16px; min-height: 44px; }
  .filter-tabs { gap: 2px; padding: 4px; margin-bottom: 21px; }
  .filter-tabs button { font-size: 10px; padding: 9px 3px; }
  .filter-tabs button span { font-size: 9px; margin-left: 3px; }
  .student-item { padding: 15px 12px; gap: 10px; border-radius: 12px; }
  .student-item .avatar { width: 36px; height: 39px; font-size: 10px; }
  .student-item strong { font-size: 12px; }
  .student-item small { font-size: 9px; }
  .student-status { font-size: 9px; }
  .student-item > .icon { display: none; }
  .balance-badge { font-size: 9px; padding: 4px 7px; }
  .profile-card { margin-bottom: 16px; }
  .package-card { padding: 18px; margin-bottom: 16px; }
  .package-card h2 { font-size: 18px; }
  .history-row { padding: 17px 0; }
  .history-row strong { font-size: 11px; }
  .notice { padding: 14px; gap: 10px; }
  .notice strong { font-size: 12px; }
  .notice p { font-size: 11px; }
  .expiry-card { padding: 17px; }
  .expiry-card h3 { font-size: 12px; }
  .expiry-card .avatar { width: 37px; height: 40px; font-size: 10px; }
  .attendance-intro { padding: 16px; gap: 10px; }
  .attendance-intro h2 { font-size: 14px; }
  .attendance-intro p { font-size: 10px; }
  .attendance-intro .feature-icon { width: 36px; height: 36px; }
  .attendance-person { padding: 17px 14px; }
  .attendance-heading .text-button { font-size: 10px; }
  .attendance-heading .text-button .icon { width: 14px; height: 14px; }
  .attendance-counts { font-size: 10px; gap: 13px; }
  .status-options { gap: 7px; grid-template-columns: 1fr 1fr 1.45fr; margin-top: 17px; }
  .status-option > span { font-size: 10px; min-height: 39px; }
  .save-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .save-bar p { justify-content: center; font-size: 10px; }
  .save-bar .button { width: 100%; }
  .success-banner { padding: 18px; gap: 11px; }
  .success-banner h2 { font-size: 17px; }
  .success-banner p { font-size: 10px; }
  .success-banner > span { width: 35px; height: 35px; }
  .stat-grid { gap: 10px; margin-bottom: 17px; }
  .stat-card { padding: 17px 14px; border-radius: 12px; }
  .stat-card > span { font-size: 11px; }
  .stat-card > strong { font-size: 30px; }
  .stat-card p { font-size: 10px; }
  .stat-grid.three .stat-card { padding-inline: 10px; }
  .stat-grid.three .stat-card > span { font-size: 9px; }
  .report-filters { padding: 15px; gap: 12px; grid-template-columns: 1fr 1fr; }
  .report-filters .field:nth-child(3) { grid-column: 1 / -1; }
  .report-filters .button { grid-column: 1 / -1; font-size: 12px; min-height: 39px; height: auto; }
  .report-filters .field { font-size: 11px; }
  .report-filters input { padding-inline: 10px; }
  .report-grid { gap: 0; }
  .chart-layout { gap: 23px; padding: 13px 0 8px; }
  .donut { width: 145px; height: 145px; padding: 17px; }
  .donut strong { font-size: 27px; }
  .report-footnote { font-size: 10px; }
  .settings-grid { gap: 0; }
  .theme-options { gap: 8px; }
  .theme-option { padding: 7px; }
  .theme-option > span:last-child { font-size: 10px; gap: 4px; }
  .theme-option > span:last-child > .icon { width: 12px; height: 12px; }
  .empty-state { padding: 33px 17px; }
  #toast { left: 50%; bottom: calc(85px + env(safe-area-inset-bottom)); font-size: 11px; padding: 12px 17px; width: max-content; }
}
@media (max-width: 360px) {
  main { padding-inline: 12px; }
  .page-heading:has(.compact) p { max-width: 165px; }
  .compact span { font-size: 9px; }
  .stat-grid.three .stat-card > span { font-size: 8px; }
  .chart-layout { gap: 15px; }
  .donut { width: 125px; height: 125px; padding: 14px; }
  .student-item { gap: 7px; }
  .student-item .avatar { width: 30px; }
  .student-item strong { font-size: 11px; }
  .balance-badge { padding-inline: 5px; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .page-footer, .page-heading > .button, .report-filters, #toast { display: none; }
  .workspace { margin: 0; }
  main { padding: 0; max-width: none; }
  .card { break-inside: avoid; }
  body { background: white; }
}
