/* Same font files and unicode ranges as the synaptio.pl theme (latin + Polish subset). */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/nunito-800-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/nunito-800-pl.woff2") format("woff2"); unicode-range: U+0102-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0160-0161, U+0179-017C; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/nunito-700s-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/nunito-700s-pl.woff2") format("woff2"); unicode-range: U+0102-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0160-0161, U+0179-017C; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/nunito-sans-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/nunito-sans-normal-pl.woff2") format("woff2"); unicode-range: U+0102-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0160-0161, U+0179-017C; }

:root {
  --ink: #0F2419; --ink-soft: #45584A; --night-2: #194730; --sage: #D6E2D0; --sage-pale: #EEF3EB;
  --paper: #FFFFFF; --bg: #F5F6F4; --gold: #B69026; --bronze: #7A5E12; --sand: #F4E5C5;
  --line: #E1E6DE; --danger: #9B2C2C;
  --r-card: 18px; --r-block: 22px; --r-btn: 10px; --r-chip: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Nunito Sans", system-ui, sans-serif; }
h1, h2, h3, .btn, .brand, .stat b { font-family: "Nunito", system-ui, sans-serif; font-weight: 800; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 0 0 14px; }
a { color: var(--night-2); text-underline-offset: 3px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

/* shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #F4EFE0; padding: 26px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { font-size: 22px; padding: 0 12px 22px; letter-spacing: -0.01em; }
.brand span { color: var(--gold); }
.side a { color: #DCE5D8; text-decoration: none; padding: 11px 12px; border-radius: var(--r-btn); font-weight: 600; }
.side a:hover { background: rgba(255,255,255,.07); }
.side a.on { background: var(--night-2); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.side form { margin-top: auto; }
.navlabel { font: 800 11px "Nunito", sans-serif; text-transform: uppercase; letter-spacing: .09em; color: #7F9484; padding: 14px 12px 4px; }
.side { overflow-y: auto; }
.side button { background: none; border: 0; color: #A9B8AC; font: inherit; padding: 11px 12px; cursor: pointer; }
.main { padding: 34px 40px 60px; max-width: 1180px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

/* blocks */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 30px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-soft); font-size: 14px; }
.stat.gold { background: var(--ink); color: #F4EFE0; border-color: var(--ink); }
.stat.gold span { color: #C8D3C5; }
.stat.gold b { color: #E9C963; }

.chip { display: inline-block; padding: 3px 10px; border-radius: var(--r-chip); font-size: 13px; font-weight: 700; background: var(--sage-pale); color: var(--night-2); white-space: nowrap; }
.chip.klient { background: var(--sage); }
.chip.oczekuje { background: var(--sand); color: var(--bronze); }
.chip.zgloszenie { background: #ECEEEA; color: var(--ink-soft); }
.chip.off { background: #ECEEEA; color: var(--ink-soft); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 0 12px 10px; font-weight: 700; }
td { padding: 13px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--sage-pale); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td a.name { font-weight: 700; color: var(--ink); text-decoration: none; }

/* forms */
label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #C9D2C5; border-radius: var(--r-btn); padding: 11px 13px; min-height: 46px; }
textarea { min-height: 92px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: var(--r-btn); border: 0; background: var(--night-2); color: #fff; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ink); }
.btn.ghost { background: transparent; color: var(--night-2); border: 1.5px solid var(--night-2); }
.btn.ghost:hover { background: var(--sage-pale); }
.link-danger { background: none; border: 0; color: var(--danger); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 0; text-decoration: underline; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fields .wide { grid-column: 1 / -1; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters input { flex: 1 1 260px; }
.filters select { flex: 0 0 180px; }
.seg { display: inline-flex; background: var(--sage-pale); border-radius: var(--r-btn); padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 8px 14px; border-radius: 7px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-soft); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15,36,25,.12); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); }
.error { background: #FBEAEA; color: var(--danger); border-radius: var(--r-btn); padding: 11px 14px; margin-bottom: 16px; font-weight: 600; }
details > summary { cursor: pointer; font-weight: 700; color: var(--night-2); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary { display: flex; align-items: center; min-height: 44px; }                 /* pole dotyku jak przyciski (zlecenie 13) */
details[open] > summary { margin-bottom: 16px; }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--line); margin-left: 6px; }
.tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tl li.payment::before { background: var(--gold); }
.tl li.note::before, .tl li.call::before { background: var(--night-2); }
.tl .top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tl .kind { font-weight: 800; font-family: "Nunito", sans-serif; }
.tl .when { color: var(--ink-soft); font-size: 13px; }
.tl p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.kv dt { color: var(--ink-soft); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.empty { color: var(--ink-soft); padding: 26px 0; text-align: center; }
.stack > * + * { margin-top: 18px; }
.bar { height: 8px; border-radius: 4px; background: var(--sage-pale); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--night-2); border-radius: 4px; }

.week { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.week a { display: block; text-decoration: none; color: inherit; background: var(--sage-pale); border-radius: 14px; padding: 14px 16px; }
.week a:hover { background: var(--sage); }
.week b { display: block; font: 800 26px/1.15 "Nunito", sans-serif; font-variant-numeric: tabular-nums; }
.week span { font-size: 14px; color: var(--ink-soft); }
a.card.stat:hover { border-color: var(--night-2); }

.nabor-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 10px 20px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.nabor-row:first-child { border-top: 0; padding-top: 0; }
.nabor-row .name { font-weight: 700; color: var(--ink); text-decoration: none; }
.nabor-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

.calc { display: grid; gap: 0; max-width: 560px; }
.calc > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.calc > div:first-child { border-top: 0; }
.calc b { font-variant-numeric: tabular-nums; white-space: nowrap; font-family: "Nunito Sans", sans-serif; font-weight: 700; }
.calc .sum { border-top: 2px solid var(--ink); font-size: 18px; }
.calc .sum b { font: 800 20px "Nunito", sans-serif; }
.addperson { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; }
details.rowd { border-top: 1px solid var(--line); padding: 14px 0; }
details.rowd:first-child { border-top: 0; padding-top: 0; }
details.rowd:last-child { padding-bottom: 0; }
details.rowd > summary { color: var(--ink); font-weight: 400; }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 140px; }
.spark > div { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.spark i { display: block; width: 100%; background: var(--night-2); border-radius: 3px 3px 0 0; }
.spark > div:hover i { background: var(--gold); }

.npstate { margin-top: 6px; display: grid; gap: 3px; }
.npstate .chip { justify-self: start; }

/* week calendar */
.cal { display: grid; grid-template-columns: 46px repeat(var(--days, 6), minmax(0, 1fr)); gap: 0; }
.calhead { height: 34px; font: 800 13px "Nunito", sans-serif; padding: 0 6px; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.calhead .muted { font: 400 13px "Nunito Sans", sans-serif; }
.calbody { position: relative; height: 676px; border-left: 1px solid var(--line); background: #fff; }
.calhours .calbody { border-left: 0; background: none; }
.calhours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.calhours span:first-child { transform: none; }
.calline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.calday.today .calbody { background: var(--sage-pale); }
.calday.today .calhead { color: var(--night-2); }
.calnote { position: absolute; inset: 12px 6px auto; font-size: 12px; color: var(--ink-soft); text-align: center; }
.calev { position: absolute; box-sizing: border-box; border: 1px solid #fff; border-radius: 6px; padding: 2px 4px; color: #fff; font-size: 11px; line-height: 1.25; overflow: hidden; cursor: default; }
.calev b, .calev span, .calev em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.calev em { opacity: .85; }
.calev:hover, .calev:focus { z-index: 5; width: max-content !important; max-width: 260px; min-width: 100%; height: auto !important; min-height: 44px; box-shadow: 0 6px 18px rgba(15,36,25,.25); outline: 0; }
.calev:hover span, .calev:focus span, .calev:hover em, .calev:focus em { white-space: normal; }
.lane0 { background: #194730; } .lane1 { background: #8A6A12; } .lane2 { background: #2F6482; } .lane3 { background: #9A4A22; }
.laneblock { background: repeating-linear-gradient(45deg, #F4E5C5, #F4E5C5 6px, #EBD7A8 6px, #EBD7A8 12px); color: var(--ink) !important; }
.callegend { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.callegend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.caldays { display: none; }

/* dashboard: visits of the week (hour grid on desktop, day list on phones) */
.aghead { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.wknav { display: flex; border: 1px solid #C9D2C5; border-radius: var(--r-btn); overflow: hidden; }
.wknav a { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 42px; padding: 0 14px; text-decoration: none; color: var(--ink); font: 800 15px "Nunito", sans-serif; border-left: 1px solid #C9D2C5; }
.wknav a:first-child { border-left: 0; }
.wknav a:hover { background: var(--sage-pale); }
.wknav a.on { color: var(--ink-soft); }
.sp0 { --c: #194730; } .sp1 { --c: #2F6482; } .sp2 { --c: #9A4A22; } .sp3 { --c: #6B4A7A; } .sp4 { --c: #8A6A12; } .sp5 { --c: #3F6F78; } .spg { --c: #B69026; }
.callegend i[class^="sp"] { background: var(--c); }
.wk .calhead { border-bottom: 1px solid var(--line); }
.wk .calday.today .calhead { color: var(--night-2); box-shadow: inset 0 -3px 0 var(--night-2); }
.wk .calday.today .calbody { background: #F7FAF5; }
.wk .calday:last-child .calbody { border-right: 1px solid var(--line); }
.wk .calbody { border-bottom: 1px solid var(--line); }
.wknow { position: absolute; left: 0; right: 0; border-top: 2px solid var(--danger); z-index: 3; }
.wknow::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.wkev { position: absolute; box-sizing: border-box; display: block; padding: 4px 7px 4px 9px; border-radius: 8px; border: 1px solid #fff; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--ink); text-decoration: none; font-size: 12px; line-height: 1.3; overflow: hidden; z-index: 1; }
.wkev b, .wkev strong, .wkev span, .wkev em { display: block; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkev b { color: var(--c); font-variant-numeric: tabular-nums; }
.wkev strong { font-size: 13px; }
.wkev span, .wkev em { color: var(--ink-soft); }
.wkev:hover, .wkev:focus-visible { z-index: 5; height: auto !important; min-height: 44px; min-width: 100%; width: max-content !important; max-width: 280px; box-shadow: 0 8px 22px rgba(15,36,25,.22); }
.wkev:hover span, .wkev:hover strong, .wkev:focus-visible span, .wkev:focus-visible strong { white-space: normal; }
.wkev.past { opacity: .6; }
.wkev.past:hover { opacity: 1; }
.wkev.off { background: #fff; border: 1px dashed #B9C2B6; border-left: 4px solid #B9C2B6; }
.wkev.off strong, .wkev.off span { text-decoration: line-through; }
.wkev.off b { color: var(--danger); }
.agenda { display: none; }
.agday { padding: 4px 0 10px; border-top: 1px solid var(--line); }
.agday:first-child { border-top: 0; }
.agday.today .agname { color: var(--night-2); }
.agday.today .agname::after { content: " · dziś"; font: 400 13px "Nunito Sans", sans-serif; }
.agname { font: 800 15px "Nunito", sans-serif; padding: 10px 0 2px; }
.agname span { font: 400 13px "Nunito Sans", sans-serif; color: var(--ink-soft); }
.agev { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 10px; align-items: start; margin-top: 6px; padding: 9px 10px 9px 12px; border-radius: 10px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); text-decoration: none; color: var(--ink); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.agev b { color: var(--c); font-variant-numeric: tabular-nums; }
.agev strong, .agev span { display: block; }
.agev span { color: var(--ink-soft); font-size: 13px; }
.agev.past { opacity: .62; }
.agev.off { background: none; border: 1px dashed #B9C2B6; border-left: 4px solid #B9C2B6; }
.agev.off strong, .agev.off span { text-decoration: line-through; }
.agev.off b { color: var(--danger); }
.agnone { font-size: 13px; color: var(--ink-soft); padding: 4px 0; }

/* rooms */
.roomgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.roomname { font: 800 14px "Nunito", sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 8px; }
.slot { background: var(--sage-pale); border-left: 4px solid var(--night-2); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; font-size: 14px; overflow-wrap: anywhere; }
.slot b { font-variant-numeric: tabular-nums; }
.slot.block { background: var(--sand); border-left-color: var(--gold); }
.card.today { border-color: var(--night-2); box-shadow: 0 0 0 1px var(--night-2); }
input[type=date], input[type=time] { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #C9D2C5; border-radius: var(--r-btn); padding: 11px 13px; min-height: 46px; }

/* site posts */
.post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 14px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; padding-top: 0; }
.post:last-child { padding-bottom: 0; }
.post-head .name { font-weight: 700; color: var(--ink); text-decoration: none; display: block; margin-bottom: 6px; }
.post-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); }
.auth .card { width: 100%; max-width: 420px; border-radius: var(--r-block); padding: 30px; }
.auth .brand { color: var(--ink); padding: 0 0 6px; }
.auth form > * + * { margin-top: 14px; }
.auth .btn { width: 100%; }
.qr { display: flex; justify-content: center; margin: 14px 0 6px; }
.qr svg { max-width: 100%; height: auto; }
code { font-size: 14px; background: var(--sage-pale); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; overflow-x: auto; gap: 2px; }
  .brand { padding: 0 10px 0 4px; font-size: 18px; white-space: nowrap; }
  .side a { white-space: nowrap; padding: 10px 11px; min-height: 44px; display: flex; align-items: center; }
  .side a.on { box-shadow: inset 0 -3px 0 var(--gold); }
  .side form { margin: 0 0 0 auto; }
  .side button { min-height: 44px; white-space: nowrap; }
  .main { padding: 22px 16px 48px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 24px; }
  .stat b { font-size: 23px; white-space: nowrap; }
  .card { padding: 18px; }
  .hide-m { display: none; }
  .side { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
  .brand { flex-basis: 100%; padding: 4px 6px 6px; }
  .side a { padding: 8px 9px; font-size: 15px; }
  .side form { margin: 0; }
  .navlabel { display: none; }
  .side { overflow-y: visible; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .nabor-row { grid-template-columns: minmax(0, 1fr); }
  .roomgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal { grid-template-columns: 40px minmax(0, 1fr); }
  .calday { display: none; }
  .calday.sel { display: block; }
  .caldays { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
  .caldays a { padding: 9px 10px; min-height: 44px; display: flex; align-items: center; border-radius: var(--r-btn); background: var(--sage-pale); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
  .caldays a.on { background: var(--night-2); color: #fff; }
  .calev { font-size: 12px; }
  .calwrap { padding: 14px; }
  .addperson { grid-template-columns: minmax(0, 1fr); }
  .g2[style] { grid-template-columns: minmax(0, 1fr) !important; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-form { grid-template-columns: minmax(0, 1fr); }
  .wk.cal { display: none; }
  .agenda { display: block; }
  .agday.none:not(.today) { display: none; }
  .agev { grid-template-columns: minmax(0, 1fr); }
}

/* dashboard calendar: softer frame */
.wk.cal { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.wk .calhead { height: 42px; padding: 0 10px; background: #FAFBF9; font-size: 14px; }
.wk .calhours .calhead { border-bottom: 1px solid var(--line); }
.wk .calhours .calbody { background: #FAFBF9; }
.wk .calhours span { color: #7C8B7F; font-size: 11px; }
.wk .calline { border-top-color: #EEF1EC; }
.wk .calbody { border-bottom: 0; border-left-color: #EEF1EC; }
.wk .calday:last-child .calbody { border-right: 0; }
.wk .calday.today .calbody { background: #F4F8F1; }
.wkev { border-radius: 10px; border-width: 2px 2px 2px 4px; border-color: #fff #fff #fff var(--c); padding: 5px 8px 5px 9px; transition: box-shadow .12s; }
.wkev.off { border-color: #B9C2B6; border-width: 1px 1px 1px 4px; }
@media (max-width: 900px) { .wk.cal { display: none; } }

/* therapy aids catalogue */
.aidnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.aidnav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-btn); background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.aidnav a:hover { border-color: var(--night-2); }
.aidnav span { color: var(--ink-soft); font-weight: 400; }
.aidlist { list-style: none; margin: 0; padding: 0; columns: 3 240px; column-gap: 28px; }
.aidlist li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid #EEF1EC; font-size: 15px; }
.aidgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.aidcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aidimg { display: block; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.aidimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.aidnone { display: flex; align-items: center; justify-content: center; background: var(--sage-pale); color: var(--night-2); font: 800 34px "Nunito", sans-serif; }
.aidname { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 640px) { .aidgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* mail to an intake list */
.mailto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.mailto label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; min-height: 44px; }
.mailto label:has(input:checked) { border-color: var(--night-2); background: var(--sage-pale); }
.mailto input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.mailto span span { display: block; }
textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #C9D2C5; border-radius: var(--r-btn); padding: 11px 13px; line-height: 1.5; }

/* ---------- phone first: bottom tab bar instead of the side menu ---------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .side { display: none; }
  .main { padding: 18px 14px calc(92px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--ink); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(15,36,25,.18); }
  .tabbar > a, .tabbar summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
    color: #C8D3C5; text-decoration: none; font: 700 11px "Nunito Sans", sans-serif; border-radius: 12px; cursor: pointer; list-style: none; }
  .tabbar summary::-webkit-details-marker { display: none; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .on, .tabbar details[open] summary { color: #E9C963; background: rgba(255,255,255,.07); }
  .tabbar .sheet { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); max-height: 72vh; overflow-y: auto;
    background: var(--ink); border-radius: 22px 22px 0 0; padding: 10px 14px 18px; box-shadow: 0 -10px 30px rgba(15,36,25,.35); }
  .tabbar .sheet a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; color: #EEF3EB; text-decoration: none; font: 700 16px "Nunito Sans", sans-serif; border-radius: 10px; }
  .tabbar .sheet a.on { background: rgba(255,255,255,.08); color: #E9C963; }
  .tabbar .sheet .navlabel { display: block; padding: 12px 12px 4px; color: #8FA394; font: 800 11px "Nunito", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
  .tabbar .sheet button { min-height: 48px; padding: 0 12px; background: none; border: 0; color: #C8D3C5; font: 700 16px "Nunito Sans", sans-serif; }
  .head { margin-bottom: 14px; }
  .head h1 { font-size: 26px; }
  .head .muted { font-size: 14px; }
  .grid { gap: 10px; }
  .card { padding: 16px; border-radius: 16px; }
  .stat b { font-size: 24px; }
  .stat span { font-size: 13px; }
  .btn, select, input[type=text], input[type=search], input[type=email], input[type=password] { min-height: 46px; font-size: 16px; }
  .nabor-row { gap: 8px; padding: 14px 0; }
  .nabor-row > div[style*="text-align:right"], .nabor-row > form[style*="text-align:right"] { text-align: left !important; }
  .nabor-form { grid-template-columns: minmax(0, 1fr); }
  .link-danger { min-height: 40px; }
  .mailto { grid-template-columns: minmax(0, 1fr); }
  .aidlist { columns: 1; }
  .filters { width: 100%; }
  table { font-size: 14px; }
}

.only-m { display: none; }
.quick { display: none; }
.fun { padding: 8px 0; }
.funtop { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.funtop b { font: 800 20px "Nunito", sans-serif; }
@media (max-width: 900px) {
  .only-m { display: block; }
  .quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 90px), 1fr)); gap: 8px; margin-bottom: 14px; width: 100%; max-width: 100%; }
  .quick .btn { justify-content: center; text-align: center; min-width: 0; width: 100%; padding: 0 10px; }
  .agev { grid-template-columns: 52px minmax(0, 1fr); }
}

.agev .chip { display: inline-block; font-size: 12px; color: var(--bronze); margin-left: 4px; }

/* messages */
.msgrow { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.msgrow:first-of-type { border-top: 0; }
.msgrow span span { display: block; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; margin: 0 0 10px; background: var(--sage-pale); }
.bubble.out { margin-left: auto; background: #E7EEF3; }
.bubble.wait { background: var(--sand); }
.btext { white-space: pre-wrap; overflow-wrap: anywhere; }

.dot { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E9C963; color: var(--ink); font: 800 11px "Nunito", sans-serif; }
.tabbar > a { position: relative; }
.tabbar .dot { position: absolute; top: 4px; left: 54%; }

/* parent panel */
.ptop { display: flex; justify-content: space-between; align-items: center; background: var(--ink); padding: 10px 16px; }
.ptop .brand { color: #fff; text-decoration: none; padding: 0; font-size: 20px; }
.ptop button { background: none; border: 0; color: #C8D3C5; font: 700 15px "Nunito Sans", sans-serif; min-height: 44px; cursor: pointer; }
.pmain { max-width: 720px; margin: 0 auto; padding: 22px 16px 60px; }

/* Korzyści dla rodzin w panelu rodzica: kupony (wariant B, 2026-11-16) */
.coupon { position: relative; display: flex; background: var(--paper); border-radius: var(--r-card); margin: 0 0 14px; box-shadow: 0 6px 22px rgba(15, 36, 25, .08); overflow: hidden; border: 1px solid var(--line); }
.coupon .cl { width: 96px; flex: none; background: var(--sage-pale); display: flex; align-items: center; justify-content: center; padding: 10px; border-right: 2px dashed #C7D3C4; }
.coupon .cl img { max-width: 76px; max-height: 76px; object-fit: contain; }
.coupon:before, .coupon:after { content: ""; position: absolute; left: 84px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.coupon:before { top: -13px; } .coupon:after { bottom: -13px; }
.coupon .cr { padding: 16px 16px 16px 18px; flex: 1; min-width: 0; }
.coupon h3 { margin: 0; font-size: 19px; } .coupon .ck { font-size: 13px; color: var(--ink-soft); margin: 0 0 6px; }
.coupon .cbig { font: 800 32px/1.05 "Nunito", system-ui, sans-serif; color: var(--night-2); }
.coupon .cbig small { display: block; font: 600 14px/1.4 "Nunito Sans", system-ui, sans-serif; color: var(--ink-soft); margin-top: 3px; }
.coupon .ccode { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; background: var(--night-2); color: #FBFAF4; border-radius: 10px; padding: 6px 6px 6px 14px; }
.coupon .ccode code { font: 800 18px "Nunito", monospace; letter-spacing: .06em; background: transparent; color: #FBFAF4; padding: 0; }
.coupon .ccode .btn { background: #F4EFE0; color: var(--ink); min-height: 38px; padding: 0 14px; }
.coupon .chow { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.coupon .cgo { display: inline-block; margin-top: 10px; font: 800 14px "Nunito", system-ui, sans-serif; color: var(--night-2); }

/* kupon z logo „na ciemnym” (np. Balans): górny pas w kolorze marki, pełny napis */
.coupon.top { flex-direction: column; }
.coupon.top .cl { width: auto; height: 96px; border-right: 0; border-bottom: 2px dashed #C7D3C4; background: var(--ink); }
.coupon.top .cl img { max-width: 200px; max-height: 52px; }
.coupon.top:before, .coupon.top:after { left: auto; bottom: auto; top: 84px; }
.coupon.top:before { left: -13px; } .coupon.top:after { right: -13px; }

/* panel specjalisty (zlecenie 15): równe odstępy między kartami, przyciski w formularzach nie rozciągają się na cały komputer */
.staff > .card, .staff > section.card, .staff form > .card, .staff .stack > .card { margin-bottom: 14px; }
@media (min-width: 900px) { .staff form .btn, .staff form button.btn { max-width: 360px !important; } }

/* ---------- ekran główny specjalisty, makieta C „Kafle-przełączniki” (zlecenie 21) ---------- */
.hc-wrap { max-width: 1100px; }
.hc-hello { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 2px 10px; }
.hc-hello h1 { margin: 0; font-size: 22px; }
.hc-hello span { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.hc-flash { margin-bottom: 10px; padding: 10px 14px; font-weight: 700; background: var(--sage-pale); border-color: var(--sage); }
.hc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.hc-tile { display: block; text-align: left; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 7px; min-height: 52px; }
.hc-tile b { display: block; font: 800 21px "Nunito", sans-serif; line-height: 1.1; }
.hc-tile span { display: block; font-size: 11px; color: var(--ink-soft); line-height: 1.2; }
.hc-tile.on { background: var(--night-2); border-color: var(--night-2); }
.hc-tile.on b { color: #E9C963; }
.hc-tile.on span { color: #D6E2D0; }
.hc-tile.warn { background: var(--sand); border-color: var(--gold); }
.hc-tile.warn.on { background: var(--night-2); border-color: var(--night-2); }
.hc-grid { display: block; }
.hc-panel { margin: 0; }
.js .hc-panel { display: none; }
.js .hc-panel.on { display: block; }
.hc-card { padding: 12px; margin-bottom: 10px; }
.hc-card.today { border-color: var(--night-2); }
.hc-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 2px; }
.hc-sec h2 { margin: 0; font-size: 17px; }
.hc-sec a { font-size: 13px; color: var(--night-2); font-weight: 700; text-decoration: none; }
.hc-none, .hc-emptyline { color: var(--ink-soft); font-size: 14px; padding: 8px 0; }
.hc-emptyline { padding: 2px 4px 10px; }
.hc-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 0 8px; align-items: center; min-height: 48px; padding: 5px 0; border-top: 1px solid var(--line); }
.hc-sec + .hc-row, .hc-sec + .hc-det > .hc-row { border-top: 0; }
.hc-det > summary.hc-row { cursor: pointer; list-style: none; }
.hc-det > summary.hc-row::-webkit-details-marker { display: none; }
.hc-det + .hc-row, .hc-det + .hc-det > .hc-row, .hc-row + .hc-det > .hc-row { border-top: 1px solid var(--line); }
.hc-det { border-top: 0; }
.hc-det > .hc-more { padding: 0 0 10px; }
.hc-det[open] > summary .hc-ic { background: var(--sage); }
.hc-t { font: 800 15px "Nunito", sans-serif; color: var(--night-2); font-variant-numeric: tabular-nums; }
.hc-b { min-width: 0; display: block; }
.hc-n { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.hc-n a { color: var(--ink); text-decoration: none; }
.hc-n .chip { margin-left: 4px; font-size: 11px; }
.hc-s { display: block; color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: #5E6B60; }
.hc-dot[data-sala="chmura"] { background: #2F6482; } .hc-dot[data-sala="mech"] { background: #194730; }
.hc-dot[data-sala="kropla"] { background: #3F6F78; } .hc-dot[data-sala="bursztyn"] { background: #8A6A12; }
.hc-i { display: flex; gap: 4px; }
.hc-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--night-2); text-decoration: none; }
.hc-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hc-row.past, .hc-det.past { opacity: .6; }
.hc-row.off .hc-t, .hc-row.off .hc-n a, .hc-row.off .hc-n, .hc-det.off .hc-t, .hc-det.off .hc-n a { text-decoration: line-through; }
.hc-more form { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.hc-more .btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.hc-wknav { margin: 8px 0 2px; }
.hc-todo-r { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); }
.hc-todo-r .btn { min-height: 44px; padding: 0 16px; }
.hc-todocard { border-color: var(--gold); background: var(--sand); }
.hc-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.hc-nums-rest { display: contents; }
.hc-num { display: block; min-width: 0; color: inherit; text-decoration: none; }
.hc-num b { display: block; font: 800 19px "Nunito", sans-serif; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-num span { display: block; color: var(--ink-soft); font-size: 11.5px; line-height: 1.25; }
a.hc-num b { text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 3px; }
.hc-morenums { grid-column: 1 / -1; }
.hc-morenums > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--night-2); min-height: 36px; display: flex; align-items: center; }
.hc-nums-in { margin-top: 4px; }
.hc-numinfo { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.tabbar > a.on { background: transparent; }
@media (min-width: 1000px) {
  .hc-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 0 14px; align-items: start; }
  .js .hc-panel.hc-todo { display: block; }
  .hc-tile[data-tab="todo"] { cursor: default; }
  .hc-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hc-morenums[open] > summary { margin-bottom: 4px; }
}
@media (max-width: 640px) {
  .main { padding-left: 10px; padding-right: 10px; padding-top: 12px; }
  .staff .card { padding: 12px; }
  .staff > .card, .staff > section.card, .staff form > .card { margin-bottom: 10px; }
  .staff .stack > * + * { margin-top: 10px; }
  .staff h1 { font-size: 22px; }
  .head { margin-bottom: 10px; }
}

/* ---------- komputer ≥1000 px: menu boczne z ikonami, Pulpit z podglądem wizyty (zlecenie 22) ---------- */
.hc-num-tile, .hc-prev, .hc-bars, .hc-restline, .hc-btns { display: none; }
.hc-restline { color: var(--ink-soft); font-size: 13px; padding: 0 4px 10px; }
.hc-restline a { color: var(--night-2); font-weight: 700; text-decoration: none; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
@media (min-width: 1000px) {
  .shell-staff { grid-template-columns: 216px minmax(0, 1fr); }
  .side-staff { padding: 22px 12px; gap: 2px; }
  .side-staff .brand { font-size: 19px; padding: 0 10px 16px; }
  .side-staff a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; font-size: 14.5px; }
  .side-staff svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .side-staff .sep { height: 1px; background: rgba(255,255,255,.1); margin: 8px 6px; }
  .side-staff .dot { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #fff; font: 800 10.5px "Nunito", sans-serif; margin-left: auto; }
  .side-staff .foot { margin-top: auto; padding: 0 10px; font-size: 12px; color: #8FA394; display: flex; flex-direction: column; gap: 3px; }
  .side-staff .foot b { color: #DCE5D8; font-size: 13px; }
  .side-staff .foot form { margin: 4px 0 0; }
  .side-staff .foot button { padding: 4px 0; color: #A9B8AC; min-height: 0; }
  .side-staff .foot a.old { padding: 6px 0 0; font-size: 11.5px; font-weight: 400; color: #6F8575; min-height: 0; }
  .main.staff { padding: 20px 26px 40px; max-width: 1180px; }
  .hc-hello h1, .staff .head h1 { font-size: 23px; }
  .hc-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .hc-num-tile { display: block; border-style: dashed; background: transparent; cursor: default; }
  a.hc-num-tile { cursor: pointer; }
  .hc-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 14px; }
  .hc-card { padding: 16px; margin-bottom: 14px; }
  .hc-btns { display: flex; gap: 6px; }
  .hc-i .hc-ic { display: none; }
  .hc-row { grid-template-columns: 56px minmax(0, 1fr) auto; min-height: 56px; cursor: default; }
  .hc-row.sel, .hc-det > summary.hc-row.sel { background: var(--sage-pale); border-radius: 10px; }
  .hc-prev:not([hidden]) { display: block; }
  .hc-bars, .hc-restline { display: block; }
  .hc-dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 10px; margin: 10px 0; font-size: 14px; }
  .hc-dl dt { color: var(--ink-soft); } .hc-dl dd { margin: 0; font-weight: 600; }
  .hc-prev-btns { display: flex; gap: 6px; flex-wrap: wrap; }
  .hc-wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 96px; }
  .hc-wkb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; border: 0; background: none; font: inherit; font-size: 11px; color: var(--ink-soft); height: 100%; cursor: pointer; padding: 0; }
  .hc-wkb i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--sage); min-height: 4px; }
  .hc-wkb.today i { background: var(--night-2); }
  .hc-wkb em { font-style: normal; font-weight: 800; color: var(--ink); font-size: 12px; min-height: 14px; }
  .hc-card.flash { box-shadow: 0 0 0 2px var(--gold); }
  .hc-todo-r .btn, .hc-more .btn { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .tabbar { display: none; }
}

/* ---------- wiadomości: trzy kolumny na komputerze (zlecenie 22) ---------- */
.msgl { display: none; }
.msgs3 { display: flex; flex-direction: column; }
.msgx { order: -1; }
.tpl { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tpl a { padding: 4px 9px; border-radius: 8px; background: var(--sage-pale); color: var(--night-2); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.msg-count { display: none; }
@media (min-width: 1000px) {
  .msgs3 { display: grid; grid-template-columns: 300px minmax(0, 1fr) 270px; gap: 14px; align-items: start; height: calc(100vh - 150px); min-height: 420px; }
  .msgs3 > * { min-height: 0; margin: 0 !important; max-height: 100%; }
  .msgl { display: block; overflow-y: auto; padding: 8px; }
  .msgl .it { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px; border-radius: 10px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
  .msgl .it:first-child { border-top: 0; }
  .msgl .it.on { background: var(--sage-pale); }
  .msgl .it time { font-size: 12px; color: var(--ink-soft); }
  .msgl .it p { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .msgl .it.un b::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-left: 6px; }
  .msgx { order: 0; overflow-y: auto; }
  .msgc { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
  .msgb { flex: 1; overflow-y: auto; }
  .bubble { max-width: 74%; }
  .bubble.out { background: var(--night-2); color: #fff; }
  .bubble.out .muted { color: rgba(255,255,255,.75); }
  .bubble.out.wait { background: var(--sand); color: var(--ink); border: 1px dashed var(--gold); }
  .bubble.out.wait .muted { color: var(--ink-soft); }
  .msg-count { display: block; text-align: right; margin: -2px 0 6px; }
  .msgc textarea { min-height: 54px; }
}

/* ---------- kalendarz: kolumna boczna i miesiąc (zlecenie 22) ---------- */
.calside { display: none; }
.mini { width: 100%; border-collapse: collapse; text-align: center; font-size: 13px; margin: 6px 0; }
.mini th { color: var(--ink-soft); font-weight: 700; font-size: 11px; padding: 2px 0; }
.mini td { padding: 1px; }
.mini td a, .mini td span { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 30px; border-radius: 8px; color: var(--ink); text-decoration: none; position: relative; }
.mini td.o a, .mini td.o span { color: #9AA79C; }
.mini td.in a, .mini td.in span { background: var(--sage-pale); }
.mini td.today a, .mini td.today span { background: var(--night-2); color: #fff; }
.mini i { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.calsc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mgrid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mgrid th { font-size: 12px; color: var(--ink-soft); padding: 4px; text-align: left; }
.mgrid td { border: 1px solid var(--line); vertical-align: top; height: 84px; padding: 0; }
.mgrid td a { display: block; height: 100%; padding: 6px; color: var(--ink); text-decoration: none; }
.mgrid td.o { background: #F7F8F6; color: #9AA79C; }
.mgrid td.today b { display: inline-block; min-width: 24px; text-align: center; border-radius: 12px; background: var(--night-2); color: #fff; }
@media (max-width: 640px) { .mgrid td { height: 58px; } .mgrid td .chip { font-size: 10px; padding: 1px 4px; } }
@media (min-width: 1000px) {
  .calwrap { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 14px; align-items: start; }
  .calside { display: flex; flex-direction: column; gap: 12px; }
  .calside .card { padding: 14px; }
  .tplmode .calside { display: none; }
  .tplmode .calwrap { display: block; }
  .cal-links { display: none; }
}

/* ---------- zlecenie 22b: poprawki komputera ---------- */
.only-desk { display: none; }
.pt-wrap { display: contents; }
.msg-actions { display: none; }
.cal-legend.lg-side { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 0; }
@media (min-width: 1000px) {
  .only-desk { display: inline-flex; }
  .no-desk { display: none !important; }
  .cal-root { position: relative; }
  .cal-root > .head .muted.only-view { display: none; }
  .pt-wrap { display: flex; position: absolute; top: 2px; right: 0; gap: 10px; align-items: center; z-index: 2; }
  .pt-wrap .cal-nav button { width: 32px; height: 32px; font-size: 16px; }
  .pt-wrap .seg2 button, .pt-wrap .seg-a { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .seg-a { align-items: center; color: var(--ink); text-decoration: none; font: 700 13px 'Nunito Sans', sans-serif; border-left: 1px solid var(--line); }
  .calmain .cal-legend { display: none; }
  #cal .sch-cell, #cal .cal-axis div { height: var(--rowpx, 56px) !important; }
  .msg-actions { display: flex; gap: 8px; align-items: center; }
  .msg-act { display: flex; gap: 6px; margin: 0; }
  .msg-act select { min-height: 32px; border-radius: 10px; border: 1px solid var(--line); padding: 0 8px; background: #fff; font: inherit; font-size: 13px; max-width: 190px; }
  .calside .hc-prev:not([hidden]) { display: block; }
}
@media (min-width: 1000px) {
  .win-nav { display: none !important; }
  .cal-root .cal-links { display: none !important; }
  .calside .cal-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none; }
  .calside .cal-legend span { display: inline-flex; gap: 6px; align-items: center; }
}
@media (min-width: 1000px) {
  .msgs3 > .msgl { grid-column: 1; grid-row: 1; }
  .msgs3 > .msgc { grid-column: 2; grid-row: 1; }
  .msgs3 > .msgx { grid-column: 3; grid-row: 1; }
}

/* ---------- zniżki (zlecenie 24): zwykła tabela i karty jak w Rozliczeniu ---------- */
.zn-wrap { display: flex; flex-direction: column; gap: 14px; }
.zn-side { display: flex; flex-direction: column; gap: 14px; }
.zn { width: 100%; border-collapse: collapse; }
.zn th { text-align: left; font-size: 12px; color: var(--ink-soft); font-weight: 700; padding: 4px 8px 8px; }
.zn td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.zn tr.zn-row { cursor: pointer; }
.zn tr.zn-row.sel td { background: var(--sage-pale); }
.zn-logo span { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.zn-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.zn code { background: #F1F3EF; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 13px; }
.zn-act { text-align: right; white-space: nowrap; }
.zn-msg { background: #F7F8F6; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-line; }
.zn-detail { display: none; }
.zn-msgcard { display: none; }
@media (max-width: 999px) {
  .zn thead { display: none; }
  .zn, .zn tbody, .zn tr, .zn td { display: block; }
  /* telefon (poprawka 17.11): jedna kolumna treści obok logo — nazwa, potem zniżka, kod, przycisk; wcześniej zniżka z długim opisem
     zabierała całą szerokość i nazwa partnera łamała się słowo po słowie */
  .zn tr.zn-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .zn tr.zn-row:first-child { border-top: 0; }
  .zn td { border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  .zn tr.zn-row.sel td { background: transparent; }
  .zn-logo { grid-column: 1; grid-row: 1 / span 3; }
  .zn td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .zn td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .zn td:nth-child(3) b { font-size: 17px; }
  .zn td:nth-child(4) { grid-column: 2; grid-row: 3; }
  .zn-act { grid-column: 1 / -1; grid-row: 4; text-align: left; white-space: normal; margin-top: 6px; }
  .zn-act .btn { min-height: 44px; width: 100%; }
  .zn-how { margin-top: 2px; }
}
@media (min-width: 1000px) {
  .zn-wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  .zn-detail, .zn-msgcard { display: block; }
  .zn-how { display: none; }
}
.zn-logo span.dark { background: var(--ink); }
.zn code { white-space: nowrap; }
@media (min-width: 1000px) {
  .zn { table-layout: auto; }
  .zn th:nth-child(1), .zn td:nth-child(1) { width: 52px; }
  .zn th:nth-child(4), .zn td:nth-child(4) { width: 150px; white-space: nowrap; }
  .zn th:nth-child(5), .zn td:nth-child(5) { width: 1%; white-space: nowrap; }
}
.zn td .muted { white-space: normal; }
.zn td:nth-child(4) .muted { white-space: nowrap; }
.zn-detail code { background: #F1F3EF; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 13px; white-space: nowrap; }

/* ---------- karta rodziny (zlecenie 23A) ---------- */
.fc-head { display: flex; flex-direction: column; gap: 10px; }
.fc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-grid { display: flex; flex-direction: column; gap: 14px; }
.fc-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.fc-row:first-of-type { border-top: 0; }
.fc-row.sel { background: var(--sage-pale); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.fc-state { display: flex; gap: 6px; flex-wrap: wrap; }
.fc-act { grid-column: 2; grid-row: 1; }
.fc-mark { grid-column: 1 / -1; display: none; }
.fc-mark:target { display: block; }
.fc-mark form { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-older summary { cursor: pointer; padding: 10px 0; color: var(--night-2); font-weight: 700; }
.fc-h { margin: 0 0 10px; font-size: 18px; }
.fc-right { display: flex; flex-direction: column; gap: 14px; }
.fc-change .grid.g2 { grid-template-columns: 1fr; }
@media (min-width: 1000px) {
  .fc-head { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .fc-note { display: none; }
  .fc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  .fc-row { grid-template-columns: 150px minmax(0, 1fr) auto 90px; }
  .fc-act { grid-column: 4; grid-row: 1; text-align: right; }
  .fc-mark { grid-column: 1 / -1; }
  .fc-mark:not(:target) { display: none; }
}
.fc-row.sep { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 14px; }

/* ---------- zapis godzin: karta po prawej, siatka w oknie (zlecenie 22c) ---------- */
.csv-tpl, .csv-n { display: none; }
@media (min-width: 1000px) {
  .calsave { position: sticky; top: 16px; z-index: 6; display: none; flex-direction: column; gap: 8px; }
  .calsave .csv-view { display: none; flex-direction: column; gap: 8px; }
  .editing .calsave .csv-view { display: flex; }
  .editing .calsave .csv-n { display: block; }
  .calsave .csv-row { display: flex; gap: 6px; flex-wrap: wrap; }
  .calsave .btn[disabled] { background: #C9D2C5; color: #fff; cursor: default; }
  .calsave.tpl .csv-view { display: none !important; }
  .calsave.tpl .csv-tpl { display: flex; flex-direction: column; gap: 8px; }
  .calsave.tpl .csv-n { display: block; }
  .editing .calsave, .tplmode .calsave { display: flex; }
  .sch-below, .sch-save { display: none !important; }
  .tplmode .calside { display: flex !important; }
  .tplmode .calside > :not(.calsave):not(.calextra), .editing.e2 .calside > :not(.calsave):not(.calextra) { display: none; }
  .tplmode .calwrap { display: grid !important; }
  .tplmode .calmain #sch { display: none !important; }
}
@media (max-width: 999px) {
  .editing.dirty #sch .sch-save { position: sticky; bottom: 70px; z-index: 6; box-shadow: 0 -6px 20px rgba(15,36,25,.18); }
}

@media (min-width: 1000px) {
  #tplcal .sch-cell, #tplcal .cal-axis div { height: var(--rowpx, 56px) !important; }
  .main.staff { padding-bottom: 12px; }
  .mini td a, .mini td span { height: 26px; }
  .calside { gap: 10px; }
  .calside .cal-legend.lg-side { flex-wrap: nowrap; gap: 8px; font-size: 11px; }
}
@media (min-width: 1000px) and (max-height: 800px) {
  .cal-sentence { display: none; }
  .mini td a, .mini td span { height: 22px; font-size: 12px; }
  .calside .card { padding: 10px 12px; }
}

.calextra { display: none; }
@media (min-width: 1000px) {
  .editing.e2 .calextra, .tplmode .calextra { display: flex; flex-direction: column; gap: 10px; }
  .calextra .card { margin: 0 !important; }
  .cal-root > .head .muted { display: none; }
}

@media (min-width: 1000px) {
  .calside { overflow-y: auto; scrollbar-width: thin; }
  .calsave { top: 0; }
  #jak .small.muted { display: none; }
}
@media (min-width: 1000px) and (max-height: 800px) {
  .calsc { grid-template-columns: repeat(4, auto); }
  .calsc .btn { padding: 0 6px; font-size: 12px; }
}
@media (min-width: 1000px) {
  .cal-root > .head .muted { display: none !important; }
  #tpl-settings > div[style*="display:flex"] { display: none; }
  .calside .cal-legend.lg-side { flex-wrap: wrap; }
}
@media (min-width: 1000px) and (max-width: 1399px) {
  .cal-tools .seg2.tabs { left: 124px; }
  .cal-tools .seg2.tabs button { padding: 0 9px; font-size: 12.5px; }
  .pt-wrap { gap: 8px; }
  .pt-wrap .cal-nav b { min-width: 92px; font-size: 14px; }
  .pt-wrap .seg2 button, .pt-wrap .seg-a { padding: 0 9px; font-size: 12.5px; }
}
@media (min-width: 1000px) and (max-width: 1249px) {
  .cal-tools .seg2.tabs { position: static; margin: 0 0 8px; }
}

/* ---------- pacjenci (zlecenie 26 A) ---------- */
.pt-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.pt-bar input[type=search] { flex: 1 1 240px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); padding: 0 12px; font: inherit; background: #fff; }
.pt-bar .seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pt-bar .seg2 button { border: 0; background: none; padding: 0 16px; font: 700 14px 'Nunito Sans', sans-serif; cursor: pointer; min-height: 44px; color: var(--ink); }
.pt-bar .seg2 button.on { background: var(--night-2); color: #fff; }
.pt { width: 100%; border-collapse: collapse; }
.pt th { text-align: left; font-size: 12px; color: var(--ink-soft); font-weight: 700; padding: 4px 8px 8px; }
.pt td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.pt tbody tr { cursor: pointer; }
.pt tbody tr:hover td { background: var(--sage-pale); }
.pt a { color: var(--ink); text-decoration: none; }
.pt-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pt-go { text-align: right; }
@media (max-width: 999px) {
  .pt thead { display: none; }
  .pt, .pt tbody, .pt tr, .pt td { display: block; }
  .pt tr { padding: 10px 0; border-top: 1px solid var(--line); }
  .pt tr:first-child { border-top: 0; }
  .pt td { border: 0; padding: 2px 0; }
  .pt td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-soft); font-size: 13px; }
  .pt-go { text-align: left; margin-top: 6px; }
  .pt-go .btn { min-height: 44px; }
}

/* ---------- Wiadomości jak komunikator (zlecenie 29/8) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat { display: grid; grid-template-columns: 1fr; gap: 14px; }
.chat-list, .chat-main, .chat-ctx { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; min-height: 0; }
.chat-head h1 { font-size: 22px; padding: 14px 14px 6px; margin: 0; }
.chat-find { margin: 6px 12px 8px; width: calc(100% - 24px); min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; }
.chat-items { overflow-y: auto; padding: 0 6px 10px; }
.chat-sep { font-size: 12px; font-weight: 700; color: var(--ink-soft); padding: 12px 10px 4px; }
.chat-items .it { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.chat-items .it.on { background: var(--sage-pale); }
.chat-items .it:hover { background: var(--sage-pale); }
.chat-items .ini { width: 38px; height: 38px; border-radius: 50%; background: var(--sage-pale); display: flex; align-items: center; justify-content: center; font: 800 13px Nunito, sans-serif; color: var(--night-2); }
.chat-items .it.on .ini { background: var(--sage); }
.chat-items .who { display: flex; flex-direction: column; min-width: 0; }
.chat-items .who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-items .it.un .who b { font-weight: 800; }
.chat-items .it.un::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); grid-column: 3; grid-row: 1; justify-self: end; }
.chat-items .it.un time { display: none; }
.chat-items .pv { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-items time { font-size: 12px; color: var(--ink-soft); }
.chat-main { display: flex; flex-direction: column; overflow: hidden; }
/* profil: edycja i akceptacja (zlecenie 18) */
.pf-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.pf-top img { width: 96px; height: 128px; object-fit: cover; border-radius: 14px; background: var(--sage-pale); flex: none; }
.pf-wait { background: var(--sand); border: 1px solid var(--gold); border-radius: 10px; padding: 12px 14px; }
.pf-diff { margin-top: 10px; }
.pf-new > div, .pf-old > div, .pf-diff .pf-new { white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-req { padding: 12px 0; border-top: 1px solid var(--line); }
.pf-req:first-of-type { border-top: 0; }
.pf-cmp { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.pf-cmp .pf-lab { grid-column: 1 / -1; font-weight: 700; }
.pf-old, .pf-cmp .pf-new { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.pf-old { color: var(--ink-soft); }
@media (min-width: 800px) { .pf-cmp { grid-template-columns: 1fr 1fr; } }
/* pulpit operatora: kafle i „Do Twojej decyzji” (zlecenie 23 D) */
.op-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.op-tiles .stat { text-decoration: none; color: inherit; padding: 14px 16px; }
.op-tiles .stat b { font-size: 26px; }
.op-tiles .stat.warn { background: var(--sand); border-color: var(--gold); }
.op-tiles .stat.gold { color: #F4EFE0; }
.op-decide { margin-bottom: 18px; border-color: var(--gold); }
.op-decide #profile-box-pulpit section, .op-decide #polecenia-box-pulpit > * { border: 0 !important; background: none !important; padding: 0 !important; margin: 0 !important; box-shadow: none; }
.op-decide #profile-box-pulpit h2 { font-size: 15px; margin: 10px 0 0; }
.op-decide .pf-req { border-top: 1px solid var(--line); }
.op-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.op-row > div { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.op-act { display: flex; gap: 8px; flex: none; }
.op-none { margin: 10px 0 0; }
@media (min-width: 700px) { .op-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .op-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* rozliczenie specjalisty (zlecenie 23 C) */
.pay-nav { display: flex; gap: 8px; align-items: center; }
.pay-nav select { min-height: 40px; }
.pay-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.pay-tiles .stat { padding: 14px 16px; }
.pay-tiles .stat b { font-size: 26px; }
.pay-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pay-row:first-of-type { border-top: 0; }
.pay-when { grid-column: 1; } .pay-sum { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
.pay-what { grid-column: 1 / -1; } .pay-state { grid-column: 1 / -1; }
.rf-row { flex-wrap: wrap; } .rf-row > div { flex: 1 1 160px; } .rf-row .chip { white-space: normal; max-width: 100%; }
.rf-top { display: flex; gap: 12px; align-items: flex-start; }
.rf-top img { border: 1px solid var(--line); border-radius: 10px; flex: none; }
.rf-top > div { flex: 1; min-width: 0; }
.rf-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
@media (min-width: 900px) {
  .pay-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pay-row { grid-template-columns: 110px minmax(0, 1fr) 170px 110px; align-items: center; }
  .pay-when, .pay-what, .pay-state, .pay-sum { grid-column: auto; grid-row: auto; }
}
/* pomoc: poradnik nowego panelu (zlecenie 25) */
.gd-find { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; background: #fff; margin-bottom: 14px; }
.gd-h { font-size: 17px; margin: 18px 0 10px; }
.gd > summary { cursor: pointer; }
.gd-body { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.gd-text { line-height: 1.6; min-width: 0; }
.gd-text ol { margin: 8px 0; padding-left: 20px; }
.gd-text li { margin-bottom: 6px; }
.gd-rule { background: var(--sand); border: 1px solid var(--gold); border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.gd-shot { align-self: center; flex: none; }
.gd-shot img { width: 240px; height: auto; border: 1px solid var(--line); border-radius: 18px; display: block; }
@media (min-width: 900px) { .gd-body { flex-direction: row; align-items: flex-start; } .gd-text { flex: 1; } .gd-shot { align-self: flex-start; } }
/* wypłaty: kwota i konto (17.11) */
.po-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.po-acc { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.po-acc code { font-size: 14px; background: var(--sage-pale); padding: 4px 8px; border-radius: 8px; }
.po-sum { text-align: right; white-space: nowrap; }
@media (min-width: 900px) { .po-row { grid-template-columns: 260px 130px 1fr; } .po-acc { grid-column: auto; } }
/* pierwsze kroki (zlecenie 25b) */
.pk-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.pk-row:first-of-type { border-top: 0; }
.pk-ic { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #C9D3C6; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.pk-row.ok .pk-ic { background: var(--night-2); border-color: var(--night-2); color: #fff; }
.pk-row.ok .pk-t { color: var(--ink-soft); text-decoration: line-through; }
.pk-t { flex: 1; min-width: 0; }
/* dokumenty (zlecenie 23 E) */
.dk-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dk-row:first-of-type { border-top: 0; }
.dk-row > div { min-width: 0; overflow-wrap: anywhere; }
.dk-row .btn { flex: none; }
/* ankiety (zlecenie 26 F) */
.sv-row { padding: 12px 0; border-top: 1px solid var(--line); }
.sv-row:first-of-type { border-top: 0; }
.sv-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.sv-odp { margin-top: 10px; padding: 12px 14px; background: var(--sage-pale); border-radius: 10px; }
.sv-odp p { margin: 0 0 10px; white-space: pre-wrap; }
.sv-odp p:last-child { margin-bottom: 0; }
.sv-odp b { display: block; font-size: 13px; color: var(--ink-soft); }
.chat-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chat-back { font-size: 26px; line-height: 1; text-decoration: none; color: var(--ink); padding: 0 8px; min-width: 40px; min-height: 40px; display: flex; align-items: center; }
.chat-link { font-size: 13px; font-weight: 700; color: var(--night-2); text-decoration: none; white-space: nowrap; }
.chat-note { padding: 8px 14px; background: var(--sand); font-weight: 700; font-size: 14px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.chat-empty { margin: auto; color: var(--ink-soft); text-align: center; padding: 20px; }
.cb-day { align-self: center; font-size: 12px; color: var(--ink-soft); margin: 8px 0 2px; }
.cb { max-width: 76%; padding: 8px 12px; border-radius: 14px; background: var(--sage-pale); align-self: flex-start; border-bottom-left-radius: 4px; }
.cb.me { align-self: flex-end; background: var(--night-2); color: #fff; border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
.cb.hold { background: var(--sand); color: var(--ink); border: 1px dashed var(--gold); }
.cb.err { border: 1.5px solid var(--danger); }
.cb-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.cb-m { font-size: 11.5px; opacity: .75; margin-top: 3px; }
.cb-retry { border: 0; background: none; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; padding: 0 0 0 6px; }
.chat-compose { border-top: 1px solid var(--line); padding: 10px 12px 8px; background: var(--paper); }
.cc-row { display: flex; align-items: flex-end; gap: 8px; }
.cc-row textarea { flex: 1; min-height: 40px; max-height: 126px; resize: none; border: 1px solid #C9D2C5; border-radius: 12px; padding: 9px 12px; font: inherit; line-height: 22px; }
.cc-plus { position: relative; }
.cc-plusbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #C9D2C5; background: #fff; font-size: 22px; cursor: pointer; color: var(--night-2); }
.cc-menu { position: absolute; bottom: 46px; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(15,36,25,.18); padding: 6px; display: flex; flex-direction: column; min-width: 230px; z-index: 5; }
.cc-menu button { text-align: left; background: none; border: 0; padding: 10px; border-radius: 8px; font: inherit; cursor: pointer; }
.cc-menu button:hover { background: var(--sage-pale); }
.cc-n { font-size: 12px; color: var(--ink-soft); align-self: center; }
.cc-row .btn { min-height: 40px; }
.cc-hint { margin: 6px 2px 0; }
.chat-ctx { display: none; padding: 14px; overflow-y: auto; }
/* telefon: lista albo rozmowa na cały ekran */
@media (max-width: 999px) {
  .chat.is-thread .chat-list, .chat.is-thread .chat-ctx { display: none; }
  .chat.is-list .chat-main { display: none; }
  .chat.is-list .chat-list { border: 0; background: transparent; }
  .chat.is-thread { margin: -10px; }
  .chat.is-thread .chat-main { border-radius: 0; border: 0; min-height: calc(100dvh - 24px); }
  .chat.is-thread .chat-msgs { min-height: 50vh; }
  .chat.is-thread .chat-compose { position: sticky; bottom: 0; }
  body.chat-open .tabbar { display: none; }
  .chat-items .it { padding: 12px 8px; min-height: 56px; }
}
@media (min-width: 1000px) {
  .chat { grid-template-columns: 320px minmax(0, 1fr); }
  .chat.is-thread { grid-template-columns: 320px minmax(0, 1fr); }
  .chat-list { display: flex; flex-direction: column; overflow: hidden; }
  .chat-items { flex: 1; }
  .chat-back { display: none; }
  .chat-blank { align-items: center; justify-content: center; }
}
@media (min-width: 1280px) {
  .chat.is-thread { grid-template-columns: 320px minmax(0, 1fr) 280px; }
  .chat-ctx { display: block; }
}
.cc-menu[hidden], .cc-n[hidden], .chat-none[hidden], .chat-items [hidden] { display: none !important; }
.chat-find { box-sizing: border-box; }
.chat-items .it { box-sizing: border-box; max-width: 100%; }
.chat-list, .chat-main { min-width: 0; }
.chat .chat-find { width: calc(100% - 24px) !important; min-width: 0; max-width: calc(100% - 24px); display: block; }

/* ---------- co dalej z tą rodziną (zlecenie 26 B) ---------- */
.ft { border-top: 1px solid var(--line); padding: 10px 0; }
.ft:first-child { border-top: 0; padding-top: 0; }
.ft > summary { cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; list-style: none; padding-right: 22px; position: relative; }
.ft > summary::-webkit-details-marker { display: none; }
.ft > summary::after { content: "›"; position: absolute; right: 4px; top: 0; font-size: 20px; color: var(--ink-soft); transition: transform .15s; }
.ft[open] > summary::after { transform: rotate(90deg); }
.ft-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ft-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.ft-form select, .ft-form input[type=text], .ft-form input[type=date] { min-height: 44px; }
.ft-form .btn { align-self: flex-start; }
.ft-form p { margin: 0; }
.ft-two { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ft-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.ft-table th { text-align: left; font-size: 12px; color: var(--ink-soft); padding: 4px 6px; }
.ft-table td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.ho-files { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; max-height: 340px; overflow: auto; }
.ft-form .ho-file { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 400; cursor: pointer; }
.ho-file:first-child { border-top: 0; }
.ho-file input { width: 20px; height: 20px; flex: none; }
.ho-file span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .ft-two { grid-template-columns: 1.4fr 1fr 1fr; }
  .ft-line { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .ft-line label { flex: 1 1 200px; }
  .ft-line > div { flex: 1 1 100%; }
  .ft-line .btn { align-self: flex-end; }
}
@media (max-width: 699px) {
  .ft-table thead { display: none; }
  .ft-table tr { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
  .ft-table td { border: 0; padding: 0; }
  .ft-table td:first-child { flex: 1 1 100%; font-weight: 700; }
}

.hc-todo-r .btn { white-space: nowrap; }

/* ---------- telefon: poprawki po przeglądzie 17.11 ---------- */
.hc-dl { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: 4px 12px; margin: 10px 0; font-size: 14px; }
.hc-dl dt { color: var(--ink-soft); }
.hc-dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.hc-sec { flex-wrap: wrap; gap: 2px 12px; }
.zn-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }

/* ---------- jedna grupa na ekranie: osoby z mailami (17.11) ---------- */
.gb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gb-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.gb-tabs a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: 800 13.5px Nunito, sans-serif; color: var(--ink); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; gap: 4px; }
.gb-tabs a.on { background: var(--night-2); color: #fff; border-color: var(--night-2); }
.gb-tabs small { font-weight: 400; opacity: .8; }
.gb-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.gb-tiles .stat { padding: 12px 14px; } .gb-tiles .stat b { font-size: 24px; }
.gb-tiles .stat.warn { background: var(--sand); border-color: var(--gold); }
.gb-grid { display: flex; flex-direction: column; gap: 14px; }
.gb-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 8px; border-top: 1px solid var(--line); border-radius: 10px; }
.gb-row:first-of-type { border-top: 0; }
.gb-row.sel { background: var(--sage-pale); }
.gb-who a { color: var(--ink); text-decoration: none; }
.gb-stage, .gb-mails { grid-column: 1 / -1; }
.gb-act { grid-column: 2; grid-row: 1; }
.gb-mails { display: flex; flex-direction: column; gap: 3px; }
.gb-mail { display: flex; gap: 8px; font-size: 13px; line-height: 1.35; }
.gb-mail i { font-style: normal; color: var(--ink-soft); flex: none; width: 40px; }
.gb-mail.new span { font-weight: 800; }
.gb-tl { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.gb-tli { position: relative; padding-bottom: 12px; overflow-wrap: anywhere; }
.gb-tli:last-child { padding-bottom: 0; }
.gb-tli::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--night-2); }
.gb-tli.in::before { background: var(--gold); }
.gb-tli b { display: block; font-size: 14px; }
@media (min-width: 700px) { .gb-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .gb-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
  .gb-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.6fr) auto; align-items: start; }
  .gb-stage, .gb-mails, .gb-act { grid-column: auto; grid-row: auto; }
}

/* parent's address in intake lists: visible, tap opens the phone's mail app (17.11) */
.mailto { display: inline-flex; align-items: center; min-height: 32px; font-weight: 700; color: var(--night-2); text-decoration: underline; overflow-wrap: anywhere; }

/* intake row: rare actions folded away so a person takes a few lines, not a screen (17.11) */
.nabor-more { margin-top: 6px; }
.nabor-more > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--night-2); min-height: 36px; display: inline-flex; align-items: center; }
.nabor-more[open] > summary { margin-bottom: 8px; }
