:root {
  color-scheme: light;
  --navy-950: #071b2c;
  --navy-900: #102a43;
  --navy-800: #173f5f;
  --blue-700: #1769a8;
  --blue-600: #2e74b5;
  --blue-100: #e8f2fa;
  --teal-700: #17775f;
  --teal-100: #e5f6f0;
  --gold-500: #f2b134;
  --gold-100: #fff6df;
  --red-700: #a33d4b;
  --red-100: #fcecef;
  --ink: #172b4d;
  --muted: #65758b;
  --line: #dbe4ec;
  --line-dark: #c9d6e1;
  --surface: #ffffff;
  --surface-soft: #f6f9fb;
  --surface-blue: #f1f7fb;
  --shadow-sm: 0 1px 2px rgb(16 42 67 / 7%), 0 5px 18px rgb(16 42 67 / 5%);
  --shadow-lg: 0 22px 70px rgb(7 27 44 / 18%);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --sidebar: 260px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--surface-soft); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgb(46 116 181 / 8%), transparent 28rem),
    var(--surface-soft);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  background: var(--navy-900);
}
.skip-link:focus { top: 16px; }

.loading-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
}

.loader {
  width: 34px;
  height: 34px;
  margin: 0 auto 12px;
  border: 3px solid var(--line);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.95fr) minmax(500px, 1.35fr);
  background: var(--surface);
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 7vw, 96px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--navy-900);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px 12px 12px 3px;
  color: white;
  background: linear-gradient(145deg, var(--blue-600), var(--navy-900));
  box-shadow: 0 8px 22px rgb(46 116 181 / 22%);
  font-size: 16px;
}

.brand span small {
  display: block;
  margin-top: -3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.login-copy { max-width: 470px; margin: 52px 0 32px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(34px, 4vw, 53px); line-height: 1.04; letter-spacing: -0.045em; }
h2 { margin-bottom: 8px; font-size: clamp(25px, 3vw, 33px); line-height: 1.16; letter-spacing: -0.035em; }
h3 { margin-bottom: 8px; font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; }
.login-copy p { color: var(--muted); font-size: 16px; }

.login-form { max-width: 470px; }
.registration-panel { justify-content: flex-start; overflow-y: auto; padding-top: clamp(32px, 5vw, 66px); padding-bottom: clamp(32px, 5vw, 66px); }
.register-copy { margin: 28px 0 24px; }
.register-copy h1 { font-size: clamp(31px, 3.5vw, 45px); }
.registration-form { display: grid; max-width: 580px; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.form-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { color: var(--navy-900); font-size: 13px; font-weight: 750; }
.field-help, .form-note { color: var(--muted); font-size: 11px; line-height: 1.45; }
.form-note { margin: 9px 0 0; text-align: center; }
.input, .select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 140ms, box-shadow 140ms;
}
.input:focus, .select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgb(46 116 181 / 13%); }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: white;
  background: var(--navy-900);
  font-size: 13px;
  font-weight: 760;
  box-shadow: 0 8px 18px rgb(16 42 67 / 12%);
  transition: transform 140ms, background 140ms, box-shadow 140ms;
}
.button:hover { transform: translateY(-1px); background: var(--navy-800); box-shadow: 0 10px 22px rgb(16 42 67 / 17%); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.button-block { width: 100%; }
.button-secondary { color: var(--navy-900); background: white; border-color: var(--line-dark); box-shadow: none; }
.button-secondary:hover { background: var(--surface-soft); }
.button-danger { color: var(--red-700); border-color: #efbdc5; background: var(--red-100); box-shadow: none; }
.button-danger:hover { color: white; background: var(--red-700); box-shadow: none; }
.button-quiet { min-height: 36px; padding: 6px 10px; color: var(--blue-700); background: transparent; box-shadow: none; }
.button-quiet:hover { background: var(--blue-100); box-shadow: none; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 12px; }

.demo-accounts { display: grid; gap: 9px; margin-top: 22px; }
.demo-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.demo-button {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface-soft);
  text-align: left;
}
.demo-button:hover { border-color: var(--blue-600); background: var(--surface-blue); }
.demo-button strong { display: block; font-size: 12px; }
.demo-button span { color: var(--muted); font-size: 11px; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.auth-switch.compact { margin-top: 6px; }
.auth-switch button { padding: 2px; border: 0; color: var(--blue-700); background: transparent; font: inherit; font-weight: 800; }
.auth-switch button:hover { text-decoration: underline; }

.login-visual {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 60px;
  color: white;
  background:
    radial-gradient(circle at 77% 23%, rgb(242 177 52 / 35%), transparent 13rem),
    radial-gradient(circle at 15% 80%, rgb(46 116 181 / 50%), transparent 21rem),
    linear-gradient(145deg, #173f5f, #071b2c 70%);
}
.login-visual::before, .login-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 50%;
}
.login-visual::before { width: 560px; height: 560px; right: -220px; top: -130px; }
.login-visual::after { width: 420px; height: 420px; left: -220px; bottom: -160px; }
.visual-stack { position: relative; width: min(610px, 100%); }
.visual-heading { width: 80%; margin-bottom: 34px; }
.visual-heading .eyebrow { color: #9bd6f4; }
.visual-heading h2 { font-size: clamp(30px, 4vw, 44px); }
.visual-heading p { color: rgb(255 255 255 / 70%); }

.preview-card {
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 96%);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  transform: rotate(-1.2deg);
}
.preview-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.preview-dots { display: flex; gap: 5px; }
.preview-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-dark); }
.preview-content { display: grid; grid-template-columns: 108px 1fr; min-height: 315px; }
.preview-nav { padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface-soft); }
.preview-nav span { display: block; height: 8px; margin-bottom: 13px; border-radius: 8px; background: var(--line); }
.preview-nav span:nth-child(2) { width: 80%; background: var(--blue-600); }
.preview-main { padding: 24px; }
.preview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.preview-metric { padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.preview-metric small { display: block; color: var(--muted); font-size: 8px; }
.preview-metric b { font-size: 20px; }
.preview-chart { position: relative; height: 126px; margin-top: 23px; border-radius: 14px; background: linear-gradient(180deg, var(--blue-100), white); overflow: hidden; }
.preview-chart::before { content: ""; position: absolute; inset: 42px 0 0; background: linear-gradient(168deg, transparent 0 21%, rgb(46 116 181 / 35%) 22% 27%, transparent 28% 39%, rgb(46 116 181 / 48%) 40% 45%, transparent 46% 58%, rgb(46 116 181 / 65%) 59% 64%, transparent 65%); }
.onboarding-steps { display: grid; gap: 12px; }
.onboarding-steps > div { display: grid; grid-template-columns: 42px 1fr; gap: 2px 14px; padding: 17px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 14px; background: rgb(255 255 255 / 7%); backdrop-filter: blur(10px); }
.onboarding-steps span { display: grid; width: 42px; height: 42px; grid-row: 1 / 3; place-items: center; border-radius: 12px; color: var(--navy-900); background: var(--gold-500); font-weight: 850; }
.onboarding-steps strong { align-self: end; }
.onboarding-steps small { color: rgb(255 255 255 / 60%); }
.invite-assurance { display: grid; grid-template-columns: 54px 1fr; gap: 4px 16px; padding: 23px; border: 1px solid rgb(255 255 255 / 14%); border-radius: var(--radius-lg); background: rgb(255 255 255 / 7%); }
.invite-assurance > div { display: grid; width: 54px; height: 54px; grid-row: 1 / 3; place-items: center; border-radius: 16px; color: var(--navy-900); background: var(--gold-500); font-size: 20px; font-weight: 900; }
.invite-assurance strong { align-self: end; font-size: 17px; }
.invite-assurance span { color: rgb(255 255 255 / 62%); font-size: 12px; }
.code-input { font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 22px 17px 18px;
  color: white;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
}
.sidebar .brand { padding: 3px 7px 28px; color: white; }
.sidebar .brand span small { color: rgb(255 255 255 / 48%); }
.school-pill { margin: 0 4px 21px; padding: 12px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 13px; background: rgb(255 255 255 / 5%); }
.school-pill strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.school-pill span { color: rgb(255 255 255 / 54%); font-size: 11px; }
.nav-label { padding: 0 11px 7px; color: rgb(255 255 255 / 40%); font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  color: rgb(255 255 255 / 67%);
  background: transparent;
  font-size: 13px;
  font-weight: 680;
  text-align: left;
}
.nav-item:hover { color: white; background: rgb(255 255 255 / 7%); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgb(46 116 181 / 45%), rgb(255 255 255 / 7%)); }
.nav-icon { display: grid; width: 24px; height: 24px; place-items: center; font-size: 16px; }
.sidebar-footer { margin-top: auto; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 12px 7px; border-top: 1px solid rgb(255 255 255 / 9%); }
.avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--navy-900); background: var(--gold-500); font-size: 12px; font-weight: 850; }
.user-mini strong { display: block; max-width: 125px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-mini span { color: rgb(255 255 255 / 48%); font-size: 10px; }
.logout-button { margin-left: auto; padding: 7px; border: 0; border-radius: 8px; color: rgb(255 255 255 / 58%); background: transparent; }
.logout-button:hover { color: white; background: rgb(255 255 255 / 7%); }

.app-main { min-width: 0; }
.topbar { display: flex; height: 72px; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 87%); backdrop-filter: blur(12px); }
.topbar-title { font-size: 13px; font-weight: 750; }
.topbar-subtitle { color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-700); font-size: 11px; font-weight: 750; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #28b486; box-shadow: 0 0 0 4px rgb(40 180 134 / 12%); }
.notification-button { position: relative; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--navy-900); background: white; font-size: 17px; }
.notification-button:hover { border-color: #b9d5e9; background: var(--surface-blue); }
.notification-count { position: absolute; right: -5px; top: -5px; display: grid; min-width: 18px; height: 18px; place-items: center; padding: 0 5px; border: 2px solid white; border-radius: 999px; color: white; background: var(--red-700); font-size: 9px; line-height: 1; }

.page { max-width: 1440px; margin: 0 auto; padding: 36px clamp(20px, 4vw, 48px) 60px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { position: relative; min-height: 148px; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -25px; top: -25px; border-radius: 50%; background: var(--metric-glow, var(--blue-100)); }
.metric-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--metric-color, var(--blue-700)); background: var(--metric-bg, var(--blue-100)); font-size: 16px; }
.metric-label { margin: 17px 0 5px; color: var(--muted); font-size: 11px; font-weight: 730; text-transform: uppercase; letter-spacing: 0.08em; }
.metric-value { font-size: 25px; font-weight: 820; letter-spacing: -0.04em; }
.metric-note { margin-top: 4px; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr); gap: 18px; margin-top: 18px; }
.setup-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 22px 24px; border: 1px solid #c9e7dd; border-radius: var(--radius); background: linear-gradient(120deg, #f2fbf7, #f8fbff); box-shadow: var(--shadow-sm); }
.setup-banner .eyebrow { margin-bottom: 5px; color: var(--teal-700); }
.setup-banner h3 { margin-bottom: 4px; }
.setup-banner p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 20px 15px; }
.panel-header h3 { margin: 0; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 4px 20px 20px; }

.collection-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 8px 0 18px; }
.collection-hero strong { display: block; font-size: 30px; letter-spacing: -0.04em; }
.collection-hero span { color: var(--muted); font-size: 12px; }
.collection-percent { color: var(--teal-700); font-size: 13px; font-weight: 800; }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: var(--line); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), #31a98a); }
.progress-labels { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 10px; }

.activity-list { display: grid; gap: 1px; }
.activity-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: var(--blue-700); background: var(--blue-100); font-size: 12px; }
.activity-row p { margin: 0; font-size: 12px; }
.activity-row span { color: var(--muted); font-size: 10px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 11px 14px; border-bottom: 1px solid var(--line-dark); color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 800; letter-spacing: 0.07em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdff; }
.primary-cell strong { display: block; color: var(--navy-900); font-size: 13px; }
.primary-cell span, .secondary-text { color: var(--muted); font-size: 11px; }
.money { font-variant-numeric: tabular-nums; font-weight: 750; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; color: var(--badge-color, var(--blue-700)); background: var(--badge-bg, var(--blue-100)); font-size: 10px; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-success { --badge-color: var(--teal-700); --badge-bg: var(--teal-100); }
.badge-warning { --badge-color: #916312; --badge-bg: var(--gold-100); }
.badge-danger { --badge-color: var(--red-700); --badge-bg: var(--red-100); }
.badge-neutral { --badge-color: var(--muted); --badge-bg: #edf1f5; }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.search-wrap { position: relative; width: min(330px, 100%); }
.search-wrap .input { min-height: 40px; padding-left: 36px; }
.search-icon { position: absolute; left: 12px; top: 9px; color: var(--muted); }
.filter-pills { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-pill { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 11px; font-weight: 700; }
.filter-pill.active { color: var(--blue-700); border-color: #b9d5e9; background: var(--blue-100); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.record-card { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.record-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.record-card-head h3 { margin-bottom: 3px; }
.record-card-head p { margin: 0; color: var(--muted); font-size: 11px; }
.record-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.record-meta small { display: block; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.record-meta strong { display: block; margin-top: 3px; font-size: 13px; }
.record-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.payments-panel { margin-top: 18px; }
.embedded-table { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; }
.payment-reference { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.payment-gateway-banner { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #ecd9a6; border-radius: var(--radius); background: #fffaf0; }
.payment-gateway-banner.is-live { border-color: #b8ddd3; background: var(--teal-100); }
.payment-gateway-banner > div:nth-child(2) { min-width: 0; flex: 1; }
.payment-gateway-banner strong, .payment-gateway-banner span { display: block; }
.payment-gateway-banner strong { margin-bottom: 2px; font-size: 12px; }
.payment-gateway-banner span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.gateway-mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: white; background: var(--navy-900); font-weight: 900; }
.payment-attempts-panel { margin-bottom: 18px; }
.payment-attempt-row { flex-wrap: wrap; }
.payment-attempt-row .button { margin-left: 3px; }
.billing-history-panel { margin-bottom: 18px; }
.billing-history { border-top: 1px solid var(--line); }
.billing-history-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(70px, 0.35fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr); align-items: center; gap: 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.billing-history-row:last-child { border-bottom: 0; }
.billing-history-main strong, .billing-history-main span, .billing-history-stat small, .billing-history-stat strong, .billing-history-meta span, .billing-history-meta small { display: block; }
.billing-history-main strong { margin-bottom: 3px; font-size: 12px; }
.billing-history-main span, .billing-history-stat small, .billing-history-meta small { color: var(--muted); font-size: 10px; }
.billing-history-stat strong { margin-top: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
.billing-history-meta { text-align: right; }
.billing-history-meta span { margin-bottom: 2px; font-size: 11px; font-weight: 700; }
.billing-target-fields { padding: 13px 13px 1px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.billing-student-select { min-height: 150px; padding: 5px; }
.billing-student-select option { padding: 7px 8px; border-radius: 6px; }
.billing-preview { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 15px 0; padding: 12px 13px; border: 1px solid #bddbd2; border-radius: 11px; color: var(--teal-700); background: var(--teal-100); }
.billing-preview span { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.billing-preview strong { font-size: 12px; text-align: right; }

.parent-hero { position: relative; overflow: hidden; padding: 30px; border-radius: var(--radius-lg); color: white; background: linear-gradient(128deg, var(--navy-900), var(--blue-700)); box-shadow: 0 18px 40px rgb(16 42 67 / 14%); }
.parent-hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -115px; border: 44px solid rgb(255 255 255 / 7%); border-radius: 50%; }
.parent-hero .eyebrow { color: #a7dcf5; }
.parent-hero p { max-width: 620px; margin: 0; color: rgb(255 255 255 / 72%); }
.ward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin-top: 18px; }
.ward-card { position: relative; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.ward-name { display: flex; align-items: center; gap: 13px; }
.ward-name .avatar { color: white; background: var(--blue-600); }
.ward-name h3 { margin: 0; }
.ward-name p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.ward-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.ward-stat { padding: 13px; border-radius: 12px; background: var(--surface-soft); }
.ward-stat small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.ward-stat strong { display: block; margin-top: 3px; }

.grade-groups { display: grid; gap: 18px; }
.result-sheet { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.result-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.score-circle { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; color: var(--teal-700); background: var(--teal-100); font-size: 13px; font-weight: 850; }
.attendance-controls { margin-bottom: 16px; padding: 18px 20px; }
.attendance-filter-form { display: grid; grid-template-columns: minmax(180px, 0.45fr) minmax(220px, 1fr) auto; align-items: end; gap: 13px; }
.attendance-filter-form .field { margin: 0; }
.attendance-metrics { margin-bottom: 18px; }
.attendance-register, .attendance-recent, .attendance-history { margin-top: 18px; }
.attendance-table .attendance-status { min-width: 135px; padding: 9px 11px; }
.attendance-table .attendance-note { min-width: 220px; padding: 9px 11px; }
.attendance-save { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 15px 20px 18px; border-top: 1px solid var(--line); }
.attendance-save span { color: var(--muted); font-size: 10px; }
.attendance-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.attendance-summary-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.attendance-summary-card h3 { margin: 0; }
.attendance-summary-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.attendance-rate { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 16px; color: var(--teal-700); background: var(--teal-100); font-size: 15px; font-weight: 850; }
.attendance-facts { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.attendance-facts span { padding: 10px; border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: 9px; text-align: center; text-transform: uppercase; }
.attendance-facts strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 13px; }
.report-workflow, .grade-records-panel { margin-top: 18px; }
.report-workflow-table { min-width: 980px; }
.report-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.family-report-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.family-report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.family-report-head h3 { margin: 3px 0; }
.family-report-head p { margin: 0; color: var(--muted); font-size: 11px; }
.report-kicker { color: var(--teal-700); font-size: 8px; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.report-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.report-stat-grid > div { padding: 11px; border-radius: 10px; background: var(--surface-soft); }
.report-stat-grid small, .report-stat-grid strong { display: block; }
.report-stat-grid small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.report-stat-grid strong { margin-top: 3px; font-size: 12px; }
.report-comments { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report-comments > div { padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.report-comments small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.report-comments p { margin: 5px 0 0; color: var(--ink); font-size: 10px; line-height: 1.55; }
.published-results { margin-top: 28px; }
.compact-heading { margin-bottom: 15px; }
.report-rating-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.report-comment { min-height: 112px; }
.report-readiness { display: flex; gap: 8px; margin-bottom: 10px; }
.report-readiness span { padding: 7px 10px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 750; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.65fr); gap: 18px; align-items: start; }
.settings-card .panel-body { padding-top: 10px; }
.settings-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.textarea { min-height: 92px; resize: vertical; }
.settings-actions { display: flex; align-items: flex-start; justify-content: flex-end; gap: 12px; }
.settings-actions #settings-error { flex: 1; }
.settings-actions .error-box { margin: 0; }
.workspace-card { position: sticky; top: 18px; }
.workspace-facts { display: grid; gap: 17px; }
.workspace-facts > div:not(.assisted-note) { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.workspace-facts small, .workspace-facts strong { display: block; }
.workspace-facts small { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 780; letter-spacing: 0.07em; text-transform: uppercase; }
.workspace-facts strong { overflow-wrap: anywhere; font-size: 13px; }
.workspace-facts .assisted-note { display: grid; gap: 4px; margin-bottom: 0; }
.communications-panel { margin-top: 18px; }
.provider-grid { display: grid; grid-template-columns: repeat(3, minmax(130px, 0.45fr)) minmax(240px, 1fr); gap: 10px; padding: 0 20px 18px; }
.provider-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 9px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.provider-card > span:first-child { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.provider-card > strong { grid-column: 1; font-size: 12px; }
.provider-card > .badge { grid-column: 2; grid-row: 1 / span 2; }
.provider-total { display: block; background: var(--surface-blue); }
.provider-total span, .provider-total strong, .provider-total small { display: block; }
.provider-total strong { margin: 3px 0 1px; }
.provider-total small { color: var(--muted); font-size: 9px; }
.people-section { margin-top: 18px; }
.people-section .panel-header { border-bottom: 1px solid var(--line); }
.people-table { border: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; }
.people-table .data-table { min-width: 900px; }
.people-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.staff-list, .compact-list { display: grid; gap: 0; }
.staff-row, .compact-row { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.staff-row:last-child, .compact-row:last-child { border-bottom: 0; }
.staff-row > div:nth-child(2), .compact-row > div { min-width: 0; flex: 1; }
.staff-row strong, .staff-row span, .compact-row strong, .compact-row span { display: block; }
.staff-row strong, .compact-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.staff-row span:not(.badge), .compact-row span:not(.badge) { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.import-history { margin-bottom: 10px; }
.empty-state.small { padding: 24px 10px; }
.form-section-label { margin: 4px 0 13px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--blue-700); font-size: 10px; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.invite-code-card { display: grid; justify-items: center; gap: 7px; margin-bottom: 17px; padding: 24px; border: 1px solid #b9ddf1; border-radius: 14px; background: var(--surface-blue); text-align: center; }
.invite-code-card span, .invite-code-card small { color: var(--muted); font-size: 11px; }
.invite-code-card strong { color: var(--navy-900); font-size: clamp(22px, 5vw, 30px); letter-spacing: 0.08em; }
.invite-share { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.import-template-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; padding: 15px; border: 1px solid #c9e7dd; border-radius: 13px; background: #f2fbf7; }
.import-template-card strong, .import-template-card span { display: block; }
.import-template-card strong { font-size: 12px; }
.import-template-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.file-input { width: 100%; padding: 11px; border: 1px dashed var(--line-dark); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface-soft); }
.file-input::file-selector-button { margin-right: 12px; padding: 8px 11px; border: 0; border-radius: 8px; color: white; background: var(--navy-900); font-weight: 750; }
.import-text { min-height: 150px; font-family: Consolas, monospace; font-size: 11px; }

.timeline { position: relative; display: grid; gap: 0; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 16px; bottom: 16px; width: 1px; background: var(--line-dark); }
.timeline-item { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 13px; padding: 0 0 20px; }
.timeline-marker { z-index: 1; display: grid; width: 34px; height: 34px; place-items: center; border: 4px solid var(--surface-soft); border-radius: 50%; color: var(--blue-700); background: var(--blue-100); font-size: 11px; }
.timeline-card { padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow-sm); }
.timeline-card p { margin: 0; font-size: 12px; }
.timeline-card div { display: flex; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 10px; }

.empty-state { padding: 60px 24px; border: 1px dashed var(--line-dark); border-radius: var(--radius); color: var(--muted); background: white; text-align: center; }
.empty-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 14px; place-items: center; border-radius: 14px; color: var(--blue-700); background: var(--blue-100); font-size: 21px; }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(7 27 44 / 58%); backdrop-filter: blur(4px); animation: fadeIn 150ms ease-out; }
.modal { width: min(560px, 100%); max-height: min(740px, calc(100vh - 40px)); overflow-y: auto; border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-lg); animation: riseIn 180ms ease-out; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 14px; }
.modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.modal-close { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 9px; color: var(--muted); background: var(--surface-soft); }
.modal-body { padding: 10px 24px 25px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 10px; }
.assisted-note { display: flex; gap: 11px; margin-bottom: 18px; padding: 13px; border: 1px solid #f0d897; border-radius: 12px; color: #755313; background: var(--gold-100); font-size: 11px; }
.notification-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.notification-toolbar > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.notification-toolbar-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.notification-list { display: grid; gap: 8px; }
.notification-item { position: relative; display: grid; width: 100%; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: white; text-align: left; }
.notification-item:hover { border-color: #b9d5e9; background: var(--surface-blue); }
.notification-item.is-unread { border-color: #bdd8eb; background: #f6fbff; }
.notification-item > i { position: absolute; right: 11px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-600); }
.notification-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--blue-700); background: var(--blue-100); font-size: 13px; font-weight: 850; }
.notification-copy, .notification-copy b, .notification-copy > span { display: block; min-width: 0; }
.notification-meta { display: flex !important; align-items: center; justify-content: space-between; gap: 15px; padding-right: 10px; }
.notification-meta strong { color: var(--blue-700); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.notification-meta small { color: var(--muted); font-size: 9px; font-weight: 600; }
.notification-copy b { margin: 3px 0 2px; font-size: 12px; }
.notification-copy > span:last-child { color: var(--muted); font-size: 10px; line-height: 1.5; }
.delivery-assurance, .provider-preview-note { display: grid; gap: 3px; margin-bottom: 13px; padding: 13px; border: 1px solid #bddbd2; border-radius: 12px; color: var(--teal-700); background: var(--teal-100); }
.delivery-assurance strong, .provider-preview-note strong { font-size: 11px; }
.delivery-assurance span, .provider-preview-note span { font-size: 10px; line-height: 1.5; }
.preference-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 14px; margin-bottom: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.preference-row:has(input:focus-visible) { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgb(46 116 181 / 13%); }
.preference-row.is-unavailable { cursor: not-allowed; opacity: 0.55; background: var(--surface-soft); }
.preference-copy strong, .preference-copy small { display: block; }
.preference-copy strong { margin-bottom: 2px; font-size: 12px; }
.preference-copy small { color: var(--muted); font-size: 10px; }
.preference-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.preference-switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line-dark); transition: background 140ms; }
.preference-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgb(16 42 67 / 20%); transition: transform 140ms; }
.preference-row input:checked + .preference-switch { background: var(--teal-700); }
.preference-row input:checked + .preference-switch::after { transform: translateX(18px); }
.provider-preview-note { margin-top: 14px; color: #755313; border-color: #f0d897; background: var(--gold-100); }

.feedback-button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line-dark); border-radius: 10px; color: var(--navy-900); background: white; font-size: 11px; font-weight: 800; }
.feedback-button:hover { border-color: #9fc5df; background: var(--surface-blue); }
.feedback-button span { color: var(--blue-700); font-size: 15px; }
.pilot-hero { display: grid; grid-template-columns: auto minmax(260px, 1fr) minmax(300px, auto); align-items: center; gap: 24px; margin-bottom: 22px; padding: 24px; background: linear-gradient(130deg, #f7fbff, white 60%); }
.pilot-score { display: grid; width: 112px; height: 112px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal-700) var(--pilot-score), var(--line) 0); }
.pilot-score::before { content: ""; grid-area: 1 / 1; width: 86px; height: 86px; border-radius: 50%; background: white; box-shadow: inset 0 0 0 1px var(--line); }
.pilot-score > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.pilot-score strong, .pilot-score span { display: block; }
.pilot-score strong { color: var(--navy-900); font-size: 25px; }
.pilot-score span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pilot-hero-copy h3 { margin: 10px 0 5px; color: var(--navy-900); font-size: 20px; }
.pilot-hero-copy p { max-width: 600px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.pilot-summary { display: grid; grid-template-columns: repeat(2, minmax(90px, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; }
.pilot-summary > div { padding: 13px 15px; }
.pilot-summary > div:nth-child(odd) { border-right: 1px solid var(--line); }
.pilot-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.pilot-summary small, .pilot-summary strong { display: block; }
.pilot-summary small { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.pilot-summary strong { margin-top: 2px; color: var(--navy-900); font-size: 20px; }
.danger-text { color: var(--red-700) !important; }
.pilot-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .75fr); align-items: start; gap: 22px; margin-bottom: 22px; }
.pilot-checklist { display: grid; padding: 0 20px 18px; }
.pilot-check { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pilot-check:last-child { border-bottom: 0; }
.pilot-check-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line-dark); border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: 15px; font-weight: 900; }
.pilot-check.is-complete .pilot-check-mark { color: var(--teal-700); border-color: #b9e0d2; background: var(--teal-100); }
.pilot-check strong, .pilot-check p, .pilot-check small { display: block; }
.pilot-check strong { color: var(--navy-900); font-size: 12px; }
.pilot-check p { margin: 2px 0 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.pilot-check small { color: var(--blue-700); font-size: 9px; font-weight: 700; }
.pilot-guide { position: sticky; top: 88px; }
.pilot-guide ol { display: grid; gap: 14px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: pilot-step; }
.pilot-guide li { display: grid; grid-template-columns: 28px 1fr; gap: 3px 10px; counter-increment: pilot-step; }
.pilot-guide li::before { content: counter(pilot-step); display: grid; width: 27px; height: 27px; grid-row: 1 / 3; place-items: center; border-radius: 9px; color: var(--blue-700); background: var(--blue-100); font-size: 11px; font-weight: 900; }
.pilot-guide li strong, .pilot-guide li span { display: block; }
.pilot-guide li strong { font-size: 11px; }
.pilot-guide li span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.pilot-feedback-panel { margin-bottom: 20px; }
.pilot-feedback-text { min-height: 145px; }
.pilot-issue-detail { margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.pilot-issue-detail h4 { margin: 12px 0 5px; font-size: 15px; }
.pilot-issue-detail p { margin: 0 0 8px; color: var(--ink); white-space: pre-wrap; font-size: 11px; line-height: 1.6; }
.pilot-issue-detail small { color: var(--muted); font-size: 9px; }
.demo-owner { grid-column: 1 / -1; }
.registration-result { max-width: 520px; margin: auto 0; padding: 70px 0; }
.registration-result-icon { display: grid; width: 62px; height: 62px; margin-bottom: 22px; place-items: center; border: 1px solid #b9e0d2; border-radius: 20px; color: var(--teal-700); background: var(--teal-100); font-size: 26px; font-weight: 900; }
.registration-result h1 { margin: 8px 0 12px; color: var(--navy-900); font-size: clamp(30px, 4vw, 48px); line-height: 1.08; }
.registration-result > p:not(.eyebrow) { margin: 0 0 25px; color: var(--muted); line-height: 1.7; }
.pending-reference { display: grid; gap: 4px; margin-bottom: 24px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.pending-reference small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pending-reference strong { color: var(--navy-900); font-size: 16px; }
.pending-reference span { color: #916312; font-size: 10px; font-weight: 750; }
.platform-pill small { display: block; margin-bottom: 3px; color: var(--gold-500); font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.owner-attention { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding: 16px 18px; border: 1px solid #efd68d; border-radius: var(--radius); color: #6f5017; background: var(--gold-100); }
.owner-attention > div { display: flex; align-items: center; gap: 13px; }
.owner-attention > div > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: white; background: #a97919; font-size: 18px; font-weight: 900; }
.owner-attention strong, .owner-attention p { display: block; }
.owner-attention strong { font-size: 12px; }
.owner-attention p { margin: 2px 0 0; font-size: 10px; }
.owner-metrics { margin-bottom: 22px; }
.owner-schools { margin-bottom: 22px; }
.owner-school-table { min-width: 1120px; }
.owner-school-table .primary-cell { min-width: 220px; }
.owner-school-table .primary-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.owner-pending-row { background: #fffcf3; }
.plan-label { display: inline-block; margin: 6px 0 2px; color: var(--blue-700); font-size: 10px; font-weight: 800; text-transform: capitalize; }
.owner-school-table td > small { display: block; color: var(--muted); font-size: 9px; }
.owner-pilot-score { min-width: 100px; }
.owner-pilot-score strong { display: block; margin-bottom: 4px; font-size: 12px; }
.owner-pilot-score span { display: block; overflow: hidden; height: 6px; border-radius: 99px; background: var(--line); }
.owner-pilot-score i { display: block; height: 100%; border-radius: inherit; background: var(--teal-700); }
.platform-activity { margin-bottom: 20px; }
.platform-school-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 15px; }
.platform-school-summary > div { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.platform-school-summary small, .platform-school-summary strong, .platform-school-summary span { display: block; }
.platform-school-summary small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.platform-school-summary strong { margin: 3px 0 2px; color: var(--navy-900); font-size: 11px; }
.platform-school-summary span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; }
.owner-review-note { display: grid; gap: 3px; margin-bottom: 15px; padding: 13px; border: 1px solid #efd68d; border-radius: 11px; color: #6f5017; background: var(--gold-100); }
.owner-review-note strong { font-size: 11px; }
.owner-review-note span { font-size: 9px; line-height: 1.5; }

.error-box { margin-bottom: 16px; padding: 11px 13px; border: 1px solid #efbdc5; border-radius: 10px; color: var(--red-700); background: var(--red-100); font-size: 12px; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 9px; }
.toast { min-width: 260px; max-width: 380px; padding: 13px 15px; border: 1px solid #b9e0d2; border-radius: 12px; color: var(--teal-700); background: #f1fbf7; box-shadow: var(--shadow-lg); font-size: 12px; font-weight: 700; animation: riseIn 180ms ease-out; }
.toast.error { color: var(--red-700); border-color: #efbdc5; background: var(--red-100); }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(8px) scale(0.99); } }

.mobile-menu { display: none; }
.mobile-only { display: none; }

@media (max-width: 1100px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  :root { --sidebar: 0px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 40; left: 0; width: 260px; transform: translateX(-100%); transition: transform 180ms; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--navy-900); background: white; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 0 18px; }
  .topbar-subtitle, .live-dot { display: none; }
  .page { padding: 27px 18px 45px; }
  .page-heading { flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .workspace-card { position: static; }
  .setup-banner { align-items: flex-start; flex-direction: column; }
  .ward-grid, .card-grid { grid-template-columns: 1fr; }
  .attendance-summary-grid, .report-card-grid { grid-template-columns: 1fr; }
  .attendance-filter-form { grid-template-columns: 1fr 1fr auto; }
  .billing-history-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .billing-history-meta { display: none; }
  .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-total { grid-column: 1 / -1; }
  .pilot-hero { grid-template-columns: auto 1fr; }
  .pilot-summary { grid-column: 1 / -1; }
  .pilot-layout { grid-template-columns: 1fr; }
  .pilot-guide { position: static; }
  .owner-attention { align-items: flex-start; }
}

@media (max-width: 560px) {
  .login-panel { padding: 28px 22px; }
  .login-copy { margin-top: 40px; }
  .demo-buttons, .metric-grid { grid-template-columns: 1fr; }
  .registration-form, .settings-form { grid-template-columns: 1fr; }
  .registration-form .form-wide, .settings-form .form-wide { grid-column: auto; }
  .filter-row { align-items: stretch; flex-direction: column; }
  .search-wrap { width: 100%; }
  .parent-hero { padding: 24px 20px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .form-row, .invite-share { grid-template-columns: 1fr; }
  .import-template-card { align-items: stretch; flex-direction: column; }
  .billing-history-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .billing-history-main { grid-column: 1 / -1; }
  .billing-history-stat:last-of-type { text-align: right; }
  .billing-preview { align-items: flex-start; flex-direction: column; }
  .billing-preview strong { text-align: left; }
  .topbar > .topbar-actions:last-child > .badge { display: none; }
  .notification-toolbar { align-items: flex-start; flex-direction: column; }
  .notification-toolbar-actions { width: 100%; }
  .notification-toolbar-actions .button { flex: 1; }
  .provider-grid { grid-template-columns: 1fr; }
  .provider-total { grid-column: auto; }
  .attendance-filter-form, .report-rating-grid { grid-template-columns: 1fr; }
  .attendance-save { align-items: stretch; flex-direction: column; }
  .attendance-facts, .report-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-comments { grid-template-columns: 1fr; }
  .feedback-button { width: 34px; padding: 0; justify-content: center; font-size: 0; }
  .feedback-button span { font-size: 15px; }
  .pilot-hero { grid-template-columns: 1fr; text-align: center; }
  .pilot-score { margin: 0 auto; }
  .pilot-summary { text-align: left; }
  .pilot-check { grid-template-columns: 32px minmax(0, 1fr); }
  .pilot-check .button { grid-column: 2; justify-self: start; }
  .owner-attention { align-items: stretch; flex-direction: column; }
  .owner-attention .button { width: 100%; }
  .platform-school-summary { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
