:root {
    --brand: #0798b8;
    --brand-dark: #067d98;
    --brand-soft: #eaf8fb;
    --ink: #101820;
    --muted: #64707a;
    --line: #dfe7eb;
    --surface: #ffffff;
    --page: #f4f8fa;
    --danger: #a52a2a;
    --danger-bg: #fff1f1;
    --success-bg: #eaf8f1;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: block;
    width: 165px;
    height: auto;
}

.logo-small {
    width: 108px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-label {
    color: var(--muted);
    font-size: 14px;
}

.logout-link {
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.page {
    padding: 44px 20px 64px;
}

.wrapper {
    width: min(880px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wrapper-narrow {
    width: min(760px, 100%);
}

.hero {
    padding: 4px 4px 12px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.08;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 28px rgba(18, 55, 70, 0.06);
}

.card h1,
.card h2 {
    margin-top: 0;
}

.section-title-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.section-title-row h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.section-title-row p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.status-pill {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-warning {
    background: #fff4df;
    color: #8a5a00;
}

.base-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.metric,
.stat {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 17px;
    background: #fff;
}

.metric span,
.stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 7px;
}

.metric strong,
.stat strong {
    font-size: 27px;
}

.updated-at {
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    padding: 16px;
    border-radius: 10px;
    background: #f7fafb;
    color: var(--muted);
}

.upload-box {
    margin-bottom: 17px;
    padding: 20px;
    border: 1px dashed #bfcdd4;
    border-radius: 12px;
    background: #fbfdfe;
}

.file-label {
    display: inline-block;
    padding: 11px 16px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
}

input[type="file"] {
    display: none;
}

.filename {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    word-break: break-word;
}

button,
.download {
    width: 100%;
    display: block;
    border: none;
    border-radius: 9px;
    padding: 14px 18px;
    background: var(--brand);
    color: white;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.download:hover {
    background: var(--brand-dark);
}

.button-secondary,
.download-secondary {
    background: #263843;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.help,
.security-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.processing {
    margin-top: 14px;
    padding: 14px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 700;
}

.hidden {
    display: none;
}

.info-strip {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 4px solid var(--brand);
    background: var(--brand-soft);
    color: #35515e;
    font-size: 13px;
    line-height: 1.55;
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    line-height: 1.45;
}

.alert-ok {
    background: var(--success-bg);
    border: 1px solid #c5e6d4;
}

.alert-error {
    background: var(--danger-bg);
    border: 1px solid #efc6c6;
    color: #7a1d1d;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.stat-accent {
    background: var(--brand-soft);
    border-color: #b8e5ef;
}

.downloads {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.back {
    display: inline-block;
    margin-top: 22px;
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration: none;
}

.login-body {
    background:
        linear-gradient(135deg, rgba(7, 152, 184, .08), transparent 50%),
        var(--page);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(430px, 100%);
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 14px 45px rgba(14, 50, 66, .10);
}

.brand-center {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.login-copy {
    text-align: center;
    margin-bottom: 24px;
}

.login-copy h1 {
    margin: 0 0 7px;
    font-size: 26px;
}

.login-copy p {
    margin: 0;
    color: var(--muted);
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
}

.field input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cbd6dc;
    border-radius: 8px;
    outline: none;
    font-size: 15px;
}

.field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(7, 152, 184, .12);
}

.login-card .alert {
    margin-bottom: 18px;
}

@media (max-width: 720px) {
    .base-grid,
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 31px;
    }
}

@media (max-width: 500px) {
    .topbar-inner {
        width: min(100% - 28px, 1080px);
    }

    .page {
        padding: 30px 14px 48px;
    }

    .card {
        padding: 22px;
    }

    .base-grid,
    .stats {
        grid-template-columns: 1fr;
    }

    .section-title-row {
        flex-direction: column;
    }
}
