/* TeacherTrack design system - light + dark, no external dependencies */
:root {
  --gold: #ffc53d; --gold-600: #e8a800; --gold-100: #fff4d1; --ink: #0b0b0f;
  --bg: #f5f5f8; --surface: #ffffff; --surface-2: #f0f0f4; --border: #e6e6ec; --border-strong: #d3d3dc;
  --text: #15151a; --muted: #6a6a77; --faint: #9a9aa6;
  --green: #16a34a; --green-bg: #e7f7ed; --red: #dc2626; --red-bg: #fdeaea; --amber: #b45309; --amber-bg: #fff1d6;
  --blue: #2563eb; --blue-bg: #e8effe; --gray-bg: #eeeef2;
  --primary: var(--gold); --on-primary: #17130a;
  --shadow-sm: 0 1px 2px rgba(16,16,24,.06); --shadow: 0 6px 20px -8px rgba(16,16,24,.18); --shadow-lg: 0 24px 60px -20px rgba(16,16,24,.35);
  --radius: 14px; --radius-sm: 9px; --sidebar-w: 264px; --topbar-h: 64px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0a0e; --surface: #131318; --surface-2: #1b1b22; --border: #25252e; --border-strong: #33333f;
  --text: #f2f2f6; --muted: #9b9ba8; --faint: #6f6f7c;
  --green: #4ade80; --green-bg: rgba(74,222,128,.12); --red: #f87171; --red-bg: rgba(248,113,113,.12);
  --amber: #fbbf24; --amber-bg: rgba(251,191,36,.12); --blue: #7aa2ff; --blue-bg: rgba(122,162,255,.13); --gray-bg: #22222a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 8px 24px -10px rgba(0,0,0,.6); --shadow-lg: 0 30px 70px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--surface-2); padding: .12em .4em; border-radius: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .gold { color: var(--gold); }
.right { text-align: right; } .nowrap { white-space: nowrap; } .center { text-align: center; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.i { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 600; font-size: .92rem; padding: .62rem 1.05rem; border-radius: 11px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, var(--shadow-sm); }
.btn-primary:hover:not([disabled]) { background: #ffd05c; }
.btn-dark { background: var(--ink); color: #fff; } [data-theme="dark"] .btn-dark { background: #fff; color: var(--ink); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover:not([disabled]) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); } .btn-ghost:hover:not([disabled]) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: transparent; } .btn-danger:hover:not([disabled]) { background: var(--red); color: #fff; }
.btn-sm { padding: .4rem .7rem; font-size: .82rem; border-radius: 9px; } .btn-lg { padding: .85rem 1.4rem; font-size: 1rem; border-radius: 13px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; position: relative; font-size: 1.05rem; }
.icon-btn:hover { background: var(--surface-2); }
.dot-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; min-width: 0; }
.field > span, .label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field small { color: var(--faint); font-size: .76rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; padding: .65rem .85rem; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-600); box-shadow: 0 0 0 4px rgba(255,197,61,.22); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--gold-600); }
input[type="file"] { padding: .5rem; }
.input-wrap { position: relative; } .input-wrap input { padding-right: 4.2rem; }
.reveal { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 700; padding: .3rem .6rem; border-radius: 8px; cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; } .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; cursor: pointer; margin: .4rem 0 1rem; } .check input { margin-top: .22rem; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.switch:last-child { border-bottom: 0; }
.switch .t strong { display: block; font-size: .92rem; } .switch .t span { font-size: .8rem; color: var(--muted); }
.toggle { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; padding: 0; border-radius: 99px; background: var(--border-strong); position: relative; cursor: pointer; flex: none; border: 0; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
input.toggle { width: 44px; height: 26px; padding: 0; border: 0; }
.toggle:checked { background: var(--gold-600); } .toggle:checked::after { transform: translateX(18px); }
.form-error { background: var(--red-bg); color: var(--red); border-radius: 10px; padding: .65rem .85rem; font-size: .86rem; margin-bottom: 1rem; font-weight: 500; }
.field-row { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.field-row .field { margin-bottom: 0; flex: 1 1 160px; }
.count { text-align: right; font-size: .74rem; color: var(--faint); }

/* ---------- Cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-title { font-size: 1.02rem; font-weight: 700; } .card-sub { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.card-flush { padding: 0; overflow: hidden; } .card-flush .card-head { padding: 1.1rem 1.25rem 0; }
.grid { display: grid; gap: 1rem; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.grid > .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; } .row.between { justify-content: space-between; } .spacer { flex: 1; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); flex: none; background: var(--ink); color: #c9c9d3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 60; padding: 1.1rem .85rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: #fff; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #ffd25c, #ffb300); color: #1a1405; display: grid; place-items: center; font-size: 1.15rem; box-shadow: 0 6px 16px -6px rgba(255,179,0,.7); flex: none; }
.sidebar .brand { padding: .2rem .55rem 1.2rem; }
.school-chip { margin: 0 .35rem 1rem; padding: .65rem .75rem; border-radius: 12px; background: rgba(255,255,255,.06); font-size: .8rem; color: #a8a8b6; line-height: 1.35; }
.school-chip strong { display: block; color: #fff; font-size: .86rem; }
.nav-sec { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6f6f7c; padding: 1rem .75rem .4rem; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .62rem .75rem; border-radius: 11px; color: #b9b9c5; text-decoration: none; font-weight: 500; font-size: .92rem; cursor: pointer; margin-bottom: 2px; position: relative; transition: background .15s, color .15s; }
.nav-item .i { font-size: 1.12rem; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(255,197,61,.14); color: var(--gold); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -.85rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.nav-count { margin-left: auto; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 99px; padding: .05rem .45rem; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; }
.scrim { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--topbar-h); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.topbar-title { font-weight: 700; font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 700; padding: .3rem .65rem; border-radius: 99px; background: var(--amber-bg); color: var(--amber); cursor: pointer; border: 0; }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .25rem .7rem .25rem .3rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.user-chip:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .78rem; color: #1a1405; background: linear-gradient(135deg, #ffd25c, #ffb300); flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.user-chip .who { text-align: left; line-height: 1.15; } .user-chip .who b { font-size: .84rem; display: block; } .user-chip .who span { font-size: .72rem; color: var(--muted); }
.popover { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .4rem; z-index: 80; }
.rel { position: relative; }
.menu-item { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .6rem .7rem; border: 0; background: none; border-radius: 9px; font: inherit; color: var(--text); cursor: pointer; text-align: left; font-size: .9rem; text-decoration: none; }
.menu-item:hover { background: var(--surface-2); }
.menu-sep { height: 1px; background: var(--border); margin: .35rem 0; }
.notif-panel { width: 360px; max-width: 92vw; padding: 0; } .notif-head { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-weight: 700; }
.notif-list { max-height: 360px; overflow-y: auto; } .notif { padding: .8rem 1rem; border-bottom: 1px solid var(--border); font-size: .86rem; } .notif:last-child { border: 0; } .notif.unread { background: color-mix(in srgb, var(--gold) 9%, transparent); } .notif b { display: block; } .notif small { color: var(--faint); }
.netbar { background: var(--amber-bg); color: var(--amber); padding: .55rem 1.5rem; font-size: .85rem; font-weight: 600; text-align: center; }
.view { padding: 1.6rem; width: 100%; max-width: 1280px; margin: 0 auto; outline: none; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.page-title { font-size: 1.65rem; font-weight: 800; letter-spacing: -.025em; } .page-sub { color: var(--muted); margin-top: .25rem; }
.page-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- KPI / badges / progress ---------- */
.kpi { display: flex; flex-direction: column; gap: .35rem; position: relative; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; }
.kpi-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.kpi-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-100); color: #9a6b00; font-size: 1.05rem; }
[data-theme="dark"] .kpi-icon { background: rgba(255,197,61,.14); color: var(--gold); }
.kpi-icon.red { background: var(--red-bg); color: var(--red); } .kpi-icon.green { background: var(--green-bg); color: var(--green); } .kpi-icon.blue { background: var(--blue-bg); color: var(--blue); }
.kpi-value { font-size: 1.95rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; } .kpi-value small { font-size: .95rem; font-weight: 600; color: var(--muted); margin-left: .15rem; }
.kpi-foot { font-size: .8rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .22rem .6rem; border-radius: 99px; background: var(--gray-bg); color: var(--muted); white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); } .b-red { background: var(--red-bg); color: var(--red); } .b-amber { background: var(--amber-bg); color: var(--amber); } .b-blue { background: var(--blue-bg); color: var(--blue); } .b-gold { background: var(--gold-100); color: #8a6000; }
[data-theme="dark"] .b-gold { background: rgba(255,197,61,.16); color: var(--gold); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd25c, #ffb300); transition: width .5s; }
.progress.green > i { background: linear-gradient(90deg, #4ade80, #16a34a); } .progress.red > i { background: linear-gradient(90deg, #f87171, #dc2626); }

/* ---------- Tables ---------- */
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.search { position: relative; flex: 1 1 220px; max-width: 360px; } .search .i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--faint); } .search input { padding-left: 2.4rem; }
.toolbar select { width: auto; min-width: 140px; } .toolbar input[type="date"] { width: auto; }
.table-wrap { overflow-x: auto; }
.card-flush .tbl-bar { padding: 1rem 1.25rem 0; margin-bottom: .9rem; }
.card-flush > .tbl-bar:first-child { padding-top: 1.1rem; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .7rem 1rem; background: var(--surface-2); white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); }
.tbl td { padding: .8rem 1rem; border-top: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.tbl .actions { text-align: right; white-space: nowrap; } .tbl .actions .btn + .btn { margin-left: .3rem; }
.cell-main { font-weight: 600; } .cell-sub { font-size: .78rem; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-top: 1px solid var(--border); font-size: .84rem; color: var(--muted); }
.empty { text-align: center; padding: 2.6rem 1rem; color: var(--muted); } .empty .em-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto .9rem; font-size: 1.5rem; color: var(--faint); } .empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: .25rem; }

/* ---------- Lists, hero, schedule ---------- */
.list-item { display: flex; align-items: center; gap: .9rem; padding: .85rem 0; border-top: 1px solid var(--border); } .list-item:first-child { border-top: 0; padding-top: 0; } .list-item:last-child { padding-bottom: 0; }
.li-main { flex: 1; min-width: 0; } .li-title { font-weight: 600; } .li-sub { font-size: .8rem; color: var(--muted); }
.time-box { width: 62px; flex: none; text-align: center; font-weight: 700; font-size: .92rem; line-height: 1.15; } .time-box small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.hero { background: radial-gradient(900px 300px at 100% -20%, rgba(255,197,61,.35), transparent 60%), linear-gradient(135deg, #131318, #0b0b0f); color: #fff; border-radius: 20px; padding: 1.6rem 1.7rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; border: 1px solid #25252e; margin-bottom: 1rem; }
.hero h2 { font-size: 1.5rem; letter-spacing: -.02em; } .hero p { color: #b3b3c0; margin-top: .35rem; }
.hero .timer { font-size: 2.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--gold); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; margin-right: .45rem; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
.day-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; min-height: 160px; }
.day-col.today { border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(255,197,61,.18); }
.day-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .6rem; display: flex; justify-content: space-between; } .day-col.today h4 { color: var(--gold-600); }
.slot { border-left: 4px solid var(--gold); background: var(--surface-2); border-radius: 10px; padding: .6rem .7rem; margin-bottom: .55rem; font-size: .82rem; } .slot b { display: block; font-size: .88rem; } .slot span { color: var(--muted); display: block; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 13px; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; } .chart .bar { fill: var(--gold); } .chart .bar.alt { fill: var(--red); opacity: .85; } .chart .bar:hover { opacity: .8; }
.chart .line { fill: none; stroke: var(--gold-600); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; } .chart .area { fill: url(#g1); } .chart .pt { fill: var(--surface); stroke: var(--gold-600); stroke-width: 2; }
.ring { position: relative; display: inline-grid; place-items: center; } .ring svg { transform: rotate(-90deg); } .ring .ring-val { position: absolute; text-align: center; font-weight: 800; font-size: 1.3rem; line-height: 1.1; } .ring .ring-val small { display: block; font-size: .68rem; color: var(--muted); font-weight: 600; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: .6rem; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; }
.hbar { display: grid; grid-template-columns: 110px 1fr 54px; gap: .7rem; align-items: center; font-size: .84rem; margin: .5rem 0; } .hbar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; } .hbar .v { text-align: right; font-weight: 700; }

/* ---------- Modal / toast / tabs ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,8,12,.55); backdrop-filter: blur(3px); z-index: 200; display: grid; place-items: center; padding: 1rem; animation: fade .15s; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; animation: pop .2s ease; }
.modal.lg { max-width: 820px; } .modal.sm { max-width: 420px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border); } .modal-head h3 { font-size: 1.1rem; }
.modal-body { padding: 1.3rem; overflow-y: auto; } .modal-foot { padding: 1rem 1.3rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 400; display: flex; flex-direction: column; gap: .6rem; max-width: min(380px, calc(100vw - 2rem)); }
.toast { display: flex; gap: .7rem; align-items: flex-start; background: var(--ink); color: #fff; padding: .85rem 1rem; border-radius: 13px; box-shadow: var(--shadow-lg); font-size: .9rem; animation: toastIn .25s ease; border-left: 4px solid var(--gold); } [data-theme="dark"] .toast { background: #26262f; }
.toast.success { border-left-color: #22c55e; } .toast.error { border-left-color: #ef4444; } .toast.warn { border-left-color: #f59e0b; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
.tabs { display: flex; gap: .25rem; padding: .25rem; background: var(--surface-2); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 1rem; }
.tab { border: 0; background: none; font: inherit; font-weight: 600; font-size: .86rem; color: var(--muted); padding: .5rem .95rem; border-radius: 9px; cursor: pointer; white-space: nowrap; } .tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.callout { padding: .85rem 1rem; border-radius: 12px; font-size: .88rem; margin: 1rem 0; background: var(--blue-bg); color: var(--blue); } .callout.warn { background: var(--amber-bg); color: var(--amber); } .callout.err { background: var(--red-bg); color: var(--red); } .callout.ok { background: var(--green-bg); color: var(--green); } .callout ul { margin: .4rem 0 0 1.1rem; padding: 0; } .callout textarea { margin-top: .6rem; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--gold-600); animation: spin .7s linear infinite; display: inline-block; } .spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; padding: 4rem 0; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 18px; } @keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Check-in stepper ---------- */
.steps { display: flex; flex-direction: column; gap: .6rem; }
.step { display: flex; gap: .9rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 14px; align-items: center; transition: border-color .2s, background .2s; }
.step .s-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 1.2rem; flex: none; }
.step .s-body { flex: 1; min-width: 0; } .step .s-body b { display: block; } .step .s-body span { font-size: .82rem; color: var(--muted); }
.step.active { border-color: var(--gold-600); background: color-mix(in srgb, var(--gold) 8%, transparent); } .step.active .s-ico { background: var(--gold); color: #1a1405; }
.step.done { border-color: color-mix(in srgb, var(--green) 40%, var(--border)); } .step.done .s-ico { background: var(--green-bg); color: var(--green); }
.step.fail { border-color: var(--red); } .step.fail .s-ico { background: var(--red-bg); color: var(--red); }
.zone-map { width: 100%; background: var(--surface-2); border-radius: 14px; border: 1px solid var(--border); }

/* ---------- Observation form ---------- */
.rubric-sec { margin-bottom: 1rem; } .rubric-sec .card-head { margin-bottom: .4rem; }
.crit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem 1rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--border); } .crit:first-of-type { border-top: 0; }
.scale { display: inline-flex; gap: .3rem; } .scale label { cursor: pointer; } .scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span { display: grid; place-items: center; width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); font-weight: 700; font-size: .9rem; color: var(--muted); background: var(--surface); transition: all .12s; }
.scale label:hover span { border-color: var(--gold-600); } .scale input:checked + span { background: var(--gold); color: #1a1405; border-color: var(--gold-600); box-shadow: 0 2px 8px -2px rgba(255,179,0,.6); } .scale input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.scale-key { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.sec-score { font-weight: 800; font-size: 1.05rem; }
.summary-bar { position: sticky; bottom: .8rem; z-index: 20; background: var(--ink); color: #fff; border-radius: 16px; padding: .85rem 1.1rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; box-shadow: var(--shadow-lg); margin-top: 1rem; } [data-theme="dark"] .summary-bar { background: #1f1f27; border: 1px solid var(--border-strong); }
.summary-bar .big { font-size: 1.6rem; font-weight: 800; color: var(--gold); line-height: 1; } .summary-bar small { color: #a9a9b6; display: block; font-size: .72rem; margin-top: .15rem; }
.score-pill { display: inline-grid; place-items: center; min-width: 46px; padding: .25rem .6rem; border-radius: 99px; font-weight: 800; font-size: .82rem; }
.sc-hi { background: var(--green-bg); color: var(--green); } .sc-mid { background: var(--amber-bg); color: var(--amber); } .sc-lo { background: var(--red-bg); color: var(--red); }
.report-head { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem 1.5rem; font-size: .88rem; margin-bottom: 1rem; } .report-head b { color: var(--muted); font-weight: 600; margin-right: .3rem; }

/* ---------- Auth + installer ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-hero { background: radial-gradient(800px 420px at 85% 0%, rgba(255,197,61,.28), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(255,140,0,.18), transparent 60%), #0b0b0f; color: #fff; padding: 3rem; display: flex; align-items: center; }
.auth-hero-inner { max-width: 520px; margin: 0 auto; } .brand-lg { font-size: 1.4rem; margin-bottom: 3rem; }
.auth-hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; } .auth-hero .lead { color: #b3b3c0; font-size: 1.08rem; margin: 1.1rem 0 2.2rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; } .auth-points li { display: flex; gap: .9rem; align-items: flex-start; } .auth-points .pt { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,197,61,.14); color: var(--gold); display: grid; place-items: center; flex: none; } .auth-points strong { display: block; } .auth-points span:not(.pt) { color: #9d9dab; font-size: .88rem; }
.auth-panel { display: grid; place-items: center; padding: 2rem; background: var(--bg); } .auth-card { width: 100%; max-width: 420px; } .auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.4rem; } .auth-brand-sm { color: var(--text); font-size: 1.05rem; } .auth-brand-sm .brand-mark { width: 34px; height: 34px; }
.auth-card h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; } .auth-card .muted { margin: .4rem 0 1.8rem; } .fine { font-size: .8rem; color: var(--faint); margin-top: 1.4rem; text-align: center; }
.install-body { background: var(--bg); } .install-wrap { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.2rem 4rem; } .install-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; } .install-head .brand-mark { width: 52px; height: 52px; font-size: 1.5rem; } .install-head h1 { font-size: 1.7rem; font-weight: 800; }
.install-wrap .card h2 { margin-bottom: .4rem; font-size: 1.15rem; } .install-form .card { margin-top: 1rem; } .install-form .btn-lg { margin-top: 1.4rem; }
.checks { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .45rem; } .checks li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; } .checks .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); } .checks .fail .dot { background: var(--red); } .checks em { margin-left: auto; color: var(--muted); font-style: normal; font-size: .8rem; text-align: right; }
.install-done { text-align: center; } .install-done .callout { text-align: left; } .done-badge { width: 68px; height: 68px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; margin: 0 auto 1rem; font-size: 2rem; }
.err-code { font-size: 6rem; font-weight: 800; letter-spacing: -.05em; background: linear-gradient(135deg, #ffd25c, #ff9f00); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: .6rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; } .scrim.show { display: block; position: fixed; inset: 0; background: rgba(8,8,12,.5); z-index: 55; }
  .menu-btn { display: inline-grid; } .topbar { padding: 0 1rem; } .view { padding: 1.1rem; }
  .week { grid-template-columns: 1fr; } .auth { grid-template-columns: 1fr; } .auth-hero { display: none; }
  .user-chip .who { display: none; } .user-chip { padding: .25rem; }
}
@media (max-width: 640px) {
  .g2, .g3, .grid-2, .grid-3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } .g4 .card { padding: .9rem; } .kpi-icon { width: 30px; height: 30px; } .kpi-label { font-size: .74rem; } .page-title { font-size: 1.4rem; } .hero { padding: 1.2rem; } .crit { grid-template-columns: 1fr; } .report-head { grid-template-columns: 1fr; }
  .modal-backdrop { align-items: end; padding: 0; } .modal { border-radius: 20px 20px 0 0; max-height: 92vh; } .kpi-value { font-size: 1.6rem; } .hbar { grid-template-columns: 80px 1fr 44px; }
  .scale span { width: 38px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Print (reports, lesson plans, observation reports) ---------- */
@media print {
  .sidebar, .topbar, .scrim, .netbar, .toasts, .page-actions, .toolbar, .btn, .summary-bar, .modal-foot, .tabs, .icon-btn { display: none !important; }
  body { background: #fff !important; color: #000 !important; } .view { padding: 0 !important; max-width: none; animation: none; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  .modal-backdrop { position: static; background: none; padding: 0; display: block; backdrop-filter: none; } .modal { box-shadow: none; border: 0; max-width: none; max-height: none; } .modal-body { overflow: visible; }
  .app > .main { display: block; }
  body.printing-modal .view, body.printing-modal .app { display: none !important; }
}
