/* Dla Firmy — panel główny w kolorach Kadrownika i Flotownika (skórka „Kadrownik”: granat i błękit, Inter).
   Motyw jasny (domyślny), ciemny i automatyczny: <html data-theme="dark|light">; bez atrybutu = według urządzenia. */

:root {
  --accent: #2563EB; --accent-ink: #FFFFFF; --accent-soft: #DBEAFE; --accent-line: #93C5FD; --accent-2: #60A5FA;
  --head: #0F172A; --head-line: #0F172A; --head-ink: #F8FAFC; --head-mute: #94A3B8; --head-chip: #1E293B;
  --bg: #F8FAFC; --card: #FFFFFF; --card2: #F1F5F9; --input: #FFFFFF; --line: #E2E8F0; --line2: #CBD5E1;
  --ink: #0F172A; --mute: #475569; --faint: #94A3B8; --ph: #CBD5E1;
  --link: #2563EB;
  --ok: #15803D; --okbg: #DCFCE7;
  --err: #B91C1C; --errbg: #FEE2E2;
  --warn: #92400E; --warnbg: #FEF3C7;
  --off: #475569; --offbg: #F1F5F9;
  --track: #E2E8F0;
  --stage: #0F172A; --stage2: #1E3A8A; --stage-ink: #E2E8F0; --stage-mute: #64748B;
  --s-a: #2563EB; --s-b: #D97706;
  --heat: 37, 99, 235;
  --fleet: #0EA5E9; --hr: #2563EB;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 4px 16px rgba(15,23,42,.05);
  --shadow-lift: 0 2px 4px rgba(15,23,42,.06), 0 18px 40px rgba(15,23,42,.14);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #3B82F6; --accent-soft: rgba(59,130,246,.16); --accent-line: #60A5FA;
    --head: #0B1120; --head-line: #1E293B; --head-mute: #94A3B8; --head-chip: #1E293B;
    --bg: #0B1120; --card: #131C2E; --card2: #1E293B; --input: #0F172A; --line: #1E293B; --line2: #334155;
    --ink: #F1F5F9; --mute: #94A3B8; --faint: #64748B; --ph: #334155;
    --link: #60A5FA;
    --ok: #4ADE80; --okbg: rgba(74,222,128,.12);
    --err: #F87171; --errbg: rgba(248,113,113,.14);
    --warn: #FBBF24; --warnbg: rgba(251,191,36,.12);
    --off: #CBD5E1; --offbg: #1E293B;
    --track: #1E293B;
    --stage: #0B1120; --stage2: #1E3A8A;
    --s-a: #60A5FA; --s-b: #F59E0B;
    --shadow: none; --shadow-lift: 0 18px 40px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #3B82F6; --accent-soft: rgba(59,130,246,.16); --accent-line: #60A5FA;
  --head: #0B1120; --head-line: #1E293B; --head-mute: #94A3B8; --head-chip: #1E293B;
  --bg: #0B1120; --card: #131C2E; --card2: #1E293B; --input: #0F172A; --line: #1E293B; --line2: #334155;
  --ink: #F1F5F9; --mute: #94A3B8; --faint: #64748B; --ph: #334155;
  --link: #60A5FA;
  --ok: #4ADE80; --okbg: rgba(74,222,128,.12);
  --err: #F87171; --errbg: rgba(248,113,113,.14);
  --warn: #FBBF24; --warnbg: rgba(251,191,36,.12);
  --off: #CBD5E1; --offbg: #1E293B;
  --track: #1E293B;
  --stage: #0B1120; --stage2: #1E3A8A;
  --s-a: #60A5FA; --s-b: #F59E0B;
  --shadow: none; --shadow-lift: 0 18px 40px rgba(0,0,0,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 Inter, "Segoe UI", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
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: 10px; align-items: baseline; flex-wrap: wrap; }
h2 small { color: var(--mute); font-weight: 400; font-size: 14px; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.ico { flex: none; }

/* --- 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 max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--head-ink); font-weight: 800; letter-spacing: .02em; text-decoration: none !important; }
.brand img { height: 30px; width: auto; }
.brand span { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--head-mute); border-left: 1px solid var(--head-chip); padding-left: 12px; }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 8px; color: var(--head-mute); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none; }
.nav a:hover { color: var(--head-ink); background: var(--head-chip); }
.nav a.on { color: var(--accent); background: var(--head-chip); }
.sp { flex: 1; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--head-mute); }
.iconbtn:hover { background: var(--head-chip); color: var(--head-ink); }
.who { position: relative; }
.who summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; color: var(--head-ink); padding: 4px 6px 4px 4px; border-radius: 999px; }
.who summary::-webkit-details-marker { display: none; }
.who summary:hover { background: var(--head-chip); }
.who-n { font-weight: 600; font-size: 14px; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); min-width: 250px; padding: 6px; z-index: 30; }
.who-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.who-head span { color: var(--mute); font-size: 13px; }
.who-menu a, .who-menu .lnk { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-weight: 500; font-size: 14px; text-decoration: none; }
.who-menu a:hover, .who-menu .lnk:hover { background: var(--card2); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }

/* --- treść --- */
.wrap { max-width: 1240px; width: 100%; margin: 0 auto; padding: 26px max(16px, env(safe-area-inset-left)) 40px; flex: 1; }
.foot { text-align: center; color: var(--faint); font-size: 12.5px; padding: 18px 16px 26px; }
.login-body .foot { background: var(--head); color: var(--head-mute); opacity: .7; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card.accent { border-top: 4px solid var(--accent); }
.card.danger { border-color: var(--errbg); }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 150px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.eyebrow { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.note { color: var(--mute); font-size: 13px; }
.scroll { overflow-x: auto; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span { color: var(--mute); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-row:last-child { border-bottom: 0; }
.log { margin: 0 0 14px; padding-left: 18px; font-size: 14px; color: var(--mute); }
.nowrap { white-space: nowrap; }

/* --- komunikaty, etykiety --- */
.msg { padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; font-weight: 500; }
.msg.ok { background: var(--okbg); color: var(--ok); } .msg.err { background: var(--errbg); color: var(--err); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--offbg); color: var(--off); letter-spacing: .02em; vertical-align: middle; }
.pill.acc { background: var(--accent-soft); color: var(--warn); }
.pill.warn { background: var(--warnbg); color: var(--warn); }
.pill.off { background: var(--errbg); color: var(--err); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px dashed var(--line2); color: var(--faint); }
.chip.on { border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* --- formularze --- */
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--input); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; min-height: 42px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[readonly] { background: var(--card2); color: var(--mute); }
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: 10px; padding: 9px 16px; min-height: 42px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14.5px; text-decoration: none !important; }
button:hover, .btn:hover { filter: brightness(1.05); }
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); font-weight: 600; }
button.small, .btn.small { min-height: 34px; padding: 5px 12px; font-size: 13px; border-radius: 8px; }
button.lnk { background: none; border: 0; padding: 0; min-height: 0; color: var(--link); font-weight: 600; justify-content: flex-start; }
button.tiny { font-size: 11.5px; font-weight: 600; color: var(--mute); }
button.tiny:hover { color: var(--link); }
button:disabled { opacity: .45; cursor: default; }
form.inline { display: inline; }
input[type="search"] { min-width: 220px; }

/* --- logowanie --- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 28px; background: var(--head); position: relative; overflow: hidden; flex: 1; }
.login-wrap > * { position: relative; z-index: 1; }
.login-wrap .logo { width: 180px; height: auto; animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.login-card { width: 100%; max-width: 400px; border-top: 4px solid var(--accent); margin: 0; animation: rise .7s .08s cubic-bezier(.2,.8,.2,1) both; }
.login-card h1 { font-size: 26px; }
.login-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.login-foot .note { font-size: 12.5px; max-width: 180px; }
.login-out .lnk { color: var(--head-mute); }
.login-bg { position: absolute; inset: 0; z-index: 0 !important; pointer-events: none; }
.login-bg span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .22; background: var(--accent); animation: drift 22s ease-in-out infinite alternate; }
.login-bg span:nth-child(1) { width: 420px; height: 420px; left: -120px; top: -140px; }
.login-bg span:nth-child(2) { width: 300px; height: 300px; right: -90px; bottom: -80px; background: #2563EB; opacity: .35; animation-duration: 28s; }
.login-bg span:nth-child(3) { width: 200px; height: 200px; right: 22%; top: 12%; opacity: .1; animation-duration: 18s; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* --- ekran główny --- */
.hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 4px 0 24px; animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 { font-size: 34px; margin: 4px 0 4px; }
.hero .note { font-size: 15px; margin: 0; }
.hero-clock { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.hero-clock .colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.empty { text-align: center; padding: 40px 20px; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.app-tile { --tilt-x: 0deg; --tilt-y: 0deg; position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease;
  animation: tileIn .7s calc(var(--i) * 90ms + 120ms) cubic-bezier(.2,.8,.2,1) both; }
@keyframes tileIn { from { opacity: 0; transform: perspective(900px) translateY(34px) rotateX(12deg) scale(.96); } to { opacity: 1; transform: perspective(900px); } }
.app-tile:hover, .app-tile:focus-visible { border-color: var(--accent-line); box-shadow: var(--shadow-lift), 0 0 0 1px var(--accent-line); outline: none; }
.app-tile:hover { transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-6px); }
.app-tile.off { cursor: default; opacity: .72; }
.app-tile.off:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow); }
.app-stage { position: relative; height: 150px; background: radial-gradient(120% 120% at 20% 0%, var(--stage2), var(--stage) 70%); overflow: hidden; }
.app-stage::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 20px 20px; }
.app-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.app-tile:hover .app-stage::after { transform: scaleX(1); }
.app-glow { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(96,165,250,.35), transparent 65%); left: var(--gx, 50%); top: var(--gy, 50%); transform: translate(-50%, -50%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.app-tile:hover .app-glow { opacity: 1; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.app-body { padding: 16px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.app-top { display: flex; gap: 6px; margin-bottom: 8px; }
.app-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); background: var(--card2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.app-tag.soon { color: var(--warn); background: var(--warnbg); border-color: transparent; }
.app-body h2 { font-size: 22px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; }
.app-body p { margin: 0 0 14px; color: var(--mute); font-size: 14px; flex: 1; }
.app-foot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 12px; }
.app-host { font-weight: 600; color: var(--mute); }
.app-last { flex: 1; text-align: right; }
.app-go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); color: var(--ink); margin-left: auto; transition: background .25s, color .25s, transform .3s cubic-bezier(.2,.8,.2,1); }
.app-last + .app-go { margin-left: 0; }
.app-tile:hover .app-go { background: var(--accent); color: var(--accent-ink); transform: translateX(3px); }

/* ===== sceny SVG ===== */
.scene * { vector-effect: non-scaling-stroke; }
.scene { --sp: 1; }
.app-tile:hover .scene { --sp: 2.2; }

/* zegar (HR) */
.scene-zegar .face { fill: #0B1120; stroke: #334155; stroke-width: 2; }
.scene-zegar .ring { fill: none; stroke: #60A5FA; stroke-width: 3; stroke-dasharray: 251; stroke-dashoffset: 251; animation: ring 6s linear infinite; transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; }
@keyframes ring { 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.scene-zegar .marks path { stroke: #64748B; stroke-width: 2; stroke-linecap: round; }
.scene-zegar .hand-h, .scene-zegar .hand-m { stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; }
.scene-zegar .hand-h { stroke: #E2E8F0; stroke-width: 4; animation: spin 48s linear infinite; }
.scene-zegar .hand-m { stroke: #60A5FA; stroke-width: 2.5; animation: spin 4s linear infinite; }
.app-tile:hover .scene-zegar .hand-m { animation-duration: 1.2s; }
.app-tile:hover .scene-zegar .hand-h { animation-duration: 14s; }
.scene-zegar .pin { fill: #60A5FA; }
.scene-zegar .cal rect { fill: #14234A; stroke: #334155; }
.scene-zegar .cal .cal-head { fill: #60A5FA; stroke: none; }
.scene-zegar .cal-cells rect { fill: #1E293B; stroke: none; }
.scene-zegar .tick { fill: none; stroke: #4ADE80; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14; animation: tick 6s ease-out infinite; }
.scene-zegar .t2 { animation-delay: .6s; } .scene-zegar .t3 { animation-delay: 1.2s; } .scene-zegar .t4 { animation-delay: 1.8s; } .scene-zegar .t5 { animation-delay: 2.4s; }
@keyframes tick { 0%, 8% { stroke-dashoffset: 14; } 18%, 80% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.scene-zegar .cal { animation: bob 5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-3px); } }

/* auto (Flota) */
.scene-auto .hills path { fill: #14234A; }
.scene-auto .road rect { fill: #172036; }
.scene-auto .lane { stroke: #60A5FA; stroke-width: 2.5; stroke-dasharray: 16 14; animation: lane .6s linear infinite; }
.app-tile:hover .scene-auto .lane { animation-duration: .22s; }
@keyframes lane { to { stroke-dashoffset: -30; } }
.scene-auto .poles path { stroke: #334155; stroke-width: 3; stroke-linecap: round; animation: poles 2.4s linear infinite; }
.app-tile:hover .scene-auto .poles path { animation-duration: .9s; }
@keyframes poles { from { transform: translateX(0); } to { transform: translateX(-60px); } }
.scene-auto .car { animation: carBob .5s ease-in-out infinite alternate; }
.scene-auto .body { fill: #60A5FA; }
.scene-auto .glass { fill: #0F172A; }
.scene-auto .light { stroke: #fff; stroke-width: 3; stroke-linecap: round; animation: flash 2s ease-in-out infinite; }
.scene-auto .wheel circle { fill: #0B1120; stroke: #E2E8F0; stroke-width: 2.5; }
.scene-auto .wheel path { stroke: #E2E8F0; stroke-width: 2; }
.scene-auto .wheel { animation: spin .7s linear infinite; transform-box: fill-box; transform-origin: center; }
.app-tile:hover .scene-auto .wheel { animation-duration: .25s; }
@keyframes carBob { to { transform: translateY(-1.2px); } }
@keyframes flash { 50% { opacity: .3; } }
.scene-auto .odo rect { fill: #0B1120; stroke: #334155; }
.scene-auto .odo-t { fill: #60A5FA; font: 700 11px ui-monospace, monospace; letter-spacing: .5px; }
.scene-auto .odo-km { fill: #64748B; font: 600 9px Inter, sans-serif; }

/* małe sceny w panelu */
.mini-scene { position: relative; display: inline-block; width: 56px; height: 34px; border-radius: 8px; overflow: hidden; background: var(--stage); flex: none; vertical-align: middle; }
.mini-scene.big { width: 96px; height: 58px; border-radius: 10px; }
.mini-scene .scene { animation-play-state: paused; }

/* --- panel administratora --- */
.tabs { display: flex; gap: 4px; margin: 0 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--mute); font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; 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; }
td.c, th.c { text-align: center; }
tr.dim td { opacity: .55; }
tr.bad td { background: var(--errbg); }
tbody tr:hover td { background: var(--card2); }
.person-cell { display: flex; align-items: center; gap: 12px; }
.person-cell .av { width: 32px; height: 32px; font-size: 12px; }
.rank { width: 20px; text-align: right; color: var(--faint); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }

.access-list { display: grid; gap: 8px; }
.access { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); cursor: pointer; margin: 0; }
.access:hover { border-color: var(--line2); }
.access:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.access input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--accent); flex: none; }
.access > span:last-child { display: flex; flex-direction: column; }
.access.dim { opacity: .6; }

.matrix th.c { min-width: 110px; vertical-align: bottom; }
.matrix th.c div { margin: 6px 0 2px; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.tgl { display: inline-block; margin: 0; cursor: pointer; }
.tgl input { position: absolute; opacity: 0; width: 0; height: 0; }
.tgl span { display: block; width: 42px; height: 24px; border-radius: 999px; background: var(--track); border: 1px solid var(--line2); position: relative; transition: background .2s; }
.tgl span::after { content: ""; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.tgl input:checked + span { background: var(--accent); border-color: var(--accent-line); }
.tgl input:checked + span::after { transform: translateX(18px); }
.tgl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 14px 0 2px; background: var(--card); }
.savebar.dirty [data-dirty-msg] { color: var(--warn); font-weight: 600; }

.tile-admin { display: grid; gap: 10px; margin-bottom: 18px; }
.ta-row { display: flex; align-items: center; gap: 16px; margin: 0; flex-wrap: wrap; }
.ta-row.dim { opacity: .6; }
.ta-main { flex: 1; min-width: 220px; }
.ta-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; font-size: 16px; }
.ta-act { display: flex; gap: 6px; flex-wrap: wrap; }
.help ol { margin: 0 0 10px; padding-left: 20px; line-height: 1.7; }
.pass-card { border-top: 4px solid var(--ok); }
.pass-big { font: 800 30px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; margin: 8px 0; }
.pager { display: flex; gap: 12px; justify-content: center; align-items: center; }
.filters select { min-width: 170px; }
.ev { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--line2); vertical-align: middle; }
.ev-login { background: var(--s-a); } .ev-start { background: var(--accent); } .ev-login_fail { background: var(--err); } .ev-admin { background: var(--ok); }

/* --- statystyki --- */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; padding: 3px; }
.seg a { padding: 6px 12px; border-radius: 7px; color: var(--mute); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.seg a.on { background: var(--accent); color: var(--accent-ink); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--line2); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.kpi:nth-child(2) { animation-delay: .06s; } .kpi:nth-child(3) { animation-delay: .12s; } .kpi:nth-child(4) { animation-delay: .18s; }
.kpi.acc { border-top-color: var(--accent); } .kpi.warn { border-top-color: var(--err); }
.kpi > span { font-size: 13px; color: var(--mute); }
.kpi b { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi small { color: var(--faint); font-size: 12.5px; }
.delta { font-size: 12.5px; font-weight: 700; color: var(--mute); }
.delta.up { color: var(--ok); } .delta.down { color: var(--err); }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.lg { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-left: 8px; }
.lg-a { background: var(--s-b); height: 10px; border-radius: 3px; } .lg-b { background: var(--s-a); }
.chart { position: relative; height: 260px; margin-top: 6px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis text { fill: var(--faint); font-size: 11px; font-family: Archivo, sans-serif; }
.chart .bar-a { fill: var(--s-b); }
.chart .line-b { fill: none; stroke: var(--s-a); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot-b { fill: var(--s-a); stroke: var(--card); stroke-width: 2; }
.chart .cross { stroke: var(--mute); stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; }
.tip { position: absolute; pointer-events: none; background: var(--head); color: var(--head-ink); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; line-height: 1.5; white-space: nowrap; box-shadow: var(--shadow-lift); transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .12s; z-index: 5; }
.tip.on { opacity: 1; }
.tip b { color: var(--accent); }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.tview { margin-top: 10px; }
.tview summary { cursor: pointer; }
.tview table { margin-top: 8px; font-size: 13.5px; }

.hbars { display: grid; gap: 14px; }
.hbar { display: flex; align-items: center; gap: 12px; }
.hb-main { flex: 1; min-width: 0; }
.hb-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 5px; }
.hb-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.hb-track { height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.hb-track span { display: block; height: 100%; width: var(--w); min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; transform-origin: left; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; }
.hbar.slim .hb-track { height: 7px; }
.hbar.slim .hb-track span { background: var(--s-a); }
@keyframes grow { from { transform: scaleX(0); } }
.spark { display: inline-block; width: 70px; height: 6px; background: var(--track); border-radius: 999px; margin-right: 10px; vertical-align: middle; overflow: hidden; }
.spark span { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 999px; }

.heat { display: grid; gap: 3px; font-size: 11px; position: relative; }
.heat-h, .heat-r { display: grid; grid-template-columns: 30px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat-h span { color: var(--faint); text-align: left; }
.heat-d { color: var(--mute); font-weight: 600; }
.heat .cell { aspect-ratio: 1; border-radius: 3px; background: var(--track); position: relative; }
.heat .cell::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: rgba(var(--heat), var(--v)); }
.heat .cell:hover { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 1; }
.heat-scale { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 8px; }
.heat-scale i { width: 14px; height: 14px; border-radius: 3px; background: var(--track); position: relative; overflow: hidden; }
.heat-scale i::after { content: ""; position: absolute; inset: 0; background: rgba(var(--heat), var(--v)); }

/* --- telefon --- */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav span, .who-n { display: none; }
  .brand span { display: none; }
  .top-in { gap: 8px; }
}
@media (max-width: 560px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 28px; }
  .hero-clock { display: none; }
  .app-grid { grid-template-columns: 1fr; }
  .kpi b { font-size: 28px; }
  h1 { font-size: 24px; }
  input[type="search"] { min-width: 0; width: 100%; }
  .login-foot { flex-direction: column-reverse; align-items: stretch; }
  .login-foot .note { max-width: none; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ===== pasek Start / Koniec (HR) ===== */
.punch-bar { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 18px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; margin: -6px 0 24px; box-shadow: var(--shadow); overflow: hidden; animation: rise .6s .05s cubic-bezier(.2,.8,.2,1) both; }
.punch-bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line2); transition: background .4s; }
.punch-bar.st-start::before { background: var(--accent); }
.punch-bar.st-end::before { background: var(--ok); }
.punch-bar.st-done::before { background: var(--s-a); }
.punch-bar.st-err::before { background: var(--err); }
.punch-bar.swap .pb-txt, .punch-bar.swap .pb-act, .punch-bar.swap .pb-branch { animation: swapIn .5s cubic-bezier(.2,.8,.2,1) both; }
.punch-bar.swap .pb-act { animation-delay: .06s; }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } }

.pb-icon { position: relative; width: 58px; height: 58px; flex: none; }
.pb-icon svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pb-track { fill: none; stroke: var(--track); stroke-width: 5; }
.pb-ring { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1), stroke .4s; }
.st-end .pb-ring { stroke: var(--ok); }
.st-done .pb-ring { stroke: var(--s-a); }
.pb-dot { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--line2); transition: background .4s, transform .4s; }
.st-start .pb-dot { background: var(--accent); animation: breathe 2.4s ease-in-out infinite; }
.st-end .pb-dot { background: var(--ok); }
.st-end .pb-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite; }
.st-done .pb-dot { background: var(--s-a); }
.st-err .pb-dot { background: var(--err); }
.is-loading .pb-dot { background: var(--line2); animation: breathe 1s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.72); } }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.pb-txt { min-width: 0; }
.pb-eyebrow { display: flex; align-items: center; gap: 8px; }
.st-end .pb-eyebrow { color: var(--ok); }
.pb-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: blink 1.2s ease-in-out infinite; }
.pb-main { margin: 2px 0 1px; min-height: 40px; display: flex; align-items: center; }
.pb-big { font-size: 34px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pb-big small { font-size: 18px; font-weight: 700; color: var(--mute); }
.pb-big.pb-mid { font-size: 24px; }
.pb-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-skel { display: block; width: 220px; max-width: 100%; height: 26px; border-radius: 8px; background: linear-gradient(90deg, var(--track), var(--card2), var(--track)); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }

.pb-branch { display: flex; flex-direction: column; gap: 5px; }
.pb-seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 3px; gap: 2px; }
.pb-seg button { background: transparent; color: var(--mute); min-height: 36px; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; }
.pb-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(14,22,38,.15), inset 0 -2px 0 var(--accent); }

.pb-act { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.pb-btn { position: relative; overflow: hidden; min-width: 168px; min-height: 58px; padding: 0 26px; border-radius: 14px; font-size: 19px; font-weight: 800; gap: 10px; transition: transform .15s ease, box-shadow .3s ease, filter .2s; }
.pb-btn:active { transform: scale(.96); }
.pb-btn.go { background: var(--accent); color: var(--accent-ink); animation: glow 2.6s ease-in-out infinite; }
.pb-btn.go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: shine 3.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.35); } 50% { box-shadow: 0 0 0 8px rgba(37,99,235,.12); } }
@keyframes shine { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }
.pb-btn.stop { background: var(--stop, #C2362B); color: #fff; }
.pb-btn-wrap { --pct: 0%; display: inline-block; padding: 3px; border-radius: 17px; background: conic-gradient(from -90deg, var(--ok) var(--pct), var(--track) 0); transition: --pct 1s; position: relative; }
.pb-btn-wrap::after { content: ""; position: absolute; inset: 0; border-radius: 17px; box-shadow: 0 0 0 0 rgba(61,220,151,.45); animation: workGlow 2.4s ease-out infinite; pointer-events: none; }
@keyframes workGlow { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(61,220,151,0); } }
.pb-btn-wrap .pb-btn { display: inline-flex; }
.pb-btn.sec { min-width: 0; font-size: 15px; min-height: 46px; animation: none; }
.pb-btn.busy, .pb-yes.busy { cursor: progress; }
.pb-btn.busy > svg, .pb-btn.busy > span:not(.pb-ripple):not(.pb-spin) { opacity: .35; }
.pb-spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.pb-btn.done { background: var(--ok); color: #fff; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.pb-check { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .05s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.pb-ripple { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(255,255,255,.6); transform: scale(0); opacity: 0; pointer-events: none; }
.pb-ripple.go { animation: ripple .65s ease-out; }
@keyframes ripple { from { transform: scale(0); opacity: .8; } to { transform: scale(40); opacity: 0; } }
.pb-link { font-weight: 700; font-size: 14px; }

.pb-confirm { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; animation: swapIn .35s cubic-bezier(.2,.8,.2,1) both; }
.pb-confirm > span { font-size: 15px; margin-right: 4px; }
.pb-yes { background: var(--stop, #C2362B); color: #fff; min-height: 50px; padding: 0 18px; border-radius: 12px; font-size: 16px; font-weight: 800; position: relative; }
.pb-no { min-height: 50px; }
.pb-timeout { position: absolute; left: 0; right: 0; bottom: -10px; height: 2px; background: var(--line2); transform-origin: left; animation: tmo 10s linear forwards; border-radius: 2px; }
@keyframes tmo { to { transform: scaleX(0); } }

.pb-toast { display: none; width: fit-content; margin-top: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pb-toast.on { display: block; animation: swapIn .35s cubic-bezier(.2,.8,.2,1) both; }
.pb-toast.ok { background: var(--okbg); color: var(--ok); }
.pb-toast.warn { background: var(--warnbg); color: var(--warn); }
.pb-toast.err { background: var(--errbg); color: var(--err); }

.pb-burst { position: absolute; inset: 0; pointer-events: none; }
.pb-burst i { position: absolute; left: 50%; top: 50%; width: 4px; height: 10px; margin: -5px 0 0 -2px; border-radius: 2px; background: var(--accent); transform: rotate(var(--a)) translateY(0); animation: burst .8s ease-out forwards; }
@keyframes burst { from { opacity: 1; transform: rotate(var(--a)) translateY(-12px) scaleY(1); } to { opacity: 0; transform: rotate(var(--a)) translateY(-44px) scaleY(.3); } }

@media (max-width: 900px) {
  .punch-bar { grid-template-columns: auto minmax(0, 1fr); }
  .pb-branch, .pb-act { grid-column: 1 / -1; }
  .pb-act { justify-content: stretch; }
  .pb-act > .pb-btn, .pb-act > .pb-btn-wrap, .pb-act > .pb-btn-wrap .pb-btn { flex: 1; width: 100%; }
  .pb-btn-wrap { display: flex; }
  .pb-seg { display: flex; } .pb-seg button { flex: 1; }
  .pb-confirm { justify-content: stretch; width: 100%; }
  .pb-confirm > span { flex-basis: 100%; }
  .pb-yes, .pb-no { flex: 1; }
  .pb-sub { white-space: normal; }
}
@media (max-width: 560px) {
  .punch-bar { padding: 14px 16px; margin-top: -8px; }
  .pb-icon { width: 48px; height: 48px; }
  .pb-big { font-size: 28px; }
  .pb-big.pb-mid { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pb-btn.go::after, .pb-btn-wrap::after { display: none; }
}

/* ===== narzędzia paska, mini-okienko, pływające okienko ===== */
.pb-tools { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 4px; margin: -12px -8px -8px 0; }
.pb-tool { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; min-height: 28px; padding: 3px 8px; border-radius: 8px; color: var(--faint); font-size: 12.5px; font-weight: 600; text-decoration: none !important; cursor: pointer; }
.pb-tool:hover { color: var(--ink); background: var(--card2); filter: none; }
.pb-tool[hidden] { display: none; }
body.pip-on .pb-tools [data-pip] span::after { content: " (otwarte)"; }

.punch-bar.is-mini, .pip-body .punch-bar { grid-template-columns: auto minmax(0, 1fr); margin: 0; border-radius: 16px; gap: 12px 14px; animation: none; }
.punch-bar.is-mini .pb-branch, .punch-bar.is-mini .pb-act, .pip-body .pb-branch, .pip-body .pb-act { grid-column: 1 / -1; }
.punch-bar.is-mini .pb-act, .pip-body .pb-act { justify-content: stretch; }
.punch-bar.is-mini .pb-act > .pb-btn, .punch-bar.is-mini .pb-act > .pb-btn-wrap, .punch-bar.is-mini .pb-btn-wrap .pb-btn,
.pip-body .pb-act > .pb-btn, .pip-body .pb-act > .pb-btn-wrap, .pip-body .pb-btn-wrap .pb-btn { flex: 1; width: 100%; }
.punch-bar.is-mini .pb-btn-wrap, .pip-body .pb-btn-wrap { display: flex; }
.punch-bar.is-mini .pb-seg, .pip-body .pb-seg { display: flex; } .punch-bar.is-mini .pb-seg button, .pip-body .pb-seg button { flex: 1; }
.punch-bar.is-mini .pb-confirm, .pip-body .pb-confirm { justify-content: stretch; width: 100%; }
.punch-bar.is-mini .pb-confirm > span, .pip-body .pb-confirm > span { flex-basis: 100%; }
.punch-bar.is-mini .pb-yes, .punch-bar.is-mini .pb-no, .pip-body .pb-yes, .pip-body .pb-no { flex: 1; }
.punch-bar.is-mini .pb-sub, .pip-body .pb-sub { white-space: normal; }
.punch-bar.is-mini .pb-big, .pip-body .pb-big { font-size: 30px; }
.punch-bar.is-mini .pb-big.pb-mid, .pip-body .pb-big.pb-mid { font-size: 20px; }
.punch-bar.is-mini .pb-icon, .pip-body .pb-icon { width: 48px; height: 48px; }
.punch-bar.is-mini .pb-tools { margin: -4px -6px -6px 0; }
.pip-body { margin: 0; padding: 10px; background: var(--bg); min-height: 100vh; display: block; }
.pip-body .punch-bar { min-height: calc(100vh - 20px); align-content: center; box-shadow: none; }
.pip-body .pb-tools { display: none; }

.mini-body { background: var(--bg); }
.mini-wrap { max-width: 460px; margin: 0 auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 10px; min-height: 100vh; }
.mini-head { display: flex; align-items: center; gap: 10px; }
.mini-head img { height: 22px; }
.mini-head b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); flex: 1; }
.mini-head .btn { min-height: 30px; padding: 3px 10px; font-size: 12.5px; border-radius: 8px; }
.mini-wrap .msg { margin: 0; }

/* strona „Na pulpit” */
.desk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.desk-card h2 { font-size: 20px; }
.desk-hero { height: 130px; border-radius: 12px; margin: -4px 0 16px; background: radial-gradient(120% 120% at 20% 0%, var(--stage2), var(--stage) 70%); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 26px; }
.desk-ico { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #E2E8F0; font-size: 12px; font-weight: 600; animation: bob 3.2s ease-in-out infinite; }
.desk-ico:nth-child(2) { animation-delay: .4s; }
.desk-ico img { width: 52px; height: 52px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.35)); }
.desk-mini { width: 210px; background: #F3F5F9; border-radius: 10px; padding: 8px 10px; display: flex; gap: 10px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: bob 4s ease-in-out infinite; }
.desk-mini i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #E7EBF2; border-top-color: #13875A; animation: spin 2s linear infinite; flex: none; }
.desk-mini span { font: 800 20px Archivo, sans-serif; color: #0E1626; flex: 1; }
.desk-mini em { font-style: normal; background: #C2362B; color: #fff; font: 700 11px Archivo, sans-serif; padding: 5px 8px; border-radius: 6px; }
.steps-list { margin: 0 0 14px; padding-left: 20px; line-height: 1.65; font-size: 14.5px; }
.steps-list li { margin-bottom: 4px; }
.desk-card .bar { margin: 14px 0 0; }
@media (max-width: 900px) { .desk-grid { grid-template-columns: 1fr; } .pb-tools { margin-top: -4px; } }

/* ===================== Dla Firmy: panel główny ===================== */
.mark { flex: none; display: block; }
.brand { gap: 10px; }
.brand-wm { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--head-ink); }
.brand span { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600; }
.msg.info { background: var(--accent-soft); color: var(--ink); }
.msg.err b, .msg.info b { font-weight: 700; }

/* logowanie */
.login-brand { display: flex; align-items: center; gap: 14px; color: var(--head-ink); animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.login-brand b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.login-brand small { display: block; font-size: 13.5px; color: var(--head-mute); font-weight: 600; margin-top: 2px; }
.login-apps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; animation: rise .7s .16s cubic-bezier(.2,.8,.2,1) both; }
.login-apps .la { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 9px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: var(--head-ink); font-weight: 600; font-size: 13.5px; }
.la-flotownik svg { color: var(--fleet); } .la-kadrownik svg { color: var(--accent-2); }
.login-bg span:nth-child(1) { background: #2563EB; }
.login-bg span:nth-child(2) { background: #0EA5E9; }

/* dwa kafelki */
.app-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.app-grid.two .app-stage { height: 190px; }
.app-tile.app-flotownik .app-stage { background: radial-gradient(120% 120% at 20% 0%, #0C4A6E, var(--stage) 70%); }
.app-tile.app-kadrownik .app-stage { background: radial-gradient(120% 120% at 20% 0%, #1E3A8A, var(--stage) 70%); }
.app-tile.app-flotownik .app-stage::after { background: var(--fleet); }
.app-tile.app-flotownik .scene-auto .body { fill: #38BDF8; }
.app-tile.app-flotownik .scene-auto .lane, .app-tile.app-flotownik .scene-auto .odo-t { stroke: #38BDF8; fill: #38BDF8; }
.app-tile.app-flotownik .scene-auto .lane { fill: none; }
.app-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; }
.app-flotownik .app-ico { background: rgba(14,165,233,.14); color: var(--fleet); }
.app-kadrownik .app-ico { background: var(--accent-soft); color: var(--accent); }
.app-top { align-items: center; }
.app-body h2 { font-size: 24px; }
.app-msg { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--card2); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
.app-tile.blocked { opacity: 1; cursor: not-allowed; }
.app-tile.blocked .app-stage .scene { filter: grayscale(1) brightness(.55); }
.app-tile.blocked .app-stage .scene * { animation-play-state: paused !important; }
.app-tile.blocked h2 { color: var(--mute); }
.app-tile.blocked .app-go { background: var(--errbg); color: var(--err); }
.app-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #F1F5F9; z-index: 2;
  background: linear-gradient(180deg, rgba(11,17,32,.25), rgba(11,17,32,.65)); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.app-lock .ico { width: 44px; height: 44px; padding: 9px; border-radius: 50%; background: rgba(248,113,113,.18); color: #FCA5A5; border: 1px solid rgba(248,113,113,.35); }
.admin-hint { display: flex; align-items: center; gap: 8px; margin-top: 22px; }

/* ekran „Brak dostępu” (strona aplikacji) */
.center-body { display: flex; min-height: 100vh; background: var(--head); }
.center-wrap { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
.blocked-card { max-width: 440px; width: 100%; text-align: center; padding: 30px 26px 14px; border-top: 4px solid var(--err); animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.blocked-card h1 { margin: 6px 0 8px; }
.blocked-card .note { background: var(--card2); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.blocked-ico { position: relative; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--card2); color: var(--mute); }
.blocked-ico.app-kadrownik { color: var(--accent); background: var(--accent-soft); }
.blocked-ico.app-flotownik { color: var(--fleet); background: rgba(14,165,233,.14); }
.blocked-lock { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--err); color: #fff; border: 3px solid var(--card); }

/* administracja */
.th-app { display: inline-flex; align-items: center; gap: 7px; }
.th-app.app-flotownik svg { color: var(--fleet); } .th-app.app-kadrownik svg { color: var(--accent); }
.matrix .th-app { flex-direction: column; gap: 4px; }
.role-chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; }
.role-chip.r-admin { background: var(--accent); color: var(--accent-ink); }
.role-chip.r-hr, .role-chip.r-moderator { background: rgba(14,165,233,.16); }
.role-chip.none { background: transparent; border: 1px dashed var(--line2); color: var(--faint); font-weight: 500; }
.role-sel { min-width: 170px; font-size: 14px; }
.role-sel.is-none { color: var(--faint); border-style: dashed; }
.role-sel.is-changed { outline: 2px solid var(--s-b); outline-offset: 1px; }
.app-perm { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 14px; margin: 0 0 14px; }
.app-perm legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 15px; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.role-opt { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; color: var(--ink); background: var(--card); transition: border-color .15s, background .15s; }
.role-opt:hover { border-color: var(--mute); }
.role-opt input { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.role-opt span { display: flex; flex-direction: column; gap: 2px; }
.role-opt b { font-size: 14px; }
.role-opt small { color: var(--mute); font-size: 12.5px; line-height: 1.35; }
.role-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-opt.none:has(input:checked) { border-color: var(--line2); background: var(--card2); }
.savebar.static { position: static; background: none; justify-content: flex-start; padding: 0; margin-top: 4px; }
.app-admin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.app-card { border-top: 4px solid var(--accent); transition: border-color .3s, opacity .3s; }
.app-card.app-flotownik { border-top-color: var(--fleet); }
.app-card.is-off { border-top-color: var(--err); }
.ac-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ac-ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.app-kadrownik .ac-ico { background: var(--accent-soft); color: var(--accent); }
.app-flotownik .ac-ico { background: rgba(14,165,233,.14); color: var(--fleet); }
.app-card.is-off .ac-ico { filter: grayscale(1); opacity: .6; }
.ac-title { flex: 1; min-width: 0; }
.ac-state { margin: 0 0 8px; font-size: 14px; color: var(--mute); display: flex; gap: 8px; align-items: center; }
.pill.ok { background: var(--okbg); color: var(--ok); }
.tgl.big span { width: 56px; height: 32px; }
.tgl.big span::after { width: 26px; height: 26px; }
.tgl.big input:checked + span::after { transform: translateX(24px); }
textarea { background: var(--input); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; width: 100%; display: block; margin-top: 5px; color: var(--ink); resize: vertical; }
@media (max-width: 900px) {
  .app-grid.two, .app-admin { grid-template-columns: 1fr; }
  .brand span { display: none; }
}
