/* KINGtask — wyglad przejety z Rejestratora czasu pracy King Promotion (decyzja Konrada, 2026-11-15):
   tokeny, czcionki (Inter/Fraunces/JetBrains Mono) i klasy 1:1 z
   /Volumes/KING PROMOTION/RejestratorCzasuPracyKING/server/public/{css/style.css,app/app.css,css/fonts.css}.
   Domyslnie ciemny jak w Rejestratorze; jasny wariant (prefers-color-scheme: light) na bazie palety z jego
   @media print, bo byl juz gotowy i tani do przejecia. Uklad strony (boczny pasek/dolny pasek mobilny) w nav.js. */
@import url('/css/fonts.css');

[hidden] { display: none !important; }

:root {
  --bg: #080b12; --surface: #0d111a; --surface-2: #131826; --surface-3: #1a2032;
  --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.16);
  --text: #f2f5f9; --muted: #98a2b3; --faint: #667085;
  --mint: #75dab4; --mint-ink: #062218; --mint-dim: rgba(117,218,180,.14); --mint-glow: rgba(117,218,180,.35);
  --warn: #ffd23f; --warn-dim: rgba(255,210,63,.14);
  --danger: #ff6b7a; --danger-dim: rgba(255,107,122,.14);
  --info: #37c4dc; --info-dim: rgba(55,196,220,.14);
  --violet: #b9a3ff; --violet-dim: rgba(185,163,255,.14);
  --radius: 14px; --radius-sm: 9px; --radius-lg: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* nazwy uzywane w starszym kodzie strony (etapy 1-7) - aliasy do tokenow powyzej, zeby nie trzeba bylo
     przepisywac kazdego selektora na nowe nazwy */
  --navy: var(--text); --yellow: var(--warn); --ink: var(--text); --ink-2: var(--muted);
  --card: var(--surface);
  /* kolory maszyn (Tablica produkcji, styl Asany - makieta docs/makiety/tablica-asana.html), jedno miejsce;
     stanowisko nieznane (brak kodu w tej liscie) -> --m-BRAK (szary) */
  --m-EPSON: #4a90e2; --m-SUMMA: #9aa3b2; --m-CNC: #7bc96f; --m-DTF: #f0605a; --m-LASER: #f39a7f;
  --m-HAFT: #f5c542; --m-OKLEJANIE: #f5a623; --m-FIBER: #b38cf5; --m-MONTAZ: #37c4dc; --m-BRAK: #667085;
}
@media (prefers-color-scheme: light) {
  /* paleta z @media print Rejestratora (gotowa, jasna, bez dodatkowego projektowania) */
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #f4f6f8; --surface-3: #eef1f4;
    --text: #111; --muted: #444; --faint: #777;
    --line: #dfe3e8; --line-strong: #c7ccd3;
    --mint: #0a7d57; --mint-ink: #eafff6; --mint-dim: #dff5ec; --mint-glow: rgba(10,125,87,.25);
    --warn: #8a5a00; --warn-dim: #fff1cc;
    --danger: #b3202f; --danger-dim: #fde3e6;
    --info: #0a6f86; --info-dim: #dcf3f8;
    --violet: #5b3fc9; --violet-dim: #ece6ff;
    --navy: var(--text); --ink: var(--text); --ink-2: var(--muted); --card: var(--surface);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
@media (prefers-color-scheme: light) { html { color-scheme: light; } }
body {
  margin: 0; min-height: 100vh; font: 400 15px/1.5 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(24px, 6vw, 30px); overflow-wrap: anywhere; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
a { color: var(--mint); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.yellow-bar { display: block; width: 40px; height: 5px; background: var(--warn); margin-bottom: 14px; border-radius: 1px; }
p { margin: 0 0 6px; }

/* uklad strony przed/bez nav.js (login, PIN, zmiana hasla) */
.wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.wrap-wide { padding: 24px 16px; max-width: 900px; margin: 0 auto; }
.wrap-full { padding: 16px; max-width: 1280px; margin: 0 auto; }

/* karta (styl Rejestratora: .card) */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; max-width: 420px; width: 100%;
}
.card.card-wide { max-width: none; }

/* formularze */
label { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"],
select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--mint); outline: none; box-shadow: 0 0 0 3px var(--mint-dim); }
.inline-check { width: auto; min-height: auto; display: inline; accent-color: var(--mint); }

/* przyciski (styl Rejestratora: .btn / .btn.primary / .btn.ghost / .btn.sm / .btn.danger).
   Bare .btn w starszym kodzie stron (ETAP1-7) oznaczal glowna akcje formularza - wyglada jak .primary.
   .btn.secondary to dawny "zwykly" przycisk - wyglada jak bazowy .btn Rejestratora (szare obramowanie). */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; font-weight: 500; width: auto; margin: 0; transition: background .15s, border-color .15s, transform .05s;
}
button:hover, .btn:hover { background: var(--surface-3); border-color: var(--line-strong); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled, .btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
button[type="submit"], .btn.primary, .btn.main {
  background: var(--mint); border-color: var(--mint); color: var(--mint-ink); font-weight: 600;
}
button[type="submit"]:hover, .btn.primary:hover, .btn.main:hover { background: var(--mint-glow); }
.btn.secondary, .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255,107,122,.35); background: transparent; }
.btn.danger:hover { background: var(--danger-dim); }
.btn.sm, .btn.big.sm { min-height: 32px; padding: 0 11px; font-size: 13px; }
.btn.big { min-height: 46px; padding: 0 20px; font-size: 15px; }
button.toggle-link, .toggle-link {
  display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); background: none;
  border: none; text-decoration: underline; cursor: pointer; padding: 4px; width: auto; min-height: auto;
}
.error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 1.2em; }

/* klawiatura PIN */
.pin-display { font: 600 28px var(--mono); letter-spacing: 6px; text-align: center; min-height: 1.4em; margin: 10px 0; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-pad button { margin: 0; font-size: 22px; padding: 16px 0; min-height: auto; }

/* strona glowna / admin / listy ogolne */
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.actions button { width: auto; margin: 2px 4px 2px 0; padding: 0 10px; font-size: 13px; min-height: 32px; }
.copy-box { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-family: var(--mono); font-size: 15px; word-break: break-all; margin: 10px 0; }

/* modal/overlay (styl Rejestratora) - uzywane przez okienka "krok wymaga danych" (ETAP A pkt 3) */
.modal-backdrop, .overlay {
  position: fixed; inset: 0; height: 100vh; background: rgba(3,5,9,.72); display: flex; padding: 16px; z-index: 50;
  overflow-y: auto; align-items: center; justify-content: center;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; width: min(480px, 100%);
  margin: auto; padding: 24px; display: grid; gap: 14px; align-content: start;
}
.modal h2 { font-size: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* toast (potwierdzenia krotkich akcji) */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-3);
  border: 1px solid var(--line-strong); padding: 12px 18px; border-radius: 12px; z-index: 80;
  box-shadow: 0 10px 40px rgba(0,0,0,.35); max-width: 90vw;
}
.toast.err { border-color: var(--danger); color: var(--danger); }
.toast.ok { border-color: var(--mint); }

/* ===================== UKLAD POWLOKI (boczny pasek / dolny pasek mobilny) — nav.js ===================== */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
/* ETAP D: bez tego szeroka tresc (np. tabela) rozpycha caly uklad w poziomie - patrz komentarz w nav.js */
.content-col { min-width: 0; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line);
  background: var(--surface); display: flex; flex-direction: column; gap: 22px; overflow-y: auto;
}
.side .logo, .topbar-m img { height: 28px; margin: 0 8px; }
.nav { display: grid; gap: 4px; }
.nav a, .nav-bell {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted);
  text-decoration: none; font-weight: 500;
}
.nav a svg, .mobilebar a svg { width: 19px; height: 19px; flex: none; }
.nav a:hover, .nav-bell:hover { background: var(--surface-2); color: var(--text); }
.nav a.active, .nav a[aria-current="page"], .nav-bell.active { background: var(--mint-dim); color: var(--mint); }
.nav-spacer { flex: 1; }
/* "Wiecej" w bocznym pasku (ETAP C, tylko zarzad): rozwijane, ten sam wyglad linku co reszta menu */
details.nav-more { background: none; border: none; padding: 0; margin: 0; }
details.nav-more summary {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted);
  font-weight: 500; cursor: pointer; list-style: none;
}
details.nav-more summary::-webkit-details-marker { display: none; }
details.nav-more summary svg { width: 19px; height: 19px; flex: none; }
details.nav-more summary:hover { background: var(--surface-2); color: var(--text); }
details.nav-more .nav-more-links { display: grid; gap: 4px; padding-left: 14px; margin-top: 2px; }
details.nav-more .nav-more-links a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
details.nav-more .nav-more-links a svg { width: 17px; height: 17px; flex: none; }
details.nav-more .nav-more-links a:hover { background: var(--surface-2); color: var(--text); }
details.nav-more .nav-more-links a.active, details.nav-more .nav-more-links a[aria-current="page"] { background: var(--mint-dim); color: var(--mint); }
.nav-badge, .badge {
  margin-left: auto; background: var(--warn); color: #1a1400; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px;
}
.side .me {
  margin-top: auto; padding: 12px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 8px;
}
.side .who { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--mint-dim); color: var(--mint);
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none;
}
.side .av { width: 32px; height: 32px; font-size: 13px; }
.nav-logout { width: auto; margin: 0; }
.topbar-m {
  display: none; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.main { padding: 24px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.mobilebar { display: none; }

/* pasek "Szukaj" + "Nowe zlecenie" (ETAP C pkt 1), nad trescia strony na kazdej szerokosci ekranu */
.quickbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 20px clamp(16px, 3vw, 40px) 0; }
.quickbar-search { flex: 1; min-width: 160px; max-width: 420px; display: flex; }
.quickbar .search-input { width: 100%; min-height: 40px; }
.quickbar .btn.primary { white-space: nowrap; }

/* Dzialy jako zakladki (makieta docs/makiety/dzialy.html, zaakceptowana przez Konrada): u gory obszaru
   tresci (nad .main), w kolejnosci drogi zlecenia. Kolor na --dept-c ustawiany w JS (nav.js, element.style -
   custom property, nie atrybut style="" - CSP bez inline style na to pozwala). Na telefonie te same
   zakladki sa w dolnym pasku (.mobilebar), ten pasek jest wtedy schowany (patrz @media nizej). */
.dept-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 14px clamp(16px, 3vw, 40px) 0; }
.dept-tab {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px 10px 0 0;
  color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; border-bottom: 2px solid transparent;
}
.dept-tab:hover { color: var(--text); }
.dept-tab.active { color: var(--text); border-bottom-color: var(--dept-c); }
.dept-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dept-c); flex: none; }
.dept-count { font-family: var(--mono); font-size: 11px; color: var(--faint); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.dept-lock { font-size: 10px; color: var(--warn); }

/* dzwonek powiadomien w naglowku mobilnym (topbar-m): ten sam wyglad co .nav-bell, ale bez etykiety tekstowej */
.topbar-m .nav-bell { position: relative; padding: 8px; border-radius: 10px; color: var(--muted); }
.topbar-m .nav-bell span:not(.badge) { display: none; }
.topbar-m .nav-bell.active { color: var(--mint); background: var(--mint-dim); }
.topbar-m .nav-bell .badge { position: absolute; top: 2px; right: 2px; font-size: 10px; padding: 0 6px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding-bottom: 86px; }
  .quickbar { padding: 14px 16px 0; }
  .dept-tabs { display: none; } /* na telefonie te same zakladki sa w .mobilebar (dolny pasek) */
  .mobilebar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 6px max(6px, env(safe-area-inset-bottom)); z-index: 30; overflow-x: auto; gap: 2px;
  }
  .mobilebar a {
    flex: 1 0 auto; min-width: 60px; display: grid; justify-items: center; gap: 2px; padding: 6px 8px; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-size: 11px; position: relative;
  }
  .mobilebar a[aria-current="page"], .mobilebar a.active { color: var(--mint); background: var(--mint-dim); }
  .mobilebar .dept-dot { width: 8px; height: 8px; }
  .mobilebar .dept-count { display: none; } /* licznik tylko na zakladkach desktopowych - dolny pasek ma mniej miejsca */
  .mobilebar .badge { position: absolute; top: 0; right: 4px; font-size: 10px; padding: 0 6px; }
  .mobilebar-more { flex: 1 0 auto; min-width: 60px; }
  .topbar-m { display: flex; }
}

/* ============================= tabele i listy (filtry, zlecenia, klienci) ============================= */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 12px 0; }
.filters label { margin: 0; }
.filters input, .filters select { min-height: 36px; padding: 7px 8px; }
table.list { width: 100%; }
table.list tr { cursor: pointer; }
table.list tr:hover td { background: var(--surface-2); }
.badge.urgent { background: var(--danger); color: #fff; }

/* chipy statusow/filtrow klikalnych (toolbar "Wg stanowisk"/"Tylko moje"/"Po terminie N" itp.) */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px;
  font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; border: 1px solid transparent;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
button.chip { cursor: pointer; border: 1px solid var(--line); min-height: auto; }
button.chip.active { background: var(--mint-dim); color: var(--mint); border-color: var(--mint); }
.chip .count { opacity: .75; margin-left: 2px; font-weight: 700; }
/* etapy zlecenia (ten sam kolor wszedzie: lista, tablica, karta) */
.chip.stage-zapytanie { background: var(--info-dim); color: var(--info); }
.chip.stage-wycena, .chip.stage-wyslana { background: var(--warn-dim); color: var(--warn); }
.chip.stage-zaakceptowana { background: var(--mint-dim); color: var(--mint); }
.chip.stage-projekt { background: var(--violet-dim); color: var(--violet); }
.chip.stage-produkcja { background: var(--mint-dim); color: var(--mint); }
.chip.stage-gotowe { background: var(--mint); color: var(--mint-ink); }
.chip.stage-wydane { background: var(--surface-3); color: var(--text); }
.chip.stage-odrzucona { background: var(--danger-dim); color: var(--danger); }

/* terminy slowami (ETAP A: "dzis"/"jutro"/"za N dni"/"N dni po terminie", kolor wg bliskosci) */
.due { font-size: 13px; font-weight: 700; white-space: nowrap; }
.due.late { color: var(--danger); }
.due.soon { color: var(--warn); }
.due.ok { color: var(--muted); font-weight: 600; }
/* due w stylu Asany (dueAsana w ui.js, Tablica/Moje produkcji - klasa osobna od .due zwyklego, zeby nie
   zmienic koloru "za N dni" na innych ekranach): 'soon' zielony (dzis/jutro), 'week' = dzien tygodnia,
   'none' = "bez terminu" szary. */
.due-asana { font-size: 12px; font-weight: 600; white-space: nowrap; }
.due-asana.late { color: var(--danger); }
.due-asana.soon { color: var(--mint); }
.due-asana.week { color: var(--text); }
.due-asana.ok { color: var(--muted); }
.due-asana.none { color: var(--faint); font-weight: 400; }

/* KPI (kafle liczbowe, styl Rejestratora) */
.kpis, .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi, .tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .v, .tile .n { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; margin-top: 6px; }
.kpi .l, .tile .t { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.warn .v, .tile.warn .n { color: var(--warn); }
.kpi.danger .v, .tile.bad .n { color: var(--danger); }
.kpi.mint .v, .tile.ok .n { color: var(--mint); }
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover { border-color: var(--line-strong); background: var(--surface-2); }

/* Start "Dzis" zarzadu (ETAP C pkt 2): dwie karty jedna przy drugiej na desktopie, pod soba na telefonie */
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.decision-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.decision-row:first-child { border-top: 0; padding-top: 0; }
.decision-row .main { flex: 1; min-width: 0; }
.decision-row .t { font-weight: 600; }
.decision-row .s { color: var(--muted); font-size: 13px; }
.decision-row .btn { margin: 0; }
.decision-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* puste stany (ETAP A: krotka podpowiedz, nie samo "—") */
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty.inline { padding: 10px 0; text-align: left; font-size: 13px; }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; background: var(--warn-dim); color: var(--warn); margin-top: 10px; }
.notice.info { background: var(--info-dim); color: var(--info); }

/* ==================== karta zlecenia (ETAP A pkt 3) ==================== */
.order-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.order-head .id-line { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.order-head .big-title { font-family: var(--display); font-size: clamp(22px, 5vw, 28px); font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.order-head .grow { flex: 1; }
.steps { display: flex; gap: 4px; margin: 14px 0 18px; flex-wrap: wrap; }
.step { flex: 1; min-width: 80px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 7px 4px; border-radius: 8px; background: var(--surface-2); border: 1px solid transparent; }
.step.done { color: var(--mint); }
.step.now { background: var(--mint); color: var(--mint-ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.fact .k { font-size: 12px; color: var(--muted); }
.fact .v { font-weight: 700; font-size: 17px; font-family: var(--display); }
.fact .v .due { font-size: inherit; font-family: inherit; font-weight: 700; }
.fact .v .due.ok { color: var(--text); }
.fact .lock { font-size: 11px; color: var(--muted); margin-left: 4px; font-weight: 500; }
.fact.needs-reply .v { color: var(--warn); font-weight: 700; font-family: var(--font); font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0 14px; flex-wrap: wrap; overflow-x: auto; }
button.tab, .tab-btn {
  padding: 9px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border: none; border-bottom: 2px solid transparent;
  background: none; border-radius: 0; min-height: auto; cursor: pointer; white-space: nowrap;
}
button.tab.active, .tab-btn.active { color: var(--text); border-color: var(--mint); background: none; }
.tab .count { opacity: .7; margin-left: 4px; font-weight: 600; }
.tab-panel[hidden] { display: none; }

/* zadania karty zlecenia jako lista z checkboxem (ETAP A pkt 3) */
.task-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; flex-wrap: wrap; }
.task-item.sub { margin-left: 22px; background: var(--surface-2); }
.task-item .box, .order-row .box {
  width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 5px; flex: none; cursor: pointer;
  background: none; padding: 0; margin: 0; min-height: auto;
}
.task-item .box.done, .order-row .box.done { background: var(--mint); border-color: var(--mint); }
.task-item .title2 { font-weight: 600; flex: 1 1 160px; }
.task-item.done .title2 { text-decoration: line-through; color: var(--muted); }
.task-item .meta2 { color: var(--muted); font-size: 11px; flex-basis: 100%; }
.tag-station {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; background: var(--surface-3); color: var(--muted);
  padding: 3px 8px; border-radius: 6px; text-transform: uppercase;
}
.add-task-row {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); margin-bottom: 8px; display: flex; align-items: center;
}
.add-task-row input[type="text"] { border: none; background: none; min-height: 44px; }
.add-task-row input:focus { outline: none; box-shadow: none; }
details.more-options { margin-top: 0; border: none; background: none; padding: 0; }
details.more-options summary { color: var(--muted); font-size: 12px; font-weight: 700; padding: 6px 12px; cursor: pointer; list-style: none; }
details.more-options summary::-webkit-details-marker { display: none; }
details.more-options summary::before { content: "▸"; margin-right: 6px; color: var(--mint); }
details.more-options[open] summary::before { content: "▾"; }
details.more-options .opts { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px 2px; }
details.more-options .opts > * { flex: 1 1 140px; }

/* menu "..." (akcje pozostale po jednym glownym przycisku) */
.more-menu { position: relative; display: inline-block; }
.more-menu > .more-trigger { padding: 0 12px; font-size: 16px; color: var(--muted); }
.more-menu .menu {
  position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.35); min-width: 180px; z-index: 5; padding: 4px; display: grid; gap: 2px;
}
.more-menu .menu[hidden] { display: none; }
.more-menu .menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 8px 10px; font-size: 13px; font-weight: 500; border-radius: 6px; min-height: auto; }
.more-menu .menu button:hover { background: var(--surface-2); }

/* "Wiecej" w dolnym pasku telefonu: menu wysuwane w gore (nad paskiem), ten sam wyglad co .more-menu, ale
   position:fixed liczone w JS (nav.js) - .mobilebar ma overflow-x:auto, ktory przycinalby absolute w pionie */
.mobilebar-more { position: relative; }
.mobilebar-more .more-trigger {
  background: none; border: none; min-height: auto; padding: 6px 8px; display: grid; justify-items: center; gap: 2px;
  color: var(--muted); font-size: 11px; width: 100%;
}
.mobilebar-more .menu { position: fixed; top: auto; margin-top: 0; }
.mobilebar-more .menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 500; }
.mobilebar-more .menu a svg { width: 17px; height: 17px; flex: none; }
.mobilebar-more .menu a:hover { background: var(--surface-2); }
.mobilebar-more .menu a.active, .mobilebar-more .menu a[aria-current="page"] { color: var(--mint); }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.inline-form input, .inline-form select, .inline-form textarea { width: auto; flex: 1 1 140px; }
.inline-form textarea { width: 100%; min-height: 60px; }

.section { margin-top: 24px; }
.section h2 { margin-bottom: 8px; }
.comment-item, .history-item, .quote-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }
.comment-item.mail { background: var(--surface-2); border-style: dashed; }
.comment-item .meta, .history-item .meta, .quote-item .meta { color: var(--muted); font-size: 11px; }
.comment-item.deleted { opacity: .6; }

/* panel zlecenia (sekcje starsze, przed ETAP A - nadal uzywane przez klient.html/lista.html) */
.panel-header { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }
.panel-header .field { min-width: 120px; }
.panel-header .field .label { font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.panel-header .field.needs-reply div:not(.label) { color: var(--warn); font-weight: 600; }
.panel-header .field.needs-reply .btn { margin-top: 4px; }
.transitions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.panel-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.link-back { color: var(--muted); font-weight: 600; text-decoration: none; padding: 8px 2px; white-space: nowrap; }
.link-back:hover, .link-back:focus-visible { color: var(--mint); text-decoration: underline; }

/* mala inline forma "powod" zamiast window.prompt */
.reason-box { display: inline-flex; align-items: center; gap: 4px; }
.reason-form { display: inline-flex; gap: 4px; align-items: center; }
.reason-form[hidden] { display: none; }
.order-no-link { color: var(--text); font-weight: 700; white-space: nowrap; }
.reason-form input { min-height: 32px; padding: 6px 8px; font-size: 12px; width: 140px; }
.reason-form button, .reason-box > button { width: auto; margin: 0; min-height: 32px; padding: 6px 8px; font-size: 12px; }

/* widok "Do faktury" */
.billing-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.billing-summary .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 110px; }
.billing-summary .stat .num { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--mint); }
.billing-summary .stat .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.age-alarm { color: var(--danger); font-weight: 700; }
/* ETAP D pkt 3: "uzupelnij" zamiast czerwieni w kazdym wierszu - sygnal czerwony zostaje tylko na kaflu KPI */
.value-missing { color: var(--muted); font-style: italic; }
.invoice-item { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.invoice-item .invoice-meta { color: var(--muted); }
.row-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* pasek akcji masowych (ETAP D pkt 3): pojawia sie po zaznaczeniu co najmniej jednego wiersza */
.bulk-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-top: 12px; background: var(--surface-2); border: 1px solid var(--mint); border-radius: var(--radius-sm); }
.bulk-bar[hidden] { display: none; }
.bulk-bar .inline-form { margin: 0; }
.kpi.active { border-color: var(--mint); }

/* lista powiadomien */
.notification-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; }
.notification-item.unread { font-weight: 700; background: var(--surface-2); }
.notification-item .body { font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
.notification-item .meta { color: var(--muted); font-size: 11px; margin-top: 4px; }

/* lejek wycen (ETAP D pkt 2: klient pogrubiony, oczyszczony tytul, wiek, inicjaly) */
.funnel { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; overflow-x: auto; }
.funnel-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.funnel-col h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.funnel-col h3 .count { text-transform: none; font-weight: 700; }
.funnel-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; cursor: grab; }
.funnel-card.flagged { border-color: var(--warn); }
.funnel-card .client { font-weight: 700; overflow-wrap: anywhere; }
.funnel-card .no { font-weight: 500; font-family: var(--mono); color: var(--muted); font-size: 11px; }
.funnel-card .title-clean { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.funnel-card .foot { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .funnel { grid-template-columns: 1fr; } }

.table-wrap { width: 100%; overflow-x: auto; }

/* lista zlecen jako wiersze (ETAP D pkt 1), zamiast tabeli 7-kolumnowej */
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
}
.order-row:hover { background: var(--surface-2); }
.order-row .main { flex: 1; min-width: 0; padding: 0; }
.order-row .client { font-weight: 700; overflow-wrap: anywhere; }
.order-row .client .no { color: var(--muted); font-weight: 500; font-size: 12px; }
.order-row .title-clean { color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.order-row .right { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .order-row { flex-wrap: wrap; }
  .order-row .main { flex-basis: 100%; order: 2; }
  .order-row .right { flex-basis: 100%; order: 3; justify-content: flex-start; }
}

/* Moje (ETAP4, przeprojektowane w ETAP A dla roli produkcja — patrz .today-list nizej) */
.my-groups { display: flex; flex-direction: column; gap: 18px; }
.task-group h3 { font-size: 13px; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.task-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer;
}
.task-card .title { font-weight: 600; }
.task-card .meta { color: var(--muted); font-size: 12px; flex: 1 1 100%; }
.task-card.deleted { opacity: .6; }
.task-card .btn.secondary { margin: 0; }

/* "Moje na dzis" dla produkcji na telefonie (ETAP A pkt 4): karta jak na Tablicy, duzy przycisk pod kciuk */
.today-list h3 { font-size: 13px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.today-card {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px;
}
.today-card.late { border-left-color: var(--danger); }
.today-card.soon { border-left-color: var(--warn); }
.today-card .client-name { font-weight: 700; }
.today-card .title-clean { font-size: 14px; margin: 2px 0 10px; color: var(--muted); }
.today-card .foot { display: flex; align-items: center; gap: 8px; }
.today-card .foot2 { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.today-card .foot2 .btn.primary { flex: 1; }

/* Tablica produkcji — styl Asany (makieta docs/makiety/tablica-asana.html, zaakceptowana przez Konrada
   16.11.2026): karta = gesty wiersz jak w Asanie, nie "kafelek"; nagłówek kolumny przyklejony u gory; puste
   kolumny wezsze; kolory maszyn jak w --m-* (zob. :root). */
.board-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.board { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; align-items: stretch; }
.board-col { flex: 1 1 200px; min-width: 200px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.board-col.is-empty { flex: 0 0 120px; min-width: 120px; }
.board-col.is-none { background: var(--surface-2); }
.board-col h3 {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0;
  padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--bg); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: none; color: var(--text);
}
.board-col.is-none h3 { background: var(--surface-2); }
.board-col h3 .n { margin-left: auto; color: var(--faint); font-size: 12px; font-family: var(--mono); font-weight: 400; }
.board-list { overflow-y: auto; flex: 1; }
.board-tag {
  display: inline-flex; gap: 5px; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; color: var(--m-c);
  background: color-mix(in srgb, var(--m-c) 20%, transparent);
}
.board-tag .st-ico { flex: none; }
.board-col h3 .board-tag { height: 22px; font-size: 12px; } /* naglowek kolumny (dodatek ikon 16.11.2026): tag odrobinke wiekszy */

.board-card {
  position: relative; display: grid; grid-template-columns: 22px 1fr; column-gap: 8px;
  padding: 7px 9px 7px 8px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; cursor: pointer;
}
.board-card:hover { background: var(--surface-2); }
.board-card.late { border-left-color: var(--danger); }
.board-card.soon { border-left-color: var(--mint); }
.board-card.done { opacity: .55; }
.board-card .check {
  width: 18px; height: 18px; border: 1.5px solid var(--faint); border-radius: 50%; margin-top: 1px;
  display: grid; place-items: center; color: transparent; font-size: 11px; background: none; min-height: auto; padding: 0;
}
.board-card .check:hover, .board-card .check.done { border-color: var(--mint); color: var(--mint); }
/* konto podgladu (komputer przy stanowisku, 16.11.2026): karta nie otwiera zlecenia, klikalne jest tylko kolko */
.role-ekran .board-card { cursor: default; }
.role-ekran .board-card .check { cursor: default; }
.role-ekran .board-card .check.clickable { cursor: pointer; width: 22px; height: 22px; }
.board-card .title { grid-column: 2; font-size: 13px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-card .title .cl { color: var(--muted); font-weight: 400; }
.board-card .meta { grid-column: 2; display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; min-width: 0; flex-wrap: wrap; }
.board-card .who { margin-left: auto; display: flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; min-width: 0; }
.board-card .who .nm { display: none; }
/* imie osoby tylko na telefonie (inaczej tylko inicjaly + title) - specyfikacja Tablicy 16.11.2026 */
@media (max-width: 480px) { .board-card .who .nm { display: inline; } }
.board-card .av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; background: var(--surface-3); color: var(--text); flex: none; }
.board-card .more-menu { position: absolute; right: 6px; top: 5px; }
.board-card .more-trigger {
  opacity: 0; width: auto; min-height: auto; padding: 0 6px; height: 20px; font-size: 13px; border-radius: 6px;
  border-color: var(--line-strong); background: var(--surface-3); color: var(--muted);
}
.board-card:hover .more-trigger, .board-card .more-menu:has(.menu:not([hidden])) .more-trigger { opacity: 1; }
@media (hover: none) { .board-card .more-trigger { opacity: 1; } }

/* kolumna "BEZ STANOWISKA" (decyzja 2026-11-16 pkt A) - jak w makiecie: szare tlo, zawsze ostatnia */
.board-col.is-none .board-tag { color: var(--m-BRAK); background: color-mix(in srgb, var(--m-BRAK) 20%, transparent); }

.empty.inline.board-empty { padding: 10px; color: var(--faint); font-size: 12px; }

/* "Moje" produkcji (telefon) - te same wiersze co Tablica, ale kolko do odhaczenia wieksze pod kciuk (28px+). */
#today-list-items .board-card, #my-groups .board-card { grid-template-columns: 30px 1fr; padding: 10px 12px 10px 10px; }
#today-list-items .check, #my-groups .check { width: 28px; height: 28px; }
#today-list-items .more-trigger, #my-groups .more-trigger { opacity: 1; } /* na dotyku zawsze widoczne */

/* Grafika */
.graphics-person h3 { font-size: 13px; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }

/* Panel zlecenia: starszy wiersz zadania (ETAP4) - pozostawiony dla zgodnosci, ETAP A uzywa .task-item */
.task-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.task-row .title { font-weight: 600; flex: 1 1 200px; }
.task-row.sub { margin-left: 24px; background: var(--surface-2); }
.task-row select, .task-row button { width: auto; margin: 0; font-size: 12px; padding: 0 8px; min-height: 30px; }
.task-row .meta { color: var(--muted); font-size: 11px; flex-basis: 100%; }

/* poprawki po przegladzie etapu C (2026-11-15) */
.grid2 > .card { max-width: none; }
.decision-row .main { padding: 0; }
.btn { text-decoration: none; }
.btn.secondary { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn.secondary:hover { background: var(--surface-3); }
.search-input { min-height: 40px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.search-input::placeholder { color: var(--faint); }
.search-input:focus { border-color: var(--mint); outline: none; box-shadow: 0 0 0 3px var(--mint-dim); }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
#today-dashboard .grid2 .card h3 { margin-bottom: 12px; }
@media (max-width: 640px) {
  .kpis, .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .v { font-size: 30px; }
  .mobilebar a { flex: 1 1 0; min-width: 0; padding: 6px 2px; }
}
@media (max-width: 640px) {
  .mobilebar .mobilebar-more { flex: 1 1 0; min-width: 0; }
  .decision-row { flex-wrap: wrap; }
  .decision-row .main { flex-basis: 100%; }
  .card.card-wide { padding: 16px 14px; }
}

/* Lustro Asany w Administracji (ETAP7 pkt 3.16): duzy przelacznik trzech trybow, wiersze listy obcych zadan */
.mode-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 16px; }
.mode-opt {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; text-align: left;
  min-height: 92px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-strong);
}
.mode-opt .t { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--text); }
.mode-opt .s { font-size: 13px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.mode-opt.active { border-color: var(--mint); background: var(--mint-dim); box-shadow: 0 0 0 1px var(--mint) inset; }
.mode-opt.active .t { color: var(--mint); }
.mode-opt.active.off { border-color: var(--line-strong); background: var(--surface-3); box-shadow: none; }
.mode-opt.active.off .t { color: var(--text); }
.mode-opt.active.dry { border-color: var(--warn); background: var(--warn-dim); box-shadow: 0 0 0 1px var(--warn) inset; }
.mode-opt.active.dry .t { color: var(--warn); }
.check-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }
.check-list label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-weight: 500; }
details.tech { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; }
details.tech > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
details.tech h3 { margin: 18px 0 6px; font-size: 15px; }
.map-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.map-row .n { flex: 1 1 160px; min-width: 0; }
.map-row input { width: 210px; min-height: 34px; }
@media (max-width: 640px) {
  .mode-switch { grid-template-columns: 1fr; }
  .mode-opt { min-height: auto; }
  .map-row input { width: 100%; }
}

/* Tablica produkcji na pelna szerokosc ekranu (decyzja Konrada 2026-11-16: przejrzysciej) */
.wrap-full.wrap-board { max-width: none; }
.wrap-board .board { grid-auto-columns: minmax(220px, 1fr); }

/* "Przekaż dalej" (makiety docs/makiety/przekazanie2.html i przekazanie.html, zaakceptowane 16.11.2026): maly
   przycisk ➜ na karcie, dymek przy karcie (na telefonie od dolu ekranu), pelne okienko "więcej opcji…". */
.go-btn {
  width: 24px; height: 24px; min-height: auto; padding: 0; border-radius: 7px; flex: none;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--mint);
  display: inline-grid; place-items: center; font-size: 13px; line-height: 1; cursor: pointer;
}
.go-btn:hover, .go-btn.open { background: var(--mint-dim); border-color: var(--mint-glow); color: var(--mint); }
.board-card.has-go { grid-template-columns: 22px 1fr 26px; }
.board-card.has-go > .go-btn { grid-column: 3; grid-row: 1; align-self: start; }
.board-card.has-go .meta { grid-column: 2 / span 2; }
.board-card.has-go .more-menu { right: 36px; }
.funnel-card .foot .go-btn, .order-row .go-btn { margin-left: 2px; }
.order-head .go-btn { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
.ho-pop {
  position: absolute; z-index: 70; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 8px;
}
.ho-pop::before {
  content: ""; position: absolute; top: -7px; left: var(--arrow-x, 20px); width: 12px; height: 12px; background: var(--surface);
  border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong); transform: rotate(45deg);
}
.ho-pop.above::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.ho-h { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ho-dlg .ho-h { font-family: var(--display, var(--font)); font-size: 20px; }
.ho-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ho-body { display: flex; flex-direction: column; gap: 8px; }
.ho-body > div[hidden] { display: none; }
.ho-body > div:not(.ho-row) { display: flex; flex-direction: column; gap: 8px; }
.ho-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ho-pick {
  min-height: auto; border: 1px solid var(--line-strong); border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 500;
  color: var(--muted); background: var(--surface-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.ho-pick:hover { background: var(--surface-3); color: var(--text); }
.ho-pick.on { background: var(--mint-dim); color: var(--mint); border-color: var(--mint-glow); }
.ho-pick i { font-style: normal; color: var(--faint); font-size: 11px; }
.ho-pick.tag { --c: var(--m-BRAK, var(--faint)); height: 28px; opacity: .6; border-color: transparent; }
.ho-pick.tag.on { opacity: 1; border-color: var(--c); background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.ho-pick.m-EPSON { --c: var(--m-EPSON); } .ho-pick.m-SUMMA { --c: var(--m-SUMMA); } .ho-pick.m-CNC { --c: var(--m-CNC); }
.ho-pick.m-DTF { --c: var(--m-DTF); } .ho-pick.m-LASER { --c: var(--m-LASER); } .ho-pick.m-FIBER { --c: var(--m-FIBER); }
.ho-pick.m-HAFT { --c: var(--m-HAFT); } .ho-pick.m-OKLEJANIE { --c: var(--m-OKLEJANIE); } .ho-pick.m-MONTAZ { --c: var(--m-MONTAZ); }
.ho-lbl { font-size: 11px; color: var(--faint); margin-top: 2px; }
.ho-dlg .ho-lbl { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ho-date, .ho-in { min-height: 34px; margin-top: 2px; }
.ho-ta { min-height: 70px; }
.ho-hint { font-size: 12px; color: var(--faint); }
.ho-err:empty { display: none; }
.ho-ft { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.ho-dlg .ho-ft { justify-content: flex-end; }
.ho-more { background: none; border: none; min-height: auto; padding: 0; font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.ho-more:hover { background: none; color: var(--text); }
.ho-send { min-height: 34px; padding: 6px 14px; }
.ho-dlg { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.ho-x { width: auto; padding: 0 8px; font-size: 18px; }
@media (max-width: 640px) {
  .ho-pop {
    position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto !important; border-radius: 16px 16px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto; z-index: 90;
  }
  .ho-pop::before { display: none; }
  .ho-pick { padding: 9px 12px; font-size: 14px; }
  .ho-pick.tag { height: 36px; }
  .ho-send { min-height: 44px; }
}
/* Kolejka grafiki: osobna grupa "Czeka na akceptację klienta" */
.graphics-person.waiting h3 { color: var(--warn, var(--mint)); }
.wait-age { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.wait-age.late { color: var(--danger); }
.ho-ft > .ho-send:only-child { margin-left: auto; }
