/* ==========================================================================
   Panel Pielgrzymki 24 — internal operations console.
   One accent (gold) carries every interactive element; each tool keeps only a
   small identity tint on its glyph, so three merged apps read as one product.
   ========================================================================== */

:root {
  --bg: #0b0f16;
  --bg-glow-a: rgba(224, 169, 74, 0.10);
  --bg-glow-b: rgba(86, 182, 245, 0.07);
  --surface: #111721;
  --surface-2: #161d29;
  --surface-3: #1c2432;
  --line: #232c3b;
  --line-soft: #1a2231;

  --ink: #e8edf5;
  --ink-2: #97a4b8;
  --ink-3: #66738a;

  --accent: #e0a94a;
  --accent-hi: #f0bd63;
  --accent-ink: #1a1206;
  --accent-soft: rgba(224, 169, 74, 0.12);

  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --err: #f87171;
  --err-soft: rgba(248, 113, 113, 0.12);

  --wizz: #e6398f;
  --ryan: #f4c430;
  --book: #56b6f5;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --ring: 0 0 0 3px var(--accent-soft);
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }

/* An author `display` beats the UA sheet, so [hidden] needs to shout. */
[hidden] { display: none !important; }

html, body { height: 100%; }

html { scrollbar-color: var(--surface-3) transparent; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -8%, var(--bg-glow-a), transparent 60%),
    radial-gradient(760px 460px at 92% 4%, var(--bg-glow-b), transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Windows would otherwise paint bright system scrollbars over a dark page. */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #2b3648; background-clip: content-box; }

::selection { background: rgba(224, 169, 74, 0.3); color: #fff; }

a { color: var(--accent); }

kbd {
  display: inline-block;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.78em;
  line-height: 1.5;
}

/* ── Auth screens ──────────────────────────────────────────────────────── */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: min(410px, 100%);
  padding: 2.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-mark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.auth h1 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.auth p.sub {
  margin: 0 0 1.6rem;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.auth-tools {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

.auth-tool {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-3);
  font-size: 0.85rem;
}

/* ── Brand mark ────────────────────────────────────────────────────────── */

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), #b9752a);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  box-shadow: 0 6px 18px -8px rgba(224, 169, 74, 0.7);
}

.brand-name { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.brand-sub { color: var(--ink-3); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

label.field {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
}

input[type="password"],
input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

input::placeholder { color: var(--ink-3); }

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.72rem 1.15rem;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;   /* some buttons are anchors (downloads) */
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
  transition: background 0.15s, transform 0.08s, border-color 0.15s, color 0.15s;
}

.btn:hover:not(:disabled) { background: var(--accent-hi); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* Flat rather than a washed-out gold — a dimmed accent reads as "broken". */
.btn:disabled {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--ink-3);
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-3); }
.btn.ghost:disabled { background: transparent; }

.btn.block { width: 100%; }
.btn.sm { padding: 0.48rem 0.8rem; font-size: 0.85rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.icon-btn:hover { background: var(--err-soft); color: var(--err); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ── App shell ─────────────────────────────────────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--line-soft);
  background: rgba(10, 14, 20, 0.6);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-head { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.4rem; }

.nav-label {
  padding: 0 0.65rem;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav { display: grid; gap: 0.15rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.62rem 0.65rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item:focus-visible { outline: none; box-shadow: var(--ring); }

.nav-item.is-active {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--tint, var(--accent));
}
.nav-item.is-active:focus-visible { box-shadow: inset 2px 0 0 var(--tint, var(--accent)), var(--ring); }

.nav-item svg { flex: 0 0 18px; color: var(--tint, var(--ink-3)); }
.nav-item.is-active svg { color: var(--tint, var(--accent)); }

.nav-item[data-tint="wizz"] { --tint: var(--wizz); }
.nav-item[data-tint="ryan"] { --tint: var(--ryan); }
.nav-item[data-tint="book"] { --tint: var(--book); }

.sidebar-foot { margin-top: auto; display: grid; gap: 0.75rem; }

.health {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.78rem;
}

.health-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; color: var(--ink-3); }
.health-row b { color: var(--ink-2); font-weight: 600; }
.health-row span { display: inline-flex; align-items: center; gap: 0.4rem; }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--ink-3); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.off { background: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }

/* ── Workspace ─────────────────────────────────────────────────────────── */

.workspace { padding: 2.25rem 2.25rem 4rem; min-width: 0; }
.pane { display: none; max-width: 860px; }
/* The audit is a wide table — give it the room the other tools do not need. */
#pane-bilety { max-width: 1240px; }
.pane.is-active { display: block; animation: rise 0.22s ease-out; }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.pane-head { margin-bottom: 1.75rem; }

.pane-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pane-head h1 .tag {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--tint, var(--ink-2));
}

.pane-head p { margin: 0; color: var(--ink-2); max-width: 62ch; }

.card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 1rem; }

.card h2 {
  margin: 0 0 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.card h3 { margin: 1.4rem 0 0.6rem; font-size: 0.88rem; color: var(--ink-2); }
.card h3:first-child { margin-top: 0; }

/* ── Segmented control ─────────────────────────────────────────────────── */

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.25rem;
  padding: 0.28rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.seg-btn {
  border: 0;
  border-radius: 9px;
  padding: 0.58rem 0.7rem;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seg-btn:hover { color: var(--ink); }
.seg-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.seg-btn.is-active { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

.seg-help { margin: 0 0 1.1rem; color: var(--ink-3); font-size: 0.86rem; }

/* ── Dropzone ──────────────────────────────────────────────────────────── */

.dz {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.3rem;
  padding: 2.1rem 1.25rem;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dz:hover { border-color: var(--ink-3); }
.dz:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.dz.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dz.is-over .dz-icon { color: var(--accent); }
.dz.is-busy { opacity: 0.6; pointer-events: none; }

.dz input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dz-icon { color: var(--ink-3); margin-bottom: 0.2rem; transition: color 0.15s; }
.dz-title { font-weight: 650; }
.dz-hint { color: var(--ink-3); font-size: 0.85rem; }

.filelist { list-style: none; margin: 0.85rem 0 0; padding: 0; display: grid; gap: 0.35rem; }

.filelist li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.5rem 0.45rem 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.86rem;
}

.filelist .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .size { color: var(--ink-3); font-family: var(--mono); font-size: 0.78rem; white-space: nowrap; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.1rem; }

/* ── Status / progress ─────────────────────────────────────────────────── */

.status {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.88rem;
  color: var(--ink-2);
}

.status svg { flex: 0 0 16px; margin-top: 1px; }
.status.ok { border-color: rgba(74, 222, 128, 0.3); background: var(--ok-soft); color: var(--ok); }
.status.warn { border-color: rgba(251, 191, 36, 0.3); background: var(--warn-soft); color: var(--warn); }
.status.err { border-color: rgba(248, 113, 113, 0.3); background: var(--err-soft); color: var(--err); }

.spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.bar { height: 4px; margin-top: 0.85rem; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width 0.25s ease; }

/* ── Result grid (image tools) ─────────────────────────────────────────── */

.results {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  align-items: start;          /* an error card must not stretch to image height */
  margin-top: 1.1rem;
}

.result {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}

.result.is-err { border-color: rgba(248, 113, 113, 0.35); background: var(--err-soft); }

.result-shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: #05080d;
  cursor: zoom-in;
}
.result-shot:focus-visible { outline: none; box-shadow: inset var(--ring); }

.result-img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  object-position: top;
}

.result-meta { padding: 0.65rem 0.7rem; display: grid; gap: 0.45rem; }
.result-name { font-size: 0.85rem; font-weight: 600; word-break: break-word; }
.result-sub { font-size: 0.74rem; color: var(--ink-3); font-family: var(--mono); }
.result-err { font-size: 0.8rem; color: var(--err); }
.result-btns { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem; }

/* ── Lightbox ──────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(3px);
  animation: fade 0.15s ease-out;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox img {
  max-width: min(560px, 100%);
  max-height: 100%;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.lightbox-cap {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-2);
}

/* ── Booking result ────────────────────────────────────────────────────── */

.lookup-form { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.lookup-form .grow { flex: 0 1 240px; min-width: 160px; }

input.code {
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  padding: 0.95rem 1.1rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.stat { display: grid; gap: 0.1rem; }
.stat .k { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-weight: 650; font-variant-numeric: tabular-nums; }
.stat .v.big { font-size: 1.15rem; color: var(--accent); }
.stat.push { margin-left: auto; text-align: right; }

.pax {
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.16);
}

.pax + .pax { margin-top: 0.7rem; }

.pax-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line-soft);
}

.pax-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
}

.pax-name::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--book);
}

.pax.is-meta .pax-name::before { background: var(--ink-3); }

.pax-total { font-size: 0.88rem; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.pax-total b { color: var(--ink); font-weight: 650; }

.leg + .leg { margin-top: 0.85rem; }

.leg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.leg-head .meta { font-family: var(--mono); font-size: 0.75rem; font-weight: 400; color: var(--ink-3); }

table.items { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.items td { padding: 0.4rem 0 0.4rem 0.75rem; border-bottom: 1px solid var(--line-soft); }
table.items tr:last-child td { border-bottom: 0; }
table.items td:last-child { text-align: right; padding-left: 1rem; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
table.items td .qty { color: var(--ink-3); font-family: var(--mono); font-size: 0.78rem; margin-right: 0.35rem; }
table.items td .free { color: var(--ink-3); font-weight: 400; font-style: italic; }

.pay-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.88rem;
}

.pay-row:last-of-type { border-bottom: 0; }
.pay-row .when { color: var(--ink-3); font-size: 0.78rem; }
.pay-row .amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(224, 169, 74, 0.28);
}

.total .k { font-weight: 600; }
.total .v { font-size: 1.25rem; font-weight: 750; color: var(--accent); font-variant-numeric: tabular-nums; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.86rem;
}

.notice svg { flex: 0 0 16px; margin-top: 1px; }

details.raw { margin-top: 1.1rem; }
details.raw summary { cursor: pointer; color: var(--ink-3); font-size: 0.85rem; border-radius: 6px; }
details.raw summary:hover { color: var(--ink-2); }
details.raw summary:focus-visible { outline: none; box-shadow: var(--ring); }

pre {
  margin: 0.7rem 0 0;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: #070a0f;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
}

details.raw pre { max-height: 380px; overflow-y: auto; }

code { font-family: var(--mono); font-size: 0.86em; }
p code, li code, td code { padding: 0.1rem 0.35rem; border-radius: 5px; background: var(--surface-3); color: var(--accent); }

/* ── API reference ─────────────────────────────────────────────────────── */

.ep { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.4rem; flex-wrap: wrap; }

.verb {
  padding: 0.13rem 0.45rem;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.verb.post { background: rgba(86, 182, 245, 0.16); color: var(--book); }
.verb.get { background: var(--ok-soft); color: var(--ok); }

.ep code.path { font-size: 0.86rem; color: var(--ink); }
.ep .what { color: var(--ink-3); font-size: 0.82rem; }

.ep-group { display: grid; gap: 0.55rem; }
.ep-group + h3 { margin-top: 1.6rem; }

.snippet { position: relative; }
.snippet pre { padding-right: 5.5rem; }
.snippet .copy { position: absolute; top: 0.55rem; right: 0.55rem; }

.hints { margin: 1.1rem 0 0; padding-left: 1.15rem; color: var(--ink-3); font-size: 0.86rem; line-height: 1.6; }
.hints li { margin-bottom: 0.25rem; }
.hints strong { color: var(--ink-2); }

table.env { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.env th { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
table.env td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.env tr:last-child td { border-bottom: 0; }
table.env td:first-child { white-space: nowrap; }

.scroll-x { overflow-x: auto; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(10, 14, 20, 0.92);
    overflow-x: auto;
  }
  .sidebar-head .brand-text { display: none; }
  .nav-label { display: none; }
  .nav { grid-auto-flow: column; gap: 0.35rem; }
  .nav-item { white-space: nowrap; padding: 0.5rem 0.7rem; }
  .nav-item span { display: none; }
  .nav-item.is-active span { display: inline; }
  .sidebar-foot { margin-top: 0; margin-left: auto; }
  .health { display: none; }
  .workspace { padding: 1.5rem 1.1rem 3rem; }
  .pane-head h1 { font-size: 1.35rem; }
  .pax { padding: 0.8rem 0.75rem; }
  .pax-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .summary-strip { gap: 0.7rem 1.25rem; }
  .stat.push { margin-left: 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Ticket checker
   ========================================================================== */

:root { --check: #5ed3a8; }

.nav-item[data-tint="check"] { --tint: var(--check); }

/* ── Run controls ──────────────────────────────────────────────────────── */

.run-strip { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }

/* ── KPI row ───────────────────────────────────────────────────────────── */

.pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.pill {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.pill b { display: block; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pill span { display: block; margin-top: 0.1rem; font-size: 0.75rem; color: var(--ink-3); line-height: 1.3; }
.pill.ok { border-left-color: var(--ok); }
.pill.ok b { color: var(--ok); }
.pill.warn { border-left-color: var(--warn); }
.pill.warn b { color: var(--warn); }
.pill.crit { border-left-color: var(--err); }
.pill.crit b { color: var(--err); }
.pill.accent { border-left-color: var(--accent); }
.pill.accent b { color: var(--accent); }
.pill.zero { border-left-color: var(--line); }
.pill.zero b { color: var(--ink-3); }

/* ── Filters ───────────────────────────────────────────────────────────── */

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1.1rem; }
.filter-bar input[type="text"] { flex: 1 1 240px; min-width: 0; }

select {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

.fgroup + .fgroup { margin-top: 0.9rem; }
.fgroup h3 { margin: 0 0 0.45rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.83rem;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }
.chip[aria-pressed="true"] { background: var(--surface-3); border-color: var(--tone, var(--accent)); color: var(--ink); }
.chip .dot { background: var(--tone, var(--ink-3)); }
.chip .n { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-3); }
.chip .x { margin-left: 0.1rem; color: var(--ink-3); font-size: 1rem; line-height: 1; }
.chip .x:hover { color: var(--err); }
.chip.crit { --tone: var(--err); }
.chip.warn { --tone: var(--warn); }
.chip.info { --tone: var(--book); }
.chip.good { --tone: var(--ok); }

.prog-form { margin-top: 0.5rem; align-items: center; }
.prog-form select, .prog-form input[type="text"] { width: auto; padding: 0.4rem 0.6rem; font-size: 0.85rem; }
.prog-form input[type="text"] { width: 104px; }

.count { margin: 0 0 0.75rem; color: var(--ink-3); font-size: 0.85rem; }

/* ── Offer card ────────────────────────────────────────────────────────── */

.trip {
  margin-bottom: 0.6rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--sev, var(--line));
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.trip.s0 { --sev: var(--err); }
.trip.s1 { --sev: var(--warn); }
.trip.s2 { --sev: var(--book); }
.trip.s3 { --sev: var(--ok); }
.trip.off { opacity: 0.72; }

.trip > summary {
  display: grid;
  grid-template-columns: 132px minmax(0, 1.4fr) 152px 176px minmax(0, 0.9fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}
.trip > summary::-webkit-details-marker { display: none; }
.trip > summary:hover { background: var(--surface-2); }
.trip > summary:focus-visible { outline: none; box-shadow: inset var(--ring); }

.trip .route { font-family: var(--mono); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }
.trip .sub { margin-top: 0.15rem; font-size: 0.75rem; color: var(--ink-3); }
.trip .nazwa { font-weight: 600; font-size: 0.92rem; }
.trip .nazwa small { display: block; margin-top: 0.15rem; font-weight: 400; font-size: 0.76rem; color: var(--ink-3); }
.trip .off-tag { color: var(--warn); font-weight: 600; }

.lab { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.2rem; }
.when { display: grid; gap: 0.1rem; font-family: var(--mono); font-size: 0.78rem; }
.when .leg { display: flex; align-items: baseline; gap: 0.4rem; }
.when .leg em { font-style: normal; color: var(--ink-3); min-width: 42px; }
.when .leg i { font-style: normal; color: var(--ink-3); }

.ring { display: flex; align-items: center; gap: 0.6rem; }
.ring svg { flex: 0 0 54px; }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke: var(--ok); stroke-linecap: round; }
.ring .fg.mid { stroke: var(--warn); }
.ring .fg.hi { stroke: var(--err); }
.ring .na-c { stroke: var(--line); stroke-dasharray: 4 5; }
.ring text { fill: var(--ink); font-family: var(--mono); font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.ring .na-t { fill: var(--ink-3); font-size: 11px; font-weight: 500; }
.rinfo { display: grid; gap: 0.1rem; font-size: 0.76rem; color: var(--ink-3); min-width: 0; }
.rinfo b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rinfo b.neg { color: var(--err); }

.tix { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tix span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--ink-2);
}
.tix .t-ok { background: var(--ok-soft); color: var(--ok); }
.tix .t-pay { background: var(--err-soft); color: var(--err); }
.tix .t-no { background: var(--warn-soft); color: var(--warn); }
.tix .t-warn { background: var(--warn-soft); color: var(--warn); }

.chev { color: var(--ink-3); transition: transform 0.18s; }
.trip[open] .chev { transform: rotate(90deg); }

.trip .body { padding: 0 1rem 1rem; border-top: 1px solid var(--line-soft); }
.sect { margin-top: 1rem; }
.sect h3 { margin: 0 0 0.5rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.mini { font-size: 0.78rem; color: var(--ink-3); margin: 0.4rem 0 0; }

.probs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.probs li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  font-size: 0.85rem;
}
.probs li b {
  flex: 0 0 auto;
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.probs li.krytyczny { border-color: rgba(248, 113, 113, 0.3); }
.probs li.krytyczny b { background: var(--err-soft); color: var(--err); }
.probs li.ostrzezenie { border-color: rgba(251, 191, 36, 0.28); }
.probs li.ostrzezenie b { background: var(--warn-soft); color: var(--warn); }
.probs li.info b { background: rgba(86, 182, 245, 0.14); color: var(--book); }

.tbl { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.tbl th {
  text-align: left;
  padding: 0.5rem 0.65rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tbl td { padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .m { font-family: var(--mono); white-space: nowrap; }
.tbl .r { text-align: right; }
.tbl .g { color: var(--ink-3); }
.tbl tr.zle { background: rgba(248, 113, 113, 0.05); }
.tbl .dok { color: var(--ok); }
.tbl .dzly { color: var(--warn); }

.tag {
  display: inline-block;
  padding: 0.1rem 0.42rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-3);
  color: var(--ink-2);
}
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.crit { background: var(--err-soft); color: var(--err); }

.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.legenda { margin: 1.25rem 0 0; font-size: 0.78rem; color: var(--ink-3); line-height: 1.6; }

@media (max-width: 900px) {
  .trip > summary { grid-template-columns: 1fr; gap: 0.6rem; }
  .trip .chev { display: none; }
  .pills { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}

/* ── Settings ──────────────────────────────────────────────────────────── */

.set-row { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.set-row:last-child { border-bottom: 0; padding-bottom: 0; }
.set-row label.field { display: flex; align-items: center; gap: 0.5rem; }
.set-line { display: flex; gap: 0.5rem; align-items: center; }
.set-line input { flex: 1 1 auto; min-width: 0; }
.set-line select { flex: 0 1 260px; }
.set-help { margin-top: 0.4rem; font-size: 0.82rem; color: var(--ink-3); line-height: 1.5; }
.set-key {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.08rem 0.4rem;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 0.72rem;
}
