/* Design tokens + primitives shared by the site and the admin panel. */
:root {
  --bg: #07070a;
  --panel: #0e0e13;
  --panel-2: #14141b;
  --panel-3: #1b1b24;
  --border: #1e1e28;
  --border-2: #2a2a36;
  --grid: rgba(255, 255, 255, 0.035);
  --text: #ededf2;
  --muted: #8b8b9b;
  --dim: #5a5a69;

  --accent: #c6f432;
  --accent-ink: #0c0f02;
  --accent-soft: rgba(198, 244, 50, 0.12);

  --green: #2ed47a;
  --green-bg: #0f2e1d;
  --green-a: rgba(46, 212, 122, 0.45);
  --red: #ff5b4f;
  --red-bg: #33130f;
  --red-a: rgba(255, 91, 79, 0.45);

  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Inter', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--muted); }

.logo-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.04em;
  color: var(--text);
}
.logo-mark::after { content: '.'; color: var(--accent); }
.logo-mark.big { font-size: 64px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--panel-3); border: 1px solid var(--border-2);
  font-weight: 600; transition: background .15s, opacity .15s;
}
.btn:hover { background: #242430; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-accent:hover { background: #d5ff55; }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: transparent; }
.btn-danger:hover { background: #45180f; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--panel-3); color: var(--text); }

.input {
  height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--border-2); outline: none;
  transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; }

.chain-badge {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px;
  background: var(--panel-3); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em;
}

.ticon { border-radius: 50%; object-fit: cover; background: var(--panel-3); flex: none; display: block; }
.ticon-fb { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 12px; }

.toasts { position: fixed; z-index: 1000; left: 50%; bottom: 48px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 10px 16px; border-radius: 10px; background: var(--panel-3); border: 1px solid var(--border-2);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); font-weight: 500; opacity: 0; transform: translateY(8px); transition: all .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast-ok { border-color: rgba(46,212,122,.4); }
.toast-err { border-color: rgba(255,91,79,.5); color: #ffb3ad; }

.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: var(--panel-3); border: 1px solid var(--border-2); transition: .15s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: .15s; }
.switch input:checked + span { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked + span::after { left: 18px; background: var(--accent); }

@keyframes flash-up { from { background: rgba(46,212,122,.18); } to { background: transparent; } }
@keyframes flash-down { from { background: rgba(255,91,79,.18); } to { background: transparent; } }
.flash-up { animation: flash-up .9s ease-out; }
.flash-down { animation: flash-down .9s ease-out; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #22222c; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
