:root {
  --bg: #07110d;
  --surface: #0d1914;
  --surface-2: #12231b;
  --surface-3: #182c22;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f7faf8;
  --muted: #a2afa8;
  --green: #78b626;
  --green-bright: #96d449;
  --green-soft: rgba(120, 182, 38, 0.14);
  --amber: #f2b94b;
  --amber-soft: rgba(242, 185, 75, 0.13);
  --red: #f06b6b;
  --red-soft: rgba(240, 107, 107, 0.13);
  --blue: #6fb4ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 18% -5%, rgba(120,182,38,.13), transparent 30%), var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }

.demo-bar { min-height: 36px; padding: 8px 18px; display: flex; align-items: center; justify-content: center; gap: 9px; background: #17251e; border-bottom: 1px solid var(--line); color: #cad5cf; font-size: .78rem; letter-spacing: .03em; text-align: center; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(242,185,75,.12); }
.shell { min-height: calc(100vh - 36px); display: grid; grid-template-columns: 260px 1fr; }
.sidebar { padding: 24px 18px; border-right: 1px solid var(--line); background: rgba(7,17,13,.88); position: sticky; top: 0; height: calc(100vh - 36px); display: flex; flex-direction: column; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--green); color: #07110d; font-weight: 900; letter-spacing: -.08em; }
.brand strong { display: block; font-size: .98rem; letter-spacing: -.01em; }
.brand span { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; }
.nav { display: grid; gap: 6px; }
.nav button { width: 100%; border: 0; border-radius: 11px; padding: 11px 12px; background: transparent; color: var(--muted); text-align: left; display: flex; align-items: center; gap: 11px; font-size: .92rem; }
.nav button:hover, .nav button.active { background: var(--green-soft); color: var(--text); }
.nav button.active { box-shadow: inset 3px 0 var(--green); }
.nav-icon { width: 20px; text-align: center; color: var(--green-bright); font-weight: 800; }
.sidebar-footer { margin-top: auto; display: grid; gap: 10px; }
.partner-card { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.partner-card strong, .partner-card span { display: block; }
.partner-card strong { font-size: .9rem; }
.partner-card span { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.main { min-width: 0; padding: 28px 32px 48px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 26px; }
.eyebrow { margin: 0 0 6px; color: var(--green-bright); font-size: .74rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.045em; line-height: 1.08; }
h2 { margin-bottom: 8px; font-size: 1.22rem; letter-spacing: -.025em; }
h3 { margin-bottom: 5px; font-size: 1rem; }
.muted { color: var(--muted); }
.top-actions, .button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 11px; padding: 9px 14px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .87rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: rgba(120,182,38,.58); transform: translateY(-1px); }
.btn.primary { border-color: var(--green); background: var(--green); color: #08110d; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(240,107,107,.38); color: #ffaaaa; background: var(--red-soft); }
.btn.small { min-height: 34px; padding: 7px 10px; font-size: .78rem; }
.grid-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { min-height: 126px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, var(--surface-2), var(--surface)); box-shadow: 0 12px 30px rgba(0,0,0,.13); }
.stat-label { color: var(--muted); font-size: .83rem; }
.stat-value { margin: 13px 0 7px; font-size: 2rem; font-weight: 800; letter-spacing: -.055em; }
.stat-note { color: #c6d1cb; font-size: .78rem; }
.stat.accent { border-color: rgba(120,182,38,.4); background: linear-gradient(150deg, rgba(120,182,38,.19), var(--surface)); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,25,20,.87); box-shadow: 0 18px 48px rgba(0,0,0,.14); overflow: hidden; }
.panel-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.panel-head h2, .panel-head p { margin-bottom: 0; }
.panel-body { padding: 18px 20px; }
.attention-list { display: grid; gap: 10px; }
.attention-item { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.attention-item p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--amber); background: var(--amber-soft); }
.status.approved { color: var(--green-bright); background: var(--green-soft); }
.status.direct { color: var(--blue); background: rgba(111,180,255,.12); }
.status.declined { color: #ff9696; background: var(--red-soft); }
.metric-list { display: grid; gap: 14px; }
.metric-row { display: grid; gap: 7px; }
.metric-copy { display: flex; justify-content: space-between; color: #d4ddd8; font-size: .83rem; }
.progress { height: 7px; border-radius: 999px; overflow: hidden; background: #07110d; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 2px; }
.tab { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); background: var(--surface); white-space: nowrap; font-size: .82rem; font-weight: 700; }
.tab.active { color: #08110d; border-color: var(--green); background: var(--green); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 730px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
td { font-size: .86rem; }
tr:last-child td { border-bottom: 0; }
.school-name strong, .school-name span { display: block; }
.school-name span { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.empty { padding: 42px 22px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 7px; color: var(--text); }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 18px 24px; border-left: 1px solid var(--line-strong); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -5px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--surface); }
.timeline-item p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.login-page { min-height: 100vh; padding: 24px; display: grid; place-items: center; }
.login-grid { width: min(1040px, 100%); display: grid; grid-template-columns: 1.08fr .92fr; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: rgba(13,25,20,.93); box-shadow: var(--shadow); }
.login-story { padding: clamp(34px, 6vw, 72px); min-height: 610px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 15% 15%, rgba(120,182,38,.24), transparent 33%), linear-gradient(145deg, #0f2118, #07110d); }
.login-story h1 { max-width: 470px; margin: 22px 0 18px; font-size: clamp(2.4rem, 5vw, 4.2rem); }
.login-story > div > p { max-width: 470px; color: #b7c3bc; font-size: 1.02rem; line-height: 1.65; }
.rule-card { padding: 17px 18px; border: 1px solid rgba(120,182,38,.25); border-radius: 14px; background: rgba(120,182,38,.08); color: #dcebd2; line-height: 1.5; }
.login-form { padding: clamp(30px, 5vw, 58px); display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { font-size: 1.65rem; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { color: #d7dfdb; font-size: .82rem; font-weight: 700; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; background: #09140f; color: var(--text); padding: 12px 13px; outline: 0; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(120,182,38,.12); }
.textarea { min-height: 94px; resize: vertical; }
.form-error { min-height: 20px; margin: 0; color: #ff9f9f; font-size: .82rem; }
.quick-logins { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.quick-login { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); text-align: left; }
.quick-login strong { display: block; color: var(--text); font-size: .82rem; }
.quick-login span { font-size: .72rem; }
.invite-page { min-height: calc(100vh - 36px); padding: 30px 20px 60px; }
.invite-shell { width: min(950px, 100%); margin: 0 auto; }
.invite-head { padding: 22px 0 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.invite-card { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.invite-summary { padding: clamp(24px, 4vw, 42px); background: linear-gradient(135deg, rgba(120,182,38,.17), rgba(120,182,38,.04)); border-bottom: 1px solid var(--line); }
.invite-summary h1 { margin: 10px 0; }
.invite-form { padding: clamp(24px, 4vw, 42px); }
.choice-grid { display: grid; gap: 11px; margin: 5px 0; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-copy { display: block; padding: 16px 17px; border: 1px solid var(--line-strong); border-radius: 14px; background: #09140f; }
.choice-copy strong { display: block; margin-bottom: 4px; }
.choice-copy span { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.choice input:checked + .choice-copy { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 3px rgba(120,182,38,.09); }
.success { padding: 60px 30px; text-align: center; }
.success-mark { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #07110d; font-size: 1.8rem; font-weight: 900; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.7); backdrop-filter: blur(7px); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.modal-head { padding: 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 20px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-size: 1.25rem; }
.toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; max-width: 360px; padding: 13px 16px; border: 1px solid rgba(120,182,38,.4); border-radius: 12px; background: #16251d; color: var(--text); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-menu { display: none; }

@media (max-width: 980px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 15; left: 0; top: 36px; width: min(290px, 88vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 20px 16px 40px; }
  .mobile-menu { display: inline-flex; }
  .topbar { align-items: flex-start; }
  .top-actions .btn:not(.mobile-menu) { display: none; }
  .login-page { padding: 0; }
  .login-grid { grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .login-story { min-height: 330px; padding: 34px 25px; }
  .login-story h1 { font-size: 2.55rem; }
  .login-form { padding: 34px 24px 46px; }
  .invite-head { align-items: flex-start; }
}

@media (max-width: 520px) {
  .grid-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { min-height: 110px; padding: 14px; }
  .stat-value { font-size: 1.65rem; }
  .quick-logins { grid-template-columns: 1fr; }
  .attention-item { align-items: flex-start; flex-direction: column; }
}
