:root {
    --navy: #1d5f99;
    --navy-dark: #124979;
    --navy-soft: #e8f1f9;
    --gold: #d6a74e;
    --green: #1d8f4d;
    --amber: #c98710;
    --red: #c84334;
    --text: #223142;
    --muted: #62778f;
    --line: #d9e3ee;
    --bg: #f5f5f5;
    --surface: #ffffff;
    --shadow: 0 16px 40px rgba(18, 73, 121, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: var(--bg);
}

a,
button,
input {
    font: inherit;
}

a {
    color: inherit;
}

h1,
h2,
p {
    margin: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid rgba(18, 73, 121, 0.08);
    box-shadow: 0 6px 18px rgba(18, 73, 121, 0.04);
}

.top-strip {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    background: linear-gradient(#1a5a92, #216bb0);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.nav-shell,
.page-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.brand-text {
    gap: 0;
}

.brand strong {
    display: block;
    color: var(--navy-dark);
    font-size: 1.05rem;
}

.brand small {
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.site-nav a,
.ghost-link {
    text-decoration: none;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible {
    background: rgba(29, 95, 153, 0.08);
    color: var(--navy);
}

.hero-section,
.section-block {
    padding: 28px 18px 64px;
}

.hero-search-only {
    min-height: calc(100svh - 110px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-grid,
.result-layout,
.card-grid {
    display: grid;
    gap: 20px;
}

.hero-grid-single {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.portal-panel,
.surface-card,
.tracking-card,
.loading-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.panel-title {
    padding: 18px 22px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(#1a5a92, #216bb0);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
}

.panel-body,
.surface-card,
.tracking-card {
    padding: 22px;
}

.search-panel {
    box-shadow: 0 18px 44px rgba(18, 73, 121, 0.07);
}

.panel-body-result {
    display: grid;
    gap: 18px;
}

.label {
    display: block;
    color: var(--navy-dark);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy,
.hint-text,
.status-summary,
.request-ref,
.surface-card p {
    color: var(--muted);
    line-height: 1.7;
}

.surface-card h2,
.tracking-head h2,
.student-info h2,
.site-footer h2 {
    color: var(--navy-dark);
}

.hero-copy {
    margin-top: 14px;
    max-width: 60ch;
}

.status-form,
.action-stack {
    display: grid;
    gap: 12px;
}

.status-form {
    margin-top: 0;
}

.input-row {
    display: grid;
    gap: 12px;
}

input {
    width: 100%;
    min-height: 58px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fbfdff;
    color: var(--text);
}

input:focus {
    outline: 2px solid rgba(29, 95, 153, 0.12);
    border-color: rgba(29, 95, 153, 0.42);
}

.primary-button,
.ghost-button,
.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button {
    border: 0;
    background: linear-gradient(#1a5a92, #216bb0);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(18, 73, 121, 0.16);
}

.ghost-button,
.ghost-link {
    border: 1px solid rgba(18, 73, 121, 0.14);
    background: #fff;
    color: var(--navy);
    cursor: pointer;
}

.primary-button:hover,
.primary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible {
    transform: translateY(-1px);
}

.stats-strip,
.student-grid {
    display: grid;
    gap: 14px;
}

.stats-strip {
    margin-top: 20px;
}

.stat-chip,
.student-info {
    padding: 18px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--line);
}

.compact-stat {
    margin-bottom: 16px;
}

.stat-chip span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-chip strong {
    display: block;
    margin-top: 8px;
    font-size: 1.75rem;
    color: var(--navy-dark);
}

.banner-host {
    min-height: 170px;
}

.ad-card {
    display: grid;
    gap: 10px;
    height: 100%;
    min-height: 130px;
    padding: 18px;
    border: 1px dashed rgba(18, 73, 121, 0.18);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(29, 95, 153, 0.06), rgba(214, 167, 78, 0.08));
}

.ad-label {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(18, 73, 121, 0.08);
    color: var(--navy-dark);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ad-card h3 {
    font-size: 1.15rem;
    color: var(--navy-dark);
}

.ad-card p {
    color: var(--muted);
    line-height: 1.6;
}

.student-info h2,
.tracking-head h2,
.surface-card h2 {
    margin-bottom: 14px;
}

.student-grid strong,
.copy-row strong {
    display: block;
    margin-top: 8px;
    font-size: 1rem;
    word-break: break-word;
}

.result-layout {
    align-items: start;
}

.result-sidebar {
    display: grid;
    gap: 18px;
}

.action-card,
.copy-row {
    display: grid;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 132px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 800;
    color: #fff;
}

.status-pill.is-approved {
    background: var(--green);
}

.status-pill.is-pending {
    background: var(--amber);
}

.status-pill.is-rejected {
    background: var(--red);
}

.tracking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table-wrap table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    background: #fff;
}

.table-wrap th,
.table-wrap td {
    padding: 14px 16px;
    border-bottom: 1px solid #e7edf5;
    text-align: left;
    vertical-align: top;
}

.table-wrap th {
    background: #eef4fa;
    color: var(--navy-dark);
    font-size: 0.92rem;
}

.form-error {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: #fff1ef;
    border: 1px solid rgba(200, 67, 52, 0.14);
    color: #9a2f22;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(10, 20, 34, 0.52);
}

.site-footer {
    border-top: 1px solid rgba(18, 73, 121, 0.08);
    background: #fff;
}

.footer-grid {
    display: grid;
    gap: 24px;
    padding: 28px 18px 36px;
}

.site-footer a {
    text-decoration: none;
    color: var(--muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--navy);
}

.loading-card {
    width: min(100%, 760px);
    padding: 24px;
    text-align: center;
}

.loading-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.loading-subtitle {
    margin-top: 8px;
    color: var(--muted);
}

.loading-ad {
    margin-top: 18px;
}

.spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 5px solid rgba(29, 95, 153, 0.16);
    border-top-color: var(--navy);
    animation: spin 0.9s linear infinite;
}

.is-hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 760px) {
    .result-layout {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .card-grid.two-col,
    .stats-strip,
    .student-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.2fr 0.8fr 0.9fr;
        align-items: start;
    }

    .input-row {
        grid-template-columns: 1fr auto;
    }

    .copy-row {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

@media (max-width: 759px) {
    .top-strip,
    .nav-shell,
    .tracking-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .brand {
        align-items: flex-start;
    }
}