:root {
  color-scheme: light;
  --ink: #211a39;
  --muted: #69647a;
  --purple: #5935cc;
  --purple-dark: #4424a9;
  --line: #e9e5ef;
  --surface: #fff;
  --canvas: #f7f6fb;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled { cursor: default; }
:focus-visible { outline: 3px solid #916aff; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 3.7vw, 2.3rem); font-weight: 760; letter-spacing: -.055em; line-height: 1.12; }
h2 { font-size: 1.18rem; letter-spacing: -.025em; line-height: 1.25; }
h3 { font-size: .98rem; }
p { line-height: 1.55; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; inset: 10px auto auto 10px; width: auto; height: auto; clip-path: none; padding: 10px; background: #fff; }
.shell { display: grid; grid-template-columns: 239px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 29px 17px 17px; background: #211a39; color: #fff; overflow: auto; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 34px; font-size: 1.18rem; font-weight: 750; letter-spacing: -.035em; white-space: nowrap; }
.brand small { display: block; color: #c6b7f0; margin-top: 4px; font-size: .58rem; font-weight: 700; letter-spacing: .13em; }
.brand-mark, .school-mark { display: grid; flex: none; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: #a988ff; color: #241345; font-size: 24px; line-height: 1; }
.nav-section { margin-bottom: 22px; }
.nav-label { color: #bdb1d6; margin: 0 11px 8px; display: block; font-size: .65rem; font-weight: 750; letter-spacing: .105em; }
nav a { display: flex; align-items: center; gap: 11px; color: #e1d9ef; padding: 10px 11px; border-radius: 8px; margin-bottom: 4px; min-height: 41px; font-size: .86rem; font-weight: 570; }
nav a:hover { background: #34274e; }
nav a[aria-current] { color: #fff; background: #51368b; font-weight: 690; }
nav .icon { color: #c9b6ff; }
.icon { display: inline-grid; place-items: center; width: 19px; flex: none; font-size: 1.12em; line-height: 1; }
.school { margin-top: auto; border: 1px solid #4a3d62; color: #fff; background: #2b2244; border-radius: 11px; padding: 10px; display: flex; align-items: center; gap: 9px; text-align: left; width: 100%; }
.school:hover { background: #3a2b55; }
.school-mark { height: 32px; width: 32px; font-size: 18px; color: #f1e9ff; background: #513c72; border-radius: 8px; }
.school > span:nth-child(2) { flex: 1; min-width: 0; }
.school strong, .school small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.school strong { font-size: .77rem; }
.school small { font-size: .67rem; color: #ccc0e2; margin-top: 3px; }
.main { display: flex; min-width: 0; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); min-height: 68px; padding: 10px clamp(18px, 3.2vw, 45px); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crumb, .top-actions { display: flex; align-items: center; gap: 12px; font-size: .84rem; color: var(--muted); }
.crumb strong { color: var(--ink); }
.top-home { font-size: 1.15rem; }
.period-label { gap: 7px; display: flex; align-items: center; padding-left: 10px; border: 1px solid var(--line); border-radius: 8px; }
.period-label select { color: var(--ink); font-weight: 620; border: 0; padding: 8px 8px 8px 0; background: transparent; }
.menu-toggle { display: none; background: #f3edff; padding: 6px 9px; border: 0; border-radius: 7px; color: var(--ink); }
#content { width: min(100%, 1490px); margin: 0 auto; flex: 1; padding: 29px clamp(18px, 3.2vw, 45px) 36px; }
.footer { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); padding: 16px clamp(18px, 3.2vw, 45px); font-size: .75rem; }
.page-heading, .dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-heading p, .dashboard-heading p { color: var(--muted); margin-top: 7px; font-size: .92rem; }
.demo-tag { display: inline-flex; align-items: center; white-space: nowrap; gap: 6px; color: #624796; background: #eee8fa; padding: 6px 10px; border-radius: 99px; font-size: .74rem; font-weight: 680; }
.demo-tag span { width: 6px; height: 6px; background: #8c67d9; border-radius: 50%; }
.hero { min-height: 254px; border-radius: 17px; background: linear-gradient(110deg, #36236a, #583596 62%, #734db5); color: #fff; display: flex; align-items: center; overflow: hidden; isolation: isolate; position: relative; }
.hero-copy { padding: 25px 31px; width: min(59%, 495px); position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; background: #ffffff20; padding: 6px 10px; border-radius: 5px; font-size: .72rem; font-weight: 650; align-items: center; gap: 4px; }
.hero h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); font-weight: 740; line-height: .99; letter-spacing: -.052em; margin: 11px 0; }
.hero p { font-size: .87rem; color: #eee4ff; max-width: 350px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; text-align: center; min-height: 39px; padding: 8px 13px; border-radius: 8px; border: 1px solid transparent; font-size: .82rem; font-weight: 670; line-height: 1.25; }
.button:hover { filter: brightness(.96); }
.hero-button { background: #fff; color: #43247c; margin-top: 17px; }
.hero-button span { margin-left: 10px; }
.primary { background: var(--purple); color: #fff; }
.primary:hover { background: var(--purple-dark); }
.subtle { border-color: #e8e1f4; color: #563c8c; background: #fbf9ff; }
.danger { color: #a32749; background: #fff0f4; border-color: #f1dbe3; }
.small { min-height: 33px; font-size: .75rem; padding: 7px 10px; }
.full { display: flex; width: 100%; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 48%; min-width: 365px; display: grid; place-items: center; pointer-events: none; }
.orbit { width: 322px; height: 151px; border: 1px solid #dfc9ff40; border-radius: 50%; position: absolute; transform: rotate(-24deg); }
.orbit-b { width: 355px; height: 174px; }
.orbit-c { width: 394px; height: 208px; }
.art-sheet, .art-book { position: absolute; width: 125px; height: 153px; border-radius: 9px; box-shadow: 0 13px 23px #1b0d4d4d; }
.art-sheet { background: #ebe0ff; transform: translate(42px,-3px) rotate(17deg); padding: 28px 14px 0; }
.art-sheet i { display: block; margin-bottom: 13px; background: #b4a0e0; width: 90%; height: 3px; border-radius: 10px; }
.art-book { background: linear-gradient(125deg, #d8c7ff, #a68aee); transform: translate(-21px,6px) rotate(-12deg); padding: 19px 16px; border-left: 7px solid #9877dc; color: #35205c; }
.art-book span { font-size: 1.13rem; line-height: 1; font-weight: 850; letter-spacing: .025em; display: block; margin-bottom: 11px; }
.art-book i { display: block; width: 62px; height: 2px; border-radius: 8px; background: #52388275; margin-top: 5px; }
.art-book i:nth-of-type(3) { width: 41px; }
.art-book b { display: block; font-size: .65rem; margin-top: 12px; letter-spacing: .13em; }
.art-check { position: absolute; display: grid; place-items: center; width: 51px; height: 51px; border-radius: 16px; background: #b8f0db; color: #26694f; font-size: 1.6rem; font-weight: 780; transform: translate(101px, 46px) rotate(9deg); box-shadow: 0 9px 20px #23144750; }
.spark { position: absolute; color: #d9c5ff; font-size: 1.4rem; }
.spark-a { transform: translate(-117px,-54px); }.spark-b { transform: translate(115px,-72px); }.spark-c { transform: translate(-105px,68px); color: #acf0d8; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 17px 0; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 5px #2a144b06; }
.stat { padding: 14px 15px; display: grid; gap: 3px; align-content: start; }
.stat:hover { border-color: #c49fff; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.stat-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-size: 1.16rem; font-weight: 650; }
.purple, .avatar-0 { background: #f0e7ff; color: #6339a2; }
.blue, .avatar-1 { background: #e7eeff; color: #395ab0; }
.orange, .avatar-2 { background: #fff0de; color: #93500d; }
.mint, .avatar-3 { background: #e1f5ec; color: #23734e; }
.stat-arrow { color: #756985; font-size: .87rem; }
.stat strong { font-size: 1.62rem; letter-spacing: -.055em; line-height: 1.12; }
.stat-label { color: var(--muted); font-size: .78rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(220px, 1fr); gap: 15px; align-items: start; }
.card-head { padding: 17px 17px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head p { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; text-align: left; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f8f6fc; color: #605572; font-size: .75rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td strong { font-weight: 680; }
td small, .person small { color: var(--muted); font-size: .73rem; }
.line { display: block; margin-top: 4px; }
.person { display: flex; align-items: center; gap: 9px; min-width: 112px; }
.person strong, .person small { display: block; }
.person small { margin-top: 3px; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font-size: .78rem; font-weight: 750; }
.current-user { color: #5b378c; background: #eee4fd; border-radius: 50%; }
.bar-cell { display: flex; gap: 8px; align-items: center; min-width: 90px; }
.bar-cell b { font-size: .76rem; min-width: 33px; text-align: right; }
progress { width: 100%; height: 7px; border: 0; background: #efe8f8; border-radius: 7px; overflow: hidden; color: #9672df; }
progress::-webkit-progress-bar { background: #efe8f8; }
progress::-webkit-progress-value { background: #9672df; border-radius: 7px; }
progress::-moz-progress-bar { background: #9672df; border-radius: 7px; }
.text-button, .back, .close-button { color: #57408e; background: transparent; border: 0; border-radius: 7px; font-weight: 700; }
.text-button, .close-button { font-size: 1.14rem; padding: 5px 9px; }
.text-button:hover, .back:hover, .close-button:hover { background: #f1eafd; }
.back { padding: 6px 8px; margin: -3px 0 13px -8px; font-size: .83rem; }
.summary { padding-bottom: 13px; }
.summary > .button, .summary-legend { margin: 0 13px; width: auto; }
.ring { width: 114px; height: 114px; margin: 2px auto 12px; border-radius: 50%; background: conic-gradient(#8b62d7 var(--progress), #eee7f8 0); display: grid; place-items: center; }
.ring div { display: grid; place-content: center; text-align: center; width: 89px; height: 89px; background: #fff; border-radius: 50%; }
.ring strong { font-size: 1.6rem; letter-spacing: -.06em; }
.ring span, .summary-legend { color: var(--muted); font-size: .74rem; }
.summary-legend { display: grid; gap: 4px; margin-bottom: 10px; }
.summary-legend span { display: flex; align-items: center; gap: 6px; }
.summary-legend i { width: 8px; height: 8px; border-radius: 50%; background: #8b62d7; }
.summary-legend span:nth-child(2) i { background: #e9ddf6; }
.summary-legend b { margin-left: auto; color: var(--ink); }
.heading-actions, .inline-actions, .form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 15px; align-items: center; }
.filters .search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search input { padding-left: 33px; }
.search .icon { position: absolute; inset: 10px auto auto 9px; color: var(--muted); font-size: 1.1rem; pointer-events: none; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #dcd5e7; border-radius: 7px; background: #fff; color: var(--ink); font-size: .87rem; min-height: 37px; }
input::placeholder { color: #736981; }
input:disabled, textarea:disabled { background: #f8f6fb; color: #4d435e; opacity: 1; }
textarea { resize: vertical; }
label { display: grid; gap: 5px; font-size: .81rem; font-weight: 640; }
.empty { text-align: center; padding: 37px 13px; color: var(--muted); }
.align-right { text-align: right; }
.pill { display: inline-block; border-radius: 99px; padding: 4px 8px; font-size: .71rem; font-weight: 680; white-space: nowrap; }
.green { background: #e3f6ed; color: #1c714b; }
.violet { background: #eee6fc; color: #5d388f; }
.amber { background: #fff1da; color: #80500f; }
.grey { background: #efedf3; color: #625a71; }
.objective { display: block; min-width: 155px; max-width: 370px; overflow-wrap: anywhere; }
.form-card { margin-bottom: 13px; }
.subject-row { display: grid; gap: 15px; grid-template-columns: minmax(170px, 1fr) minmax(230px, 1.55fr); padding: 15px 17px; border-top: 1px solid var(--line); }
.subject-row p { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.subject-row .pill { margin: 5px 0; }
.subject-inputs { display: grid; align-items: start; gap: 9px; grid-template-columns: 105px 1fr; }
.form-empty { padding: 13px 17px 20px; color: var(--muted); }
.padded { padding: 17px; }
.padded h2, .padded > p, .padded h3 { margin-bottom: 12px; }
.padded > p { color: var(--muted); font-size: .84rem; }
.form-grid, .attendance, .settings-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.attendance { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid + h3 { margin-top: 15px; }
.form-actions { justify-content: flex-end; }
.stack { display: grid; gap: 12px; align-content: start; }
.stack > button { justify-self: start; }
.settings-grid { align-items: start; }
.period-list { list-style: none; padding: 0; margin: 0 0 13px; }
.period-list li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.file-button { position: relative; cursor: pointer; }
.file-button:focus-within { outline: 3px solid #916aff; outline-offset: 3px; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; }
dialog { width: min(92vw, 490px); max-height: 90vh; border: 0; border-radius: 13px; padding: 0; box-shadow: 0 15px 65px #22134250; color: var(--ink); }
dialog::backdrop { background: #22183788; }
.dialog-head, .dialog-actions { display: flex; align-items: center; gap: 8px; padding: 14px 17px; }
.dialog-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 17px; }
.dialog-actions { border-top: 1px solid var(--line); }
.dialog-actions > span { flex: 1; }
.form-error { color: #971b40; font-size: .81rem; }
#toast { visibility: hidden; position: fixed; bottom: 18px; right: 18px; z-index: 4; max-width: min(390px, calc(100vw - 36px)); padding: 12px 16px; border-radius: 9px; background: #2b1c47; color: #fff; font-size: .86rem; box-shadow: 0 6px 19px #23124050; }
#toast.visible { visibility: visible; }
.paper { margin: 0 auto; max-width: 830px; background: white; color: #1d1a22; border: 1px solid var(--line); padding: clamp(18px, 4vw, 43px); }
.report-head { position: relative; text-align: center; padding-bottom: 13px; border-bottom: 2px solid #2b2532; }
.report-head h2 { font-size: 1.4rem; margin: 3px 0; }
.report-head p { font-size: .82rem; }
.draft-mark { display: inline-block; margin-top: 7px; color: #8a4d04; border: 1px solid; padding: 2px 7px; font-size: .75rem; }
.identity { margin: 14px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.identity div { display: grid; gap: 3px; }
.identity dt { color: #5a5261; font-size: .72rem; }
.identity dd { margin: 0; font-size: .83rem; font-weight: 650; overflow-wrap: anywhere; }
.paper th, .paper td { border: 1px solid #c7c0cc; vertical-align: top; padding: 8px; }
.paper th { white-space: normal; }
.paper td:nth-child(2) { width: 28%; }
.report-note { margin-top: 14px; font-size: .82rem; }
.report-note h3 { font-size: .87rem; margin-bottom: 3px; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.signatures { margin-top: 19px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; font-size: .75rem; }
.signatures div { display: flex; flex-direction: column; justify-content: space-between; overflow-wrap: anywhere; }
.signatures strong { display: block; padding-top: 37px; }
.batch-print { display: none; }
@media (max-width: 1090px) {
  .shell { grid-template-columns: 201px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .dash-grid { grid-template-columns: minmax(0, 1.65fr) minmax(185px, 1fr); }
}
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; position: relative; height: auto; }
  .menu-open .sidebar { display: flex; }
  .menu-toggle { display: inline-block; }
  .menu-open .sidebar .brand { margin-bottom: 20px; }
}
@media (max-width: 570px) {
  .top-home, .top-home + span, .current-user { display: none; }
  .topbar { gap: 6px; min-height: 55px; padding-inline: 13px; }
  .crumb, .top-actions { gap: 7px; font-size: .75rem; }
  .period-label { gap: 3px; padding-left: 5px; }
  .period-label select { font-size: .75rem; }
  #content { padding: 20px 13px; }
  .page-heading, .dashboard-heading { align-items: flex-start; }
  .page-heading { flex-direction: column; }
  .dashboard-heading p { font-size: .8rem; }
  .demo-tag { margin-top: 2px; }
  .hero { min-height: 225px; }
  .hero-copy { width: 84%; padding: 18px; }
  .hero-art { opacity: .36; right: -100px; transform: scale(.83); }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; margin: 11px 0; }
  .dash-grid, .settings-grid, .subject-row { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .subject-inputs { grid-template-columns: 83px minmax(0, 1fr); }
  th, td { padding-inline: 9px; }
  .identity { gap: 7px; }
}
@media print {
  @page { size: A4; margin: 13mm; }
  :root, body { background: #fff; }
  .shell, .main, #content { display: block; margin: 0; padding: 0; width: auto; }
  .topbar, .sidebar, .footer, #toast, dialog, .skip, #content > :not(.printable) { display: none !important; }
  .paper { max-width: none; padding: 0; border: 0; }
  .paper table { table-layout: fixed; }
  .paper th:first-child { width: 8%; }
  .paper th:nth-child(2) { width: 29%; }
  .paper th:nth-child(3) { width: 10%; }
  .paper .table-wrap { overflow: visible; }
  .paper td { overflow-wrap: anywhere; }
  .identity, .report-head, .signatures, .report-note, tr { break-inside: avoid; }
  .printing-batch .shell { display: none; }
  .printing-batch .batch-print { display: block; }
  .batch-print .paper + .paper { break-before: page; }
}
