/* Showcase portal shell — the Register tokens from app.css, no new palette. */

:root {
  --s-sidebar: 248px;
  --s-topbar: 64px;
  --s-max: 1380px;
}

* { box-sizing: border-box; }
html { background: rgb(var(--paper)); }
body {
  margin: 0;
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  font-family: 'Geist', 'Geist Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
.s-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.s-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-icon-sm { width: 15px; height: 15px; }
.s-icon-lg { width: 22px; height: 22px; }

/* ── Admin shell ─────────────────────────────────────────────────────── */
.s-shell { display: grid; grid-template-columns: var(--s-sidebar) minmax(0, 1fr); min-height: 100vh; }
.s-sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: rgb(var(--paper-hi)); border-right: 1px solid rgb(var(--rule-c));
  display: flex; flex-direction: column;
}
.s-brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  height: var(--s-topbar); padding: 0 16px; border-bottom: 1px solid rgb(var(--rule-c));
  text-decoration: none; flex: none;
}
.s-brand img { width: 30px; height: 30px; flex: none; }
.s-brand-text { min-width: 0; line-height: 1.1; }
.s-brand-name { display: block; font-size: 13px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.s-brand-sub { display: block; margin-top: 2px; font-size: 10.5px; color: rgb(var(--ink-3)); white-space: nowrap; }
.s-nav-scroll { flex: 1; overflow-y: auto; padding: 12px 10px 16px; scrollbar-width: thin; }
.s-nav-group { margin-top: 14px; }
.s-nav-group:first-child { margin-top: 0; }
.s-nav-label { padding: 0 10px 6px; font-size: 11px; font-weight: 600; color: rgb(var(--ink-3)); }
.s-nav-link {
  display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 7px 10px;
  border-radius: 3px; border-left: 2px solid transparent;
  color: rgb(var(--ink-2)); font-size: 12.5px; text-decoration: none;
}
.s-nav-link:hover { background: rgb(var(--paper-lo)); color: rgb(var(--ink)); }
.s-nav-link.is-active { background: rgb(var(--ink-blue) / 0.08); border-left-color: rgb(var(--ink-blue)); color: rgb(var(--ink-blue)); font-weight: 600; }
.s-nav-link .s-icon { width: 17px; height: 17px; color: rgb(var(--ink-3)); }
.s-nav-link.is-active .s-icon { color: rgb(var(--ink-blue)); }
.s-sidebar-foot { border-top: 1px solid rgb(var(--rule-c)); padding: 10px; flex: none; }
.s-sidebar-user { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 6px; }
.s-sidebar-user .s-avatar { width: 30px; height: 30px; }
.s-sidebar-user strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-sidebar-user span { display: block; font-size: 10px; color: rgb(var(--ink-3)); }

.s-main { min-width: 0; display: flex; flex-direction: column; }
.s-topbar {
  position: sticky; top: 0; z-index: 20; height: var(--s-topbar); flex: none;
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: rgb(var(--paper)); border-bottom: 1px solid rgb(var(--rule-c));
}
.s-breadcrumb { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: rgb(var(--ink-3)); white-space: nowrap; }
.s-breadcrumb strong { color: rgb(var(--ink)); font-weight: 600; }
.s-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.s-search {
  display: flex; align-items: center; gap: 8px; width: 220px; height: 36px; padding: 0 10px;
  border: 1px solid rgb(var(--rule-c)); border-radius: 3px; background: rgb(var(--paper-hi));
  color: rgb(var(--ink-3)); font-size: 12px;
}
.s-search .s-icon { width: 15px; height: 15px; }
.s-kbd { margin-left: auto; border: 1px solid rgb(var(--rule-c)); border-radius: 2px; padding: 1px 4px; font-size: 9px; color: rgb(var(--ink-3)); }
.s-icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border: 1px solid transparent; border-radius: 3px; background: transparent; color: rgb(var(--ink-2)); cursor: pointer;
}
.s-icon-btn:hover { background: rgb(var(--paper-lo)); color: rgb(var(--ink)); }
.s-user { display: flex; align-items: center; gap: 8px; padding-left: 6px; border-left: 1px solid rgb(var(--rule-c)); }
.s-avatar { width: 34px; height: 34px; border-radius: 999px; object-fit: cover; border: 1px solid rgb(var(--rule-c)); background: rgb(var(--paper-lo)); flex: none; }
.s-avatar-sm { width: 28px; height: 28px; }
.s-avatar-lg { width: 64px; height: 64px; }
.s-avatar-initial { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.s-avatar-lg.s-avatar-initial { font-size: 18px; }
.s-avatar-sm.s-avatar-initial { font-size: 8px; }
.s-entity-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border: 1px solid rgb(var(--rule-c)); border-radius: 3px; background: rgb(var(--paper)); color: rgb(var(--ink-blue)); }
.s-mobile-brand { display: none; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; }
.s-user strong { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.s-user span { display: block; font-size: 10px; color: rgb(var(--ink-3)); line-height: 1.2; }
.s-content { width: 100%; max-width: var(--s-max); margin: 0 auto; padding: 24px 28px 48px; }

/* ── Page head / generic ─────────────────────────────────────────────── */
.s-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.s-page-head > div:first-child { min-width: 0; }
.s-page-title { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -.025em; color: rgb(var(--ink)); }
.s-page-title-sm { font-size: 24px; }
.s-page-sub { margin: 5px 0 0; max-width: 72ch; font-size: 12.5px; line-height: 1.55; color: rgb(var(--ink-2)); }
.s-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.s-actions .btn-primary, .s-actions .btn-secondary, .s-actions .btn-ghost { min-height: 36px; padding: 0 12px; font-size: 12px; }
.s-subtle { color: rgb(var(--ink-3)); }
.s-caption { margin: 0; font-size: 11px; line-height: 1.45; color: rgb(var(--ink-3)); }
.s-section { margin-top: 22px; }
.s-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.s-section-title { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 600; line-height: 1.2; color: rgb(var(--ink)); }
.s-section-note { font-size: 11.5px; color: rgb(var(--ink-3)); }
.s-grid { display: grid; gap: 14px; }
.s-grid > *, .s-grid-main > * { min-width: 0; }
.card { min-width: 0; }
.s-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.s-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.s-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.s-grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.s-stack { display: flex; flex-direction: column; gap: 14px; }
.s-row { display: flex; align-items: center; gap: 10px; }
.s-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.s-wrap { flex-wrap: wrap; }
.s-rule { height: 1px; background: rgb(var(--rule-c)); border: 0; margin: 14px 0; }
.s-pill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgb(var(--rule-c)); border-radius: 999px; padding: 3px 8px; font-size: 10px; color: rgb(var(--ink-2)); background: rgb(var(--paper-hi)); }
.s-pill.is-blue { color: rgb(var(--ink-blue)); border-color: rgb(var(--ink-blue) / .35); background: rgb(var(--ink-blue) / .06); }
.s-pill.is-green { color: rgb(var(--chalk)); border-color: rgb(var(--chalk) / .35); background: rgb(var(--chalk) / .06); }
.s-pill.is-amber { color: rgb(var(--ochre)); border-color: rgb(var(--ochre) / .35); background: rgb(var(--ochre) / .07); }
.s-pill.is-red { color: rgb(var(--correction)); border-color: rgb(var(--correction) / .35); background: rgb(var(--correction) / .06); }
.s-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* ── Cards / metrics / tables ────────────────────────────────────────── */
.card { background: rgb(var(--paper-hi)); border: 1px solid rgb(var(--rule-c)); border-radius: 3px; }
.card-header { padding: 11px 14px; border-bottom: 1px solid rgb(var(--rule-c)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-body { padding: 14px; }
.s-card-title { margin: 0; font-size: 12.5px; font-weight: 650; color: rgb(var(--ink)); }
.s-card-note { margin: 2px 0 0; font-size: 10.5px; color: rgb(var(--ink-3)); }
.s-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid rgb(var(--rule-c)); border-radius: 3px; overflow: hidden; background: rgb(var(--paper-hi)); }
.s-metric { padding: 12px 14px; border-left: 1px solid rgb(var(--rule-c)); min-width: 0; }
.s-metric:first-child { border-left: 0; }
.s-metric-label { font-size: 10.5px; color: rgb(var(--ink-3)); }
.s-metric-value { margin: 3px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; line-height: 1; color: rgb(var(--ink)); }
.s-metric-hint { margin: 4px 0 0; font-size: 10px; color: rgb(var(--ink-3)); }
.s-hero { background: rgb(var(--paper-hi)); border-top: 2px solid rgb(var(--ink)); border-radius: 3px; padding: 16px 18px; }
.s-hero-label { font-size: 12px; font-weight: 600; color: rgb(var(--ink-2)); }
.s-hero-value { margin: 2px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: clamp(42px, 7vw, 76px); font-weight: 600; line-height: .9; letter-spacing: -.04em; color: rgb(var(--ink)); overflow-wrap: anywhere; }
.s-hero-note { margin: 8px 0 0; font-size: 11px; color: rgb(var(--ink-3)); }
.s-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.s-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.s-table th { padding: 9px 12px; border-bottom: 2px solid rgb(var(--ink)); text-align: left; font-size: 10px; font-weight: 650; color: rgb(var(--ink-2)); white-space: nowrap; }
.s-table td { padding: 10px 12px; border-bottom: 1px solid rgb(var(--rule-c)); vertical-align: middle; }
.s-table tbody tr:last-child td { border-bottom: 0; }
.s-table tbody tr:hover td { background: rgb(var(--paper-lo) / .45); }
.s-table .s-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-table .s-strong { font-weight: 600; color: rgb(var(--ink)); }
.s-table .s-muted { color: rgb(var(--ink-3)); }
.s-table .s-actions-cell { text-align: right; white-space: nowrap; }
.s-table .s-actions-cell a, .s-table .s-actions-cell button { margin-left: 4px; }
.s-table .s-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.s-table .s-person-text { min-width: 0; }
.s-table .s-person-text strong { display: block; font-weight: 600; color: rgb(var(--ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-table .s-person-text span { display: block; margin-top: 1px; font-size: 10px; color: rgb(var(--ink-3)); }
.s-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 9.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.s-badge-green { color: rgb(var(--chalk)); background: rgb(var(--chalk) / .1); }
.s-badge-amber { color: rgb(var(--ochre)); background: rgb(var(--ochre) / .12); }
.s-badge-red { color: rgb(var(--correction)); background: rgb(var(--correction) / .1); }
.s-badge-blue { color: rgb(var(--ink-blue)); background: rgb(var(--ink-blue) / .09); }
.s-badge-neutral { color: rgb(var(--ink-2)); background: rgb(var(--paper-lo)); }
.s-link { color: rgb(var(--ink-blue)); text-decoration: none; }
.s-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.s-btn-sm { min-height: 28px; padding: 0 8px; font-size: 10.5px; }
.s-filterbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.s-field { min-width: 0; }
.s-field label { display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 600; color: rgb(var(--ink-2)); }
.s-field .input, .s-field select { height: 34px; min-height: 34px; font-size: 11.5px; width: 100%; }
.s-field select { min-width: 140px; }
.s-search-wide { flex: 1 1 220px; }
.s-select { min-width: 138px; }
.s-avatar-stack { display: flex; align-items: center; }
.s-avatar-stack .s-avatar { margin-left: -7px; border: 2px solid rgb(var(--paper-hi)); }
.s-avatar-stack .s-avatar:first-child { margin-left: 0; }

/* ── Charts ──────────────────────────────────────────────────────────── */
.s-chart { width: 100%; height: 210px; display: block; }
.s-chart text { font-family: 'Geist', system-ui, sans-serif; font-size: 9px; fill: rgb(var(--ink-3)); }
.s-chart .s-line { fill: none; stroke: rgb(var(--ink-blue)); stroke-width: 2.5; }
.s-chart .s-area { fill: rgb(var(--ink-blue) / .07); }
.s-chart .s-point { fill: rgb(var(--paper-hi)); stroke: rgb(var(--ink-blue)); stroke-width: 2; }
.s-chart .s-axis { stroke: rgb(var(--rule-c)); stroke-width: 1; }
.s-bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 8px; }
.s-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.s-bar { width: 100%; max-width: 42px; background: rgb(var(--ink-blue)); border-radius: 2px 2px 0 0; min-height: 2px; }
.s-bar.is-soft { background: rgb(var(--ink-blue) / .3); }
.s-bar-label { font-size: 9px; color: rgb(var(--ink-3)); white-space: nowrap; }
.s-bar-value { font-size: 9px; font-weight: 600; color: rgb(var(--ink-2)); }
.s-progress { height: 7px; border-radius: 3px; background: rgb(var(--paper-lo)); overflow: hidden; }
.s-progress > span { display: block; height: 100%; border-radius: 3px; background: rgb(var(--ink-blue)); }
.s-progress.is-green > span { background: rgb(var(--chalk)); }
.s-progress.is-amber > span { background: rgb(var(--ochre)); }
.s-progress.is-red > span { background: rgb(var(--correction)); }

/* ── Portal (teacher / student / parent) ─────────────────────────────── */
.s-portal { min-height: 100vh; background: rgb(var(--paper)); }
.s-portal-topbar { position: sticky; top: 0; z-index: 20; height: var(--s-topbar); display: flex; align-items: center; gap: 14px; padding: 0 24px; background: rgb(var(--paper)); border-bottom: 1px solid rgb(var(--rule-c)); }
.s-portal-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.s-portal-brand img { width: 28px; height: 28px; }
.s-portal-brand > span { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.s-portal-brand strong { font-size: 12px; white-space: nowrap; }
.s-portal-brand > span > span { font-size: 10px; color: rgb(var(--ink-3)); white-space: nowrap; }
.s-portal-title { min-width: 0; padding-left: 12px; border-left: 1px solid rgb(var(--rule-c)); }
.s-portal-title strong { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-portal-title span { display: block; font-size: 10px; color: rgb(var(--ink-3)); }
.s-portal-topbar .s-topbar-right { margin-left: auto; }
.s-portal-nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; padding: 0 20px; background: rgb(var(--paper)); border-bottom: 1px solid rgb(var(--rule-c)); position: sticky; top: var(--s-topbar); z-index: 19; scrollbar-width: thin; }
.s-portal-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 11px; border-bottom: 2px solid transparent; color: rgb(var(--ink-3)); font-size: 11.5px; text-decoration: none; white-space: nowrap; }
.s-portal-tab:hover { color: rgb(var(--ink)); }
.s-portal-tab.is-active { color: rgb(var(--ink-blue)); border-bottom-color: rgb(var(--ink-blue)); font-weight: 600; }
.s-portal-tab .s-icon { width: 15px; height: 15px; }
.s-portal-content { width: 100%; max-width: 1160px; margin: 0 auto; padding: 24px 24px 52px; }
.s-portal .s-page-title { font-size: 28px; }
.s-portal .s-content { max-width: 1160px; }

/* ── Auth ────────────────────────────────────────────────────────────── */
.s-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.s-auth-aside { background: rgb(var(--paper-hi)); border-right: 1px solid rgb(var(--rule-c)); padding: 44px; display: flex; flex-direction: column; justify-content: space-between; }
.s-auth-aside .s-brand { height: auto; padding: 0; border: 0; }
.s-auth-copy { max-width: 480px; }
.s-auth-kicker { font-size: 11px; font-weight: 600; color: rgb(var(--ink-3)); }
.s-auth-title { margin: 8px 0 0; font-family: 'Fraunces', Georgia, serif; font-size: clamp(34px, 4vw, 52px); font-weight: 600; line-height: .98; letter-spacing: -.04em; }
.s-auth-lede { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: rgb(var(--ink-2)); }
.s-auth-facts { display: grid; gap: 10px; margin-top: 28px; }
.s-auth-fact { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: rgb(var(--ink-2)); }
.s-auth-panel { display: flex; align-items: center; justify-content: center; padding: 28px; }
.s-auth-card { width: min(400px, 100%); }
.s-auth-card .card-body { padding: 24px; }
.s-auth-title-sm { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.s-auth-sub { margin: 5px 0 20px; font-size: 11.5px; line-height: 1.5; color: rgb(var(--ink-3)); }
.s-auth-card .input { min-height: 40px; font-size: 12px; }
.s-auth-card .btn-primary, .s-auth-card .btn-secondary { width: 100%; min-height: 42px; font-size: 12px; }
.s-auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; font-size: 10px; color: rgb(var(--ink-3)); }
.s-auth-divider::before, .s-auth-divider::after { content: ''; flex: 1; height: 1px; background: rgb(var(--rule-c)); }
.s-auth-switch { margin-top: 14px; text-align: center; font-size: 10.5px; color: rgb(var(--ink-3)); }
.s-auth-switch a { color: rgb(var(--ink-blue)); text-decoration: none; }

/* ── Index gallery ───────────────────────────────────────────────────── */
.s-index { width: 100%; max-width: 1220px; margin: 0 auto; padding: 34px 28px 56px; }
.s-index-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.s-index-title { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: clamp(34px, 5vw, 52px); font-weight: 600; line-height: .98; letter-spacing: -.04em; }
.s-index-lede { max-width: 620px; margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: rgb(var(--ink-2)); }
.s-index-group { margin-top: 28px; }
.s-index-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.s-index-group-title { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600; }
.s-index-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.s-index-card { display: flex; flex-direction: column; gap: 8px; min-height: 118px; padding: 14px; border: 1px solid rgb(var(--rule-c)); border-radius: 3px; background: rgb(var(--paper-hi)); text-decoration: none; color: inherit; }
.s-index-card:hover { border-color: rgb(var(--ink-3)); background: rgb(var(--paper-lo) / .35); }
.s-index-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.s-index-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid rgb(var(--rule-c)); border-radius: 3px; color: rgb(var(--ink-blue)); background: rgb(var(--paper)); }
.s-index-card h3 { margin: 0; font-size: 13px; font-weight: 650; }
.s-index-card p { margin: 0; font-size: 10.5px; line-height: 1.45; color: rgb(var(--ink-3)); }
.s-index-arrow { margin-top: auto; font-size: 10px; color: rgb(var(--ink-blue)); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .s-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .s-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-grid-main { grid-template-columns: 1fr; }
  .s-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .s-mobile-brand { display: inline-flex; }
  .s-shell { display: block; }
  .s-sidebar { display: none; }
  .s-topbar { padding: 0 16px; }
  .s-content { padding: 18px 16px 36px; }
  .s-auth { grid-template-columns: 1fr; }
  .s-auth-aside { min-height: 280px; padding: 28px; border-right: 0; border-bottom: 1px solid rgb(var(--rule-c)); }
  .s-auth-panel { padding: 24px 16px 40px; }
  .s-portal-topbar { padding: 0 16px; }
  .s-portal-title { display: none; }
  .s-portal-content { padding: 18px 16px 40px; }
  .s-portal-nav { padding: 0 12px; }
  .s-index { padding: 24px 16px 40px; }
  .s-index-head { display: block; }
  .s-index-grid { grid-template-columns: 1fr 1fr; }
  .s-table.s-table-wide { min-width: 600px; }
}
@media (max-width: 640px) {
  .s-page-head { display: block; }
  .s-actions { margin-top: 12px; }
  .s-grid-2, .s-grid-3, .s-grid-4, .s-grid-5 { grid-template-columns: 1fr; }
  .s-metrics { grid-template-columns: 1fr 1fr; }
  .s-metric:nth-child(3) { border-left: 0; border-top: 1px solid rgb(var(--rule-c)); }
  .s-metric:nth-child(4) { border-top: 1px solid rgb(var(--rule-c)); }
  .s-index-grid { grid-template-columns: 1fr; }
  .s-topbar .s-search, .s-topbar .s-user span, .s-topbar .s-user strong { display: none; }
  .s-topbar-right { gap: 2px; }
  .s-portal-brand span { display: none; }
  .s-auth-aside { min-height: 230px; }
  .s-auth-title { font-size: 34px; }
  .s-chart { height: 180px; }
  .s-bars { gap: 6px; }
  .s-bar-label { font-size: 8px; }
}
