:root {
    --navy: #00274c;
    --maize: #ffcb05;
    --ink: #17202a;
    --muted: #667085;
    --line: #e4e7ec;
    --background: #f6f8fb;
    --surface: #ffffff;
    --danger: #b42318;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255,203,5,.15), transparent 28rem),
        var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--navy); }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem clamp(1rem, 5vw, 5rem);
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--navy);
    font-weight: 850;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: .75rem;
    background: var(--maize);
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav a, .nav-button {
    color: var(--navy);
    font-weight: 750;
    text-decoration: none;
}

.nav-form { display: inline; }

.nav-button {
    min-height: auto;
    padding: 0;
    background: transparent;
}

.page-shell {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 4rem 0 5rem;
}

.hero, .auth-layout {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
}

h1 {
    margin: 0;
    max-width: 13ch;
    color: var(--navy);
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: .98;
    letter-spacing: -.055em;
}

h2, h3 { color: var(--navy); }

.hero-copy {
    max-width: 46rem;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.eyebrow {
    margin: 0 0 .7rem;
    color: var(--navy);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.card, .student-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    box-shadow: 0 14px 42px rgba(0,39,76,.07);
}

.card {
    padding: clamp(1.35rem, 4vw, 2.2rem);
}

.card h2 { margin-top: 0; }

.narrow-card {
    max-width: 620px;
    margin: 0 auto;
}

.document-card {
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.7;
}

form {
    display: grid;
    gap: 1rem;
}

label {
    display: grid;
    gap: .45rem;
    color: #344054;
    font-size: .92rem;
    font-weight: 750;
}

input, select, textarea {
    width: 100%;
    min-height: 3rem;
    padding: .75rem .9rem;
    color: var(--ink);
    background: white;
    border: 1px solid #cfd4dc;
    border-radius: .75rem;
    font: inherit;
    outline: none;
}

textarea {
    min-height: 8rem;
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(0,39,76,.1);
}

fieldset {
    display: grid;
    gap: .8rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
}

legend {
    padding: 0 .4rem;
    color: var(--navy);
    font-weight: 850;
}

.choice-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
}

.choice-row input {
    width: 1.05rem;
    min-height: auto;
}

.consent-row {
    align-items: start;
    font-weight: 500;
    line-height: 1.5;
}

button, .primary-link, .secondary-link, .small-link, .outline-button, .danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: .75rem 1rem;
    border: 0;
    border-radius: .75rem;
    font: inherit;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

button, .primary-link {
    color: var(--navy);
    background: var(--maize);
}

.secondary-link, .outline-button {
    color: var(--navy);
    background: white;
    border: 1px solid var(--navy);
}

.danger-button {
    color: white;
    background: var(--danger);
}

.small-link {
    min-height: auto;
    color: white;
    background: var(--navy);
    font-size: .85rem;
}

.compact-button {
    min-height: auto;
    padding: .5rem .75rem;
}

.text-button, .link-button {
    min-height: auto;
    padding: 0;
    color: var(--danger);
    background: transparent;
}

.button-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

.feature-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 2;
}

.alert {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: .8rem;
    font-weight: 700;
}

.alert.error {
    color: #7a271a;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.alert.success {
    color: #05603a;
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.dashboard-grid {
    display: grid;
    gap: 1.5rem;
}

.account-header, .search-header {
    margin-bottom: 1.5rem;
}

.account-header h1, .search-header h1 {
    max-width: none;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.class-form {
    grid-template-columns: .75fr 1fr .7fr .42fr .62fr auto;
    align-items: end;
}

.search-form {
    grid-template-columns: .75fr 1fr .7fr .42fr auto;
    align-items: end;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-heading h2 { margin: 0; }

.count {
    padding: .45rem .7rem;
    color: var(--navy);
    background: rgba(255,203,5,.26);
    border-radius: 999px;
    font-weight: 850;
}

.class-list {
    display: grid;
    gap: .8rem;
}

.class-row, .report-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: .95rem;
}

.report-row {
    align-items: flex-start;
    margin-bottom: .8rem;
}

.class-row h3, .class-row p {
    margin: 0;
}

.class-actions {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.class-actions form { display: inline; }

.results-section {
    margin-top: 2.3rem;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.student-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem;
}

.student-card h3, .student-card p {
    margin: 0 0 .3rem;
}

.student-card p {
    color: var(--muted);
    font-size: .9rem;
}

.student-details {
    min-width: 0;
}

.student-actions {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-top: .8rem;
    font-size: .88rem;
}

.student-actions form {
    display: inline;
}

.avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 3rem;
    height: 3rem;
    color: white;
    background: var(--navy);
    border-radius: 50%;
    font-weight: 850;
}

.contact-note {
    display: block;
    margin-top: .25rem;
    font-size: .85rem;
}

.empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    background: white;
    border: 1px dashed #b9c0cc;
    border-radius: 1rem;
}

.notice-link {
    display: inline-block;
    padding: .65rem .85rem;
    background: #fff4cc;
    border-radius: .7rem;
    font-weight: 800;
}

.muted {
    color: var(--muted);
}

.top-gap {
    margin-top: 1rem;
}

.danger-zone {
    border-color: #fecdca;
}

footer {
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: 2rem 1rem;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .class-form, .search-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .hero, .auth-layout, .student-grid {
        grid-template-columns: 1fr;
    }

    .class-form, .search-form {
        grid-template-columns: 1fr;
    }

    .class-row, .report-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .class-actions {
        width: 100%;
        justify-content: space-between;
    }

    .site-header {
        padding-inline: 1rem;
    }

    .page-shell {
        padding-top: 2.5rem;
    }
}


.forgot-panel {
    display: grid;
    gap: .65rem;
    margin-top: .25rem;
    padding: 1rem;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: .85rem;
}

.forgot-panel span {
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.45;
}


.component-badge {
    display: inline-flex;
    margin-left: .35rem;
    padding: .22rem .5rem;
    color: var(--navy);
    background: rgba(255, 203, 5, .28);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 850;
    vertical-align: middle;
}


.google-signin-panel {
    display: grid;
    justify-items: center;
    gap: .7rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: .9rem;
}

.google-signin-label {
    margin: 0;
    color: var(--navy);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.small-copy {
    margin: 0;
    max-width: 34rem;
    font-size: .84rem;
    line-height: 1.45;
    text-align: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
