/* Prosty, płaski UI – fonty systemowe, bez gradientów tła */
:root {
  --bg: #111113;
  --bg-soft: #18181b;
  --bg-card: #1c1c1f;
  --bg-elev: #222226;
  --line: #2e2e33;
  --line-soft: #26262b;
  --text: #ececed;
  --text-soft: #a1a1a6;
  --text-mute: #6e6e75;
  --accent: #5b9fff;
  --accent-dim: rgba(91, 159, 255, .14);
  --warn: #e8a05c;
  --ok: #4cba87;
  --err: #e86a76;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --radius: 8px;
  --ease: ease;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
code {
  font-family: var(--mono); font-size: .88em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .1em .35em; border-radius: 4px;
}

.wrap {
  /* full-width — cała szerokość przeglądarki */
  width: 100%; max-width: none; margin: 0; padding: 0 20px 48px;
}

/* ── topbar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  width: 100%; max-width: none; margin: 0; padding: 12px 20px;
}
.nav-portals { flex: 0 0 auto; }
.nav-sub { flex: 1 1 auto; }
.brand {
  font-size: 1.15rem; font-weight: 650;
  letter-spacing: -0.02em; line-height: 1;
  display: flex; align-items: baseline; gap: 8px;
}
.brand span {
  color: var(--text-mute); font-size: .7rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
}
.nav { display: flex; gap: 2px; flex: 1; }
.nav a {
  padding: 7px 12px; border-radius: 6px; color: var(--text-soft);
  font-size: .9rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--bg-elev); }
.nav a.active {
  color: var(--text);
  background: var(--bg-elev);
  font-weight: 600;
}

.live-chip {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--text-soft);
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-mute); flex-shrink: 0;
}
.dot.on { background: var(--ok); }

/* ── page head ──────────────────────────────────────────── */
.page-head { padding: 28px 0 6px; }
.page-kicker {
  font-size: 12px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-mute); margin: 0 0 8px;
}
h1 {
  font-weight: 650; font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  margin: 0 0 8px; letter-spacing: -0.02em; line-height: 1.2;
}
.sub {
  color: var(--text-soft); margin: 0; max-width: 60ch;
  line-height: 1.5; font-size: .95rem;
}

/* ── panels / stats ─────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.grid-stats {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 24px 0 16px;
}
.stat { padding: 14px 16px; }
.stat .label {
  font-size: 11px; color: var(--text-mute); font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em;
}
.stat .value {
  font-size: 1.5rem; margin-top: 6px;
  font-weight: 650; letter-spacing: -0.02em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .value.accent { color: var(--accent); }

/* ── controls ───────────────────────────────────────────── */
.controls-block { margin-bottom: 16px; }
.controls-label {
  font-size: 11px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-mute); margin: 0 0 8px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--bg-elev);
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  font-size: .9rem; font-weight: 500;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--text-mute); background: #2a2a2f; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); color: #0a0a0c; border-color: var(--accent); font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn-danger {
  border-color: color-mix(in srgb, var(--err) 40%, var(--line));
  color: var(--err); background: color-mix(in srgb, var(--err) 8%, var(--bg-elev));
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.input, .select {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; min-width: 0;
}
.input:focus, .select:focus {
  outline: none; border-color: var(--accent);
}
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  margin: 18px 0 16px; padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 140px; flex: 1; }
.field label {
  font-size: 11px; color: var(--text-mute); font-weight: 500;
  letter-spacing: .03em; text-transform: uppercase;
}
.field.grow { flex: 2; min-width: 220px; }

/* ── progress ───────────────────────────────────────────── */
.progress-wrap { margin-top: 12px; }
.bar {
  height: 6px; border-radius: 3px; background: var(--bg);
  overflow: hidden; border: 1px solid var(--line-soft);
}
.bar > i {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
  transition: width .3s ease;
}
.meta-row {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--text-soft); margin-top: 8px;
}
.logbox {
  margin-top: 12px; max-height: 280px; overflow: auto;
  background: #0c0c0e; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.55;
  color: var(--text-soft); white-space: pre-wrap;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.logbox .err { color: var(--err); }
.logbox .ok { color: var(--ok); }

.workers-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  margin: 16px 0 8px;
}
.worker-card {
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line);
}
.worker-card.running { border-color: var(--accent); }
.worker-card.paused { border-color: var(--warn); }
.paste-box {
  width: 100%; min-height: 140px; resize: vertical;
  font-family: var(--mono); font-size: 12px; line-height: 1.45;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 14px;
}

/* ── dashboard layout (turbo / portale) ─────────────────── */
.page-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.page-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-stats-compact { margin-top: 16px; }
.dash-layout {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  align-items: start; margin-top: 4px;
}
.dash-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-side { min-width: 0; }
.sticky-side { position: sticky; top: 72px; }
.tool-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tool-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.tool-card-focus {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--bg-card)), var(--bg-card));
}
.tool-card-muted { opacity: .92; }
.tool-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.tool-card-title {
  margin: 0; font-size: 1.15rem; font-weight: 650; letter-spacing: -.02em;
}
.tool-card-foot { display: flex; flex-direction: column; gap: 10px; }
.tool-meta {
  margin: 0; font-size: 13px; color: var(--text-soft); line-height: 1.4;
}
.tool-meta strong { color: var(--text); font-weight: 600; }
.mono-path {
  font-family: var(--mono); font-size: 11px; color: var(--text-mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center;
  padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 500; color: var(--accent);
  background: var(--accent-dim); white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.pill.muted { color: var(--text-soft); background: var(--bg-elev); }
.lane-ctrls {
  display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.lane-ctrls .btn {
  border: 0; border-radius: 0; border-right: 1px solid var(--line);
  padding: 6px 10px; background: var(--bg);
}
.lane-ctrls .btn:last-child { border-right: 0; }
.btn-sm { font-size: .82rem; padding: 6px 10px; }
.check-row, .check {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center;
  font-size: 13px; color: var(--text-soft);
}
.check { gap: 7px; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); }
.inline-form.tight { margin: 0; gap: 12px; }
.worker-stack { display: flex; flex-direction: column; gap: 8px; }
.worker-stack .worker-card { background: var(--bg-soft); }
.worker-lane-ctrls { margin-top: 10px; width: 100%; }
.worker-lane-ctrls .btn { flex: 1; justify-content: center; }
.worker-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; margin-bottom: 8px;
}
.lane-counts {
  margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--text-mute);
}
.log-panel { margin-top: 16px; }
.log-panel-inline { margin-top: 0; } /* w lewej kolumnie — gap z dash-main wystarczy */
.log-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  margin-bottom: 8px; font-size: 13px;
}
.log-head span { font-family: var(--mono); font-size: 12px; color: var(--text-mute); }
.prog-log {
  max-height: 220px; overflow: auto;
  background: #0c0c0e; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; font-family: var(--mono); font-size: 12px; line-height: 1.55;
  color: var(--text-soft);
}
.prog-log .err { color: var(--err); }
.prog-log .ok { color: var(--ok); }
.dash-main .prog-log { max-height: 180px; } /* trochę niższy nad skanem */

@media (max-width: 1100px) {
  .dash-layout { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .tool-grid { grid-template-columns: 1fr; }
}
.worker-counts {
  margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--text-mute);
}
.res-field { min-width: 220px; }

/* mega prosty combo (input + menu) */
.combo { position: relative; }
.combo-face {
  width: 100%;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e75' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}
.combo.open .combo-face { border-color: var(--accent); }
.combo-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50;
  max-height: 240px; overflow: auto;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.combo-opt {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 7px 8px; border: 0; border-radius: 4px;
  background: transparent; color: var(--text);
  font: inherit; cursor: pointer;
}
.combo-opt:hover { background: var(--bg-elev); }
.combo-opt.on { background: var(--accent-dim); color: var(--accent); }
.combo-opt .tick {
  width: 14px; font-family: var(--mono); font-size: 11px; color: var(--accent);
}
.combo-empty {
  padding: 10px 8px; font-size: 12px; color: var(--text-mute);
}
.combo-clear {
  display: block; width: 100%; text-align: left;
  padding: 7px 8px; margin-bottom: 2px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 4px;
  background: transparent; color: var(--text-mute);
  font: inherit; font-size: 12px; cursor: pointer;
}
.combo-clear:hover { color: var(--text); background: var(--bg-elev); }

.dual-lanes {
  display: grid; gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
}
.lane {
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line);
}
.lane-head {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-soft); margin-bottom: 8px; font-weight: 500;
}
.lane-meta {
  margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--text-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── grids / cards ──────────────────────────────────────── */
.file-grid, .album-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; position: relative;
  cursor: pointer;
  transition: border-color .15s;
}
.card:hover { border-color: var(--text-mute); }
.card[data-album-href] { cursor: pointer; }
.card.is-pending { border-color: color-mix(in srgb, var(--warn) 25%, var(--line)); }
.card.is-done { border-color: color-mix(in srgb, var(--ok) 22%, var(--line)); }
.scan-bar {
  height: 3px; border-radius: 2px; background: var(--bg);
  margin: 8px 0 6px; overflow: hidden;
}
.scan-bar > i {
  display: block; height: 100%; width: 0;
  background: var(--accent); transition: width .2s ease;
}
.card.is-done .scan-bar > i { background: var(--ok); }
.tag.status-listed { background: #2a2a18; color: #d4c46a; border-color: transparent; }
.tag.status-scraped { background: #1a2a22; color: #8ed9b0; border-color: transparent; }
.tag.status-stale { background: #2a2218; color: #ffb07e; border-color: transparent; }
.tag.status-partial { background: #2a2418; color: #e0c48a; border-color: transparent; }
.tag.status-error { background: #2a1c1c; color: #ff9b9b; border-color: transparent; }
.card .card-check { cursor: default; }
.card .thumb {
  aspect-ratio: 4/3; background: var(--bg-elev);
  display: block; width: 100%; object-fit: cover;
}
.card .thumb-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-mute);
  background:
    linear-gradient(135deg, transparent 46%, var(--line-soft) 46%, var(--line-soft) 54%, transparent 54%),
    linear-gradient(45deg, transparent 46%, var(--line-soft) 46%, var(--line-soft) 54%, transparent 54%),
    var(--bg-elev);
  background-size: 14px 14px, 14px 14px, auto;
  border-bottom: 1px solid var(--line-soft);
  user-select: none;
}
.card .thumb-ph-ico {
  width: 36px; height: 28px; border-radius: 4px;
  border: 1.5px solid var(--text-mute); opacity: .55;
  position: relative; box-sizing: border-box;
}
.card .thumb-ph-ico::before {
  /* „góra” jak ramka zdjęcia / play-ish */
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border: 1.5px solid var(--text-mute); border-radius: 50%;
  box-sizing: border-box;
}
.card .thumb-ph-label {
  font-size: 10px; font-family: var(--mono); letter-spacing: .02em;
  text-transform: lowercase; opacity: .85;
}
.card .body { padding: 10px 12px 12px; }
.card .title {
  font-size: 13px; line-height: 1.35; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em;
}
.card .meta {
  margin-top: 8px; font-size: 11px; font-family: var(--mono);
  color: var(--text-mute); display: flex; align-items: center; gap: 6px;
}
.card .meta-chips {
  flex-wrap: wrap; justify-content: flex-start; width: 100%;
}
.card .meta-foot {
  justify-content: space-between; gap: 8px; width: 100%;
}
.card .meta-media {
  display: block; width: 100%; margin-top: 8px;
  font-size: 13px; font-weight: 600; font-family: var(--mono);
  color: var(--text); line-height: 1.3; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .meta-stat {
  display: block; width: 100%;
  margin-top: 4px; font-size: 11px; font-family: var(--mono);
  color: var(--text-mute); line-height: 1.35; white-space: nowrap;
}
.tag {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; padding: 0 7px; border-radius: 4px;
  font-size: 10px; font-family: var(--mono); font-weight: 500;
  line-height: 1; background: var(--bg-elev); border: 1px solid var(--line);
  box-sizing: border-box; white-space: nowrap;
}
.tag-source { text-transform: lowercase; }
.tag-source.tag-turbo { background: #1a2430; color: #8ec8ff; border-color: transparent; }
.tag-source.tag-bunkr { background: #242428; color: #c8c8d0; border-color: transparent; }
.tag.Video { background: #1a2430; color: #8ec8ff; border-color: transparent; }
.tag.Image { background: #1a2a22; color: #8ed9b0; border-color: transparent; }
.tag.File { background: #242428; color: #c8c8d0; border-color: transparent; }
.tag.Audio { background: #2a2218; color: #ffb07e; border-color: transparent; }
.tag.ZIP, .tag.RAR, .tag.7Z, .tag.Archive { background: #2a2418; color: #e0c48a; border-color: transparent; }
.tag.PDF { background: #2a1c1c; color: #ff9b9b; border-color: transparent; }
.tag.Text, .tag.Document { background: #1c2430; color: #9bb8ff; border-color: transparent; }

/* checkbox na karcie (nie mylić z .check z formularzy dashboardu) */
.card-check {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 16px; height: 16px; accent-color: var(--accent);
}
.badge-dl {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: #143528; color: var(--ok);
  font-size: 10px; font-family: var(--mono); padding: 2px 6px; border-radius: 4px;
}
.badge-media {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 10px; font-family: var(--mono); padding: 2px 6px; border-radius: 4px;
}
.badge-dl + .badge-media { top: 30px; }
.badge-media.ok { background: #143528; color: var(--ok); }
.badge-media.bad { background: #3a1820; color: var(--err); }
.card.is-bad { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.card.is-bad .thumb { filter: grayscale(.3); }

.toolbar {
  position: sticky; bottom: 16px; z-index: 30;
  display: none; gap: 12px; align-items: center; justify-content: space-between;
  margin-top: 16px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.toolbar.show { display: flex; }

.empty {
  padding: 48px 20px; text-align: center; color: var(--text-mute);
  border: 1px dashed var(--line); border-radius: var(--radius); margin-top: 12px;
  background: var(--bg-soft);
}

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.hint { font-size: 13px; color: var(--text-mute); margin: 10px 0 0; line-height: 1.5; max-width: 80ch; }

.scroll-sentinel { height: 1px; margin-top: 8px; }
.scroll-status {
  text-align: center; font-family: var(--mono); font-size: 12px;
  color: var(--text-mute); padding: 16px 8px 8px; min-height: 1.5em;
}
.scroll-status.loading::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px;
  border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .7s linear infinite; vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── modal ──────────────────────────────────────────────── */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 20px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .72);
}
.modal-panel {
  position: relative; z-index: 1;
  width: min(960px, 100%); max-height: min(92vh, 900px);
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.modal-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.modal-media {
  background: #000; flex: 1 1 auto; min-height: 180px;
  display: flex; flex-direction: column; align-items: stretch;
  justify-content: center; overflow: hidden;
}
.modal-media img, .modal-media video, .modal-media audio {
  max-width: 100%; display: block; margin: 0 auto;
}
/* zostaw miejsce na filmstrip + pasek meta z przyciskami (~200px) */
.modal-media video {
  width: 100%; height: auto;
  max-height: min(52vh, calc(92vh - 220px));
  object-fit: contain; background: #000;
}
.modal-media .preview-fallback {
  padding: 40px 24px; text-align: center; color: var(--text-soft);
}
.modal-media .preview-grid {
  display: block; width: 100%; max-height: 96px; object-fit: contain;
  flex-shrink: 0; background: #0a0a0c; border-bottom: 1px solid var(--line);
}
.modal-meta {
  flex-shrink: 0; padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-card);
}
.modal-title {
  font-size: 1.05rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.modal-sub { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--text-mute); }

.cat-strip { margin-top: 16px; }
.cat-strip .label {
  font-size: 11px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-mute); margin-bottom: 10px;
}

/* CDN status w topbarze */
.cdn-chip {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-soft);
  white-space: nowrap;
}
.cdn-chip .cdn-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute);
}
.cdn-chip.up { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); color: var(--ok); }
.cdn-chip.up .cdn-dot { background: var(--ok); }
.cdn-chip.down { border-color: color-mix(in srgb, var(--err) 40%, var(--line)); color: var(--err); }
.cdn-chip.down .cdn-dot { background: var(--err); }

.cdn-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cdn-table th, .cdn-table td {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.cdn-table th { color: var(--text-mute); font-weight: 500; font-size: 11px; text-transform: uppercase; }
.cdn-table tr.open td { color: var(--err); }
.cdn-table .muted { color: var(--text-mute); font-size: 12px; }

/* hub */
.hub-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px;
}
.hub-card {
  display: block; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 18px; transition: border-color .15s, background .15s;
}
.hub-card:hover { border-color: var(--accent); background: var(--bg-elev); }
.hub-label {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute);
}
.hub-card h2 { margin: 6px 0 8px; font-size: 1.6rem; letter-spacing: -.02em; }
.hub-card p { margin: 0; color: var(--text-soft); font-size: .95rem; }
.hub-stats {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--text-soft);
}
.hub-stats span { color: var(--text); font-weight: 650; font-family: var(--mono); }
.worker-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0;
}

@media (max-width: 720px) {
  .wrap { padding: 0 14px 40px; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .hub-grid { grid-template-columns: 1fr; }
  .live-chip { max-width: 100%; }
  h1 { font-size: 1.4rem; }
  .dual-lanes { grid-template-columns: 1fr; }
  .workers-grid { grid-template-columns: 1fr; }
}
