@font-face {
  font-family: Manrope;
  src: url("fonts/manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --canvas: #f6f7f3;
  --white: #fff;
  --ink: #172c25;
  --muted: #52665e;
  --line: #e0e6dd;
  --forest: #18342d;
  --pine: #235341;
  --pine-hover: #153e2e;
  --sage: #e9efe4;
  --mint: #e5f3eb;
  --sand: #f8edda;
  --lilac: #ece9f6;
  --focus: #107d65;
  --danger: #9a2f34;
  --radius: 14px;
  --nav-size: 232px;
  font-family: Manrope, system-ui, sans-serif;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  background: var(--canvas);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: progress; opacity: .65; }
a { color: inherit; text-underline-offset: .19em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: #daeccd; color: var(--forest); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: 2rem; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
h2 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.018em; }
h3 { font-size: 1rem; }
small { font-size: .8125rem; }
svg { flex-shrink: 0; vertical-align: middle; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip:focus { position: fixed; top: .8rem; left: .8rem; z-index: 10; background: var(--white); padding: .75rem; }

#shell { display: grid; grid-template-columns: var(--nav-size) minmax(0, 1fr); min-height: 100dvh; }
#sidebar { height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; gap: 1.6rem; padding: 1.2rem .9rem 1rem; background: linear-gradient(180deg, #112b23 0%, #193b30 100%); color: #f8f6ee; overflow-y: auto; }
.brand { display: flex; gap: .55rem; align-items: center; color: inherit; text-decoration: none; font-size: 1.25rem; font-weight: 800; line-height: 1.1; letter-spacing: -.025em; }
.brand small { display: block; margin-top: .3rem; color: #e8cf8e; font-size: .75rem; font-weight: 650; letter-spacing: 0; }
.sidebar-school { display: flex; gap: .65rem; align-items: center; padding: .75rem .7rem; min-height: 56px; background: #1e4236; color: #f1f5ea; border: 1px solid rgb(234 185 73 / .35); border-radius: 10px; font-size: .8125rem; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.sidebar-school svg { color: #eab949; }
.side-navigation { display: grid; gap: .18rem; }
.nav-caption { padding: 0 .72rem .35rem; font-size: .75rem; color: #dfece0; font-weight: 700; }
.secondary-caption { margin-top: 1.3rem; }
.nav-link { display: flex; gap: .68rem; align-items: center; min-height: 44px; padding: .55rem .7rem; border-radius: 8px; color: inherit; font-size: .875rem; font-weight: 700; text-decoration: none; transition: background-color 150ms ease; }
#sidebar .nav-link { color: #e4efe6; }
#sidebar .nav-link:hover { background: #23493c; }
#sidebar .nav-link.active { color: #f8f6ee; background: #2c5748; }
#sidebar .nav-link.active svg { color: #eab949; }
#sidebar a:focus-visible { outline-color: #eab949; }
.sidebar-bottom { margin-top: auto; }
.account { display: flex; align-items: center; gap: .65rem; padding: .85rem .55rem 0; margin-top: .7rem; border-top: 1px solid #2e5346; font-size: .875rem; font-weight: 800; line-height: 1.3; }
.account small { display: block; margin-top: .2rem; color: #e8cf8e; font-weight: 600; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; border-radius: 50%; font-size: .75rem; font-weight: 800; background: var(--sage); color: var(--pine); }
.avatar.tone-0 { background: #dff1e5; color: #174932; }
.avatar.tone-1 { background: #fbf0d3; color: #694910; }
.avatar.tone-2 { background: #dff1f3; color: #164f57; }
.avatar.tone-3 { background: #fbe8e6; color: #8b2b30; }
.avatar.tone-4 { background: #ede7f7; color: #4f3a70; }
.account .avatar { background: #eab949; color: #132e26; }

#top { min-height: 68px; padding: .65rem 1.8rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--white); border-bottom: 1px solid var(--line); }
.breadcrumb, .top-actions { display: flex; gap: .65rem; align-items: center; }
.breadcrumb { font-weight: 800; font-size: .875rem; }
.breadcrumb svg, .crumb-root { color: var(--muted); }
.demo-label { display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; padding: .31rem .58rem; color: #435a3a; background: #eef3e8; border-radius: 30px; font-size: .75rem; font-weight: 800; }
.demo-label i { width: 7px; height: 7px; border-radius: 50%; background: #598559; }
.tool { border: 1px solid var(--line); display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .42rem .7rem; border-radius: 8px; color: var(--muted); background: var(--white); font-size: .875rem; font-weight: 700; }
.tool:hover { background: var(--canvas); color: var(--ink); }
.tool.icon-only { justify-content: center; width: 44px; padding: 0; }
kbd { font-family: inherit; font-size: .75rem; color: var(--muted); background: var(--canvas); border: 1px solid var(--line); border-radius: 4px; padding: .08rem .31rem; margin-left: 1rem; }
.mobile-menu.tool, #mobile-nav { display: none; }
#main { padding: 1.65rem 1.8rem 2.75rem; max-width: 1540px; margin: 0 auto; min-width: 0; }
#main:focus { outline: none; }
.page-title { margin: .18rem 0 1.4rem; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem 1.4rem; }
.page-title p { margin-top: .52rem; color: var(--muted); max-width: 64ch; }
.header-actions, .inline-actions, .quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.header-actions:empty { display: none; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 44px; padding: .53rem .78rem; border: 1px solid transparent; border-radius: 8px; background: var(--white); color: var(--ink); font-size: .875rem; text-align: center; font-weight: 800; text-decoration: none; line-height: 1.25; box-shadow: 0 1px 2px rgb(24 52 45 / .12); transition: background-color 150ms ease, border-color 150ms ease, transform 80ms ease; }
.button:active { transform: translateY(1px); }
.primary { background: var(--pine); color: white; }
.primary:hover { background: var(--pine-hover); }
.secondary { border-color: #b8c9bc; }
.secondary:hover, .text:hover { background: var(--canvas); border-color: #9cb6a1; }
.light { background: #f3f8e9; border-color: #becfb2; color: var(--pine); }
.light:hover { background: #e7f0dc; border-color: #a4bb9a; }
.text { background: transparent; color: var(--pine); padding-inline: .5rem; white-space: nowrap; box-shadow: none; }
.danger { color: var(--danger); border-color: #e8c7c8; background: #fff4f3; }
.danger:hover { background: #f8e2e0; }

.welcome { position: relative; overflow: hidden; display: flex; isolation: isolate; align-items: center; min-height: 186px; padding: 1.65rem 1.75rem; border: 1px solid #265847; border-radius: var(--radius); background: linear-gradient(135deg, #132e26 0%, #1c4839 65%, #255b49 100%); color: #f8f6ee; }
.welcome-copy { z-index: 1; }
.welcome h1 { font-size: 2.2rem; color: #f8f6ee; }
.welcome p { color: #f2d98d; margin-top: .45rem; font-weight: 700; }
.welcome .primary { background: #eab949; color: #132e26; border-color: #eab949; }
.welcome .primary:hover { background: #f2c65f; border-color: #f2c65f; }
.welcome .light { background: rgb(255 255 255 / .95); border-color: transparent; color: #132e26; }
.welcome .light:hover { background: #ffffff; }
.quick-actions { margin-top: 1.25rem; }
.horizon-art { position: absolute; width: 42%; min-width: 330px; height: 100%; right: 0; bottom: 0; z-index: -1; overflow: hidden; pointer-events: none; mask-image: linear-gradient(to right, transparent, #000 32%); }
.horizon-art span { position: absolute; width: 390px; height: 280px; right: -25px; bottom: -190px; border: 1.5px solid rgb(234 185 73 / .36); border-radius: 50% 50% 0 0; }
.horizon-art span:nth-child(2) { transform: translate(10px,-13px); }
.horizon-art span:nth-child(3) { transform: translate(20px,-26px); }
.horizon-art span:nth-child(4) { transform: translate(30px,-39px); }
.horizon-art span:nth-child(5) { transform: translate(40px,-52px); }
.horizon-art span:nth-child(6) { transform: translate(50px,-65px); }
.metric-strip, .panel { border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); min-width: 0; }
.metric-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 1.15rem 0; overflow: hidden; }
.metric { display: grid; gap: .28rem; padding: .96rem 1rem; text-decoration: none; transition: background-color 150ms ease; min-width: 0; }
.metric:hover { background: #fbfcf8; }
.metric:focus-visible { outline-offset: -3px; }
.metric:not(:last-child) { border-right: 1px solid var(--line); }
.metric-head { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .875rem; font-weight: 750; }
.tile { display: inline-grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--pine); }
.sage { background: var(--sage); }
.mint { background: var(--mint); }
.teal { background: #dff1f3; color: #164f57; }
.sand { background: var(--sand); color: #73531b; }
.lilac { background: var(--lilac); color: #54476e; }
.metric strong { font-size: 1.75rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.18; overflow-wrap: anywhere; }
.metric small, .panel-title p { color: var(--muted); }
.metric small { font-size: .8125rem; font-weight: 650; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 1.15rem; }
.panel-title { padding: 1.08rem 1rem .78rem; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .55rem; }
.panel-title p { font-size: .875rem; margin-top: .32rem; }
.panel-title select { font-size: .8125rem; min-height: 44px; }
.chart { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: .62rem; padding: .7rem 1rem 1.15rem; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: .75rem; text-align: right; height: 147px; margin-top: -.5rem; }
.chart-content { position: relative; height: 158px; }
.chart-lines { position: absolute; inset: 0 0 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-rows: repeat(4,1fr); }
.chart-lines i { border-top: 1px solid var(--line); }
.bars { display: grid; position: relative; height: 100%; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; gap: .42rem; }
.bar-col { position: relative; min-width: 0; }
.bar { position: absolute; bottom: 20px; left: 50%; width: min(66%,42px); height: calc(var(--amount) * (138 / 158)); min-height: 1px; transform: translateX(-50%); border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #8ec0a1 0%, #b7d6c2 100%); text-align: center; }
.bar span { display: inline-block; padding-top: .28rem; font-size: .75rem; font-weight: 800; color: #193e2e; }
.current .bar { background: linear-gradient(180deg, #1d573f 0%, #347758 100%); }
.current .bar span { color: #f8f6ee; }
.bar-label { position: absolute; inset: auto 0 0; text-align: center; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.queue, .feed, .search-results { list-style: none; padding: 0; margin: 0; }
.queue { padding: 0 1rem .7rem; }
.queue li + li { border-top: 1px solid var(--line); }
.queue a { display: flex; align-items: center; gap: .65rem; min-height: 61px; text-decoration: none; }
.queue a:hover .queue-copy strong { text-decoration: underline; }
.queue-copy { min-width: 0; flex: 1; display: grid; gap: .15rem; }
.queue-copy strong { font-size: .875rem; font-weight: 800; }
.queue-copy small { color: var(--muted); }
.counter { min-width: 1.65rem; text-align: center; padding: .15rem .3rem; border-radius: 6px; background: var(--canvas); font-size: .8125rem; font-weight: 800; }
.queue a > svg { color: var(--muted); }
.activity-panel { margin-top: 1.15rem; }
.activity-label { display: inline-flex; gap: .6rem; align-items: center; font-weight: 800; text-decoration: none; }
.activity-label:hover { text-decoration: underline; }
.activity-label .tile { width: 30px; height: 30px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; min-height: 70px; padding: .9rem 1rem; }
.toolbar > .status, .toolbar > strong { align-self: end; margin-bottom: .55rem; }
.register-toolbar { min-height: 0; align-items: center; padding-top: 0; }
.register-toolbar span { color: var(--muted); font-size: .875rem; font-weight: 700; }
.control { display: grid; align-content: start; gap: .32rem; min-width: 0; font-size: .875rem; font-weight: 800; }
.control small { font-weight: 600; color: var(--muted); }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 44px; border: 1px solid #ccd8cd; border-radius: 8px; padding: .52rem .65rem; background: var(--white); color: var(--ink); font-size: 1rem; font-weight: 600; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%23445e50' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right .5rem center; background-size: 1.05rem; background-repeat: no-repeat; width: auto; }
.control select { width: 100%; }
textarea { min-height: 92px; resize: vertical; }
.filter-search { flex: 0 1 290px; }
.filter-search span { display: block; position: relative; }
.filter-search svg { position: absolute; left: .65rem; top: 13px; color: var(--muted); pointer-events: none; }
.filter-search input { padding-left: 2.15rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th, td { padding: .7rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
th { background: #f8faf7; color: var(--muted); font-weight: 800; white-space: nowrap; }
td { overflow-wrap: anywhere; }
.cell-note, .person small { display: block; color: var(--muted); margin-top: .17rem; white-space: nowrap; }
.person { display: flex; align-items: center; gap: .62rem; }
.status { display: inline-flex; align-items: center; vertical-align: middle; padding: .24rem .48rem; line-height: 1.25; cursor: default; white-space: nowrap; border-radius: 6px; font-size: .8125rem; font-weight: 800; }
.status.green { color: #255b3b; background: #e7f3e9; }
.status.amber { color: #6a4a17; background: #f8edda; }
.status.red { color: #8a2d31; background: #f8e8e8; }
.status.neutral { color: #40584c; background: #edf1ec; }
.summary-note { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; padding: .8rem 1rem; border: 1px solid #d5e3ce; border-radius: 10px; color: var(--pine); background: #eaf3e5; margin-bottom: 1rem; font-size: .875rem; }
.summary-note span { color: var(--muted); }
.empty { padding: 1.7rem 1rem; text-align: center; color: var(--muted); }
.empty p { margin-top: .5rem; }
.module-groups { display: grid; gap: 1rem; }
.module-group > h2 { padding: 1.1rem 1rem; }
.module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.module-link { display: flex; min-width: 0; height: 100%; gap: .68rem; align-items: flex-start; padding: .9rem 1rem; border-top: 1px solid var(--line); text-decoration: none; }
.module-link:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
.module-link:hover { background: var(--canvas); }
.module-link span:nth-child(2) { flex: 1; min-width: 0; }
.module-link small { display: block; color: var(--muted); margin-top: .22rem; }
.module-link > svg { margin-top: .45rem; color: var(--muted); }
.feed { padding: 0 1rem .75rem; }
.feed li { border-top: 1px solid var(--line); padding: .85rem 0; overflow-wrap: anywhere; }
.feed p { margin-top: .35rem; }
.feed small { color: var(--muted); }
.feed h3 { margin-top: .28rem; }
.feed a { display: inline-block; margin-top: .5rem; color: var(--pine); }
.settings-panel { max-width: 700px; }
.settings-panel + section > .button { margin: 0 1rem 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; padding: .9rem 1rem; }
.form-grid .wide { grid-column: 1 / -1; }
.form-footer, .dialog-footer { display: flex; justify-content: end; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .85rem 1rem; border-top: 1px solid var(--line); }
.form-error { margin: 0 1rem .75rem; color: var(--danger); font-size: .875rem; font-weight: 700; }
.form-error:empty { display: none; }
#dialog { width: min(680px,calc(100% - 1.4rem)); max-height: calc(100dvh - 1.6rem); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); box-shadow: 0 18px 75px #142a2552; overflow: hidden; }
#dialog[open] { display: flex; flex-direction: column; }
#dialog::backdrop { background: #172e2bae; }
.dialog-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .62rem 1rem; border-bottom: 1px solid var(--line); background: var(--white); flex: 0 0 auto; }
.dialog-title h2 { font-size: 1.25rem; }
#dialog-form, #import-form, #reconcile-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#dialog-form .form-grid, .import-body, .print-preview { overflow-y: auto; flex: 1 1 auto; }
.dialog-footer { flex: 0 0 auto; background: var(--white); }
.confirm-copy { padding: 1rem; }
.search-dialog { padding: 1rem; }
.search-results { margin-top: .65rem; }
.search-results li > :is(a,button) { display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; width: 100%; min-height: 44px; background: none; border: 0; border-radius: 6px; text-align: left; text-decoration: none; color: var(--ink); }
.search-results li > :hover { background: var(--canvas); }
.search-results small { margin-left: auto; color: var(--muted); }
.mobile-dialog-nav { padding: .65rem; }
.mobile-dialog-nav .active { color: var(--pine); background: var(--sage); }
#toast { z-index: 12; position: fixed; right: 1rem; bottom: 1rem; max-width: min(400px,calc(100% - 2rem)); border-radius: 10px; padding: .7rem .9rem; color: white; background: var(--forest); box-shadow: 0 6px 22px #152d2640; font-size: .875rem; font-weight: 750; opacity: 0; transform: translateY(.3rem); transition: opacity 160ms ease, transform 160ms ease; pointer-events: none; }
#toast.visible { opacity: 1; transform: translateY(0); }
.print-preview { padding: 1rem; background: var(--canvas); }
.document { background: var(--white); padding: 1.3rem; border: 1px solid var(--line); border-radius: .6rem; overflow-wrap: anywhere; }
.document h2 { font-size: 1.5rem; margin: 1.15rem 0 .45rem; }
.doc-header { display: flex; align-items: center; gap: .6rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.doc-header small { display: block; margin-top: .16rem; color: var(--muted); }
.doc-ref, .doc-footer { color: var(--muted); font-size: .875rem; }
.doc-footer { margin-top: .9rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.details { margin: .8rem 0; }
.details div { display: grid; grid-template-columns: 44% minmax(0,1fr); gap: .4rem; padding: .43rem 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 800; }
.paper li { padding: .35rem 0; break-inside: avoid; }
.paper p { color: var(--muted); margin-top: .4rem; }
#print { display: none; }
@media (max-width: 1140px) {
  :root { --nav-size: 202px; }
  #top { padding-inline: 1.25rem; }
  #main { padding-inline: 1.25rem; }
  .metric { padding-inline: .72rem; }
  .metric-head { gap: .36rem; }
  .module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .module-link:not(:nth-child(3n+1)) { border-left: 0; }
  .module-link:nth-child(even) { border-left: 1px solid var(--line); }
}
@media (max-width: 910px) {
  .dashboard-columns { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric:nth-child(even) { border-right: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .horizon-art { opacity: .65; }
}
@media (max-width: 730px) {
  #shell { display: block; }
  #sidebar { display: none; }
  #top { min-height: 60px; padding: .45rem .8rem; }
  #main { padding: 1rem .8rem calc(5.4rem + env(safe-area-inset-bottom)); }
  .mobile-menu.tool { display: inline-flex; }
  .breadcrumb > svg, .crumb-root, .global-search span, .global-search kbd { display: none; }
  .global-search { width: 44px; padding: 0; justify-content: center; }
  .top-actions { gap: .42rem; }
  #mobile-nav { position: fixed; z-index: 4; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5,1fr); background: white; border-top: 1px solid var(--line); padding: .32rem .25rem calc(.32rem + env(safe-area-inset-bottom)); }
  #mobile-nav .nav-link { flex-direction: column; justify-content: center; gap: .23rem; min-height: 48px; padding: .32rem .16rem; font-size: .6875rem; text-align: center; color: var(--muted); }
  #mobile-nav .active { color: var(--pine); background: var(--sage); }
  #toast { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  .welcome { min-height: 0; padding: 1.15rem; }
  .welcome h1 { font-size: 1.85rem; }
  .horizon-art { opacity: .42; }
  .table-scroll { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { padding: .5rem .8rem; border-top: 1px solid var(--line); }
  td { padding: .28rem 0; border: 0; display: grid; grid-template-columns: minmax(86px,35%) minmax(0,1fr); align-items: center; justify-items: start; gap: .45rem; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .8125rem; font-weight: 800; }
  td select { max-width: 100%; }
  .cell-note { white-space: normal; }
  td:has(.cell-note) { display: flex; flex-wrap: wrap; }
  td:has(.cell-note)::before { flex: 0 0 calc(35% - .32rem); }
  .activity-panel td:first-child { display: block; }
  .activity-panel td:first-child::before { content: none; }
}
@media (max-width: 470px) {
  .welcome .quick-actions { display: grid; grid-template-columns: 1fr; gap: .48rem; }
  .welcome .button { min-height: 44px; width: 100%; padding-inline: .65rem; }
  .metric-head .tile { width: 29px; height: 29px; }
  .metric strong { font-size: 1.55rem; }
  .metric-head { font-size: .81rem; }
  .metric { padding: .77rem .65rem; }
  .chart, .panel-title { padding-inline: .8rem; }
  .chart .bars { gap: .16rem; }
  .bar { width: 82%; }
  .bar span { font-size: .625rem; padding-top: .22rem; letter-spacing: -.02em; }
  .module-grid { grid-template-columns: 1fr; }
  .module-link:nth-child(even) { border-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  body { min-width: auto; background: white; color: black; }
  #shell, #toast, #dialog, .skip { display: none !important; }
  #dialog::backdrop { display: none; }
  #print { display: block; }
  .document { padding: 0; border: 0; }
  .details div { break-inside: avoid; }
}
.import-body { display: grid; justify-items: start; gap: .9rem; padding: 1rem; }
.import-body p { color: var(--muted); }
.import-body .control, #import-review { width: 100%; }
.quick-mark { display: flex; gap: .35rem; flex-wrap: wrap; }
.quick-mark > .button { padding-inline: .5rem; }
.register-submit { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgb(24 52 45 / .06); border-radius: 0 0 var(--radius) var(--radius); }
.register-submit span { margin-right: auto; font-size: .875rem; font-weight: 800; color: var(--muted); }
@media (max-width: 730px) {
  .register-submit { bottom: calc(3.75rem + env(safe-area-inset-bottom)); }
  .quick-mark :is(select,button) { font-size: .875rem; }
  .parent-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.step-guide { display: flex; flex-wrap: wrap; gap: .5rem .95rem; list-style: none; margin: 0 0 1rem; padding: .68rem .9rem; background: #eef4e9; border: 1px solid #cddcc5; border-radius: 10px; font-size: .875rem; font-weight: 700; color: var(--forest); }
.step-guide li { display: inline-flex; align-items: center; gap: .45rem; }
.step-num { display: inline-grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--forest); color: #f3f8ec; font-size: .75rem; font-weight: 800; }
tbody tr[data-mark="Absent"] { background: #fff4f3; }
tbody tr[data-mark="Late"] { background: #fff9ec; }
tbody tr[data-mark="Excused"] { background: #f7f4fb; }
.quick-mark button.is-selected[data-action$=":Absent"] { background: #f9e9e8; border-color: #bf8284; color: var(--danger); }
.quick-mark button.is-selected[data-action$=":Late"] { background: var(--sand); border-color: #ba984f; color: #624412; }
.timetable-visual { margin-bottom: 1rem; overflow-x: auto; }
.timetable-board { display: grid; grid-template-columns: 82px repeat(6, minmax(120px, 1fr)); border-top: 1px solid var(--line); min-width: 800px; }
.tt-head, .tt-period, .tt-cell { padding: .6rem .65rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: .8125rem; }
.tt-head { background: #f8faf7; color: var(--muted); font-weight: 800; }
.tt-period { background: #fbfcf9; color: var(--muted); font-weight: 800; }
.tt-slot { padding: .45rem .6rem; border-radius: 8px; background: var(--mint); border: 1px solid #c6dfd0; font-size: .8125rem; line-height: 1.3; }
.tt-slot.tt-eng { background: #e2f2f4; border-color: #b7dce1; }
.tt-slot.tt-sci { background: #fbf1da; border-color: #e2cb91; }
.tt-slot.tt-lang { background: #efe9f8; border-color: #d2c5e6; }
.tt-slot + .tt-slot { margin-top: .35rem; }
.tt-slot strong { display: block; color: var(--forest); }
.tt-slot small { display: block; color: var(--muted); font-weight: 600; }
.tt-empty { color: var(--muted); font-size: .8125rem; }
.parent-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 0; }
.stacked { margin-top: 1.15rem; }
.parent-card { padding: .8rem .95rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: .28rem; align-content: start; }
.parent-card small { color: var(--muted); font-weight: 700; }
.parent-card strong { font-size: 1.15rem; font-weight: 800; color: var(--forest); }
@media (max-width: 470px) {
  .parent-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Horizon workspace visual refresh: calm, operational, and easy to scan. */
:root {
  --canvas: #f3f6f0;
  --white: #fffefa;
  --ink: #14342b;
  --muted: #536c62;
  --line: #d7e2d7;
  --forest: #123a30;
  --pine: #176346;
  --pine-hover: #0e4934;
  --sage: #e6f0e2;
  --mint: #e2f3eb;
  --sand: #f9edd8;
  --lilac: #eeeafb;
  --focus: #087f61;
  --radius: 16px;
  --nav-size: 248px;
  --motion-fast: 170ms cubic-bezier(.2,.8,.2,1);
}

body {
  background: linear-gradient(135deg, #f8faf5 0%, var(--canvas) 58%, #eef5ec 100%);
}

#sidebar {
  position: sticky;
  isolation: isolate;
  background: linear-gradient(165deg, #102a22 0%, #15392e 55%, #0e261f 100%);
  box-shadow: 10px 0 32px rgb(0 0 0 / .11);
}
#sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(120deg, rgb(234 185 73 / .06), transparent 38%);
}
.brand { letter-spacing: -.035em; }
.brand img { border-radius: 13px; box-shadow: 0 7px 18px rgb(0 0 0 / .18); }
.sidebar-school { background: rgb(255 255 255 / .08); border-color: rgb(234 185 73 / .35); }
#sidebar .nav-link { transition: background-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast); }
#sidebar .nav-link:hover { background: rgb(255 255 255 / .095); transform: translateX(2px); }
#sidebar .nav-link.active { background: rgb(234 185 73 / .18); color: #f8f6ee; box-shadow: inset 0 0 0 1px rgb(234 185 73 / .32); }
#sidebar .nav-link.active svg { color: #eab949; }

#top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(255 255 252 / .8);
  border-bottom-color: rgb(199 215 200 / .78);
}
.tool, .button { transition: transform var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast); }
.tool:hover, .button.secondary:hover, .button.light:hover { transform: translateY(-1px); }
.primary { box-shadow: 0 7px 14px rgb(0 0 0 / .16); }
.primary:hover { box-shadow: 0 10px 20px rgb(0 0 0 / .2); }
.mobile-search-label, .tool-label { display: none; }

#main { max-width: 1580px; padding-top: 2.15rem; }
.page-title { margin-bottom: 1.65rem; }
.page-title h1 { font-size: clamp(2rem, 2.7vw, 2.75rem); }
.page-title p { max-width: 58ch; font-size: .98rem; }
.panel { background: rgb(255 255 252 / .94); border-color: rgb(205 219 205 / .92); }

.welcome {
  min-height: 204px;
  padding: 1.85rem 1.95rem;
  border-color: #265847;
  background: linear-gradient(135deg, #132e26 0%, #1c4839 62%, #255b49 100%);
  color: #f8f6ee;
}
.welcome::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgb(12 31 25 / .24));
}
.welcome h1 { font-size: clamp(2.15rem, 3vw, 3rem); color: #f8f6ee; }
.welcome p { max-width: 44ch; color: #f2d98d; }
.horizon-art { opacity: .95; }
.quick-actions { gap: .65rem; }

.metric-strip {
  gap: .8rem;
  overflow: visible;
  background: transparent;
  border: 0;
}
.metric-strip .metric {
  min-height: 138px;
  padding: 1rem;
  border: 1px solid rgb(205 219 205 / .92);
  border-radius: 14px;
  background: rgb(255 255 252 / .84);
  transition: transform var(--motion-fast), border-color var(--motion-fast), background-color var(--motion-fast);
}
.metric-strip .metric:not(:last-child), .metric-strip .metric:nth-child(even), .metric-strip .metric:nth-child(n+3) { border: 1px solid rgb(205 219 205 / .92); }
.metric-strip .metric:hover { background: var(--white); border-color: #b8d1bc; transform: translateY(-2px); }
.metric-head { font-size: .79rem; letter-spacing: .01em; text-transform: uppercase; }
.metric strong { font-size: clamp(1.7rem, 2.1vw, 2.2rem); }
.metric small { line-height: 1.35; }

.chart-panel, .queue-panel { min-height: 284px; }
.chart-panel { background: linear-gradient(155deg, rgb(255 255 252 / .98), rgb(247 251 245 / .92)); }
.queue a { border-radius: 10px; padding-inline: .35rem; transition: background-color var(--motion-fast), transform var(--motion-fast); }
.queue a:hover { background: #f3f8f0; transform: translateX(2px); }
.counter { background: #edf5e9; color: var(--pine); }
.bar { background: linear-gradient(180deg, #8ec0a1 0%, #b5d5c1 100%); }
.current .bar { background: linear-gradient(180deg, #15533a 0%, #2b6e51 100%); }

.workspace-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 174px;
  padding: 1.5rem 1.65rem;
  border-radius: 20px;
  color: #f8f6ee;
  background: linear-gradient(125deg, #132e26, #1c4839 58%, #255b49 100%);
}
.workspace-hero-copy { position: relative; z-index: 1; max-width: 49rem; }
.workspace-hero h2 { font-size: clamp(1.5rem, 2vw, 2rem); letter-spacing: -.03em; color: #f8f6ee; }
.workspace-hero p { max-width: 48ch; margin-top: .45rem; color: #f2d98d; font-weight: 600; }
.workspace-count { position: relative; z-index: 1; display: grid; min-width: 138px; padding: .75rem .9rem; border: 1px solid rgb(234 185 73 / .4); border-radius: 13px; background: rgb(255 255 255 / .1); text-align: end; }
.workspace-count strong { font-size: 2rem; line-height: 1; letter-spacing: -.05em; color: #eab949; }
.workspace-count span { margin-top: .28rem; color: #f1f5ea; font-size: .75rem; font-weight: 750; }
.workspace-rings { position: absolute; inset: auto -3.5rem -7.5rem auto; z-index: -1; width: 23rem; height: 16rem; opacity: .72; }
.workspace-rings i { position: absolute; inset: 0; border: 1.5px solid rgb(234 185 73 / .45); border-radius: 50% 50% 0 0; }
.workspace-rings i:nth-child(2) { transform: translate(-1rem,-1rem); }
.workspace-rings i:nth-child(3) { transform: translate(-2rem,-2rem); }

.today-work { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 1.85rem; }
.today-work-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 92px;
  padding: .8rem .82rem;
  border: 1px solid rgb(205 219 205 / .95);
  border-radius: 14px;
  background: rgb(255 255 252 / .9);
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--motion-fast), border-color var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast);
}
.today-work-link > span:nth-child(2) { flex: 1; min-width: 0; }
.today-work-link strong, .today-work-link small { display: block; }
.today-work-link strong { font-size: .9rem; }
.today-work-link small { margin-top: .16rem; color: var(--muted); line-height: 1.35; }
.today-work-link > svg { color: #739081; }
.today-work-link:hover { border-color: #a9cbb0; background: #fbfef9; box-shadow: 0 10px 20px rgb(0 0 0 / .08); transform: translateY(-2px); }

.workspace-directory { padding-top: .25rem; }
.directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.directory-heading p, .module-group-heading p { margin-top: .3rem; color: var(--muted); }
.module-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.module-group { min-width: 0; }
.module-group-heading { display: flex; align-items: start; justify-content: space-between; gap: .75rem; min-height: 102px; padding: 1rem; border: 1px solid #d6e3d6; border-radius: 16px; }
.module-group-heading h2 { font-size: 1.05rem; }
.module-group-heading p { max-width: 26ch; font-size: .84rem; line-height: 1.4; }
.module-group-heading > span { flex: 0 0 auto; padding: .3rem .48rem; border-radius: 999px; background: rgb(255 255 255 / .55); color: #3d6250; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.group-0 .module-group-heading { background: linear-gradient(135deg, #e9f3e6, #dcebd7); }
.group-1 .module-group-heading { background: linear-gradient(135deg, #f7f0e4, #f0e4ca); border-color: #e4d7b7; }
.group-2 .module-group-heading { background: linear-gradient(135deg, #eeeafa, #e2ddf2); border-color: #d8d0e7; }
.module-grid { display: grid; grid-template-columns: 1fr; gap: .45rem; padding-top: .55rem; }
.module-group .module-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 74px;
  padding: .7rem .75rem;
  border: 1px solid rgb(211 224 212 / .94);
  border-radius: 12px;
  background: rgb(255 255 252 / .88);
  text-decoration: none;
  transition: transform var(--motion-fast), border-color var(--motion-fast), background-color var(--motion-fast), box-shadow var(--motion-fast);
}
.module-group .module-link:not(:nth-child(3n+1)), .module-group .module-link:nth-child(even) { border-left: 1px solid rgb(211 224 212 / .94); }
.module-link > span:nth-child(2) { flex: 1; min-width: 0; }
.module-link strong { font-size: .875rem; }
.module-link small { line-height: 1.35; }
.module-link > svg { color: #789184; transition: transform var(--motion-fast), color var(--motion-fast); }
.group-0 .module-link .tile { background: #e6f2e6; color: #246348; }
.group-1 .module-link .tile { background: #f9eed9; color: #805a1c; }
.group-2 .module-link .tile { background: #eeeafa; color: #604c83; }
.module-group .module-link:hover { border-color: #aac7af; background: var(--white); box-shadow: 0 8px 18px rgb(0 0 0 / .08); transform: translateY(-2px); }
.module-group .module-link:hover > svg { color: var(--pine); transform: translateX(2px); }

@supports ((backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px))) {
  #top, #mobile-nav {
    background: linear-gradient(118deg, rgb(255 255 254 / .82), rgb(239 248 237 / .72));
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
  }
}

@media (max-width: 1180px) {
  .module-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 730px) {
  #top { padding-inline: .65rem; }
  #main { padding-top: 1.35rem; }
  .mobile-menu.tool { display: inline-flex; width: auto; padding-inline: .54rem; gap: .32rem; }
  .mobile-menu .tool-label, .global-search .mobile-search-label { display: inline; font-size: .75rem; }
  .global-search .desktop-search-label { display: none; }
  .global-search { width: auto; padding-inline: .54rem; gap: .32rem; }
  .global-search kbd { display: none; }
  #mobile-nav { border-top-color: rgb(197 214 198 / .86); box-shadow: 0 -10px 24px rgb(0 0 0 / .08); }
  #mobile-nav .active { background: rgb(224 242 225 / .82); }
  .workspace-hero { min-height: 0; align-items: start; padding: 1.2rem; }
  .workspace-count { min-width: 104px; padding: .65rem .7rem; }
  .workspace-count strong { font-size: 1.65rem; }
  .workspace-rings { right: -8rem; bottom: -8.5rem; opacity: .42; }
  .today-work { margin-bottom: 1.45rem; }
  .directory-heading { align-items: start; }
  .module-groups { grid-template-columns: 1fr; }
}
@media (max-width: 470px) {
  .page-title { margin-bottom: 1.2rem; }
  .page-title h1 { font-size: 1.86rem; }
  .workspace-hero { display: block; }
  .workspace-count { width: fit-content; margin-top: 1rem; text-align: start; }
  .today-work { grid-template-columns: 1fr; gap: .55rem; }
  .today-work-link { min-height: 70px; }
  .directory-heading { display: grid; }
  .directory-heading .button { justify-self: start; }
  .module-group-heading { min-height: 0; }
}
@media (max-width: 410px) {
  .global-search .mobile-search-label { display: none; }
}
@media (max-width: 360px) {
  .demo-label { width: 32px; justify-content: center; padding-inline: 0; font-size: 0; }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  #top, #mobile-nav { background: var(--white); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
