/* Tofikolo – portal pracowniczy. Cztery pory roku, wesołe kolory, czytelne na telefonie i komputerze. */

/* ============ 1. Podstawy ============ */
:root {
  --font-display: "Baloo 2 Variable", "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito Variable", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --ink: #272340;
  --ink-2: #4a4663;
  --muted: #6b6785;
  --line: #e9e5f5;
  --line-strong: #d3cce6;
  --card: #ffffff;
  --ok: #157347;
  --ok-bg: #e3f6ec;
  --warn: #8a5300;
  --warn-bg: #fff0d0;
  --bad: #b3261e;
  --bad-bg: #fde8e6;

  --radius: 22px;
  --shadow: 0 1px 2px rgba(39, 35, 64, .06), 0 8px 22px rgba(39, 35, 64, .07);
  --shadow-lg: 0 2px 4px rgba(39, 35, 64, .08), 0 16px 36px rgba(39, 35, 64, .16);
  --nav-h: 70px;
  color-scheme: light;
}

/* Kolory pór roku (pasy w widoku roku i zapasowy wygląd). Ustawia je atrybut data-season. Miesiące mają własne kolory niżej. */
[data-season="winter"] { --s-main: #2f6fd0; --s-dark: #1c4ea0; --s-ink: #2f6fd0; --on-main: #ffffff; --s-accent: #ff6f91; --s-soft: #e6f0ff; --sky-a: #2a68c8; --sky-b: #7dbcf8; --hill-a: #ffffff; --hill-b: #dcebff; }
[data-season="spring"] { --s-main: #17804f; --s-dark: #0f6040; --s-ink: #17804f; --on-main: #ffffff; --s-accent: #ff7db0; --s-soft: #e3f6ec; --sky-a: #168256; --sky-b: #63cfa6; --hill-a: #8fe0a8; --hill-b: #5cc87e; }
[data-season="summer"] { --s-main: #ffb400; --s-dark: #8a5a00; --s-ink: #a35f00; --on-main: #33240a; --s-accent: #ff6f3c; --s-soft: #fff1c2; --sky-a: #0f78c8; --sky-b: #5cc2f2; --hill-a: #35bfd0; --hill-b: #16a0b6; }
[data-season="autumn"] { --s-main: #c4521a; --s-dark: #9a3c0e; --s-ink: #c4521a; --on-main: #ffffff; --s-accent: #f2b134; --s-soft: #fdeedd; --sky-a: #b4461a; --sky-b: #f2a64a; --hill-a: #c9a640; --hill-b: #9a8a32; }
:root, [data-season] { --wknd: #f6f4fd; }
@supports (background: color-mix(in srgb, red 10%, white)) {
  [data-season] { --wknd: color-mix(in srgb, var(--s-soft) 62%, #ffffff); }
}

html[data-season="winter"] { --page: #f2f7ff; }
html[data-season="spring"] { --page: #f1faf5; }
html[data-season="summer"] { --page: #fffaf0; }
html[data-season="autumn"] { --page: #fff6ec; }

/* Kolory dwunastu miesięcy. Ustawia je atrybut data-month (strona, baner, pigułka miesiąca, miniaturka w widoku roku) i nadpisuje porę roku. */
[data-month="1"] { --s-main: #2f6fd0; --s-dark: #1c4ea0; --s-ink: #2f6fd0; --on-main: #ffffff; --s-accent: #ff6f91; --s-soft: #e6f0ff; --sky-a: #24509e; --sky-b: #86c3fa; --hill-a: #ffffff; --hill-b: #dcebff; }
[data-month="2"] { --s-main: #c2347a; --s-dark: #8e1f58; --s-ink: #b02a6c; --on-main: #ffffff; --s-accent: #f2a33a; --s-soft: #fde5f0; --sky-a: #a3256f; --sky-b: #ff9cc2; --hill-a: #ffd9e8; --hill-b: #ffbcd6; }
[data-month="3"] { --s-main: #7b4fc9; --s-dark: #54309a; --s-ink: #6b3fb8; --on-main: #ffffff; --s-accent: #ffd23f; --s-soft: #efe7fb; --sky-a: #5a3fae; --sky-b: #b9a2f2; --hill-a: #a6e57f; --hill-b: #78d15a; }
[data-month="4"] { --s-main: #0d8079; --s-dark: #0a5b56; --s-ink: #0d8079; --on-main: #ffffff; --s-accent: #ff8fb8; --s-soft: #dff4f2; --sky-a: #0b6f7a; --sky-b: #8adbd3; --hill-a: #bfeaa4; --hill-b: #93d97f; }
[data-month="5"] { --s-main: #267a37; --s-dark: #17591f; --s-ink: #267a37; --on-main: #ffffff; --s-accent: #ff7db0; --s-soft: #e3f4e3; --sky-a: #1a73b0; --sky-b: #8fd3f6; --hill-a: #8fdc6f; --hill-b: #5cc24b; }
[data-month="6"] { --s-main: #cf3b24; --s-dark: #9c2a16; --s-ink: #c13420; --on-main: #ffffff; --s-accent: #ffc83d; --s-soft: #ffe6e0; --sky-a: #c43b3b; --sky-b: #ffb27a; --hill-a: #7ed56f; --hill-b: #4fb85a; }
[data-month="7"] { --s-main: #0878ac; --s-dark: #075a82; --s-ink: #0878ac; --on-main: #ffffff; --s-accent: #ff7a3c; --s-soft: #def2fb; --sky-a: #0a73b0; --sky-b: #7fd4f7; --hill-a: #35c3d6; --hill-b: #17a2ba; }
[data-month="8"] { --s-main: #f2b705; --s-dark: #7a5200; --s-ink: #a06a00; --on-main: #33240a; --s-accent: #e0602b; --s-soft: #fff1c2; --sky-a: #5b3a8c; --sky-b: #ff9a5a; --hill-a: #f2c14e; --hill-b: #d99a1c; }
[data-month="9"] { --s-main: #567f17; --s-dark: #3b560d; --s-ink: #567f17; --on-main: #ffffff; --s-accent: #e4572e; --s-soft: #eaf3d3; --sky-a: #2a7f86; --sky-b: #f6d77a; --hill-a: #b8cf5a; --hill-b: #8fb03a; }
[data-month="10"] { --s-main: #c4521a; --s-dark: #9a3c0e; --s-ink: #c4521a; --on-main: #ffffff; --s-accent: #f2b134; --s-soft: #fdeedd; --sky-a: #b4461a; --sky-b: #f2a64a; --hill-a: #c9a640; --hill-b: #9a8a32; }
[data-month="11"] { --s-main: #55709b; --s-dark: #364d73; --s-ink: #55709b; --on-main: #ffffff; --s-accent: #f2a33a; --s-soft: #e6ecf5; --sky-a: #3a4a6e; --sky-b: #8ea5c9; --hill-a: #9fb5c8; --hill-b: #7e98b0; }
[data-month="12"] { --s-main: #17704a; --s-dark: #0f5236; --s-ink: #17704a; --on-main: #ffffff; --s-accent: #f4b400; --s-soft: #dff3e8; --sky-a: #0f2f55; --sky-b: #2f6fa8; --hill-a: #ffffff; --hill-b: #e3eefc; }
[data-month] { --wknd: #f6f4fd; }
@supports (background: color-mix(in srgb, red 10%, white)) {
  [data-month] { --wknd: color-mix(in srgb, var(--s-soft) 62%, #ffffff); }
}
html[data-month="1"] { --page: #f2f7ff; }
html[data-month="2"] { --page: #fff3f8; }
html[data-month="3"] { --page: #f7f3ff; }
html[data-month="4"] { --page: #f0fbfa; }
html[data-month="5"] { --page: #f2faf2; }
html[data-month="6"] { --page: #fff4f0; }
html[data-month="7"] { --page: #f0f9ff; }
html[data-month="8"] { --page: #fffaf0; }
html[data-month="9"] { --page: #f8fbee; }
html[data-month="10"] { --page: #fff6ec; }
html[data-month="11"] { --page: #f3f6fa; }
html[data-month="12"] { --page: #f1f9f4; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-bottom: calc(var(--nav-h) + 96px); } /* pole, do którego przeskakuje klawiatura, nie chowa się pod przyklejonym paskiem akcji */
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--ink);
  background: var(--page, #f7f5ff);
  background-image: radial-gradient(900px 340px at 50% -80px, var(--s-soft), transparent);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; max-width: 100%; }
.ico { flex: none; }
a { color: var(--s-dark); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .45em; font-weight: 700; }
p { margin: 0 0 .8em; }
small { font-size: .85em; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: .92em; background: var(--s-soft); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--s-dark); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
p.small > a:only-child { display: inline-block; padding: 7px 0; }
.center { text-align: center; }
.plain { list-style: none; padding: 0; margin: 0 0 .8em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hide-sm { display: none; }
[hidden] { display: none !important; }
form.inline { display: inline; margin: 0; }

/* ============ 2. Układ strony ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 2px 12px rgba(39, 35, 64, .07);
}
/* Pasek w kolorach dwunastu miesięcy widać na każdej stronie. */
.topbar::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, #2f6fd0 0.00% 8.33%, #c2347a 8.33% 16.67%, #7b4fc9 16.67% 25.00%, #0d8079 25.00% 33.33%, #267a37 33.33% 41.67%, #cf3b24 41.67% 50.00%, #0878ac 50.00% 58.33%, #f2b705 58.33% 66.67%, #567f17 66.67% 75.00%, #c4521a 75.00% 83.33%, #55709b 83.33% 91.67%, #17704a 91.67% 100.00%); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px; color: var(--on-main); background: linear-gradient(145deg, var(--s-main), var(--s-dark)); box-shadow: 0 4px 10px rgba(0, 0, 0, .16); }
.nav-desktop { display: none; flex: 1; justify-content: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-desktop::-webkit-scrollbar { display: none; }
.nav-desktop a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 800; font-size: .94rem; white-space: nowrap; }
.nav-desktop a:hover { background: var(--s-soft); }
.nav-desktop a[aria-current="page"] { background: var(--s-main); color: var(--on-main); }
.user { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user form { margin: 0; }
.user-name { display: none; font-weight: 800; }

.nav-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(39, 35, 64, .08);
}
.nav-bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 5px; border-radius: 16px; text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 800; line-height: 1.2; }
.nav-bottom a[aria-current="page"] { color: var(--s-dark); background: var(--s-soft); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); }
.wrap-narrow { max-width: 660px; }
.wrap-mid { max-width: 900px; }
body.page-login .wrap, body:not(:has(.nav-bottom)) .wrap { padding-bottom: 40px; }

@media (min-width: 640px) { .hide-sm { display: inline; } }
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .nav-bottom { display: none; }
  .wrap { padding: 24px 24px 56px; }
}
/* Kierownik ma 8 pozycji w menu: na węższych ekranach skracamy pasek, żeby nic na siebie nie nachodziło. */
@media (min-width: 900px) and (max-width: 1259.98px) {
  .topbar-many .nav-desktop a:not([aria-current="page"]) span { display: none; }
  .topbar-many .nav-desktop a { padding: 9px 11px; }
}
.topbar-many .topbar-in { max-width: 1400px; }
@media (min-width: 1260px) {
  .topbar-many .nav-desktop { gap: 0; }
  .topbar-many .nav-desktop a { padding: 8px; gap: 5px; font-size: .88rem; }
}
@media (min-width: 900px) and (max-width: 1599.98px) { .topbar-many .hide-sm { display: none; } }
@media (min-width: 1180px) { .topbar:not(.topbar-many) .user-name { display: inline; } }


/* ============ 3. Przyciski, pigułki, formularze ============ */
.btn {
  --btn-bg: var(--s-main); --btn-fg: var(--on-main);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 800 1rem/1.1 var(--font-body); text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12), 0 6px 14px rgba(0, 0, 0, .1);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn .ico { flex: none; }
.btn.soft { --btn-bg: var(--s-soft); --btn-fg: var(--s-dark); box-shadow: none; }
.btn.ghost { --btn-bg: transparent; --btn-fg: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn.danger { --btn-bg: var(--bad-bg); --btn-fg: var(--bad); box-shadow: inset 0 0 0 1.5px #f3b8b3; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn.block { display: flex; width: 100%; }
.btn.round { width: 44px; padding: 0; }
.btn.glass, .banner .btn.round {
  --btn-bg: rgba(8, 16, 48, .45); --btn-fg: #fff; /* ciemne szkło: biały napis czytelny także na jasnej części nieba */
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
@supports (background: color-mix(in srgb, red 10%, white)) {
  .btn.glass, .banner .btn.round { --btn-bg: color-mix(in srgb, var(--s-dark) 76%, transparent); }
}
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 800; line-height: 1.5; white-space: nowrap;
  background: var(--s-soft); color: var(--s-dark);
}
.chip.role { background: #efeafc; color: #4b35a0; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.chip.abs { --cc: var(--c, #6b6785); background: #f0edfa; color: var(--ink); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .chip.abs { background: color-mix(in srgb, var(--cc) 15%, #fff); color: color-mix(in srgb, var(--cc) 72%, #000); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cc) 32%, #fff); }
}

input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  font: inherit; color: var(--ink); background: #fff; width: 100%; min-height: 44px;
  padding: 8px 12px; border: 1.5px solid var(--line-strong); border-radius: 14px;
}
input[type=time], input[type=date] { width: auto; min-width: 8.8rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--s-dark); box-shadow: 0 0 0 4px var(--s-soft); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--s-main); flex: none; }
input[type=color] { width: 48px; height: 44px; padding: 3px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; }
select { appearance: auto; }
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 800; font-size: .93rem; margin-bottom: 6px; }
.field small { display: block; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 18px; }
.form-grid .wide { grid-column: 1 / -1; }

.flash { display: block; padding: 12px 16px; margin: 0 0 14px; border-radius: 16px; font-weight: 700; background: var(--ok-bg); color: #0d5b36; border: 1.5px solid #b9e6cc; }
.flash.warn { background: var(--warn-bg); color: #6d4000; border-color: #f3d08c; }
.flash.err { background: var(--bad-bg); color: #8f1d17; border-color: #f3b8b3; }
.flash .btn { vertical-align: middle; margin: 2px 0; }
.secret { font-size: 1.1em; letter-spacing: .08em; background: #fff; padding: 3px 10px; border-radius: 10px; user-select: all; }

/* ============ 4. Karty i kafelki ============ */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin: 0 0 16px; }
.panel h2 { font-size: 1.2rem; margin-bottom: .6em; display: flex; align-items: center; gap: 9px; }
.panel h2::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--s-accent), var(--s-main)); }
.panel.narrow { max-width: 560px; margin-inline: auto; }
.panel.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-left: 6px solid var(--s-accent); }
.panel.notice p { margin: 0; }
.panel-slim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 16px 10px 20px; }
.panel-slim p { margin: 0; }
.slim-line { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 360px; }
.slim-line svg { flex: none; margin-top: 2px; color: var(--s-dark); }
.slim-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; margin-bottom: 16px; }
.grid > .panel { margin: 0; min-width: 0; }
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .grid-2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 22px; margin: 0; }
.facts > div { display: grid; gap: 2px; }
.facts dt { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.facts.small { margin-top: 14px; font-size: .92rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
a.tile { transition: transform .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
a.tile .ico { color: var(--s-ink); margin-bottom: 4px; }
a.tile b { font-family: var(--font-display); font-size: 1.15rem; }
.tile span { color: var(--muted); font-size: .88rem; font-weight: 700; }
.stat-tiles .tile { background: linear-gradient(160deg, var(--s-soft), #fff 80%); }
.stat-tiles .tile b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; color: var(--s-dark); }
@media (max-width: 559.98px) {
  .stat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-tiles .tile { padding: 12px 14px; }
  .stat-tiles .tile b { font-size: 1.35rem; }
}
.empty { text-align: center; padding: 26px 16px; color: var(--muted); }
.empty .ico { margin: 0 auto 8px; color: var(--s-ink); opacity: .75; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }

/* ============ 5. Baner z porą roku ============ */
.banner {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  min-height: 200px; padding-bottom: 66px; margin: 0 0 18px;
  border-radius: 28px; box-shadow: var(--shadow-lg);
  background: linear-gradient(100deg, var(--sky-a) 0%, var(--sky-a) 50%, var(--sky-b) 100%);
}
.banner::before { /* delikatne ściemnienie pod tekstem, żeby biały napis zawsze był czytelny */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 16, 48, .34) 0%, rgba(8, 16, 48, .12) 45%, rgba(8, 16, 48, 0) 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 86%); mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 86%);
}
.banner-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.banner-body { padding: 20px 22px 0; max-width: 100%; }
.banner h1 { font-size: clamp(1.75rem, 5.6vw, 2.7rem); margin: 0; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .22); }
.banner p { margin: 6px 0 0; font-weight: 700; max-width: 52ch; text-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.season-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 13px 3px 9px; margin-bottom: 8px; border-radius: 999px; background: rgba(255, 255, 255, .24); font-weight: 800; font-size: .84rem; letter-spacing: .02em; }
.season-pill b { font-weight: 800; }
.pill-note { display: none; font-weight: 700; }
.pill-note::before { content: "\00b7"; margin: 0 7px 0 3px; opacity: .85; }
@media (min-width: 520px) { .pill-note { display: inline; } }
.banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 22px 0; }
@media (min-width: 760px) {
  .banner { min-height: 234px; }
  .banner-body { padding: 24px 28px 0; max-width: 62%; }
  .banner-actions { position: absolute; top: 20px; right: 22px; padding: 0; justify-content: flex-end; max-width: 46%; }
}
/* Cały rysunek (słońce, chmury, drzewa) jest tylko na szerokim ekranie. Ma stałą wysokość i stoi na dole baneru, a tekst kończy się
   mniej więcej w połowie szerokości, zanim zacznie się słońce. Dzięki temu nawet długi tytuł nie wchodzi na jasne rzeczy,
   a gdy zajmie dwie linie, baner rośnie ku górze i napisy przesuwają się razem z wzgórzami. */
@media (min-width: 1100px) {
  .banner-art { inset: auto 0 0 0; height: 234px; }
  .banner-body { max-width: 52%; }
}
/* Węższy ekran (telefon, tablet, małe okno przeglądarki): tekst zajmuje dużą część baneru, więc z rysunku zostaje pas wzgórz pod tekstem. */
@media (max-width: 1099.98px) {
  .banner::before { background: linear-gradient(180deg, rgba(8, 16, 48, .32) 0%, rgba(8, 16, 48, .08) 70%, rgba(8, 16, 48, 0) 100%); }
  /* Niebo jest ciemne pod tekstem i jaśnieje dopiero w dolnych 96 px, nad wzgórzami.
     Liczymy od dołu, a nie w procentach, bo wysokość baneru zależy od długości tekstu, a pod tekstem ma być zawsze to samo ciemne niebo. */
  .banner { padding-bottom: 92px; background: linear-gradient(180deg, var(--sky-a) 0, var(--sky-a) calc(100% - 96px), var(--sky-b) 100%); }
  .banner-art { inset: auto -90px 0 auto; width: max(600px, calc(100% + 90px)); max-width: none; height: auto; aspect-ratio: 1200 / 260; }
  .banner-art .a-sky, .banner-art .a-tall { display: none; }
}
/* Wąska karta (logowanie, pierwsze uruchomienie) ma na komputerze tylko ok. 610 px, więc tekst sięga w niej dalej niż na szerokim banerze.
   Dlatego tak samo jak na telefonie zostaje z rysunku pas wzgórz pod tekstem, a chmurki i płatki nie wchodzą na napisy. */
@media screen {
  .wrap-narrow .banner::before { background: linear-gradient(180deg, rgba(8, 16, 48, .32) 0%, rgba(8, 16, 48, .08) 70%, rgba(8, 16, 48, 0) 100%); }
  .wrap-narrow .banner { padding-bottom: 92px; background: linear-gradient(180deg, var(--sky-a) 0, var(--sky-a) calc(100% - 96px), var(--sky-b) 100%); }
  .wrap-narrow .banner-art { inset: auto -90px 0 auto; width: max(600px, calc(100% + 90px)); max-width: none; height: auto; aspect-ratio: 1200 / 260; }
  .wrap-narrow .banner-art .a-sky, .wrap-narrow .banner-art .a-tall { display: none; }
}

.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.pagehead h1 { font-size: 1.9rem; margin: 0; }
.pagehead p { margin: 2px 0 0; color: var(--muted); }
.pagehead-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.filter { margin: 0; display: flex; align-items: center; gap: 8px; }
.filter select { width: auto; min-width: 200px; max-width: 100%; }
.seg { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 4px; gap: 2px; border-radius: 999px; background: var(--s-soft); }
.seg a { padding: 8px 18px; border-radius: 999px; text-decoration: none; font-weight: 800; color: var(--s-dark); }
@media (max-width: 380px) { .seg a { padding: 8px 9px; font-size: .9rem; } }
.seg a[aria-current] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(39, 35, 64, .16); }

.monthstrip { position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.monthstrip::-webkit-scrollbar { display: none; }
.mpill { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 800; white-space: nowrap; background: var(--s-soft); color: var(--s-dark); scroll-snap-align: center; transition: transform .12s; }
.mpill:hover { transform: translateY(-1px); }
.mpill[aria-current="page"] { background: var(--s-main); color: var(--on-main); box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }

/* ============ 6. Pulpit pracownika ============ */
/* Kartka ze zmianą zachodzi na dół baneru (margines baneru 18 px liczy się do zakładki). Na szerokim ekranie przykrywa tylko
   dolną krawędź rysunku. Na węższym cały pas wzgórz ma zostać widoczny, więc kartka leży pod banerem. */
.banner + .ticket { margin-top: -36px; }
@media (max-width: 1099.98px) { .banner + .ticket { margin-top: 0; } }
.ticket { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto; margin: 0 0 18px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); }
.ticket-main { padding: 18px 20px 20px 22px; min-width: 0; }
.ticket-time, .ticket-word { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 8.4vw, 3.5rem); line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ticket-time { color: var(--ink); }
.ticket-time i { font-style: normal; color: var(--s-ink); margin: 0 .1em; }
.ticket-word { color: var(--s-dark); font-size: clamp(1.7rem, 7vw, 2.8rem); }
.ticket-sub { margin: 10px 0 0; color: var(--ink-2); font-weight: 700; }
.ticket-stub { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 118px; max-width: 40vw; padding: 14px 18px; text-align: center; border-left: 3px dotted var(--line-strong); background: linear-gradient(160deg, var(--s-soft), #fff 95%); border-radius: 0 24px 24px 0; }
.ticket-stub strong { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; color: var(--s-dark); }
.ticket-stub span { font-size: .84rem; font-weight: 700; color: var(--ink-2); }

@media (max-width: 519.98px) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-stub { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; max-width: none; padding: 12px 20px; text-align: left; border-left: 0; border-top: 3px dotted var(--line-strong); border-radius: 0 0 24px 24px; }
  .ticket-stub strong { font-size: 1.15rem; }
  .ticket-stub span { text-align: right; }
}
.bignum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink-2); }
.bignum b { font-size: 2.9rem; line-height: .95; font-weight: 800; color: var(--s-ink); }
.bignum span { margin-left: 4px; font-family: var(--font-body); font-size: .9rem; font-weight: 700; color: var(--muted); }
.bar { position: relative; display: flex; height: 20px; margin: 8px 0 12px; border-radius: 999px; overflow: hidden; background: var(--s-soft); box-shadow: inset 0 1px 3px rgba(39, 35, 64, .16); }
.bar i { display: block; height: 100%; }
.b-worked { background: linear-gradient(90deg, var(--s-main), var(--s-dark)); }
.b-credit { background: var(--s-accent); }
.b-plan { background: repeating-linear-gradient(135deg, var(--s-main) 0 5px, transparent 5px 10px); opacity: .42; }
.b-norm { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--ink); text-decoration: none; }
.legend { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: .9rem; font-weight: 700; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend-row { margin: 14px 4px 20px; }
.sw { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 5px; }
.sw-worked, .sw-shift { background: var(--s-main); }
.sw-seasons { background: linear-gradient(90deg, #2f6fd0 0.00% 8.33%, #c2347a 8.33% 16.67%, #7b4fc9 16.67% 25.00%, #0d8079 25.00% 33.33%, #267a37 33.33% 41.67%, #cf3b24 41.67% 50.00%, #0878ac 50.00% 58.33%, #f2b705 58.33% 66.67%, #567f17 66.67% 75.00%, #c4521a 75.00% 83.33%, #55709b 83.33% 91.67%, #17704a 91.67% 100.00%); }
.sw-credit { background: var(--s-accent); }
.sw-plan { background: repeating-linear-gradient(135deg, var(--s-main) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1.5px var(--s-main); }
.sw-dot { width: 10px; height: 10px; border-radius: 50%; background: #c93c4a; }
.sw-hol { background: #ffdbe5; box-shadow: inset 0 0 0 1.5px #ff9db6; }
.sw-note { background: var(--note-bg); box-shadow: inset 4px 0 0 var(--note-edge); }
.heatsw { width: 12px; margin-right: -4px; border-radius: 3px; }
.heatsw.h1 { background: var(--s-soft); box-shadow: inset 0 0 0 1px var(--s-main); }
.heatsw.h2 { background: var(--s-accent); opacity: .55; }
.heatsw.h3 { background: var(--s-main); opacity: .65; }
.heatsw.h4 { background: var(--s-dark); }

.dots { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 12px; }
.dot { width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--s-main); background: transparent; opacity: .5; }
.dot.used { background: var(--s-main); opacity: 1; }
.dot.over { background: var(--bad); border-color: var(--bad); opacity: 1; }
.periods { display: grid; gap: 8px; margin: 10px 0 14px; }
.periods li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.periods .ico { color: var(--bad); }
.meter-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.meter-list li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 12px; }
.meter-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.meter-val { color: var(--ink-2); }
.meter { display: block; height: 9px; border-radius: 99px; background: var(--s-soft); overflow: hidden; }
.meter-list .meter { grid-column: 1 / -1; }
.meter i { display: block; height: 100%; border-radius: 99px; }

.days { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.days li { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; padding: 5px 12px 5px 5px; border-radius: 20px; }
.days li.is-today { background: var(--s-soft); }
.days .leaf, .notes .leaf { display: grid; place-items: center; align-content: center; width: 54px; height: 54px; border-radius: 20px 6px 20px 6px; background: var(--s-soft); color: var(--s-dark); line-height: 1.05; }
.days .leaf small, .notes .leaf small { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.days .leaf b, .notes .leaf b { font-family: var(--font-display); font-size: 1.35rem; }
.days .is-today .leaf { background: var(--s-main); color: var(--on-main); }
.days .is-wknd:not(.is-today) .leaf { background: var(--wknd); box-shadow: inset 0 0 0 1.5px var(--s-soft); }
.days .t { font-family: var(--font-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.days .rel { color: var(--muted); font-size: .85rem; font-weight: 700; text-align: right; }
.ticket-shop { margin: 8px 0 0; }
.days .what { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.days .what .shop-chip { margin: 0; font-size: .8rem; }
.days .what .cal-req { margin-left: 0; }
@media (max-width: 560px) { .days .what .t { flex-basis: 100%; } }
.days .what .pin { margin-left: 0; }
.days .pin { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--note-bg); color: var(--note-ink); font-size: .78rem; font-weight: 800; vertical-align: middle; }

/* Notatki firmowe: żółta karteczka, żeby od razu było widać, że to polecenie od firmy, a nie zmiana ani nieobecność. */
:root { --note-bg: #fff3b0; --note-ink: #5b4300; --note-edge: #e0a100; }
.notes { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.note { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; padding: 10px 12px 10px 5px; border-radius: 20px; }
.note.is-today { background: #fff6cf; box-shadow: inset 0 0 0 1.5px #f2d36b; }
.note.is-today .leaf { background: var(--s-main); color: var(--on-main); }
.note.is-past .leaf { background: var(--wknd); color: var(--muted); }
.note-title { display: block; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.25; overflow-wrap: anywhere; }
.note-details { margin: 4px 0 6px; color: var(--ink-2); overflow-wrap: anywhere; }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: .86rem; font-weight: 700; }
.note-meta .small { display: inline-block; padding: 6px 2px; font-weight: 800; }
.note-cell { display: block; max-width: 60ch; overflow-wrap: anywhere; }
.note-cell b { display: block; }
textarea { resize: vertical; line-height: 1.45; }

/* ============ 7. Kalendarz: miesiąc ============ */
.cal { margin: 0 0 12px; }
.cal-head { display: none; }
.cal-grid { display: flex; flex-direction: column; gap: 8px; }
.cal-pad { display: none; }
.cal-day {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 18px; transition: transform .12s, box-shadow .12s;
}
.cal-day.is-wknd { background: var(--wknd); }
.cal-day.is-hol { background: #fff1f4; border-color: #ffd1dc; }
.cal-day.is-today { border-color: var(--s-main); box-shadow: 0 0 0 3px var(--s-soft), var(--shadow); }
.cal-num { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); flex: 0 0 76px; }
.cal-num .wd { font-family: var(--font-body); font-weight: 800; font-size: .78rem; text-transform: uppercase; color: var(--muted); width: 36px; }
.cal-num b { display: grid; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; font-weight: 700; }
.cal-day.is-today .cal-num b { background: var(--s-main); color: var(--on-main); }
.cal-link { flex: 0 0 76px; color: inherit; text-decoration: none; }
.cal-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cal-day:has(.cal-link):hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cal-body { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.cal-hol { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: #b4234a; font-weight: 800; font-size: .78rem; line-height: 1.2; overflow-wrap: anywhere; }
.cal-shift { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: var(--s-main); color: var(--on-main); font-weight: 800; font-size: .86rem; font-variant-numeric: tabular-nums; }
.cal-done { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 800; font-size: .76rem; }
.cal-count { position: absolute; top: 10px; right: 12px; z-index: 1; min-width: 26px; height: 26px; padding: 0 7px; display: grid; place-items: center; border-radius: 13px; background: var(--s-soft); color: var(--s-dark); box-shadow: inset 0 0 0 1.5px var(--s-main); font-weight: 800; font-size: .82rem; pointer-events: none; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 2px 8px; border-radius: 9px; background: var(--s-soft); color: var(--s-dark); font-size: .8rem; line-height: 1.35; }
.who b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.who span { flex: 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.who.abs { --cc: var(--c, #6b6785); background: #f0edfa; color: var(--ink); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .who.abs { background: color-mix(in srgb, var(--cc) 16%, #fff); color: color-mix(in srgb, var(--cc) 72%, #000); }
}
.more { font-size: .76rem; font-weight: 800; color: var(--muted); padding-left: 6px; }
.more.mob-only { display: none; }
.cal-count + .cal-hol { padding-right: 34px; }
.cal-body .chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; border-radius: 12px; line-height: 1.25; padding: 3px 10px; text-align: left; }
.chip .t-short { display: none; }
@media (min-width: 760px) and (max-width: 1099.98px) {
  .cal-body .chip .t-long { display: none; }
  .cal-body .chip .t-short { display: inline; }
}
/* Nieobecność w dniu wolnym (weekend, święto) nie zużywa dnia urlopu, więc jest pusta w środku i obrysowana przerywaną linią.
   Wcześniej była przygaszana (opacity), ale wtedy tekst miał za mały kontrast. */
.chip.is-free, .who.is-free, .r-abs.is-free { background: transparent; box-shadow: none; outline: 1.5px dashed var(--line-strong); outline-offset: -1.5px; }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .chip.abs.is-free, .who.abs.is-free, .r-abs.is-free { background: transparent; box-shadow: none; outline-color: color-mix(in srgb, var(--cc) 60%, #fff); }
}
.cal-deco { position: absolute; right: 9px; bottom: 7px; color: var(--s-ink); opacity: .17; pointer-events: none; }
.cal-note { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 9px 2px 7px; border-radius: 10px; border-left: 3px solid var(--note-edge); background: var(--note-bg); color: var(--note-ink); font-size: .76rem; font-weight: 800; line-height: 1.3; }
.cal-note .ico { flex: none; }
.cal-note span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 760px) {
  .cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
  .cal-head span { text-align: center; font-weight: 800; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
  .cal-head .wk { color: var(--s-dark); }
  .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-pad { display: block; min-height: 40px; border-radius: 18px; background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(39, 35, 64, .035) 9px 18px); }
  .cal-day { flex-direction: column; align-items: stretch; gap: 6px; min-height: 124px; padding: 9px 10px 10px; }
  .cal-num { flex: none; }
  .cal-num .wd { display: none; }
  .cal-link { flex: none; align-self: flex-start; }
  .cal-body { flex: 1 1 auto; }
}
/* Tablet (ok. 760–1100 px): siedem kolumn jest tu wąskich, więc kafelek osoby ma dwa wiersze (imię nad godzinami)
   zamiast ucinać imię do jednej litery. Na szerokim ekranie zostaje jeden wiersz. */
@media (min-width: 760px) and (max-width: 1099.98px) {
  .cal-head, .cal-grid { gap: 6px; }
  .cal-day { padding: 8px 6px 9px; }
  .who { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 2px 7px; line-height: 1.25; }
  .who b { flex: none; }
  .who span { font-size: .74rem; }
}
@media (max-width: 759.98px) {
  .cal-day:not(:has(.cal-body > *)) { min-height: 46px; }
  .cal-day:not(:has(.cal-body > *)) .cal-num b { font-weight: 500; }
  .who.mob-hide, .more.desk-only { display: none; }
  .more.mob-only { display: block; }
  .cal-count { top: 8px; }
  .cal-day:has(.cal-count) .cal-body { padding-right: 36px; }
  .cal-deco { right: 14px; bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* ============ 8. Kalendarz: rok ============ */
.year { display: grid; gap: 16px; margin: 0 0 12px; }
.band { padding: 16px; border-radius: 28px; background: var(--s-soft); border: 1.5px solid rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .03); }
.band-head { display: flex; align-items: center; gap: 12px; margin: 2px 4px 14px; }
.band-ico { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 17px; color: var(--on-main); background: linear-gradient(145deg, var(--s-main), var(--s-dark)); box-shadow: 0 5px 12px rgba(0, 0, 0, .18); }
.band-head h2 { margin: 0; font-size: 1.45rem; color: var(--s-dark); }
.band-head p { margin: 0; color: var(--ink-2); font-size: .9rem; font-weight: 700; }
.months { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mini { padding: 10px 12px 12px; border-radius: 20px; background: #fff; box-shadow: 0 1px 4px rgba(39, 35, 64, .1); }
.mini h3 { margin: 0 0 6px; font-size: 1.08rem; }
.mini h3 a { display: inline-block; padding: 3px 0; color: var(--s-dark); text-decoration: none; }
.mini h3 a:hover { text-decoration: underline; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.mh { font-size: .68rem; font-weight: 800; color: var(--muted); }
.mh.wk { color: var(--s-dark); }
.md { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 9px; font-size: .75rem; font-weight: 700; color: var(--ink-2); text-decoration: none; font-variant-numeric: tabular-nums; }
a.md:hover { outline: 2px solid var(--s-main); }
.md.wknd { color: var(--s-dark); background: var(--wknd); }
.md.hol { background: #ffdbe5; color: #a21b43; }
.md.today { outline: 2.5px solid var(--ink); outline-offset: -1px; font-weight: 800; }
.md.has-note::after { content: ""; position: absolute; top: 1px; right: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--note-edge); box-shadow: 0 0 0 1.5px #fff; }
.md.shift { background: var(--s-main); color: var(--on-main); }
.md.abs { background: var(--c, #667085); color: #fff; }
.md.heat1 { background: var(--s-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--s-main); }
.md.heat2 { background: var(--s-accent); color: var(--ink); opacity: .85; }
.md.heat3 { background: var(--s-main); color: var(--on-main); opacity: .78; }
.md.heat4 { background: var(--s-dark); color: #fff; }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .md.heat1 { background: color-mix(in srgb, var(--s-main) 20%, #fff); box-shadow: none; }
  .md.heat2 { background: color-mix(in srgb, var(--s-main) 42%, #fff); color: var(--ink); opacity: 1; }
  .md.heat3 { background: color-mix(in srgb, var(--s-main) 66%, #fff); color: var(--ink); opacity: 1; }
  .md.heat4 { background: var(--s-dark); }
  .heatsw.h1 { background: color-mix(in srgb, var(--s-main) 20%, #fff); box-shadow: none; opacity: 1; }
  .heatsw.h2 { background: color-mix(in srgb, var(--s-main) 42%, #fff); opacity: 1; }
  .heatsw.h3 { background: color-mix(in srgb, var(--s-main) 70%, #fff); opacity: 1; }
}
.md.has-abs::after { content: ""; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: #e0334c; box-shadow: 0 0 0 1.5px #fff; }

/* ============ 9. Widoki Kierownika ============ */
/* Dziś w zespole */
.team-list { list-style: none; padding: 0; margin: 0; }
.team-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 14px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.team-list li:last-child { border-bottom: 0; }
.team-list li > * { min-width: 0; }
.team-list .chip { white-space: normal; text-align: left; }
.who-name { display: grid; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.who-name b { font-weight: 800; }
.who-name small { color: var(--muted); }
.who-name:hover b { text-decoration: underline; }
.when { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.state { text-align: right; }
.todo-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.todo-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 16px; background: var(--s-soft); }
.todo-what { flex: 1 1 190px; display: grid; }
.todo-what small { color: var(--ink-2); }
.abs-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.abs-list li:last-child { border-bottom: 0; }

/* Edycja dnia */
.day-rows { display: grid; gap: 12px; }
.day-row { margin: 0; }
.day-row header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.day-row h2 { margin: 0; font-size: 1.15rem; }
.day-row h2::before { display: none; }
.day-row h2 a { display: inline-block; padding: 3px 0; color: var(--ink); text-decoration: none; }
.day-row p > a.small { display: inline-block; padding: 4px 0; }
.day-row h2 a:hover { text-decoration: underline; }
.day-row.is-absent { background: var(--s-soft); }
.day-fields { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .day-fields { grid-template-columns: 1fr 1fr; } }
fieldset { min-width: 0; margin: 0; padding: 10px 14px 14px; border: 1.5px solid var(--line); border-radius: 18px; }
legend { padding: 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.timepair { display: flex; align-items: center; gap: 8px; }
.timepair input { width: 128px; flex: 0 1 128px; min-width: 0; }
.tplpick { margin-top: 10px; }
.inline-num { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; }
.inline-num input { width: 92px; }
.actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.dayform .actionbar, .hours-form .actionbar {
  position: sticky; z-index: 30; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom));
  padding: 10px; border-radius: 24px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
@media (min-width: 900px) { .dayform .actionbar, .hours-form .actionbar { bottom: 14px; } }

/* Grafik */
.roster-wrap { position: relative; }
.roster-scroll { position: relative; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.roster { width: 100%; border-collapse: separate; border-spacing: 0; }
.roster th, .roster td { border-bottom: 1px solid var(--line); }
.roster tbody tr:last-child th, .roster tbody tr:last-child td { border-bottom: 0; }
.roster .r-name { position: sticky; left: 0; z-index: 3; min-width: 124px; max-width: 190px; padding: 8px 12px; text-align: left; background: #fff; border-right: 1px solid var(--line); }
.roster thead .r-name, .roster tfoot .r-name { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.roster tbody .r-name a { display: block; font-weight: 800; color: var(--ink); text-decoration: none; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.roster tbody .r-name a:hover { text-decoration: underline; }
.roster tbody .r-name small { display: block; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-day { position: relative; min-width: 84px; padding: 6px 4px; text-align: center; font-weight: 700; background: #fff; }
.r-day a { display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: var(--ink); text-decoration: none; }
.r-day a:hover b { text-decoration: underline; }
.r-day small { font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.r-day b { font-family: var(--font-display); font-size: 1.25rem; padding: 0 8px; border-radius: 999px; }
.r-day em { font-style: normal; font-size: .68rem; color: var(--muted); }
.r-day.is-today b { background: var(--s-main); color: var(--on-main); }
.r-day.is-wknd, .r-cell.is-wknd, .r-count.is-wknd { background: var(--wknd); }
.r-day.is-hol, .r-cell.is-hol { background: #fff1f4; }
.r-hol { position: absolute; top: 3px; right: 4px; color: #d02755; }
.r-cell { padding: 5px; text-align: center; height: 56px; min-width: 84px; }
.r-btn, .r-abs { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; padding: 0 4px; border-radius: 13px; text-decoration: none; font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; line-height: 1.1; overflow: hidden; }
.r-btn.has-shift { background: var(--s-main); color: var(--on-main); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.r-btn.has-shift:hover { filter: brightness(1.08); }
.r-btn.is-empty { color: #aaa4c2; border: 1.5px dashed var(--line-strong); }
.r-btn.is-empty:hover { color: var(--s-dark); border-color: var(--s-main); background: var(--s-soft); }
.r-btn.is-busy { opacity: .5; pointer-events: none; }
.r-btn.is-active { outline: 3px solid var(--ink); outline-offset: 1px; }
.r-abs { --cc: var(--c, #6b6785); background: #f0edfa; color: var(--ink); font-size: .78rem; }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .r-abs { background: color-mix(in srgb, var(--cc) 16%, #fff); color: color-mix(in srgb, var(--cc) 72%, #000); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cc) 30%, #fff); }
}
.r-sum { min-width: 86px; padding: 6px 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; background: #fff; border-left: 1px solid var(--line); }
.r-sum b { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.r-sum small { color: var(--muted); font-weight: 700; }
.r-sum.is-ok b { color: var(--ok); }
.r-sum.is-under b { color: var(--warn); }
.r-sum.is-over b { color: var(--bad); }
.roster thead th { position: sticky; top: 0; z-index: 2; }
.roster thead .r-name { z-index: 4; }
.r-count { padding: 7px 4px; text-align: center; font-weight: 800; color: var(--s-dark); border-bottom: 0 !important; border-top: 2px solid var(--line-strong); }
.roster tfoot th, .roster tfoot td { border-top: 2px solid var(--line-strong); border-bottom: 0; }
.roster tfoot .r-name { position: sticky; }
.roster.is-month .r-day { min-width: 46px; }
.roster.is-month .r-day b { font-size: 1.05rem; padding: 0 5px; }
.roster.is-month .r-cell { min-width: 46px; height: 46px; padding: 3px; }
.roster.is-month .r-btn, .roster.is-month .r-abs { min-height: 36px; border-radius: 10px; font-size: .74rem; }

.pop { position: absolute; z-index: 45; width: 336px; max-width: calc(100vw - 20px); max-height: calc(100vh - 24px); overflow-y: auto; padding: 14px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 22px; box-shadow: var(--shadow-lg); }
.pop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.pop-head b { display: block; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.2; }
.pop-head small { display: block; color: var(--muted); font-weight: 700; }
.pop-tpl { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pop-tpl .btn { flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 8px; }
.pop-tpl small { font-weight: 700; opacity: .8; }
.pop-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-bottom: 10px; }
.pop-form label { display: grid; gap: 3px; font-size: .8rem; font-weight: 800; min-width: 0; }
.pop-form input { width: 100%; min-width: 0; }
.pop-foot { display: flex; flex-wrap: wrap; gap: 6px; }
.pop-err { margin: 8px 0 0; color: var(--bad); font-weight: 800; }
.pop-backdrop { position: fixed; inset: 0; z-index: 44; background: transparent; }
@media (max-width: 639.98px) {
  .pop, .pop.has-shops { position: fixed; left: 8px !important; right: 8px; top: auto !important; width: auto; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); max-height: calc(100vh - var(--nav-h) - 28px - env(safe-area-inset-bottom)); max-height: calc(100dvh - var(--nav-h) - 28px - env(safe-area-inset-bottom)); }
  .pop-backdrop { background: rgba(39, 35, 64, .3); }
  .roster .r-name { min-width: 92px; max-width: 110px; padding: 6px 8px; font-size: .88rem; }
  .r-cell, .r-day { min-width: 66px; }
  .r-btn, .r-abs { font-size: .8rem; }
  /* podpowiedź, że tabelę można przesuwać w bok */
  .roster-wrap::after { content: ""; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 26px; border-radius: 0 var(--radius) var(--radius) 0; pointer-events: none; background: linear-gradient(to left, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); transition: opacity .2s; z-index: 5; }
  .roster-wrap.at-end::after { opacity: 0; }
}

/* Tabele z danymi (godziny, nieobecności, pracownicy, ustawienia) */
.table-scroll { position: relative; overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.data { width: 100%; border-collapse: collapse; }
.data th, .data td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.data thead th { font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.data tbody th { font-weight: 800; }
.data.wrap-head thead th { white-space: normal; vertical-align: bottom; line-height: 1.25; }
.data.wrap-head thead th.num { min-width: 84px; }
.data th small, .data td small { display: block; font-weight: 600; }
.data td small.muted { display: inline; }
.data td small.later, .data td small.sub { display: block; }
@media (min-width: 760px) { .data td small.later { white-space: nowrap; } }
.sum-table tbody th[scope=row] { min-width: 10.5rem; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.data .act { text-align: right; white-space: nowrap; }
.data .act form { display: inline; }
.data tfoot th, .data tfoot td { border-top: 2px solid var(--line-strong); border-bottom: 0; font-weight: 800; }
.data tr.is-today { background: var(--s-soft); }
.data tr.is-wknd { background: var(--wknd); }
.data tr.is-hol { background: #fff1f4; }
.data a { color: var(--ink); font-weight: 800; }
.data .btn { color: var(--btn-fg); }
.hol-name { color: #b4234a; font-weight: 800; }
.neg { color: var(--bad); font-weight: 800; }
.pos { color: var(--ok); font-weight: 800; }
.hours-table input[type=time] { width: 8.8rem; min-height: 38px; padding: 4px 8px; }
.hours-table input[type=number] { width: 84px; min-height: 38px; padding: 4px 8px; text-align: right; }
.vac-cell { display: grid; gap: 6px; min-width: 190px; }
.edit-table input[type=text], .edit-table input[type=number], .edit-table select { min-height: 40px; }
.edit-table input[type=time] { width: 8.8rem; min-height: 40px; }
.edit-table td { padding: 8px; }
.new-row td { background: var(--s-soft); }

/* Formularze z paneli */
.form-panel { padding: 0; }
.form-panel > summary { margin: 14px 16px; display: inline-flex; }
.form-panel > :not(summary) { margin-left: 20px; margin-right: 20px; }
.form-panel > :last-child { margin-bottom: 20px; }
.allowance { margin: 18px 0 4px; }
.year-switch { display: flex; gap: 8px; margin-bottom: 10px; }

/* ============ 10. Logowanie ============ */
body.page-login .wrap { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 66px); }
.login-form .btn { margin: 4px 0 12px; }
.steps { margin: 10px 0 14px; padding-left: 1.4em; display: grid; gap: 10px; }
.steps li::marker { color: var(--s-ink); font-weight: 800; }
.demo-hint { border-style: dashed; border-width: 2px; border-color: var(--line-strong); box-shadow: none; background: transparent; }
.demo-hint h2::before { display: none; }

/* ============ 11. Tabele jako karty na telefonie ============ */
@media (max-width: 759.98px) {
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack, .stack tbody, .stack tfoot, .stack tr { display: block; }
  .stack tr { margin: 0 0 10px; padding: 4px 14px 6px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
  .stack tr.is-today { background: var(--s-soft); }
  .stack th[scope=row] { display: block; padding: 8px 0 4px; border: 0; font-size: 1.05rem; }
  .stack td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; text-align: right; border: 0; border-bottom: 1px dashed var(--line); }
  .stack td:last-child { border-bottom: 0; }
  .stack td[data-label]::before { content: attr(data-label); flex: none; text-align: left; font-size: .84rem; font-weight: 800; color: var(--muted); }
  .stack td.act { justify-content: flex-end; }
  .stack tfoot tr { background: var(--s-soft); }
  .vac-cell { min-width: 0; width: 60%; }
  .hours-table input[type=time] { width: 8.2rem; }
}
/* Lista „Dziś w zespole”: gdy panel jest wąski (telefon albo dwie kolumny na ekranie ok. 860–980 px), imię i stanowisko mają własny
   wiersz, a godziny i stan są pod spodem. Dzięki temu nic się nie ucina, nie nachodzi i nie łamie nazwiska w pół słowa. */
@media (max-width: 759.98px), (min-width: 860px) and (max-width: 979.98px) {
  .team-list li { grid-template-columns: auto minmax(0, 1fr); }
  .team-list .who-name { grid-column: 1 / -1; }
  .team-list .when { white-space: nowrap; }
  .team-list .when:empty { display: none; }
  .team-list .when:empty + .state, .team-list li.is-abs .state { grid-column: 1 / -1; text-align: left; }
}

/* ============ 11b. Sklepy: znaczki, filtr, obsada ============ */
/* Osiem kolorów sklepów (biały numer na każdym ma kontrast co najmniej 4,5:1). Numer sklepu jest zawsze napisany, więc kolor nie niesie sam informacji. */
.sc1 { --shop-c: #2563c9; } .sc2 { --shop-c: #c2410c; } .sc3 { --shop-c: #0f766e; } .sc4 { --shop-c: #7e22ce; }
.sc5 { --shop-c: #be185d; } .sc6 { --shop-c: #4d7c0f; } .sc7 { --shop-c: #a16207; } .sc8 { --shop-c: #475569; }
.sc-none { --shop-c: #6b6785; }
.shop-badge { flex: none; display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; min-width: 18px; min-height: 18px; border-radius: 50%; background: var(--shop-c, #6b6785); color: #fff; font-style: normal; font-weight: 900; font-size: .74rem; line-height: 1; font-variant-numeric: tabular-nums; vertical-align: middle; }
.shop-badge.none { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.shop-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; margin: 0 4px 2px 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 800; font-size: .85rem; white-space: nowrap; }
.shop-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.shop-seg { position: relative; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shop-seg::-webkit-scrollbar { display: none; }
.shop-seg a { display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; }
.shop-seg a > span:not(.all) { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-seg .all-short { display: none; }
@media (max-width: 520px) { .shop-seg a { padding: 8px 12px; } .shop-seg .all-long { display: none; } .shop-seg .all-short { display: inline; } }
.toolbar .filter { margin: 0; }

/* grafik: znaczek w komórce, przygaszone zmiany z innych sklepów, obsada */
.r-btn .r-time { white-space: nowrap; }
.r-btn .r-shop { display: inline-flex; margin-right: 5px; }
.r-btn .r-shop .shop-badge { width: 18px; height: 18px; font-size: .68rem; box-shadow: 0 0 0 2px #fff; }
.r-btn.is-other { background: var(--s-soft); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.r-btn.is-other:hover { background: var(--s-main); color: var(--on-main); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.roster tbody .r-name small .shop-badge { width: 16px; height: 16px; min-width: 16px; min-height: 16px; font-size: .62rem; margin-left: 2px; }
.roster.is-month .r-btn { position: relative; }
.roster.is-month .r-btn.has-shift[class*=" sc"]::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--shop-c, transparent); box-shadow: 0 0 0 1px rgba(255, 255, 255, .85); }
.roster.is-month .r-btn .r-shop { position: absolute; top: 1px; left: 1px; margin: 0; }
.roster.is-month .r-btn .r-shop .shop-badge { width: 13px; height: 13px; min-width: 13px; min-height: 13px; font-size: .5rem; box-shadow: none; }
.roster.is-month .r-btn.has-shift { padding: 6px 1px 0; font-size: .72rem; }
.r-cov th small { display: block; color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: none; letter-spacing: 0; }
.r-cov .shop-name { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: .84rem; }
.roster tfoot .r-cov:first-of-type th, .roster tfoot .r-cov:first-of-type td { border-top: 1px solid var(--line); }
.r-covc { font-variant-numeric: tabular-nums; }
.r-covc.is-low { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); border-radius: 8px; }
.r-covc.is-idle { color: var(--muted); font-weight: 700; }
.r-covc.is-closed { color: var(--muted); font-weight: 700; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(107, 103, 133, .1) 5px 10px); }
@media (min-width: 640px) { .pop.has-shops { width: 376px; } }
.pop-shops { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; max-height: 128px; overflow-y: auto; }
.shop-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; max-width: 100%; padding: 3px 11px 3px 5px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 800; font-size: .84rem; cursor: pointer; }
.shop-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12ch; }
.shop-pill:hover { background: var(--s-soft); }
.shop-pill[aria-pressed="true"] { border-color: var(--ink); background: var(--s-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.shop-pill.is-other { opacity: .7; }
.pop-week { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.pop-foot .btn { padding-inline: 10px; gap: 5px; }
.pop-week input { width: 18px; height: 18px; accent-color: var(--s-main); flex: none; }
.legend-dim { display: inline-block; min-width: 3.4em; padding: 1px 7px; border-radius: 8px; text-align: center; background: var(--s-soft); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 800; }
.sw-low { width: 14px; height: 14px; border-radius: 5px; background: var(--bad-bg); box-shadow: inset 0 0 0 2px var(--bad); }
.cov-alert { border-left: 6px solid var(--bad); padding: 12px 16px; }
.cov-alert summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; cursor: pointer; color: var(--bad); }
.cov-alert summary > b { max-width: calc(100% - 26px); }
.cov-alert ul { list-style: none; margin: 10px 0 2px; padding: 0; display: grid; gap: 2px; }
.cov-alert li a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--ink); font-weight: 700; }

/* strona „Sklepy” */
.daypick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.daypick label { position: relative; display: inline-flex; }
.daypick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.daypick span[aria-hidden] { display: grid; place-items: center; min-width: 48px; height: 44px; padding: 0 10px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: #fff; font-weight: 900; }
.daypick input:checked + span { background: var(--s-main); border-color: transparent; color: var(--on-main); }
.daypick input:focus-visible + span { outline: 3px solid var(--s-dark); outline-offset: 2px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.field > legend { padding: 0; font-weight: 800; font-size: .93rem; margin-bottom: 6px; }
.shop-table small { display: block; }
.shop-table tr.is-off { opacity: .6; }
.crew { display: flex; flex-wrap: wrap; gap: 4px; }
.crew-one { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--s-soft); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.matrix th[scope=row] { white-space: nowrap; text-align: left; }
.matrix .mx-shop { text-align: center; min-width: 84px; }
.matrix .mx-shop span { display: block; font-size: .78rem; font-weight: 800; max-width: 12ch; margin: 2px auto 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix .mx-cell { text-align: center; padding: 0; }
.mx-check { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 46px; cursor: pointer; }
.mx-check input { width: 22px; height: 22px; accent-color: var(--s-main); margin: 0; }
.hint-panel { border-left: 6px solid var(--s-main); }
.plain-list { margin: 0 0 6px; padding-left: 1.2em; display: grid; gap: 4px; }
.shop-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.shop-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 10px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: #fff; font-weight: 800; cursor: pointer; }
.shop-check input { width: 18px; height: 18px; accent-color: var(--s-main); margin: 0; }
.shop-check:has(input:checked) { border-color: var(--s-main); background: var(--s-soft); }
.shops-pick legend { font-weight: 800; }
.inline-form .form-grid { margin-bottom: 4px; }

/* kalendarz: sklepy i czekające prośby o wolne */
.cal-shift { gap: 6px; }
.cal-shift .shop-badge { width: 18px; height: 18px; min-width: 18px; min-height: 18px; font-size: .66rem; box-shadow: 0 0 0 2px #fff; }
.who b .shop-badge { width: 15px; height: 15px; min-width: 15px; min-height: 15px; font-size: .58rem; margin-right: 4px; vertical-align: -3px; }
.cal-req { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 9px; border-radius: 10px; border: 1.5px dashed var(--warn); background: var(--warn-bg); color: var(--warn); font-size: .76rem; font-weight: 800; line-height: 1.3; }
.cal-req .ico { flex: none; }
.cal-req span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.req { background: transparent; color: var(--warn); box-shadow: none; outline: 1.5px dashed var(--warn); outline-offset: -1.5px; }
.sw-req { background: var(--warn-bg); outline: 1.5px dashed var(--warn); outline-offset: -1.5px; }
.md.has-req::before { content: ""; position: absolute; left: 1px; top: 1px; width: 7px; height: 7px; border-radius: 2px; background: var(--warn); box-shadow: 0 0 0 1.5px #fff; }
.req-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.req-mini a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.req-mini a:hover { background: var(--s-soft); }

/* godziny wg sklepów */
.shop-hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shop-hours li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.data tr.is-picked > * { background: var(--s-soft); }
.data a.shop-name { color: var(--ink); text-decoration: none; }
.data a.shop-name:hover span { text-decoration: underline; }

/* strona „Dzień”: obsada sklepów i wybór sklepu zmiany */
.day-cov .panel-head { margin-bottom: 8px; }
.cov-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; }
.cov-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-weight: 800; }
a.cov-chip:hover { background: var(--s-soft); }
.cov-chip[aria-current] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--s-soft); }
.cov-chip .cov-num { font-weight: 700; color: var(--ink-2); font-size: .88rem; }
.cov-chip.is-low { border-color: var(--bad); background: var(--bad-bg); }
.cov-chip.is-low .cov-num, .cov-chip.is-low .ico { color: var(--bad); font-weight: 900; }
.cov-chip.is-idle, .cov-chip.is-none, .cov-chip.is-closed { color: var(--ink-2); }
.cov-chip.is-closed { background: repeating-linear-gradient(135deg, #fff 0 6px, rgba(107, 103, 133, .09) 6px 12px); }
.day-shops { display: inline-flex; gap: 3px; align-items: center; }
.day-shops .shop-badge { width: 18px; height: 18px; min-width: 18px; min-height: 18px; font-size: .68rem; }
.day-shop { display: grid; gap: 4px; margin-top: 10px; font-weight: 800; font-size: .85rem; }
.day-shop select { width: 100%; }

/* „Do zrobienia” na stronie Dziś */
.todo-panel { border-left: 6px solid var(--s-main); }
.todo-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.todo-block { display: grid; gap: 8px; }
.todo-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.todo-title > .btn { margin-left: auto; }
.todo-title > .ico { color: var(--s-dark); flex: none; }
.todo-title > b { max-width: calc(100% - 30px); }              /* ikona + tytuł zawsze w jednym wierszu, długi tytuł zawija się obok ikony */
.todo-reqs, .todo-gaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo-req { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 12px; border-radius: 16px; background: var(--s-soft); }
.todo-req.is-warn { background: var(--warn-bg); }
.todo-req.is-bad { background: var(--bad-bg); }
.todo-main { display: grid; gap: 4px; min-width: 0; flex: 1 1 300px; }
.todo-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.todo-who .shop-badge { width: 18px; height: 18px; min-width: 18px; min-height: 18px; font-size: .66rem; }
.verdict { display: flex; align-items: flex-start; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.verdict .ico { flex: none; margin-top: 2px; }
.verdict.is-ok .ico { color: var(--ok); }
.verdict.is-warn .ico { color: var(--warn); }
.verdict.is-bad .ico { color: var(--bad); }
.todo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.todo-gaps li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 4px 2px; }
.gap-what { display: inline-flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; min-width: 0; max-width: 100%; }
.gap-what > .shop-badge { flex: none; margin-top: 1px; }
.gap-what > span { max-width: calc(100% - 26px); }                 /* znaczek sklepu zawsze obok tekstu, nie nad nim */
.todo-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: 16px; background: var(--s-soft); }
.todo-hint > .ico { flex: none; color: var(--s-dark); }
.todo-hint > span { flex: 1 1 min(260px, calc(100% - 32px)); }

/* ============ 11c. Prośby o wolne ============ */
/* lista próśb (Kierownik: poziom is-ok/warn/bad; pracownik: status is-pending/approved/rejected/cancelled) */
.req-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.req-item { display: grid; gap: 6px; padding: 12px 14px 12px 16px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); border-left: 6px solid var(--line-strong); }
.req-item.is-ok, .req-item.is-approved { border-left-color: var(--ok); }
.req-item.is-warn, .req-item.is-pending { border-left-color: var(--warn); }
.req-item.is-bad, .req-item.is-rejected { border-left-color: var(--bad); }
.req-item.is-cancelled { background: #faf9fe; }
.req-item.is-new { box-shadow: 0 0 0 3px var(--s-soft), var(--shadow); }
.req-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.req-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.req-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); overflow-wrap: anywhere; }
a.req-name { text-decoration: none; }
a.req-name:hover { text-decoration: underline; }
.req-shops { display: inline-flex; gap: 3px; }
.req-shops .shop-badge { width: 18px; height: 18px; min-width: 18px; min-height: 18px; font-size: .66rem; }
.req-in { font-size: .86rem; font-weight: 700; white-space: nowrap; }
.req-when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.req-when b { font-size: 1.02rem; }
.req-note { margin: 0; padding: 6px 12px; border-radius: 12px; background: #f6f4fd; color: var(--ink-2); font-weight: 700; overflow-wrap: anywhere; }
.req-note.is-reply { background: var(--s-soft); color: var(--ink); }
.req-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.req-item .verdict { margin: 0; }
.req-reject[open] { flex: 1 1 100%; }
.req-reject > summary { display: inline-flex; }
.req-reject-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.req-reject-form input[type=text] { flex: 1 1 260px; min-width: 0; }
.req-reject-wide { margin-top: 14px; }
.req-sub { font-size: 1rem; margin: 14px 0 8px; color: var(--ink-2); }
.req-sub:first-of-type { margin-top: 4px; }
.req-old { margin-top: 12px; }
.req-old .req-list { margin-top: 10px; }
.req-head-panel .facts { margin-bottom: 12px; }
.req-head-panel .facts dd small { display: inline; font-weight: 700; }
.req-head-panel .facts a { color: var(--ink); }

/* szczegóły prośby: ustalenia i pasek obsady */
.req-check { border-left: 6px solid var(--ok); }
.req-check.is-warn { border-left-color: var(--warn); }
.req-check.is-bad { border-left-color: var(--bad); }
.req-check h3 { font-size: 1rem; margin: 18px 0 6px; }
.issues { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.issue { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--s-soft); color: var(--ink); font-weight: 700; }
.issue .ico { flex: none; margin-top: 2px; }
.issue.is-info { background: #f1effa; }
.issue.is-ok { background: var(--ok-bg); color: #0d5b36; }
.issue.is-warn { background: var(--warn-bg); color: #6d4000; }
.issue.is-bad { background: var(--bad-bg); color: #8f1d17; }
.cap { margin: 14px 0 6px; }
.cap-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 8px; }
.cap-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.cap-day { display: grid; justify-items: center; align-content: center; gap: 0; width: 46px; padding: 3px 0 4px; border-radius: 12px; border: 2px solid var(--line); background: #fff; line-height: 1.15; }
.cap-day small { font-size: .66rem; font-weight: 800; color: var(--muted); }
.cap-day b { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.cap-day > span { font-size: .95rem; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--ok); }
.cap-day.is-wknd { background: var(--wknd); }
.cap-day.is-warn { border: 2px dashed var(--warn); background: var(--warn-bg); }
.cap-day.is-warn > span { color: var(--warn); }
.cap-day.is-bad { border: 2px solid var(--bad); background: var(--bad-bg); }
.cap-day.is-bad > span { color: var(--bad); }
.cap-day.is-closed { background: repeating-linear-gradient(135deg, #fff 0 5px, rgba(107, 103, 133, .12) 5px 10px); }
.cap-day.is-closed > span { color: var(--muted); }
.cap-legend { margin: 8px 0 0; }

/* strona „Wolne”: kalendarz do zaznaczania dni */
.leave-form [hidden], .lp [hidden], .lp-chosen [hidden] { display: none !important; }
.lp-info { margin: -2px 0 12px; }
.lp-status { margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; background: var(--s-soft); color: var(--s-dark); font-weight: 800; }
.lp-status.is-warn { background: var(--warn-bg); color: #6d4000; }
.lp-top { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.lp-top .btn.round { flex: none; min-width: 44px; }
.lp-top .btn.round:disabled { opacity: .35; cursor: default; transform: none; filter: none; }
.lp-pills { flex: 1 1 auto; min-width: 0; margin: 0; padding: 4px 2px 6px; }
.lp-pills .mpill { border: 0; font-family: inherit; font-size: 1rem; cursor: pointer; }
.lp-pills .mpill.is-in { box-shadow: inset 0 0 0 2px var(--s-main); }
.lp-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.lp-months { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 860px) { .lp-months { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-month { padding: 12px 12px 14px; border: 1.5px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, var(--s-soft), #fff 62%); }
.lp-mh { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-display); font-size: 1.2rem; color: var(--s-dark); }
.lp-mh .ico { color: var(--s-ink); }
.lp-wd, .lp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.lp-wd { margin-bottom: 4px; }
.lp-wd span { text-align: center; font-size: .74rem; font-weight: 800; color: var(--muted); }
.lp-day { position: relative; display: grid; place-items: center; min-height: 46px; padding: 0; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lp-day b { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1; }
.lp-day.is-wknd { background: var(--wknd); }
.lp-day.is-hol { background: #fff1f4; border-color: #ffd1dc; }
.lp-day.is-today { box-shadow: inset 0 0 0 2px var(--s-main); }
.lp-day.has-shift::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--s-dark); }
.lp-day:focus-visible { outline: 3px solid var(--s-dark); outline-offset: 2px; z-index: 1; }
.lp-day.is-sel { background: var(--s-main); border-color: var(--s-main); color: var(--on-main); }
.lp-day.is-sel.has-shift::after { background: var(--on-main); }
.lp-day.is-anchor { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--s-dark); z-index: 1; }
.lp-day:disabled { cursor: not-allowed; }
.lp-day.is-past { background: transparent; border-style: dashed; color: var(--muted); }
.lp-day.is-abs { background: #f0edfa; border-color: var(--line-strong); }
.lp-day.is-req { background: var(--warn-bg); border: 1.5px dashed var(--warn); color: var(--warn); }
.lp-tag { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-style: normal; font-size: .6rem; font-weight: 900; line-height: 1; }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .lp-day.is-abs { --cc: var(--c, #6b6785); background: color-mix(in srgb, var(--cc) 16%, #fff); border-color: color-mix(in srgb, var(--cc) 40%, #fff); color: color-mix(in srgb, var(--cc) 72%, #000); }
}
@media (hover: hover) {
  .lp-day:not(:disabled):not(.is-sel):hover { background: var(--s-soft); border-color: var(--s-main); }
  .lp-day.is-sel:hover { filter: brightness(1.08); }
}
.lp-legend { margin: 12px 0 0; }
.lp-sw-sel { background: var(--s-main); }
.lp-sw-abs { background: #e6e1f7; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.lp-sw-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--s-dark); }
.lp-chosen { margin: 14px 0 6px; }
.lp-chosen-h { font-size: 1rem; margin: 0 0 6px; }
.lp-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; }
.lp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--s-soft); box-shadow: inset 0 0 0 1.5px var(--s-main); color: var(--ink); }
.lp-chip > span { display: grid; line-height: 1.2; }
.lp-chip small { font-weight: 700; color: var(--ink-2); }
.lp-chip.is-bad { background: var(--bad-bg); box-shadow: inset 0 0 0 1.5px var(--bad); }
.lp-x { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink-2); cursor: pointer; }
.lp-x:hover { background: var(--bad-bg); color: var(--bad); }
.lp-sum { display: grid; gap: 2px; margin: 4px 0 10px; font-weight: 700; }
.lp-fields { margin-top: 12px; }
.lp-fixed-label { display: block; font-weight: 800; font-size: .93rem; margin-bottom: 6px; }
.lp-fixed { margin: 0; }
.lp-manual { margin: 2px 0 8px; }
.lp-manual > summary { display: inline-block; padding: 10px 0; cursor: pointer; font-weight: 800; color: var(--s-dark); }

/* znaczek z liczbą w menu */
.nav-badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-family: var(--font-body); font-style: normal; font-size: .72rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.nav-desktop a .nav-badge { margin-left: -2px; }
.nav-bottom a { position: relative; }
.nav-bottom .nav-badge { position: absolute; top: 1px; left: calc(50% + 6px); box-shadow: 0 0 0 2px #fff; }
.tile b .nav-badge { margin-left: 6px; vertical-align: 2px; }

/* ============ 12. Druk, ograniczenie ruchu ============ */
@media print {
  body { background: #fff; }
  .topbar, .nav-bottom, .toolbar, .monthstrip, .banner-actions, .actionbar, .pop, .legend-row, .btn { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .banner { min-height: 0; padding-bottom: 8px; color: #000; background: #fff; box-shadow: none; border: 1.5px solid #000; }
  .banner::before, .banner-art { display: none; }
  .banner + .ticket { margin-top: 0; }
  .banner h1, .banner p { text-shadow: none; }
  .panel, .roster-scroll { box-shadow: none; }
  .roster-scroll { overflow: visible; }
  .r-btn.has-shift { background: #fff; color: #000; box-shadow: inset 0 0 0 1.5px #000; }
  .roster .r-name, .r-day { position: static; }
  /* Grafik miesięczny mieści się na jednej kartce: kolumny dzielą szerokość strony po równo */
  .roster-scroll { border: 0; border-radius: 0; }
  .roster.is-month { table-layout: fixed; }
  .roster.is-month .r-name { width: 84px; min-width: 0; max-width: none; padding: 3px 4px; font-size: .62rem; }
  .roster.is-month .r-sum { width: 46px; min-width: 0; padding: 2px 3px; font-size: .5rem; }
  .roster.is-month .r-sum b { font-size: .7rem; }
  .roster.is-month .r-day, .roster.is-month .r-cell { min-width: 0; padding: 1px; }
  .roster.is-month .r-cell { height: 26px; }
  .roster.is-month .r-day b { font-size: .7rem; padding: 0; }
  .roster.is-month .r-day small { font-size: .5rem; }
  .roster.is-month .r-btn, .roster.is-month .r-abs { min-height: 22px; padding: 0; border-radius: 5px; font-size: .5rem; }
  .roster.is-week .r-day, .roster.is-week .r-cell { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
