/* Wspólna kolorystyka strony – spójna z wtyczką Pomocnik Allegro
   (pomarańczowy gradient w nagłówku, różowy akcent, szare tło, białe karty).
   Ładowany jako ostatni arkusz na każdej stronie. */
:root {
  --orange: #ff5a00;
  --orange-dark: #e04f00;
  --pink: #ff2d95;
  --accent: var(--orange);
  --bg: #f5f5f5;
  --card: #ffffff;
  --line: #ececec;
  --text: #222222;
  --muted: #767676;
  --deal: #e0006f;            /* róż z wtyczki, przyciemniony do czytelnego tekstu */
  --deal-bg: #ffe6f2;
  --chart: var(--orange);
  --head: linear-gradient(135deg, var(--orange), var(--orange-dark));
  --shadow: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-hover: 0 2px 8px rgba(0, 0, 0, .08);
  /* nazwy z panel.css */
  --surface-1: var(--card);
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --series-1: var(--orange);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --card: #1d1d1f;
    --line: #2d2d30;
    --text: #efefef;
    --muted: #a0a0a0;
    --deal: #ff5cab;
    --deal-bg: #3a1328;
    --head: linear-gradient(135deg, #e85200, #b94100);
  }
}

/* --- nagłówek jak w okienku wtyczki --- */
header.top, body > header {
  background: var(--head);
  color: #fff;
  border-bottom: 0;
}
.brand, body > header h1 { color: #fff; display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.brand small { display: block; font-size: 11px; font-weight: 400; opacity: .85; margin-top: -2px; }
.dot { background: rgba(255, 255, 255, .45) !important; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.dot.on { background: #fff !important; }

header nav a, body > header .tabs a {
  color: rgba(255, 255, 255, .85) !important;
  background: transparent;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
header nav a:hover, body > header .tabs a:hover { color: #fff !important; background: rgba(255, 255, 255, .15); }
header nav a.on, body > header .tabs a.on { color: #fff !important; background: rgba(255, 255, 255, .25); }

/* statystyki i przyciski panelu na pomarańczowym tle */
body > header .stats span { color: rgba(255, 255, 255, .8); }
body > header .stats b { color: #fff; }
body > header .actions button {
  background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .35);
}
body > header .actions button:hover { background: rgba(255, 255, 255, .3); border-color: #fff; }
body > header .actions button.danger.armed { background: #fff; color: #b3261e; border-color: #fff; }

/* pole "link do oferty" w nagłówku */
header .find input {
  background: #fff; color: #222; border: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
header .find input::placeholder { color: #8a8a8a; }
header .find input:focus { outline: 2px solid #fff; outline-offset: 1px; }
header .find button { background: #fff; color: var(--orange-dark); }
header .find button:hover { filter: none; background: #fff3eb; }
header .find-msg { color: #fff; font-weight: 600; }

/* --- elementy w kolorach wtyczki --- */
input:focus, select:focus { border-color: var(--orange); outline: 2px solid color-mix(in srgb, var(--orange) 30%, transparent); outline-offset: 0; }
.chip:has(input:checked) { border-color: var(--orange); color: var(--orange-dark); background: #fff3eb; }
.seg button.on { background: var(--head); }
.node.sel { background: #fff3eb; color: var(--orange-dark); }
@media (prefers-color-scheme: dark) {
  .chip:has(input:checked), .node.sel { background: #3a1e0d; color: #ff8a4c; }
}
.card, .grid > a { border-radius: 12px; }
.pv-hist .series { stroke: var(--chart); }
.pv-hist .mark { fill: var(--chart); }
.go { background: var(--head) !important; }

/* przeceny: róż z wtyczki */
.off { background: #e0006f; box-shadow: none; }
.spark circle { fill: var(--pink); }

/* Zdjęcia ofert: zawsze ten sam kwadrat, zdjęcie wpasowane w środek (nie rozpycha karty) */
.photo { aspect-ratio: 1 / 1; height: auto; min-height: 0; overflow: hidden; padding: 0 !important; }
.photo img {
  position: absolute; inset: 14px;
  width: calc(100% - 28px); height: calc(100% - 28px);
  object-fit: contain; object-position: center;
}
.photo .none { position: absolute; inset: 0; display: grid; place-items: center; }
