/* HR-Place. Kolory pochodzą ze skórki (src/core/skins.php, wstawiane w <head>) — poniżej wartości awaryjne (skórka Grafit).
   <html data-theme="dark|light">; bez atrybutu = według ustawień urządzenia. */
:root{--font-body:Archivo,"Segoe UI",system-ui,sans-serif;--font-head:Archivo,"Segoe UI",system-ui,sans-serif;--font-num:Archivo,"Segoe UI",system-ui,sans-serif;--fs:15px;--r-card:14px;--r-btn:10px;--r-btn-sm:8px;--r-in:10px;--r-big:16px;--r-tag:12px;--btn-h:42px;--in-h:42px;--card-pad:18px 20px;--head-w:800;--head-ls:-.01em;--side-w:240px}
:root{--accent:#3B63E0;--accent-ink:#FFFFFF;--accent-soft:#E2E8FA;--accent-line:#2F4FB3;--head:#161C2B;--head-line:#161C2B;--head-ink:#F4F6FA;--head-mute:#ADB0B8;--head-chip:#353B48;--bg:#F3F5F9;--card:#FFFFFF;--card2:#F8FAFC;--input:#FFFFFF;--line:#DFE1E6;--line2:#CDD0D6;--ink:#141B2B;--mute:#696E79;--faint:#8F939C;--ph:#BBBFC6;--link:#3559CA;--acc:#3559CA;--ok:#13875A;--okbg:#E3F5EC;--err:#B3261E;--errbg:#FDECEA;--warn:#8A5A00;--warnbg:#FFF1CC;--info:#1F5FBF;--infobg:#E6EEFB;--off:#696E79;--offbg:#E6E8ED;--we:#F9FAFC;--sel:#EBEFFC;--track:#E1E4E9;--stop:#D2453A;--go:#2F9E6B;--go-ink:#10141F;--shadow:0 1px 2px rgba(20,27,43,0.05), 0 4px 16px rgba(20,27,43,0.05);color-scheme:light;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--accent:#587AE5;--accent-ink:#10141F;--accent-soft:rgba(88,122,229,0.14);--accent-line:#587AE5;--head:#121825;--head-line:#262B35;--head-ink:#F2F4F8;--head-mute:#92969D;--head-chip:#262B35;--bg:#0E131F;--card:#161D2C;--card2:#1F2634;--input:#0D111C;--line:#2B313F;--line2:#3E4350;--ink:#F2F4F8;--mute:#92969D;--faint:#696D76;--ph:#474B55;--link:#587AE5;--acc:#587AE5;--ok:#3DDC97;--okbg:rgba(61,220,151,.12);--err:#FF8C7F;--errbg:rgba(255,122,107,.14);--warn:#F5C04A;--warnbg:rgba(245,192,74,.12);--info:#7DB3FF;--infobg:rgba(125,179,255,.14);--off:#AEB1B7;--offbg:#292F3D;--we:#131823;--sel:rgba(88,122,229,0.08);--track:#292F3D;--stop:#D2453A;--go:#2F9E6B;--shadow:none;--go-ink:#10141F;color-scheme:dark;}
}
:root[data-theme="dark"]{--accent:#587AE5;--accent-ink:#10141F;--accent-soft:rgba(88,122,229,0.14);--accent-line:#587AE5;--head:#121825;--head-line:#262B35;--head-ink:#F2F4F8;--head-mute:#92969D;--head-chip:#262B35;--bg:#0E131F;--card:#161D2C;--card2:#1F2634;--input:#0D111C;--line:#2B313F;--line2:#3E4350;--ink:#F2F4F8;--mute:#92969D;--faint:#696D76;--ph:#474B55;--link:#587AE5;--acc:#587AE5;--ok:#3DDC97;--okbg:rgba(61,220,151,.12);--err:#FF8C7F;--errbg:rgba(255,122,107,.14);--warn:#F5C04A;--warnbg:rgba(245,192,74,.12);--info:#7DB3FF;--infobg:rgba(125,179,255,.14);--off:#AEB1B7;--offbg:#292F3D;--we:#131823;--sel:rgba(88,122,229,0.08);--track:#292F3D;--stop:#D2453A;--go:#2F9E6B;--shadow:none;--go-ink:#10141F;color-scheme:dark;}


* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--fs)/1.5 var(--font-body); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 28px; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
h2 small { color: var(--mute); font-weight: 400; font-size: 14px; }
h2 .sp { flex: 1; }
b, strong { font-weight: 700; }

/* --- nagłówek --- */
.top { background: var(--head); border-bottom: 1px solid var(--head-line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 22px; min-height: 64px; }
.top .logo { height: 30px; width: auto; display: block; }
.top nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { padding: 21px 11px 18px; color: var(--head-mute); font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 6px; }
.top nav a:hover { color: var(--head-ink); text-decoration: none; }
.top nav a.on { color: var(--head-ink); border-color: var(--accent); font-weight: 700; }
.top nav svg { display: none; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 800; line-height: 18px; }
.who { display: flex; align-items: center; gap: 10px; color: var(--head-mute); font-size: 13px; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 17px; background: var(--head-chip); color: var(--head-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.iconbtn { width: 40px; height: 40px; border-radius: var(--r-btn-sm); border: 1px solid var(--head-line); background: transparent; color: var(--head-mute); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.iconbtn:hover { color: var(--head-ink); border-color: var(--head-mute); }
.top .who a { color: var(--head-mute); }
.top .me { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 20px; }
.top .me:hover .avatar, .top .me.on .avatar { box-shadow: 0 0 0 2px var(--accent); }
@media (max-width: 1240px) { .who .name { display: none; } }

main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }

/* pracownik na telefonie: menu na dole */
@media (max-width: 860px) {
  .top-in { gap: 12px; min-height: 56px; padding: 0 14px; }
  .top .logo { height: 26px; }
  .who .name { display: none; }
  .top nav.tabs { display: none; }
  .who { margin-left: auto; }
  .who .hide-m { display: none; }
  .top .burger { display: inline-flex; }
}
@media (max-width: 560px) {
  main { padding: 16px 14px 48px; }
  h1 { font-size: 24px; }
}

/* --- karty i układ --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--card-pad); margin-bottom: 18px; box-shadow: var(--shadow); }
.card.accent { border-top: 4px solid var(--accent); }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.bar .sp, .sp { flex: 1; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 150px; }
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--line2); border-radius: var(--r-card); padding: 14px 18px; box-shadow: var(--shadow); }
.tile.ok { border-top-color: var(--ok); } .tile.info { border-top-color: var(--info); } .tile.acc { border-top-color: var(--accent); }
.tile > span { display: block; font-size: 13px; color: var(--mute); }
.tile b { display: block; font-size: 28px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile b small { font-size: 15px; color: var(--mute); font-weight: 600; }
.cols { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.cols > .main-col { flex: 999 1 560px; min-width: 0; }
.cols > .side-col { flex: 1 1 320px; min-width: 0; }
.eyebrow { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.note { color: var(--mute); font-size: 13px; }
.ph { color: var(--ph); }
.scroll { overflow-x: auto; }

/* --- tabele --- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); font-weight: 700; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.we td { background: var(--we); }
tr.empty td { color: var(--mute); }
.kv td:first-child { color: var(--mute); width: 190px; }
table.days { table-layout: fixed; min-width: 720px; }

/* --- znaczniki --- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-tag); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tag.ok { background: var(--okbg); color: var(--ok); } .tag.err { background: var(--errbg); color: var(--err); }
.tag.warn { background: var(--warnbg); color: var(--warn); } .tag.info { background: var(--infobg); color: var(--info); }
.tag.off { background: var(--offbg); color: var(--off); }
.dot { width: 8px; height: 8px; border-radius: 4px; background: currentColor; display: inline-block; flex: none; }
.msg { padding: 10px 14px; border-radius: var(--r-in); margin: 0 0 14px; font-weight: 500; }
.msg.ok { background: var(--okbg); color: var(--ok); } .msg.err { background: var(--errbg); color: var(--err); }

/* --- formularze i przyciski --- */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--input); border: 1px solid var(--line2); border-radius: var(--r-in); padding: 9px 11px; min-height: var(--in-h); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { width: 100%; min-height: 220px; font-family: ui-monospace, monospace; font-size: 12.5px; }
label { display: block; margin: 0 0 12px; font-size: 13px; color: var(--mute); }
label input, label select { display: block; margin-top: 5px; color: var(--ink); width: 100%; }
label.chk { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 14px; }
label.chk input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); }
button, .btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--r-btn); padding: 9px 16px; min-height: var(--btn-h); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14.5px; text-decoration: none; }
button:hover, .btn:hover { filter: brightness(1.05); text-decoration: none; }
button.sec, .btn.sec { background: var(--card); color: var(--ink); border: 1px solid var(--line2); font-weight: 600; }
button.sec:hover, .btn.sec:hover { border-color: var(--mute); filter: none; }
button.del { background: transparent; color: var(--err); border: 1px solid var(--line2); min-height: 34px; padding: 4px 12px; font-weight: 600; }
button.small, .btn.small { min-height: 34px; padding: 5px 12px; font-size: 13px; border-radius: var(--r-btn-sm); }
button:disabled { opacity: .6; cursor: default; }
form.inline { display: inline; }
.login { max-width: 400px; margin: 0 auto; }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 28px; background: var(--head); }
.login-wrap .logo { width: 180px; height: auto; }
.login-wrap .card { width: 100%; max-width: 400px; border-top: 4px solid var(--accent); margin: 0; }
pre { white-space: pre-wrap; font-size: 12.5px; background: var(--card2); padding: 12px; border-radius: 10px; overflow: auto; max-height: 420px; }
details summary { cursor: pointer; }

/* --- ekran Start --- */
.clock { max-width: 520px; margin: 0 auto 16px; text-align: center; padding: 22px 20px 20px; border-top: 4px solid var(--accent); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.clock .state { display: flex; align-items: center; gap: 8px; }
.clock .state.work { color: var(--ok); }
.cbig { font-size: 60px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; }
.cbig small { font-size: 18px; color: var(--mute); font-weight: 600; }
.cbig.idle { color: var(--ph); }
.progress { width: 100%; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.punch { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.seg { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; text-align: left; }
.seg label { margin: 0; position: relative; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--r-btn); border: 1px solid var(--line2); color: var(--mute); font-size: 15px; font-weight: 600; cursor: pointer; }
.seg input:checked + span { border: 2px solid var(--accent); color: var(--ink); background: var(--sel); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
button.big { width: 100%; min-height: 76px; border-radius: var(--r-big); font-size: 26px; font-weight: 800; }
button.go { background: var(--go); color: var(--go-ink); }
button.stop { background: var(--stop); color: #FFFFFF; }
.mini-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 520px; margin: 0 auto 16px; }
.mini-tiles .tile b { font-size: 22px; }
.list-card { max-width: 520px; margin: 0 auto; padding: 4px 16px; }
.list-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }

/* --- pulpit admina --- */
.person { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 10px; }
.person .avatar { width: 44px; height: 44px; border-radius: 22px; font-size: 14px; font-weight: 800; background: var(--offbg); color: var(--off); }
.person .avatar.ok { background: var(--okbg); color: var(--ok); }
.person .avatar.info { background: var(--infobg); color: var(--info); }
.person .who-col { flex: 1; min-width: 180px; }
.person .who-col b { font-size: 16px; display: block; }
.person .st { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.person .hrs { min-width: 70px; text-align: right; }
.person .hrs b { font-size: 24px; font-weight: 800; display: block; font-variant-numeric: tabular-nums; }
.timeline .list-row b { width: 48px; font-variant-numeric: tabular-nums; flex: none; }
.timeline .list-row span.t { flex: 1; }

/* --- Godziny (admin) --- */
.tot { display: flex; gap: 28px; flex-wrap: wrap; margin: 12px 0 0; padding-top: 10px; }
.tot div span { display: block; font-size: 12px; color: var(--mute); }
.tot div b { font-size: 21px; }
section.emp h2, .fold > h2 { margin: 0; }
.fold.collapsed .fold-body, .fold.collapsed .edit-only { display: none; }
.fold:not(.collapsed) { border-top: 4px solid var(--accent); }
.fold.collapsed { padding-top: 12px; padding-bottom: 12px; }
.fold:not(.collapsed) .chev { transform: rotate(90deg); }
.fold-body { margin-top: 14px; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sect { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.sect > h3 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--mute); margin: 0 0 10px; }
.checks { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.warnbox { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--warnbg); color: var(--ink); font-size: 14px; margin: 8px 0; }
.warnbox svg { color: var(--warn); flex: none; margin-top: 1px; }
section.emp .emp-body { margin-top: 12px; }
section.emp.collapsed .emp-body, section.emp.collapsed .edit-only { display: none; }
section.emp:not(.collapsed) { border-top: 4px solid var(--accent); }
.tog { background: transparent; color: var(--ink); border: 0; padding: 4px 0; min-height: 0; font-size: 18px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; cursor: pointer; text-align: left; flex-wrap: wrap; }
.tog:hover { color: var(--link); filter: none; }
.tog small { color: var(--mute); font-weight: 400; font-size: 14px; }
.chev { color: var(--mute); transition: transform .15s; flex: none; align-self: center; }
section.emp:not(.collapsed) .chev { transform: rotate(90deg); }
section.emp.collapsed { padding-top: 12px; padding-bottom: 12px; }
.edit-only { display: inline-flex; gap: 8px; flex-wrap: wrap; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--sel); }
tr.click td.nosel { cursor: default; }
tr.flash td { animation: fl 2s; }
@keyframes fl { 0% { background: var(--accent-soft); } }
.tm.man { border-bottom: 2px dotted var(--warn); }
select.br { padding: 4px 8px; min-height: 34px; font-size: 14px; border-radius: 8px; cursor: pointer; width: 100%; max-width: 150px; }
select.br-delegacja { background: var(--infobg); color: var(--info); border-color: transparent; font-weight: 600; }
select.br-urlop { background: var(--warnbg); color: var(--warn); border-color: transparent; font-weight: 600; }
select.br-l4 { background: var(--errbg); color: var(--err); border-color: transparent; font-weight: 600; }

/* --- kalendarz --- */
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cal { padding: 0; overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 700; border-bottom: 1px solid var(--line); }
.cal-day { all: unset; box-sizing: border-box; min-height: 104px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; cursor: pointer; background: var(--card); min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: var(--sel); }
.cal-day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-day.we { background: var(--we); }
.cal-day.other { background: var(--card2); }
.cal-day.other .num { color: var(--faint); }
.cal-day.today .num { background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 0 7px; }
.cal-day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day .num { font-weight: 700; font-size: 14px; align-self: flex-start; line-height: 22px; }
.cal-day .hol { font-size: 10.5px; font-weight: 700; color: var(--err); line-height: 1.2; }
.ev { display: block; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .ev { display: inline-block; }
.ev.ok { background: var(--accent); color: var(--accent-ink); }
.ev.pend { border: 1px dashed var(--accent-line); padding: 1px 6px; color: var(--ink); }
.ev.abs { background: var(--offbg); color: var(--off); }
.ev.hol { background: var(--errbg); color: var(--err); }
.ev.g { background: var(--infobg); color: var(--info); }
.ev .ini { display: none; }
@media (max-width: 700px) {
  .cal-day { min-height: 70px; padding: 3px; gap: 2px; }
  .cal-day .ev { font-size: 9.5px; padding: 1px 3px; border-radius: 4px; line-height: 1.25; }
  .cal-day .ev.plan, .cal-day .ev.pend { padding: 0 2px; }
  .cal-day .hol { display: none; }
  .cal-day .ev.xm { display: none; }
  .cal-day .more { display: block; }
  .cal-head div { padding: 8px 4px; text-align: center; }
}

.pushbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; margin: 0 auto 16px; max-width: 520px; box-shadow: var(--shadow); }
.pushbox .pb-ico { color: var(--accent-line); margin-top: 2px; }
.pb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pb-actions:empty { display: none; }
.lockbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--r-card); background: var(--offbg); margin-bottom: 14px; }
.lockbar.locked { background: var(--warnbg); }
.hist .list-row { align-items: flex-start; }
.hist .when { color: var(--mute); font-size: 12.5px; white-space: nowrap; min-width: 112px; }
.hist .src { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }

.emp-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; flex-wrap: wrap; }
.emp-row:last-child { border-bottom: 0; }
.emp-row:hover { background: var(--sel); text-decoration: none; }
.emp-row .avatar { width: 40px; height: 40px; }
.emp-row .er-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.emp-row .er-main b { font-size: 16px; }
.emp-row .chev { color: var(--mute); }
.segl { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: var(--r-btn); border: 1px solid var(--line2); color: var(--mute); font-weight: 600; font-size: 14px; padding: 0 12px; text-decoration: none; white-space: nowrap; }
.segl.on { border: 2px solid var(--accent); color: var(--ink); background: var(--sel); }
.segl:hover { text-decoration: none; color: var(--ink); }

/* --- okienka --- */
dialog { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); color: var(--ink); padding: 18px 20px; width: min(640px, 94vw); border-top: 4px solid var(--accent); }
dialog::backdrop { background: rgba(5,8,16,.55); }
.dh { display: flex; justify-content: space-between; align-items: start; margin-bottom: 12px; }
.x { background: transparent; color: var(--mute); font-size: 24px; padding: 0 6px; min-height: 0; line-height: 1; font-weight: 400; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .tgrid { grid-template-columns: 1fr; } }
.tbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
input.big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 4px 10px; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 6px 0; }
.steps button { min-height: 38px; padding: 0; font-size: 13px; background: var(--card2); color: var(--ink); border: 1px solid var(--line2); font-weight: 600; border-radius: 8px; }
.steps button:hover { border-color: var(--accent-line); filter: none; }
.sum { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; padding: 10px 12px; background: var(--card2); border-radius: 10px; }
.sum b { font-size: 18px; }
.dfoot { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.smtpbox { border: 1px solid var(--line); border-radius: var(--r-in); padding: 8px 12px; margin: 4px 0 12px; }
.smtpbox summary { font-size: 14px; padding: 4px 0; }
.smtpbox[open] summary { margin-bottom: 10px; }
.empact { margin: -10px 0 18px; display: flex; gap: 8px; justify-content: flex-end; }

@media print {
  .top, .bar, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 0; box-shadow: none; page-break-inside: avoid; }
}

/* stopka maila — podgląd (jak w programie pocztowym, zawsze jasne tło) */
.sig-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sig-preview { background: #fff; color: #222; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font: 13px/1.4 Verdana, Arial, sans-serif; overflow-wrap: anywhere; }
.sig-preview a { color: #0645ad; }
.sig-grid textarea, #firma textarea { min-height: 0; height: auto; resize: vertical; font-family: inherit; font-size: 15px; }
.sig-preview .g, .sig-preview .g a { color: #2e8b20; }
.doc-date { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.doc-date input { width: auto; min-height: 34px; padding: 4px 8px; font-size: 14px; margin: 0; }
@media (max-width: 760px) { .sig-grid { grid-template-columns: 1fr; } }

/* odcinki pracy na ekranie Start */
.ses-list { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 6px; }
.ses { font-size: 15px; }
.pw-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* stopka: wersja i autor */
.app-foot { text-align: center; font-size: 12px; color: var(--mute); padding: 18px 16px 28px; }
.app-foot a { color: inherit; text-decoration: none; }
.app-foot a:hover { text-decoration: underline; }

/* dziennik i lista zmian */
table.journal td { vertical-align: top; font-size: 14px; }
table.journal td:nth-child(4) { min-width: 240px; }
.nowrap { white-space: nowrap; }
.changelog { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.changelog .card { margin: 0; }
.changelog ul { margin: 0; padding-left: 20px; line-height: 1.55; }
.changelog small { font-weight: 400; color: var(--mute); font-size: 14px; margin-left: 6px; }

/* plany urlopu */
.ev.plan { border: 1px dashed var(--info); color: var(--info); background: transparent; padding: 1px 6px; }
.plan-row { flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-act { display: flex; gap: 6px; align-items: center; }
.plan-edit { flex-basis: 100%; }
.plan-edit summary { cursor: pointer; }
.plan-edit .row { margin-top: 8px; }

/* menu na telefonie (☰) */
.burger { display: none; position: relative; }
.burger .dotb { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mmenu { border-top: 1px solid var(--head-line); background: var(--head); padding: 6px 10px 12px; max-height: calc(100vh - 56px); overflow-y: auto; }
.mmenu a { display: flex; align-items: center; gap: 14px; padding: 11px 10px; border-radius: 10px; color: var(--head-ink); text-decoration: none; }
.mmenu a:hover, .mmenu a.on { background: rgba(255,255,255,.07); text-decoration: none; }
.mmenu a.on { box-shadow: inset 3px 0 0 var(--accent); }
.mmenu a > span { flex: 1; display: flex; flex-direction: column; }
.mmenu a small { color: var(--head-mute); font-size: 12.5px; }
.mmenu svg { color: var(--head-mute); flex: none; }
@media (min-width: 861px) { .mmenu { display: none !important; } }

/* kafelki opcji i mini-kalendarz */
.home-grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 14px; margin-bottom: 20px; align-items: start; }
.home-grid.user { max-width: 1000px; margin: 0 auto 16px; }
.ntiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ntile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
  color: var(--ink); text-decoration: none; min-height: 104px; transition: border-color .15s, transform .15s; }
.ntile:hover { border-color: var(--accent-line); text-decoration: none; transform: translateY(-1px); }
.ntile svg { color: var(--accent-line); margin-bottom: 4px; }
.ntile b { font-size: 16px; }
.ntile small { color: var(--mute); font-size: 12.5px; line-height: 1.35; }
.ntile .badge { position: absolute; top: 12px; right: 12px; }
.minical { min-height: 0; gap: 8px; }
.mc-head { display: flex; justify-content: space-between; align-items: baseline; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mc-wd { font-size: 10.5px; color: var(--mute); font-weight: 700; text-transform: uppercase; padding-bottom: 2px; }
.mc-d { display: flex; flex-direction: column; align-items: center; padding: 3px 0; border-radius: 8px; min-height: 34px; }
.mc-d i { font-style: normal; font-size: 13px; font-weight: 600; line-height: 20px; width: 22px; }
.mc-d.we i { color: var(--mute); }
.mc-d.today i { background: var(--accent); color: var(--accent-ink); border-radius: 11px; }
.mc-d em { display: flex; gap: 2px; height: 6px; }
.mc-d u, .mc-leg u { display: inline-block; width: 6px; height: 6px; border-radius: 50%; text-decoration: none; }
.mc-leg { font-size: 11px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.mc-leg u { margin-right: -6px; }
u.ok { background: var(--accent); } u.pend { background: var(--accent-line); opacity: .6; } u.plan { background: var(--info); opacity: .55; }
u.abs { background: var(--off); } u.g { background: var(--info); } u.hol { background: var(--err); }
@media (max-width: 860px) { .home-grid { grid-template-columns: 1fr; } .ntiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ntile { min-height: 92px; padding: 14px; } }

/* kalendarz: więcej wpisów, okienko dnia, lista miesiąca */
.cal-day .more { display: none; font-size: 10px; font-weight: 700; color: var(--mute); }
.dayd { width: min(520px, 94vw); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); color: var(--ink); padding: 16px 18px; }
.dayd::backdrop { background: rgba(5, 10, 25, .55); }
.dayd .dh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dayd .x { all: unset; cursor: pointer; font-size: 26px; line-height: 1; padding: 0 6px; color: var(--mute); }
.dayd .dfoot { display: flex; margin-top: 12px; }
.ag-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; text-decoration: none; }
u.ag-dot.plan, u.ag-dot.pend { opacity: 1; background: transparent; border: 2px dashed var(--info); width: 8px; height: 8px; }
u.ag-dot.pend { border-color: var(--accent-line); }
.agenda .list-row { align-items: center; gap: 10px; }
.ag-date { width: 92px; flex: none; font-weight: 600; font-size: 14px; }
@media (max-width: 700px) {
  .dayd { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 16px 16px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .ag-date { width: 74px; font-size: 13px; }
}

/* szybki Start/Koniec */
.quick { max-width: 520px; margin: 0 auto 14px; text-align: center; }
.devlist .list-row { align-items: center; gap: 10px; flex-wrap: wrap; }
.keybox { font: 12.5px/1.45 ui-monospace, Menlo, Consolas, monospace; word-break: break-all; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; user-select: all; }
.steps-list { padding-left: 20px; line-height: 1.6; margin: 6px 0; }


/* ===================== HR-Place: logo, język, ustawienia, skórki ===================== */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--head-ink); white-space: nowrap; }
.brand .mark { display: block; flex: none; }
.brand .wm { font-size: 19px; letter-spacing: -.01em; font-weight: 500; }
.brand .wm b { font-weight: 800; }
.brand.has-logo .logo { height: 30px; max-width: 200px; object-fit: contain; }
.brand-lg .wm { font-size: 30px; }
.brand-lg.has-logo .logo { height: 56px; max-width: 280px; }
.brand-link:hover { text-decoration: none; }
.login-brand { display: flex; justify-content: center; }
.login-brand .brand { color: var(--ink); }
.logo-preview { background: var(--head); border-radius: 12px; padding: 18px; display: flex; justify-content: center; margin-bottom: 12px; }
.logo-preview .brand { color: var(--head-ink); }
@media (max-width: 860px) { .brand .wm { font-size: 17px; } .top .brand .mark { width: 26px; height: 26px; } }

.langsw { display: inline-flex; border: 1px solid var(--head-line); border-radius: 9px; overflow: hidden; flex: none; }
.langsw a { padding: 0 9px; min-height: 32px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--head-mute); letter-spacing: .03em; }
.langsw a:hover { color: var(--head-ink); text-decoration: none; }
.langsw a.on { background: var(--head-chip); color: var(--head-ink); }
.top .who .langsw a { color: var(--head-mute); } .top .who .langsw a.on { color: var(--head-ink); }
.login-lang, .langsw.big { border-color: var(--line2); }
.login-lang a, .langsw.big a { color: var(--mute); } .login-lang a.on, .langsw.big a.on { background: var(--sel); color: var(--ink); }
.login-lang { align-self: flex-end; }
.langsw.big a { min-height: 40px; padding: 0 16px; font-size: 14px; }
.mm-lang { padding: 10px 16px 4px; }
.mm-lang .langsw { border-color: var(--head-line); }

.stabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; padding-bottom: 2px; }
.stabs::-webkit-scrollbar { display: none; }
.stabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-btn); border: 1px solid var(--line2); background: var(--card); color: var(--mute); font-weight: 600; font-size: 14px; white-space: nowrap; }
.stabs a:hover { color: var(--ink); text-decoration: none; }
.stabs a.on { border: 2px solid var(--accent); color: var(--ink); background: var(--sel); padding: 7px 13px; }

.msg.info { background: var(--infobg); color: var(--info); font-weight: 400; }
.msg.info a, .msg.info b { color: inherit; } .msg.info a { text-decoration: underline; }
.msg.info code { background: rgba(127,127,127,.15); }
.warnline { color: var(--warn); display: inline-flex; align-items: center; gap: 5px; }
.reqs { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; columns: 1; }
.reqs li { padding: 3px 0; } .reqs li.ok { color: var(--ok); } .reqs li.no { color: var(--mute); } .reqs li.bad { color: var(--err); font-weight: 700; }
pre.log { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; white-space: pre-wrap; max-height: 260px; overflow: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--card2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.linkbtn { background: none; border: 0; color: var(--link); min-height: 0; padding: 2px 4px; font-weight: 600; font-size: 13px; }

/* przełączniki funkcji */
.feat-list { display: grid; gap: 2px; }
.feat { display: flex; gap: 14px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line); margin: 0; cursor: pointer; }
.feat:last-child { border-bottom: 0; }
.feat .ft { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.feat .ft b { font-size: 15px; } .feat .ft small { color: var(--mute); font-size: 13px; font-weight: 400; }
.sw { position: relative; flex: none; width: 46px; height: 26px; margin-top: 1px; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.sw i { position: absolute; inset: 0; border-radius: 13px; background: var(--line2); transition: background .15s; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.sw input:checked + i { background: var(--accent); }
.sw input:checked + i::after { transform: translateX(20px); }
.sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* skórki */
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.skin-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 12px; border: 1px solid var(--line2); border-radius: 14px; background: var(--card); cursor: pointer; margin: 0; }
.skin-card > input { position: absolute; opacity: 0; pointer-events: none; }
.skin-card:has(input:checked), .skin-card.on { border: 2px solid var(--accent); padding: 9px 9px 11px; background: var(--sel); }
.skin-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.skin-card b { font-size: 15px; margin-top: 6px; color: var(--ink); } .skin-card small { color: var(--mute); font-size: 12.5px; font-weight: 400; }
.skin-card [data-skin-edit] { margin-top: 8px; align-self: flex-start; }
.sd-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sd { display: block; border-radius: 9px; overflow: hidden; border: 1px solid rgba(127,127,127,.25); background: var(--s-bg); height: 92px; }
.sd.dark { background: var(--s-dbg); }
.sd-head { display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; background: var(--s-head); }
.sd.dark .sd-head { background: var(--s-dhead); }
.sd-dot { width: 9px; height: 9px; border-radius: 5px; background: var(--s-accent); margin-right: 4px; }
.sd.dark .sd-dot { background: var(--s-daccent); }
.sd-nav { width: 14px; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--s-headink) 45%, transparent); }
.sd-nav.on { background: var(--s-headink); box-shadow: 0 5px 0 -1px var(--s-accent); }
.sd.dark .sd-nav { background: color-mix(in srgb, var(--s-dink) 40%, transparent); } .sd.dark .sd-nav.on { background: var(--s-dink); box-shadow: 0 5px 0 -1px var(--s-daccent); }
.sd-body { display: block; padding: 8px; }
.sd-card { display: flex; flex-direction: column; gap: 5px; background: var(--s-card); border: 1px solid var(--s-line); border-radius: 6px; padding: 7px; }
.sd.dark .sd-card { background: var(--s-dcard); border-color: var(--s-dline); }
.sd-l { height: 4px; width: 70%; border-radius: 2px; background: var(--s-ink); opacity: .75; } .sd-l.s { width: 45%; background: var(--s-mute); }
.sd.dark .sd-l { background: var(--s-dink); } .sd.dark .sd-l.s { background: var(--s-dmute); }
.sd-btns { display: flex; gap: 5px; margin-top: 3px; }
.sd-go, .sd-stop { height: 16px; flex: 1; border-radius: 4px; background: var(--s-go); } .sd-stop { background: var(--s-stop); flex: .6; }
.sd.dark .sd-go { background: var(--s-dgo); } .sd.dark .sd-stop { background: var(--s-dstop); }
.skin-editor { width: min(760px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); color: var(--ink); padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.skin-editor::backdrop { background: rgba(5,8,16,.35); }
.se-head { display: flex; align-items: center; justify-content: space-between; }
.se-head .iconbtn { border-color: var(--line2); color: var(--mute); }
.se-head h2 { margin: 0; }
.se-start { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; }
.sw-dot { width: 12px; height: 12px; border-radius: 6px; display: inline-block; }
.se-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 16px; }
.se-field { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.se-field input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--line2); border-radius: 8px; background: var(--input); flex: none; cursor: pointer; }
.se-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; } .se-txt b { font-size: 14px; } .se-txt small { color: var(--mute); font-size: 12px; }
.se-hex { width: 92px !important; flex: none; font-family: ui-monospace, monospace; font-size: 13px !important; padding: 6px 8px !important; min-height: 34px !important; margin: 0 !important; text-transform: uppercase; }
.se-contrast { margin-top: 10px; min-height: 18px; }
.se-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* instrukcje */
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-list a { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.guide-list a:hover { border-color: var(--accent); text-decoration: none; }
.guide-list a svg { color: var(--accent); } .guide-list small { color: var(--mute); }
.gsteps { counter-reset: st; list-style: none; padding: 0; margin: 0; }
.gsteps > li { counter-increment: st; position: relative; padding: 0 0 22px 52px; }
.gsteps > li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 17px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.gsteps > li::after { content: ""; position: absolute; left: 16px; top: 36px; bottom: 6px; width: 2px; background: var(--line); }
.gsteps > li:last-child::after { display: none; }
.gsteps h3 { margin: 4px 0 6px; font-size: 16px; }
.gsteps p, .gsteps ul { margin: 0 0 8px; } .gsteps ul { padding-left: 18px; }
.path { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; font-weight: 600; }
.path span { background: var(--card2); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 7px; font-size: 13px; }
.path i { color: var(--mute); font-style: normal; }
.tip { border-left: 3px solid var(--accent); background: var(--card2); padding: 8px 12px; border-radius: 0 8px 8px 0; margin: 6px 0 10px; font-size: 14px; }
.tip.warn { border-color: var(--warn); }

/* instalator */
.inst-wrap { max-width: 720px; margin: 0 auto; padding: 28px 16px 40px; }
.inst-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.inst-top .brand { color: var(--ink); }
.inst-steps { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.inst-steps li { flex: 1; min-width: 0; }
.inst-steps li > *, .inst-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--mute); text-align: center; }
.inst-steps li a:hover { text-decoration: none; color: var(--ink); }
.inst-steps i { font-style: normal; width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--line2); background: var(--card); font-weight: 800; color: var(--mute); }
.inst-steps li.on i { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.inst-steps li.on { color: var(--ink); font-weight: 700; }
.inst-steps li.done i { border-color: var(--ok); color: var(--ok); }
.inst-card { padding: 24px 26px; }
.inst-card h1 { margin: 4px 0 10px; }
.inst-foot { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.inst-foot .sp { flex: 1; }
.inst-next { padding-left: 20px; line-height: 1.6; } .inst-next li { margin-bottom: 8px; }
.reqs.big li { display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.reqs.big li span { grid-row: span 2; font-weight: 800; } .reqs.big li.ok span { color: var(--ok); } .reqs.big li.bad span, .reqs.big li.bad b { color: var(--err); } .reqs.big li.no span { color: var(--faint); }
.reqs.big li small { color: var(--mute); font-size: 12.5px; }
button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) { .inst-steps span { display: none; } .inst-card { padding: 18px 16px; } }

/* wybór języka w nagłówku */
.langmenu { position: relative; }
.langmenu summary { list-style: none; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu[open] summary { color: var(--head-ink); border-color: var(--head-mute); }
.lm-list { position: absolute; right: 0; top: 46px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; min-width: 170px; z-index: 40; }
.top .who .lm-list a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 14px; }
.top .who .lm-list a b { width: 24px; color: var(--mute); font-size: 12px; }
.top .who .lm-list a:hover { background: var(--card2); text-decoration: none; }
.top .who .lm-list a.on { background: var(--sel); font-weight: 700; }
.top .who .iconbtn.on { color: var(--head-ink); border-color: var(--accent); }
.top nav a { padding-left: 9px; padding-right: 9px; }
@media (max-width: 1440px) { .who .name { display: none; } }

.errs { margin: 0; } .errs dt { font-family: ui-monospace, monospace; font-size: 12.5px; font-weight: 700; color: var(--err); margin-top: 12px; }
.errs dd { margin: 3px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; } .errs dd:last-child { border-bottom: 0; }


/* =====================================================================
   HR-Place 1.01 — skórki z układem: top (Grafit, Las), side (Biuro), dock (Hala)
   ===================================================================== */
h1, h2, h3, .tile b, .ntile b, .set-head h1 { font-family: var(--font-head); }
h1 { font-weight: var(--head-w); letter-spacing: var(--head-ls); text-wrap: balance; }
.tile b, td.n, .num, .stat-row b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* przyciski, pola, tabele — dopracowanie */
button, .btn { transition: background-color .15s, border-color .15s, box-shadow .15s, transform .06s; }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible, a:focus-visible, .iconbtn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
label small { color: var(--mute); font-weight: 400; font-size: 12.5px; }
tbody tr:hover > td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.ntile { transition: border-color .15s, transform .15s, box-shadow .15s; }
.ntile:hover { box-shadow: 0 6px 22px color-mix(in srgb, var(--ink) 9%, transparent); }
.avatar.hued { background: color-mix(in oklab, hsl(var(--av-h) 70% 50%) 18%, var(--card)); color: color-mix(in oklab, hsl(var(--av-h) 75% 38%) 80%, var(--ink)); }
.top .avatar.hued { background: color-mix(in oklab, hsl(var(--av-h) 70% 55%) 35%, var(--head)); color: var(--head-ink); }
@media (min-width: 1441px) { .who .name { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: right; } }
.who .name { flex-direction: column; line-height: 1.15; text-align: right; }
.who .name small { color: var(--head-mute); font-size: 11.5px; font-weight: 500; }
.side-only { display: none !important; }
.dock { display: none; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.w-sm { flex: 0 0 110px !important; min-width: 0 !important; } .w-md { flex: 0 0 170px !important; min-width: 0 !important; }
.w-auto { flex: 0 0 auto !important; min-width: 0 !important; align-self: flex-end; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.msg.warn { background: var(--warnbg); color: var(--warn); }
.msg { display: flex; gap: 8px; align-items: flex-start; } .msg > svg { flex: none; margin-top: 2px; }
.msg.info { display: block; } .msg.info svg { vertical-align: -4px; margin-right: 4px; }

/* ---------- miniatury skórek: układy ---------- */
.sd { position: relative; }
.sd-side { display: grid; grid-template-columns: 24px 1fr; }
.sd-side .sd-head { height: auto; flex-direction: column; align-items: center; padding: 7px 0; gap: 6px; }
.sd-side .sd-dot { margin: 0 0 3px; } .sd-side .sd-nav { width: 12px; } .sd-side .sd-nav.on { box-shadow: -4px 0 0 -1px var(--s-accent); }
.sd-side .sd-card { border-radius: 2px; } .sd-side .sd-go, .sd-side .sd-stop { border-radius: 1px; }
.sd-dock .sd-head { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); height: 14px; border-radius: 99px; padding: 0 7px; z-index: 1; }
.sd-dock .sd-card { border-radius: 9px; } .sd-dock .sd-go, .sd-dock .sd-stop { border-radius: 99px; height: 18px; }
.sd-dock .sd-body { padding-top: 10px; }
.se-base { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.se-base .seg span { min-height: 38px; font-size: 14px; }

/* ---------- układ SIDE (Biuro): menu boczne ---------- */
@media (min-width: 861px) {
  html[data-layout="side"] body { padding-left: var(--side-w); }
  html[data-layout="side"] .top { position: fixed; inset: 0 auto 0 0; width: var(--side-w); border-bottom: 0; border-right: 1px solid var(--head-line); overflow-y: auto; z-index: 25; }
  html[data-layout="side"] .top-in { flex-direction: column; align-items: stretch; gap: 16px; min-height: 100%; padding: 18px 12px 14px; max-width: none; }
  html[data-layout="side"] .brand-link { padding: 2px 8px 6px; }
  html[data-layout="side"] .top nav.tabs { flex-direction: column; gap: 2px; overflow: visible; flex: 1; }
  html[data-layout="side"] .top nav a { padding: 8px 10px; border-bottom: 0; border-radius: var(--r-btn); gap: 11px; font-size: 14px; color: var(--head-mute); }
  html[data-layout="side"] .top nav svg { display: block; width: 18px; height: 18px; flex: none; }
  html[data-layout="side"] .top nav a:hover { background: color-mix(in srgb, var(--head-ink) 7%, transparent); }
  html[data-layout="side"] .top nav a.on { background: var(--head-chip); color: var(--head-ink); box-shadow: inset 3px 0 0 var(--accent); }
  html[data-layout="side"] .top nav a .badge { margin-left: auto; }
  html[data-layout="side"] .top nav .side-only { display: flex !important; margin-top: 10px; }
  html[data-layout="side"] .top-only { display: none !important; }
  html[data-layout="side"] .who { flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--head-line); padding-top: 14px; white-space: normal; }
  html[data-layout="side"] .who .me { order: -1; width: 100%; flex-direction: row-reverse; justify-content: flex-end; }
  html[data-layout="side"] .who .name { display: inline-flex !important; text-align: left; color: var(--head-ink); font-size: 13.5px; }
  html[data-layout="side"] .lm-list { top: auto; bottom: 46px; right: auto; left: 0; }
  html[data-layout="side"] main { max-width: 1320px; padding-top: 28px; }
  html[data-layout="side"] .app-foot { padding-left: 0; }
}
html[data-base="biuro"] .card, html[data-base="biuro"] .tile, html[data-base="biuro"] .ntile, html[data-base="biuro"] .sblk-b { box-shadow: none; }
html[data-base="biuro"] h1 { font-size: 24px; }
html[data-base="biuro"] th, html[data-base="biuro"] td { padding: 6px 8px; }
html[data-base="biuro"] th { font-size: 11px; letter-spacing: .07em; }
html[data-base="biuro"] .tile { border-top-width: 3px; }
html[data-base="biuro"] .tile b { font-size: 24px; }
html[data-base="biuro"] button, html[data-base="biuro"] .btn { font-weight: 600; letter-spacing: .01em; }
html[data-base="biuro"] .ntile { padding: 14px; } html[data-base="biuro"] .ntile:hover { transform: none; }
html[data-base="biuro"] .tag { font-weight: 600; }

/* ---------- układ DOCK (Hala): dolny pasek, duże kafelki ---------- */
html[data-layout="dock"] .dock { display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  background: var(--head); border: 1px solid var(--head-line); border-radius: 999px; padding: 6px; gap: 2px; box-shadow: 0 14px 40px rgba(0,0,0,.30);
  max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none; }
html[data-layout="dock"] .dock::-webkit-scrollbar { display: none; }
.dock a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 16px 8px; min-width: 70px; border-radius: 999px;
  color: var(--head-mute); font: 700 12.5px/1.1 var(--font-body); text-decoration: none; white-space: nowrap; letter-spacing: .02em; }
.dock a:hover { color: var(--head-ink); text-decoration: none; }
.dock a.on { background: var(--accent); color: var(--accent-ink); }
.dk-badge { position: absolute; top: 3px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--stop); color: #fff; font: 800 11px/18px var(--font-body); font-style: normal; text-align: center; }
html[data-layout="dock"] .top nav.tabs { display: none; }
html[data-layout="dock"] .top-in { min-height: 70px; }
html[data-layout="dock"] .who { margin-left: auto; }
html[data-layout="dock"] main { padding-bottom: 130px; }
html[data-layout="dock"] .app-foot { padding-bottom: 110px; }
html[data-layout="dock"] .burger { display: none !important; }
@media (max-width: 860px) {
  html[data-layout="dock"] .who .hide-m { display: inline-flex; }
  html[data-layout="dock"] .who .langmenu, html[data-layout="dock"] .who .top-only { display: none; }
  .dock a { min-width: 58px; padding: 9px 11px 8px; font-size: 11.5px; }
}
html[data-base="hala"] h1 { font-size: 38px; text-transform: uppercase; line-height: 1.05; }
html[data-base="hala"] h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
html[data-base="hala"] .eyebrow { font-size: 13.5px; }
html[data-base="hala"] .card, html[data-base="hala"] .tile, html[data-base="hala"] .ntile, html[data-base="hala"] .sblk-b { border-color: transparent; box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 6%, transparent), 0 10px 30px color-mix(in srgb, var(--ink) 7%, transparent); }
html[data-base="hala"] button:not(.iconbtn):not(.linkbtn), html[data-base="hala"] .btn { font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding-left: 22px; padding-right: 22px; }
html[data-base="hala"] button.small, html[data-base="hala"] .btn.small { text-transform: none; letter-spacing: 0; }
html[data-base="hala"] button.big { min-height: 120px; font-size: 40px; font-family: var(--font-head); }
html[data-base="hala"] .tile { border-top-width: 6px; }
html[data-base="hala"] .tile b { font-size: 44px; line-height: 1; }
html[data-base="hala"] .ntiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
html[data-base="hala"] .ntile { padding: 22px 20px; min-height: 140px; justify-content: flex-end; }
html[data-base="hala"] .ntile svg { width: 34px; height: 34px; color: var(--accent); }
html[data-base="hala"] .ntile b { font-size: 22px; font-family: var(--font-head); text-transform: uppercase; }
html[data-base="hala"] .seg span { min-height: 56px; font-size: 17px; }
html[data-base="hala"] .tag { padding: 3px 12px; }
html[data-base="hala"] .top .brand .wm { font-family: var(--font-head); font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Las: miękko i ciepło ---------- */
html[data-base="las"] h1 { font-size: 32px; }
html[data-base="las"] .card, html[data-base="las"] .sblk-b { box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 4%, transparent), 0 8px 28px color-mix(in srgb, var(--ink) 6%, transparent); border-color: color-mix(in srgb, var(--line) 60%, transparent); }
html[data-base="las"] .tile { border-top: 0; border-left: 5px solid var(--line2); }
html[data-base="las"] .tile.ok { border-left-color: var(--ok); } html[data-base="las"] .tile.info { border-left-color: var(--info); } html[data-base="las"] .tile.acc { border-left-color: var(--accent); }
html[data-base="las"] .top nav a.on { border-color: transparent; background: var(--head-chip); border-radius: 999px; }
html[data-base="las"] .top nav a { padding: 7px 11px; margin: 12px 0; border-bottom: 0; border-radius: 999px; }

/* =====================  Ustawienia  ===================== */
.set-wrap { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 30px; align-items: start; }
.set-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
html[data-layout="side"] .set-nav { top: 24px; }
.sn-g { display: flex; flex-direction: column; gap: 1px; }
.sn-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--mute); font-weight: 700; padding: 0 10px 5px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-btn); color: var(--ink); font-size: 14px; text-decoration: none; }
.set-nav a svg { color: var(--mute); flex: none; }
.set-nav a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.set-nav a.on { background: var(--card); box-shadow: inset 3px 0 0 var(--accent), 0 1px 3px color-mix(in srgb, var(--ink) 8%, transparent); font-weight: 600; }
.set-nav a.on svg { color: var(--accent); }
.set-nav .sn-help { color: var(--mute); font-size: 13px; }
.st { width: 8px; height: 8px; border-radius: 4px; background: var(--line2); flex: none; margin-left: auto; display: inline-block; }
.st-ok { background: var(--ok); } .st-warn { background: #E0A100; } .st-err { background: var(--err); } .st-off { background: var(--line2); }
.set-head { margin: 0 0 6px; } .set-head h1 { margin: 2px 0 4px; } .set-head p { color: var(--mute); margin: 0 0 6px; max-width: 70ch; }
.sblk { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: 26px; padding: 22px 0; border-top: 1px solid var(--line); }
.sblk:first-of-type { border-top: 0; }
.sblk-h h3 { font-size: 15.5px; margin: 0 0 6px; } .sblk-h p { color: var(--mute); font-size: 13.5px; margin: 0; line-height: 1.5; }
.sblk-b { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--card-pad); box-shadow: var(--shadow); min-width: 0; }
.sblk-b > label:last-child, .sblk-b > .row:last-child label { margin-bottom: 0; }
.sblk-wide { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.savebar { position: static; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 15; display: flex; gap: 8px; align-items: center; margin-top: 6px;
  padding: 10px 12px; border-radius: var(--r-card); border: 1px solid transparent; transition: background-color .2s, box-shadow .2s; }
.savebar .sv-msg, .savebar .sv-reset { visibility: hidden; }
form.dirty .savebar { position: sticky; background: var(--head); border-color: var(--head-line); color: var(--head-ink); box-shadow: 0 12px 34px rgba(0,0,0,.24); }
form.dirty .savebar .sv-msg, form.dirty .savebar .sv-reset { visibility: visible; }
form.dirty .savebar .sv-msg { font-weight: 600; font-size: 14px; }
form.dirty .savebar .sv-reset { background: transparent; color: var(--head-ink); border-color: var(--head-line); }
html[data-layout="dock"] .savebar { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.ov-g { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--mute); margin: 22px 0 10px; font-family: var(--font-body); }
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ov-tile { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.ov-tile:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.ov-ic { grid-row: span 2; width: 40px; height: 40px; border-radius: var(--r-btn); display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 12%, var(--card)); color: var(--accent); }
.ov-t b { display: block; font-size: 15px; } .ov-t small { color: var(--mute); font-size: 12.5px; line-height: 1.35; display: block; }
.ov-st { grid-column: 2; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; margin-top: 6px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-st .st { margin: 0; }
.ov-tile.st-warn { border-color: color-mix(in srgb, #E0A100 50%, var(--line)); } .ov-tile.st-err { border-color: color-mix(in srgb, var(--err) 50%, var(--line)); }
.kvl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; margin: 4px 0 6px; font-size: 14px; }
.kvl dt { color: var(--mute); } .kvl dd { margin: 0; overflow-wrap: anywhere; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin-bottom: 10px; }
.stat-row > div { display: flex; flex-direction: column; gap: 2px; }
.stat-row small { color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; } .stat-row b { font-size: 20px; }
.reqs.cols2 { columns: 2; margin: 0; }
.feat { justify-content: space-between; } .feat .sw { margin-left: 12px; }
.perm-table { min-width: 560px; }
.perm-table td small, .perm-table th small { display: block; color: var(--mute); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.perm-table .c { text-align: center; width: 110px; } .perm-table td.c svg { color: var(--ok); }
.perm-table .sw { display: inline-block; } .perm-wide { font-size: 10.5px !important; }
.perm-fixed td { color: var(--mute); }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 10px 0 18px; }
.role-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--line2); }
.role-card small { color: var(--mute); font-size: 12.5px; line-height: 1.35; }
.role-card.r-manager { border-top-color: var(--info); } .role-card.r-hr { border-top-color: var(--accent); } .role-card.r-admin { border-top-color: var(--ink); }
.rc-n { margin-top: auto; padding-top: 6px; font-family: var(--font-num); font-weight: 700; font-size: 20px; }
.field-label { font-size: 13.5px; color: var(--mute); margin: 4px 0 6px; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.role-opt { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r-in); cursor: pointer; margin: 0; }
.role-opt input { margin-top: 3px; min-height: 0; accent-color: var(--accent); }
.role-opt span { display: flex; flex-direction: column; } .role-opt small { color: var(--mute); font-size: 12px; line-height: 1.35; }
.role-opt:has(input:checked) { border: 2px solid var(--accent); padding: 9px 11px; background: var(--sel); }
.role-opt.dis { opacity: .5; cursor: not-allowed; }
@media (max-width: 960px) {
  .set-wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; padding-bottom: 2px; }
  .set-nav::-webkit-scrollbar { display: none; }
  .sn-g { flex-direction: row; gap: 6px; } .sn-h { display: none; }
  .set-nav a { white-space: nowrap; border: 1px solid var(--line2); background: var(--card); }
  .set-nav a .st { margin-left: 4px; }
  .sblk { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 0; }
  .reqs.cols2 { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { button, .btn, .ntile, .ov-tile, .savebar { transition: none; } .ntile:hover, .ov-tile:hover { transform: none; } }
html[data-base="hala"] .seg span { border-radius: 18px; padding: 6px 14px; text-align: center; line-height: 1.2; }
html[data-base="las"] .seg span { padding: 6px 12px; text-align: center; line-height: 1.2; }
@media (max-width: 560px) { html[data-base="hala"] .tile b { font-size: 34px; } html[data-base="hala"] h1 { font-size: 30px; } html[data-base="hala"] button.big { min-height: 96px; font-size: 34px; } }

/* ===== Skórka Nowoczesna (layout: tiles) ===== */
html[data-layout="tiles"] .top {
  background: linear-gradient(90deg, var(--head) 0%, color-mix(in srgb, var(--head) 85%, var(--accent)) 100%);
  border-bottom: none;
  box-shadow: 0 4px 20px rgba(15,23,42,.12);
}
html[data-layout="tiles"] .top nav.tabs {
  gap: 8px;
}
html[data-layout="tiles"] .top nav a {
  border-radius: 12px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--head-ink) 8%, transparent);
  border-bottom: none;
}
html[data-layout="tiles"] .top nav a.on {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent);
}
html[data-layout="tiles"] main {
  max-width: 1280px;
}
html[data-layout="tiles"] .card,
html[data-layout="tiles"] .sblk {
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(15,23,42,.06);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
html[data-layout="tiles"] .bigbtn {
  border-radius: 24px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--go) 25%, transparent);
}
/* Kafelki na pulpicie */
html[data-layout="tiles"] .dash-grid,
html[data-layout="tiles"] .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ===== Poprawki responsywności — zawijanie, brak rozjeżdżania ===== */
html, body { overflow-x: hidden; }
main, .card, .bar, form { max-width: 100%; }
.card, .note, td, th, .tag, label, select, input, button {
  overflow-wrap: anywhere;
  word-break: break-word;
}
table.kv { width: 100%; table-layout: auto; }
table.kv td { word-break: break-word; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .row { flex-direction: column; align-items: stretch; }
  .row > * { min-width: 0; flex: none; width: 100%; }
  table.kv td:first-child { width: auto; display: block; font-weight: 600; padding-bottom: 2px; }
  table.kv td { display: block; width: 100%; }
  table.kv tr { display: block; margin-bottom: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .bar { flex-direction: column; align-items: stretch; }
  .bar h1 { font-size: 20px; }
  .card { padding: 14px; }
  select, input[type="date"], input[type="time"], input[type="text"], input[type="email"] { width: 100%; box-sizing: border-box; }
  .tag { white-space: normal; }
}
