:root {
  color-scheme: light;
  --background: #f6f5f9;
  --surface: #fff;
  --ink: #201f36;
  --muted: #625f76;
  --line: #e7e4ee;
  --sidebar: #191832;
  --brand: #5d36b3;
  --lavender: #d3c5ff;
  --violet: #6543b4;
  --teal: #247366;
  --amber: #9d561e;
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --heading: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font: 500 14px/1.5 var(--font);
  background: var(--background);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
svg { flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 2px solid #8558e3; outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 10; left: 12px; top: 12px; padding: 10px 15px; background: white; border-radius: 8px; }

#app { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; min-height: 575px; display: flex; flex-direction: column; background: var(--sidebar); color: #eeebff; padding: 28px 17px 19px; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 10px 32px; font: 750 25px/1 var(--heading); letter-spacing: -.055em; }
.brand-icon { width: 38px; height: 38px; border-radius: 11px; background: #d1bfff; color: #2d1c54; display: grid; place-items: center; }
.brand small, .academy small { display: block; color: #b6b0cd; font-size: 10.5px; letter-spacing: 0; font-weight: 550; margin-top: 5px; }
.academy { display: flex; align-items: center; gap: 10px; margin: 0 2px 24px; padding: 10px; border: 1px solid #383554; border-radius: 10px; background: #22203d; }
.academy-mark { flex: 0 0 32px; display: grid; place-items: center; height: 32px; border-radius: 7px; background: #353153; color: #e6dcff; font-weight: 700; }
.academy strong { font-size: 13px; overflow-wrap: anywhere; }
.academy small { font-size: 11px; line-height: 1; margin-top: 3px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a, .sidebar-foot a { display: flex; align-items: center; gap: 12px; border-radius: 7px; padding: 10px 13px; min-height: 43px; color: #cfcae3; }
.sidebar a:hover { background: #2b2848; }
.sidebar .brand:hover { background: transparent; }
.sidebar a[aria-current="page"] { color: #f2eaff; font-weight: 700; background: #39305c; box-shadow: inset 2px 0 #ccbbff; }
.sidebar a[aria-current="page"] svg { color: #d3bfff; }
.sidebar-foot { margin-top: auto; }
.sidebar-foot a span { flex: 1; }
.sandbox { display: flex; align-items: center; gap: 7px; border-top: 1px solid #393553; margin: 12px 5px 0; padding: 14px 7px 2px; color: #bdb6d3; font-size: 11px; white-space: nowrap; }
.sandbox span { width: 6px; height: 6px; border-radius: 50%; background: #c4aefc; }
.staff-profile { display: grid; overflow-wrap: anywhere; gap: 2px; margin: 12px 5px 0; padding: 12px 8px 3px; border-top: 1px solid #393553; }
.staff-profile small { color: #bdb6d3; font-size: 11px; }
.button.staff-logout { color: #e6dfff; justify-content: flex-start; width: 100%; }
.button.staff-logout:hover { background: #2b2848; }

#app.staff-entry { grid-template-columns: minmax(0, 1fr); place-items: center; padding: 24px 15px; }
.staff-entry-main { width: min(100%, 420px); }
.staff-entry-card { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.entry-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 750 24px/1 var(--heading); letter-spacing: -.045em; margin-bottom: 24px; }
.staff-entry h1 { font-size: 27px; }
.staff-entry h1 + p { margin-top: 14px; color: var(--muted); }
.staff-login { margin-top: 19px; }
.staff-login .button { justify-self: start; min-width: 104px; }
.staff-login .button:disabled { opacity: .6; }

.work { min-width: 0; }
.topbar { min-height: 67px; padding: 11px 34px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.breadcrumb, .top-controls { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.breadcrumb { min-width: 0; }
.breadcrumb span, .breadcrumb svg { color: var(--muted); }
.breadcrumb > span { overflow: hidden; text-overflow: ellipsis; }
.breadcrumb strong { font-size: 13px; }
.branch-picker { position: relative; display: flex; align-items: center; color: var(--ink); }
.branch-picker svg { position: absolute; pointer-events: none; left: 11px; color: var(--brand); }
.branch-picker svg:last-child { left: auto; right: 10px; }
.branch-picker select { appearance: none; cursor: pointer; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 8px 29px 8px 34px; font-weight: 650; font-size: 12px; max-width: min(210px, 44vw); text-overflow: ellipsis; }
.top-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eee7ff; color: #553096; font-size: 11px; font-weight: 750; }
.mobile-menu, .scrim { display: none !important; }

.main { max-width: 1460px; margin: auto; padding: 29px 34px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
h1 { font: 750 clamp(27px, 3.3vw, 38px)/1.12 var(--heading); letter-spacing: -.045em; }
.page-head p { color: var(--muted); margin-top: 8px; }
.date-divider { margin-inline: 7px; color: #837b99; }
.button, .icon-button { min-height: 40px; border: 1px solid transparent; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; color: var(--brand); background: transparent; white-space: nowrap; font-size: 13px; font-weight: 700; }
.icon-button { width: 40px; height: 40px; padding: 0; }
.primary { background: var(--brand); color: white; }
.primary:hover { background: #4d2b99; }
.secondary { border-color: #dfd7ee; background: #f9f6ff; }
.secondary:hover, .quiet:hover, .icon-button:hover { background: #efe8fa; }
.danger { color: #963a4b; }
.danger:hover { background: #f9e9ed; }

.hero { position: relative; background: #211c49; overflow: hidden; border-radius: 13px; color: #fff; min-height: 205px; display: flex; isolation: isolate; }
.hero-content { padding: 23px 26px; max-width: 63%; }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; color: #e8dcff; border: 1px solid #5b4b82; background: #312657; border-radius: 5px; padding: 4px 8px; }
.hero h2 { font: 750 clamp(24px, 3vw, 35px)/1.15 var(--heading); letter-spacing: -.04em; margin-top: 11px; }
.hero p { color: #dcd4f3; display: flex; align-items: center; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.hero p span { width: 3px; height: 3px; border-radius: 50%; background: #b8a6df; margin-inline: 3px; }
.hero-button { margin-top: 16px; background: #d9caff; color: #29194f; }
.hero-button:hover { background: #efe6ff; }
.mat-art { position: absolute; z-index: -1; inset: 0 0 0 57%; overflow: hidden; background: #322659; mask-image: linear-gradient(90deg, transparent, #000 23%); }
.mat-grid { position: absolute; width: 480px; height: 280px; right: -62px; top: -53px; border: 1px solid #8269b0; transform: skewY(-18deg) scaleY(.86) rotate(-12deg); background: repeating-linear-gradient(0deg, #a28ac454 0 1px, transparent 1px 29px), repeating-linear-gradient(90deg, #a28ac454 0 1px, transparent 1px 29px); }
.mat-ring { position: absolute; width: 225px; height: 156px; border: 2px solid #c5aaee; left: 118px; top: 58px; box-shadow: inset 0 0 0 10px #b598de30, 0 0 0 9px #b598de20; background: #7153a44a; }
.mat-ring i { position: absolute; width: 15px; height: 15px; border: 3px solid #e5d4ff; }
.mat-ring i:nth-child(1) { left: -4px; top: -4px; border-right: 0; border-bottom: 0; }
.mat-ring i:nth-child(2) { right: -4px; top: -4px; border-left: 0; border-bottom: 0; }
.mat-ring i:nth-child(3) { left: -4px; bottom: -4px; border-right: 0; border-top: 0; }
.mat-ring i:nth-child(4) { right: -4px; bottom: -4px; border-left: 0; border-top: 0; }
.hero-index { position: absolute; right: 17px; bottom: 12px; color: #e1d1ff; font-size: 10px; font-weight: 700; letter-spacing: .12em; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 19px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.metrics.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric { min-width: 0; padding: 13px 17px 14px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric:hover { background: #faf7ff; }
.metric:first-child { border-radius: 10px 0 0 10px; }
.metric:last-child { border-radius: 0 10px 10px 0; }
.metric-top { color: #8c82a2; display: flex; justify-content: space-between; align-items: center; }
.tile-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 7px; background: #f1eaff; color: var(--violet); flex-shrink: 0; }
.tile-icon.green, .tile-icon.teal { background: #e2f3eb; color: var(--teal); }
.tile-icon.orange, .tile-icon.amber { background: #fbeedc; color: #90501c; }
.tile-icon.blue { background: #e7ecfe; color: #4b53ad; }
.metric-value { font-size: clamp(22px, 2.5vw, 31px); letter-spacing: -.045em; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 6px; }
.metric strong { display: block; font-size: 12.5px; }
.metric small, .branch-row small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(0, 1fr); gap: 17px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 11px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 17px 13px; }
.panel-head h2, .session-title { font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.panel-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.agenda, .branch-list, .session-list { border-top: 1px solid var(--line); }
.agenda-row { display: grid; grid-template-columns: 44px 3px minmax(0, 1fr) auto 32px; align-items: center; gap: 11px; min-height: 57px; padding: 6px 12px 6px 17px; }
.agenda-row + .agenda-row, .branch-row + .branch-row, .session-row + .session-row { border-top: 1px solid var(--line); }
.agenda-row strong, .session-row strong, .branch-row strong { display: block; font-size: 13px; }
.agenda-row small, .session-row small { display: block; color: var(--muted); font-size: 11.5px; }
.agenda-time, .counts, .class-time { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; font-size: 12px; }
.agenda-rule { height: 27px; border-radius: 2px; background: #9b7bdf; }
.agenda-rule.teal { background: #49a895; }
.agenda-rule.amber { background: #c48247; }
.counts { background: #f2eff8; color: #584c76; padding: 2px 8px; border-radius: 5px; font-size: 11.5px; }
.row-action { width: 32px; height: 34px; min-height: 34px; }
.branch-row { border: 0; background: transparent; width: 100%; display: grid; grid-template-columns: 33px minmax(0, 1fr) auto 13px; text-align: left; align-items: center; gap: 10px; min-height: 60px; padding: 7px 15px; }
.branch-row:hover, .branch-row[aria-current] { background: #f9f6ff; }
.branch-row:last-child { border-radius: 0 0 10px 10px; }
.branch-count { text-align: right; margin-right: 4px; }

.filters { padding: 13px 17px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.filters > span { color: var(--muted); font-size: 12px; align-self: center; }
.filter-left, .week-buttons { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding-inline: 9px; color: var(--muted); min-width: 0; }
.search input[type="search"] { border: 0; min-width: 0; width: 100%; padding-inline: 0; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; text-align: left; }
th { background: #f4f2f8; font-weight: 700; color: #615970; font-size: 11px; letter-spacing: .015em; }
th, td { padding: 10px 14px; }
td:first-child, th:first-child { padding-left: 17px; }
td { border-bottom: 1px solid var(--line); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
td:last-child { text-align: right; }
.person { display: flex; align-items: center; gap: 10px; }
.person strong { font-size: 13px; }
.person small, .payment-method { display: block; color: var(--muted); font-size: 11px; }
.avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: #efe9fb; color: #5c399e; font-weight: 750; font-size: 11px; flex: 0 0 auto; }
.tag { display: inline-flex; padding: 2px 8px; border-radius: 5px; font-size: 11px; background: #eeedf3; color: #544d63; font-weight: 750; white-space: nowrap; }
.tag.green { background: #e1f2e8; color: #266343; }
.tag.orange { background: #faeed9; color: #82501b; }
.tag.red { background: #fae7ec; color: #932f4a; }
.dot { display: inline-block; vertical-align: 1px; background: #9d7bdb; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; }
.dot.teal { background: #439681; }
.dot.amber { background: #b7733a; }
.money { font-weight: 700; font-variant-numeric: tabular-nums; }
.billing-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 15px; }
.mini-metric { display: flex; align-items: center; gap: 10px; padding: 13px 15px; }
.mini-metric small { color: var(--muted); display: block; }
.mini-metric strong { font-size: clamp(16px, 2.25vw, 25px); letter-spacing: -.035em; }
.panel-note, .demo-note { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); padding: 12px 17px; font-size: 12px; }
.demo-note { background: #f1eaff; border: 1px solid #e4d9f9; border-radius: 8px; color: #57358f; margin-bottom: 16px; }
.empty { padding: 29px 17px; color: var(--muted); }

.week-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 13px 16px; }
.week-head strong { text-transform: capitalize; }
.week-head small { display: block; color: var(--muted); }
.week-buttons { gap: 2px; align-items: center; }
.date-strip { margin: 0 16px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.date-strip button { border: 0; background: #faf9fd; display: grid; gap: 2px; min-width: 0; padding: 9px 4px; text-align: center; color: var(--muted); }
.date-strip button + button { border-left: 1px solid var(--line); }
.date-strip button[aria-pressed="true"] { background: #eae1fb; color: #4f288d; }
.date-strip button:focus-visible { outline-offset: -3px; }
.date-strip strong { font-size: 20px; color: var(--ink); line-height: 1.15; }
.date-strip small { font-size: 10px; }
.session-title { text-transform: capitalize; padding: 14px 16px; }
.session-row { display: grid; grid-template-columns: 53px minmax(0, 1fr) auto auto; align-items: center; min-height: 63px; padding: 8px 17px; gap: 10px; }
.spaced { margin-top: 17px; }

.belt { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #f9f8fc; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.belt-swatch { background: #fff; border: 1px solid #aaa5b6; position: relative; width: 28px; height: 10px; display: inline-block; border-radius: 2px; }
.belt-swatch i { position: absolute; inset: 0 2px 0 auto; width: 5px; background: #17172b; }
.belt-azul .belt-swatch { background: #3f69d0; border-color: #3f69d0; }
.belt-violeta .belt-swatch { background: #8550bf; border-color: #8550bf; }
.belt-marrón .belt-swatch { background: #8e503c; border-color: #8e503c; }
.belt-amarillo .belt-swatch { background: #eecb4c; border-color: #b38a1c; }
.belt-naranja .belt-swatch { background: #e89a38; border-color: #b96418; }
.belt-verde .belt-swatch { background: #4c9d69; border-color: #2f7049; }
.belt-negro .belt-swatch { background: #222134; border-color: #222134; }
.belt-negro .belt-swatch i { background: #b94258; }
.timeline { list-style: none; padding: 0 17px; margin: 0; border-top: 1px solid var(--line); }
.timeline li { padding: 12px 0; }
.timeline li + li { border-top: 1px solid var(--line); }
.timeline li > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.timeline time, .timeline p { color: var(--muted); font-size: 12px; }
.timeline p { margin-top: 4px; }
.grade-summary { border-top: 1px solid var(--line); padding: 15px 17px; }
.grade-summary strong { display: block; font-size: 29px; letter-spacing: -.045em; margin-top: 9px; }
.grade-summary p, .portal-dues small { color: var(--muted); font-size: 12px; }
.portal-dues > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 17px; border-top: 1px solid var(--line); }
.portal-dues strong, .portal-dues small { display: block; }
.portal-dues button { grid-column: 1 / -1; justify-self: start; }
.capitalize { text-transform: capitalize; }
.portal-class { grid-template-columns: 90px 3px minmax(0, 1fr); }

dialog { insets: 0; border: 1px solid var(--line); border-radius: 13px; width: min(500px, calc(100% - 26px)); max-height: 89dvh; padding: 19px; color: var(--ink); box-shadow: 0 20px 74px #15123155; }
dialog::backdrop { background: #15122db2; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.dialog-head h2 { font-size: 22px; line-height: 1.15; letter-spacing: -.035em; }
.dialog-head .icon-button { width: 34px; height: 34px; min-height: 34px; }
.dialog-subtitle { color: var(--muted); margin-bottom: 12px; }
.dialog-amount { font-size: 29px; letter-spacing: -.04em; font-weight: 750; margin-bottom: 10px; }
.dialog-head + p:not(.dialog-subtitle) { margin-bottom: 12px; }
form { display: grid; gap: 10px; }
.field { display: grid; min-width: 0; gap: 3px; }
.field > span, legend { font-size: 11.5px; font-weight: 720; color: #504563; }
input:not([type="checkbox"]), select, textarea { min-height: 39px; border: 1px solid #dcd6e8; border-radius: 7px; background: white; padding: 7px 9px; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
fieldset { border: 1px solid var(--line); border-radius: 7px; margin: 0; }
.check-group { display: flex; flex-wrap: wrap; gap: 10px; }
.check-group label { display: flex; gap: 4px; align-items: center; }
input[type="checkbox"] { accent-color: var(--brand); width: 18px; height: 18px; }
.hint { color: var(--muted); font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding-top: 9px; }
.form-error { color: #912c46; font-size: 12px; }
.form-error:empty { display: none; }
.roster { max-height: 45vh; overflow-y: auto; padding: 3px; }
.roster-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 7px; cursor: pointer; }
.roster-row + .roster-row { border-top: 1px solid var(--line); }
.roster-row:hover { background: #faf7ff; }
.list-summary { padding: 7px; background: #f3eefb; border-radius: 6px; }
.list-summary span { float: right; color: var(--muted); }
.detail { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 5; background: #241d43; color: #fff; border: 1px solid #615189; padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 24px #1a143b32; visibility: hidden; }
.toast.visible { visibility: visible; }

@media (max-width: 1100px) {
  #app { grid-template-columns: 201px minmax(0, 1fr); }
  .main, .topbar { padding-left: 22px; padding-right: 22px; }
  .metric { padding-inline: 12px; }
}
@media (max-width: 850px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: min(270px, 82vw); z-index: 4; height: 100dvh; min-height: 0; overflow-y: auto; }
  .sidebar.opened { display: flex; }
  .mobile-menu { display: inline-flex !important; width: 34px; margin-left: -4px; }
  .scrim { display: block !important; position: fixed; z-index: 3; inset: 0; background: #15122d99; border: 0; }
}
@media (max-width: 620px) {
  .main, .topbar { padding-left: 13px; padding-right: 13px; }
  .main { padding-top: 20px; }
  .topbar { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .breadcrumb { gap: 5px; }
  .top-controls { gap: 4px; }
  .breadcrumb > span, .breadcrumb > svg, .top-avatar { display: none; }
  .page-head { flex-wrap: wrap; margin-bottom: 16px; }
  .page-head p { font-size: 13px; margin-top: 6px; }
  .hero-content { max-width: 88%; padding: 17px; }
  .hero { min-height: 190px; }
  .mat-art { inset-inline-start: 67%; }
  .mat-grid { right: -232px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 13px; }
  .metric + .metric { border-left: 0; }
  .metric:nth-child(even) { border-left: 1px solid var(--line); }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .mini-metric { padding: 9px; }
  .mini-metric .tile-icon { display: none; }
  .billing-summary { gap: 6px; }
  .filters { flex-wrap: wrap; }
  .session-row { grid-template-columns: 39px minmax(0, 1fr) auto; gap: 6px; padding-inline: 11px; }
  .session-row .button { grid-column: 2 / -1; justify-self: start; min-height: 34px; padding-left: 0; }
  .session-row .button.secondary { padding-left: 9px; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .sidebar a, .metric { transition: background-color .12s ease-out; }
}
