/* ── CSS Variables & Reset ── */
:root {
  --bg:        #080a0f;
  --surface:   #111318;
  --surface2:  #1a1d27;
  --surface3:  #21253a;
  --accent:    #ec5a43;
  --accent-dim:rgba(236,90,67,0.12);
  --accent2:   #f59e0b;
  --text:      #f0f2f8;
  --text2:     #9aa0be;
  --border:    #252a40;
  --border2:   #2e3452;
  --radius:    14px;
  --radius-sm: 8px;

  --pi-d-bg:  #2d3442; --pi-d-fg:  #9ba8c4;
  --pi-c-bg:  #1a3a2a; --pi-c-fg:  #5ecc8a;
  --pi-b-bg:  #1a2e4a; --pi-b-fg:  #60a5fa;
  --pi-a-bg:  #3a2800; --pi-a-fg:  #fbbf24;
  --pi-s1-bg: #3a1040; --pi-s1-fg: #d886f5;
  --pi-s2-bg: #3a1010; --pi-s2-fg: #f87171;
  --pi-r-bg:  #1e0a3a; --pi-r-fg:  #a78bfa;
  --pi-x-bg:  #0a0a0a; --pi-x-fg:  #f6ad55;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  font-size: 16px;
}

/* ── Inputs & Selects ── */
input[type="text"],
input[type="number"],
select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

select option { background: var(--surface2); }

/* ── Buttons ── */
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-height: 42px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover  { background: #d44a34; }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--border2); color: var(--text); }
.btn-sm { padding: 8px 12px; font-size: 0.8rem; min-height: 36px; }

/* ── Stats ── */
.stat .num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat .label {
  font-size: 0.6rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }