:root {
    --ink: #17212b;
    --muted: #64748b;
    --paper: #fffaf1;
    --panel: rgba(255, 255, 255, 0.86);
    --line: rgba(23, 33, 43, 0.12);
    --brand: #f97316;
    --brand-dark: #c2410c;
    --river: #0f766e;
    --sky: #d9f4ef;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at 15% 12%, rgba(249, 115, 22, 0.24), transparent 30%),
        radial-gradient(circle at 85% 8%, rgba(15, 118, 110, 0.26), transparent 28%),
        linear-gradient(135deg, var(--paper), var(--sky));
}

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

.landing {
    display: grid;
    place-items: center;
    padding: 28px;
}

.hero {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
    gap: 24px;
    align-items: stretch;
}

.hero-card,
.signal-card,
.panel {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-card {
    min-height: 520px;
    border-radius: 38px;
    padding: clamp(32px, 7vw, 76px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.signal-card {
    border-radius: 38px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background:
        linear-gradient(160deg, rgba(15, 118, 110, 0.86), rgba(23, 33, 43, 0.92)),
        var(--river);
    color: white;
}

.signal-card span { opacity: 0.75; text-transform: uppercase; letter-spacing: 0.14em; }
.signal-card strong { font-size: clamp(42px, 8vw, 76px); line-height: 0.9; margin: 18px 0; }
.signal-card small { color: rgba(255, 255, 255, 0.76); font-size: 18px; }

.eyebrow {
    margin: 0 0 14px;
    color: var(--brand-dark);
    font: 700 12px/1.2 Verdana, sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1, h2 { margin: 0; line-height: 0.95; }
h1 { font-size: clamp(46px, 9vw, 112px); letter-spacing: -0.07em; }
h2 { font-size: 26px; letter-spacing: -0.03em; }

.lead {
    max-width: 640px;
    color: #3d4b5c;
    font-size: clamp(20px, 2.4vw, 30px);
    line-height: 1.22;
}

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }

.btn {
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    cursor: pointer;
    font: 800 15px/1 Verdana, sans-serif;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--brand); color: white; box-shadow: 0 14px 26px rgba(249, 115, 22, 0.28); }
.btn.ghost { background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line); }

.topbar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px clamp(18px, 4vw, 44px);
    background: rgba(255, 250, 241, 0.76);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
}

.brand { font-weight: 900; letter-spacing: -0.04em; font-size: 24px; }
.topbar nav { display: flex; gap: 16px; font: 700 14px Verdana, sans-serif; color: var(--muted); }

.content { width: min(1180px, calc(100% - 32px)); margin: 32px auto; }
.content.narrow { width: min(780px, calc(100% - 32px)); }

.auth-page { display: grid; place-items: center; padding: 24px; }
.auth-shell { width: min(460px, 100%); }

.panel {
    border-radius: 28px;
    padding: clamp(20px, 3vw, 32px);
}

.form-card h1,
.survey-form h1 { margin-bottom: 26px; }

label, legend {
    display: block;
    color: #253445;
    font: 800 15px/1.25 Verdana, sans-serif;
}

input {
    width: 100%;
    margin-top: 9px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 15px;
    font: 18px/1.2 Georgia, "Times New Roman", serif;
    background: rgba(255, 255, 255, 0.72);
}

.form-card label,
.survey-form > label { margin-bottom: 18px; }

fieldset {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    margin: 18px 0;
    background: rgba(255, 255, 255, 0.48);
}

.choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
}

.choice input { width: auto; margin: 0; }

.alert, .success {
    border-radius: 18px;
    padding: 14px 16px;
    margin: 0 0 18px;
    font: 700 14px Verdana, sans-serif;
}

.alert { background: #fee2e2; color: #991b1b; }
.success { background: #dcfce7; color: #166534; }
.gps { color: var(--muted); font: 700 13px Verdana, sans-serif; }
.gps.ok { color: #166534; }
.gps.warn { color: #9a3412; }

.dashboard-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 24px;
}

.metric {
    min-width: 170px;
    border-radius: 30px;
    padding: 20px;
    color: white;
    background: linear-gradient(135deg, var(--river), #17212b);
    box-shadow: var(--shadow);
}

.metric span { display: block; font-size: 56px; font-weight: 900; line-height: 0.9; }
.metric small { opacity: 0.8; font: 700 13px Verdana, sans-serif; text-transform: uppercase; }

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

.chart-panel canvas { max-height: 320px; margin-top: 18px; }

.table-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.table-head span { color: var(--muted); font: 700 13px Verdana, sans-serif; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
th { font: 800 12px Verdana, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
td { font-size: 15px; }

@media (max-width: 800px) {
    .hero,
    .grid,
    .dashboard-head {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hero-card { min-height: auto; }
    .topbar { align-items: flex-start; gap: 10px; flex-direction: column; }
}
