/* Frog Eater Admin: the website's brand tokens (Website/framer/SiteKit.tsx), light and dark, and Satoshi served from
   this site so the content policy can stay at 'self'. */
@font-face { font-family: "Satoshi"; src: url("/fonts/Satoshi-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/fonts/Satoshi-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
    color-scheme: light dark;
    --canvas: #f7f3e3;
    --paper: #fefefe;
    --cream: #fdf9db;
    --ink: #034b1d;
    --muted: rgba(3, 75, 29, 0.78);
    --line: rgba(3, 75, 29, 0.14);
    --wash: rgba(3, 75, 29, 0.06);
    --green: #81bd12;
    --leaf: #5c940c;
    --solid: #034b1d;
    --on-solid: #fefefe;
    --alert: #b3261e;
    --shadow: 0 1px 2px rgba(3, 40, 15, 0.06), 0 12px 32px rgba(3, 40, 15, 0.08);
    /* One chart color, validated on both surfaces (lightness band, chroma floor, 3:1 contrast): the brand's leaf. */
    --series-1: #5c940c;
    --font: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #0a0f0b;
        --paper: #151d17;
        --cream: #1c2718;
        --ink: #e9f2e4;
        --muted: rgba(233, 242, 228, 0.78);
        --line: rgba(233, 242, 228, 0.14);
        --wash: rgba(233, 242, 228, 0.06);
        --leaf: #81bd12;
        --solid: #81bd12;
        --on-solid: #0a1406;
        --alert: #ff8a80;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
        --series-1: #5c940c;
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; }
a { color: var(--ink); }
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 0.75rem; font-weight: 700; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.6rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--wash); padding: 0.1rem 0.35rem; border-radius: 6px; word-break: break-all; }

button {
    font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 0.7rem 1.4rem; cursor: pointer;
    background: var(--solid); color: var(--on-solid);
}
button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); padding: 0.45rem 1rem; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: default; }

.alert { color: var(--alert); font-weight: 700; margin: 0.5rem 0 1rem; }

/* Signing in */
.auth { max-width: 420px; margin: 8vh auto; padding: 2rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.auth-logo { width: 56px; height: auto; margin-bottom: 1rem; }
.auth form { display: grid; gap: 1rem; margin-top: 1rem; }
.field { display: grid; gap: 0.35rem; font-weight: 700; }
.field input, .field textarea { font: inherit; font-weight: 400; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--canvas); color: var(--ink); }
.qr { display: block; width: 184px; height: 184px; margin: 1rem 0; background: #fff; padding: 8px; border-radius: 12px; image-rendering: pixelated; }

/* The dashboard */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding: 0.9rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 2; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; }
.logo { width: 32px; height: auto; }
.dark-only { display: none; }
@media (prefers-color-scheme: dark) { .light-only { display: none; } .dark-only { display: inline; } }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem; flex: 1; }
nav a { text-decoration: none; padding: 0.4rem 0.8rem; border-radius: 999px; color: var(--muted); font-weight: 700; }
nav a[aria-current="page"] { background: var(--wash); color: var(--ink); }
.actions { display: flex; gap: 0.5rem; }
.page { max-width: 1120px; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }

.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem 1rem; margin: 0 0 1.5rem; }
.filter { display: grid; gap: 0.25rem; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.filter input, .filter select { font: inherit; font-size: 0.95rem; font-weight: 400; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0.45rem 0.6rem; }
.utc { margin: 0 0 0.5rem; }

.report[aria-busy="true"] { opacity: 0.6; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; }
.tile .label { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.tile .value { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 0.2rem; }
.tile .note { color: var(--muted); font-size: 0.85rem; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-family: var(--font); font-size: 12px; }
.chart .bar { fill: var(--series-1); }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2.5; }
.chart .grid { stroke: var(--line); }
.legend { display: flex; gap: 1rem; color: var(--muted); font-size: 0.85rem; margin: 0.4rem 0 0; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: middle; }

@media (max-width: 640px) {
    .top { padding: 0.75rem 1rem; justify-content: space-between; }
    /* The links get their own row under the logo and the buttons, wrapping across it. */
    .top nav { order: 3; flex-basis: 100%; }
    nav a { padding: 0.35rem 0.65rem; }
    .page { padding: 1.25rem 1rem 3rem; }
    h1 { font-size: 1.6rem; }
}

/* The Accounts tab (Spec-Account-Tools) */
.account-search { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; margin: 0 0 1.5rem; }
.account-search .field { flex: 1 1 280px; max-width: 520px; }
.account-email { margin-top: 0.5rem; word-break: break-all; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.account-actions { margin: 0 0 1rem; }
.account-panel { display: grid; gap: 0.6rem; max-width: 640px; margin: 0 0 1.25rem; }
.account-panel .counter { justify-self: end; margin-top: -0.4rem; }
.account-panel .alert { margin: 0; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.account-block { margin: 0 0 1rem; }
.account-grid .account-block { margin: 0; }
.account-block h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.35rem 1rem; margin: 0; }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts code { font-size: 0.82rem; }
.status-line { font-weight: 700; margin: 0 0 0.5rem; }
.status-line.suspended { color: var(--alert); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.history-what { font-weight: 700; }
.history-reason { margin: 0.15rem 0 0; }
.account-block .panel { border: 0; padding: 0; margin-top: 0.75rem; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
th[scope="row"] { color: var(--ink); font-size: 1rem; }
figure.panel { margin: 0; }
