:root {
    --green: #198754;
    --green-dark: #11643d;
    --mint: #e8f6ef;
    --ink: #24312a;
    --muted: #65716a;
    --line: #dce7df;
    --paper: #ffffff;
    --soft: #f6faf7;
    --accent: #c58a1f;
}

body {
    background: var(--soft);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
    color: var(--green-dark);
}

.brand-mark,
.sidebar-brand {
    color: var(--ink);
    text-decoration: none;
}

.brand-icon {
    align-items: center;
    background: var(--green);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    margin-right: .4rem;
    width: 34px;
}

.hero-band {
    background: linear-gradient(120deg, rgba(25, 135, 84, .10), rgba(197, 138, 31, .12));
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(1.5rem, 4vw, 3.5rem);
}

.eyebrow {
    color: var(--green-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.feature-tile,
.stat-card,
.panel,
.auth-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(36, 49, 42, .06);
}

.feature-tile,
.stat-card {
    padding: 1.25rem;
}

.stat-card .stat-icon {
    align-items: center;
    background: var(--mint);
    border-radius: 8px;
    color: var(--green-dark);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.panel {
    padding: 1.25rem;
}

.auth-wrap {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 2rem 0;
}

.auth-card {
    margin: auto;
    max-width: 460px;
    padding: 2rem;
    width: 100%;
}

.btn,
.form-control,
.form-select,
.alert,
.badge,
.card {
    border-radius: 8px;
}

.btn-success {
    background: var(--green);
    border-color: var(--green);
}

.btn-success:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    background: #fff;
    border-right: 1px solid var(--line);
    flex-direction: column;
    gap: 1rem;
    min-height: 100vh;
    padding: 1.2rem;
    position: sticky;
    top: 0;
    width: 270px;
}

.sidebar-brand {
    align-items: center;
    display: flex;
    font-size: 1.1rem;
    font-weight: 800;
}

.sidebar-user {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    padding: .9rem;
}

.sidebar .nav-link,
.sidebar-mobile .nav-link {
    align-items: center;
    border-radius: 8px;
    color: var(--ink);
    display: flex;
    gap: .65rem;
    margin-bottom: .25rem;
    padding: .72rem .85rem;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover,
.sidebar-mobile .nav-link.active,
.sidebar-mobile .nav-link:hover {
    background: var(--mint);
    color: var(--green-dark);
}

.app-main {
    flex: 1;
    min-width: 0;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    min-height: 78px;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    position: sticky;
    top: 0;
    z-index: 20;
}

.content-wrap {
    padding: clamp(1rem, 3vw, 2rem);
}

.table {
    vertical-align: middle;
}

.table thead th {
    background: var(--mint);
    color: var(--ink);
    font-size: .86rem;
    white-space: nowrap;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.filter-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.required::after {
    color: #b42318;
    content: " *";
}

.result-school-title {
    border-bottom: 2px solid var(--green);
    margin-bottom: 1rem;
    padding-bottom: .75rem;
}

.print-only {
    display: none;
}

canvas.result-chart {
    max-height: 260px;
    width: 100%;
}

@media (max-width: 991.98px) {
    .topbar {
        min-height: auto;
    }
}

@media print {
    body {
        background: #fff;
    }

    .navbar,
    .topbar,
    .sidebar,
    .btn,
    .no-print,
    .alert {
        display: none !important;
    }

    .container,
    .content-wrap {
        max-width: 100%;
        padding: 0;
    }

    .panel {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .print-only {
        display: block;
    }
}
