/* GPWA_CSS_v1 - Quantafino panel */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #16191f;
  --muted: #5b6270;
  --border: #dde1e7;
  --accent: #1f5fd1;
  --accent-text: #ffffff;
  --ok-bg: #e5f4ea; --ok-fg: #1d6b39;
  --warn-bg: #fdf1dc; --warn-fg: #8a5a00;
  --err-bg: #fbe6e6; --err-fg: #a12626;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #171b21;
    --text: #e7eaef;
    --muted: #9aa3b2;
    --border: #2a3039;
    --accent: #5b8ff0;
    --accent-text: #0b0e12;
    --ok-bg: #16301f; --ok-fg: #7fd69c;
    --warn-bg: #33270f; --warn-fg: #f0c060;
    --err-bg: #3a1717; --err-fg: #f39a9a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .75rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .85em; }

/* top bar */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: .75rem 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; letter-spacing: .01em; }
.topbar nav { display: flex; gap: 1rem; flex: 1; }
.topbar nav a { color: var(--muted); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); border-bottom-color: var(--accent); }
.who { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: var(--muted); }
.who form { margin: 0; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem 16px 3rem; }

/* buttons and forms */
button, .button { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0;
  border-radius: var(--radius); padding: .6rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 400; }
input[type=email], input[type=text] { width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }

/* public card */
body.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem 1.5rem; }
.card .brand { font-size: 1.4rem; }
.tagline { margin: .1rem 0 1.5rem; color: var(--muted); font-size: .85rem; }

/* notices and badges */
.notice { padding: .6rem .8rem; border-radius: var(--radius); }
.notice-ok { background: var(--ok-bg); color: var(--ok-fg); }
.notice-err { background: var(--err-bg); color: var(--err-fg); }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .78rem;
  background: var(--bg); border: 1px solid var(--border); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.badge-err { background: var(--err-bg); color: var(--err-fg); border-color: transparent; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.tile-label { color: var(--muted); font-size: .85rem; }
.tile-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-src { color: var(--muted); font-size: .75rem; margin-top: .25rem; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
tbody tr:last-child td { border-bottom: 0; }

.disclaimer { max-width: 1100px; margin: 0 auto; padding: 1rem 16px 2rem; color: var(--muted); font-size: .78rem; }
body.public .disclaimer { max-width: 420px; padding: 1rem 0; text-align: center; }
