:root {
  --green: #17483b;
  --green-2: #2f855a;
  --pink: #f6a6c9;
  --pink-light: #fff1f7;
  --gold: #c9a44c;
  --cream: #fffaf4;
  --text: #1d2930;
  --muted: #697984;
  --line: #e7ded5;
  --danger: #b42318;
  --shadow: 0 10px 28px rgba(28, 40, 42, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #fffaf4, #fff1f7 55%, #eef7f1);
  min-height: 100vh;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  background: rgba(255, 250, 244, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--green);
  white-space: nowrap;
}
.brand-mark { font-size: 24px; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.nav a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--text);
}
.nav a:hover { background: var(--pink-light); text-decoration: none; }
.userbox {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 14px;
}
.dot, .color-big {
  width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  border: 1px solid rgba(0,0,0,.12);
}
.color-big { width: 22px; height: 22px; }

.container {
  width: min(1450px, calc(100% - 24px));
  margin: 22px auto 50px;
}
.card {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(231,222,213,.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}
.card.slim { padding: 16px 18px; }
h1, h2 { margin: 0 0 8px; color: var(--green); }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.hidden { display: none !important; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.week-title { padding: 2px 8px 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(0,0,0,.06); }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.danger { background: #fff5f5; color: var(--danger); border-color: #fecaca; }
.btn.small { padding: 7px 10px; font-size: 13px; }
.btn.whatsapp { background: #e7f8ee; border-color: #b8ebcc; }

.flashes { margin-bottom: 14px; display: grid; gap: 8px; }
.flash { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.flash.success { background: #edfdf3; border-color: #bbf7d0; }
.flash.error { background: #fff1f2; border-color: #fecdd3; }
.flash.info { background: #eff6ff; border-color: #bfdbfe; }

.login-card {
  max-width: 460px;
  margin: 8vh auto;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.hint { font-size: 14px; color: var(--muted); }

.form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #34444c;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #d8cdc3;
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; }
.stack { display: grid; gap: 14px; }
.grid-form, .client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.form-card { max-width: 980px; margin-left: auto; margin-right: auto; }
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--pink-light);
  border-radius: 18px;
  padding: 12px;
}
.segmented label { display: inline-flex; align-items: center; gap: 8px; }
.segmented input { width: auto; }
.danger-zone { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }

.calendar-wrap { overflow: auto; padding: 0; }
.calendar-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1050px;
}
.calendar-table th {
  position: sticky;
  top: 62px;
  z-index: 10;
  background: var(--green);
  color: #fff;
  padding: 10px 8px;
  border-right: 1px solid rgba(255,255,255,.16);
  text-align: center;
}
.calendar-table th:first-child { border-top-left-radius: 22px; }
.calendar-table th:last-child { border-top-right-radius: 22px; }
.day-name { display: block; font-size: 14px; }
.day-date { display: block; font-size: 12px; opacity: .85; }
.time-col {
  width: 78px;
  text-align: center;
  font-weight: 800;
  color: var(--green);
  background: #fffaf4;
  position: sticky;
  left: 0;
  z-index: 8;
}
.calendar-table td {
  height: 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  padding: 3px;
  background: rgba(255,255,255,.72);
}
.calendar-table tr.hour-row td { border-top: 2px solid #dccdbb; }
.calendar-table td.free a {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: rgba(23,72,59,.28);
  font-weight: 900;
  text-decoration: none;
}
.calendar-table td.free a:hover { background: #eff7f1; color: var(--green); }
.calendar-table td.busy {
  background: color-mix(in srgb, var(--booking-color) 20%, white);
  border-left: 5px solid var(--booking-color);
}
.booking-block {
  display: grid;
  gap: 1px;
  padding: 4px 6px;
  color: var(--text);
  text-decoration: none !important;
  font-size: 12px;
  line-height: 1.25;
}
.booking-block strong { color: #16292b; font-size: 13px; }
.booking-block em { color: var(--muted); font-style: normal; }
.continued {
  display: block;
  min-height: 34px;
  color: rgba(0,0,0,.35);
  text-decoration: none !important;
}

.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; }
.table-card { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--green); background: #fffaf4; }
.data-table .right { text-align: right; white-space: nowrap; }
.inline { display: inline; }
.status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #eee; }
.status.waiting { background: #fff7df; }
.status.submitted { background: #e7f8ee; }
.status.saved { background: #e8f0ff; }
.status.expired { background: #fee2e2; color: #991b1b; }
.link-cell { display: flex; gap: 7px; min-width: 320px; }
.link-cell input { font-size: 12px; padding: 8px 10px; }

.public-page {
  display: grid;
  place-items: center;
  padding: 20px;
}
.public-card {
  width: min(720px, 100%);
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.public-logo { font-size: 44px; }

@media (max-width: 840px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .userbox { width: 100%; justify-content: space-between; }
  .container { width: calc(100% - 14px); margin-top: 10px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { justify-content: flex-start; }
  .card { border-radius: 18px; padding: 16px; }
  .grid-form, .client-grid { grid-template-columns: 1fr; }
  .calendar-table th { top: 0; }
  .calendar-table { min-width: 900px; }
  .searchbar { flex-direction: column; }
  .link-cell { flex-direction: column; min-width: 260px; }
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #6b5f62;
  font-weight: 500;
}
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.photo-card {
  border: 1px solid #eadad6;
  border-radius: 18px;
  padding: 12px;
  background: #fffdfc;
}
.photo-card img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: 10px;
}
.field-title {
  font-weight: 800;
  color: #34444c;
  margin-bottom: 8px;
}
.service-choice-block {
  display: grid;
  gap: 8px;
}
.service-grid-public {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.service-tile {
  display: block !important;
  min-height: 118px;
  padding: 0;
  cursor: pointer;
}
.service-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}
.service-tile span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 22px;
  background: #355f4f;
  color: #fff;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.service-tile strong {
  font-size: 16px;
  line-height: 1.05;
}
.service-tile em {
  font-size: 13px;
  line-height: 1.35;
  font-style: normal;
  opacity: .94;
}
.service-tile:hover span {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23,72,59,.18);
}
.service-tile input:checked + span {
  background: var(--green);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--gold), 0 8px 18px rgba(23,72,59,.20);
}
.photo-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.photo-inputs .field-title, .photo-inputs .hint {
  grid-column: 1 / -1;
}
.photo-inputs label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #34444c;
}
@media (max-width: 840px) {
  .service-grid-public { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-inputs { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .service-grid-public { grid-template-columns: 1fr; }
}

.strong-link {
  font-weight: 800;
  color: var(--green);
  text-decoration: none;
}
.strong-link:hover { text-decoration: underline; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.detail-card h3 {
  margin: 18px 0 8px;
  color: var(--green);
}
.info-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}
.info-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(231,222,213,.75);
}
.info-list.compact div {
  grid-template-columns: 105px minmax(0, 1fr);
  padding: 6px 0;
}
.info-list dt {
  font-weight: 800;
  color: var(--green);
}
.info-list dd {
  margin: 0;
}
.note-box {
  background: #fffaf4;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  white-space: normal;
}
.small-note {
  font-size: 14px;
  margin: 10px 0 0;
}
.form-summary {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,250,244,.75);
  padding: 12px;
  margin-top: 10px;
}
.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.current-row td {
  background: #e7f8ee !important;
}
.future-row td {
  background: #fff7df !important;
}
@media (max-width: 920px) {
  .detail-grid { grid-template-columns: 1fr; }
  .info-list div { grid-template-columns: 1fr; gap: 3px; }
}

.rich-link-cell {
  display: grid;
  gap: 8px;
  min-width: 420px;
}
.public-link {
  display: block;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  word-break: break-all;
  font-size: 13px;
}
.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.message-preview {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e7ded5;
  border-radius: 14px;
  background: #fffaf4;
  color: #405057;
  font-size: 13px;
  line-height: 1.4;
}
.message-preview.big {
  margin-top: 10px;
  font-size: 14px;
}
.notify-badge {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}
.notify-badge.sent {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.notify-badge.unsent {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.confirmation-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.confirmation-box h3 { margin: 0 0 6px; color: var(--green); }
.confirmation-box p { margin-top: 0; }
.confirmation-box.is-unsent {
  background: #fff1f2;
  border-color: #fecdd3;
}
.confirmation-box.is-sent {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.calendar-confirm {
  font-size: 11px;
  font-weight: 800;
}
.calendar-confirm.sent { color: #166534; }
.calendar-confirm.unsent { color: #991b1b; }
@media (max-width: 840px) {
  .rich-link-cell { min-width: 260px; }
}

.warning-box, .success-box {
  padding: 12px 14px;
  border-radius: 16px;
  margin: 12px 0;
  line-height: 1.45;
}
.warning-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
}
.success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
}
.warning-box code, .success-box code {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.08);
  padding: 2px 5px;
  border-radius: 7px;
}
.public-url-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}
.public-url-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: #34444c;
}
.big-link-button {
  width: fit-content;
}
@media (max-width: 840px) {
  .public-url-form {
    grid-template-columns: 1fr;
  }
  .big-link-button {
    width: 100%;
  }
}

.booking-main-link {
  display: grid;
  gap: 1px;
  color: var(--text);
  text-decoration: none !important;
}
.next-booking-btn {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--green);
  color: #fff !important;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none !important;
  border: 1px solid rgba(255,255,255,.45);
}
.next-booking-btn:hover {
  background: #0f3a2e;
  text-decoration: none !important;
}

/* v8: tryb wybierania następnego terminu bez wychodzenia z kalendarza */
.next-mode-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 2px solid #68d391;
  background: #effcf4;
}
.next-mode-card h2 {
  margin: 0 0 8px 0;
  color: var(--green);
}
.next-mode-card p {
  margin: 4px 0;
}
.calendar-wrap.select-next-mode {
  border: 2px solid #68d391;
  box-shadow: 0 12px 34px rgba(47, 133, 90, .16);
}
.calendar-table td.next-free {
  background: #f0fff4;
}
.calendar-table td.next-free a.select-next-slot {
  color: var(--green);
  background: #e4f8eb;
  border: 1px solid #9ae6b4;
  font-size: 11px;
  line-height: 1.1;
}
.calendar-table td.next-free a.select-next-slot:hover {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.calendar-table td.next-free a.select-next-slot small {
  font-weight: 800;
  opacity: .8;
}
@media (max-width: 840px) {
  .next-mode-card {
    display: block;
  }
  .next-mode-card .btn {
    margin-top: 12px;
    width: 100%;
  }
}

.file-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff6ec;
  border: 1px solid #ead9c9;
  color: #6c5c50;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  word-break: break-word;
}
.file-status.added {
  background: #e9fff3;
  border-color: #9ee6be;
  color: #15513f;
}
.service-tile {
  min-height: 142px;
}
.service-tile em {
  font-size: 12px;
}

/* v10: start wizyty wybierany z kalendarza */
.calendar-picker-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  width: 100%;
  border: 1px solid #d8cdc3;
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
  color: var(--green);
  font-weight: 900;
  text-decoration: none !important;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.calendar-picker-field:hover {
  background: #eff7f1;
  border-color: #9bd3b2;
  text-decoration: none !important;
}
.calendar-picker-field.empty {
  color: #697984;
  background: #fffaf4;
}

/* v12: szybkie dodawanie zdjęć po wizycie */
.booking-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.photo-booking-btn {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fffaf4;
  color: var(--green) !important;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none !important;
  border: 1px solid rgba(23,72,59,.25);
}
.photo-booking-btn:hover {
  background: #fff1e5;
  text-decoration: none !important;
}
.photo-inputs.six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.section-subtitle {
  margin-top: 28px;
}
.file-box input[type="file"] {
  width: 100%;
}
@media (max-width: 840px) {
  .photo-inputs.six { grid-template-columns: 1fr; }
}

/* v15: Poniedziałek, Środa i Piątek są mocno oznaczone w całej kolumnie,
   od 7:00 do 19:00, żeby nie wpisać wizyty przez pomyłkę w inny dzień. */
.calendar-table th.red-day-head {
  background: #a71919;
}
.calendar-table td.red-day-column {
  background: #ffdada !important;
  border-left: 2px solid rgba(167, 25, 25, .22);
  border-right: 2px solid rgba(167, 25, 25, .22);
}
.calendar-table tr.hour-row td.red-day-column {
  border-top: 3px solid rgba(167, 25, 25, .34);
}
.calendar-table td.red-day-column.free a {
  background: rgba(255, 255, 255, .28);
  color: rgba(120, 20, 20, .55);
}
.calendar-table td.red-day-column.free a:hover {
  background: #ffc2c2;
  color: #7d1515;
}
.calendar-table td.busy.red-day-column {
  background: color-mix(in srgb, var(--booking-color) 28%, #ffdada) !important;
  border-left: 5px solid var(--booking-color);
}
.calendar-table td.busy.red-day-column .booking-block {
  background: rgba(255, 255, 255, .18);
  border-radius: 10px;
}

/* Logo + language switch */
.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.language-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.topbar-lang-only { flex: 1; justify-content: flex-end; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
}
.lang-btn:hover { background: var(--pink-light); text-decoration: none; }
.public-logo-img {
  display: block;
  width: 150px;
  max-width: 45vw;
  height: auto;
  margin: 0 0 12px;
  border-radius: 22px;
}
.public-card.center .public-logo-img { margin-left: auto; margin-right: auto; }
.public-lang-switch {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 40;
}
@media (max-width: 700px) {
  .brand-logo { width: 30px; height: 30px; }
  .topbar { align-items: flex-start; }
  .language-switch { width: auto; margin-left: 0; }
  .userbox { margin-left: auto; }
  .public-lang-switch { position: static; padding: 10px 14px 0; display: flex; justify-content: flex-end; }
}

/* v16: prywatne terminy / blokady czasu */
.inner-segmented {
  margin-bottom: 14px;
}
.info-note.private-note {
  background: #fff1f2;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 14px 16px;
  color: #7f1d1d;
}
.calendar-table td.busy.private-busy {
  background: #fee2e2 !important;
  border-left: 5px solid #991b1b !important;
}
.calendar-table td.busy.private-busy .booking-block {
  background: rgba(255,255,255,0.48);
  border-radius: 12px;
  padding: 6px 8px;
}
.calendar-table td.busy.private-busy .booking-main-link strong,
.calendar-table td.busy.private-busy .booking-main-link em {
  color: #7f1d1d;
}
.private-detail .eyebrow {
  color: #991b1b;
  font-weight: 800;
}

/* v17 Datenschutz */
.consent-box {
  border: 1px solid #e8d7df;
  background: #fff8fb;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.checkbox-line {
  display: grid !important;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 500;
}
.checkbox-line input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}
.legal-card {
  max-width: 980px;
  line-height: 1.55;
}
.legal-card h2 {
  margin-top: 26px;
  color: #8a2f5b;
}
.legal-preview {
  line-height: 1.55;
}
.btn.danger {
  background: #b42318;
  color: white;
  border-color: #b42318;
}

.cancellation-box {
  border: 1px solid #f0b3b3;
  background: #fff1f1;
  border-radius: 18px;
  padding: 14px 16px;
  margin: 4px 0 10px;
}
.cancellation-box h3 {
  margin: 0 0 8px;
  color: #9f1d1d;
}
.cancellation-box p {
  margin: 5px 0;
}

/* v20 required / optional consents */
.consent-box h3 { margin: 4px 0 2px; color: var(--green); }
.checkbox-line.required-consent { background: #fff1f1; border: 1px solid #f0b3b3; border-radius: 12px; padding: 10px; }
.checkbox-line.optional-consent { background: #f5fff8; border: 1px solid #bde8c9; border-radius: 12px; padding: 10px; }
.staff-consent-box { margin-top: 8px; }
.compact-consents { gap: 8px; }
.status.sent { background: #dcfce7; color: #14532d; }
.status.danger-status, .danger-status { background: #fee2e2; color: #991b1b; }
.consent-proof-list dt { min-width: 190px; }

/* v21: czytelny dowód zgód w karcie klienta */
.consent-header-row { align-items: center; margin-top: 18px; }
.consent-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 10px 0 12px;
}
.consent-proof-card {
  border: 1px solid #e7d9d4;
  border-radius: 16px;
  padding: 12px;
  background: #fffaf8;
  box-shadow: 0 8px 20px rgba(30, 25, 20, .04);
}
.consent-proof-card.required { border-left: 7px solid #124e46; }
.consent-proof-card.optional { border-left: 7px solid #d9b47b; }
.consent-proof-card.missing { background: #fff1f2; border-color: #fecdd3; border-left-color: #b91c1c; }
.consent-title { font-weight: 800; color: #083f39; margin-bottom: 3px; }
.consent-kind { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.consent-result { display: inline-block; font-weight: 900; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.consent-result.ok { background: #dcfce7; color: #166534; }
.consent-result.no { background: #fee2e2; color: #991b1b; }
.consent-result.neutral { background: #f3f4f6; color: #374151; }
.consent-date { margin-top: 7px; font-size: 13px; color: #374151; }
.consent-source-box {
  border-radius: 14px;
  padding: 11px 13px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  margin-top: 8px;
}

/* v22: tabela zgód, bez nachodzenia tekstu */
.consent-table-wrap,
.form-consent-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 10px 0 14px;
}
.consent-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  background: #fffdfb;
  border: 1px solid #eadbd6;
  border-radius: 16px;
  overflow: hidden;
  font-size: 14px;
}
.consent-table th {
  background: #fff6f1;
  color: #083f39;
  font-weight: 900;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eadbd6;
  white-space: nowrap;
}
.consent-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee2de;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.consent-table tr:last-child td { border-bottom: 0; }
.consent-table td:nth-child(2),
.consent-table td:nth-child(3) { white-space: nowrap; }
.consent-table td:nth-child(4),
.consent-table td:nth-child(5) { font-size: 13px; color: #374151; }
.consent-row-ok { background: #f4fff7; }
.consent-row-missing { background: #fff1f1; }
.consent-row-neutral { background: #fafafa; }
.consent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}
.consent-badge.yes {
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}
.consent-badge.no {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.consent-badge.neutral {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}
.consent-type {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.required-type { background: #ffe4e6; color: #9f1239; }
.optional-type { background: #ecfdf5; color: #166534; }
.mini-consent-table {
  margin-top: 8px;
  font-size: 13px;
}
.mini-consent-table td {
  padding: 8px 10px;
}
.mini-consent-table td:nth-child(1) { width: 42%; }
.mini-consent-table td:nth-child(2) { width: 90px; }
.form-summary {
  overflow: hidden;
}
@media (max-width: 760px) {
  .consent-table { font-size: 13px; min-width: 680px; }
  .mini-consent-table { min-width: 520px; }
}

/* v25 legal start package */
.app-footer,
.public-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  color: #6b7280;
  font-size: 13px;
  padding: 18px 10px 26px;
}
.public-footer { padding: 18px 0 0; }
.app-footer a,
.public-footer a { color: #124E46; font-weight: 800; text-decoration: none; }
.app-footer a:hover,
.public-footer a:hover { text-decoration: underline; }
.warning-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  padding: 12px 14px;
  border-radius: 14px;
}
.legal-settings-note {
  border-top: 1px solid #eadbd6;
  margin-top: 8px;
  padding-top: 12px;
}
.manual-data-box {
  border-top: 1px solid #eadbd6;
  margin-top: 18px;
  padding-top: 14px;
}
.manual-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.manual-action-card {
  border: 1px solid #e7d9d4;
  border-radius: 16px;
  background: #fffdfb;
  padding: 12px;
}
.manual-action-card h4 { margin: 0 0 6px; color: #083f39; }
.manual-action-card p { margin: 5px 0 10px; font-size: 13px; color: #4b5563; }
.manual-action-card form { margin: 8px 0; }
.manual-action-card.danger-card { background: #fff7f7; border-color: #fecaca; }
.manual-action-card.danger-card h4 { color: #991b1b; }

/* v26: German/Polish cleanup, no native browser file text, better wrapping */
.visually-hidden.file-input-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.custom-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.file-pick-btn {
  display: inline-flex;
  width: auto;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.checkbox-line span,
.checkbox-line strong,
.consent-box,
.staff-consent-box,
.required-consent,
.optional-consent {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.client-grid,
.grid-form,
.form-card,
.public-card,
.card {
  min-width: 0;
}
select,
input,
textarea,
button {
  max-width: 100%;
}

/* v27: wersja mobilna + PWA */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 900;
  padding: 8px 12px;
  cursor: pointer;
}
.mobile-calendar { display: none; }
.mobile-calendar-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eff7f1;
  border: 1px solid #cce5d4;
  color: #124E46;
  font-size: 13px;
  font-weight: 700;
}
.mobile-day-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(28,40,42,.06);
}
.mobile-day-card h2 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 10px;
  font-size: 20px;
}
.mobile-day-card h2 span {
  color: #6b7280;
  font-size: 14px;
}
.mobile-red-day {
  background: #fff0f0;
  border-color: #ffbcbc;
}
.mobile-red-day h2 {
  color: #9f1d1d;
}
.mobile-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mobile-free-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid #d9e6dd;
  background: #f8fffb;
  color: var(--green);
  font-weight: 900;
  text-decoration: none !important;
  font-size: 13px;
}
.mobile-free-slot.select {
  background: #e4f8eb;
  border-color: #9ae6b4;
}
.mobile-free-slot:hover {
  background: var(--green);
  color: #fff;
}
.mobile-booking-card {
  grid-column: 1 / -1;
  border-left: 6px solid var(--booking-color);
  border-radius: 16px;
  background: color-mix(in srgb, var(--booking-color) 18%, white);
  padding: 10px;
}
.mobile-booking-card.private-mobile {
  background: #fee2e2;
  border-left-color: #991b1b;
}
.mobile-booking-main {
  display: grid;
  gap: 2px;
  color: var(--text);
  text-decoration: none !important;
}
.mobile-booking-main strong {
  color: #16292b;
}
.mobile-booking-main em {
  color: #4b5563;
  font-style: normal;
}
.pwa-install-note {
  display: none;
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #cce5d4;
  background: #eff7f1;
  color: #124E46;
  font-size: 13px;
}

@media (max-width: 760px) {
  body {
    background: linear-gradient(160deg, #fffaf4, #fff1f7 60%, #f3fbf6);
  }
  .topbar {
    min-height: auto;
    padding: 8px 10px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
  }
  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-menu-btn { display: inline-flex; }
  .nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    padding: 6px 0 2px;
    gap: 6px;
  }
  body.mobile-nav-open .nav { display: flex; }
  .nav a {
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    padding: 11px 12px;
  }
  .language-switch {
    margin-left: 0;
  }
  .lang-btn { padding: 7px 9px; font-size: 13px; }
  .userbox {
    order: 11;
    display: none;
    width: 100%;
    background: rgba(255,255,255,.7);
    border-radius: 14px;
    padding: 8px 10px;
  }
  body.mobile-nav-open .userbox { display: flex; }
  .container {
    width: calc(100% - 10px);
    margin: 8px auto 28px;
  }
  .card {
    padding: 14px;
    border-radius: 18px;
    margin-bottom: 10px;
  }
  .toolbar {
    gap: 10px;
  }
  .toolbar h1 { font-size: 24px; }
  .toolbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .toolbar-actions .btn,
  .form-actions .btn,
  .btn.primary,
  button.btn {
    width: 100%;
  }
  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .grid-form,
  .client-grid,
  .detail-grid {
    grid-template-columns: 1fr !important;
  }
  input, select, textarea, .calendar-picker-field {
    font-size: 16px;
    min-height: 46px;
  }
  .calendar-wrap.card {
    display: none;
  }
  .mobile-calendar {
    display: block;
  }
  .mobile-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .week-title { padding: 0 4px; }
  .searchbar { display: grid; grid-template-columns: 1fr; }
  .data-table { min-width: 720px; }
  .table-card { -webkit-overflow-scrolling: touch; }
  .public-page { padding: 8px; align-items: start; }
  .public-card { padding: 18px; border-radius: 22px; }
  .public-card h1 { font-size: 26px; }
  .public-logo-img { width: 110px; max-width: 38vw; }
  .service-grid-public { grid-template-columns: 1fr !important; }
  .service-tile { min-height: auto; }
  .service-tile span { border-radius: 16px; padding: 13px; }
  .photo-inputs { grid-template-columns: 1fr !important; }
  .consent-table { min-width: 650px; }
  .consent-box { padding: 12px; }
  .checkbox-line { grid-template-columns: 26px 1fr; }
  .checkbox-line input[type="checkbox"] { width: 22px; height: 22px; }
  .app-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .pwa-install-note { display: block; }
}

@media (max-width: 380px) {
  .mobile-slots { grid-template-columns: 1fr; }
  .toolbar-actions { grid-template-columns: 1fr; }
  .brand { font-size: 14px; }
}

/* v28 admin user management */
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.small-password-input { max-width: 230px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); }
.user-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { min-width: 330px; }
@media (max-width: 700px) {
  .small-password-input { max-width: 100%; width: 100%; }
  .inline-form { display: block; }
  .inline-form .btn { margin-top: 6px; }
}

.quick-phone-note {
  border: 1px solid #b7ead2;
  background: #f0fff7;
  color: #0b3d32;
  border-radius: 14px;
  padding: 12px 14px;
}

.form-booking-btn {
  display:inline-flex; align-items:center; gap:.25rem;
  border-radius:999px; padding:.35rem .65rem; font-size:.78rem; font-weight:800;
  background:#0f766e; color:white; text-decoration:none;
}
.form-booking-btn:hover { filter: brightness(.95); }
.intake-box { border-color:#a7f3d0; background:#f0fdf4; }

/* v36: clean month overview as a real calendar table */
.month-overview {
  margin: 16px 0 18px;
  padding: 22px 24px;
  max-width: 520px;
}
.month-overview-head {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}
.month-overview-head h2 {
  margin: 0 0 6px;
  color: var(--green);
}
.month-overview-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.month-overview-actions strong {
  text-align: center;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
}
.mini-month-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.mini-month-table th {
  height: 38px;
  text-align: center;
  font-weight: 900;
  color: var(--green);
  background: #fffaf4;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.mini-month-table td {
  height: 58px;
  text-align: center;
  vertical-align: top;
  border-bottom: 1px solid #f0e5db;
  border-right: 1px solid #f0e5db;
  background: #fff;
  padding: 3px;
}
.mini-month-table tr:last-child td { border-bottom: 0; }
.mini-month-table td:last-child { border-right: 0; }
.mini-month-table td.outside { background: #fafafa; opacity: .45; }
.mini-month-table td.selected-week { background: #f4fbf6; }
.mini-month-day {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 5px;
  transition: background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.mini-month-day:hover {
  background: #eff7f1;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(23,72,59,.22);
}
.mini-month-number {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
}
.mini-month-table td.today .mini-month-number {
  background: var(--green);
  color: #fff;
}
.mini-month-dots {
  min-height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-wrap: wrap;
  max-width: 42px;
}
.mini-month-dots i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pink-dark);
  display: block;
}
.mini-month-dots b {
  font-size: 10px;
  line-height: 1;
  color: var(--pink-dark);
  font-weight: 900;
}
@media (min-width: 900px) {
  .month-overview { max-width: 560px; }
}
@media (max-width: 760px) {
  .month-overview { padding: 16px; max-width: none; }
  .month-overview-actions { grid-template-columns: 1fr; justify-items: stretch; }
  .month-overview-actions strong { order: -1; }
  .mini-month-table th { height: 32px; font-size: 12px; }
  .mini-month-table td { height: 50px; padding: 2px; }
  .mini-month-day { border-radius: 11px; padding: 5px 1px 4px; }
  .mini-month-number { min-width: 24px; height: 24px; font-size: 13px; }
  .mini-month-dots i { width: 5px; height: 5px; }
}

/* v37: clearly visible appointment indicators in the monthly overview */
.mini-month-table td.has-bookings .mini-month-day {
  background: #f2fbf5;
  box-shadow: inset 0 0 0 1px rgba(20, 83, 67, .16);
}
.mini-month-table td.has-bookings.outside .mini-month-day {
  background: #f8fbf9;
}
.mini-month-table td.has-bookings .mini-month-dots {
  min-height: 15px;
  max-width: 56px;
  padding: 2px 3px;
  border-radius: 999px;
  background: rgba(20, 83, 67, .08);
}
.mini-month-table td.has-bookings .mini-month-dots i {
  width: 7px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(255,255,255,.75);
}
.mini-month-table td.has-bookings .mini-month-dots b {
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
}
@media (max-width: 640px) {
  .mini-month-table td.has-bookings .mini-month-dots i { width: 6px; height: 6px; }
  .mini-month-table td.has-bookings .mini-month-dots { max-width: 48px; }
}
