/* Wicky design system: warm near-black, cream headlines, one orange accent. Geist for text, Geist Mono for numbers. */
:root {
  --bg: #0a0806;
  --bg-2: #120f0c;
  --bg-3: #19140f;
  --bg-4: #211a14;
  --line: rgba(255, 232, 214, .09);
  --line-2: rgba(255, 232, 214, .16);
  --chip: rgba(255, 232, 214, .07);
  --text: #f7f4f1;
  --muted: #a1978e;
  --dim: #5c534b;
  --cream: #ffe9d4;
  --accent: #ff7a1a;
  --accent-hi: #ff9142;
  --accent-soft: rgba(255, 122, 26, .14);
  --up: #21c95e;
  --down: #f2465a;
  --r-s: 6px;
  --r: 8px;
  --r-l: 12px;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 500 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: var(--accent-soft); }
.mono, .num { font-family: var(--mono); font-feature-settings: 'tnum'; letter-spacing: -.01em; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); } .dim { color: var(--dim); }
.hide { display: none !important; }

/* ---------- buttons, chips, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r-l);
  border: 1px solid var(--line); background: var(--bg-3); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s; }
.btn:hover { background: var(--bg-4); border-color: var(--line-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a0d03; }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.light { background: var(--text); border-color: var(--text); color: #120f0c; }
.btn.light:hover { background: #fff; }
.btn.sm { height: 30px; padding: 0 12px; border-radius: var(--r); font-size: 12px; }
.btn.lg { height: 48px; padding: 0 26px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-s); background: var(--chip);
  border: 1px solid transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--bg-4); color: var(--text); border-color: var(--line-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--chip); border-radius: var(--r); padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; height: 24px; padding: 0 10px; border-radius: var(--r-s); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--bg-4); color: var(--text); }
.input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); background: var(--bg-3); border: 1px solid var(--line); outline: none; }
.input:focus { border-color: var(--accent); }
label.f { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin: 14px 0 6px; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.badge.buy { background: rgba(33, 201, 94, .14); color: var(--up); }
.badge.sell { background: rgba(242, 70, 90, .14); color: var(--down); }
.badge.acc { background: var(--accent-soft); color: var(--accent); }
.badge.mute { background: var(--chip); color: var(--muted); }
.label { font: 500 13px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 22px; letter-spacing: -.045em; color: var(--cream); }
.logo img { width: 28px; height: 28px; }

/* ---------- avatar ---------- */
.av { display: inline-block; vertical-align: middle; width: 32px; height: 32px; border-radius: 50%; flex: none; overflow: hidden; background: var(--bg-4); }
.av img, .av svg { width: 100%; height: 100%; object-fit: cover; }
.av.sm { width: 24px; height: 24px; } .av.lg { width: 88px; height: 88px; } .av.md { width: 40px; height: 40px; }

/* ---------- toast + modal ---------- */
.toast { position: fixed; left: 50%; bottom: 52px; transform: translateX(-50%); background: var(--bg-4); border: 1px solid var(--line-2); padding: 10px 16px;
  border-radius: var(--r-l); z-index: 99; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }
.modal-bg { position: fixed; inset: 0; background: rgba(5, 4, 3, .72); backdrop-filter: blur(6px); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 400px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 28px; position: relative; max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { margin: 14px 0 4px; font-size: 22px; letter-spacing: -.03em; font-weight: 600; }
.modal .x { position: absolute; top: 14px; right: 14px; border: 0; background: var(--chip); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sso { display: grid; gap: 10px; margin-top: 20px; }
.sso .btn { height: 44px; }
.avgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 4px; }
.avgrid button { border: 2px solid transparent; border-radius: 50%; padding: 0; background: none; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.avgrid button.on { border-color: var(--accent); }
.avgrid button svg, .avgrid button img { width: 100%; height: 100%; object-fit: cover; }
.fine { color: var(--dim); font-size: 12px; margin-top: 14px; }
.fine a { color: var(--muted); text-decoration: underline; }
