:root {
    color-scheme: light;
    --ink: #14211d;
    --muted: #66736e;
    --line: #dce6e1;
    --panel: #ffffff;
    --soft: #f3f8f6;
    --accent: #287b62;
    --accent-dark: #1f624e;
    --danger: #a53030;
    --danger-soft: #fff1f1;
    --success: #176944;
    --success-soft: #eaf8f0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #edf4f1; color: var(--ink); line-height: 1.5; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.45rem, 3vw, 2rem); margin-bottom: .2rem; }
h2 { font-size: 1.3rem; margin-bottom: .35rem; }
h3 { font-size: 1rem; margin-bottom: .25rem; }
p { color: var(--muted); }
a { color: var(--accent); }

.topbar {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1.25rem max(1rem, calc((100vw - 1180px) / 2));
    background: var(--panel); border-bottom: 1px solid var(--line);
}
.topbar p, .topbar h1 { margin-bottom: 0; }
.container { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.eyebrow { color: var(--accent); font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }

.hero-card {
    display: flex; justify-content: space-between; align-items: center; gap: 2rem;
    padding: clamp(1.25rem, 3vw, 2.25rem); margin-bottom: 2rem;
    background: linear-gradient(135deg, #fff, #e7f4ee); border: 1px solid #cde1d8; border-radius: 18px;
    box-shadow: 0 15px 45px rgba(31, 70, 56, .08);
}
.hero-card p:last-child { margin-bottom: 0; max-width: 680px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 2rem 0 .8rem; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.badge { background: #dcefe7; color: var(--accent-dark); border-radius: 999px; padding: .3rem .7rem; font-size: .8rem; font-weight: 700; }

button, .button {
    display: inline-flex; justify-content: center; align-items: center;
    min-height: 42px; padding: .65rem 1rem; border: 1px solid var(--accent); border-radius: 9px;
    background: var(--accent); color: white; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: var(--accent-dark); }
.button.secondary { background: white; color: var(--accent-dark); border-color: #bfd6cc; }
.button.secondary:hover { background: var(--soft); }

.file-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: .75rem; }
.file-card {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.file-card p { margin-bottom: 0; font-size: .82rem; }
.file-card h3 { overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #4f5f59; background: var(--soft); font-size: .73rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
code { color: #2c5044; }
.status { display: inline-block; border-radius: 999px; padding: .2rem .5rem; font-size: .75rem; font-weight: 750; }
.status.ok { color: var(--success); background: var(--success-soft); }
.status.bad { color: var(--danger); background: var(--danger-soft); }
.empty { color: var(--muted); padding: 1rem; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-card {
    width: min(100%, 440px); padding: clamp(1.4rem, 5vw, 2.2rem); background: var(--panel);
    border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 25px 70px rgba(20, 60, 45, .12);
}
label { display: block; margin: 1rem 0 .35rem; font-size: .88rem; font-weight: 700; }
input {
    width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid #bccbc5; border-radius: 8px;
    background: white; color: var(--ink); font: inherit;
}
input:focus { outline: 3px solid rgba(40, 123, 98, .18); border-color: var(--accent); }
.auth-card button { width: 100%; margin-top: 1.2rem; }
.alert { padding: .8rem 1rem; margin: 0 0 1rem; border-radius: 9px; border: 1px solid transparent; }
.alert p { margin-bottom: .25rem; color: inherit; }
.alert p:last-child { margin-bottom: 0; }
.alert.error { color: var(--danger); background: var(--danger-soft); border-color: #f0cccc; }
.alert.success { color: var(--success); background: var(--success-soft); border-color: #c6e7d4; }

@media (max-width: 700px) {
    .topbar, .hero-card { align-items: stretch; flex-direction: column; }
    .topbar form, .topbar button, .hero-card form, .hero-card button { width: 100%; }
    .file-card { align-items: stretch; flex-direction: column; }
}
