/* ===========================================================================
   Status TSPL — arkusz stylów aplikacji.
   Wartości liczbowe przeniesione z makiet w /design/*.dc.html.
   =========================================================================== */

:root {
  /* marka i tekst */
  --magenta:   #E20074;
  --magenta-d: #B0005B;
  --magenta-x: #8A0047;   /* hover linku / tekst na jasnym różu */
  --ink:       #16141A;
  --ink-2:     #34313A;
  --ink-3:     #4A4650;
  --ink-4:     #55505C;
  --ink-5:     #6E6A75;
  --muted:     #7A7580;
  --muted-2:   #9691A0;
  --line:      #E4E2E7;
  --line-soft: #F2F0F4;
  --line-2:    #EFEDF1;
  --line-3:    #EAE8ED;
  --bg:        #F4F3F5;
  --surface:   #FFFFFF;
  --sunk:      #FAF9FB;
  --sunk-2:    #FBFAFC;

  /* sygnały — zwalidowane pod kątem daltonizmu, nie zmieniać */
  --good:      #0E7A5C;
  --good-fg:   #0E7A5C;
  --good-bg:   #E9F4EF;
  --warn:      #D18A00;
  --warn-fg:   #8F5609;
  --warn-bg:   #FCF3E3;
  --crit:      #B4241A;
  --crit-fg:   #A9231A;
  --crit-bg:   #FBEAE8;
  --neutral:   #8E8996;
  --neutral-fg:#7A7580;
  --neutral-bg:#F1EFF3;
  --neutral-bar:#C9C5CF;

  /* obłożenie */
  --cap-proj:  #2D5FA8;
  --cap-wrz:   #B0005B;
  --cap-abs:   #8E8996;
  --cap-free:  #F4F3F5;

  /* pasek górny */
  --top-bg:    #16141A;
  --top-item:  #2A272F;
  --top-fg:    #9B96A2;
  --top-div:   #3A3740;
  --top-av:    #4B4753;

  --sel-row:   #FBF2F7;
  --sel-bd:    #F3D9E7;

  --font-ui: 'Barlow', 'Helvetica Neue', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  --topbar-h: 56px;
  --sidebar-w: 244px;
}

/* --- reset i baza ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  /* Makiety nie ustawiają line-height — zostaje `normal`, żeby wysokości
     bloków tekstowych zgadzały się co do piksela. Konkretne interlinie
     (1,45 / 1,5 / 1,55 / 1,6) są tam, gdzie makieta je podaje. */
  line-height: normal;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

a { color: var(--magenta-d); text-decoration: none; }
a:hover { color: var(--magenta-x); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

input, textarea, select { font: inherit; color: inherit; }

.num { font-variant-numeric: tabular-nums; }
.hatch { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.55) 0 3px, transparent 3px 6px); }
.grow { flex-grow: 1; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- ognisko klawiatury -------------------------------------------------- */

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 2px;
}
.topbar :focus-visible { outline-color: #FF6FB4; }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 10px 14px; border-radius: 7px; border: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
  transition: top .12s ease;
}
.skip-link:focus { top: 8px; }

/* ===========================================================================
   PASEK GÓRNY  (Main.dc.html / Kokpit.dc.html / Obciazenie.dc.html)
   =========================================================================== */

.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  background: var(--top-bg);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
}

.tb-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tb-logo { width: 22px; height: 22px; border-radius: 4px; background: var(--magenta); flex-shrink: 0; }
.tb-name { font-size: 16px; font-weight: 700; color: #FFFFFF; letter-spacing: -0.01em; }
.tb-div { width: 1px; height: 18px; background: var(--top-div); }
.tb-sub { font-size: 13px; font-weight: 500; color: var(--top-fg); white-space: nowrap; }

.tb-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; flex-shrink: 0; }
.tb-nav a, .tb-nav span {
  padding: 7px 13px;
  border-radius: 6px;
  color: var(--top-fg);
  font-size: 13px;
  font-weight: 500;
  display: block;
  white-space: nowrap;
}
.tb-nav a:hover { color: #FFFFFF; background: rgba(255,255,255,0.06); }
.tb-nav a.is-active {
  background: var(--top-item);
  color: #FFFFFF;
  font-weight: 600;
}
.tb-nav span[aria-disabled='true'] { opacity: .55; cursor: default; }

.tb-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--top-item);
  border-radius: 6px;
  padding: 7px 12px;
  width: 220px;
  flex-shrink: 0;
}
.tb-search input {
  flex-grow: 1; min-width: 0;
  background: transparent; border: 0; padding: 0;
  font-size: 13px; color: #FFFFFF;
}
.tb-search input::placeholder { color: #7C7784; opacity: 1; }

.tb-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--top-div);
  border-radius: 6px;
  font-size: 12.5px; font-weight: 600; color: #D8D5DC;
  flex-shrink: 0;
}

.tb-wrzutka {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 13px;
  background: var(--magenta);
  border-radius: 6px;
  font-size: 13px; font-weight: 600; color: #FFFFFF;
  flex-shrink: 0;
}
.tb-wrzutka:hover { background: #C90068; }

.tb-klucze{display:flex;align-items:center;justify-content:center;width:32px;height:32px;
  border-radius:6px;text-decoration:none}
.tb-klucze:hover{background:#2A272F}
.tb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--top-av); color: #FFFFFF;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Pasek górny nie ma prawa się zawijać — przy wąskim oknie odpadają
   kolejno: podtytuł, wyszukiwarka, etykieta przycisku wrzutki. */
@media (max-width: 1330px) {
  .topbar { gap: 14px; padding: 0 16px; }
  .tb-sub, .tb-div { display: none; }
}
@media (max-width: 1150px) {
  .tb-search { display: none; }
}
@media (max-width: 980px) and (min-width: 720px) {
  .tb-wrzutka span { display: none; }
  .tb-nav a, .tb-nav span { padding: 7px 9px; }
}

/* ===========================================================================
   UKŁAD
   =========================================================================== */

.app-main { flex-grow: 1; min-height: 0; display: flex; flex-direction: column; }
.shell { flex-grow: 1; display: flex; min-height: 0; }
.col-main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

/* ===========================================================================
   LEWY PANEL FILTRÓW  (Main.dc.html)
   =========================================================================== */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sb-top { padding: 18px 18px 14px; border-bottom: 1px solid var(--line-2); }
.sb-body { padding: 16px 18px; flex-grow: 1; overflow-y: auto; }
.sb-foot { padding: 14px 18px; border-top: 1px solid var(--line-2); }

.sb-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em;
  color: var(--muted-2); text-transform: uppercase;
  margin-bottom: 9px;
}
.sb-body .sb-label { margin-bottom: 10px; }

.sb-view {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sunk-2);
  width: 100%;
}
.sb-view:hover { background: #F5F3F7; }
.sb-view-name { flex-grow: 1; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sb-private { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.sb-private span { font-size: 11px; color: var(--good); font-weight: 600; }

.sb-views-panel {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  overflow: hidden;
}
.sb-views-panel .vp-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 11px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}
.sb-views-panel .vp-item:hover { background: var(--sunk); }
.sb-views-panel .vp-item.is-on { font-weight: 700; background: var(--sel-row); }
.sb-views-panel .vp-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-2); }
.sb-views-panel .vp-row .vp-item { border-bottom: 0; }
.sb-views-panel .vp-save { display: flex; gap: 6px; padding: 8px; }
.sb-views-panel .vp-save input {
  flex-grow: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px;
}
.vp-del {
  flex-shrink: 0; color: var(--muted-2);
  padding: 0 10px; border-radius: 4px;
  display: flex; align-items: center;
}
.vp-del:hover { color: var(--crit); background: var(--sunk); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.chip {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
}
.chip:hover { border-color: var(--muted-2); }
.chip.is-on { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

.people { display: flex; flex-direction: column; gap: 3px; margin-bottom: 20px; }
.person {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; border-radius: 6px;
  background: transparent;
  width: 100%;
}
.person:hover { background: var(--sunk); }
.person.is-on { background: var(--neutral-bg); }
.person-name { flex-grow: 1; font-size: 12.5px; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-n { font-size: 11px; font-weight: 600; color: var(--muted-2); }

.phases { display: flex; flex-direction: column; gap: 5px; }
.phase { font-size: 12.5px; color: var(--ink-2); }
.phase.is-on { font-weight: 700; }
.phase .n { color: var(--muted-2); }

.sb-export {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.sb-export { width: 100%; }
.sb-export[aria-disabled='true'] { opacity: .8; }
.sb-export:hover { color: var(--ink-3); }

/* ===========================================================================
   KAFLE SYGNALIZACYJNE  (Main.dc.html)
   =========================================================================== */

/* Na szerokim ekranie cztery kafle w rzędzie, jak w makiecie. Poniżej ~1000 px
   zawijają się po dwa zamiast ściskać etykiety do trzech linijek. */
.tiles { display: flex; gap: 12px; padding: 20px 24px 16px; flex-shrink: 0; flex-wrap: wrap; }

.tile {
  flex-grow: 1; flex-basis: 200px; min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.tile:hover { border-color: var(--muted-2); }
.tile.is-on { border-color: var(--ink); box-shadow: 0 1px 3px rgba(22,20,26,0.10); }
.tile-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.tile-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.tile-label { font-size: 11.5px; font-weight: 600; color: var(--ink-5); letter-spacing: 0.01em; }
.tile-row { display: flex; align-items: baseline; gap: 8px; }
.tile-val { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }
.tile-sub { font-size: 11.5px; color: var(--muted-2); font-weight: 500; }

/* ===========================================================================
   PASEK NARZĘDZI TABELI
   =========================================================================== */

.toolbar { display: flex; align-items: center; gap: 12px; padding: 0 24px 14px; flex-shrink: 0; flex-wrap: wrap; }
.toolbar h1 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.count-badge {
  font-size: 12px; font-weight: 600; color: var(--muted-2);
  background: #ECEAEF; padding: 3px 8px; border-radius: 5px;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
}
.btn:hover { border-color: var(--muted-2); }
.btn[aria-disabled='true'], .btn:disabled { opacity: .55; cursor: default; }
.btn[aria-disabled='true']:hover, .btn:disabled:hover { border-color: var(--line); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px;
  background: var(--magenta);
  border: 0; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: #FFFFFF;
}
.btn-primary:hover { background: #C90068; }
.btn-primary:disabled { opacity: .5; cursor: default; }

.toggle {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
}
.toggle-box { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--line); background: #FFFFFF; flex-shrink: 0; }
.toggle-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.toggle.is-on { border-color: var(--magenta); background: var(--sel-row); }
.toggle.is-on .toggle-box { border-color: var(--magenta); background: var(--magenta); }
.toggle.is-on .toggle-label { color: var(--magenta-x); }

/* ===========================================================================
   TABELA PORTFELA
   =========================================================================== */

.table {
  flex-grow: 1;
  margin: 0 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  min-height: 0;
}

/* Kolumny mają stałe szerokości z makiety; poniżej ~1150 px tabela przewija się
   w poziomie zamiast ściskać treść. Nagłówek zostaje przyklejony do góry. */
.thead {
  display: flex; align-items: center;
  height: 38px; flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: var(--sunk);
  padding-left: 4px;
  position: sticky; top: 0; z-index: 2;
  min-width: 980px;
}
.tbody, .row { min-width: 980px; }
.thead > div {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em;
  color: var(--neutral); text-transform: uppercase;
}
.thead button {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em;
  color: var(--neutral); text-transform: uppercase;
}
.thead button:hover { color: var(--ink-2); }

.tbody { min-height: 0; }

.row {
  display: flex; align-items: center;
  height: 52px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  color: inherit;
}
.row:hover { background: var(--sunk); }
.row.is-sel { background: var(--sel-row); }
.row-bar { width: 4px; height: 100%; flex-shrink: 0; }

.col-klient  { width: 186px; padding-left: 14px; min-width: 0; flex-shrink: 0; }
.col-usluga  { flex-grow: 1; min-width: 0; padding-right: 12px; }
.col-faza    { width: 128px; padding-right: 8px; flex-shrink: 0; }
.col-zespol  { width: 152px; flex-shrink: 0; display: flex; align-items: center; gap: 7px; min-width: 0; }
.col-sygnal  { width: 132px; flex-shrink: 0; display: flex; align-items: center; gap: 7px; }
.col-wpis    { width: 124px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.col-termin  { width: 96px; flex-shrink: 0; font-size: 12.5px; color: var(--ink-4); }
.col-note    { width: 34px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

.cell-klient { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cell-usluga { font-size: 13px; color: var(--ink-2); }
.pill-faza {
  display: inline-block; padding: 3px 8px; border-radius: 5px;
  background: var(--neutral-bg); font-size: 11.5px; font-weight: 600; color: var(--ink-4);
}
.cell-arch { font-size: 12.5px; color: var(--ink-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  border-radius: 50%;
  color: #FFFFFF;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sig { display: flex; align-items: center; gap: 7px; }
.sig-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sig-label { font-size: 12.5px; font-weight: 600; }

.fresh { padding: 3px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 700; }
.fresh.good { background: var(--good-bg); color: var(--good-fg); }
.fresh.warn { background: var(--warn-bg); color: var(--warn-fg); }
.fresh.crit { background: var(--crit-bg); color: var(--crit-fg); }

/* ===========================================================================
   STANY: ładowanie / pusto / błąd
   =========================================================================== */

.sk { background: linear-gradient(90deg, #EEECF1 25%, #F6F5F8 37%, #EEECF1 63%); background-size: 400% 100%; border-radius: 5px; animation: sk 1.3s ease-in-out infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.sk-row { display: flex; align-items: center; height: 52px; border-bottom: 1px solid var(--line-soft); padding-left: 18px; gap: 14px; }

.state {
  padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.state-title { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.state-text { font-size: 13px; color: var(--muted); max-width: 460px; line-height: 1.55; }

/* ===========================================================================
   KARTA PROJEKTU  (Projekt.dc.html)
   =========================================================================== */

.proj-scroll { flex-grow: 1; overflow-y: auto; min-height: 0; }
.proj {
  width: 980px; max-width: 100%;
  margin: 0 auto;
  background: var(--surface);
  color: var(--ink);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 100%;
}

.proj-head { padding: 24px 32px 20px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.crumbs a, .crumbs span { font-size: 12.5px; color: var(--muted-2); font-weight: 500; }
.crumbs a:hover { color: var(--ink-2); }

.proj-title-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.proj-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.proj-title h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.proj-desc { font-size: 13.5px; color: var(--ink-5); }
.proj-actions { display: flex; gap: 8px; }
.proj-actions .btn { padding: 9px 14px; font-size: 13px; }
.proj-actions .btn-primary { padding: 9px 15px; }

.pill-sig {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
}
.pill-sig .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pill-sig span { font-size: 12px; font-weight: 700; }
.pill-phase { padding: 4px 10px; border-radius: 20px; background: var(--neutral-bg); font-size: 12px; font-weight: 600; color: var(--ink-4); }

.proj-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border-bottom: 1px solid var(--line);
}
.metric { background: var(--sunk); padding: 14px 20px; min-width: 0; }
.metric:first-child { padding-left: 32px; }
.metric-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em;
  color: var(--neutral); text-transform: uppercase; margin-bottom: 6px;
}
.metric-main { font-size: 13.5px; font-weight: 600; }
.metric-sub { font-size: 12px; color: var(--muted); }
.metric-people { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.metric-people .avatar { border: 2px solid var(--sunk); }
.metric-count { font-size: 12px; color: var(--muted); margin-left: 4px; font-weight: 600; }

.sec { padding: 22px 32px 0; }
.sec-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.sec-head h2 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.sec-count { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.sec-count.warn { color: var(--warn-fg); background: var(--warn-bg); }
.sec-count.crit { color: var(--crit-fg); background: var(--crit-bg); }

.risks { display: flex; flex-direction: column; gap: 8px; }
.risk { display: flex; gap: 12px; padding: 13px 15px; border-radius: 9px; }
.risk.esc { border: 1px solid #F0DFC2; background: #FEFAF3; }
.risk.plain { border: 1px solid var(--line); background: var(--sunk-2); }
.risk-bar { width: 3px; border-radius: 2px; flex-shrink: 0; }
.risk-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.risk-kind {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 4px;
}
.risk-kind.bloker { background: var(--crit-bg); color: var(--crit-fg); }
.risk-kind.ryzyko { background: var(--warn-bg); color: var(--warn-fg); }
.risk-title { font-size: 13.5px; font-weight: 600; }
.risk-detail { font-size: 12.5px; color: var(--ink-5); line-height: 1.5; }
.risk-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.risk-who { font-size: 11.5px; color: var(--neutral); font-weight: 500; }
.risk-esc { font-size: 11.5px; font-weight: 600; color: var(--warn-fg); }

.timeline-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.timeline-head h2 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.timeline-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.tl-search { display: flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.tl-search input { border: 0; background: transparent; font-size: 12px; font-weight: 600; color: var(--ink-3); width: 128px; }
.tl-search input::placeholder { color: var(--ink-3); opacity: 1; }

.timeline { display: flex; flex-direction: column; }
.entry { display: flex; gap: 16px; }
.entry-date { width: 82px; flex-shrink: 0; text-align: right; padding-top: 2px; }
.entry-date .d { font-size: 13px; font-weight: 700; }
.entry-date .w { font-size: 11.5px; color: var(--muted-2); }
.entry-rail { width: 20px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.entry-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--surface); border: 3px solid var(--neutral); margin-top: 4px; flex-shrink: 0; }
.entry-line { width: 2px; flex-grow: 1; background: var(--line-3); }
.entry-body { flex-grow: 1; padding-bottom: 22px; min-width: 0; }
.entry-body.last { padding-bottom: 16px; }
.entry-by { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.entry-by .name { font-size: 13px; font-weight: 600; }
.entry-sig { display: flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 4px; }
.entry-sig .dot { width: 6px; height: 6px; border-radius: 50%; }
.entry-sig span { font-size: 11px; font-weight: 700; }
.entry-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.entry-cols.one { grid-template-columns: minmax(0, 1fr); }
.box { padding: 12px 14px; border-radius: 8px; }
.box-done { background: #F7FAF9; border: 1px solid #E2EDE8; }
.box-plan { background: #FAFAFC; border: 1px solid #E7E5EB; }
.box-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 7px; }
.box-done .box-label { color: var(--good); }
.box-plan .box-label { color: var(--ink-4); }
.box-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; white-space: pre-wrap; }
.entry-comment {
  display: flex; align-items: center; gap: 7px; margin-top: 9px;
  padding: 9px 13px; background: var(--sunk-2); border: 1px solid var(--line-3); border-radius: 8px;
}
.entry-comment .t { font-size: 12px; color: var(--ink-4); }
.entry-comment .t b { font-weight: 600; }
.entry-decision { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 4px; background: var(--sel-row); font-size: 11px; font-weight: 700; color: var(--magenta-x); }

.tl-more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border-top: 1px solid var(--line-2); width: 100%;
  font-size: 12.5px; font-weight: 600; color: var(--magenta-d);
}
.tl-more:hover { color: var(--magenta-x); }

/* ===========================================================================
   MODALE
   =========================================================================== */

.backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(22,20,26,0.42);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
@media (max-width: 719px) { .backdrop { padding: 0; align-items: stretch; } }

/* --- Wpis tygodniowy (Wpis.dc.html) --- */

.wpis {
  width: 760px; max-width: 100%;
  max-height: 100%;
  background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
  border-left: 3px solid var(--magenta);
  border-radius: 0 12px 12px 0;
}
.wpis-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--line); }
.wpis-head-row { display: flex; align-items: flex-start; gap: 12px; }
.wpis-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 5px; }
.wpis-sub { font-size: 13px; color: var(--ink-5); }
.wpis-sub b { font-weight: 600; color: var(--ink-2); }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0; margin: -6px -6px 0 0; }
.icon-btn:hover { background: var(--line-soft); }

.wpis-body { flex-grow: 1; padding: 22px 26px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; }
.field-label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.field-hint { font-size: 11.5px; color: var(--muted-2); }
.field-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }

.sig-picker { display: flex; gap: 8px; }
.sig-opt {
  flex-grow: 1; flex-basis: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}
.sig-opt .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sig-opt .lbl { font-size: 13px; font-weight: 600; color: var(--ink-4); }

.ta-wrap { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.ta-wrap:focus-within { border-color: var(--magenta); }
.ta-wrap textarea {
  display: block; width: 100%; border: 0; resize: vertical;
  padding: 13px 15px; min-height: 92px;
  font-size: 13px; color: var(--ink-2); line-height: 1.6;
  background: transparent;
}
.ta-wrap textarea::placeholder { color: var(--muted-2); }
.ta-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--sunk); border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--muted); font-weight: 500;
}
.ta-plain { border: 1px solid var(--line); border-radius: 9px; }
.ta-plain textarea { min-height: 76px; }

.mini-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  background: var(--surface);
}
.mini-btn:hover { border-color: var(--muted-2); }

.risk-line {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-radius: 8px;
  border: 1px solid #F0DFC2; background: #FEFAF3;
}
.risk-line.crit { border-color: #F0D3D0; background: #FDF7F6; }
.risk-line .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.risk-line .t { flex-grow: 1; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.risk-age { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; color: var(--warn-fg); background: #F7EBD5; }
.risk-age.crit { color: var(--crit-fg); background: #F7DCD9; }

.risk-add {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px dashed #D6D2DC; border-radius: 8px;
  width: 100%;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.risk-add:hover { border-color: var(--muted-2); color: var(--ink-3); }

.risk-form { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
.risk-form input, .risk-form select, .risk-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 12.5px; background: var(--surface);
}
.risk-form-row { display: flex; gap: 8px; }

.escalate {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px;
  background: var(--sel-row); border: 1px solid var(--sel-bd); border-radius: 9px;
  width: 100%;
}
.escalate-box {
  width: 17px; height: 17px; border-radius: 5px;
  border: 1.5px solid var(--magenta); background: var(--surface);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.escalate.is-on .escalate-box { background: var(--magenta); }
.escalate-t { font-size: 13px; font-weight: 600; color: var(--ink); }
.escalate-s { font-size: 12px; color: #7A6070; }

.wpis-foot {
  padding: 16px 26px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  background: var(--sunk); flex-wrap: wrap;
}
.draft-note { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--good); font-weight: 600; }
.wpis-foot .btn { padding: 10px 16px; font-size: 13px; }
.wpis-foot .btn-primary { padding: 10px 20px; font-size: 13px; }

.form-error {
  padding: 10px 13px; border-radius: 8px;
  background: var(--crit-bg); border: 1px solid #F0D3D0;
  font-size: 12.5px; color: var(--crit-fg); font-weight: 600;
}

/* --- Wrzutka (Wrzutka.dc.html) --- */

.wrzutka {
  width: 460px; max-width: 100%;
  max-height: 100%;
  background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px;
}
.wrz-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line-2); }
.wrz-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.wrz-sub { font-size: 12.5px; color: var(--ink-5); line-height: 1.45; }
.wrz-body { flex-grow: 1; padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.wrz-label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 9px; }
.wrz-kinds { display: flex; flex-wrap: wrap; gap: 7px; }
.wrz-kind {
  padding: 8px 13px; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-3);
  font-size: 12.5px; font-weight: 600;
}
.wrz-kind.is-on { border-color: var(--magenta); background: var(--sel-row); color: var(--magenta-x); }
.wrz-times { display: flex; gap: 7px; }
.wrz-time {
  flex-grow: 1; flex-basis: 0; text-align: center;
  padding: 12px 0; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-3);
  font-size: 13px; font-weight: 700;
}
.wrz-time.is-on { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
.wrz-for {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk-2);
}
.wrz-for select {
  flex-grow: 1; min-width: 0;
  border: 0; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.wrz-for .note { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.wrz-desc { border: 1px solid var(--line); border-radius: 8px; }
.wrz-desc:focus-within { border-color: var(--magenta); }
.wrz-desc textarea {
  display: block; width: 100%; border: 0; resize: vertical;
  padding: 12px 13px; min-height: 58px;
  font-size: 13px; color: var(--ink-2); line-height: 1.5; background: transparent;
}
.wrz-desc textarea::placeholder { color: var(--muted-2); }
.wrz-wbs input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px; font-size: 13px; }
.wrz-repeat { border-top: 1px solid var(--line-2); padding-top: 15px; }
.wrz-repeat-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em;
  color: var(--muted-2); text-transform: uppercase; margin-bottom: 10px;
}
.wrz-repeat-list { display: flex; flex-direction: column; gap: 6px; }
.wrz-repeat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%;
}
.wrz-repeat-item:hover { border-color: var(--magenta-d); }
.wrz-repeat-item .t { flex-grow: 1; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.wrz-repeat-item .t b { font-weight: 600; }
.wrz-repeat-item .md { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.wrz-foot {
  padding: 15px 22px; border-top: 1px solid var(--line);
  background: var(--sunk); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.wrz-foot .hint { font-size: 11.5px; color: var(--muted); }
.wrz-foot .hint b { font-weight: 600; color: var(--ink-2); }
.wrz-foot .btn-primary { padding: 10px 20px; border-radius: 8px; }

/* ===========================================================================
   KOKPIT  (Kokpit.dc.html)
   =========================================================================== */

.kokpit {
  flex-grow: 1; min-height: 0;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
}
.k-row1 { display: flex; gap: 16px; height: 340px; flex-shrink: 0; }
.k-row2 { display: flex; gap: 16px; flex-grow: 1; min-height: 300px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex; flex-direction: column;
  min-width: 0;
}
.card-title { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 3px; }
.card-sub { font-size: 12px; color: var(--muted); }

.k-rytm { width: 640px; flex-shrink: 0; }
.k-rytm-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.k-big { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.k-delta { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 3px; }
.k-delta span { font-size: 12px; font-weight: 600; }

.k-chart { flex-grow: 1; display: flex; flex-direction: column; min-height: 0; }
.k-bars {
  flex-grow: 1; display: flex; align-items: flex-end; gap: 8px;
  padding-bottom: 2px; border-bottom: 1px solid var(--line);
}
.k-bar-col { flex-grow: 1; flex-basis: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.k-bar-lbl { font-size: 11px; font-weight: 700; margin-bottom: 5px; height: 14px; }
.k-bar { width: 100%; border-radius: 4px 4px 0 0; }
.k-dates { display: flex; gap: 8px; margin-top: 7px; }
.k-dates div { flex-grow: 1; flex-basis: 0; text-align: center; font-size: 10px; color: var(--muted-2); font-weight: 500; }
.k-goal {
  display: flex; align-items: center; gap: 7px;
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-soft);
}
.k-goal-dash { width: 18px; height: 2px; background: var(--neutral-bar); border-radius: 1px; flex-shrink: 0; }
.k-goal-t { font-size: 11.5px; color: var(--muted); }
.k-goal-t b { font-weight: 700; color: var(--ink-2); }

.k-legend { display: flex; gap: 16px; margin: 12px 0 16px; flex-wrap: wrap; }
.k-legend-item { display: flex; align-items: center; gap: 6px; }
.k-legend-sw { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.k-legend-lbl { font-size: 11.5px; font-weight: 600; color: var(--ink-4); }
.k-legend-n { font-size: 11.5px; font-weight: 700; color: var(--ink); }

.k-areas { flex-grow: 1; display: flex; flex-direction: column; gap: 13px; justify-content: center; }
.k-area { display: flex; align-items: center; gap: 12px; }
.k-area-name { width: 132px; flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: right; }
.k-area-track { flex-grow: 1; display: flex; gap: 2px; height: 22px; min-width: 0; }
.k-area-seg { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.k-area-seg span { font-size: 11px; font-weight: 700; color: #FFFFFF; }
.k-area-total { width: 24px; flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: var(--ink); }

.k-cap { width: 440px; flex-shrink: 0; }
.k-cap-legend { display: flex; gap: 13px; margin-bottom: 15px; flex-wrap: wrap; }
.k-cap-legend .k-legend-sw { width: 8px; height: 8px; }
.k-cap-legend .k-legend-lbl { font-size: 11px; }
.k-load { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.k-load-row { display: flex; align-items: center; gap: 10px; }
.k-load-name { width: 132px; flex-shrink: 0; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-load-track {
  flex-grow: 1; display: flex; gap: 2px; height: 16px;
  background: var(--bg); border-radius: 4px; overflow: hidden; min-width: 0;
}
.k-load-util { width: 34px; flex-shrink: 0; font-size: 12px; font-weight: 700; text-align: right; }
.k-cap-foot {
  margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}
.k-cap-foot .hi { font-weight: 700; color: var(--magenta-d); }
.k-cap-foot b { font-weight: 700; }

.k-dec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.k-dec-badge { font-size: 12px; font-weight: 700; color: #FFFFFF; background: var(--crit); padding: 3px 9px; border-radius: 5px; }
.k-dec-list { flex-grow: 1; display: flex; flex-direction: column; gap: 8px; }
.k-dec {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 9px;
  border: 1px solid var(--line-3); background: var(--sunk-2);
}
.k-dec.crit { border-color: #F0D3D0; background: #FDF7F6; }
.k-dec-bar { width: 3px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.k-dec-who { width: 140px; flex-shrink: 0; min-width: 0; }
.k-dec-klient { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-dec-usluga { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-dec-text { flex-grow: 1; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; min-width: 0; }
.k-dec-side { width: 108px; flex-shrink: 0; text-align: right; }
.k-dec-side .kto { font-size: 11.5px; font-weight: 600; color: var(--ink-4); }
.k-dec-side .age { font-size: 11px; font-weight: 700; }

/* ===========================================================================
   ZESPÓŁ / OBŁOŻENIE  (Obciazenie.dc.html)
   =========================================================================== */

.zespol {
  flex-grow: 1; min-height: 0;
  padding: 18px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.z-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.z-head h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.z-week {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px;
}
.z-week .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.z-week button { display: flex; padding: 3px; border-radius: 4px; }
.z-week button:hover { background: var(--line-soft); }
.z-scope { display: flex; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; overflow: hidden; }
.z-scope > * { padding: 7px 13px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.z-scope > .is-on { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.z-scope > [aria-disabled='true'] { opacity: .5; cursor: default; }

.z-tiles { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }
.z-tile {
  flex-grow: 1; flex-basis: 160px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
}
.z-tile.accent { border: 1.5px solid var(--magenta); padding: 13px 16px; box-shadow: 0 1px 3px rgba(226,0,116,0.10); }
.z-tile-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.z-tile-sw { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.z-tile-lbl { font-size: 11.5px; font-weight: 600; color: var(--ink-5); }
.z-tile.accent .z-tile-lbl { font-weight: 700; color: var(--magenta-x); }
.z-tile-row { display: flex; align-items: baseline; gap: 7px; }
.z-tile-val { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.z-tile-sub { font-size: 12px; color: var(--muted-2); font-weight: 500; }

.z-cols { flex-grow: 1; display: flex; gap: 14px; min-height: 0; align-items: stretch; }
.z-main { flex-grow: 1; min-width: 0; padding: 18px 20px; }
.z-side { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; min-height: 0; }

.z-main-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.z-main-head h2 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }

.z-people { display: flex; flex-direction: column; gap: 2px; }
.z-person {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 8px; background: var(--surface); width: 100%;
}
.z-person:hover { background: var(--sunk); }
.z-person.is-open { background: #F7F6F8; }
.z-person-name { width: 148px; flex-shrink: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-person-track {
  flex-grow: 1; display: flex; gap: 2px; height: 20px;
  background: var(--bg); border-radius: 5px; overflow: hidden; min-width: 0;
}
.z-person-md { width: 56px; flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-4); text-align: right; }
.z-person-util { width: 92px; flex-shrink: 0; text-align: right; font-size: 13px; font-weight: 700; }

.z-detail {
  margin: 2px 0 8px 48px;
  padding: 12px 15px;
  background: var(--sunk); border: 1px solid var(--line-2); border-radius: 9px;
  display: flex; gap: 26px; flex-wrap: wrap;
}
.z-detail-col { flex-grow: 1; min-width: 220px; }
.z-detail-col.wrz { width: 300px; flex-grow: 0; flex-shrink: 0; }
.z-detail-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.z-detail-sw { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.z-detail-title { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.z-detail-list { display: flex; flex-direction: column; gap: 5px; }
.z-detail-line { display: flex; gap: 10px; }
.z-detail-line .l { flex-grow: 1; font-size: 12.5px; color: var(--ink-2); }
.z-detail-line .v { font-size: 12px; font-weight: 600; color: var(--ink-4); }
.z-detail-empty { font-size: 12.5px; color: var(--muted-2); }

.z-note {
  padding-top: 13px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--muted); line-height: 1.5;
}

.z-kinds { display: flex; flex-direction: column; gap: 11px; }
.z-kind-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.z-kind-lbl { flex-grow: 1; font-size: 12.5px; color: var(--ink-2); }
.z-kind-md { font-size: 12px; font-weight: 700; color: var(--ink); }
.z-kind-track { height: 8px; background: var(--bg); border-radius: 4px; }
.z-kind-fill { height: 100%; background: var(--magenta-d); border-radius: 4px; }
.z-kinds-foot {
  margin-top: 15px; padding: 12px 14px;
  background: var(--sel-row); border: 1px solid var(--sel-bd); border-radius: 9px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.55;
}
.z-kinds-foot b { font-weight: 700; }

.z-abs { display: flex; flex-direction: column; gap: 9px; }
.z-abs-row { display: flex; align-items: center; gap: 10px; }
.z-abs-name { flex-grow: 1; font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-abs-kind { font-size: 11.5px; color: var(--muted); }
.z-abs-when { font-size: 11.5px; font-weight: 600; color: var(--ink-4); }

/* ===========================================================================
   TELEFON  (Telefon.dc.html) — poniżej 720 px
   =========================================================================== */

.mhead { display: none; }
.tabbar { display: none; }

.m-portfel { display: none; }

.m-banner {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  background: var(--sel-row); border: 1px solid var(--sel-bd); border-radius: 10px;
}
.m-banner-t { font-size: 13.5px; font-weight: 700; }
.m-banner-s { font-size: 12px; color: #7A6070; }

@media (max-width: 719px) {
  .topbar { display: none; }

  .mhead {
    display: block;
    padding: 18px 18px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .mhead-row { display: flex; align-items: center; gap: 10px; }
  .mhead-logo { width: 20px; height: 20px; border-radius: 4px; background: var(--magenta); flex-shrink: 0; }
  .mhead-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; flex-grow: 1; }
  .mhead-extra:not(:empty) { margin-top: 14px; }

  .tabbar {
    display: flex; align-items: center; justify-content: space-around;
    height: 62px; flex-shrink: 0;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 0 12px;
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    min-width: 56px; min-height: 44px; justify-content: center;
    color: var(--muted-2);
    font-size: 10.5px; font-weight: 600;
  }
  .tab.is-active { color: var(--magenta); font-weight: 700; }
  .tab-fab {
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--magenta);
    display: flex; align-items: center; justify-content: center;
    margin-top: -18px; border: 3px solid var(--surface);
  }
  .tab.fab { color: var(--magenta-x); font-weight: 700; }

  /* portfel: układ telefonu zamiast tabeli */
  .shell { flex-direction: column; }
  .sidebar { display: none; }
  .d-portfel { display: none; }
  .m-portfel {
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px 18px;
    flex-grow: 1; overflow-y: auto; min-height: 0;
  }
  .m-sec {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
    color: var(--muted-2); text-transform: uppercase;
  }
  .m-sec + .m-sec, .m-card + .m-sec { margin-top: 10px; }
  .m-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 15px; display: flex; flex-direction: column; gap: 11px;
    color: var(--ink);
  }
  a.m-card:hover { color: var(--ink); border-color: var(--muted-2); }
  .m-card.compact { flex-direction: row; align-items: center; gap: 9px; }
  .m-card-row { display: flex; align-items: center; gap: 9px; }
  .m-card-bar { width: 4px; height: 32px; border-radius: 2px; flex-shrink: 0; }
  .m-card-main { flex-grow: 1; min-width: 0; }
  .m-card-klient { font-size: 15px; font-weight: 700; }
  .m-card-sub { font-size: 12.5px; color: var(--ink-5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-card-age { padding: 4px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
  .m-card-ok { display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px; background: var(--good-bg); flex-shrink: 0; }
  .m-card-ok span { font-size: 11.5px; font-weight: 700; color: var(--good); }
  .m-cta {
    display: flex; align-items: center; justify-content: center;
    height: 44px; background: var(--magenta); border-radius: 9px;
    font-size: 14px; font-weight: 600; color: #FFFFFF; width: 100%;
  }
  .m-attn { display: flex; flex-direction: column; gap: 9px; }
  .m-attn-head { display: flex; align-items: center; gap: 8px; }
  .m-attn-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .m-attn-title { font-size: 13.5px; font-weight: 700; flex-grow: 1; min-width: 0; }
  .m-attn-age { font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
  .m-attn-text { font-size: 12.5px; color: var(--ink-4); line-height: 1.5; }

  /* cele dotknięcia >= 44 px */
    .mini-btn, .wrz-repeat-item, .wrz-wbs input, .risk-add,
  .wrz-for select, .risk-form input, .risk-form select, .risk-form textarea,
  .m-portfel a, .m-portfel button { min-height: 44px; }
  .m-card.compact { min-height: 44px; }

  /* pozostałe ekrany: kolumny układają się pionowo */
  .kokpit, .zespol { padding: 16px 14px; }
  .k-row1, .k-row2, .z-cols { flex-direction: column; height: auto; }
  .k-rytm, .k-cap, .z-side { width: 100%; }
  .k-row2 { min-height: 0; }
  .proj { border: 0; }
  .proj-head, .sec { padding-left: 18px; padding-right: 18px; }
  .metric:first-child { padding-left: 20px; }
  .proj-metrics { grid-template-columns: minmax(0, 1fr); }
  .entry-cols { grid-template-columns: minmax(0, 1fr); }
  .wpis { border-radius: 0; height: 100%; max-height: none; }
  .wrzutka { border-radius: 0; height: 100%; max-height: none; border: 0; }
  .sig-picker { flex-wrap: wrap; }
  .sig-opt { flex-basis: calc(50% - 4px); min-height: 44px; }
  .wrz-time, .wrz-kind, .btn, .btn-primary { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; margin: -8px -10px 0 0; }

  /* Wiersz „wymaga decyzji” na telefonie: treść pod nagłówkiem, a nie
     w 100-pikselowej kolumnie między dwiema innymi. */
  .k-dec { flex-wrap: wrap; }
  .k-dec-who { width: auto; flex-grow: 1; }
  .k-dec-side { width: auto; }
  .k-dec-text { flex-basis: 100%; order: 3; }
  .z-week button { width: 44px; height: 44px; justify-content: center; }
  .tl-more { min-height: 44px; }
}

@media (min-width: 720px) and (max-width: 1200px) {
  .k-row1, .k-row2, .z-cols { flex-direction: column; height: auto; }
  .k-rytm, .k-cap, .z-side { width: 100%; }
  .kokpit .k-row1 { min-height: 340px; }
}

/* ===========================================================================
   KOMUNIKATY
   =========================================================================== */

.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #FFFFFF;
  padding: 11px 15px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(22,20,26,0.22);
  max-width: 380px;
}
.toast.err { background: var(--crit); }
.toast.ok { background: var(--good); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .sk { animation: none; background: #EEECF1; }
}
