/* ============================================================
   PIPSDEX — Theme tokens & base
   ============================================================ */
:root {
  --bg: #080b10;
  --bg-2: #0c1117;
  --panel: #11171f;
  --panel-2: #161e28;
  --panel-3: #1b2531;
  --border: #1f2a37;
  --border-2: #2a3747;
  --text: #e6edf5;
  --text-2: #a9b6c6;
  --muted: #6b7a8c;
  --accent: #22d3ee;
  --accent-2: #0ea5b7;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --green: #1fe08a;
  --green-2: #16b86f;
  --green-soft: rgba(31, 224, 138, 0.12);
  --red: #f43f5e;
  --red-soft: rgba(244, 63, 94, 0.13);
  --amber: #f5b73b;
  --amber-soft: rgba(245, 183, 59, 0.13);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.14);
  --blue: #60a5fa;
  --pink: #f472b6;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, "Nirmala UI", "Mangal", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --topbar-h: 60px;
  --grid-line: rgba(255, 255, 255, 0.025);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #eef2f7;
  --bg-2: #e6ebf2;
  --panel: #ffffff;
  --panel-2: #f5f7fb;
  --panel-3: #edf1f7;
  --border: #dbe2ec;
  --border-2: #c9d3e0;
  --text: #0f1722;
  --text-2: #3b4a5c;
  --muted: #6b7a8c;
  --accent: #0891b2;
  --accent-2: #0e7490;
  --accent-soft: rgba(8, 145, 178, 0.1);
  --green: #059669;
  --green-2: #047857;
  --green-soft: rgba(5, 150, 105, 0.1);
  --red: #e11d48;
  --red-soft: rgba(225, 29, 72, 0.09);
  --amber: #b7791f;
  --amber-soft: rgba(183, 121, 31, 0.12);
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.1);
  --shadow: 0 10px 30px rgba(15, 23, 34, 0.12);
  --grid-line: rgba(15, 23, 34, 0.035);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.up { color: var(--green) !important; }
.down { color: var(--red) !important; }
.flat { color: var(--amber) !important; }
.muted { color: var(--muted); }
.dim { color: var(--text-2); }
.accent { color: var(--accent); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.right { text-align: right; }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.big { font-size: 22px; font-weight: 700; }
.bold { font-weight: 700; }
.upper { text-transform: uppercase; letter-spacing: 0.08em; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: .35; } 100% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flashUp { 0% { background: var(--green-soft); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: var(--red-soft); } 100% { background: transparent; } }
@keyframes slideIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.flash-up { animation: flashUp .9s ease-out; }
.flash-down { animation: flashDown .9s ease-out; }

/* language switcher (app top bar, settings, landing, sign-in) */
select.lang-pick { background: var(--panel-2); color: var(--text); border: 1px solid var(--border-2); border-radius: 9px; padding: 6px 8px; font: 600 12px var(--font); cursor: pointer; outline: none; }
select.lang-pick:focus { border-color: var(--accent); }
select.lang-pick.top { height: 34px; padding: 0 6px; }
html[data-lang="hi"] body { line-height: 1.55; }
