/* VGP Notiff — tokeny i style 1:1 z zatwierdzonej makiety VGP_Notiff_Mockup_UI.html (ui-fidelity.md) */
:root {
  --bg-outer: #060a10;
  --bg-window: #0a101c;
  --bg-sidebar: #0b121c;
  --bg-card: #0f1622;
  --bg-card-hover: #131c2b;
  --bg-panel: #0c131f;
  --bg-store: #121b2a;
  --bg-input: #101724;

  --border-win: #182334;
  --border-card: #1b2638;
  --border-subtle: #151f2e;

  --emerald: #1bc28a;
  --emerald-hover: #24d99c;
  --emerald-dark: #112b28;
  --emerald-border: #1d4d45;
  --emerald-pill-bg: #0c1f1d;
  --emerald-text: #34d399;

  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --text-mute: #64748b;

  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: radial-gradient(circle at 50% 0%, #111b2e 0%, var(--bg-outer) 70%);
  color: var(--text-main);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* Główna rama okna 1:1 ze zrzutem referencyjnym — STAŁA WIELKOŚĆ (brak skakania przy filtrach) */
.window {
  width: 1360px;
  max-width: 100%;
  height: 868px;
  min-height: 868px;
  max-height: 868px;
  background: var(--bg-window);
  border: 1px solid var(--border-win);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 224px 1fr;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* ================= LEWY SIDEBAR ================= */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  padding: 22px 16px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Kontrolki okna Windows (Min / Max / Close) w prawym górnym rogu */
.win-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin-top: -6px;
  margin-right: -8px;
}
.win-btn {
  width: 36px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.win-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}
.win-btn.close:hover {
  background: #e81123;
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 26px;
}
.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 22px rgba(27, 194, 138, 0.25);
}
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-name {
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.15;
}
.brand-name .accent {
  color: var(--emerald);
}
.brand-tag {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 3px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-btn {
  height: 44px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}
.nav-btn.active {
  background: #14252e;
  border-color: #1f3c47;
  color: var(--text-main);
  font-weight: 600;
}
.nav-btn-left {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-main);
  flex-shrink: 0;
}
.nav-icon img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}
.nav-ps { background: #00439c; }
.nav-switch { background: #e60012; }
.nav-pc { background: #475569; }
.nav-btn.active .nav-icon {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.nav-count {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #162030;
  color: var(--text-dim);
}
.nav-btn.active .nav-count {
  background: var(--emerald);
  color: #032217;
}

.add-game-btn {
  margin-top: auto;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: var(--emerald);
  color: #042419;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(27, 194, 138, 0.28);
  transition: transform 0.12s ease, background 0.12s ease;
}
.add-game-btn:hover {
  background: var(--emerald-hover);
  transform: translateY(-1px);
}
.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-actions .add-game-btn { margin-top: 0; }
.studio-btn {
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.studio-btn:hover { color: var(--text-main); border-color: var(--emerald); }
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}
.check-line input { accent-color: var(--emerald); }
.preview-status {
  min-height: 14px;
  font-size: 11px;
  color: var(--emerald-text);
}
.modal.studio { width: 520px; max-height: min(78vh, 640px); overflow: auto; }
.probe-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.probe-list li { font-size: 12px; line-height: 1.35; color: var(--text-main); }
.probe-list a { color: var(--emerald-text); }
.probe-muted { color: var(--text-mute); }

/* ================= PRAWA CZĘŚĆ GŁÓWNA ================= */
.workspace {
  /* Kotwica dla plywajacego paska operacji masowych. */
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

/* Pasek wyszukiwania, 3 pigułek filtrów oraz kontrolek okna Windows */
.topbar {
  padding: 18px 24px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.search-wrap {
  position: relative;
  width: 390px;
  max-width: 100%;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 40px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-main);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--text-mute); }
.search-input:focus { border-color: var(--emerald); }

.filter-pills {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fpill {
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fpill:hover {
  border-color: #2c3d57;
  color: var(--text-main);
}
.fpill.active {
  background: rgba(27, 194, 138, 0.12);
  border-color: #187a59;
  color: var(--emerald-text);
  font-weight: 600;
}

/* Układ: 2-kolumnowa siatka kart + Prawy Panel Szczegółów */
.content-body {
  padding: 6px 24px 24px;
  display: grid;
  grid-template-columns: 1fr 312px;
  gap: 20px;
  flex: 1;
  min-height: 0;
  align-items: start;
}
.content-body.detail-hidden {
  grid-template-columns: 1fr;
}
.content-body.detail-hidden .detail-panel { display: none; }
.content-body.detail-hidden .cards-grid { grid-template-columns: repeat(3, 1fr); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Makieta miala same krotkie tytuly, wiec sztywne 172 px wystarczalo.
     „Ratchet & Clank Future: A Crack in Time" lamie sie na dwa wiersze
     i pudelko ceny wychodzilo 19,8 px PONIZEJ karty — stad wrazenie, ze
     znaczniki cen sa zsuniete w dol i rozjezdzaja sie w srodku listy.
     `minmax` zostawia wyglad z makiety przy krotkich tytulach, a dluzszym
     pozwala urosnac zamiast sie wylewac. Zmierzone, nie oszacowane. */
  /* `max-content`, nie `minmax(172px, ...)`: przy kontenerze o ustalonej
     wysokosci i `align-content: start` minmax zostawal na dolnej granicy
     i wiersz wcale nie rosl (sprawdzone pomiarem: 172 px mimo tresci 207 px).
     Minimum z makiety trzyma teraz sama karta przez `min-height`. */
  grid-auto-rows: max-content;
  align-content: start;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  padding-right: 2px;
}

/* Pojedyncza Karta Gry (1:1 z makietą, stała wysokość 172px) */
.deal-card {
  /* Sztywna wysokosc z makiety -> `min-height`. Makieta miala same krotkie
     tytuly; przy dwuwierszowym („Ratchet & Clank Future: A Crack in Time")
     pudelko ceny wychodzilo 19,8 px pod karte. */
  min-height: 172px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 15px;
  padding: 14px;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 15px;
  align-items: stretch;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.deal-card:hover {
  background: var(--bg-card-hover);
  border-color: #293850;
  transform: translateY(-1px);
}
.deal-card.selected {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px rgba(27, 194, 138, 0.25);
}

.cover-wrap {
  width: 92px;
  height: 132px;
  border-radius: 7px;
  overflow: hidden;
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
}
.cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* `height: 100%` przypinalo kolumne do wysokosci karty, wiec przy dwuwierszowym
     tytule tresc wylewala sie POZA karte zamiast ja rozepchnac. `min-height`
     daje to samo wyrownanie przy krotkich tytulach i pozwala urosnac dluzszym. */
  min-height: 100%;
  position: relative;
}
.deal-card .price-box {
  position: static;
  margin-top: auto;
  margin-left: auto;
  width: 134px;
  flex-shrink: 0;
}

.plat-pill {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  background: #182232;
  border: 1px solid #253348;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.plat-PS3, .plat-PS4, .plat-PS2 {
  color: #7cb6ff;
  border-color: #00439c;
  background: #0c1c33;
}
.plat-SWITCH {
  color: #ff8b8b;
  border-color: #e60012;
  background: #2a0c10;
}
.plat-PC {
  color: #e2e8f0;
  border-color: #64748b;
  background: #1e293b;
}

.game-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 4px;
}

.game-store {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.game-target {
  font-size: 12px;
  color: var(--text-mute);
}

/* Zielony boks cenowy w prawym dolnym rogu karty */
.price-box {
  margin-top: auto;
  margin-left: auto;
  width: 134px;
  flex-shrink: 0;
  background: var(--emerald-dark);
  border: 1px solid var(--emerald-border);
  border-radius: 11px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}
.price-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.price-box-top { flex-wrap: nowrap; gap: 4px; }
.fav-star {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  color: #3d4d63;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.fav-star.on { color: #f5c518; }
.sort-select {
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px;
}
.discount-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--emerald-pill-bg);
  color: var(--emerald-text);
}
.get-deal-btn {
  width: 100%;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: var(--emerald);
  color: #032217;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: background 0.12s;
}
.get-deal-btn:hover {
  background: var(--emerald-hover);
}

/* ================= PRAWY PANEL SZCZEGÓŁÓW (INSPECTOR) ================= */
.detail-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.close-panel-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  /* Bez tego przycisk byl PRZYKRYTY przez `.card-info` z sekcji hero: oba sa
     pozycjonowane z `z-index: auto`, wiec wygrywal pozniejszy w dokumencie.
     Kod zamykania dzialal, tylko klik do niego nie docieral — stad zgloszenie
     @Adriana, ze „X nic nie robi". Sprawdzone przez `elementFromPoint`. */
  z-index: 5;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
}
.close-panel-btn:hover { color: var(--text-main); }

.detail-hero {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 14px;
  align-items: start;
}
.detail-cover {
  width: 98px;
  height: 144px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-price-box {
  width: 100%;
  margin-top: 8px;
  background: var(--emerald-dark);
  border: 1px solid var(--emerald-border);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Karta Price Comparison */
.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.comp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

a.store-row { text-decoration: none; color: inherit; }
a.store-row[href=""] { pointer-events: none; cursor: default; }
.store-row {
  background: var(--bg-store);
  border: 1px solid #1c283c;
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.store-row:hover { border-color: var(--emerald); }

.store-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  overflow: hidden;
  background: #16202f;
  color: #e2e8f0;
}
.store-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.tile-allegro { background: #ff5a00; }
.tile-allegro img, .tile-steam img, .tile-gog img { filter: brightness(0) invert(1); }
.tile-steam { background: #1b2838; }
.tile-gog { background: #86328a; }
.tile-olx { background: #002f34; }
.tile-lowcy { background: #f5c518; }
.tile-shop { background: #1a2740; color: #dbe7ff; }

.store-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.store-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
.store-cond { font-size: 11px; color: var(--text-mute); }
.store-stock {
  font-size: 11px;
  color: var(--emerald-text);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.stock-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }

.store-price-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

/* Karta przełącznika Email Alert Active */
.alert-toggle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.alert-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #151f30;
  border: 1px solid #223047;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* Przełącznik Toggle iOS */
.switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--emerald);
  padding: 3px;
  cursor: pointer;
  display: flex;
  justify-content: flex-end;
  transition: background 0.15s;
}
.switch.off {
  background: #263348;
  justify-content: flex-start;
}
.switch-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.info-note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Modal + Add Game */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 14, 0.78);
  backdrop-filter: blur(4px);
  z-index: 200;
  place-items: center;
  padding: 16px;
}
.modal-backdrop.open { display: grid; }
.modal {
  width: 440px;
  max-width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}
.m-field { display: flex; flex-direction: column; gap: 6px; }
.m-field label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.m-input, .m-select {
  height: 40px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-main);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.m-input:focus, .m-select:focus { border-color: var(--emerald); }

/* ===== Dodatki M3/M4 (@ClaudeCode): elementy nieobecne w statycznej makiecie ===== */

/* Zastepnik okladki — makieta miala okladki wklejone na sztywno,
   w aplikacji okladka pochodzi z wanted_items.cover_url (NULL => ten placeholder). */
.cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #121b2a 0%, #0a1018 100%);
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* Ekran logowania (ADR-07) — te same tokeny co panel */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-error {
  font-size: 12px;
  font-weight: 600;
  color: #fca5a5;
  background: #2a1218;
  border: 1px solid #4c1d2e;
  border-radius: 10px;
  padding: 9px 12px;
}
.login-shell code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  color: var(--emerald-text);
}

/* Stan zablokowanego przycisku oferty bez podpietego URL */
.get-deal-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
a.get-deal-btn { text-decoration: none; }

/* Logo zrodla nieznanego z nazwy (maly sklep / lombard z konfiguratora JSON-LD) */
.logo-generic { background: #16202f; color: #94a3b8; border: 1px solid #263349; font-size: 10px; }

/* ===== Przewijanie paneli (uwaga @Adriana: prawy panel ucinal opcje) ===== */
.detail-panel {
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: #24354c transparent;
}
.cards-grid { scrollbar-width: thin; scrollbar-color: #24354c transparent; }

.detail-panel::-webkit-scrollbar,
.cards-grid::-webkit-scrollbar { width: 9px; }
.detail-panel::-webkit-scrollbar-track,
.cards-grid::-webkit-scrollbar-track { background: transparent; }
.detail-panel::-webkit-scrollbar-thumb,
.cards-grid::-webkit-scrollbar-thumb {
  background: #1d2a3d;
  border: 2px solid var(--bg-panel);
  border-radius: 999px;
}
.detail-panel::-webkit-scrollbar-thumb:hover,
.cards-grid::-webkit-scrollbar-thumb:hover { background: #2c3d57; }

/* ===== Przelacznik jezyka w pasku gornym ===== */
.lang-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 10px;
}
.lang-flag {
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.lang-flag.active {
  border-color: var(--emerald);
  color: var(--text-main);
  background: #10241c;
}
.flag {
  width: 22px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.lang-btn {
  margin-left: auto;
  height: 30px;
  min-width: 40px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-dim);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-btn:hover { border-color: var(--emerald); color: var(--emerald-text); }

/* ===== Adres alertow i akcje gry — ten sam jezyk wizualny co karty ===== */
.alert-mail-card,
.item-actions {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.alert-mail-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.alert-mail-label span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-mute);
}
.alert-mail-row,
.item-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-mail-input,
.target-input {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-main);
  font: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.alert-mail-input { flex: 1; min-width: 0; }
.alert-mail-input:focus,
.target-input:focus { border-color: var(--emerald); }
.target-input { width: 84px; }
.target-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}
.target-currency { font-size: 11px; color: var(--text-mute); }

/* Pigulkowy przycisk — ten sam ksztalt co „Get Deal" z makiety */
.pill-btn {
  height: 32px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--emerald-border);
  background: var(--emerald-dark);
  color: var(--emerald-text);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pill-btn:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #032217;
}
.pill-btn.danger {
  background: #23141c;
  border-color: #4c1d2e;
  color: #f87171;
}
.pill-btn.danger:hover { background: #e81123; border-color: #e81123; color: #ffffff; }

.suggestion-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-dim);
}
.action-status {
  font-size: 11px;
  color: var(--text-mute);
  min-height: 0;
}
.action-status:empty { display: none; }

/* ===== Pola modala importu listy ===== */
.m-textarea {
  height: auto;
  min-height: 132px;
  padding: 10px 13px;
  line-height: 1.45;
  resize: vertical;
  font-family: inherit;
}
.m-file {
  height: auto;
  padding: 9px 11px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
}
.m-file::file-selector-button {
  margin-right: 10px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-dim);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.m-file::file-selector-button:hover { border-color: var(--emerald); color: var(--emerald-text); }

/* --- Priorytet zakupu (3 stopnie) -------------------------------------- */
/* Znacznik na karcie: trzy kreski, zapalonych `4 - priority`. Najpilniejsze
   ma komplet i najcieplejszy kolor, „kiedys" jedna i stonowana. Czytelne
   jednym rzutem oka, bez zabierania miejsca tytulowi. */
.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  /* Wiersz ma byc dokladnie tak wysoki jak pigulka platformy — znacznik
     priorytetu nie moze dokladac karcie wysokosci. */
  height: 20px;
  /* Miejsce na gwiazdke ulubionych, ktora jest pozycjonowana absolutnie
     w prawym gornym rogu karty — bez tego znacznik priorytetu na nia wchodzi. */
  padding-right: 24px;
}
.prio-marker {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
  flex-shrink: 0;
}
.prio-marker i {
  width: 3px;
  border-radius: 1px;
  background: #2c3a4d;
}
.prio-marker i:nth-child(1) { height: 5px; }
.prio-marker i:nth-child(2) { height: 8px; }
.prio-marker i:nth-child(3) { height: 11px; }
.prio-1 i { background: #f0883e; }
.prio-2 i:nth-child(1),
.prio-2 i:nth-child(2) { background: #4a9eff; }
.prio-3 i:nth-child(1) { background: #7d8da1; }

/* Wybor priorytetu w prawym panelu: segmenty zamiast listy rozwijanej —
   wszystkie trzy stopnie widac naraz, a klikniecie od razu zapisuje. */
.prio-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.prio-picker-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.prio-seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border-card);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}
/* Ikona nad napisem, nie obok: „Kupić wkrótce" obok ikony nie miescilo sie
   w szerokosci prawego panelu i ucinalo sie wielokropkiem. */
.prio-opt {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 7px 4px;
  font-size: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.prio-opt span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prio-opt:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.04); }
.prio-opt.on { color: var(--text-main); background: rgba(255, 255, 255, 0.07); }
.prio-opt-1.on { border-color: #f0883e; color: #f0883e; }
.prio-opt-2.on { border-color: #4a9eff; color: #4a9eff; }
.prio-opt-3.on { border-color: #7d8da1; color: #a9b6c7; }

/* --- Multiwybor i operacje masowe -------------------------------------- */
/* Kwadrat zaznaczenia siedzi nad okladka, w lewym gornym rogu — naprzeciwko
   gwiazdki ulubionych, zeby oba znaczniki karty mialy swoj rog. */
.bulk-check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  cursor: pointer;
  line-height: 0;
}
.bulk-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.bulk-check span {
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-card);
  border-radius: 5px;
  background: rgba(8, 14, 22, 0.78);
  transition: background 0.15s, border-color 0.15s;
}
.deal-card:hover .bulk-check span,
.bulk-check input:checked + span { border-color: var(--emerald-border); }
.bulk-check input:checked + span {
  background: var(--emerald-dark);
  background-image: linear-gradient(transparent, transparent);
  position: relative;
}
.bulk-check input:checked + span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #8ef0c3;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.bulk-check input:focus-visible + span { outline: 2px solid var(--emerald-border); outline-offset: 2px; }
.deal-card { position: relative; }

.bulk-bar {
  /* Pasek plywa nad lista, a nie wpycha sie nad nia: wczesniej jego pojawienie
     sie przesuwalo cala zawartosc w dol i wygladalo, jakby interfejs „skakal". */
  /* Wewnatrz ramy programu, nie na dole okna przegladarki. Aplikacja ma
     wygladac jak zwarty program (docelowo desktopowy), a pasek doklejony
     do krawedzi viewportu lamal te spojnosc. */
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: calc(100% - 48px);
  z-index: 60;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--emerald-border);
  border-radius: 12px;
  background: var(--emerald-dark);
}
.bulk-bar[hidden] { display: none; }
.bulk-count { font-size: 12px; color: var(--text-dim); }
.bulk-count b { color: var(--text-main); font-size: 13px; }
.bulk-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bulk-prio-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.bulk-sep { width: 1px; height: 18px; background: var(--border-card); margin: 0 2px; }
.bulk-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.bulk-btn:hover { background: rgba(255, 255, 255, 0.09); }
.bulk-btn.ghost { background: transparent; color: var(--text-dim); }
.bulk-btn.danger { border-color: #7a2f2f; color: #ff9a8a; }
.bulk-btn.danger:hover { background: #4a1d1d; }
.bulk-prio-1 { border-color: #f0883e; color: #f0883e; min-width: 28px; padding: 0; }
.bulk-prio-2 { border-color: #4a9eff; color: #4a9eff; min-width: 28px; padding: 0; }
.bulk-prio-3 { border-color: #7d8da1; color: #a9b6c7; min-width: 28px; padding: 0; }

/* --- Rozwijane menu eksportu ------------------------------------------- */
/* <details> zamiast własnego popovera: zamykanie klawiszem Esc, obsługa
   klawiatury i stan otwarcia dostajemy od przeglądarki za darmo. */
.export-menu { position: relative; }
.export-menu summary { list-style: none; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-card);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.export-trigger:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.04); }
.export-menu[open] .export-trigger {
  color: var(--text-main);
  border-color: var(--emerald-border);
}
.export-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 188px;
  padding: 5px;
  border: 1px solid var(--border-card);
  border-radius: 11px;
  background: #0e1620;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}
.export-item {
  display: block;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.export-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text-main); }

/* --- Histogram cen (12 miesięcy) --------------------------------------- */
.hist {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-card);
}
.hist-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.hist-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hist-range { font-size: 11px; font-weight: 700; color: var(--text-main); }
.hist-plot {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 74px;
}
.hist-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 4px;
}
.hist-bar {
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #2ee89a, #159c66);
  min-height: 2px;
}
/* Miesiąc bez odczytu dostaje kreskę u podstawy, nie zero — przerwa
   w obserwacji ma być widoczna, a nie udawać ceny równej zeru. */
.hist-col.empty .hist-bar {
  height: 2px !important;
  background: #2a3647;
}
.hist-tick {
  font-size: 8px;
  line-height: 1;
  text-align: center;
  color: #5e6e85;
  white-space: nowrap;
  overflow: hidden;
}
.hist-empty,
.hist-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-dim);
}

/* --- Prawy panel: nic nie wystaje poza kolumnę ------------------------- */
/* `<select>` dobiera szerokość do NAJDŁUŻSZEJ opcji, a „Dowolny dodruk,
   także Essentials / Hits / Platinum" ma 334 px przy kolumnie 312 px —
   pasek wychodził poza panel. Mierzone na żywo, nie szacowane. */
.detail-panel .item-actions-row { min-width: 0; }
.detail-panel .m-select,
.detail-panel .m-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  /* Strzałka listy nie może zasłonić tekstu po przycięciu. */
  text-overflow: ellipsis;
}

/* Wiersz sklepu bez adresu oferty: ta sama forma, ale bez udawania linku. */
.store-row-dead { cursor: default; opacity: 0.72; }
.store-row-dead:hover { background: transparent; }

/* --- Zestaw kontrolny --------------------------------------------------- */
.side-link {
  display: block;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.side-link:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.04); }

.control-page { padding: 28px 32px 40px; max-width: 980px; margin: 0 auto; }
.control-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.control-h1 { margin: 0 0 6px; font-size: 20px; color: var(--text-main); }
.control-lead { margin: 0; font-size: 13px; color: var(--text-dim); max-width: 60ch; }
.control-empty { font-size: 13px; color: var(--text-dim); }

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.score-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
/* Stracone dobre oferty to najdrozszy blad — ma rzucac sie w oczy. */
.score-cell.bad { border-color: #7a2f2f; }
.score-num { font-size: 26px; font-weight: 800; color: var(--text-main); }
.score-cell.bad .score-num { color: #ff9a8a; }
.score-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.score-note { font-size: 11px; color: var(--text-mute); }
.control-progress { font-size: 12px; color: var(--text-dim); margin: 12px 0 0; }

.gate-table { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 12px; }
.gate-table th {
  text-align: left;
  padding: 7px 10px;
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-card);
}
.gate-table td { padding: 7px 10px; color: var(--text-main); border-bottom: 1px solid rgba(255,255,255,0.04); }
.gate-table tr.gate-warn td { color: #ff9a8a; }

.control-queue { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.judge-card {
  padding: 14px;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.judge-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.judge-item { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.judge-gate {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.judge-gate.passed { background: var(--emerald-dark); color: #8ef0c3; }
.judge-gate.rejected { background: #2a1d1d; color: #ff9a8a; }
.judge-title { display: block; color: var(--text-main); font-size: 14px; font-weight: 700; text-decoration: none; }
.judge-title:hover { text-decoration: underline; }
.judge-meta { margin-top: 3px; font-size: 11px; color: var(--text-dim); }
.judge-desc {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-mute);
}
.judge-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.judge-btn {
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.judge-btn:hover { background: rgba(255, 255, 255, 0.1); }
.judge-dobra { border-color: var(--emerald-border); color: #8ef0c3; }
.judge-brak_zdjec { border-color: var(--emerald-border); color: #c9e8d9; }
.judge-photo { color: #f2c46d; }
.control-h2 { margin: 22px 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.score-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --- Priorytet prosto z karty ------------------------------------------ */
.prio-pick { position: relative; display: flex; align-items: center; }
button.prio-marker {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.prio-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 132px;
  padding: 4px;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: #0e1620;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}
.prio-pop[hidden] { display: none; }
.prio-pop-opt {
  padding: 7px 9px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.prio-pop-opt:hover { background: rgba(255, 255, 255, 0.07); color: var(--text-main); }
.prio-pop-1:hover { color: #f0883e; }
.prio-pop-2:hover { color: #4a9eff; }
.prio-pop-3:hover { color: #a9b6c7; }

/* --- Karta w trakcie ladowania ------------------------------------------ */
/* Jasnomietowa poswiata przesuwajaca sie po karcie: miniatura i cena dociagaja
   sie w tle, wiec zamiast pustego pola widac, ze praca trwa. */
.deal-card.is-loading { position: relative; overflow: hidden; }
.deal-card.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.5;
  background: linear-gradient(
    100deg,
    rgba(126, 240, 199, 0) 20%,
    rgba(126, 240, 199, 0.22) 50%,
    rgba(126, 240, 199, 0) 80%
  );
  background-size: 220% 100%;
  animation: vgpn-poswiata 1.25s ease-in-out infinite;
}
@keyframes vgpn-poswiata {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .deal-card.is-loading::after { animation: none; }
}

/* --- Wylogowanie: na dole, mniejsze, zeby nie kliknac przez przypadek --- */
.logout-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: transparent;
  color: var(--text-mute);
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.logout-btn:hover { opacity: 1; color: #ff9a8a; border-color: #7a2f2f; }

/* Radio w segmentach priorytetu (modale): sam znacznik jest niewidoczny,
   zaznaczenie pokazuje cały segment. */
.prio-seg .prio-opt { position: relative; cursor: pointer; }
.prio-seg .prio-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.prio-seg .prio-opt:has(input:checked) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}
.prio-seg .prio-opt-1:has(input:checked) { border-color: #f0883e; color: #f0883e; }
.prio-seg .prio-opt-2:has(input:checked) { border-color: #4a9eff; color: #4a9eff; }
.prio-seg .prio-opt-3:has(input:checked) { border-color: #7d8da1; color: #a9b6c7; }
.prio-seg .prio-opt input:focus-visible + span { outline: 2px solid var(--emerald-border); outline-offset: 3px; }

/* Globalny wyłącznik maili w lewej kolumnie. */
.alerts-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 8px 11px;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
}
.alerts-toggle:hover { color: var(--text-main); }

/* --- Moja Kolekcja (Filar III) ----------------------------------------- */
.col-page { padding: 28px 32px 40px; max-width: 1180px; margin: 0 auto; }
.col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.col-head-actions { display: flex; gap: 8px; }
.col-h1 { margin: 0 0 6px; font-size: 20px; color: var(--text-main); }
.col-lead { margin: 0; font-size: 13px; color: var(--text-dim); max-width: 62ch; }
.col-empty { font-size: 13px; color: var(--text-dim); margin: 18px 0; }

/* Portfel. Zysk na papierze i zrealizowany stoją obok siebie, ale są
   wyraźnie rozdzielone — mieszanie ich to najłatwiejszy sposób na
   oszukanie samego siebie co do wyniku. */
.pf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.pf-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.pf-num { font-size: 20px; font-weight: 800; color: var(--text-main); }
.pf-lab {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.pf-cell.up .pf-num { color: #2ee89a; }
.pf-cell.down .pf-num { color: #ff9a8a; }
.pf-cell.wide .pf-num { font-size: 16px; }

.col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-auto-rows: max-content;
  gap: 16px;
}
.own-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--border-card);
  border-radius: 15px;
  background: var(--bg-card);
}
.own-card .cover-wrap { width: 78px; height: 112px; }
.own-card.is-sold { opacity: 0.62; }
.own-info { display: flex; flex-direction: column; min-width: 0; }
.own-state {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}
/* Trzy liczby zamiast jednej: szybka sprzedaż, rynkowa, przy cierpliwości. */
.own-vals {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.own-vals b { font-size: 16px; color: var(--text-main); }
.own-thin, .own-bought, .own-sold {
  margin-top: 7px;
  font-size: 11px;
  color: var(--text-mute);
}
.own-sold { color: var(--text-dim); }
.own-pnl { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 800; }
.own-pnl.up { color: #2ee89a; }
.own-pnl.down { color: #ff9a8a; }
.own-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.own-actions .get-deal-btn { height: 30px; font-size: 11.5px; padding: 0 12px; width: auto; }
.own-btn {
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.own-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.05); }
.own-btn.danger { border-color: #7a2f2f; color: #ff9a8a; }
/* Kolekcja to drugi filar aplikacji, nie narzędzie pomocnicze — jej wejście
   ma być widoczne mocniej niż zestaw kontrolny. */
.side-link.primary-link { color: var(--text-main); border-color: var(--emerald-border); }
.side-link.primary-link:hover { background: var(--emerald-dark); }

/* Wynik importu: ile weszło i co odpadło — nad listą, nie w okienku,
   żeby dało się to przeczytać razem z efektem. */
.col-import-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--emerald-border);
  border-radius: 10px;
  background: var(--emerald-dark);
  font-size: 12px;
  color: var(--text-main);
}

/* --- Kafelki polskich sklepów ------------------------------------------- */
/* Każdy dostaje barwę własnej marki zamiast wspólnego granatu `tile-shop`.
   Pięć ma monogram w SVG, trzy zostają inicjałami — ich logotypy nie nadają
   się do odrysowania w 26 px (decyzja @Adriana). */
.tile-xgamecenter { background: #16210c; }
.tile-nogame      { background: #f4f4f7; }
.tile-xconsole    { background: #111111; }
.tile-gamefinity  { background: #10220a; }
.tile-loombard    { background: #3faa35; }

/* Inicjały w barwach marki. */
.tile-sprzedamgry { background: #0d0d0d; color: #ffffff; }
.tile-jaskinia    { background: #ececec; color: #151515; }
.tile-l66         { background: #f6cf1c; color: #1b2a8a; }
