:root {
  color-scheme:light;
  font-family:"Manrope","DM Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#17191b;
  background:#f6f7f9;
  font-synthesis:none;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  --bg:#f6f7f9;
  --panel:#fff;
  --panel-soft:#f1f3f5;
  --text:#17191b;
  --muted:#626973;
  --border:#dce0e5;
  --accent:#c4e84d;
  --accent-hover:#b5dc35;
  --accent-soft:#f1f4e5;
  --accent-ink:#30351b;
  --accent-text:#454d20;
  --input:#fff;
  --focus:#424a20;
  --danger:#a94637;
  --danger-soft:#fbefeb;
  --maintenance:#fff1d9;
  --maintenance-ink:#715013;
  --maintenance-line:#bd8b2d;
  --lesson:#efe9fa;
  --lesson-ink:#624580;
  --lesson-line:#9f7cbd;
  --event:#e5effd;
  --event-ink:#355d88;
  --event-line:#7298c6;
  --sidebar-width:232px;
  --court-count:3;
  --timeline-height:640px;
}
* { box-sizing:border-box; }
body { margin:0; min-width:320px; font-size:14px; line-height:1.5; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.5; }
a { color:var(--accent-text); text-underline-offset:3px; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline:2px solid var(--focus);
  outline-offset:3px;
}
[hidden] { display:none!important; }
svg { flex-shrink:0; vertical-align:middle; }
button svg { width:18px; height:18px; }
h1,h2,h3,p { margin-top:0; }
h1,h2,h3 { color:var(--text); }
body[data-theme=dark] {
  color-scheme:dark;
  --bg:#101214;
  --panel:#1b1e21;
  --panel-soft:#23272c;
  --text:#f3f4f6;
  --muted:#a4aab3;
  --border:#30343a;
  --accent:#c4e84d;
  --accent-hover:#d1f068;
  --accent-soft:#303527;
  --accent-ink:#e4edc4;
  --accent-text:#c4e84d;
  --input:#171a1e;
  --focus:#c4e84d;
  --danger:#efaa9b;
  --danger-soft:#452c27;
  --maintenance:#3c3222;
  --maintenance-ink:#f0d59a;
  --maintenance-line:#bda05f;
  --lesson:#352c43;
  --lesson-ink:#ddcaf1;
  --lesson-line:#a88cc6;
  --event:#253448;
  --event-ink:#c5dbf4;
  --event-line:#809fc5;
  color:var(--text);
  background:var(--bg);
}
.shell { display:grid; grid-template-columns:var(--sidebar-width) minmax(0,1fr); min-height:100dvh; }
.sidebar {
  position:fixed; inset:0 auto 0 0; z-index:40; display:flex; flex-direction:column; gap:5px;
  width:var(--sidebar-width); padding:28px 18px 18px; overflow-y:auto; overscroll-behavior:contain;
  background:#191c20; color:#f3f4f6; border-right:1px solid #30343a;
}
.brand { display:flex; align-items:center; gap:10px; padding:0 11px 24px; color:#f3f4f6; font-size:25px; font-weight:750; letter-spacing:-1px; text-decoration:none; }
.brand svg,.brand img { width:33px; height:33px; object-fit:contain; }
.brand>span { margin-left:-8px; color:#c4e84d; }
.brand small { display:block; margin-top:2px; color:#aeb4bd; font-size:10px; font-weight:500; letter-spacing:2px; text-transform:uppercase; }
.workspace { margin:0 8px 23px; padding:12px 10px; border:1px solid #3c424a; border-radius:11px; background:#ffffff05; }
.workspace strong { display:block; font-size:12px; font-weight:650; }
.workspace small { display:block; margin-top:3px; color:#aeb4bd; font-size:11px; }
.workspace>small:first-child { margin:0 0 7px; font-size:8px; font-weight:650; letter-spacing:1.4px; }
.workspace>span { display:block; margin-top:4px; color:#aeb4bd; font-size:10px; }
.sidebar nav { display:grid; gap:5px; }
.nav-button {
  display:flex; align-items:center; gap:11px; width:100%; min-height:44px; padding:11px 13px;
  border:1px solid transparent; border-radius:9px; background:transparent; color:#c6cbd2;
  font-size:13px; font-weight:550; text-align:left; text-decoration:none;
}
.nav-button svg { width:19px; height:19px; opacity:.85; }
.nav-button small { display:grid; place-items:center; min-width:20px; min-height:20px; margin-left:auto; padding:1px 5px; border:1px solid #4a515b; border-radius:5px; color:#dce0e5; font-size:10px; font-variant-numeric:tabular-nums; }
.nav-button:hover:not(:disabled) { color:#fff; background:#ffffff0b; }
.nav-button.active { color:#c4e84d; background:#2b3036; border-color:#454c55; font-weight:650; }
.nav-button:focus-visible,.sidebar button:focus-visible,.sidebar a:focus-visible { outline-color:#c4e84d; }
.sidebar-footer { display:flex; align-items:center; gap:10px; margin-top:auto; padding:30px 6px 0; color:#aeb4bd; font-size:11px; }
.sidebar-footer p { margin-bottom:8px; }
.sidebar-footer>div:not(.avatar) { flex:1; min-width:0; }
.sidebar-footer strong { display:block; color:#e8ebef; font-weight:600; line-height:1.45; }
.sidebar-footer small { display:block; margin-top:4px; font-size:9px; line-height:1.55; }
.sidebar-footer .avatar { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; border:1px solid #4a515b; border-radius:50%; background:#30363e; color:#edf0f4; font-size:11px; font-weight:650; }
.sidebar-footer .button { width:100%; margin-top:9px; color:#e8ebef; border-color:#3c424a; background:transparent; }
.sidebar-footer .button:hover { background:#ffffff0b; }
.main { grid-column:2; display:flex; flex-direction:column; min-width:0; min-height:100dvh; }
.topbar {
  position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:16px;
  min-height:72px; padding:14px 32px; border-bottom:1px solid var(--border); background:var(--panel);
}
.main>.topbar { flex-shrink:0; }
.breadcrumbs { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; color:var(--muted); font-size:12px; }
.breadcrumbs strong { color:var(--text); font-weight:600; }
.breadcrumbs span[aria-hidden] { color:var(--muted); opacity:.65; }
.top-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-shrink:0; }
.top-actions select { width:auto; max-width:145px; min-height:40px; padding:8px 28px 8px 10px; border:1px solid var(--border); border-radius:9px; color:var(--text); background:var(--input); font-size:12px; }
.content { display:flex; flex:1; flex-direction:column; gap:20px; min-width:0; width:100%; max-width:1600px; margin-inline:auto; padding:28px 32px 12px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; min-width:0; }
.page-heading h1 { margin-bottom:6px; font-size:28px; font-weight:700; line-height:1.2; letter-spacing:-1px; }
.page-heading p { max-width:640px; margin-bottom:0; color:var(--muted); font-size:13px; }
.page-heading .eyebrow { margin-bottom:7px; color:var(--accent-text); font-size:9px; font-weight:650; letter-spacing:1.6px; line-height:1.5; }
.page-heading>.row { flex-shrink:0; }
.button {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:0; min-height:40px;
  padding:10px 14px; border:1px solid var(--border); border-radius:9px; background:var(--panel);
  color:var(--text); font-size:12px; font-weight:650; line-height:1.3; text-decoration:none;
  transition:background .15s,border-color .15s,color .15s;
}
.button:hover:not(:disabled) { border-color:var(--muted); background:var(--panel-soft); }
.button:active:not(:disabled) { transform:translateY(1px); }
.button.primary { color:#17191b; background:var(--accent); border-color:var(--accent); }
.button.primary:hover:not(:disabled) { color:#17191b; background:var(--accent-hover); border-color:var(--accent-hover); }
.button.secondary { background:var(--panel); border-color:var(--border); }
.button.ghost { background:transparent; border-color:transparent; color:var(--muted); }
.button.ghost:hover:not(:disabled) { color:var(--text); background:var(--panel-soft); border-color:var(--border); }
.button.danger { color:var(--danger); background:var(--danger-soft); border-color:transparent; }
.button.danger:hover:not(:disabled) { border-color:var(--danger); background:var(--danger-soft); }
.button.icon,.close,.mobile-menu-button { display:inline-flex; align-items:center; justify-content:center; width:40px; min-width:40px; height:40px; min-height:40px; padding:0; }
.close,.mobile-menu-button { border:1px solid var(--border); border-radius:9px; color:var(--muted); background:var(--panel); }
.close:hover,.mobile-menu-button:hover { color:var(--text); background:var(--panel-soft); }
.demo-banner { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:7px 15px; border:1px solid color-mix(in srgb,var(--accent) 20%,var(--border)); border-radius:10px; background:var(--accent-soft); color:var(--accent-ink); font-size:12px; }
.demo-banner strong { font-weight:700; }
.demo-banner p { margin:0; }
.demo-banner .demo-dot { flex:0 0 6px; width:6px; height:6px; border-radius:50%; background:var(--accent); }
.demo-banner>span:not(.demo-dot) { flex:1; min-width:180px; }
.demo-banner .button { min-height:40px; margin-left:auto; padding:7px 9px; background:transparent; border-color:transparent; color:inherit; font-size:11px; }
.stats-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.stat-card { position:relative; min-width:0; padding:16px 18px; border:1px solid var(--border); border-radius:12px; background:var(--panel); }
.stat-card strong { display:block; margin:2px 0 3px; color:var(--text); font-size:27px; font-weight:700; line-height:1.2; font-variant-numeric:tabular-nums; letter-spacing:-.8px; }
.stat-card strong>span { display:inline-block; margin-left:9px; color:var(--muted); font-size:11px; font-weight:450; letter-spacing:0; line-height:1.5; vertical-align:middle; }
.stat-card small { display:block; color:var(--muted); font-size:11px; line-height:1.4; }
.stat-card>span { display:block; margin-bottom:6px; color:var(--muted); font-size:11px; }
.stat-card svg { color:var(--accent-text); }
.panel { min-width:0; border:1px solid var(--border); border-radius:13px; background:var(--panel); }
.panel>header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:17px 20px; border-bottom:1px solid var(--border); }
.panel h2,.panel h3 { margin-bottom:5px; font-size:15px; font-weight:650; letter-spacing:-.2px; }
.panel>p { color:var(--muted); }
.toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-width:0; padding:12px 15px; border:1px solid var(--border); border-radius:12px; background:var(--panel); }
.toolbar>.row { margin-left:auto; justify-content:flex-end; }
.date-navigation { display:flex; align-items:center; gap:6px; min-width:0; }
.date-title { display:grid; justify-items:center; gap:1px; min-width:165px; padding-inline:6px; color:var(--text); font-size:12px; font-weight:650; text-align:center; font-variant-numeric:tabular-nums; }
.date-title strong { font-size:12px; font-weight:650; line-height:1.4; }
.date-title input { display:block; width:138px; max-width:100%; min-height:27px; padding:2px 5px; border:1px solid var(--border); border-radius:5px; background:var(--input); color:var(--muted); font-size:10px; font-weight:500; line-height:1.4; }
.view-toggle { display:inline-flex; gap:3px; padding:3px; border:1px solid var(--border); border-radius:10px; background:var(--panel-soft); }
.view-toggle button { min-height:40px; padding:7px 13px; border:0; border-radius:7px; background:transparent; color:var(--muted); font-size:12px; font-weight:600; }
.view-toggle .active { color:var(--accent-ink); background:var(--accent-soft); }
.filter { display:flex; align-items:center; gap:8px; min-width:0; margin-left:auto; color:var(--muted); font-size:12px; }
.filter input,.filter select { min-width:0; width:auto; max-width:210px; min-height:40px; padding:8px 11px; border:1px solid var(--border); border-radius:9px; color:var(--text); background:var(--input); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
select.filter { display:block; flex:0 1 auto; min-width:140px; max-width:220px; min-height:40px; margin:0; padding:8px 30px 8px 11px; border:1px solid var(--border); border-radius:9px; color:var(--text); background:var(--input); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agenda-panel { overflow:hidden; }
.agenda-panel>.toolbar { border:0; border-bottom:1px solid var(--border); border-radius:12px 12px 0 0; }
.agenda-panel>.agenda { border:0; border-radius:0; }
.agenda-meta { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:5px 16px; padding:8px 15px; border-bottom:1px solid var(--border); background:var(--panel-soft); color:var(--muted); font-size:10px; }
.agenda-meta>span { display:inline-flex; align-items:center; gap:6px; }
.agenda-meta svg { width:14px; height:14px; }
.agenda { overflow:auto; overscroll-behavior-x:contain; background:var(--panel); border:1px solid var(--border); border-radius:13px; }
.court-headers { position:sticky; top:0; z-index:5; display:grid; grid-template-columns:64px repeat(var(--court-count),minmax(180px,1fr)); min-width:700px; background:var(--panel); border-bottom:1px solid var(--border); }
.court-headers>div { display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; min-height:58px; padding:10px 14px; border-left:1px solid var(--border); color:var(--text); font-size:12px; font-weight:650; }
.court-headers>div:first-child { border-left:0; color:var(--muted); font-size:10px; font-weight:500; }
.court-headers small { color:var(--muted); font-size:10px; font-weight:450; }
.timeline { position:relative; display:flex; min-width:700px; height:var(--timeline-height); padding-left:64px; isolation:isolate; }
.time-axis,.time-column { position:absolute; top:0; bottom:0; left:0; width:64px; }
.time-label { position:absolute; left:0; width:56px; padding-right:10px; transform:translateY(-50%); color:var(--muted); font-size:10px; font-weight:500; text-align:right; font-variant-numeric:tabular-nums; line-height:1; pointer-events:none; }
.time-axis>.time-label:first-child,.time-column>.time-label:first-child { transform:translateY(2px); }
.court-column { position:relative; flex:1 1 0; min-width:180px; min-height:100%; border-left:1px solid var(--border); background:var(--panel); }
.grid-line { position:absolute; left:0; right:0; z-index:0; height:1px; border-top:1px solid var(--border); pointer-events:none; }
.grid-line.half { border-top-style:dashed; opacity:.55; }
.block {
  --block-bg:var(--maintenance); --block-ink:var(--maintenance-ink); --block-line:var(--maintenance-line);
  position:absolute; left:6px; right:6px; z-index:2; display:flex; flex-direction:column; gap:2px; min-height:28px;
  padding:6px 9px; overflow:hidden; border:1px solid color-mix(in srgb,var(--block-line) 45%,transparent); border-left:3px solid var(--block-line);
  border-radius:8px; background:var(--block-bg); color:var(--block-ink); font-size:11px; line-height:1.35; text-align:left;
}
button.block { cursor:pointer; min-height:1px; }
.block:hover { border-color:var(--block-line); }
.block[data-reason=lesson] { --block-bg:var(--lesson); --block-ink:var(--lesson-ink); --block-line:var(--lesson-line); }
.block[data-reason=event] { --block-bg:var(--event); --block-ink:var(--event-ink); --block-line:var(--event-line); }
.block { gap:1px; }
.block-time { color:var(--block-ink); font-size:9px; font-weight:550; font-variant-numeric:tabular-nums; line-height:1.2; }
.block-title { display:block; min-width:0; overflow:hidden; color:var(--block-ink); font-size:11px; font-weight:700; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.block-kind { font-size:9px; line-height:1.2; }
.block.short { padding:0; }
.block.short>* { display:none; }
.block.compact { gap:1px; padding:4px 8px; }
.block.compact .block-kind { display:none; }
.block[data-reason],.week-grid .week-block[data-reason] { border-left:4px solid var(--type-color); background:color-mix(in srgb,var(--type-color) 12%,var(--panel)); color:var(--text); }
.block[data-reason]:hover,.week-block[data-reason]:hover { outline:1px solid var(--type-color); outline-offset:-1px; }
.block[data-reason] .block-time,.block[data-reason] .block-title { color:var(--text); }
.block[data-reason] .block-kind { color:var(--muted); }
.block-top { display:flex; justify-content:space-between; align-items:center; min-width:0; gap:4px; }
.block-time { flex-shrink:0; }
.court-badge { display:inline-flex; align-items:center; gap:5px; min-width:0; max-width:100%; padding:2px 5px; border:1px solid var(--border); border-radius:5px; background:var(--panel); color:var(--text); font-size:9px; font-weight:600; line-height:1.3; }
.court-badge>span { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.court-badge>i,.court-heading>i { display:block; flex:0 0 auto; width:7px; height:7px; border-radius:50%; background:var(--court-color); box-shadow:0 0 0 1px color-mix(in srgb,var(--text) 20%,transparent); }
.court-heading { display:flex; align-items:center; gap:8px; min-width:0; }
.court-heading>i { width:9px; height:9px; }
.court-badges { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:4px; padding-top:6px; }
.week-kind { display:block; padding-top:3px; color:var(--muted); font-size:10px; }
.block.compact .court-badge { display:none; }
.block.short>* { display:none; }
.type-card>header { align-items:center; }
.type-sample { display:inline-flex; align-items:center; gap:10px; min-width:0; color:var(--text); font-size:15px; font-weight:700; }
.type-sample>i { display:block; width:4px; height:26px; border-radius:3px; background:var(--type-color); box-shadow:0 0 0 1px color-mix(in srgb,var(--text) 12%,transparent); }
.type-card footer { gap:6px; }
.color-field { min-width:0; }
.color-control { display:flex; align-items:center; flex-wrap:wrap; gap:10px; min-height:46px; padding:6px 9px; border:1px solid var(--border); border-radius:9px; background:var(--input); color:var(--text); }
.color-control input[type=color] { width:42px; height:32px; min-height:32px; padding:2px; border:1px solid var(--border); border-radius:6px; cursor:pointer; }
.color-control output { font-size:12px; font-variant-numeric:tabular-nums; }
.color-control>span { margin-left:auto; color:var(--muted); font-size:11px; }
.court-card .court-icon { color:var(--court-color); background:color-mix(in srgb,var(--court-color) 10%,var(--panel)); }
.short-blocks { display:flex; flex-direction:column; flex-shrink:0; gap:8px; padding:12px 15px; border-top:1px solid var(--border); background:var(--panel); }
.short-blocks>header { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:11px; }
.short-blocks>header strong,.short-blocks h3 { margin:0; color:var(--text); font-size:12px; font-weight:650; }
.short-blocks>header p { margin:0; color:var(--muted); font-size:11px; }
.short-blocks button.secondary { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:5px 9px; width:100%; min-height:40px; padding:9px 11px; border:1px solid var(--border); border-radius:8px; background:var(--panel-soft); color:var(--text); font-size:12px; text-align:left; }
.short-blocks button.secondary:hover { border-color:var(--muted); }
.short-blocks button.secondary small { color:var(--muted); font-size:11px; }
.empty-message { display:grid; place-items:center; gap:7px; min-height:160px; padding:24px; color:var(--muted); font-size:13px; text-align:center; }
.empty-message strong { color:var(--text); font-size:15px; }
.empty-message p { max-width:430px; margin:0; }
.legend { display:flex; align-items:center; flex-wrap:wrap; gap:9px 20px; color:var(--muted); font-size:11px; }
.legend>span { display:inline-flex; align-items:center; gap:7px; }
.agenda-panel>.legend { flex-shrink:0; padding:10px 15px; border-top:1px solid var(--border); }
.agenda-panel>.legend { max-height:88px; overflow:auto; }
.legend>small { margin-left:auto; color:var(--muted); font-size:10px; }
.legend i { display:inline-block; width:9px; height:9px; border:1px solid var(--maintenance-line); border-radius:3px; background:var(--maintenance); }
.legend [data-reason=maintenance] i,i[data-reason=maintenance] { border-color:var(--maintenance-line); background:var(--maintenance); }
.legend [data-reason=lesson] i,i[data-reason=lesson] { border-color:var(--lesson-line); background:var(--lesson); }
.legend [data-reason=event] i,i[data-reason=event] { border-color:var(--event-line); background:var(--event); }
.week-grid { display:grid; grid-template-columns:repeat(7,minmax(125px,1fr)); gap:0; min-width:0; overflow-x:auto; border:1px solid var(--border); border-radius:12px; background:var(--panel); }
.week-day { min-height:290px; padding:12px 9px; border-left:1px solid var(--border); }
.week-day:first-child { border-left:0; }
.week-day>header { display:flex; flex-direction:column; gap:2px; padding-bottom:12px; margin-bottom:12px; border-bottom:1px solid var(--border); color:var(--muted); font-size:11px; }
.week-day>header strong { color:var(--text); font-size:16px; font-weight:650; font-variant-numeric:tabular-nums; }
.week-day.today>header { color:var(--accent-text); }
.week-day.today>header strong { color:var(--accent-text); }
.agenda-panel>.week-grid { border:0; border-radius:0; }
.week-date { display:block; width:100%; min-height:40px; margin-bottom:14px; padding:8px; border:1px solid transparent; border-radius:7px; background:var(--panel-soft); color:var(--text); font-size:11px; font-weight:650; text-align:center; }
.week-date:hover { border-color:var(--border); }
.week-day[data-today=true]>.week-date { background:var(--accent-soft); color:var(--accent-ink); }
.empty-day { display:block; padding:7px 2px; font-size:10px; }
.week-block { display:block; width:100%; min-height:40px; margin-bottom:8px; padding:9px 8px; border:1px solid var(--border); border-left:3px solid var(--maintenance-line); border-radius:7px; background:var(--maintenance); color:var(--maintenance-ink); font-size:10px; line-height:1.45; text-align:left; }
.week-block strong { display:block; font-size:11px; font-weight:650; }
.week-block[data-reason=lesson] { background:var(--lesson); color:var(--lesson-ink); border-left-color:var(--lesson-line); }
.week-block[data-reason=event] { background:var(--event); color:var(--event-ink); border-left-color:var(--event-line); }
.cards-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; align-items:start; }
.court-card,.report-card,.settings-card { min-width:0; padding:19px; border:1px solid var(--border); border-radius:12px; background:var(--panel); }
.court-card h2,.court-card h3,.report-card h2,.report-card h3,.settings-card h2,.settings-card h3 { margin-bottom:6px; font-size:16px; font-weight:650; letter-spacing:-.3px; }
.court-card p,.report-card p,.settings-card p { color:var(--muted); font-size:12px; line-height:1.65; }
.court-card>header,.report-card>header,.settings-card>header { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:9px; margin-bottom:14px; }
.court-card>footer,.report-card>footer,.settings-card>footer { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding-top:14px; margin-top:15px; border-top:1px solid var(--border); }
.court-card.archived { background:var(--panel-soft); }
.court-card.archived h3 { color:var(--muted); }
.court-icon { display:grid; place-items:center; width:42px; height:42px; margin-bottom:13px; border:1px solid var(--border); border-radius:11px; background:var(--accent-soft); color:var(--accent-ink); }
.court-icon svg { width:23px; height:23px; }
.card-actions { justify-content:flex-start; gap:8px; padding-top:14px; margin-top:17px; border-top:1px solid var(--border); }
.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding-bottom:17px; margin-bottom:20px; border-bottom:1px solid var(--border); }
.section-heading p { margin:0; }
.section-heading>svg { width:23px; height:23px; color:var(--accent); }
.form-actions { padding-top:17px; margin-top:20px; border-top:1px solid var(--border); }
.reports-toolbar p { margin:0; font-size:12px; }
.report-card .resolution { padding:11px 12px; margin-top:14px; border:1px solid var(--border); border-left:3px solid var(--accent); border-radius:7px; background:var(--panel-soft); }
.report-card .resolution strong { color:var(--text); font-size:11px; font-weight:650; }
.report-card .resolution p { margin:5px 0 0; }
.status { display:inline-flex; align-items:center; gap:5px; width:max-content; max-width:100%; padding:4px 8px; border:1px solid var(--border); border-radius:6px; color:var(--muted); background:var(--panel-soft); font-size:10px; font-weight:650; line-height:1.45; }
.status.open { color:var(--lesson-ink); background:var(--lesson); border-color:transparent; }
.status.review { color:var(--maintenance-ink); background:var(--maintenance); border-color:transparent; }
.status.proposed { color:var(--event-ink); background:var(--event); border-color:transparent; }
.status.resolved { color:var(--accent-ink); background:var(--accent-soft); border-color:transparent; }
.row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; min-width:0; }
.muted { color:var(--muted); }
.row .muted,small.muted { font-size:11px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.field { display:flex; flex-direction:column; gap:7px; min-width:0; color:var(--text); font-size:12px; font-weight:550; }
.field.full { grid-column:1/-1; }
.field input,.field select,.field textarea {
  display:block; width:100%; min-width:0; min-height:42px; padding:10px 11px; border:1px solid var(--border);
  border-radius:8px; color:var(--text); background:var(--input); font-size:13px; font-weight:450; line-height:1.4;
}
.field input::placeholder,.field textarea::placeholder { color:var(--muted); opacity:1; }
.field textarea { min-height:104px; max-height:280px; resize:vertical; }
.field :is(input,select,textarea):hover:not(:disabled) { border-color:var(--muted); }
.field :is(input,select,textarea)[aria-invalid=true] { border-color:var(--danger); }
.field small { color:var(--muted); font-size:11px; font-weight:450; line-height:1.5; }
.field input[type=checkbox],.field input[type=radio] { display:inline-block; width:18px; height:18px; min-height:18px; padding:0; accent-color:var(--accent); }
.field input[type=color] { padding:4px; }
.field:has(>input[type=checkbox]),.field:has(>input[type=radio]) { flex-direction:row; align-items:center; gap:8px; }
.court-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; padding:11px; border:1px solid var(--border); border-radius:9px; }
.court-choices legend { padding-inline:5px; font-size:12px; font-weight:600; }
.court-choices label { display:flex; align-items:center; gap:9px; min-height:40px; padding:8px; border:1px solid var(--border); border-radius:7px; color:var(--text); background:var(--panel-soft); font-size:12px; font-weight:450; cursor:pointer; }
.court-choices label:has(input:checked) { background:var(--accent-soft); border-color:color-mix(in srgb,var(--accent) 45%,var(--border)); }
fieldset { min-width:0; }
.modal {
  width:min(620px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); margin:auto; padding:0;
  overflow:hidden; border:1px solid var(--border); border-radius:16px; background:var(--panel); color:var(--text);
  font:inherit; box-shadow:0 18px 60px #00000024;
}
dialog.modal:not([open]) { display:none; }
dialog.modal[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.modal:has(>form)[open] { grid-template-rows:auto minmax(0,1fr); }
.modal::backdrop { background:#1012148a; backdrop-filter:blur(3px); }
.modal>form { display:grid; grid-template-rows:minmax(0,1fr) auto; min-height:0; margin:0; overflow:hidden; }
.modal>header,.modal>form>header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 20px; border-bottom:1px solid var(--border); }
.modal header h2 { margin:0; color:var(--text); font-size:19px; font-weight:650; letter-spacing:-.5px; }
.modal header p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.modal-body { min-height:0; padding:20px; overflow-y:auto; overscroll-behavior:contain; }
.modal-footer { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:9px; padding:14px 20px; border-top:1px solid var(--border); background:var(--panel); }
.modal-backdrop { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:16px; overflow:auto; background:#1012148a; }
.error-message { margin:0; padding:10px 12px; border:1px solid color-mix(in srgb,var(--danger) 20%,var(--border)); border-radius:8px; color:var(--danger); background:var(--danger-soft); font-size:12px; line-height:1.5; }
.help-panel { padding:18px 20px; border:1px solid var(--border); border-radius:12px; background:var(--panel-soft); }
.help-panel h2,.help-panel h3 { margin-bottom:8px; font-size:15px; font-weight:650; }
.help-panel p { margin-bottom:0; color:var(--muted); font-size:12px; line-height:1.65; }
.help-step { display:flex; align-items:flex-start; gap:11px; min-width:0; padding-block:11px; border-bottom:1px solid var(--border); }
.help-step:last-child { padding-bottom:0; border-bottom:0; }
.help-step strong { display:block; margin-bottom:3px; font-size:12px; font-weight:650; }
.help-step p { margin:0; font-size:12px; }
.help-step h3 { margin:0 0 4px; font-size:13px; }
.modal>.help-panel { border:0; border-radius:0; background:var(--panel); }
.help-step>span:first-child { display:grid; place-items:center; flex:0 0 25px; width:25px; height:25px; border-radius:7px; background:var(--accent-soft); color:var(--accent-ink); font-size:11px; font-weight:700; }
.toast { position:fixed; right:24px; bottom:max(20px,env(safe-area-inset-bottom)); z-index:120; max-width:min(420px,calc(100vw - 32px)); padding:13px 17px; border:1px solid var(--border); border-radius:11px; color:var(--text); background:var(--panel); box-shadow:0 4px 20px #00000014; font-size:12px; }
.mobile-menu-button,.button.mobile-menu-button { display:none; }
.menu-scrim { display:none; }
.app-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px 18px; margin-top:auto; padding:18px 32px; color:var(--muted); font-size:10px; }
.app-footer p { margin:0; }
.app-footer a { color:inherit; }
.content>.app-footer { padding:6px 0 2px; }
.app-footer small { margin-left:3px; font-size:9px; }
@media(min-width:1100px) {
  .main:has(.agenda-panel) { height:100dvh; min-height:0; overflow:hidden; }
  .content:has(>.agenda-panel) { min-height:0; padding-block:20px 10px; gap:16px; }
  .content:has(>.agenda-panel)>:not(.agenda-panel) { flex-shrink:0; }
  .agenda-panel { display:flex; flex:1; flex-direction:column; min-height:0; }
  .agenda-panel>:is(.toolbar,.agenda-meta) { flex-shrink:0; }
  .agenda-panel>.agenda,.agenda-panel>.week-grid { flex:1; min-height:0; max-height:none; }
}
@media(max-width:1100px) {
  .topbar { padding-inline:24px; }.content { padding:24px; gap:17px; }.app-footer { padding-inline:24px; }
  .toolbar { gap:10px; }.filter { margin-left:0; }.date-title { min-width:140px; font-size:12px; }
}
@media(max-width:900px) {
  .shell { grid-template-columns:minmax(0,1fr); }.main { grid-column:1; }
  .sidebar { transform:translateX(-100%); transition:transform .2s ease; }
  .shell.menu-open .sidebar { transform:translateX(0); }
  .shell.menu-open .menu-scrim { display:block; position:fixed; inset:0; z-index:35; width:100%; height:100%; padding:0; border:0; border-radius:0; background:#10121482; }
  .mobile-menu-button,.button.mobile-menu-button { display:inline-flex; }
  .topbar { gap:12px; min-height:64px; padding:12px 20px; }.breadcrumbs { flex:1; font-size:11px; gap:6px; }.top-actions { gap:6px; }
  .content { padding:22px 20px 10px; }.page-heading h1 { font-size:26px; }.page-heading p { font-size:12px; }
  .agenda { max-height:600px; }.app-footer { padding-inline:20px; }
}
@media(max-width:600px) {
  body { font-size:13px; }.topbar { padding:10px 14px; gap:9px; }.top-actions select { max-width:104px; padding-inline:7px; font-size:11px; }
  .topbar .breadcrumbs { max-width:calc(100vw - 210px); font-size:10px; line-height:1.4; }.topbar .breadcrumbs strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .topbar .breadcrumbs { max-width:none; flex-wrap:nowrap; }.topbar .breadcrumbs>span:first-of-type { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .top-actions [data-action=help] { position:relative; width:40px; min-width:40px; height:40px; padding:0; }.top-actions [data-action=help]>span { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .content { padding:19px 14px 8px; gap:16px; }.page-heading { align-items:flex-start; flex-direction:column; gap:13px; }.page-heading h1 { margin-bottom:5px; font-size:25px; }.page-heading p { font-size:12px; }
  .page-heading>.row { width:100%; justify-content:flex-start; }.page-heading .button { min-height:42px; }
  .demo-banner { gap:7px; padding:10px 12px; font-size:11px; }.demo-banner .button { padding-inline:0; }
  .stats-grid { gap:8px; grid-template-columns:repeat(3,minmax(0,1fr)); }.stat-card { padding:12px 10px; border-radius:10px; }.stat-card strong { font-size:23px; }.stat-card small,.stat-card>span { font-size:10px; }.stat-card svg { width:16px; height:16px; }
  .stat-card strong>span { display:block; margin:5px 0 0; font-size:10px; line-height:1.4; }
  .toolbar { gap:10px; padding:10px; }.date-navigation { flex:1 1 100%; width:100%; justify-content:space-between; }.date-title { flex:1; min-width:0; padding:0; font-size:12px; }
  .toolbar .view-toggle { flex:1; justify-content:center; }.view-toggle button { flex:1; min-height:40px; padding:7px 10px; }
  .filter { flex:1; margin-left:0; justify-content:flex-end; }.filter select,.filter input { flex:1; width:100%; max-width:170px; min-height:42px; font-size:12px; }
  .toolbar>.row { width:100%; margin:0; justify-content:space-between; }.toolbar select.filter { flex:1; min-width:0; max-width:none; min-height:42px; font-size:13px; }
  .date-title strong { font-size:11px; }.date-title input { width:130px; font-size:11px; }.agenda-meta { padding-inline:11px; gap:4px 12px; font-size:9px; }
  .agenda { max-height:520px; min-width:0; }.court-headers,.timeline { min-width:700px; }.court-headers>div { min-height:54px; }.legend { gap:8px 13px; font-size:10px; }
  .week-grid { grid-template-columns:repeat(7,140px); }.week-day { min-height:250px; }
  .cards-grid { grid-template-columns:minmax(0,1fr); gap:12px; }.court-card,.report-card,.settings-card { padding:16px; }.court-card h2,.court-card h3,.report-card h3 { font-size:15px; }
  .form-grid { grid-template-columns:minmax(0,1fr); gap:14px; }.field { font-size:12px; }.field input,.field select,.field textarea { min-height:44px; font-size:16px; }
  .court-choices { grid-template-columns:minmax(0,1fr); }.court-choices input[type=checkbox] { min-height:18px; }
  .modal { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); border-radius:13px; }.modal>header,.modal>form>header { padding:13px 15px; }.modal header h2 { font-size:17px; }.modal-body { padding:16px; }.modal-footer { padding:12px 15px; }
  .help-panel { padding:16px; }.app-footer { padding:16px 14px; font-size:10px; }.toast { right:16px; bottom:max(16px,env(safe-area-inset-bottom)); }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
}
@media(min-width:900px) and (max-height:800px) {
  .main:has(.agenda-panel) { height:auto; min-height:100dvh; overflow:visible; }
  .main:has(.agenda-panel)>.topbar { min-height:64px; padding-block:10px; }
  .content:has(>.agenda-panel) { gap:12px; padding-block:14px 8px; }
  .content:has(>.agenda-panel)>.page-heading .eyebrow,
  .content:has(>.agenda-panel)>.page-heading h1+p { display:none; }
  .content:has(>.agenda-panel)>.page-heading h1 { margin:0; font-size:24px; }
  .content:has(>.agenda-panel)>.stats-grid { gap:10px; }
  .content:has(>.agenda-panel) .stat-card { padding:10px 14px; }
  .content:has(>.agenda-panel) .stat-card strong { margin:3px 0 0; font-size:24px; }
  .content:has(>.agenda-panel) .stat-card strong>span { display:none; }
  .content:has(>.agenda-panel) .stat-card small { font-size:10px; }
  .content:has(>.agenda-panel)>.agenda-panel { flex:0 0 auto; min-height:0; }
  .content:has(>.agenda-panel)>.agenda-panel>.agenda { flex:0 0 auto; height:358px; min-height:358px; max-height:358px; }
}

/* Real-session states. Demo styling and application geometry remain independent. */
.auth-shell { display:grid; place-items:center; min-height:100dvh; padding:32px 20px; background:var(--bg); }
.auth-card { width:min(100%,440px); padding:28px; border:1px solid var(--border); border-radius:16px; background:var(--panel); }
.auth-shell .brand { justify-content:center; padding:0 0 26px; color:var(--text); }
.auth-card h1 { margin:0 0 9px; font-size:25px; font-weight:700; letter-spacing:-.8px; line-height:1.2; }
.auth-card>p,.auth-card header p { color:var(--muted); font-size:13px; line-height:1.65; }
.auth-card form { display:grid; gap:15px; margin-top:22px; }
.auth-card form>.button,.auth-card>.button { width:100%; }
.auth-card .error-message { margin:12px 0; }
.auth-card .muted { font-size:11px; line-height:1.6; }
.auth-actions { display:grid; gap:9px; margin-top:20px; }
.auth-links { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:18px; font-size:12px; }
.auth-note { padding-top:17px; margin-top:20px; border-top:1px solid var(--border); color:var(--muted); font-size:11px; line-height:1.6; }
.loading { display:flex; align-items:center; justify-content:center; gap:10px; min-height:110px; padding:22px; color:var(--muted); font-size:13px; text-align:center; }
.loading::before { content:""; flex:0 0 17px; width:17px; height:17px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:remote-loading .9s linear infinite; }
.remote-banner { display:flex; align-items:center; flex-wrap:wrap; gap:7px 12px; padding:10px 14px; border:1px solid var(--border); border-radius:10px; background:var(--accent-soft); color:var(--accent-ink); font-size:12px; }
.remote-banner strong { font-weight:650; }
.remote-banner p { flex:1; margin:0; }
.remote-banner .button { margin-left:auto; }
.remote-banner.error { border-color:color-mix(in srgb,var(--danger) 25%,var(--border)); background:var(--danger-soft); color:var(--danger); }
.remote-banner.pending { background:var(--lesson); color:var(--lesson-ink); }
.tenant-switcher { display:grid; gap:4px; min-width:0; max-width:280px; color:var(--muted); font-size:10px; font-weight:550; }
.tenant-switcher select,select.tenant-switcher { display:block; width:100%; min-width:0; min-height:40px; max-width:280px; padding:8px 29px 8px 11px; border:1px solid var(--border); border-radius:8px; color:var(--text); background:var(--input); font:inherit; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tenant-switcher select:disabled,select.tenant-switcher:disabled { opacity:.6; cursor:default; }
.account-menu { position:relative; display:flex; align-items:center; gap:8px; min-width:0; max-width:260px; }
.account-menu .account-name { display:block; max-width:160px; overflow:hidden; color:var(--text); font-size:11px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.account-menu small { display:block; max-width:160px; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.account-menu .avatar { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:50%; background:var(--accent-soft); color:var(--accent-ink); font-size:11px; font-weight:650; }
.access-state { display:flex; align-items:center; flex-direction:column; gap:12px; width:min(100%,650px); min-height:230px; margin:24px auto; padding:30px; text-align:center; }
.access-state h2 { margin:0; font-size:20px; font-weight:650; }
.access-state p { max-width:460px; margin:0; color:var(--muted); font-size:13px; line-height:1.65; }
.access-state .row { justify-content:center; margin-top:5px; }
.draft-notice { padding:11px 13px; border:1px solid var(--border); border-radius:8px; background:var(--lesson); color:var(--lesson-ink); font-size:12px; line-height:1.6; }
.button[aria-busy=true] { cursor:progress; }
@keyframes remote-loading { to { transform:rotate(360deg); } }
@media(max-width:600px) {
  .auth-shell { padding:20px 16px; }.auth-card { padding:23px 20px; border-radius:13px; }.auth-card h1 { font-size:23px; }
  .remote-banner { padding:10px 12px; font-size:11px; }.remote-banner .button { margin-left:0; }
  .topbar:has(.tenant-switcher) { flex-wrap:wrap; }.top-actions:has(.tenant-switcher) { width:100%; flex-wrap:wrap; justify-content:space-between; }
  .tenant-switcher { flex:1; max-width:230px; }.tenant-switcher select,select.tenant-switcher { max-width:230px; font-size:13px; }
  .account-menu { max-width:160px; }.account-menu .account-name,.account-menu small { max-width:100px; }
  .access-state { margin-top:16px; padding:24px 18px; }
}
