/* ============================================================================
   MicroSchool OS — design system (S013). Tokens + base + shared components,
   recreated from the 04-Architecture design handoff. Loaded by the marketing
   layout and the app shell (NOT alongside Bootstrap on legacy pages).
   Fonts (Spectral / Hanken Grotesk / IBM Plex Mono) are linked in the layouts.
   ========================================================================== */

:root {
  --cobalt: #3B57DB;
  --cobalt-grad: linear-gradient(150deg, #4a63e8, #3a4fd0);
  --cobalt-cta: linear-gradient(150deg, #4a63e8, #3546c0);
  --link-hover: #2c40a6;
  --ink: #1E2733;
  --ink-2: #232D38;
  --body: #3D4653;
  --muted: #5A6472;
  --muted-2: #6B7480;
  --faint: #8A9199;
  --faint-2: #9199A2;
  --placeholder: #AEB4BC;
  --white: #FFFFFF;
  --canvas: #EDF0F5;
  --panel: #F6F8FC;
  --row-hover: #F2F6FB;
  --chip: #E7ECF3;
  --green: #2FA24C;  --green-ink: #2C8A48;
  --amber: #E8A13B;  --amber-ink: #B07A22;
  --coral: #C0574B;  --coral-ink: #B24A3E;
  --hairline: rgba(38, 48, 60, .08);
  --hairline-soft: rgba(38, 48, 60, .06);
  --focus-ring: 0 0 0 3px rgba(59, 87, 219, .14);
  --sh-card: 0 1px 2px rgba(38, 48, 60, .04);
  --sh-elevated: 0 20px 44px rgba(30, 38, 60, .10);
  --sh-hero: 0 30px 60px rgba(30, 38, 60, .14), 0 4px 12px rgba(30, 38, 60, .06);
  --sh-btn: 0 5px 14px rgba(58, 79, 208, .32);
  --serif: 'Spectral', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--white); font-family: var(--sans); color: var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; line-height: 1.6; }
a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--link-hover); }
button { font-family: inherit; }
::selection { background: var(--cobalt); color: #fff; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink-2); margin: 0; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; }

@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: 84px 0; }
.section--tight { padding: 64px 0 20px; }
.band { background: var(--canvas); border-top: 1px solid var(--hairline-soft); border-bottom: 1px solid var(--hairline-soft); }
.rise { animation: riseIn .5s ease; }

.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .15em; color: var(--cobalt); text-transform: uppercase; }
.display { font-family: var(--serif); font-weight: 500; line-height: 1.04; letter-spacing: -.015em; color: var(--ink); }
.h1 { font-size: clamp(38px, 4.8vw, 58px); }
.h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
.h2--cta { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; }
.lead { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: var(--muted); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section-head .h2 { margin-top: 14px; }

.btn { height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px; font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: filter .14s, transform .14s, box-shadow .14s, background .14s, border-color .14s; }
.btn--primary { background: var(--cobalt-grad); color: #EEF1FF; box-shadow: var(--sh-btn); }
.btn--primary:hover { filter: brightness(1.07); color: #EEF1FF; }
.btn--white { background: #fff; color: #3546c0; font-weight: 700; }
.btn--white:hover { filter: brightness(.96); }
.btn--ghost { background: transparent; color: #48525F; }
.btn--ghost:hover { background: var(--canvas); color: var(--ink-2); }
.btn--lg { height: 52px; padding: 0 24px; border-radius: 12px; font-size: 15px; }
.btn--block { width: 100%; }

.input { height: 50px; padding: 0 16px; border: 1px solid rgba(38,48,60,.16); border-radius: 12px; background: #fff;
  font-family: var(--sans); font-size: 15px; color: #2B3440; outline: none; width: 100%; transition: border-color .14s, box-shadow .14s; }
.input:focus { border-color: var(--cobalt); box-shadow: var(--focus-ring); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--faint-2); text-transform: uppercase; }
.field-error { color: var(--coral-ink); font-size: 13px; }

.email-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 480px; }
.email-form .input { flex: 1; min-width: 220px; }
.form-success { font-size: 13.5px; color: var(--green-ink); font-weight: 600; margin-top: 12px; }

.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.pill--neutral { background: var(--chip); color: var(--muted); }
.pill--green { background: rgba(47,162,76,.12); color: var(--green-ink); }
.pill--amber { background: rgba(232,161,59,.15); color: var(--amber-ink); }
.pill--coral { background: rgba(192,87,75,.12); color: var(--coral-ink); }
.pill--cobalt { background: rgba(59,87,219,.1); color: var(--cobalt); }
.badge-mono { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--placeholder); background: var(--canvas); border-radius: 4px; padding: 2px 6px; }

.card { background: #fff; border: 1px solid rgba(38,48,60,.09); border-radius: 16px; padding: 26px 24px; }
.card--sm { border-radius: 14px; padding: 18px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card-grid--tight { gap: 16px; }
.link-card { display: block; transition: transform .14s, border-color .14s, box-shadow .14s; }
.link-card:hover { transform: translateY(-3px); border-color: rgba(59,87,219,.4); box-shadow: 0 14px 30px rgba(30,38,60,.08); }
.card h3 { font-size: 20px; margin: 18px 0 8px; }
.card p { font-size: 14.5px; line-height: 1.6; color: var(--muted-2); }

.icon-sq { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.icon-sq--cobalt { background: rgba(59,87,219,.1); color: var(--cobalt); }
.icon-sq--green { background: rgba(47,162,76,.12); color: var(--green-ink); }
.icon-sq--amber { background: rgba(232,161,59,.15); color: var(--amber-ink); }
.icon-sq--panel { background: var(--canvas); color: var(--cobalt); }
.icon-sq svg { width: 21px; height: 21px; }
.ic { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ===== MARKETING ===== */
.mkt-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hairline); }
.mkt-header .container { display: flex; align-items: center; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--cobalt-grad); display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 14px rgba(58,79,208,.4); flex: none; }
.brand-mark svg { width: 17px; height: 17px; }
.brand-word { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink-2); }
.mkt-nav { flex: 1; display: flex; justify-content: center; gap: 4px; }
.mkt-nav a { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #48525F; transition: background .12s, color .12s; }
.mkt-nav a:hover { background: var(--canvas); color: var(--ink-2); }
.mkt-nav a.active { color: var(--cobalt); font-weight: 600; }
.mkt-actions { display: inline-flex; align-items: center; gap: 16px; }
.mkt-signin { font-size: 14.5px; font-weight: 600; color: #48525F; text-decoration: none; white-space: nowrap; transition: color .12s; }
.mkt-signin:hover { color: var(--cobalt); }
.app-inquiry { position: relative; }
.app-inquiry > summary { list-style: none; cursor: pointer; }
.app-inquiry > summary::-webkit-details-marker { display: none; }
.app-inquiry__panel { position: absolute; top: 100%; right: 8px; margin-top: 10px; width: 360px; max-width: calc(100vw - 48px); background: var(--panel); border: 1px solid rgba(38,48,60,.12); border-radius: 14px; box-shadow: 0 14px 38px rgba(38,48,60,.18); padding: 18px; z-index: 30; }
.app-inquiry__close { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted-2); cursor: pointer; padding: 0 4px; border-radius: 6px; }
.app-inquiry__close:hover { color: var(--ink); background: var(--canvas); }
.app-modal-scrim { position: fixed; inset: 0; background: rgba(20, 26, 34, .45); display: flex; align-items: center; justify-content: center; z-index: 200; animation: fadeIn .12s ease; }
.app-modal { width: 400px; max-width: calc(100vw - 40px); background: var(--panel); border-radius: 16px; box-shadow: 0 24px 64px rgba(20, 26, 34, .38); padding: 24px 24px 20px; }
.app-modal__title { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.app-modal__body { font-size: 14px; line-height: 1.55; color: var(--body); margin-bottom: 22px; }
.app-modal__actions { display: flex; gap: 10px; justify-content: flex-end; }
.app-btn--danger { background: var(--coral-ink); color: #fff; border: 1px solid var(--coral-ink); }
.app-btn--danger:hover { filter: brightness(.94); }

.hero { background: linear-gradient(180deg, #FFFFFF, #EDF0F5); }
.hero .container { display: flex; flex-wrap: wrap; gap: 52px; align-items: center; padding-top: 76px; padding-bottom: 70px; }
.hero-copy { flex: 1; min-width: 340px; }
.hero-copy .h1 { margin: 22px 0 0; }
.hero-copy .lead { max-width: 520px; margin: 20px 0 0; }
.hero-copy .email-form { margin-top: 30px; }
.hero-media { flex: 1; min-width: 360px; animation: riseIn .6s ease .08s both; }
.trust-line { display: flex; align-items: center; gap: 9px; margin-top: 16px; font-size: 13px; color: var(--faint); }
.trust-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47,162,76,.14); flex: none; }

.mock { background: #fff; border: 1px solid rgba(38,48,60,.1); border-radius: 18px; box-shadow: var(--sh-hero); overflow: hidden; }
.mock-chrome { height: 38px; background: var(--panel); border-bottom: 1px solid var(--hairline-soft); display: flex; align-items: center; gap: 7px; padding: 0 14px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mock-url { flex: 1; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--placeholder); }
.mock-body { display: flex; height: 322px; }
.mock-rail { width: 52px; flex: none; background: var(--panel); border-right: 1px solid var(--hairline-soft); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; }
.mock-rail div { width: 26px; height: 26px; border-radius: 8px; background: var(--chip); }
.mock-rail .a { background: var(--cobalt-grad); }
.mock-rail .b { background: rgba(59,87,219,.14); }
.mock-main { flex: 1; padding: 18px 18px 0; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.mock-stat { background: var(--panel); border: 1px solid var(--hairline-soft); border-radius: 10px; padding: 10px 11px; }
.mock-stat .k { font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; color: var(--faint-2); }
.mock-stat .v { font-family: var(--serif); font-size: 22px; font-weight: 600; margin-top: 3px; }
.mock-list { margin-top: 14px; background: #fff; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.mock-row { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid rgba(38,48,60,.05); }
.mock-row .bar { width: 5px; height: 22px; border-radius: 3px; flex: none; }
.mock-row .t { flex: 1; font-size: 11px; color: var(--body); font-weight: 500; }
.mock-row .a2 { font-size: 10px; color: var(--cobalt); font-weight: 600; }

.trust-strip .container { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; justify-content: center; padding-top: 26px; padding-bottom: 26px; }
.mono-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--faint-2); text-transform: uppercase; }
.trust-logo { font-family: var(--serif); font-weight: 600; font-size: 17px; color: #B4BAC1; letter-spacing: .01em; }

.step-num { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--cobalt); width: 38px; height: 38px; border-radius: 10px; background: rgba(59,87,219,.1); display: flex; align-items: center; justify-content: center; }

.quote { max-width: 900px; margin: 0 auto; text-align: center; }
.quote p { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.4; color: #28323D; margin: 22px 0 26px; }
.quote-attr { display: flex; align-items: center; justify-content: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 12px; color: #E9EDF4; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, #4a5666, #333c48); flex: none; }

.cta-band { background: var(--cobalt-cta); }
.cta-band .container { text-align: center; padding-top: 76px; padding-bottom: 76px; }
.cta-band .h2--cta { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.82); max-width: 520px; margin: 16px auto 0; }
.cta-band .email-form { margin: 30px auto 0; justify-content: center; }
.cta-band .input { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.34); color: #fff; }
.cta-band .input::placeholder { color: rgba(255,255,255,.68); }
.cta-band .input:focus { border-color: #fff; background: rgba(255,255,255,.26); box-shadow: none; }
.cta-band .form-success { color: #fff; font-size: 14px; margin-top: 14px; }

.mkt-footer { background: var(--panel); border-top: 1px solid var(--hairline); }
.mkt-footer .foot-top { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 52px; padding-bottom: 30px; }
.mkt-footer .foot-brand { flex: 1; min-width: 240px; }
.mkt-footer .foot-brand p { font-size: 13.5px; line-height: 1.6; color: var(--faint); max-width: 290px; margin-top: 16px; }
.foot-col { min-width: 130px; }
.foot-col .mono-label { margin-bottom: 14px; display: block; }
.foot-col a { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.foot-col a:hover { color: var(--cobalt); }
.foot-legal { border-top: 1px solid var(--hairline-soft); padding-top: 18px; padding-bottom: 34px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12.5px; color: var(--faint-2); }
.foot-legal .mono { font-family: var(--mono); letter-spacing: .05em; }

/* alternating module rows (Features) */
.mod-row { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 40px 0; }
.mod-row--rev { flex-direction: row-reverse; }
.mod-row > div { flex: 1; min-width: 320px; }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--muted); }
.check-list li svg { width: 18px; height: 18px; flex: none; color: var(--green-ink); margin-top: 1px; }
.preview-card { background: #fff; border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--sh-elevated); overflow: hidden; }
.preview-card .pc-head { padding: 14px 16px; border-bottom: 1px solid var(--hairline-soft); background: var(--panel); font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--faint-2); text-transform: uppercase; }
.preview-row { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid rgba(38,48,60,.05); }
.preview-row .bar { width: 5px; height: 26px; border-radius: 3px; flex: none; }
.preview-row .t { flex: 1; font-size: 13.5px; color: var(--body); font-weight: 500; }

/* sticky sub-nav (Features) */
.subnav { position: sticky; top: 66px; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hairline); }
.subnav .container { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; padding-bottom: 12px; justify-content: center; }
.subnav a { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #48525F; background: var(--canvas); }
.subnav a:hover { color: var(--cobalt); }

/* pricing */
.tier { display: flex; flex-direction: column; }
.tier--featured { background: var(--cobalt-grad); color: #fff; border: none; }
.tier--featured h3, .tier--featured .price { color: #fff; }
.tier .price { font-family: var(--serif); font-size: 38px; font-weight: 600; color: var(--ink-2); }
.tier .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.tier--featured .price small { color: rgba(255,255,255,.8); }
.tier-divider { height: 1px; background: var(--hairline); margin: 20px 0; }
.tier--featured .tier-divider { background: rgba(255,255,255,.22); }

/* faq accordion */
.faq-row { border-bottom: 1px solid var(--hairline); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink-2); }
.faq-q .plus { transition: transform .18s; color: var(--cobalt); font-size: 22px; flex: none; }
.faq-row[open] .plus, .faq-q[aria-expanded="true"] .plus { transform: rotate(45deg); }
.faq-a { padding: 0 0 22px; font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 760px; }

/* team */
.team-avatar { width: 56px; height: 56px; border-radius: 14px; background: var(--cobalt-grad); color: #E9EDF4; font-family: var(--serif); font-size: 19px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

/* ============================================================================
   APP SHELL — authenticated workspace (S014). Sidebar + topbar + main, plus the
   shared in-app component kit (kpi/stat cards, panels, section heads, data
   tables, list rows, status pills, app buttons, segmented/filter controls,
   drawer scaffolding). Ported from the 04-Architecture "Homeroom Platform"
   prototype. Reuses the :root tokens above; app classes are namespaced (app-* /
   side-* / kpi-* / mod-* / dt-* / a-* / cal-* / status-*) so they never collide
   with the marketing (.mkt-*) family. Colors/spacing/radii are 1:1 with the
   design (card borders use rgba(38,48,60,.09), one notch heavier than --hairline).
   ========================================================================== */

@keyframes appRiseIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes appSlideL { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
@keyframes appPopIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---- layout frame ---- */
.app-shell { display: flex; min-height: 100vh; background: var(--canvas); }
.app-sidebar { width: 238px; flex: none; background: var(--panel); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.app-body { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-main { flex: 1; overflow-y: auto; padding: 28px 30px 70px; }
.app-page { max-width: 1200px; margin: 0 auto; animation: appRiseIn .35s ease; }

/* ---- sidebar: brand ---- */
.app-brand { padding: 22px 18px 14px; display: flex; align-items: center; gap: 11px; }
.app-brand-name { font-weight: 700; font-size: 14.5px; letter-spacing: .005em; color: var(--ink-2); line-height: 1; }
.app-brand-org { font-family: var(--mono); font-size: 9px; letter-spacing: .15em; color: var(--faint-2); margin-top: 3px; }

/* ---- sidebar: nav ---- */
.app-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.app-nav-label { font-family: var(--mono); font-size: 9px; letter-spacing: .15em; color: var(--placeholder); padding: 17px 12px 8px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: #48525F; cursor: pointer; margin-bottom: 2px; transition: background .12s, box-shadow .12s; }
.side-link:hover { background: rgba(38,48,60,.05); color: #48525F; }
.side-link__icon { display: flex; align-items: center; }
.side-link__icon .ic { width: 18px; height: 18px; }
.side-link__label { flex: 1; }
.side-link.is-active { background: var(--cobalt-grad); color: #EEF1FF; box-shadow: 0 5px 14px rgba(58,79,208,.42); }
.side-link.is-active:hover { color: #EEF1FF; }
.side-link.is-soon { color: #8A929B; }
.side-link.is-soon .side-link__icon { opacity: .55; }
.side-soon { font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--placeholder); border: 1px solid rgba(38,48,60,.14); border-radius: 4px; padding: 1px 4px; }

/* ---- sidebar: footer / user ---- */
.app-sidebar-foot { padding: 8px 12px 12px; border-top: 1px solid var(--hairline); }
.app-user { display: flex; align-items: center; gap: 10px; padding: 10px 10px 2px; }
.app-user-avatar { width: 30px; height: 30px; flex: none; border-radius: 9px; background: linear-gradient(150deg,#4a5666,#333c48); color: #E9EDF4; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.app-user-name { font-size: 12.5px; font-weight: 600; color: #333F4E; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-user-role { font-size: 10.5px; color: var(--faint-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- topbar ---- */
.app-topbar { height: 60px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 26px; border-bottom: 1px solid var(--hairline); background: rgba(237,240,245,.82); backdrop-filter: blur(8px); position: relative; z-index: 5; }
.app-crumb { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--faint-2); display: flex; align-items: center; gap: 9px; }
.app-crumb__sep { color: #C6CBD1; }
.app-crumb__here { color: #48525F; }
.app-iconbtn { position: relative; width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(38,48,60,.13); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; transition: border-color .14s; }
.app-iconbtn:hover { border-color: rgba(38,48,60,.24); }
.app-iconbtn .ic { width: 17px; height: 17px; }
.app-notif-dot { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--canvas); }
.app-topbar-spacer { flex: 1; }

/* ---- topbar: user + sign-out ---- */
.app-topbar-user { display: flex; align-items: center; gap: 10px; }
.app-topbar-user__name { font-size: 13px; font-weight: 600; color: #333F4E; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.app-signout { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(38,48,60,.13); border-radius: 10px; background: #fff; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: border-color .14s, color .14s; }
.app-signout:hover { border-color: rgba(38,48,60,.24); color: var(--ink-2); }

/* ---- hero / greeting card ---- */
.app-hero { background: linear-gradient(178deg,#FFFFFF,#F4F7FB); border: 1px solid rgba(38,48,60,.09); border-radius: 18px; padding: 28px 32px; box-shadow: var(--sh-card); }
.app-hero__eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .15em; color: var(--faint-2); }
.app-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.app-hero__title { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.05; letter-spacing: -.01em; color: var(--ink-2); margin: 0 0 7px; }
.app-hero__sub { font-size: 14px; color: var(--muted-2); }

/* ---- eyebrow + page title (module screens) ---- */
.app-eyebrow { font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; color: var(--faint-2); }
.app-title { font-family: var(--serif); font-weight: 500; font-size: 32px; color: var(--ink-2); margin: 0 0 5px; }
.app-subtitle { font-size: 13.5px; color: var(--muted-2); }

/* ---- kpi / stat cards ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.kpi-card { background: #fff; border: 1px solid rgba(38,48,60,.09); border-radius: 14px; padding: 17px 18px 15px; box-shadow: var(--sh-card); }
.kpi-card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-card__label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; color: var(--faint-2); }
.kpi-card__value { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.15; margin: 8px 0 3px; color: var(--ink-2); }
.kpi-card__value--coral { color: var(--coral); }
.kpi-card__value--green { color: var(--green-ink); }
.kpi-card__value--blue { color: #2E5FB8; }
.kpi-card__note { font-size: 12px; color: var(--faint); }

/* ---- status dot (sidebar + cards) ---- */
.stat-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.stat-dot--green { background: var(--green); box-shadow: 0 0 0 3px rgba(47,162,76,.14); }
.stat-dot--amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(232,161,59,.16); }
.stat-dot--coral { background: var(--coral); box-shadow: 0 0 0 3px rgba(192,87,75,.16); }

/* ---- panels + section headers ---- */
.app-panel { background: #fff; border: 1px solid rgba(38,48,60,.09); border-radius: 14px; overflow: hidden; box-shadow: var(--sh-card); }
.app-panel--pad { padding: 6px 4px; }
.app-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 13px; }
.app-section-title { font-family: var(--serif); font-weight: 600; font-size: 20px; color: #28323D; margin: 0; }
.app-section-title--lg { font-size: 22px; }
.app-section-count { font-family: var(--mono); font-size: 10px; color: var(--placeholder); }

/* ---- attention list rows ---- */
.a-row { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border-bottom: 1px solid var(--hairline-soft); cursor: pointer; transition: background .12s; }
.a-row:last-child { border-bottom: none; }
.a-row:hover { background: var(--row-hover); }
.a-row__tone { width: 6px; height: 34px; border-radius: 3px; flex: none; }
.a-row__tone--green { background: var(--green); }
.a-row__tone--amber { background: var(--amber); }
.a-row__tone--coral { background: var(--coral); }
.a-row__tone--muted { background: var(--muted); }
.a-row__main { flex: 1; min-width: 0; }
.a-row__text { font-size: 13.5px; color: #333F4E; font-weight: 500; }
.a-row__module { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; color: var(--faint-2); margin-top: 3px; }
.a-row__action { font-size: 12.5px; color: var(--cobalt); font-weight: 600; white-space: nowrap; }

/* ---- calendar / upcoming list rows ---- */
.cal-row { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-bottom: 1px solid var(--hairline-soft); }
.cal-row:last-child { border-bottom: none; }
.cal-date { width: 44px; flex: none; text-align: center; }
.cal-date__mon { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--coral-ink); }
.cal-date__mon--amber { color: var(--amber-ink); }
.cal-date__mon--muted { color: var(--muted-2); }
.cal-date__day { font-family: var(--serif); font-size: 21px; font-weight: 500; color: #28323D; line-height: 1.1; }
.cal-row__what { font-size: 13px; font-weight: 500; color: #333F4E; }
.cal-row__sub { font-size: 11.5px; color: var(--faint-2); margin-top: 1px; }

/* ---- module cards grid ---- */
.mod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; align-items: start; }
.mod-col__title { font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; color: #9BA2AA; padding: 0 2px 10px; }
.mod-col__stack { display: flex; flex-direction: column; gap: 12px; }
.mod-card { background: #fff; border: 1px solid rgba(38,48,60,.09); border-radius: 13px; padding: 15px; cursor: pointer; box-shadow: var(--sh-card); transition: transform .12s, border-color .12s; display: block; }
.mod-card:hover { border-color: rgba(38,48,60,.2); transform: translateY(-1px); }
.mod-card__head { display: flex; align-items: flex-start; gap: 11px; }
.mod-card__icon { width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--chip); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.mod-card__icon .ic { width: 18px; height: 18px; }
.mod-card__label { font-family: var(--serif); font-size: 16px; font-weight: 600; color: #28323D; line-height: 1.15; }
.mod-card__sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--faint-2); margin-top: 2px; }
.mod-card__foot { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(38,48,60,.07); }
.mod-card__foot--muted { color: var(--placeholder); }
.mod-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47,162,76,.14); margin-top: 5px; flex: none; }

/* ---- data tables (module screens) ---- */
.data-table { background: #fff; border: 1px solid rgba(38,48,60,.09); border-radius: 14px; overflow: hidden; box-shadow: var(--sh-card); }
.dt-head { display: grid; gap: 12px; padding: 12px 20px; border-bottom: 1px solid rgba(38,48,60,.09); font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: var(--faint-2); }
.dt-row { display: grid; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--hairline-soft); align-items: center; transition: background .12s; }
.dt-row:last-child { border-bottom: none; }
.dt-row:hover { background: var(--row-hover); }
.dt-num { font-family: var(--mono); font-size: 12.5px; text-align: right; color: var(--muted); }
.dt-num--danger { color: var(--coral-ink); font-weight: 500; }
.dt-num--faint { color: #C6CBD1; }
.dt-name { font-size: 13.5px; font-weight: 600; color: #2B3440; }
.dt-sub { font-size: 11px; color: var(--faint-2); }

/* ---- avatars (rows / drawer) ---- */
.app-avatar { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--chip); color: var(--muted); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.app-avatar--sm { width: 28px; height: 28px; font-size: 10.5px; }
.app-avatar--lg { width: 46px; height: 46px; border-radius: 12px; font-size: 16px; }
.app-avatar--grad { background: linear-gradient(150deg,#4a5666,#333c48); color: #E9EDF4; }

/* ---- status pills (exact design tones) ---- */
.status-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.status-pill--green { background: rgba(47,162,76,.12); color: var(--green-ink); }
.status-pill--blue { background: rgba(48,104,214,.1); color: #2E5FB8; }
.status-pill--grey { background: rgba(38,48,60,.07); color: var(--muted-2); }
.status-pill--amber { background: rgba(232,161,59,.15); color: var(--amber-ink); }
.status-pill--coral { background: rgba(192,87,75,.12); color: var(--coral-ink); }
.esa-tag { font-family: var(--mono); font-size: 8px; letter-spacing: .05em; font-weight: 500; color: var(--amber-ink); background: rgba(232,161,59,.15); border-radius: 4px; padding: 2px 5px; }

/* ---- inline alert banner ---- */
.app-alert { display: flex; align-items: center; gap: 11px; background: rgba(232,161,59,.11); border: 1px solid rgba(232,161,59,.28); border-radius: 11px; padding: 11px 16px; }
.app-alert__text { font-size: 12.5px; color: #8a6a2a; }

/* ---- app buttons ---- */
.app-btn { height: 40px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(38,48,60,.14); border-radius: 10px; background: #fff; color: #48525F; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .14s, filter .14s; }
.app-btn:hover { border-color: rgba(38,48,60,.26); color: #48525F; }
.app-btn .ic { width: 15px; height: 15px; stroke-width: 1.7; }
.app-btn--sm { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--cobalt); }
.app-btn--sm:hover { border-color: var(--cobalt); color: var(--cobalt); }
.app-btn--primary { height: 40px; padding: 0 17px; border: none; background: var(--cobalt-grad); color: #EEF1FF; font-weight: 600; box-shadow: 0 5px 14px rgba(58,79,208,.35); }
.app-btn--primary:hover { filter: brightness(1.1); color: #EEF1FF; }

/* ---- segmented control + filter chips ---- */
.app-seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; }
.app-seg__btn { height: 32px; padding: 0 16px; border: none; border-radius: 8px; background: transparent; color: #7A828C; font-size: 13px; font-weight: 500; cursor: pointer; }
.app-seg__btn.is-active { background: #fff; color: #28323D; font-weight: 600; box-shadow: 0 1px 2px rgba(38,48,60,.08); }
.app-filter { height: 32px; padding: 0 13px; border: 1px solid rgba(38,48,60,.14); border-radius: 8px; background: #fff; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.app-filter.is-active { border-color: #333F4E; background: #333F4E; color: #EFF2F8; font-weight: 600; }

/* ---- drawer / off-canvas scaffolding (right-side record panel) ---- */
.app-scrim { position: fixed; inset: 0; background: rgba(30,38,48,.32); z-index: 40; animation: fadeIn .2s ease; }
.app-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 92vw; background: #F3F6FA; border-left: 1px solid rgba(38,48,60,.1); z-index: 41; box-shadow: -14px 0 40px rgba(30,38,48,.14); display: flex; flex-direction: column; animation: appSlideL .28s cubic-bezier(.2,.8,.2,1); }
.app-drawer__head { padding: 20px 24px 18px; border-bottom: 1px solid rgba(38,48,60,.09); background: #fff; }
.app-drawer__body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.app-drawer__foot { padding: 14px 24px; border-top: 1px solid rgba(38,48,60,.09); background: #fff; display: flex; gap: 9px; }
.app-drawer__close { width: 30px; height: 30px; flex: none; border: none; border-radius: 8px; background: #EAEEF4; color: var(--muted); font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.app-drawer__close:hover { background: #DDE3EC; }

/* ============================================================================
   Auth shell (S024) — restyles the default ASP.NET Identity UI (which emits
   Bootstrap markup) to the MicroSchool OS brand. Scoped to `.auth-page` so these
   overrides never touch the marketing site or the app shell. Applied by
   Areas/Identity/Pages/_Layout.cshtml; Bootstrap is still linked there for the
   floating-label + grid behaviour, and everything below re-skins its look.
   ========================================================================== */
.auth-page { background:
    radial-gradient(120% 80% at 50% -10%, rgba(59,87,219,.10), transparent 60%),
    var(--canvas);
  min-height: 100vh; color: var(--body); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 22px; padding: 40px 20px; }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; }
.auth-brand .brand-mark { width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: var(--cobalt-grad); display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-btn); }
.auth-brand .brand-mark svg { width: 20px; height: 20px; }
.auth-brand .brand-word { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--ink-2); }
.auth-brand:hover { color: inherit; }

.auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid rgba(38,48,60,.09);
  border-radius: 18px; box-shadow: var(--sh-elevated); padding: 36px 38px 32px; }
/* the account-manage pages (still stock Identity UI) carry a nav + panel in a Bootstrap .row and
   need the room; the focused auth forms stay narrow. */
.auth-card:has(.row) { max-width: 880px; }
.auth-foot { font-size: 12.5px; color: var(--faint-2); }
.auth-foot a { color: var(--muted); }

/* headings the Identity pages emit */
.auth-page h1 { font-family: var(--serif); font-weight: 500; font-size: 27px; letter-spacing: -.01em;
  color: var(--ink); margin-bottom: 4px; }
.auth-page h2 { font-family: var(--sans); font-weight: 600; font-size: 15px; color: var(--muted); margin: 0 0 2px; }
.auth-page h3 { font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--muted); }
.auth-page hr { border: 0; border-top: 1px solid var(--hairline); margin: 16px 0 20px; opacity: 1; }

/* inputs — Bootstrap floating labels, re-skinned */
.auth-page .form-floating > .form-control,
.auth-page .form-control { border: 1px solid rgba(38,48,60,.16); border-radius: 12px;
  font-family: var(--sans); font-size: 15px; color: #2B3440; box-shadow: none; }
.auth-page .form-floating > .form-control { height: 58px; }
.auth-page .form-control:focus { border-color: var(--cobalt); box-shadow: var(--focus-ring); }
.auth-page .form-floating > label { font-family: var(--sans); color: var(--faint); padding-left: 14px; }
.auth-page .form-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint-2); }
.auth-page .checkbox label, .auth-page .form-check-label { font-family: var(--sans); font-size: 14px; color: var(--body); text-transform: none; letter-spacing: 0; }
.auth-page .form-check-input:checked { background-color: var(--cobalt); border-color: var(--cobalt); }
.auth-page .form-check-input:focus { border-color: var(--cobalt); box-shadow: var(--focus-ring); }

/* primary submit (Log in / Register / Reset) — our cobalt button */
.auth-page .btn-primary, .auth-page .btn-lg.btn-primary {
  background: var(--cobalt-grad); border: none; color: #EEF1FF; font-family: var(--sans);
  font-weight: 600; border-radius: 10px; box-shadow: var(--sh-btn); height: 50px; }
.auth-page .btn-primary:hover { filter: brightness(1.07); background: var(--cobalt-grad); color: #EEF1FF; }
.auth-page .btn-primary:focus { box-shadow: var(--sh-btn), var(--focus-ring); }

/* external providers (Google &c.) — bordered, so they read as secondary to the local form */
.auth-page button[name="provider"] { background: #fff; border: 1px solid rgba(38,48,60,.18);
  color: var(--ink-2); font-family: var(--sans); font-weight: 600; border-radius: 10px;
  box-shadow: var(--sh-card); height: 46px; padding: 0 18px; margin: 0 6px 8px 0; }
.auth-page button[name="provider"]:hover { border-color: rgba(59,87,219,.5); color: var(--cobalt); background: #fff; }

/* links + validation */
.auth-page a { color: var(--cobalt); }
.auth-page a:hover { color: var(--link-hover); }
.auth-page .text-danger, .auth-page .field-validation-error, .auth-page .validation-summary-errors {
  color: var(--coral-ink); font-size: 13px; }
.auth-page p { margin-bottom: 8px; }

/* the Identity pages lay the local / external forms out in a Bootstrap .row; keep it, just breathe */
.auth-page section > form { max-width: 420px; }
.auth-page .row > [class^="col-"] { margin-bottom: 8px; }

@media (max-width: 640px) {
  .auth-card { padding: 28px 22px 24px; border-radius: 16px; }
  .auth-page h1 { font-size: 24px; }
}

/* --- app-owned auth pages (S024): Login / Register / ForgotPassword, built with real msos
   components (.field/.input/.btn) rather than restyled Bootstrap. --- */
.auth-sub { font-size: 14.5px; color: var(--muted); margin: 6px 0 22px; }
.auth-form .field { margin-bottom: 15px; }
.auth-form .field label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint-2); }
.auth-error:not(:empty) { background: rgba(192,87,75,.08); border: 1px solid rgba(192,87,75,.22);
  color: var(--coral-ink); border-radius: 10px; padding: 10px 13px; font-size: 13px; margin-bottom: 16px; }
.auth-error ul { margin: 0; padding-left: 18px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 2px 0 20px; font-size: 13.5px; }
.auth-check { display: inline-flex; align-items: center; gap: 8px; color: var(--body); cursor: pointer; }
.auth-check input { width: 15px; height: 15px; accent-color: var(--cobalt); }
.auth-alt { text-align: center; font-size: 14px; color: var(--muted); margin-top: 20px; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 18px;
  color: var(--faint-2); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.auth-divider span { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.auth-providers { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-provider { flex: 1; min-width: 140px; height: 46px; background: #fff;
  border: 1px solid rgba(38,48,60,.18); color: var(--ink-2); font-weight: 600; box-shadow: var(--sh-card); }
.auth-provider:hover { border-color: rgba(59,87,219,.5); color: var(--cobalt); background: #fff; }

/* ---- notification bell dropdown (S027-pre) ---- */
.app-notif { position: relative; }
.app-notif-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 88vw;
  background: #fff; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: var(--sh-elevated);
  z-index: 60; max-height: 70vh; overflow-y: auto; }
.app-notif-head { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint-2); padding: 13px 14px 8px; }
.app-notif-empty { padding: 22px 16px; text-align: center; font-size: 13px; color: var(--faint); }
.app-notif-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px;
  border-top: 1px solid var(--hairline-soft); text-decoration: none; color: inherit; transition: background .12s; }
.app-notif-row:hover { background: var(--row-hover); color: inherit; }
.app-notif-row.is-unread { background: rgba(59,87,219,.05); }
.app-notif-tone { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--faint-2); }
.app-notif-tone--coral { background: var(--coral); }
.app-notif-tone--amber { background: var(--amber); }
.app-notif-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.app-notif-title { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.app-notif-meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--faint-2); text-transform: uppercase; }
