/* =========================================================================
   Menedżer zadań — style oparte na designie „Design Space V3" z Figmy.
   Dark mode domyślnie. Tokeny 1:1 ze zmiennymi z Figmy.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* Kolory */
  --bg:            #050508;   /* Neutral - Stone/800 */
  --panel-bg:      rgba(255,255,255,.02);
  --panel-solid:   #0a0a0d;   /* nieprzezroczysty odpowiednik panelu (dla przypiętej kolumny) */
  --panel-border:  rgba(255,255,255,.10);
  --line:          rgba(255,255,255,.10);
  --surface:       #101114;   /* Neutral - Stone/600 */
  --text:          #ffffff;
  --text-2:        #cfd6e2;   /* Stone/400 */
  --text-3:        #ecf0f9;   /* Stone/200 */
  --lime:          #bbe87d;   /* Primary - Lime/400 */
  --lime-600:      #a3d65c;
  --red:           #e7000b;   /* Error - Red/100 */
  --red-800:       #460809;
  --green-800:     #052e16;   /* Success - Green/800 */
  --amber-800:     #2e1105;   /* (Secondary/800 w Figmie) */
  --amber:         #f4cc44;
  --button-frame: linear-gradient(180deg, rgba(255,255,255,.56) 0%, rgba(255,255,255,.22) 46%, rgba(255,255,255,.04) 100%);
  --button-frame-muted: linear-gradient(180deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,.10) 48%, rgba(255,255,255,.02) 100%);
  --row-hover: rgba(255,255,255,.035);
  --row-active: rgba(187,232,125,.12);

  /* Typografia */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Odstępy / promienie */
  --sp-2: 8px; --sp-3: 12px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --radius: 14px;
  --radius-full: 9999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  min-height: 100vh;
}
/* Sidebar i warstwy popupów blokują przewijanie zawartości znajdującej się
   pod nimi. Scroll pozostaje dostępny wewnątrz samego drawera/modala. */
html:has(.drawer-backdrop), html:has(.modal-backdrop), html:has(.dp-backdrop),
body:has(.drawer-backdrop), body:has(.modal-backdrop), body:has(.dp-backdrop) {
  overflow: hidden;
}
[x-cloak] { display: none !important; }

a { color: var(--lime); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, [role="button"]:focus-visible { outline: 1px dashed var(--lime); outline-offset: 3px; }
button:disabled { cursor: not-allowed; }

/* --- Panel „szkło" --------------------------------------------------------- */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: var(--sp-6);
}

/* --- Navbar ---------------------------------------------------------------- */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-8) var(--sp-10);
}
.logo { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: -0.5px; }
.logo span { color: var(--lime); }

/* --- Przyciski ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border: 1px solid transparent; border-radius: var(--radius-full);
  padding: 0 24px; font-family: var(--font-head); font-weight: 600;
  font-size: 12px; line-height: 1; text-transform: uppercase; letter-spacing: .35px;
  white-space: nowrap; transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn > i { margin-right: 0 !important; font-size: 16px; }
.btn-outline { background: linear-gradient(#101114,#101114) padding-box, var(--button-frame-muted) border-box; border-color: transparent; color: #fff; }
.btn-outline:hover { background: linear-gradient(var(--lime-600),var(--lime-600)) padding-box, var(--button-frame) border-box; color: var(--bg); }
.btn-primary { background: linear-gradient(var(--lime),var(--lime)) padding-box, var(--button-frame) border-box; color: var(--bg); }
.btn-primary:hover { background: linear-gradient(var(--lime-600),var(--lime-600)) padding-box, var(--button-frame) border-box; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 1px dashed var(--lime); outline-offset: 4px; }
.btn:disabled, .btn[disabled] { background: linear-gradient(#cfd6e2,#cfd6e2) padding-box, var(--button-frame-muted) border-box; border-color: transparent; color: #737b87; cursor: not-allowed; transform: none; }
.btn.danger-btn { color: #ff7d7d; background: linear-gradient(#101114,#101114) padding-box, linear-gradient(180deg,rgba(255,125,125,.5),rgba(255,255,255,.08),rgba(231,0,11,.04)) border-box; border-color: transparent; }
.btn.danger-btn:hover { background: linear-gradient(#e7000b,#e7000b) padding-box, linear-gradient(180deg,rgba(255,255,255,.5),rgba(255,255,255,.12),rgba(255,125,125,.04)) border-box; color: #fff; }
.btn-link {
  background: none; border: 0; color: var(--text); font-family: var(--font-head);
  font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .35px;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 0;
}
.btn-link .plus {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid transparent; background: linear-gradient(#34373d,#34373d) padding-box, var(--button-frame) border-box;
  color: #fff; font-size: 16px; line-height: 1;
}
.btn-link:hover { color: var(--lime); }
.btn-link:focus-visible { outline: 1px dashed var(--lime); outline-offset: 4px; }
.btn-icon {
  background: none; border: 0; color: var(--text-2); padding: 4px;
  display: inline-grid; place-items: center;
}
.btn-icon:hover { background: none; color: var(--text); }
.btn-icon:focus-visible { outline: 1px dashed var(--lime); outline-offset: 3px; }
.btn-icon:disabled { background: none; color: #737b87; opacity: .45; cursor: not-allowed; }
.login-card .btn { min-height: 56px; padding-inline: 32px; font-size: 13px; }
.sidebar-add-client { margin-top: 12px; }
.sidebar-add-client:hover .plus { background: linear-gradient(#454951,#454951) padding-box, var(--button-frame) border-box; color: #fff; }

/* --- Layout ---------------------------------------------------------------- */
.layout { display: flex; gap: var(--sp-8); padding: 0 var(--sp-10) var(--sp-10); align-items: flex-start; }
/* Menu boczne przypięte do góry przy scrollowaniu */
.sidebar { display: flex; flex-direction: column; gap: var(--sp-8); width: 320px; flex-shrink: 0; position: sticky; top: 16px; align-self: flex-start; max-height: calc(100vh - 32px); overflow-y: auto; }
/* Panele menu bocznego: wypełnienie 5% */
.sidebar .panel { background: rgba(255,255,255,.05); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-8); padding-top: var(--sp-2); }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-head); font-weight: 500; font-size: 14px;
  text-transform: uppercase; letter-spacing: -0.5px; color: var(--text);
  margin-bottom: var(--sp-6);
}
.panel-list { display: flex; flex-direction: column; }
.nav-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px 0; color: var(--text-2); font-size: 16px; background: none; border: 0; width: 100%; text-align: left;
  transition: color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.nav-item .ico { width: 20px; height: 20px; opacity: .8; }
.nav-item:hover { color: var(--text); background: var(--row-hover); }
.nav-item.active, .nav-item.active:hover { color: var(--text); font-weight: 500; background: var(--row-active); box-shadow: inset 3px 0 0 var(--lime); }

.client-row {
  display: flex; align-items: center; gap: var(--sp-3); padding: 10px 0;
  color: var(--text-2); font-size: 16px; background: none; border: 0; width: 100%; text-align: left;
  transition: color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.client-row:hover { color: var(--text); background: var(--row-hover); }
.client-row.active, .client-row.active:hover { color: var(--text); background: var(--row-active); box-shadow: inset 3px 0 0 var(--lime); }
.dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.divider { height: 1px; background: var(--line); width: 100%; }

.page-title {
  font-family: var(--font-head); font-weight: 500; font-size: 30px;
  text-transform: uppercase; letter-spacing: -1.5px; margin: 0;
}
.muted { color: var(--text-2); }
.badge-count { color: var(--text-2); font-size: 12px; }

/* --- Podsumowania klienta -------------------------------------------------- */
.stats { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.stat { padding: 12px 16px; border: 1px solid var(--panel-border); background: var(--panel-bg); min-width: 140px; }
.stat .k { font-size: 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; }
.stat .v { font-size: 20px; font-family: var(--font-head); margin-top: 4px; }

/* --- Tabela zadań (CSS Grid) ----------------------------------------------- */
/* Wspólny szablon kolumn (grid-template-columns) ustawiany inline zarówno na
   nagłówku, jak i na wierszach → idealne wyrównanie. Kolumny mają stałą szerokość
   w px (konfigurowalną przeciąganiem), więc tabela przewija się w poziomie, a
   pierwsza kolumna (tytuł) jest przypięta (position: sticky) i zawsze widoczna. */
.table-panel { padding: var(--sp-3) var(--sp-6) var(--sp-6); overflow-x: auto; }
.trow {
  display: grid; align-items: center;
  padding: 10px 0; min-height: 44px; width: 100%;
}
/* Pierwsza kolumna elastyczna odsunięta od linii (border-right kolumny tytułu) o 24px */
.trow > .col-title + .col { padding-left: 24px; }
.trow + .trow, .thead + .trow, .trow.add-row { border-top: 1px solid var(--line); }
.thead { color: var(--text-2); font-size: 12px; padding: 10px 0; }

/* Hover zadań — warstwa tła wychodzi do krawędzi panelu, bez przesuwania treści. */
.trow:has(.title-text.title-link) { position: relative; isolation: isolate; }
.trow:has(.title-text.title-link)::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--sp-6));
  z-index: 0;
  pointer-events: none;
}
.trow:has(.title-text.title-link) > .col { z-index: 1; }
.trow:has(.title-text.title-link) .col-title { z-index: 2; }
.trow:has(.title-text.title-link):not(:has(.row-grip.selected)):hover::before { background: var(--row-hover); }
.trow:has(.title-text.title-link):not(:has(.row-grip.selected)):hover .col-title { background: transparent; }
.trow:has(.title-text.title-link):hover .title-link { text-decoration: none; }

/* Przypięta kolumna tytułu — zawsze widoczna, z linią (border-right) jako granicą */
.col-title {
  position: sticky; left: 0; z-index: 2;
  display: flex; align-items: center; gap: var(--sp-3); min-width: 0;
  background: var(--panel-solid); border-right: 1px solid var(--line);
  padding-right: 14px; align-self: stretch;
}
.trow.thead .col-title { align-items: center; }
.col { min-width: 0; position: relative; padding-right: 16px; }
.col > * { max-width: 100%; }
/* Wiersz „Dodaj zadanie" — bez przypinania i linii */
.add-row .col-title { position: static; background: none; border-right: 0; z-index: auto; }
.cell-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Uchwyt zmiany szerokości kolumny (na nagłówku) */
.col-resize {
  position: absolute; top: 0; right: 0; width: 10px; height: 100%;
  cursor: col-resize; z-index: 3;
}
.col-resize::after {
  content: ''; position: absolute; top: 20%; right: 4px; width: 2px; height: 60%;
  background: transparent; transition: background .12s;
}
.col-resize:hover::after { background: var(--lime); }
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing * { cursor: col-resize !important; }

.title-text {
  font-size: 16px; color: var(--text-2); background: none; border: 0; width: 100%;
  padding: 2px 4px; border-radius: 6px; font-family: inherit;
}
.title-text:focus { outline: 1px solid var(--panel-border); color: var(--text); background: var(--surface); }

/* Kółko = przełącznik widoczności w „Moje zadania" (1:1 z Figmy: 12px, obwódka #f4cc44, środek 6px).
   Kropka w środku = widoczne w „Moje zadania"; pusta obwódka = tylko w liście klienta. */
.mt-toggle {
  width: 12px; height: 12px; border-radius: var(--radius-full); border: 1px solid var(--amber);
  flex-shrink: 0; background: none; padding: 0; position: relative; cursor: pointer;
}
.mt-toggle .fill {
  position: absolute; top: 50%; left: 50%; width: 6px; height: 6px;
  border-radius: var(--radius-full); background: var(--amber); transform: translate(-50%, -50%);
}
/* Obwódka zawsze widoczna (#f4cc44) — zmienia się wyłącznie środkowa kropka. */
.mt-toggle[aria-pressed="false"] .fill { display: none; }

/* Chip klienta */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
  border: 1px solid var(--panel-border); font-size: 12px; color: var(--text-2);
  background: rgba(255,255,255,.06); border-radius: var(--radius-full); max-width: 100%;
}
.chip .sq { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

/* Chip priorytetu */
.chip-prio {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
  border: 1px solid var(--panel-border); font-size: 12px; color: #fff; border-radius: 0;
}
.chip-prio[data-prio="high"] { background: var(--red-800); }
.chip-prio[data-prio="urgent"] { background: #542a78; }
.chip-prio[data-prio="normal"] { background: var(--amber-800); }
.chip-prio[data-prio="low"]    { background: var(--green-800); }
.chip-prio[data-prio="none"]   { background: rgba(255,255,255,.06); color: var(--text-2); }

/* Timer w wierszu — w ramce jak w designie */
.time-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 0 0 8px;
  border: 1px solid var(--panel-border); background: var(--panel-bg);
  font-size: 12px; color: #fff; font-variant-numeric: tabular-nums; border-radius: 0; cursor: pointer;
}
.time-chip.running { background: var(--red-800); }
.time-chip:hover { background: rgba(255,255,255,.08); }
/* Chip czasu z osobnym przyciskiem start/stop + strzałką do logów */
.time-chip .tc-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.time-chip .tc-caret { display: inline-grid; place-items: center; box-sizing: border-box; width: 24px; min-width: 24px; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; margin-left: 4px; border-left: 1px solid var(--panel-border); height: 24px; }
.time-chip .tc-caret i { font-size: 12px; }
.time-chip .tc-caret:hover { color: var(--lime); }

/* Popup wpisów czasu */
.time-pop {
  position: fixed; width: min(590px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; z-index: 71;
  overscroll-behavior: contain;
  background: #0b0d10; border: 1px solid #292d33;
  box-shadow: 0 28px 80px rgba(0,0,0,.72); padding: 28px 32px; display: flex; flex-direction: column; gap: 0;
}
.time-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.time-pop-head .tph-title { font-family: var(--font-head); text-transform: uppercase; font-size: 14px; letter-spacing: .45px; color: #fff; }
.time-pop-close { width: 28px; height: 28px; color: var(--text-2); }
.time-pop-close:hover { color: #fff; background: rgba(255,255,255,.06); }
.time-list { order: 2; display: flex; flex-direction: column; max-height: 270px; overflow-y: auto; margin-top: 22px; border-top: 1px solid var(--line); }
.time-empty { font-size: 13px; color: var(--text-2); padding: 18px 0; line-height: 1.5; }
.time-row { border-top: 1px solid var(--line); padding: 0; }
.time-row:first-child { border-top: 0; }
.time-view { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.time-view:hover { background: var(--row-hover); }
.time-range { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-dur { font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; font-weight: 600; }
.time-view .icon-btn.sm { opacity: .72; }
.time-view:hover .icon-btn.sm { opacity: 1; }
.time-edit { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; }
.tef-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tef-row .dur-input { flex: 1; min-width: 90px; }
.time-edit-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.time-edit input, .time-add-row input {
  background: var(--bg); border: 1px solid var(--panel-border); color: var(--text);
  font-family: inherit; font-size: 13px; padding: 8px 10px;
}
.time-edit input:focus, .time-add-row input:focus { outline: none; border-color: rgba(187,232,125,.5); }
.time-edit .dash, .time-add-row .dash { color: var(--text-2); }

/* Sekcja dodawania czasu */
.time-add { order: 1; display: flex; flex-direction: column; gap: 18px; padding-top: 18px; }
.time-add-head { display: block; }
.time-add .k { display: none; }
.time-add .seg { display: flex; width: 100%; }
.time-add-row { display: flex; align-items: stretch; gap: 8px; }
.time-add-row.range { flex-wrap: wrap; }
.time-add-row .dur-input { flex: 1; min-width: 0; }
.time-add-row .btn { min-height: 42px; padding: 8px 16px; white-space: nowrap; }
.time-add-hint { display: none; }
.time-add-hint b { color: var(--text); font-weight: 600; }
.time-pop-footer {
  order: 3; display: flex; justify-content: flex-end; gap: 8px;
  margin: 24px -32px -28px; padding: 20px 32px 28px; border-top: 1px solid var(--line); background: #0b0d10;
}

/* Segmentowany przełącznik trybu */
.seg { display: inline-flex; align-items: flex-end; gap: 28px; border: 0; border-bottom: 1px solid var(--line); }
.seg button {
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); font-family: var(--font-head); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: .35px; padding: 0 0 11px; margin-bottom: -1px; cursor: pointer; transition: color .12s, border-color .12s;
}
.seg button + button { border-left: 0; }
.seg button:hover { color: var(--text); }
.seg button.on { background: transparent; color: #fff; border-bottom-color: var(--lime); font-weight: 500; }

/* Daty / wyceny inline */
.inline-input {
  background: none; border: 0; color: var(--text-2); font-family: inherit; font-size: 14px;
  padding: 2px 4px; border-radius: 6px; width: 100%;
}
.inline-input:focus { outline: 1px solid var(--panel-border); color: var(--text); background: var(--surface); }
.inline-input.overdue { color: var(--red); }
select.inline-input { cursor: pointer; }

/* Pionowy separator w wierszu (po nazwie zadania) */
.vsep { width: 1px; align-self: stretch; background: var(--line); flex-shrink: 0; }

/* Komórka daty: etykieta + strzałka; natywny picker jako przezroczysta nakładka */
.date-cell { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--text-2); font-size: 14px; }
.date-cell.lime { color: var(--lime); }
.date-cell.overdue { color: var(--red); }
.date-cell .caret { width: 12px; height: 12px; opacity: .7; flex-shrink: 0; }
.date-cell .overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer; }

/* Komórka priorytetu: chip z flagą + przezroczysty select jako nakładka */
.prio-cell { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1px solid var(--panel-border); color: #fff; font-size: 12px; font-weight: 500; }
.prio-cell[data-prio="high"] { background: var(--red-800); }
.prio-cell[data-prio="urgent"] { background: #542a78; }
.prio-cell[data-prio="normal"] { background: var(--amber-800); }
.prio-cell[data-prio="low"]    { background: var(--green-800); }
.prio-cell[data-prio="none"]   { background: rgba(255,255,255,.06); color: var(--text-2); }
.prio-cell .ph-flag-banner { font-size: 12px; flex-shrink: 0; }
.prio-cell .overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; }

/* Komórka wyceny — pole dopasowane do kwoty, „zł" tuż obok */
.money-cell { display: inline-flex; align-items: baseline; gap: 2px; }
.money-cell input { width: auto; min-width: 1ch; padding: 2px 0; text-align: left; }
.money-cell .unit { color: var(--text-2); font-size: 14px; }

/* Ikona play/stop w chipie czasu */
.time-chip .ico { display: inline-flex; width: 12px; height: 12px; }
.time-chip .ico svg { width: 12px; height: 12px; }
.time-chip:not(.running) .ico { color: var(--text-2); }

/* Ukryj strzałki w polach liczbowych */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Strzałka w nagłówku panelu + zwijanie */
.panel-head { cursor: pointer; user-select: none; }
.panel-head .caret { width: 16px; height: 16px; opacity: .6; flex-shrink: 0; transition: transform .15s; }
.panel-head .caret.collapsed { transform: rotate(-90deg); }

/* Avatar + chip użytkownika w navbarze */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0;
  color: var(--text-2); font-family: inherit; font-size: 13px; padding: 4px 6px; border-radius: var(--radius-full);
}
.user-chip:hover { color: #fff; background: rgba(255,255,255,.06); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: inline-grid; place-items: center; background: var(--lime); color: var(--bg);
  font-family: var(--font-head); font-weight: 600; font-size: 13px; text-transform: uppercase;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }

/* Ikona Phosphor w pozycji menu */
.nav-item i.ico { font-size: 20px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; opacity: .9; }

/* --- Strona główna: statystyki --------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); }
.stat-row.four { grid-template-columns: repeat(4, 1fr); }
.stat-tile {
  min-width: 0; padding: 4px 20px; border-left: 1px solid rgba(255,255,255,.25);
  display: flex; flex-direction: column; gap: 2px;
}
.stat-h { font-family: var(--font-head); font-weight: 500; font-size: 16px; text-transform: uppercase; letter-spacing: -0.8px; color: #fff; white-space: nowrap; }
.stat-sub { font-size: 12px; color: var(--text-2); }
.stat-num { font-family: var(--font-head); font-weight: 400; font-size: 30px; letter-spacing: -1.5px; color: var(--lime); line-height: 1.2; margin-top: 8px; white-space: nowrap; }
@media (max-width: 1240px) { .stat-row { grid-template-columns: repeat(3, 1fr); row-gap: 24px; } }
@media (max-width: 620px)  { .stat-row { grid-template-columns: repeat(2, 1fr); } }

/* --- Strona główna: panele ------------------------------------------------- */
.home-cols { display: flex; gap: 32px; align-items: stretch; }
.home-cols > .home-panel { flex: 1 1 0; min-width: 0; }
.home-panel { display: flex; flex-direction: column; gap: 20px; }
.home-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-head); font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: -0.7px; color: #fff;
}
/* Ikonowy przycisk dodawania — sama ikona, bez tła i obwódki */
.round-add { background: none; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--text-2); flex-shrink: 0; }
.round-add i { font-size: 18px; }
.round-add:hover { color: #fff; background: none; }
.round-add:focus-visible { outline: 1px dashed var(--lime); outline-offset: 3px; }
.home-list { display: flex; flex-direction: column; }
.home-row { position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.home-row.first { border-top: 0; }
.home-row::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--sp-6)); z-index: 0; pointer-events: none; }
.home-row > * { position: relative; z-index: 1; }
.home-row:hover::before { background: var(--row-hover); }
.home-row:hover .title-link, .home-row .title-link:hover { text-decoration: none; }
.reminder { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.reminder-wrap { border-top: 1px solid var(--line); }
.reminder-wrap.first { border-top: 0; }
.rem-title { cursor: pointer; }
.rem-title:hover { color: #fff; }
.rem-note-preview { flex: 1 1 180px; min-width: 0; color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.rem-note-preview:hover { color: var(--lime); }
.rem-note { padding: 0 0 12px 30px; }
.rem-note textarea {
  width: 100%; min-height: 64px; resize: vertical; background: var(--bg);
  border: 1px solid var(--panel-border); color: var(--text); font-family: inherit; font-size: 13px; padding: 10px 12px;
}
.rem-note textarea:focus { outline: none; border-color: rgba(255,255,255,.25); }
.rem-modal-note {
  width: 100%; min-height: 72px; resize: vertical; box-sizing: border-box; background: var(--bg);
  border: 1px solid var(--panel-border); color: var(--text); font-family: inherit; font-size: 14px; padding: 10px 12px;
}
.rem-modal-note:focus { outline: none; border-color: rgba(255,255,255,.25); }

/* Pole daty/godziny z ręcznym wpisywaniem + przyciskiem pickera */
.dt-input { display: inline-flex; align-items: center; border: 1px solid var(--panel-border); background: var(--bg); }
.dt-input.wide { width: 100%; }
.dt-input .dt-text { flex: 1; min-width: 0; width: 96px; background: none; border: 0; color: var(--text); font-family: inherit; font-size: 13px; padding: 7px 9px; }
.dt-input .dt-text.time { width: 60px; }
.dt-input .dt-text:focus { outline: none; }
.dt-input .dt-text::placeholder { color: var(--text-3); opacity: .7; }
.dt-input .dt-pick { background: none; border: 0; border-left: 1px solid var(--panel-border); color: var(--text-2); cursor: pointer; padding: 7px 9px; display: inline-grid; place-items: center; }
.dt-input .dt-pick:hover { color: var(--lime); }
.dt-input .dt-pick i { font-size: 15px; }
.home-task-title { flex: 1 1 0; min-width: 0; font-size: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-row .chip { flex-shrink: 0; }
.home-date { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-2); flex-shrink: 0; }
.home-date i { font-size: 14px; }
.home-date.lime { color: var(--lime); }
.home-date.overdue { color: var(--red); }

/* Przypomnienia */
.reminder .rem-bell { font-size: 16px; color: var(--text-2); flex-shrink: 0; }
.reminder.overdue .rem-bell { color: var(--red); }
.reminder.today .rem-bell { color: var(--amber); }
.rem-title { flex: 1 1 0; min-width: 0; font-size: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rem-date { font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.rem-actions { display: flex; gap: 12px; flex-shrink: 0; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.reminder:hover .rem-actions, .reminder:focus-within .rem-actions { opacity: 1; pointer-events: auto; }
.rem-edit { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font-family: inherit; font-size: 16px; }
.rem-edit:focus { outline: none; }
/* Edytor przypomnienia: treść + data + godzina + akcje */
.rem-editor { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rem-editor .rem-edit {
  flex: 1 1 140px; min-width: 120px; background: var(--bg);
  border: 1px solid var(--panel-border); color: #fff; font-size: 14px; padding: 7px 10px;
}
.rem-editor .rem-edit-note { flex: 1 0 100%; min-height: 58px; resize: vertical; box-sizing: border-box; background: var(--bg); border: 1px solid var(--panel-border); color: var(--text); font: inherit; font-size: 13px; padding: 8px 10px; }
.rem-editor .rem-edit-note:focus { outline: none; border-color: rgba(187,232,125,.5); }
.rem-note-read { width: 100%; box-sizing: border-box; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; color: var(--text-2); font-size: 13px; line-height: 1.5; padding: 10px 12px; background: var(--bg); border: 1px solid var(--panel-border); }
@media (max-width: 520px) { .rem-note { padding-left: 0; } .rem-note-read { padding: 10px; } }
.rem-editor input.rem-edit:focus { outline: none; border-color: rgba(187,232,125,.5); }
/* Modal przypomnienia: data + godzina obok siebie */
.rem-modal-row { display: flex; gap: 12px; }
.rem-modal-row .field { flex: 1; min-width: 0; }

/* Pole-trigger daty/godziny (otwiera własny picker) */
.dt-field {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg); border: 1px solid var(--panel-border); color: var(--text);
  font-family: inherit; font-size: 13px; padding: 7px 10px; cursor: pointer; min-width: 116px;
}
.dt-field.wide { width: 100%; }
.dt-field:hover { border-color: rgba(255,255,255,.22); }
.dt-field.is-empty span { color: var(--text-2); }
.dt-field i { font-size: 15px; color: var(--text-2); flex-shrink: 0; }
.dt-field:hover i { color: var(--lime); }

/* Wybór godziny (własny time picker) — spójny z kalendarzem .dp-pop */
.clock-pop {
  position: fixed; width: 200px; z-index: 71; background: #14161c; border: 1px solid var(--panel-border);
  box-shadow: 0 16px 48px rgba(0,0,0,.55); padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.clock-head { display: flex; align-items: center; justify-content: space-between; }
.clock-now { font-family: var(--font-head); font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.clock-clear { background: none; border: 0; color: var(--text-2); font-family: var(--font-head); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; cursor: pointer; }
.clock-clear:hover { color: #fff; }
.clock-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clock-col { display: flex; flex-direction: column; gap: 2px; max-height: 176px; overflow-y: auto; }
.clock-opt { background: none; border: 0; color: var(--text); font-family: inherit; font-size: 13px; padding: 6px 0; cursor: pointer; text-align: center; border-radius: 6px; font-variant-numeric: tabular-nums; }
.clock-opt:hover { background: rgba(255,255,255,.08); }
.clock-opt.on { background: var(--lime); color: var(--bg); font-weight: 600; }

/* Historia kopii zapasowych */
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.bk-row:first-of-type { border-top: 0; }
.bk-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk-name { font-size: 14px; color: #fff; }
.bk-sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-actions { display: flex; gap: 14px; flex-shrink: 0; }
.btn-link.danger { color: #ff6b6b; }

/* Eksport — wybór pól */
.exp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.exp-fields label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.exp-fields input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--lime); cursor: pointer; }

/* Ustawienia klientów — stawki */
.cs-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.cs-row:first-of-type { border-top: 0; }
.cs-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; color: #fff; }
.cs-name .sq { width: 12px; height: 12px; flex-shrink: 0; }
.cs-rate { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cs-rate input { width: 90px; background: var(--bg); border: 1px solid var(--panel-border); color: var(--text); font-family: inherit; font-size: 14px; padding: 7px 10px; }
.cs-rate input:focus { outline: none; border-color: rgba(255,255,255,.25); }
.cs-rate .unit { color: var(--text-2); font-size: 13px; }

/* Klienci: szczegóły — 2 kolumny (statystyki+ustawienia | notatki+komentarze) */
.cs-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; align-items: start; }
.cs-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.cs-stats { grid-template-columns: repeat(5, 1fr); }
.client-company-section { border-top: 1px solid var(--line); padding-top: 16px; }
.client-company-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 600; color: var(--text); }
.client-company-head i { font-size: 18px; color: var(--accent); }
.client-company-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; }
.client-company-grid .company-wide { grid-column: 1 / -1; }
@media (max-width: 1100px) { .cs-stats { grid-template-columns: repeat(3, 1fr); row-gap: 24px; } }
@media (max-width: 620px)  { .cs-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .client-company-grid { grid-template-columns: 1fr; } .client-company-grid .company-wide { grid-column: auto; } }
.cs-notes { width: 100%; min-height: 120px; resize: vertical; box-sizing: border-box; background: var(--bg); border: 1px solid var(--panel-border); color: var(--text); font-family: inherit; font-size: 14px; padding: 10px 12px; }
.status-vis { display: flex; flex-direction: column; gap: 2px; }
.sv-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; padding: 5px 0; }
.sv-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--lime); cursor: pointer; flex-shrink: 0; }
.sv-dot { width: 10px; height: 10px; flex-shrink: 0; }
.cs-notes:focus { outline: none; border-color: rgba(255,255,255,.25); }
@media (max-width: 1100px) { .cs-grid { grid-template-columns: 1fr; } }

/* Widok „Klienci”: wybór klienta po lewej, jego informacje w jednej kolumnie po prawej. */
.cl-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.cl-list {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.cs-list-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 10px 8px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.cs-list-row:hover { background: var(--row-hover); }
.cs-list-row.active, .cs-list-row.active:hover { border-color: transparent; background: var(--row-active); box-shadow: inset 3px 0 0 var(--lime); }
.cs-name { overflow: hidden; }
.cs-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-detail { min-width: 0; }
.cl-detail-inner { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.cl-empty { min-height: 260px; display: grid; place-items: center; border: 1px dashed var(--line); color: var(--text-2); text-align: center; padding: 32px; }
.client-list-actions { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.client-settings-sections { display: flex; flex-direction: column; gap: 24px; }
.client-settings-box { display: flex; flex-direction: column; gap: 16px; }
.client-box-title {
  font-family: var(--font-head); font-size: 14px; font-weight: 500; line-height: 1.3;
  text-transform: uppercase; letter-spacing: -.35px; color: var(--text);
}
.client-settings-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .cl-layout { grid-template-columns: 1fr; }
  .cl-list { position: static; max-height: 300px; }
}
@media (max-width: 620px) {
  .client-settings-actions .btn { width: 100%; }
}

/* Komentarze klienta */
.cc-list { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; }
.cc-item { background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cc-body { font-size: 14px; color: #fff; white-space: pre-wrap; word-break: break-word; }
.cc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.cc-meta button { background: none; border: 0; color: var(--text-2); cursor: pointer; display: inline-grid; place-items: center; }
.cc-meta button:hover { color: #ff6b6b; }
.cc-add { display: flex; gap: 8px; }
.cc-add input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--panel-border); color: var(--text); font-family: inherit; font-size: 14px; padding: 9px 12px; }
.cc-add input:focus { outline: none; border-color: rgba(255,255,255,.25); }

/* Klienci: lista → wybór */
.cs-list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; transition: color .12s ease, background-color .12s ease, box-shadow .12s ease; }
.cs-list-row:first-of-type { border-top: 0; }
.cs-list-row:hover .cs-name { color: #fff; }
.cs-list-row.active, .cs-list-row.active:hover { background: var(--row-active); box-shadow: inset 3px 0 0 var(--lime); }

/* Wiersze w panelach: tylko warstwa stanu wychodzi przez wewnętrzny padding
   do krawędzi boxa. Treść i separatory zachowują swoje położenie. */
.nav-item, .client-row, .cs-list-row {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  box-shadow: none !important;
}
.nav-item::before, .client-row::before, .cs-list-row::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--sp-6));
  z-index: -1;
  pointer-events: none;
  background: transparent;
  transition: background-color .12s ease, box-shadow .12s ease;
}
.nav-item:hover::before,
.client-row:hover::before,
.cs-list-row:hover::before { background: var(--row-hover); }
.nav-item.active::before,
.nav-item.active:hover::before,
.client-row.active::before,
.client-row.active:hover::before,
.cs-list-row.active::before,
.cs-list-row.active:hover::before {
  background: var(--row-active);
  box-shadow: inset 3px 0 0 var(--lime);
}

/* Archiwum / zakończone z poprzednich miesięcy */
.arch-btn { padding: 7px 14px; font-size: 12px; }
.arch-table { display: flex; flex-direction: column; overflow-x: auto; }
.arch-row { display: grid; grid-template-columns: minmax(140px, 2.5fr) repeat(4, minmax(80px, 1fr)); gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.arch-row.arch-head { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.arch-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-title { color: #fff; }
.arch-month { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.arch-month:first-of-type { border-top: 0; padding-top: 0; }
.arch-month-head { display: flex; align-items: center; gap: 12px; }
.amh-title { font-family: var(--font-head); text-transform: uppercase; font-size: 13px; letter-spacing: .3px; color: #fff; }
.amh-sum { flex: 1; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.amh-actions { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
/* Limonkowa ikona archiwum na liście zakończonych */
.status-tool.arch-lime { color: var(--lime); }
.status-tool.arch-lime:hover { color: var(--lime-600); }

/* --- Taby (ustawienia) ----------------------------------------------------- */
.tabs { display: flex; align-items: flex-end; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; background: none; border: 0; color: var(--text-2); font-family: var(--font-head); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: .35px; padding: 0 0 12px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: #fff; }
.tab.active { color: #fff; border-bottom-color: var(--lime); }
.tab i { display: none; }

@media (max-width: 860px) {
  .home-cols { flex-direction: column; }
  .stat-tile { min-width: 45%; }
}

/* --- Własny kalendarz (date picker) ---------------------------------------- */
.dp-backdrop { position: fixed; inset: 0; z-index: 70; }
.dp-pop {
  position: fixed; width: 280px; z-index: 71;
  background: #14161c; border: 1px solid var(--panel-border);
  box-shadow: 0 16px 48px rgba(0,0,0,.55);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; }
.dp-title { font-family: var(--font-head); text-transform: uppercase; font-size: 13px; letter-spacing: .3px; color: #fff; }
.dp-nav { display: flex; gap: 4px; }
.dp-nav button { background: none; border: 0; color: var(--text-2); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; cursor: pointer; }
.dp-nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.dp-nav svg { width: 16px; height: 16px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-weekday { text-align: center; font-size: 11px; color: var(--text-2); padding: 4px 0; }
.dp-day { aspect-ratio: 1; border: 0; background: none; color: var(--text); font-family: inherit; font-size: 13px; border-radius: 6px; cursor: pointer; display: grid; place-items: center; }
.dp-day:hover { background: rgba(255,255,255,.08); }
.dp-day.other { color: rgba(255,255,255,.25); }
.dp-day.today { box-shadow: inset 0 0 0 1px var(--lime); color: var(--lime); }
.dp-day.selected { background: var(--lime); color: var(--bg); font-weight: 600; }
.dp-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.dp-foot button { background: none; border: 0; color: var(--lime); font-size: 12px; cursor: pointer; text-transform: uppercase; font-family: var(--font-head); letter-spacing: .3px; }
.dp-foot button.clear { color: var(--text-2); }
.dp-foot button:hover { color: #fff; }

/* Dropdown priorytetu */
.prio-pop {
  position: fixed; width: 170px; z-index: 71; background: #14161c; border: 1px solid var(--panel-border);
  box-shadow: 0 16px 48px rgba(0,0,0,.55); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.prio-opt {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; background: none; border: 0; cursor: pointer;
  color: var(--text); font-family: inherit; font-size: 13px; text-align: left; width: 100%;
}
.prio-opt:hover { background: var(--row-hover); }
.prio-swatch { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.prio-swatch i { font-size: 12px; }
.prio-swatch[data-prio="high"] { color: #e7000b; }
.prio-swatch[data-prio="urgent"] { color: #b66dff; }
.prio-swatch[data-prio="normal"] { color: #f48244; }
.prio-swatch[data-prio="low"]    { color: #70d432; }
.prio-swatch[data-prio="none"]   { color: var(--text-2); }

/* Menu kontekstowe (komentarze) */
.ctx-menu {
  position: fixed; min-width: 180px; z-index: 71; background: #14161c; border: 1px solid var(--panel-border);
  box-shadow: 0 16px 48px rgba(0,0,0,.55); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.dp-pop, .clock-pop, .prio-pop, .ctx-menu, .timer-pick {
  background: #0b0d10;
  border-color: #292d33;
  box-shadow: 0 24px 64px rgba(0,0,0,.68);
}
.ctx-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: none; border: 0; cursor: pointer;
  color: var(--text); font-family: inherit; font-size: 13px; text-align: left; width: 100%;
}
.ctx-item i { font-size: 16px; color: var(--text-2); }
.ctx-item:hover { background: var(--row-hover); }
.ctx-item.danger { color: #ff6b6b; }
.ctx-item.danger i { color: #ff6b6b; }

/* Komentarz: przypięty + edycja */
.comment2.pinned { box-shadow: inset 2px 0 0 0 var(--lime); }
.comment2-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.comment2-actions .pin-mark { font-size: 14px; color: var(--text-2); }
.comment2-date { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.comment2-edit {
  flex: 1; min-width: 0; background: none; border: 0; color: #fff; font-family: inherit; font-size: 14px; padding: 0;
}
.comment2-edit:focus { outline: none; }

/* Wiersz dodawania */
.add-row input {
  flex: 1; background: none; border: 0; color: var(--text); font-family: inherit; font-size: 16px;
  padding: 6px 4px;
}
.add-row input::placeholder { color: var(--text-2); opacity: .7; }
.add-row input:focus { outline: none; }
.add-row .plus-min { color: var(--lime); font-size: 18px; }

/* --- Modal ----------------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 85;
  padding: 16px;
}
.modal {
  width: min(520px, 96vw); max-height: calc(100vh - 32px); overflow-y: auto; background: #0b0d10; border: 1px solid #292d33;
  overscroll-behavior: contain;
  box-shadow: 0 28px 80px rgba(0,0,0,.72); padding: 28px 32px; display: flex; flex-direction: column; gap: 20px;
}
.modal h2 { font-family: var(--font-head); font-size: 14px; letter-spacing: .45px; text-transform: uppercase; margin: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: #090b0d; border: 1px solid #292d33; color: var(--text);
  padding: 11px 12px; font-family: inherit; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: rgba(187,232,125,.56); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.modal > .modal-actions, .modal > * > .modal-actions {
  margin: auto -32px -28px; padding: 20px 32px 28px; border-top: 1px solid var(--line); background: #0b0d10;
}
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatches button { width: 24px; height: 24px; border-radius: 6px; border: 2px solid transparent; }
.color-swatches button.sel { border-color: #fff; }

/* --- Login ----------------------------------------------------------------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 94vw); }
.login-card h1 { font-family: var(--font-head); text-transform: uppercase; font-size: 22px; margin: 0 0 4px; }
.login-card p { color: var(--text-2); margin: 0 0 24px; font-size: 14px; }

/* --- Toast ----------------------------------------------------------------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--red-800); border: 1px solid var(--red); color: #fff;
  padding: 12px 18px; font-size: 14px; z-index: 100; max-width: 90vw;
}
.toast.toast-warning { background: var(--amber-800); border-color: #f48244; }
.toast.toast-ok { background: var(--green-800); border-color: #70d432; }

/* --- Górny pasek: timer, dzwonek, profil ----------------------------------- */
.navbar-right { display: flex; align-items: center; gap: 16px; }
.nb-div { width: 1px; align-self: stretch; height: 24px; background: var(--panel-border); }

/* Timer w navbarze — 3 stany wg Figmy (off / on / on bez zadania) */
.timer-hud {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 4px 12px;
  color: #fff; font-size: 14px; letter-spacing: -0.42px; font-family: inherit;
}
.timer-hud.on { border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.02); }
.timer-hud.off { background: none; border: 0; cursor: pointer; }
.timer-hud .clock { color: var(--lime); font-size: 20px; flex-shrink: 0; }
.timer-hud.off .clock { color: var(--text-2); }
.timer-hud .hud-txt { max-width: 320px; }
.timer-hud .t { font-variant-numeric: tabular-nums; }
.timer-hud .hud-ico { font-size: 13px; color: #fff; }
.timer-hud.off:hover .hud-ico { color: var(--lime); }
.timer-hud .hud-btn { background: none; border: 0; color: #fff; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.timer-hud .hud-btn i { font-size: 14px; }
.timer-hud .hud-btn:hover { color: var(--lime); }
.timer-hud .hud-div { width: 1px; align-self: stretch; background: rgba(255,255,255,.1); margin: 0 2px; }

/* Popover wyboru zadania dla timera */
.timer-pick {
  position: fixed; width: 320px; max-width: calc(100vw - 16px); z-index: 86;
  background: #0b0d10; border: 1px solid #292d33; box-shadow: 0 24px 64px rgba(0,0,0,.68);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.timer-pick .field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.timer-pick select {
  width: 100%; background: var(--bg); border: 1px solid var(--panel-border); color: var(--text);
  font-family: inherit; font-size: 14px; padding: 9px 10px;
}
.timer-pick select:focus { outline: none; border-color: rgba(255,255,255,.25); }
.tp-tasks { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.tp-group { display: flex; flex-direction: column; gap: 2px; }
.tp-status { display: flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--text-2); padding: 4px 2px 2px; }
.tp-dot { width: 10px; height: 10px; flex-shrink: 0; }
.tp-task { text-align: left; background: none; border: 0; color: var(--text); font-family: inherit; font-size: 14px; padding: 7px 10px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-task:hover { background: var(--row-hover); color: #fff; }
.tp-new-task { display: flex; align-items: center; gap: 10px; border: 1px solid var(--panel-border); padding: 0 10px; }
.tp-new-task input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; padding: 10px 0; }
.tp-new-task input:focus { outline: none; }
.tp-new-task .icon-btn { color: var(--lime); font-size: 19px; }
.tp-footer { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding: 16px 16px; margin: 2px -16px -16px; background: #0b0d10; }

@media (max-width: 600px) {
  .time-pop, .modal { padding: 22px 20px; }
  .time-pop-footer { margin: 22px -20px -22px; padding: 18px 20px 22px; }
  .modal > .modal-actions, .modal > * > .modal-actions { margin-right: -20px; margin-bottom: -22px; margin-left: -20px; padding: 18px 20px 22px; }
  .tabs, .seg { gap: 22px; }
}

/* Dzwonek + badge */
.nb-bell { position: relative; }
.nb-bell i { font-size: 20px; }
.nb-badge {
  position: absolute; top: -4px; right: -5px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 9999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
/* Dropdown powiadomień */
.nb-pop {
  position: fixed; width: 300px; z-index: 71; background: #14161c; border: 1px solid var(--panel-border);
  box-shadow: 0 16px 48px rgba(0,0,0,.55); padding: 12px; display: flex; flex-direction: column; gap: 4px;
}
.nb-pop-head { font-family: var(--font-head); text-transform: uppercase; font-size: 13px; letter-spacing: .3px; color: #fff; margin-bottom: 6px; }
.nb-item {
  display: flex; align-items: center; gap: 10px; padding: 8px; background: none; border: 0; cursor: pointer;
  color: var(--text-2); font-family: inherit; font-size: 14px; width: 100%;
}
.nb-item:hover { background: var(--row-hover); color: #fff; }
.nb-item i { font-size: 16px; color: var(--text-2); flex-shrink: 0; }
.nb-item.overdue i { color: var(--red); }
.nb-item.today i { color: var(--amber); }

/* Chip profilu */
.user-chip i { color: var(--text-2); }

.empty { color: var(--text-2); padding: 32px 0; text-align: center; }

.price-view { display:flex; flex-direction:column; gap:16px; max-width:960px; }
.price-view { max-width:none; width:100%; }
.price-list { width:100%; border-top:1px solid var(--line); }
.price-row { display:flex; align-items:center; gap:16px; min-height:58px; border-bottom:1px solid var(--line); padding:0 12px; }
.price-row:hover { background:var(--row-hover); }
.price-row-main { display:grid; grid-template-columns:minmax(220px,2fr) minmax(140px,1fr) minmax(110px,.6fr); gap:16px; align-items:center; flex:1; min-width:0; cursor:pointer; }
.price-row-name { color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.price-row-category,.price-row-price { color:var(--text-2); font-size:14px; }
.price-row-price { text-align:right; color:var(--text); }
.price-row-actions { display:flex; gap:6px; flex-shrink:0; }
@media(max-width:640px){.price-row{padding:10px 0;align-items:flex-start}.price-row-main{grid-template-columns:1fr;gap:3px}.price-row-price{text-align:left}.price-row-actions{padding-top:2px}}
.price-new,.price-top,.price-item { display:flex; gap:10px; align-items:center; }
.price-new input,.price-top input,.price-item input,.price-card textarea { background:var(--bg); border:1px solid var(--panel-border); color:var(--text); font:inherit; padding:8px 10px; min-width:0; }
.price-new input,.price-top input { flex:1; }
.price-card { display:flex; flex-direction:column; gap:14px; }
.price-view .price-card { padding: 0; }
.price-view .price-card > .price-top { padding: 12px 16px; }
.price-view .price-card > textarea, .price-view .price-card > .price-section { display: none; }
.price-card textarea { min-height:70px; width:100%; box-sizing:border-box; resize:vertical; }
.price-name { font-size:17px !important; font-weight:600; }
.price-section { display:flex; flex-direction:column; gap:7px; border-top:1px solid var(--line); padding-top:12px; }
.price-item input:not([type=checkbox]) { flex:1; }
@media (max-width:620px){.price-new,.price-top{flex-wrap:wrap}.price-new input,.price-top input{flex:1 1 42%}}

/* --- Drag & drop zadań ----------------------------------------------------- */
.status-group .trow[draggable="true"] { cursor: default; }
.drag-handle {
  display: inline-flex; align-items: center; color: var(--text-2); cursor: grab;
  opacity: .5; flex-shrink: 0; margin-right: 2px;
}
.drag-handle:active { cursor: grabbing; }
.trow:hover .drag-handle { opacity: 1; }
.drag-handle svg { width: 16px; height: 16px; }
.trow.dragging { opacity: .35; }
.trow.drag-over { box-shadow: inset 0 2px 0 0 var(--lime); }         /* linia wstawienia nad wierszem */
.table-panel.card-drop { outline: 1px dashed var(--lime); outline-offset: -1px; }

/* Checkbox zaznaczenia — na stałe w miejscu ikony drag&drop (funkcja drag zostaje na wierszu) */
.row-grip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 20px; flex-shrink: 0; margin-right: 2px; }
.row-grip .drag-handle { display: none; }
.row-check {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--text-2);
}
.row-check i { font-size: 16px; line-height: 1; }
.row-check:hover i { color: #fff; }
/* Zaznaczony task: wyraźny stan na pełnej szerokości; hover go nie nadpisuje. */
.row-grip.selected .row-check,
.row-grip.selected .row-check:hover i { color: var(--lime); }
.row-grip.selected .row-check i { color: var(--lime); }
.head-check { color: var(--text-2); }
.head-check.on i, .head-check.some i { color: var(--lime); }
.trow:has(.row-grip.selected) { background: transparent; box-shadow: none; }
.trow:has(.row-grip.selected)::before { background: var(--row-active); box-shadow: inset 3px 0 0 var(--lime); }
.trow:has(.row-grip.selected) .col-title { background: transparent; }

/* Menu statusu w akcjach zbiorczych */
.ctx-head { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--text-2); padding: 6px 10px 4px; }
.ctx-empty { font-size: 13px; color: var(--text-2); padding: 6px 10px 8px; }
.ctx-item .st-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Pasek akcji zbiorczych (wyjeżdża z dołu) */
.bulk-bar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 20px; z-index: 90;
  background: #14161c; border: 1px solid var(--panel-border); box-shadow: 0 16px 48px rgba(0,0,0,.55);
  padding: 10px 12px 10px 18px; max-width: calc(100vw - 32px);
  animation: bulkUp .18s ease-out;
}
@keyframes bulkUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.bulk-info { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; white-space: nowrap; }
.bulk-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--lime); color: var(--bg); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums;
}
.bulk-actions { display: flex; align-items: center; gap: 4px; }
.bulk-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; background: transparent; border: 0; border-radius: var(--radius-full); cursor: pointer;
  color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; padding: 0 16px;
}
.bulk-btn i { font-size: 16px; color: var(--text-2); }
.bulk-btn:hover { background: linear-gradient(var(--lime-600),var(--lime-600)) padding-box, var(--button-frame) border-box; color: var(--bg); }
.bulk-btn:hover i { color: var(--bg); }
.bulk-btn:focus-visible { outline: 1px dashed var(--lime); outline-offset: 3px; }
.bulk-btn.danger { color: #ff6b6b; }
.bulk-btn.danger i { color: #ff6b6b; }
.bulk-btn.accent { color: var(--lime); }
.bulk-btn.accent i { color: var(--lime); }
.bulk-btn.accent:hover { color: var(--bg); }
.bulk-btn.accent:hover i { color: var(--bg); }
.bulk-btn.danger:hover { background: linear-gradient(var(--red),var(--red)) padding-box, linear-gradient(180deg,rgba(255,255,255,.5),rgba(255,255,255,.12),rgba(255,125,125,.04)) border-box; color: #fff; }
.bulk-btn.danger:hover i { color: #fff; }
.bulk-close {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 4px;
  background: none; border: 0; border-left: 1px solid var(--panel-border); color: var(--text-2); cursor: pointer;
}
.bulk-close i { font-size: 16px; }
.bulk-close:hover { color: #fff; }

/* --- Grupy statusów w widoku klienta --------------------------------------- */
.status-group { display: flex; flex-direction: column; }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.status-tools { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.status-tool { background: none; border: 0; padding: 4px; color: var(--text-2); cursor: pointer; display: inline-grid; place-items: center; }
.status-tool:hover { color: #fff; background: none; }
.status-tool:focus-visible { outline: 1px dashed var(--lime); outline-offset: 3px; }
.status-tool i { font-size: 18px; }
.status-caret .caret { width: 16px; height: 16px; transition: transform .15s; }
.status-caret.collapsed .caret { transform: rotate(-90deg); }
.status-pill {
  cursor: pointer; display: inline-flex; align-items: center; height: 24px; padding: 0 12px;
  color: var(--bg); font-family: var(--font-body); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}
/* Input wyboru koloru (widok Statusy) */
.color-input {
  width: 28px; height: 22px; padding: 0; border: 1px solid var(--panel-border);
  background: none; border-radius: 6px; cursor: pointer; flex-shrink: 0;
}
.color-input::-webkit-color-swatch-wrapper { padding: 2px; }
.color-input::-webkit-color-swatch { border: none; border-radius: 3px; }

/* Klikalny tytuł zadania (otwiera panel szczegółów) */
.title-link { cursor: pointer; }
.title-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* --- Drawer: panel szczegółów zadania -------------------------------------- */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60;
  display: flex; justify-content: flex-end;
}
.drawer {
  width: min(827px, 96vw); height: 100vh; overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(255,255,255,.02); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  border-left: 1px solid var(--panel-border);
  padding: var(--sp-10); display: flex; flex-direction: column; gap: var(--sp-10);
}
.drawer .divider { background: var(--line); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }

/* Ikonowe przyciski (Phosphor) */
.icon-btn {
  background: none; border: 0; color: var(--text-2); padding: 0; cursor: pointer;
  display: inline-grid; place-items: center; line-height: 1;
}
.icon-btn i { font-size: 18px; }
.icon-btn:hover { color: #fff; background: none; }
.icon-btn:focus-visible { outline: 1px dashed var(--lime); outline-offset: 3px; }
.icon-btn:disabled { background: none; color: #737b87; opacity: .45; cursor: not-allowed; }
.icon-btn.sm i { font-size: 16px; }
.drawer-actions { display: flex; gap: 16px; align-items: center; }

/* Selektor statusu w nagłówku (kropka + nazwa + caret, natywny select jako nakładka) */
.status-select {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px;
  border: 1px solid var(--panel-border); background: var(--panel-bg); color: #fff; font-size: 12px; font-weight: 500;
}
.status-select .status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-select .mt-toggle { position: relative; z-index: 2; }
.status-select > i { font-size: 12px; color: var(--text-2); }
.status-select .overlay { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; }

.drawer-title {
  font-family: var(--font-head); font-size: 24px; text-transform: uppercase; letter-spacing: -1.2px;
  color: #fff; background: none; border: 0; width: 100%; padding: 2px 0; font-weight: 500;
}
.drawer-title:focus { outline: none; border-bottom: 1px solid var(--panel-border); }

/* Pola: 2 rzędy po 4, pionowe separatory + poziomy między rzędami */
.drawer-fields { display: flex; flex-direction: column; gap: 16px; }
.drawer-row { display: flex; gap: 32px; align-items: flex-start; }
.drawer-row .drawer-field { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.drawer-row .drawer-field > * { max-width: 100%; }
.drawer-field .k { font-size: 12px; color: var(--text-2); }
.drawer-field .fval { font-size: 14px; color: var(--text-2); }
.fdiv { width: 1px; align-self: stretch; background: var(--line); flex-shrink: 0; }

/* Ikony Phosphor w komórkach pól */
.date-cell .ph-calendar-blank { font-size: 14px; }
.date-cell .caret { font-size: 12px; opacity: .7; }
.prio-cell i, .time-chip i { font-size: 12px; }
.prio-cell .ph-caret-down { opacity: .8; }

/* Przypisane */
.assignee {
  display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px;
  background: var(--panel-bg); border: 1px solid var(--panel-border); color: var(--text-2);
  font-family: inherit; font-size: 12px; cursor: pointer; max-width: 100%;
}
.assignee.on { color: #fff; }
.assignee i { font-size: 12px; opacity: .7; }
.assignee-av { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.mt-toggle.sm { width: 12px; height: 12px; }
.assignee .mt-toggle.sm[aria-pressed="false"] .fill { display: none; }

/* Opis / bloki */
.drawer-block { display: flex; flex-direction: column; gap: 8px; }
.drawer-input {
  background: none; border: 1px solid var(--panel-border); color: var(--text);
  font-family: inherit; font-size: 14px; padding: 14px 16px; width: 100%; resize: vertical;
}
.drawer-input::placeholder { color: var(--text-3); opacity: .5; }
.drawer-input:focus { outline: none; border-color: rgba(255,255,255,.25); }

/* Lista (checklist) */
.checklist { display: flex; flex-direction: column; gap: 10px; }
.check-item { display: flex; align-items: center; gap: 12px; }
.checkbox {
  width: 18px; height: 18px; flex-shrink: 0; border: 2px solid rgba(255,255,255,.25); background: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--bg); padding: 0;
}
.checkbox i { font-size: 12px; line-height: 1; display: block; opacity: 0; }
.checkbox.on { background: var(--lime); border-color: var(--lime); }
.checkbox.on i { opacity: 1; }
.check-label { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font-family: inherit; font-size: 14px; padding: 2px 0; }
.check-label:focus { outline: none; }
.check-label.done { color: var(--text-2); text-decoration: line-through; }
.check-add { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.check-add i { font-size: 16px; }
.check-add input { flex: 1; background: none; border: 0; color: var(--text); font-family: inherit; font-size: 14px; padding: 2px 0; }
.check-add input:focus { outline: none; }

/* Komentarze (wg designu) */
.comment2 {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--surface); min-height: 48px; padding: 12px 16px;
}
.comment2-body { font-size: 14px; color: #fff; white-space: pre-wrap; word-break: break-word; }
.comment-add {
  display: flex; align-items: flex-end; gap: 16px; min-height: 48px;
  background: var(--bg); border: 1px solid rgba(255,255,255,.25); padding: 0 16px;
}
.comment-add input, .comment-add textarea { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font-family: inherit; font-size: 14px; }
.comment-add input { padding: 12px 0; }
.comment-add textarea { padding: 12px 0; }
.comment-add input::placeholder, .comment-add textarea::placeholder { color: var(--text-3); opacity: .5; }
.comment-add input:focus, .comment-add textarea:focus { outline: none; }
.comment-grow { display: block; resize: none; line-height: 20px; min-height: 44px; max-height: 224px; overflow-y: hidden; }
.comment-add > .icon-btn, .comment-add .attach-btn { margin-bottom: 12px; flex-shrink: 0; }
.comment-add .ca-div { width: 1px; height: 20px; background: var(--line); flex-shrink: 0; align-self: flex-end; margin-bottom: 12px; }
.attach-btn { display: inline-grid; place-items: center; cursor: pointer; color: var(--text-2); }
.attach-btn i { font-size: 18px; }
.attach-btn:hover { color: #fff; }

/* Załączniki */
.attach-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.attach-item { display: flex; flex-direction: column; gap: 8px; width: 112px; }
.attach-card {
  position: relative; width: 112px; height: 112px; display: grid; place-items: center;
  background: var(--panel-bg); border: 1px solid var(--panel-border); color: var(--text-2);
  backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); cursor: pointer;
}
.attach-card:hover { color: #fff; border-color: rgba(255,255,255,.25); }
.attach-card i { font-size: 40px; }
.attach-del {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(5,5,8,.7); border: 0; color: var(--text-2); display: none; place-items: center; cursor: pointer;
}
.attach-del i { font-size: 12px; }
.attach-item:hover .attach-del { display: grid; }
.attach-del:hover { color: #fff; }
.attach-name { font-size: 12px; color: var(--text-3); max-width: 112px; }
.attach-add .attach-card { border-style: dashed; }
.attach-add .attach-card i { font-size: 28px; }

@media (max-width: 640px) {
  .drawer { padding: 20px; gap: 24px; }
  .drawer-row { flex-wrap: wrap; }
  .drawer-row .drawer-field { flex: 1 1 40%; }
  .drawer-row .fdiv { display: none; }
}

/* Na wąskim ekranie zachowujemy układ tabeli. Kolumny nie łamią kontrolek,
   tylko przewijają się poziomo pod przypiętą nazwą zadania. */
@media (max-width: 760px) {
  .table-panel { overflow-x: auto; }
}

/* --- Responsywnie ---------------------------------------------------------- */
/* Tabele NIE zamieniają się w karty — na mniejszym ekranie przewijają się
   poziomo z przypiętą kolumną tytułu (zgodnie z zachowaniem ClickUp). */
@media (max-width: 860px) {
  .navbar, .layout { padding-left: 16px; padding-right: 16px; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
}
