:root {
  --ink: #14213d;
  --muted: #5d6b82;
  --line: #dfe7f3;
  --soft: #f5f8fc;
  --paper: #ffffff;
  --blue: #1f6feb;
  --blue-dark: #124aa3;
  --green: #15803d;
  --gold: #b7791f;
  --red: #c2410c;
  --shadow: 0 18px 45px rgba(20, 33, 61, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.site-shell { min-height: 100vh; background: linear-gradient(120deg, rgba(31,111,235,.12), rgba(21,128,61,.08)), var(--soft); }
.topbar { position: sticky; top: 16px; z-index: 10; display: flex; align-items: center; justify-content: space-between; width: min(1120px, calc(100% - 32px)); margin: 16px auto; padding: 10px 14px; border: 1px solid rgba(223,231,243,.9); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--blue-dark); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--blue); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav span, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border-radius: 20px; color: var(--muted); font-weight: 700; }
.nav a:hover, .nav a.active, .button.primary { color: #fff; background: var(--blue); }
.button { border: 0; cursor: pointer; }
.button.secondary { color: var(--blue-dark); background: #eaf2ff; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 42px; min-height: calc(100vh - 96px); width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 16px 0 40px; }
.hero-copy h1 { margin: 0; font-size: clamp(40px, 7vw, 84px); line-height: .95; letter-spacing: 0; }
.hero-copy p { max-width: 640px; color: var(--muted); font-size: 19px; }
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-panel, .auth-card, .content-card, .dashboard-card { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); }
.hero-panel, .content-card, .auth-card, .dashboard-card { padding: 22px; }
.mini-feed { display: grid; gap: 12px; margin-top: 20px; }
.feed-row, .metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.feed-row strong, .metric strong { color: var(--blue-dark); }
.section-band { padding: 52px 0; background: #fff; }
.section-band.alt { background: var(--soft); }
.section-inner { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.content-card h3, .auth-card h1, .dashboard-card h3 { margin-top: 0; }
.auth-wrap { display: grid; place-items: center; min-height: 100vh; padding: 28px; }
.auth-card { width: min(460px, 100%); }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 6px; color: var(--muted); font-weight: 700; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
textarea { min-height: 110px; resize: vertical; }
.check-row, .radio-row { display: flex; flex-wrap: wrap; gap: 12px; }
.check-row label, .radio-row label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.check-row input, .radio-row input { width: auto; min-height: auto; }
.app-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 18px; color: #dbeafe; background: #12315f; }
.school-badge { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.school-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; color: #12315f; background: #fff; font-weight: 800; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { padding: 10px 12px; border-radius: 8px; color: #dbeafe; }
.side-nav a:hover, .side-nav a.active { color: #12315f; background: #fff; }
.workspace { min-width: 0; }
.workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 26px; border-bottom: 1px solid var(--line); background: #fff; }
.workspace-main { padding: 26px; }
.page-title { margin: 0 0 18px; }
.analytics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric { display: grid; align-items: start; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { font-size: 28px; }
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.list { margin: 0; padding-left: 20px; }
.empty-state { min-height: 220px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); background: #fbfdff; text-align: center; padding: 22px; }
.toast { position: fixed; right: 18px; bottom: 18px; display: none; padding: 12px 16px; border-radius: 8px; color: #fff; background: var(--green); box-shadow: var(--shadow); }
.toast.show { display: block; }
@media (max-width: 900px) { .home-hero, .section-grid, .data-grid { grid-template-columns: 1fr; } .home-hero { min-height: auto; padding-top: 40px; } .app-layout { grid-template-columns: 1fr; } .sidebar { position: relative; height: auto; } .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .topbar, .workspace-top { align-items: stretch; flex-direction: column; } .nav { flex-wrap: wrap; } .form-grid.two, .analytics-grid { grid-template-columns: 1fr; } }

.auth-card-login { width: min(460px, 100%); padding: 32px; font-family: Inter, Arial, sans-serif; text-align: center; }
.auth-brand { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 30px; color: var(--blue-dark); font-size: 1.35rem; font-weight: 800; }
.auth-brand img { display: block; width: 58px; height: 70px; }
.auth-brand-term { color: #E35D7A; }
.auth-brand-pa { color: var(--blue-dark); }
.auth-card-login h1 { margin: 0 0 24px; font-size: 2rem; }
.auth-form { text-align: left; }
.auth-form .button { width: 100%; margin-top: 4px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-google-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; gap: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; cursor: pointer; font-weight: 700; }
.google-mark { display: inline-grid; width: 22px; height: 22px; place-items: center; color: transparent; background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 25% 45%, #fbbc05 45% 70%, #ea4335 70% 100%); background-clip: text; -webkit-background-clip: text; font-size: 1.15rem; font-weight: 800; }
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 18px; margin: 24px 0 0; }
.auth-links a { color: var(--blue-dark); cursor: pointer; font-size: 0.9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) { .auth-wrap { padding: 16px; } .auth-card-login { padding: 26px 20px; } }
.auth-helper { margin: -8px 0 24px; color: var(--muted); line-height: 1.6; }

.auth-error { min-height: 1.25rem; margin: 12px 0 -4px; color: var(--red); font-size: 0.86rem; font-weight: 700; }

.password-field { position: relative; display: block; margin-top: 6px; }
.password-field input { width: 100%; padding-right: 64px; }
.password-toggle { position: absolute; top: 50%; right: 10px; border: 0; padding: 4px 6px; color: var(--blue-dark); background: transparent; cursor: pointer; font-size: 0.78rem; font-weight: 800; transform: translateY(-50%); }
.password-toggle:hover { color: var(--blue); }