/* HOLISTIC 32. — monochromatyczny, kliniczny, z czytelną typografią liczb */
:root {
  --paper: #ffffff;
  --canvas: #f3f4f5;
  --ink: #000000;
  --ink-2: #2b2e33;
  --muted: #6b7178;
  --line: #e3e5e8;
  --line-strong: #c9cdd2;
  --good: #1e7f5c;
  --mid: #b7791f;
  --low: #b42318;
  --focus: #2457d6;
  --radius: 10px;
  --font: "Albert Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink-2);
  font: 15px/1.5 var(--font); font-feature-settings: "tnum" 1, "lnum" 1;
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 18px; margin-bottom: 14px; }
h3 { font-size: 15px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Szkielet ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--paper);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 28px 18px 20px; z-index: 20;
}
.brand { display: block; padding: 0 10px 28px; }
.brand img { width: 150px; height: auto; display: block; }
.sidebar nav { flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 22px; }
.nav-title { font-size: 12px; color: var(--muted); padding: 0 10px 6px; }
.sidebar nav a {
  display: block; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-weight: 500;
}
.sidebar nav a:hover { background: var(--canvas); }
.sidebar nav a.is-active { background: var(--ink); color: #fff; }
.me { border-top: 1px solid var(--line); padding: 16px 10px 0; font-size: 13px; }
.me-name { color: var(--ink); font-weight: 600; }
.me-role { color: var(--muted); margin-bottom: 6px; }
.main { margin-left: 248px; padding: 36px 44px 64px; max-width: 1360px; }
.main--bare { margin: 0; max-width: none; padding: 0; }
.topbar, .navtoggle { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Panele ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel--flush > h2 { padding: 20px 24px 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* ---------- Duże liczby (echo logo „32.”) ---------- */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; }
.figure { padding: 24px 26px 22px; border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; }
.figure-num { font-size: 52px; line-height: 1; font-weight: 300; color: var(--ink); letter-spacing: -0.03em; }
.figure-num sup { font-size: 20px; font-weight: 500; letter-spacing: 0; vertical-align: top; position: relative; top: 4px; margin-left: 3px; }
.figure-label { margin-top: 10px; font-weight: 600; color: var(--ink); }
.figure-note { margin-top: 2px; font-size: 13px; color: var(--muted); }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; background: var(--paper); }
tbody tr:hover td { background: #fafbfb; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; color: var(--ink); }
.panel--flush table th:first-child, .panel--flush table td:first-child { padding-left: 24px; }
.panel--flush table th:last-child, .panel--flush table td:last-child { padding-right: 24px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; white-space: nowrap; }
.strong { color: var(--ink); font-weight: 600; }

/* ---------- Wskaźnik ---------- */
.meter { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.meter-track { flex: 1; height: 6px; background: var(--canvas); border-radius: 3px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--ink); border-radius: 3px; }
.meter-val { min-width: 54px; white-space: nowrap; text-align: right; font-weight: 600; color: var(--ink); }
.meter-val::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.meter--good .meter-val::before { background: var(--good); }
.meter--mid .meter-val::before { background: var(--mid); }
.meter--low .meter-val::before { background: var(--low); }

.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 20px; background: var(--canvas); color: var(--ink-2); white-space: nowrap; }
.tag--warn { background: #fdf3e2; color: #7a4d0b; }
.tag--bad { background: #fde8e6; color: #8a1c12; }
.tag--ok { background: #e4f3ec; color: #145a40; }

/* ---------- Formularze ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; min-height: 40px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.07); }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 14px; margin: 0 14px 0 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: #000; }
.weekdays { display: flex; flex-wrap: wrap; gap: 6px; }
.weekdays label { margin: 0; }
.weekdays input { position: absolute; opacity: 0; pointer-events: none; }
.weekdays span { display: inline-block; min-width: 46px; text-align: center; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-weight: 500; cursor: pointer; }
.weekdays input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.weekdays input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; padding: 3px; margin-bottom: 16px; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 6px 14px; border-radius: 6px; font-weight: 500; cursor: pointer; }
.seg input:checked + span { background: var(--ink); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 8px; padding: 9px 16px;
  min-height: 40px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #222; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--canvas); }
.btn--danger { background: transparent; color: var(--low); border-color: #efc4bf; }
.btn--danger:hover { background: #fdf1ef; }
.btn--sm { padding: 5px 11px; min-height: 32px; font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn--danger { color: var(--low); }
form.inline { display: inline; }

/* ---------- Komunikaty ---------- */
.flash { padding: 12px 16px; border-radius: 9px; margin-bottom: 18px; border: 1px solid; }
.flash--ok { background: #eef7f2; border-color: #c4e4d3; color: #124a35; }
.flash--err { background: #fdf0ee; border-color: #f1c7c1; color: #7d1a10; }
.flash--warn { background: #fdf6ea; border-color: #f0dcb4; color: #6b4309; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--mid); }
.notice-dot--low { background: var(--low); }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty h2 { margin-bottom: 8px; }

/* ---------- Zakres dat ---------- */
.range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range-step { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 8px; text-decoration: none; font-size: 18px; background: var(--paper); }
.range-step:hover { background: var(--canvas); }
.range-label { min-width: 150px; text-align: center; font-weight: 600; color: var(--ink); }
.range-custom { display: flex; gap: 6px; margin-left: 10px; }
.range-custom input { width: 150px; min-height: 34px; padding: 5px 9px; }

/* ---------- Oś dnia ---------- */
.tl { position: relative; }
.tl-hours, .tl-row { display: grid; grid-template-columns: 130px 1fr; }
.tl-hours .tl-scale { position: relative; height: 22px; }
.tl-hours .tl-scale span { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--muted); }
.tl-row { border-top: 1px solid var(--line); min-height: 76px; }
.tl-name { padding: 12px 12px 12px 0; }
.tl-name .strong { display: block; }
.tl-track { position: relative; background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 100%); }
.tl-grafik { position: absolute; top: 8px; bottom: 8px; background: var(--canvas); border: 1px dashed var(--line-strong); border-radius: 6px; }
.tl-grafik em { position: absolute; left: 6px; bottom: 3px; font-size: 11px; font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: calc(100% - 8px); }
.tl-appt { position: absolute; height: 22px; background: var(--ink); border-radius: 4px; color: #fff; font-size: 11px; line-height: 22px; padding: 0 5px; overflow: hidden; white-space: nowrap; border: 1px solid #fff; }
.tl-appt--cancel { background: repeating-linear-gradient(45deg, #fff 0 4px, #e9c2bd 4px 8px); color: var(--low); border-color: #e9c2bd; }
.tl-appt--block { background: #fff; color: var(--muted); border: 1px dashed var(--muted); }
.tl-appt--outside { background: var(--low); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Mapa ciepła dni ---------- */
.heat td.h { text-align: center; font-size: 12.5px; padding: 8px 4px; min-width: 42px; }
.heat .h0 { color: var(--muted); }

/* ---------- Logowanie ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: #000; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art img { width: 210px; filter: invert(1); }
.login-art p { font-size: 22px; font-weight: 300; line-height: 1.35; max-width: 22ch; color: #e8e8e8; margin: 0; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--paper); }
.login-form form { width: 100%; max-width: 360px; }
.login-form h1 { margin-bottom: 6px; }
.login-form .sub { color: var(--muted); margin: 0 0 26px; }

.ico { width: 16px; height: 16px; vertical-align: middle; margin-right: 2px; border-radius: 2px; }
.ico--txt { display: inline-block; background: var(--canvas); text-align: center; font-size: 11px; line-height: 16px; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 30px; text-align: center; background: #fbfbfc; }
.dropzone input[type=file] { margin: 12px auto; display: block; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details[open] summary { margin-bottom: 10px; }

@media (max-width: 1100px) {
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure:nth-child(3) { border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar { display: flex; align-items: center; gap: 14px; position: sticky; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 18px; z-index: 30; }
  .topbar-logo { height: 26px; }
  .burger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; margin: 0; padding: 6px; }
  .burger span { width: 20px; height: 2px; background: #000; display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.12); }
  .navtoggle:checked ~ .sidebar { transform: none; }
  .main { margin-left: 0; padding: 22px 16px 48px; }
  .figure-num { font-size: 40px; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 32px; min-height: 200px; }
  .range-custom { margin-left: 0; }
  .tl-hours, .tl-row { grid-template-columns: 90px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Obowiązek recepcji ---------- */
.st { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.st--ok { background: #e4f3ec; color: #145a40; }
.st--late { background: #fdf3e2; color: #7a4d0b; }
.st--partial { background: #fdeee0; color: #8a3d0b; }
.st--missing { background: #fde8e6; color: #8a1c12; }
.st--pending { background: var(--canvas); color: var(--ink-2); }
.st--free { background: transparent; color: var(--muted); font-weight: 500; padding-left: 0; }
.figure-today { height: 52px; display: flex; align-items: center; }
.figure-today .st { font-size: 18px; padding: 8px 16px; }
.heat.fwd td.h small { display: block; font-size: 10.5px; opacity: .8; line-height: 1.1; }
.heat .wk { border-left: 2px solid var(--line-strong); }
.duty { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.duty-big { font-size: 22px; font-weight: 600; color: var(--ink); }
.strip { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.strip span { width: 26px; height: 26px; border-radius: 6px; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.strip .s-ok { background: #1e7f5c; color: #fff; }
.strip .s-late { background: #b7791f; color: #fff; }
.strip .s-partial { background: #e8a86a; color: #000; }
.strip .s-missing { background: #b42318; color: #fff; }
.strip .s-pending { background: var(--canvas); border: 1px dashed var(--line-strong); }
.strip .s-free { background: transparent; color: var(--muted); }
@media (max-width: 860px) { .duty { grid-template-columns: 1fr; } }
