/* WB Gold — design tokens + komponenty. Źródło prawdy stylu CM.
   Spec: docs/superpowers/specs/2026-06-11-wb-gold-theme-design.md */

@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/poppins-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/poppins-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/fonts/poppins-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/fonts/poppins-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/fonts/poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/fonts/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/poppins-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/poppins-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --gold: #f2af1c;
  --bronze: #B48A48;
  --bg-base: #0a0a0f;
  --bg-surface: #12121a;
  --bg-surface-2: #1a1a24;
  --bg-sidebar: #0d0d14;
  --text-cream: #f5f3ef;
  --text-secondary: #a8a8c0;
  --text-muted: #8b8ba7;
  --text-dim: #6b6b87;
  --border-soft: rgba(255,255,255,.08);
  --border-soft-2: rgba(255,255,255,.14);
  --gold-bg: rgba(242,175,28,.14);
  --gold-border: rgba(242,175,28,.25);
}

html { background: var(--bg-base); }
body { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-base); color: var(--text-cream); }
::selection { background: var(--gold); color: #1a1200; }
* { scrollbar-width: thin; scrollbar-color: #2a2a38 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #2a2a38; border-radius: 8px; border: 2px solid var(--bg-base); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Komponenty ---------- */
.cm-card { background: var(--bg-surface); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 20px; }
.cm-tile { background: var(--bg-surface); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 14px 16px 12px; }
.cm-tile-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); font-weight: 500; }
.cm-tile-value { font-size: 24px; font-weight: 600; color: var(--text-cream);
  margin-top: 4px; line-height: 1.2; }
.cm-tile-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.cm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 500; border: 1px solid var(--border-soft-2);
  background: var(--bg-surface-2); color: var(--text-cream); cursor: pointer;
  transition: background .15s, border-color .15s; }
.cm-btn:hover { background: #222230; border-color: rgba(255,255,255,.22); }
.cm-btn-gold { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 600; border: 0;
  background: linear-gradient(135deg, #f2af1c 0%, #B48A48 100%); color: #1a1200;
  cursor: pointer; transition: filter .15s; }
.cm-btn-gold:hover { filter: brightness(1.08); }
.cm-btn-danger { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #f87171; }
.cm-btn-danger:hover { background: rgba(239,68,68,.18); }

.cm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px;
  border-radius: 8px; font-size: 14px; color: var(--text-secondary);
  border: 1px solid var(--border-soft-2); cursor: pointer; transition: all .15s; }
.cm-chip:hover { color: var(--text-cream); background: var(--bg-surface-2); }
.cm-chip--active { background: var(--gold-bg); border-color: var(--gold-border);
  color: var(--gold); font-weight: 500; }

.cm-table { width: 100%; font-size: 14px; }
.cm-table thead th { position: sticky; top: 0; background: var(--bg-surface);
  font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-muted); font-weight: 500; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--border-soft-2); }
/* Nagłówki kolumn liczbowych: utility .text-right (spec 0,1,0) przegrywa ze specyficznością
   `.cm-table thead th` (0,1,2), więc nagłówek lądował w lewo nad prawo-wyrównanymi liczbami.
   Te reguły (0,2,2) przywracają zgodność nagłówka z kolumną wartości. */
.cm-table thead th.text-right { text-align: right; }
.cm-table thead th.text-center { text-align: center; }
.cm-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.cm-table tbody tr:hover { background: var(--bg-surface-2); }

.cm-input { background: rgba(0,0,0,.3); border: 1px solid var(--border-soft-2);
  border-radius: 8px; color: #e8e8ef; font-size: 14px; padding: 7px 10px;
  font-family: inherit; }
.cm-input:focus { outline: none; border-color: var(--gold-border); }
.cm-input::placeholder { color: var(--text-dim); }

.cm-modal { background: var(--bg-surface); border: 1px solid var(--border-soft-2);
  border-radius: 14px; }

.cm-toast-ok { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3);
  color: #86efac; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.cm-toast-err { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
