/* PowerDO — sub-marka AI POWER (CI v1.0): Navy + Ember, Barlow + JetBrains Mono. Tokeny wg powerdo-tokens.css. */
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(fonts/Barlow-Regular.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(fonts/Barlow-Medium.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(fonts/Barlow-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(fonts/Barlow-Bold.woff2) format("woff2"); }

:root {
  --pd-navy: #0B1F4B; --pd-ember: #FF6F2C; --pd-ember-mid: #E05A14; --pd-ember-deep: #B83B08; --pd-ember-light: #FF8E4F;
  --r-s: 6px; --r: 12px; --r-l: 20px;
  --card2: #F4F5F8; --bg: #F5F6F8; --surface: #FFFFFF; --hover: #ECEEF2; --line: #D3D8DF; --side: #EEF0F4;
  --tx: #1B2030; --body: #373E4D; --mut: #5A6272;
  --lab: var(--mut); --icc: var(--mut);   /* etykiety sekcji i ikony: w jasnym neutralne, akcent tylko tam, gdzie coś jest aktywne */
  --acc: var(--pd-ember-mid); --acc-tx: var(--pd-ember-deep); --acc-soft: rgba(224, 90, 20, .10);
  --btn: #2B3345; --btn-tx: #FFFFFF; --btn-hover: #1B2233; --on-acc: #FFFFFF;
  --err: #B3261E; --err-soft: rgba(179, 38, 30, .08);
  --shadow: 0 10px 32px rgba(27, 34, 51, .12);
  --sans: Barlow, system-ui, "Segoe UI", sans-serif; --mono: Barlow, system-ui, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --card2: #4E525C; --bg: #3B3E46; --surface: #474B54; --hover: #545964; --line: #6B717D;
    --tx: #FFFFFF; --body: #E3E6EC; --mut: #BCC3CF;
    --acc: var(--pd-ember); --acc-tx: var(--pd-ember-light); --acc-soft: rgba(255, 111, 44, .14);
    --btn: #FF6F2C; --btn-tx: #2A1204; --btn-hover: #FF8E4F; --on-acc: #2A1204;
    --err: #FF8A80; --err-soft: rgba(255, 138, 128, .12); --shadow: 0 12px 40px rgba(0, 0, 0, .45);
    --side: var(--surface); --lab: var(--acc-tx); --icc: var(--acc);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --card2: #4E525C; --bg: #3B3E46; --surface: #474B54; --hover: #545964; --line: #6B717D;
  --tx: #FFFFFF; --body: #E3E6EC; --mut: #BCC3CF;
  --acc: var(--pd-ember); --acc-tx: var(--pd-ember-light); --acc-soft: rgba(255, 111, 44, .14);
  --btn: #FF6F2C; --btn-tx: #2A1204; --btn-hover: #FF8E4F; --on-acc: #2A1204;
  --err: #FF8A80; --err-soft: rgba(255, 138, 128, .12); --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --side: var(--surface); --lab: var(--acc-tx); --icc: var(--acc);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--body); font: 400 16px/1.45 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; color: var(--tx); }
input:not([type=checkbox]):not([type=file]), select { min-height: 44px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
textarea { width: 100%; resize: vertical; }
a { color: var(--acc-tx); }
.mut { color: var(--mut); font-size: 13px; }
.mono, .cnt, .due, .tag, .cmeta, .chips .chip { font-family: var(--mono); font-weight: 500; }
body { font-variant-numeric: tabular-nums; }
.logo-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-l { display: none; } :root:not([data-theme="light"]) .logo-d { display: block; } }
:root[data-theme="dark"] .logo-l { display: none; }
:root[data-theme="dark"] .logo-d { display: block; }

/* logowanie */
.auth { max-width: 360px; margin: 14vh auto 0; padding: 0 16px; display: grid; gap: 12px; }
.auth .logo { margin: 0 0 8px; }
.auth .logo img { height: 36px; width: auto; }
.err { color: var(--err); margin: 0; font-weight: 500; }

/* układ */
#app { display: grid; grid-template-columns: var(--sidew, 260px) minmax(0, 1fr); height: 100dvh; }
#side { background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; padding: 20px 10px 10px; display: flex; flex-direction: column; }
#main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: margin-right .18s; }
body.panel-open #main { margin-right: 440px; }
#panel { display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; z-index: 8; background: var(--surface); border-left: 1px solid var(--line); border-radius: var(--r-l) 0 0 var(--r-l); box-shadow: var(--shadow); overflow-y: auto; padding: 16px 20px 28px; }
body.panel-open #panel { display: block; }
#back { display: none; }

/* pasek boczny: projekty */
.brand { display: block; padding: 0 10px 16px; cursor: pointer; }
.brand img { height: 26px; width: auto; }
.sec { display: flex; align-items: center; justify-content: space-between; color: var(--lab); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; padding: 20px 10px 6px; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-s); color: var(--body); font-weight: 500; position: relative; }
.nav:hover { background: var(--hover); }
.nav.act { background: var(--hover); color: var(--tx); font-weight: 600; }
.nav.act::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--acc); }
.nav .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .cnt { color: var(--mut); font-size: 12px; }
.ic { width: 14px; text-align: center; color: var(--ic, var(--icc)); }
.tab .ic, .nav .ic { color: var(--ic, var(--icc)); }
.tab.act .ic, .nav.act .ic { color: var(--ic, var(--acc)); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 1px var(--line); }
.foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.icon { color: var(--mut); padding: 6px 10px; border-radius: var(--r-s); font-size: 16px; min-height: 32px; }
.icon:hover { background: var(--hover); color: var(--tx); }

/* nagłówek + zakładki widoków */
#top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 22px 32px 0; max-width: 940px; width: 100%; margin: 0 auto; }
#top h2 { margin: 0; font: 700 31px/1.1 var(--sans); color: var(--tx); letter-spacing: -.01em; }
.fbtn { margin-left: auto; }
.search { width: 190px; }
.burger { display: none; }
.tabs { order: 5; flex: 0 0 100%; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); margin-top: 14px; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; color: var(--mut); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; min-height: 44px; }
.tab:hover { color: var(--tx); }
.tab.act { color: var(--tx); border-bottom-color: var(--acc); font-weight: 600; }
.tab .cnt { font-size: 12px; color: var(--mut); background: var(--hover); border-radius: 999px; padding: 0 8px; }
.tab .cnt:empty { display: none; }
.quickwrap { padding: 16px 32px 0; max-width: 940px; width: 100%; margin: 0 auto; }
#quick { width: 100%; background: var(--surface); font-size: 16px; }
#quick::placeholder { color: var(--mut); }
#list { overflow-y: auto; padding: 4px 32px 90px; flex: 1; }
#list > * { max-width: 876px; margin-left: auto; margin-right: auto; }

/* zadania: karty 1 px Line, bez cienia */
.grp { display: flex; align-items: center; gap: 8px; padding: 22px 0 8px; font: 600 17px var(--sans); color: var(--tx); }
.grp .mut { font: 400 12px var(--mono); }
.grp.red { color: var(--err); }
.grp.today::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
.sact { margin-left: auto; opacity: .45; }
.grp:hover .sact { opacity: 1; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; margin: 6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.task:hover { background: var(--hover); }
.task.sel { border-color: var(--acc); }
.chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--mut); flex: none; padding: 0; position: relative; }
.chk:hover { border-color: var(--acc); background: var(--acc-soft); }
.isdone .ttl { text-decoration: line-through; color: var(--mut); }
.isdone .chk { background: var(--acc); border-color: var(--acc); }
.isdone .chk::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--on-acc); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tmain { flex: 1; min-width: 0; }
.ttl { overflow-wrap: anywhere; font-weight: 500; color: var(--tx); font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--mut); font-size: 12px; margin-top: 4px; align-items: center; }
.meta:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.due { border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.due.red { background: var(--err-soft); border-color: transparent; color: var(--err); font-weight: 500; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--mut); cursor: pointer; text-decoration: none; }
.tag:hover { color: var(--acc-tx); background: var(--acc-soft); border-color: transparent; }
.star { color: var(--mut); font-size: 20px; padding: 4px 8px; opacity: .55; min-width: 40px; min-height: 40px; }
.star:hover { opacity: 1; color: var(--acc); }
.star.on { color: var(--acc); opacity: 1; }
.empty { color: var(--mut); text-align: center; padding: 56px 0; }

/* przyciski */
.btn { padding: 9px 16px; border-radius: var(--r); border: 1.5px solid var(--line); background: transparent; color: var(--tx); font-weight: 500; min-height: 44px; }
.btn:hover { background: var(--hover); }
.btn.pri { background: var(--btn); border-color: var(--btn); color: var(--btn-tx); font-weight: 600; }
.btn.pri:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.ghost { border-color: transparent; color: var(--mut); }
.btn.ghost:hover { color: var(--tx); background: var(--hover); }
.btn.danger { color: var(--err); }
#list > .btn { margin-top: 12px; display: block; }

/* panel zadania */
.phead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.phead .star { margin-left: auto; }
.ptitle { width: 100%; font: 700 24px var(--sans); margin-bottom: 8px; border-color: transparent; background: none; padding-left: 0; }
.ptitle:hover, .ptitle:focus { border-color: var(--line); background: var(--bg); padding-left: 12px; }
.fld { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; margin: 8px 0; }
.fld.col { grid-template-columns: 1fr; }
.fld label { color: var(--mut); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.fld .upl { text-transform: none; letter-spacing: 0; font: 500 15px var(--sans); color: var(--mut); }
.ctl { display: flex; gap: 6px; align-items: center; min-width: 0; }
.ctl > select, .ctl > input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 6px 104px; }
.btn.chip { padding: 2px 12px; min-height: 30px; font-size: 12px; border: 1px solid var(--line); color: var(--mut); border-radius: 999px; }
.att { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.att img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-s); display: block; }
.aname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx); }
.upl { margin-top: 6px; justify-self: start; cursor: pointer; }
.cmt { background: var(--bg); border-radius: var(--r); padding: 10px 12px; margin-bottom: 6px; }
.cmeta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.cbody { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--tx); }
.cadd { display: grid; gap: 6px; justify-items: end; margin-top: 8px; }
.pfoot { margin-top: 24px; }

/* dialog, toast */
dialog { background: var(--surface); color: var(--body); border: 1px solid var(--line); border-radius: var(--r-l); width: min(420px, 92vw); padding: 22px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(24, 27, 36, .5); }
dialog h3 { margin: 0 0 14px; font: 700 22px var(--sans); color: var(--tx); }
dialog input[type=text], dialog input:not([type]), dialog select { width: 100%; }
.frow { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 8px; margin: 8px 0; }
.frow label { color: var(--mut); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.swatches { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.sw.on { border-color: var(--tx); }
.chkl { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.dact { display: flex; gap: 8px; margin-top: 16px; }
.sp { flex: 1; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #2B3345; color: #fff; padding: 8px 8px 8px 18px; border-radius: var(--r); display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); z-index: 20; max-width: 92vw; border: 1px solid #6B717D; }
#toast .btn.ghost { color: var(--pd-ember-light); }
#toast .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
#toast[hidden] { display: none; }

/* telefon */
@media (max-width: 860px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  body.panel-open #main { margin-right: 0; }
  #side { position: fixed; inset: 0 auto 0 0; width: 284px; z-index: 10; transform: translateX(-100%); transition: transform .2s; }
  body.side-open #side { transform: none; }
  body.side-open #back { display: block; position: fixed; inset: 0; background: rgba(24, 27, 36, .5); z-index: 9; }
  .burger { display: inline-block; }
  .search { width: 130px; }
  #panel { width: 100%; border-left: 0; border-radius: 0; }
  #top, .quickwrap, #list { padding-left: 14px; padding-right: 14px; }
  #top h2 { font-size: 25px; }
  .chips { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { #side, #main { transition: none; } }

[hidden] { display: none !important; }

/* przełącznik Lista / Tablica */
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { padding: 6px 14px; color: var(--mut); font-weight: 500; min-height: 40px; }
.seg button.on { background: var(--btn); color: var(--btn-tx); }
.seg button:not(.on):hover { background: var(--hover); color: var(--tx); }

/* tablica (Kanban) */
#list > .board { max-width: none; margin: 0; }
.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 14px 2px 16px; }
.col { flex: 0 0 292px; background: var(--hover); border-radius: var(--r-l); padding: 12px; border: 1.5px solid transparent; }
.col.over { border-color: var(--acc); background: var(--acc-soft); }
.chead { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; color: var(--tx); font-size: 16px; }
.chead .mut { font: 400 12px var(--mono); }
.chead:hover .sact { opacity: 1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 8px; cursor: grab; position: relative; }
.card:hover { border-color: var(--mut); }
.card.sel { border-color: var(--acc); }
.card .cstar { position: absolute; top: 8px; right: 10px; color: var(--acc); font-size: 14px; }
.card .ttl { padding-right: 18px; }
.cquick { width: 100%; background: transparent; border: 1px dashed var(--line); }
.cquick:focus { background: var(--surface); border-style: solid; }
.addcol { flex: 0 0 200px; border: 1.5px dashed var(--line); min-height: 60px; align-self: stretch; }

/* podzadania, pola własne */
.sub { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.sub .chk { width: 20px; height: 20px; }
.sub.isdone .chk::after { left: 4px; top: 0; width: 5px; height: 10px; }
.sub .ttl { flex: 1; font-size: 15px; }
.subadd { margin-top: 6px; width: 100%; }
.fchip { font-family: var(--mono); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.frow2 { display: flex; align-items: center; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.frow2 > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* oś czasu */
#list > .tl { max-width: none; margin: 0; }
.tl { --tw: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); max-height: calc(100dvh - 250px); margin-top: 12px; }
.tl-head { position: sticky; top: 0; z-index: 4; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-corner { position: sticky; left: 0; z-index: 5; flex: 0 0 var(--tw); width: var(--tw); background: var(--surface); border-right: 1px solid var(--line); }
.tl-scale { flex: none; }
.tl-months, .tl-days { display: flex; }
.tl-m { overflow: hidden; white-space: nowrap; font: 600 12px var(--sans); color: var(--tx); padding: 4px 0 0 6px; height: 24px; border-left: 1px solid var(--line); }
.tl-d { flex: none; text-align: center; font: 400 11px/22px var(--mono); color: var(--mut); height: 22px; overflow: hidden; }
.tl-d.we { background: var(--hover); }
.tl-d.today { color: var(--acc-tx); font-weight: 700; border-bottom: 2px solid var(--acc); }
.tl-body { position: relative; }
.tl-row { display: flex; height: 42px; border-bottom: 1px solid var(--line); }
.tl-title { position: sticky; left: 0; z-index: 3; flex: 0 0 var(--tw); width: var(--tw); background: var(--surface); border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 10px; cursor: pointer; overflow: hidden; }
.tl-title:hover { background: var(--hover); }
.tl-title .ttl { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-title .cstar { position: static; }
.tl-track { position: relative; flex: none; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: var(--dw) 100%; }
.tl-track[title] { cursor: copy; }
.tl-bar { position: absolute; top: 8px; height: 26px; border-radius: 8px; display: flex; align-items: center; cursor: grab; touch-action: none; user-select: none; overflow: hidden; font: 600 12px var(--sans); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.tl-lbl { flex: 1; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tl-h { position: absolute; top: 0; bottom: 0; width: 30%; max-width: 9px; cursor: ew-resize; }
.tl-hs { left: 0; } .tl-he { right: 0; }
.tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--acc); pointer-events: none; }
.tl-grp { display: flex; align-items: center; height: 32px; background: var(--hover); border-bottom: 1px solid var(--line); }
.tl-grp > span { position: sticky; left: 0; z-index: 3; padding-left: 12px; font-weight: 600; color: var(--tx); }

/* konta i współdzielenie */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--acc-soft); color: var(--acc-tx); font: 600 11px var(--mono); flex: none; }
.who { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: var(--acc-soft); color: var(--acc-tx); font: 600 10px var(--mono); }
.urow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.urow.off { opacity: .55; }
.uname { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--tx); }
.sec2 { margin: 18px 0 4px; color: var(--tx); font: 600 15px var(--sans); }
.share { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
dialog { max-height: 90dvh; overflow-y: auto; }

/* licznik czasu pracy */
.tchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border: 1.5px solid var(--acc); border-radius: 999px; color: var(--acc-tx); font: 500 13px var(--mono); background: var(--acc-soft); }
.tchip:hover { background: var(--acc); color: var(--on-acc); }
.tview { max-width: 876px; margin: 0 auto; }
#list > .tview { margin-left: auto; margin-right: auto; }
.scards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0 10px; }
.scard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.scard strong { font-size: 22px; color: var(--tx); }
.te-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.te { display: grid; grid-template-columns: 110px 108px 56px 1fr auto; gap: 8px 12px; align-items: baseline; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.te.run { background: var(--acc-soft); border-radius: var(--r); border-bottom: 0; margin: 6px 0; align-items: center; padding: 10px 12px; }
.te-d { color: var(--tx); font-weight: 500; }
.te-t, .te-dur { font-size: 13px; color: var(--mut); }
.te-dur { color: var(--tx); font-weight: 500; text-align: right; }
.te-n { overflow-wrap: anywhere; color: var(--tx); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; white-space: pre-wrap; }
.te-a { white-space: nowrap; min-width: 64px; text-align: right; }
.frow.col { grid-template-columns: 1fr; }
@media (max-width: 860px) { .te { grid-template-columns: 1fr auto; } .te-t { grid-column: 1; } .te-dur { grid-column: 2; grid-row: 1; } .te-n { grid-column: 1 / -1; } .te-a { grid-column: 2; grid-row: 2; } }

/* nawigacja, dzwonek, wybór widoku */
.nav.timer { margin: 2px 0 6px; border: 1.5px solid var(--line); }
.nav.timer.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc-tx); }
.nav.timer .ic { color: var(--acc); }
.nav .cnt.badge { min-width: 20px; text-align: center; border-radius: 999px; padding: 0 6px; }
.nav .cnt.badge.on { background: var(--acc); color: var(--on-acc); font-weight: 700; }
.viewsel { min-height: 40px; padding: 4px 10px; border-radius: var(--r); font-weight: 500; }
.nlist { display: grid; gap: 4px; margin: 6px 0; max-height: 52dvh; overflow-y: auto; }
.ni { display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); }
.ni:hover { background: var(--hover); }
.ni.new { border-color: var(--acc); background: var(--acc-soft); }
.ni .ic { width: 18px; flex: none; text-align: center; }
.nt { overflow-wrap: anywhere; color: var(--tx); }
.arow { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.krow { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
kbd { min-width: 56px; text-align: center; padding: 2px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; font: 500 12px var(--mono); color: var(--tx); background: var(--hover); }
.qhint { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 2px 0; }
.qhint[hidden] { display: none; }
.fchip.ok { color: var(--ok, #157A30); border-color: currentColor; }
.te.billed { opacity: .72; }
.grp-a { display: inline-flex; gap: 2px; opacity: 1; }
.grp-a .btn { min-height: 32px; padding: 2px 10px; font-size: 13px; }


/* czat wewnętrzny */
#list > .chat { max-width: none; margin: 0; }
.chat { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: calc(100dvh - 230px); min-height: 380px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; margin-top: 10px; }
.chat-side { border-right: 1px solid var(--line); overflow-y: auto; }
.chat-head { display: flex; align-items: center; gap: 2px; padding: 10px 10px 6px 14px; position: sticky; top: 0; background: var(--surface); z-index: 1; color: var(--tx); }
.chat-head .btn { min-height: 32px; padding: 2px 8px; font-size: 13px; }
.chat-it { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-it:hover { background: var(--hover); }
.chat-it.act { background: var(--acc-soft); }
.ci-t { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--tx); }
.ci-p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ci-badge { background: var(--acc); color: var(--on-acc); border-radius: 999px; min-width: 20px; padding: 0 6px; text-align: center; font: 600 11px/20px var(--mono); }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--tx); }
.cback { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px 16px; display: flex; flex-direction: column; }
.chat-day { align-self: center; margin: 14px 0 6px; padding: 2px 12px; border-radius: 999px; background: var(--hover); color: var(--mut); font: 500 12px var(--mono); }
.chat-new { align-self: stretch; text-align: center; margin: 10px 0 4px; color: var(--acc-tx); font: 500 12px var(--mono); border-top: 1px solid var(--acc); padding-top: 4px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; margin-top: 2px; max-width: 78%; }
.msg.first { margin-top: 10px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-a { font: 600 12px var(--sans); color: var(--mut); margin: 0 4px 2px; }
.msg-b { position: relative; display: flex; align-items: flex-end; gap: 8px; padding: 7px 11px; border-radius: 14px; background: var(--hover); color: var(--tx); }
.msg.mine .msg-b { background: var(--acc-soft); }
.msg-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-t a { color: var(--acc-tx); }
.msg-h { font-size: 10px; color: var(--mut); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.msg-x { color: var(--mut); opacity: 0; font-size: 11px; padding: 0 2px; }
.msg-b:hover .msg-x { opacity: 1; }
.chat-comp { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-comp textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; }
@media (max-width: 860px) {
  .chat { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 190px); border-radius: var(--r); }
  .chat.open .chat-side, .chat:not(.open) .chat-main { display: none; }
  .cback { display: inline-block; }
  .msg { max-width: 90%; }
}

/* godziny: zestawienie */
.hrows { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.hrow { display: grid; grid-template-columns: minmax(120px, 1.6fr) 1fr 1fr 1.4fr auto; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.hrow:last-child { border-bottom: 0; }
.hhead { color: var(--mut); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.hn { text-align: right; font-size: 13px; }
.hname { text-align: left; color: var(--tx); font-weight: 600; }
.hname:hover { color: var(--acc-tx); }
.hact { display: inline-flex; gap: 2px; }
.hact .btn { min-height: 32px; padding: 2px 10px; font-size: 13px; }
@media (max-width: 860px) { .hrow { grid-template-columns: 1fr auto; } .hrow .hn:nth-child(2), .hrow .hn:nth-child(3), .hhead span:nth-child(2), .hhead span:nth-child(3) { display: none; } }

/* osoby przy zadaniu */
.ppl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--tx); }
.pchip .icon { padding: 0 6px; min-height: 22px; font-size: 12px; }
.addp { flex: 1; min-width: 150px; }

/* zaproszenia */
.invlink { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--acc); border-radius: var(--r); display: grid; gap: 6px; }
.invlink input { width: 100%; font-family: var(--mono); font-size: 12px; }

.brandrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-right: 6px; }
.brandrow .icon { font-size: 18px; line-height: 1; }

/* ikony SVG */
.i { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.f { fill: currentColor; }
.nav .ic .i, .nav .i { width: 1.2em; height: 1.2em; }
.icon .i { width: 1.25em; height: 1.25em; vertical-align: middle; }

/* własne okna potwierdzeń */
dialog.ask { width: min(400px, 92vw); }
dialog.ask .askmsg { margin: 0; line-height: 1.5; color: var(--body); }
dialog.ask .secret { font: 600 20px var(--sans); letter-spacing: .04em; background: var(--bg); border: 1px dashed var(--line); border-radius: var(--r); padding: 12px; text-align: center; user-select: all; color: var(--tx); word-break: break-all; }
.btn.pri.danger { background: #C62828; border-color: #C62828; color: #fff; }
.btn.pri.danger:hover { filter: brightness(1.08); }

/* opis rozwijany */
.optd summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--mut); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 2px 0; }
.optd summary::-webkit-details-marker { display: none; }
.optd summary .chev { width: 1.1em; height: 1.1em; transition: transform .15s; transform: rotate(-90deg); }
.optd[open] summary .chev { transform: none; }
.optd summary .prev { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.optd[open] summary .prev { display: none; }
.optd textarea { margin-top: 8px; }
.optd summary:hover { color: var(--tx); }

/* wygląd jak w prezentacji na stronie startowej: wyraźne tytuły i czytelne znaczniki */
.ttl { font-weight: 600; }
.task .due, .task .tag, .task .fchip { font-size: 13px; }

/* żywsze akcenty */
.due.today { background: rgba(232, 137, 12, .16); border-color: transparent; color: var(--warn, #B26A00); font-weight: 600; }
.tab .cnt { background: var(--hover); border-radius: 999px; padding: 0 7px; }
.tab.act .cnt { background: var(--acc-soft); color: var(--acc-tx); }
.dot { width: 11px; height: 11px; }
.tab:hover .ic, .nav:hover .ic { transform: scale(1.12); }
.tab .ic, .nav .ic { transition: transform .12s; }

/* wyrównania */
.te-bar { align-items: center; }
.te-bar .mut { margin-left: 4px; }
.te { align-items: center; }
.hrow { grid-template-columns: minmax(120px, 1.6fr) 1fr 1fr 1.4fr 160px; }
.hact { display: flex; justify-content: flex-end; gap: 4px; }
.hhead span:last-child { text-align: right; }
.hname { display: flex; align-items: center; gap: 8px; text-align: left; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .due.today { color: #FFC36B; } }
:root[data-theme="dark"] .due.today { color: #FFC36B; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.hrow { grid-template-columns: minmax(120px, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) 160px; }
.hhead .hn { margin-right: -.08em; }
.scards { align-items: stretch; }
.chead { min-height: 44px; padding-bottom: 8px; }
.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon.burger { display: none; }
@media (max-width: 860px) { .icon.burger { display: inline-flex; } }
.ctl > select, .ctl > input { min-width: 0; }
.ctl > input[type=time] { flex: 0 0 118px; }
.ctl > input[type=date] { flex: 1 1 120px; }
.ctl > .icon { flex: none; }

dialog.ask .calurl { font: 500 13px var(--sans); letter-spacing: 0; text-align: left; user-select: all; }
.calhow { margin: 10px 0; padding-left: 20px; color: var(--body); line-height: 1.5; }
.calhow li { margin: 4px 0; }
dialog.ask:has(.calurl) { width: min(520px, 94vw); }

/* 2FA */
.qrc { width: 200px; height: 200px; background: #fff; border-radius: 8px; image-rendering: pixelated; }
.qrbox { text-align: center; margin: 10px 0; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 10px 0; font: 600 16px var(--sans); color: var(--tx); letter-spacing: .04em; }
.codes span { background: var(--bg); border: 1px dashed var(--line); border-radius: var(--r-s); padding: 6px 10px; text-align: center; user-select: all; }
dialog.ask details { margin: 8px 0; }
dialog.ask summary { cursor: pointer; }

/* pasek boczny: góra i dół stałe, przewijane są tylko projekty; szerokość regulowana uchwytem */
#side { overflow: hidden; padding: 20px 0 0; }
.sidetop { padding: 0 10px; flex: none; }
.plist { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 10px 10px; overscroll-behavior: contain; }
.foot { margin-top: 0; padding: 10px 10px 10px; flex: none; background: var(--side); }
.nav .lbl { min-width: 0; }
#sidegrip { position: fixed; top: 0; bottom: 0; left: calc(var(--sidew, 260px) - 3px); width: 7px; cursor: col-resize; z-index: 9; touch-action: none; }
#sidegrip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .12s, width .12s, left .12s; }
#sidegrip:hover::after, #sidegrip:focus-visible::after, body.resizing #sidegrip::after { background: var(--acc); width: 3px; left: 2px; }
body.resizing { cursor: col-resize; user-select: none; }
@media (max-width: 860px) { #sidegrip { display: none; } }

/* ramki zamiast kolorowych teł: jasne karty z delikatną obwódką i lekkim cieniem */
:root { --shadow-s: 0 1px 2px rgba(20, 24, 36, .08), 0 1px 3px rgba(20, 24, 36, .06); }
.task, .scard, .optd, #panel .fld.col, .col, .hrows, .tw { box-shadow: var(--shadow-s); }
.col { background: var(--surface); border: 1px solid var(--line); }
.col.over { background: var(--acc-soft); border-color: var(--acc); }
.col .task { box-shadow: none; background: var(--bg); }
#panel .fld.col, .optd { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
#panel .fld.col .cmt, .cmt { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.cmt .cbody { color: var(--tx); }
textarea, input, select { box-shadow: none; }

/* panel zadania: tło panelu białe (surface), a sekcje z nagłówkami to jasnoszare karty z ramką; pola i komentarze w środku białe */
#panel .fld.col, .optd { background: var(--card2); }
#panel .fld.col input, #panel .fld.col textarea, #panel .fld.col select, .optd textarea { background: var(--surface); }
.cmt { background: var(--surface); }

/* paski przewijania: tor w kolorze tła (przezroczysty), cienki suwak w kolorze obwódek */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--mut); background-clip: content-box; }

/* właściwości zadania jako przyciski (wartość widać w jednej linii, edytor rozwija się po kliknięciu) */
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 8px; }
.pp { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--mut); font-weight: 500; text-align: left; box-shadow: var(--shadow-s); }
.pp .i, .pp .dot { flex: none; color: var(--ic, var(--mut)); }
.pp .pv { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp.on { color: var(--tx); font-weight: 600; }
.pp:hover { background: var(--hover); }
.pp.open { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); color: var(--tx); }
.ped { margin: 4px 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card2); }
.ped[hidden] { display: none; }
.ped .fld { margin: 6px 0; }
.ped .chips { margin-left: 0; }
.cadd { margin: 6px 0 10px; }

/* wyszukiwarka (paleta) */
dialog.pal { width: min(680px, 94vw); max-height: min(80dvh, 720px); padding: 0; display: flex; flex-direction: column; overflow: hidden; margin-top: 8vh; }
dialog.pal[open] { display: flex; }
.pal-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 4px 20px; color: var(--tx); font-size: 17px; }
.pal-in { margin: 6px 16px 8px; width: calc(100% - 32px); font-size: 18px; padding: 12px 14px; border-radius: var(--r); }
.pal-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; align-items: center; border-bottom: 1px solid var(--line); }
.pal-lab { color: var(--mut); font-size: 13px; margin-right: 2px; }
.pal-chip { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--body); font-size: 13px; font-weight: 500; min-height: 30px; }
.pal-chip:hover { background: var(--hover); }
.pal-chip.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc-tx); font-weight: 600; }
.pal-list { flex: 1 1 auto; overflow-y: auto; padding: 6px 8px; min-height: 120px; }
.pal-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px; color: var(--mut); font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; }
.pal-head::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ic, var(--mut)); }
.pal-info { padding: 14px 12px; color: var(--mut); }
.pal-it { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r); border: 1px solid transparent; }
.pal-it.sel { background: var(--hover); border-color: var(--line); }
.pal-ic { flex: none; width: 24px; text-align: center; color: var(--ic, var(--mut)); }
.pal-tx { display: flex; flex-direction: column; min-width: 0; }
.pal-tx b { color: var(--tx); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-tx small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.pal-foot { padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12px; }
dialog.pal::backdrop { background: rgba(24, 27, 36, .5); }

/* edytor właściwości w kolorze swojej ikony (termin zielony, przypomnienie pomarańczowe, tagi, projekt w kolorze projektu) */
.ped { background: var(--card2); border-color: var(--line); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .ped { background: color-mix(in srgb, var(--ic, #888) 11%, var(--surface)); border-color: color-mix(in srgb, var(--ic, #888) 38%, var(--line)); }
  .pp.open { border-color: var(--ic, var(--acc)); box-shadow: 0 0 0 1px var(--ic, var(--acc)); background: color-mix(in srgb, var(--ic, #888) 9%, var(--surface)); }
}
.ctl > input[type=time] { flex: 0 0 104px; }
.ctl > input[type=date] { flex: 1 1 130px; min-width: 128px; }

/* szybkie szukanie projektów (tylko nazwy) */
.psearch { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; padding: 0 10px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--mut); }
.psearch:focus-within { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.psearch input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 0; min-height: 0 !important; outline: 0; box-shadow: none; color: var(--tx); font-size: 14px; }
.psearch input::-webkit-search-cancel-button { cursor: pointer; }
.pq-none { padding: 8px 10px; }

/* edytor komentarza (jak w Nozbe: pasek narzędzi, wzmianki, listy, podgląd, powiększenie) */
.ced { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-s); margin: 6px 0 12px; }
.ced:focus-within { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.ced-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 0 12px; }
.ced-title { font-weight: 600; color: var(--tx); font-size: 14px; }
.ced-pvb { padding: 2px 12px; min-height: 28px; border: 1px solid var(--line); border-radius: var(--r-s); color: var(--body); font-size: 13px; font-weight: 500; background: var(--surface); }
.ced-pvb:hover, .ced-pvb.on { background: var(--hover); color: var(--tx); }
.ced textarea { display: block; width: 100%; border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 8px 12px; min-height: 76px; resize: none; outline: 0; }
.ced textarea[hidden], .ced-pv[hidden] { display: none; }
.ced-pv { padding: 8px 12px; min-height: 76px; max-height: 40vh; overflow-y: auto; }
.ced-bar { display: flex; align-items: center; gap: 2px; padding: 4px 8px 8px; border-top: 1px solid var(--line); }
.ced-b { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--r-s); color: var(--mut); }
.ced-b:hover, .ced-b.on { background: var(--hover); color: var(--tx); }
.ced-b .i { width: 1.35em; height: 1.35em; }
.ced-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.ced-send { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 34px; border-radius: var(--r-s); background: var(--btn); color: var(--btn-tx); }
.ced-send:hover { background: var(--btn-hover); }
.ced-send .i { width: 1.3em; height: 1.3em; }
.ced-sug { position: absolute; left: 12px; top: 96px; z-index: 5; min-width: 200px; max-width: 90%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px; }
.ced-su { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 8px; border-radius: var(--r-s); color: var(--tx); }
.ced-su.sel, .ced-su:hover { background: var(--hover); }
.ced.big { position: fixed; inset: 7vh 7vw; z-index: 60; margin: 0; display: flex; flex-direction: column; box-shadow: 0 0 0 100vmax rgba(24, 27, 36, .5), var(--shadow); }
.ced.big textarea, .ced.big .ced-pv { flex: 1; max-height: none; height: auto !important; }
.ced.big .ced-bar { flex: none; }

/* sformatowany komentarz */
.md p { margin: 0 0 6px; overflow-wrap: anywhere; }
.md p:last-child, .md ul:last-child, .md ol:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 0 0 6px; padding-left: 22px; }
.md li { margin: 2px 0; overflow-wrap: anywhere; }
.md ul.md-chk { list-style: none; padding-left: 2px; }
.md ul.md-chk li { display: flex; gap: 8px; align-items: flex-start; }
.md ul.md-chk input { flex: none; margin-top: 4px; accent-color: var(--acc); }
.md ul.md-chk li.done span { text-decoration: line-through; color: var(--mut); }
.md a { color: var(--acc-tx); text-decoration: underline; }
.mention { background: var(--acc-soft); color: var(--acc-tx); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.fileref { display: inline-flex; align-items: center; gap: 4px; background: var(--hover); border-radius: 999px; padding: 0 8px; font-size: .9em; color: var(--body); }

/* wyszukiwarka: marginesy i odstępy (selektory wzmocnione, bo ogólne reguły dialog/input nadpisywały marginesy) */
dialog.pal { width: min(720px, 94vw); border-radius: 18px; }
dialog.pal .pal-top { padding: 16px 20px 6px 24px; font-size: 18px; }
dialog.pal .pal-in { box-sizing: border-box; display: block; width: calc(100% - 48px) !important; margin: 8px 24px 12px; padding: 13px 16px; font-size: 18px; border-radius: 12px; }
dialog.pal .pal-chips { padding: 0 24px 14px; gap: 8px; }
dialog.pal .pal-lab { margin-right: 4px; }
dialog.pal .pal-chip { padding: 5px 14px; }
dialog.pal .pal-list { padding: 8px 14px 10px; }
dialog.pal .pal-head { padding: 14px 12px 6px; }
dialog.pal .pal-it { padding: 10px 12px; gap: 14px; }
dialog.pal .pal-tx small { margin-top: 1px; }
dialog.pal .pal-info { padding: 16px 14px; }
dialog.pal .pal-foot { padding: 11px 24px; }

/* widoki ogólne w pasku bocznym */
.vlabel { margin: 12px 4px 4px; color: var(--mut); font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; }
.vstrip { display: flex; flex-wrap: wrap; gap: 4px; }
.vbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; border-radius: var(--r-s); border: 1px solid transparent; color: var(--ic, var(--mut)); }
.vbtn .i { width: 1.3em; height: 1.3em; }
.vbtn:hover { background: var(--hover); }
.vbtn.act { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-s); }

/* pełny ekran po dodaniu do ekranu głównego: omijanie wycięcia i paska stanu */
@media (display-mode: standalone) {
  #side { padding-top: calc(20px + env(safe-area-inset-top)); }
  #top { padding-top: calc(22px + env(safe-area-inset-top)); }
  #panel { padding-top: env(safe-area-inset-top); }
  #toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@supports (padding: max(0px)) {
  .foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* ewidencja godzin: zafakturowane */
.seg.tf { display: inline-flex; }
.seg.tf button { padding: 6px 14px; }
.mgrp { flex-wrap: wrap; row-gap: 6px; }
.mbadge { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 600 12px var(--sans); border: 1px solid currentColor; }
.mbadge.warn { color: var(--warn, #9A5B00); }
.mbadge.ok { color: var(--ok, #1B7A43); }
.mbadge.part { color: var(--acc-tx); }
.btn.sm { padding: 4px 12px; min-height: 32px; font-size: 13px; }
.te-bill { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font: 600 12px var(--sans); color: var(--mut); cursor: pointer; background: var(--surface); }
.te-bill:hover { background: var(--hover); }
.te-bill input { margin: 0; accent-color: var(--ok, #1B7A43); }
.te.billed .te-bill { color: var(--ok, #1B7A43); border-color: currentColor; }
.te-a { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; min-width: 150px; }
.grp-a .btn, .mgrp .btn { white-space: nowrap; }
