/* Shared styles for login, dashboard and admin. Notion-like: white page, soft greys, system font, no gradients. */
:root {
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji";
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F7F7F5; --hover: rgba(55,53,47,.06); --border: #E9E9E7;
  --text: #37352F; --muted: #787774; --faint: #A5A29A;
  --pos: #448361; --loss: #D44C47; --warn: #CB912F; --accent: #2383E2; --link: #37352F; --btn: #2383E2;
  --tag-gray: #E3E2E0; --tag-gray-t: #32302C; --tag-green: #DBEDDB; --tag-green-t: #1C3829; --tag-red: #FFE2DD; --tag-red-t: #5D1715;
  --tag-yellow: #FDECC8; --tag-yellow-t: #402C1B; --tag-blue: #D3E5EF; --tag-blue-t: #183347; --tag-purple: #E8DEEE; --tag-purple-t: #412454;
  --shadow: rgba(15,15,15,.05) 0 0 0 1px, rgba(15,15,15,.1) 0 3px 6px, rgba(15,15,15,.2) 0 9px 24px;
  /* old names still used in places */
  --sol-purple: #9065B0; --sol-green: #448361; --grad: none;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191919; --surface: #191919; --surface-2: #202020; --hover: rgba(255,255,255,.055); --border: #2F2F2F;
    --text: #D4D4D4; --muted: #9B9B9B; --faint: #6F6F6F;
    --pos: #4DAB9A; --loss: #DF5452; --warn: #CA9849; --accent: #2383E2; --link: #D4D4D4; --btn: #2383E2;
    --tag-gray: #373737; --tag-gray-t: #D4D4D4; --tag-green: #2B593F; --tag-green-t: #E0F0E5; --tag-red: #6E3630; --tag-red-t: #FBE4E2;
    --tag-yellow: #89632A; --tag-yellow-t: #FAEEDC; --tag-blue: #28456C; --tag-blue-t: #E2EDF7; --tag-purple: #492F64; --tag-purple-t: #EFE6F5;
    --shadow: rgba(15,15,15,.1) 0 0 0 1px, rgba(15,15,15,.2) 0 3px 6px, rgba(15,15,15,.4) 0 9px 24px;
    --sol-purple: #9D68D3; --sol-green: #4DAB9A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #191919; --surface: #191919; --surface-2: #202020; --hover: rgba(255,255,255,.055); --border: #2F2F2F;
  --text: #D4D4D4; --muted: #9B9B9B; --faint: #6F6F6F;
  --pos: #4DAB9A; --loss: #DF5452; --warn: #CA9849; --accent: #2383E2; --link: #D4D4D4; --btn: #2383E2;
  --tag-gray: #373737; --tag-gray-t: #D4D4D4; --tag-green: #2B593F; --tag-green-t: #E0F0E5; --tag-red: #6E3630; --tag-red-t: #FBE4E2;
  --tag-yellow: #89632A; --tag-yellow-t: #FAEEDC; --tag-blue: #28456C; --tag-blue-t: #E2EDF7; --tag-purple: #492F64; --tag-purple-t: #EFE6F5;
  --shadow: rgba(15,15,15,.1) 0 0 0 1px, rgba(15,15,15,.2) 0 3px 6px, rgba(15,15,15,.4) 0 9px 24px;
  --sol-purple: #9D68D3; --sol-green: #4DAB9A;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 40px); } h2 { font-size: 24px; font-weight: 600; } h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }
a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .pos { color: var(--pos); } .neg { color: var(--loss); }

/* Top bar: thin, quiet, like a Notion page header */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.topbar .in { max-width: 1200px; margin: 0 auto; padding: 0 16px; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.brand:hover { background: var(--hover); }
.brand img { width: 20px; height: 20px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 32px 24px 80px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 6px; font: 500 14px var(--font); text-decoration: none; border: 0; cursor: pointer; background: var(--btn); color: #fff; transition: background .12s; }
.btn:hover { background: #0077D4; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.btn-ghost:hover { background: var(--hover); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 14px; }
.topbar .btn-ghost { box-shadow: none; color: var(--muted); }
.topbar .btn-ghost:hover { color: var(--text); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 4px; }

/* Blocks */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 4px; font: 400 13px/20px var(--font); color: var(--tag-gray-t); background: var(--tag-gray); white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); flex: none; animation: pulse 2.4s ease-in-out infinite; }
.dot.off { background: var(--loss); animation: none; } .dot.idle { background: var(--faint); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); }

/* Forms */
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
label.f small { color: var(--muted); font-weight: 400; }
input[type=email], input[type=text], input[type=number], input[type=password], select { width: 100%; min-height: 36px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 400 15px var(--font); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); background: var(--bg); }
.msg { padding: 12px 14px 12px 42px; border-radius: 6px; font-size: 14px; background: var(--surface-2); position: relative; }
.msg::before { content: "💡"; position: absolute; left: 14px; top: 11px; }
.msg.err { background: var(--tag-red); color: var(--tag-red-t); } .msg.err::before { content: "⚠️"; }
.msg.ok { background: var(--tag-green); color: var(--tag-green-t); } .msg.ok::before { content: "✅"; }

/* Tables: thin lines, no boxes */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 400; font-size: 13px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
[hidden] { display: none !important; }
@media (max-width: 420px) { .topbar .pill { display: none; } }

/* Logo: on hover the coin rolls a little to the right (30°) and rolls back */
.brand img, .pico { transform-origin: 50% 50%; transition: transform .7s cubic-bezier(.3, .7, .2, 1); }
.brand:hover img, .pico:hover { transform: translateX(12%) rotate(30deg); }
