:root {
    --navy: #0d2340;
    --blue: #155eef;
    --blue-dark: #004eeb;
    --sky: #eaf2ff;
    --ink: #172b4d;
    --muted: #61708a;
    --line: #dbe3ef;
    --white: #ffffff;
    --danger-bg: #fff1f0;
    --danger: #b42318;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #f4f7fb;
}

.page-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
}

.brand-panel {
    padding: clamp(44px, 8vw, 110px);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 15%, rgba(74, 144, 245, .7), transparent 30%),
        linear-gradient(135deg, #07172c 0%, #123967 55%, #155eef 120%);
}

.brand-mark {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: var(--white);
    color: var(--blue);
    font-size: 25px;
    font-weight: 900;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.brand-mark.small { width: 58px; height: 58px; border-radius: 17px; margin: 0 auto 22px; }
.eyebrow { letter-spacing: .14em; font-size: 12px; font-weight: 800; margin: 28px 0 10px; }
.brand-panel h1 { font-size: clamp(42px, 6vw, 78px); line-height: 1; letter-spacing: -.04em; margin: 0; }
.tagline { max-width: 620px; font-size: clamp(18px, 2vw, 25px); color: #d8e7ff; margin: 24px 0 36px; }

.feature-row { display: flex; flex-wrap: wrap; gap: 10px; }
.feature-row span { padding: 10px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: rgba(255,255,255,.08); }

.access-card {
    align-self: center;
    width: min(480px, calc(100% - 48px));
    margin: 24px auto;
    padding: clamp(30px, 5vw, 54px);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(13, 35, 64, .12);
}

.access-card .eyebrow, .school-card .eyebrow { color: var(--blue); margin-top: 0; }
h2 { font-size: 36px; letter-spacing: -.03em; margin: 0 0 8px; }
.muted { color: var(--muted); }
form { margin-top: 30px; }
label { display: block; font-weight: 750; margin-bottom: 9px; }
input { width: 100%; padding: 15px 16px; border: 1px solid #bdc8d8; border-radius: 12px; font: inherit; text-transform: uppercase; outline: none; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21, 94, 239, .12); }
select { width: 100%; padding: 15px 16px; border: 1px solid #bdc8d8; border-radius: 12px; background: white; font: inherit; }
form label:not(:first-of-type) { margin-top: 17px; }
small { display: block; color: var(--muted); margin-top: 6px; }
button, .button-link { width: 100%; margin-top: 14px; padding: 15px 18px; border: 0; border-radius: 12px; background: var(--blue); color: var(--white); font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; display: inline-block; }
button:hover, .button-link:hover { background: var(--blue-dark); }
.button-link.secondary { width: auto; background: var(--sky); color: var(--blue); }
.alert { margin: 20px 0; padding: 12px 14px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); font-weight: 650; }
.support { color: var(--muted); text-align: center; font-size: 13px; margin: 22px 0 0; }

.school-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #edf4ff, #f8fafc); }
.school-card { width: min(680px, 100%); padding: clamp(30px, 6vw, 64px); text-align: center; border-radius: 28px; background: var(--white); box-shadow: 0 24px 70px rgba(13, 35, 64, .12); }
.school-card h1 { margin: 0; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.035em; }
.period-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 32px 0; text-align: left; }
.period-grid div { padding: 18px; border-radius: 15px; background: #f6f9fe; border: 1px solid var(--line); }
.period-grid span, .period-grid strong { display: block; }
.period-grid span { color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.notice { padding: 16px; border-radius: 12px; background: #eff8ff; color: #175cd3; }
.success { margin: 20px 0; padding: 12px 14px; border-radius: 10px; background: #ecfdf3; color: #027a48; font-weight: 650; }
.login-card { text-align: left; }
.login-card .brand-mark { margin-left: 0; }
.text-link { display: block; margin-top: 22px; color: var(--blue); text-align: center; font-weight: 700; }
.topbar { min-height: 70px; padding: 14px clamp(20px, 5vw, 70px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--navy); color: white; }
.topbar div, .topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar span { color: #b9c9de; }
.topbar a { color: white; text-decoration: none; font-weight: 700; }
.dashboard-shell { width: min(1240px, calc(100% - 40px)); margin: 36px auto 70px; }
.welcome-banner { padding: clamp(28px, 5vw, 52px); border-radius: 25px; color: white; background: linear-gradient(135deg, #0d2340, #155eef); }
.welcome-banner .eyebrow { margin: 0 0 8px; color: #bcd2ff; }
.welcome-banner h1 { margin: 0; font-size: clamp(32px, 5vw, 54px); }
.welcome-banner p { color: #dce8ff; }
.module-grid, .stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.module-grid article, .stat-row article, .form-card, .table-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.module-grid article > span { color: var(--blue); font-weight: 900; }
.module-grid h3 { margin-bottom: 7px; }
.module-grid p { color: var(--muted); line-height: 1.6; }
.stat-row { grid-template-columns: repeat(2, 1fr); }
.stat-row span, .stat-row strong { display: block; }
.stat-row strong { margin-top: 8px; font-size: 38px; }
.table-card { margin-top: 22px; padding: 0; overflow: hidden; }
.section-heading { padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; }
.section-heading h2 { font-size: 25px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 20px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: #f8fafc; }
td a { color: var(--blue); font-weight: 700; }
.status { display: inline-block; padding: 5px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; background: #f2f4f7; }
.status.active { background: #ecfdf3; color: #027a48; }
.status.suspended, .status.inactive { background: #fff1f0; color: #b42318; }
.two-column { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 22px; align-items: start; }
.two-column .table-card { margin-top: 0; }
.form-card .eyebrow, .section-heading .eyebrow { color: var(--blue); margin-top: 0; }
.inline-form { margin: 10px 0 0; }
.inline-form button { width: auto; padding: 9px 12px; }
.inline-form input { text-transform: none; min-width: 210px; }
details summary { color: var(--blue); cursor: pointer; font-weight: 700; }

@media (max-width: 820px) {
    .page-shell { grid-template-columns: 1fr; }
    .brand-panel { min-height: 45vh; padding: 42px 28px; }
    .access-card { margin: -32px auto 36px; position: relative; }
    .two-column { grid-template-columns: 1fr; }
    .module-grid { grid-template-columns: 1fr; }
    .topbar { align-items: flex-start; }
}

@media (max-width: 520px) {
    .period-grid { grid-template-columns: 1fr; }
    .feature-row { display: none; }
}
