:root {
    --green-900: #103f2c;
    --green-800: #155a3a;
    --green-700: #1d7a4d;
    --green-50: #eef8f1;
    --gold-500: #f2b705;
    --gold-100: #fff4cf;
    --red-500: #d94d35;
    --ink: #17231d;
    --muted: #647067;
    --line: #dfe8e1;
    --surface: #ffffff;
    --background: #f5f8f4;
    --shadow: 0 18px 45px rgba(16, 63, 44, 0.13);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(21, 90, 58, 0.08), rgba(242, 183, 5, 0.08)),
        var(--background);
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    color: #fff;
    background: linear-gradient(145deg, var(--green-900), var(--green-700));
}

.auth-panel h1 {
    max-width: 680px;
    margin: 44px 0 18px;
    font-size: 44px;
    line-height: 1.08;
    letter-spacing: 0;
}

.auth-panel p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.7;
}

.auth-card-wrap {
    display: grid;
    align-items: center;
    padding: 42px;
}

.auth-card,
.content-card,
.metric-card,
.table-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-card {
    width: min(100%, 520px);
    padding: 30px;
    margin: 0 auto;
}

.auth-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.auth-card .muted {
    margin-bottom: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    color: var(--green-900);
    background: linear-gradient(135deg, var(--gold-500), #ffe38a);
    font-weight: 800;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 400;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    padding: 28px;
    color: #fff;
    background: linear-gradient(180deg, var(--green-900), var(--green-800));
}

.sidebar .brand {
    margin-bottom: 34px;
}

.nav {
    display: grid;
    gap: 10px;
}

.nav a {
    padding: 12px 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.main {
    padding: 30px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.topbar h1 {
    margin: 5px 0 0;
    font-size: 30px;
}

.eyebrow {
    color: var(--green-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.user-chip strong {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--green-900);
    background: var(--gold-100);
    font-size: 12px;
}

.grid {
    display: grid;
    gap: 18px;
}

.metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-cols {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
}

.metric-card,
.content-card,
.table-card {
    padding: 20px;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-top: 12px;
    font-size: 34px;
}

.metric-card em {
    display: block;
    margin-top: 6px;
    color: var(--green-700);
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
}

.content-card h2,
.table-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.muted {
    color: var(--muted);
    line-height: 1.55;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    font-size: 13px;
    font-weight: 800;
}

.field input,
.field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font-size: 15px;
}

.field input:focus,
.field select:focus {
    outline: 3px solid rgba(242, 183, 5, 0.28);
    border-color: var(--gold-500);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--green-800), var(--green-700));
    font-weight: 800;
    cursor: pointer;
}

.button.secondary {
    color: var(--green-900);
    background: var(--gold-500);
}

.button.ghost {
    color: var(--green-800);
    border: 1px solid var(--line);
    background: #fff;
}

.button.full {
    width: 100%;
}

.auth-switch {
    margin-top: 18px;
    text-align: center;
}

.auth-switch a {
    color: var(--green-700);
    font-weight: 800;
}

.alert {
    margin-bottom: 18px;
    padding: 13px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.alert.error {
    color: #7f2514;
    background: #ffe6df;
}

.alert.success {
    color: var(--green-900);
    background: var(--green-50);
}

.status-pill {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--green-900);
    background: var(--green-50);
    font-size: 12px;
    font-weight: 800;
}

.status-pill.gold {
    background: var(--gold-100);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.empty-state {
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fbfdfb;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stepper a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
}

.stepper span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    color: var(--green-900);
    background: var(--green-50);
    font-weight: 800;
}

.stepper strong {
    font-size: 14px;
}

.stepper a.active {
    border-color: rgba(242, 183, 5, 0.7);
    color: var(--green-900);
    box-shadow: var(--shadow);
}

.stepper a.active span,
.stepper a.done span {
    background: var(--gold-500);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.checklist-list {
    display: grid;
    gap: 14px;
}

.checklist-item {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.55fr) minmax(180px, 0.75fr) minmax(180px, 0.8fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfb;
}

.checklist-item h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.file-link {
    color: var(--green-700);
    font-size: 13px;
    font-weight: 800;
}

.review-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.review-summary > div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--green-50);
}

.review-summary h3 {
    margin: 6px 0;
    font-size: 22px;
}

.ai-analysis {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfb;
    line-height: 1.7;
    white-space: normal;
}

@media (max-width: 960px) {
    .auth-page,
    .app-shell,
    .metrics,
    .two-cols,
    .stepper,
    .form-row,
    .review-summary,
    .checklist-item {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 20px;
    }

    .main,
    .auth-panel,
    .auth-card-wrap {
        padding: 22px;
    }

    .auth-panel h1 {
        margin-top: 30px;
        font-size: 34px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
