:root {
  --bg: #f3efe8;
  --ink: #1c2421;
  --muted: #5c6b64;
  --brand: #2f5d50;
  --brand-2: #c4a574;
  --card: #fffdf9;
  --line: #d9d0c4;
  --ok: #2f6b4f;
  --err: #8b3a3a;
  --radius: 14px;
  --font: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #dfece6 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #efe2cc 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  transition: grid-template-columns .2s ease;
}
.sidebar {
  background: linear-gradient(180deg, #243f37, #1a2e29);
  color: #f5f1ea;
  padding: 1.1rem .85rem 1.4rem;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .75rem;
  flex-shrink: 0;
}
.sidebar-brand-wrap { min-width: 0; flex: 1; }
.sidebar .brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar .brand-short {
  display: none;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0 auto .35rem;
}
.sidebar .sub {
  color: #b7c7c0;
  font-size: .82rem;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #e8efe9;
  border-radius: 10px;
  padding: .35rem .45rem;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.16); }
.sidebar-toggle-ico {
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
}
.sidebar-toggle-ico svg {
  width: 1.15rem;
  height: 1.15rem;
  max-width: 1.15rem;
  max-height: 1.15rem;
  min-width: 0;
  min-height: 0;
  fill: currentColor;
  display: block;
}
.sidebar-toggle .ico-expand { display: none; }
.sidebar-toggle-label { line-height: 1; }

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #e8efe9;
  padding: .5rem .65rem;
  border-radius: 10px;
  margin-bottom: .2rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
}
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,.1); text-decoration: none; }
.sidebar nav .nav-group {
  margin-bottom: .2rem;
}
.sidebar nav .nav-group-toggle {
  width: 100%;
  color: #e8efe9;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .65rem;
  border-radius: 10px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  min-width: 0;
}
.sidebar nav .nav-group-toggle:hover,
.sidebar nav .nav-group-toggle.active {
  background: rgba(255,255,255,.1);
}
.sidebar nav .nav-chevron {
  margin-left: auto;
  display: inline-flex;
  opacity: .75;
  transition: transform .18s ease;
  flex-shrink: 0;
}
.sidebar nav .nav-group.is-open .nav-chevron {
  transform: rotate(180deg);
}
.sidebar nav .nav-sub {
  display: flex;
  flex-direction: column;
  gap: .05rem;
  padding: .05rem 0 .3rem .45rem;
  margin: 0 0 .1rem .55rem;
  border-left: 2px solid rgba(255,255,255,.18);
}
.sidebar nav .nav-sub[hidden] {
  display: none !important;
}
.sidebar nav .nav-sub a {
  padding: .38rem .6rem;
  margin: 0;
  font-size: .88rem;
  opacity: .92;
}
.sidebar nav .nav-sub a.active {
  background: rgba(255,255,255,.14);
  font-weight: 650;
}
html.sidebar-collapsed .sidebar nav .nav-chevron,
html.sidebar-collapsed .sidebar nav .nav-sub {
  display: none !important;
}
html.sidebar-collapsed .sidebar nav .nav-group-toggle {
  justify-content: center;
  padding: .5rem .35rem;
}
.sidebar nav .nav-ico {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.sidebar nav .nav-ico svg {
  width: 1.2rem;
  height: 1.2rem;
  max-width: 1.2rem;
  max-height: 1.2rem;
  min-width: 0;
  min-height: 0;
  fill: currentColor;
  display: block;
}
.sidebar nav .nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: .1rem;
  margin-bottom: .25rem;
}
.sidebar-credit {
  margin-top: .35rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
}
.sidebar-credit a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: #c5d4ce;
  text-decoration: none;
  min-width: 0;
}
.sidebar-credit a:hover {
  color: #fff;
  text-decoration: none;
}
.sidebar-credit-logo {
  width: 56px;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
}
.sidebar-credit-url {
  font-size: .72rem;
  letter-spacing: .01em;
  opacity: .9;
  line-height: 1.2;
}
html.sidebar-collapsed .sidebar-credit {
  padding-top: .55rem;
  margin-top: .65rem;
  gap: .4rem;
}
html.sidebar-collapsed .sidebar-credit-logo { width: 36px; }
html.sidebar-collapsed .sidebar-credit-url { display: none; }
/* Zwinięte menu — ikony zamiast tekstu */
html.sidebar-collapsed .shell { grid-template-columns: 72px 1fr; }
html.sidebar-collapsed .sidebar { padding: .85rem .45rem 1rem; }
html.sidebar-collapsed .sidebar .brand,
html.sidebar-collapsed .sidebar .sub,
html.sidebar-collapsed .sidebar-toggle-label,
html.sidebar-collapsed .sidebar nav .nav-label { display: none; }
html.sidebar-collapsed .sidebar .brand-short { display: grid; }
html.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  align-items: center;
  gap: .55rem;
}
html.sidebar-collapsed .sidebar-toggle { padding: .4rem; }
html.sidebar-collapsed .sidebar-toggle .ico-collapse { display: none; }
html.sidebar-collapsed .sidebar-toggle .ico-expand { display: block; }
html.sidebar-collapsed .sidebar nav a {
  justify-content: center;
  padding: .7rem .4rem;
}
html.sidebar-collapsed .sidebar nav .nav-ico {
  width: 1.35rem;
  height: 1.35rem;
}
html.sidebar-collapsed .sidebar nav .nav-ico svg {
  width: 1.3rem;
  height: 1.3rem;
}
.main { padding: 1.4rem 1.6rem 2.5rem; min-width: 0; overflow-x: clip; }
.topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
h1 { margin: 0 0 .8rem; font-size: 1.55rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(28,36,33,.04);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: .55rem .75rem;
  align-items: end;
  margin: .15rem 0 .65rem;
}
.field-compact label {
  margin: 0 0 .2rem;
  font-size: .78rem;
  line-height: 1.25;
}
.field-compact input[type="number"],
.field-compact input[type="text"],
.field-compact select {
  max-width: 7rem;
  width: 100%;
  padding: .4rem .5rem;
  border-radius: 8px;
}
/* Krótkie wartości nie rozciągają się na całą szerokość karty */
input[type="number"] {
  max-width: 8rem;
  width: 100%;
  box-sizing: border-box;
  padding: .4rem .55rem;
}
.settings-event-extra input[type="number"],
.book-v2-rules-card input[type="number"] {
  max-width: 6.5rem;
}
textarea.input-full,
input.input-full {
  max-width: none;
  width: 100%;
}
@media (max-width: 560px) {
  .grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-compact input[type="number"] { max-width: none; }
}
.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; }
.flash.success { background: #e5f4ea; color: var(--ok); }
.flash.error { background: #f8e6e6; color: var(--err); }
.flash.warning { background: #f8f0e0; color: #7a5a20; }
.license-banner {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}
.storage-banner {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e3a8a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}
.storage-banner a { margin-left: 8px; color: inherit; text-decoration: underline; }
.storage-banner-over {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.staff-settings-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin: 0 0 1rem;
}
.storage-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .4rem;
}
.storage-meter {
  height: .7rem;
  border-radius: 999px;
  background: #e8ece9;
  overflow: hidden;
  border: 1px solid var(--line, #d7dde3);
}
.storage-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand, #3d6b5a);
  transition: width .25s ease;
}
.storage-meter-fill.is-near { background: #b45309; }
.storage-meter-fill.is-over { background: #b91c1c; }
.storage-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin-top: .75rem;
}
.storage-breakdown > div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 7rem;
}
.storage-settings-warn {
  margin: .75rem 0 0;
  padding: .55rem .7rem;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: .9rem;
}
.storage-settings-warn.is-over {
  background: #fef2f2;
  color: #991b1b;
}
.backup-remind-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e3a8a;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}
.backup-remind-text { flex: 1 1 220px; line-height: 1.4; }
.backup-remind-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.license-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  padding: 16px;
}
.license-modal-card {
  background: var(--card, #fff);
  color: var(--ink, #0f172a);
  border-radius: 14px;
  padding: 22px 24px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.license-modal-card h2 { margin: 0 0 10px; font-size: 18px; }
.license-modal-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; padding: .55rem .95rem;
  border-radius: 999px; font-weight: 600;
}
.btn.secondary { background: #efe8dc; color: var(--ink); }
.btn.danger { background: var(--err); }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); font-size: .95rem; }
tr.table-row-link {
  cursor: pointer;
  transition: background .12s ease;
}
tr.table-row-link:hover,
tr.table-row-link:focus {
  background: color-mix(in srgb, var(--brand, #3d6b5a) 10%, #fff);
  outline: none;
}
tr.table-row-link:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand, #3d6b5a) 45%, transparent);
}
label { display: block; font-size: .85rem; color: var(--muted); margin: .55rem 0 .2rem; }
input, select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font: inherit;
}
.form-actions { margin-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; background: #e8efe9; font-size: .8rem; }
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1rem;
}
.login-card { width: min(420px, 100%); }
.book-page {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--brand) 18%, transparent) 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--brand-2) 35%, transparent) 0%, transparent 50%),
    var(--bg);
}
.book-page.book-bg-flat {
  background: var(--bg);
}
.book-page.book-has-bg {
  background-color: var(--bg);
  background-image: var(--book-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
body.book-page.book-has-bg {
  background-attachment: fixed;
}
.book-page.book-has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--book-overlay, transparent);
  pointer-events: none;
  z-index: 0;
}
body.book-page.book-has-bg::before {
  position: fixed;
}
.book-page > .login-wrap,
.book-page > .book-split-photo {
  position: relative;
  z-index: 1;
}
.book-page.book-hide-title .book-salon-title,
.book-page.book-hide-title .book-preview-salon {
  display: none !important;
}
.book-page.book-hide-progress .progress {
  display: none !important;
}
.book-page.book-hide-duration .svc-item-meta {
  display: none !important;
}
.book-page.book-btn-soft .btn,
.book-editor-preview.book-btn-soft .btn,
.book-editor-preview.book-btn-soft .book-btn-input {
  background: color-mix(in srgb, var(--brand) 16%, #fff);
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
.book-intro { margin: .35rem 0 .85rem; line-height: 1.45; }
.book-footer { margin-top: 1.1rem; font-size: .88rem; line-height: 1.4; }
.phone-field {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10.5rem) 1fr;
  gap: .55rem;
  align-items: stretch;
}
.phone-field .phone-dial,
.phone-field .phone-national {
  width: 100%;
  margin: 0;
}
.phone-field-hint {
  margin: .25rem 0 0;
  font-size: .82rem;
}
@media (max-width: 520px) {
  .phone-field { grid-template-columns: 1fr; }
}
/* Honeypot antyspam — poza ekranem (nie display:none, żeby boty częściej wypełniały). */
.book-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.book-legal { margin: .85rem 0 .35rem; display: grid; gap: .55rem; }
.book-legal-check {
  display: flex !important;
  align-items: flex-start;
  gap: .55rem;
  margin: 0 !important;
  color: var(--text, #1f2933);
  font-size: .92rem;
  line-height: 1.4;
  cursor: pointer;
}
.book-legal-check input {
  width: auto;
  margin: .2rem 0 0;
  flex: 0 0 auto;
}
.book-legal-link {
  display: inline;
  margin-left: .35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--book-accent, var(--accent, #2f5d50));
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.book-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.book-legal-modal[hidden] { display: none !important; }
.book-legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 22, .45);
}
.book-legal-modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(82vh, 820px);
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
}
.book-legal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.book-legal-modal-head h3 { margin: 0; font-size: 1.05rem; }
.book-legal-body {
  overflow: auto;
  padding: .85rem 0 .2rem;
  line-height: 1.55;
  font-size: .95rem;
}
.book-legal-body h1,
.book-legal-body h2,
.book-legal-body h3 { margin: 1rem 0 .45rem; }
.book-legal-body p { margin: .45rem 0; }
.book-legal-body ul,
.book-legal-body ol { margin: .45rem 0 .45rem 1.2rem; }
body.book-legal-open { overflow: hidden; }

.legal-settings-card { margin-bottom: 1rem; }
.legal-settings-card .ui-switch-row {
  margin: .45rem 0;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line, #e8ece9);
}
.legal-settings-card .ui-switch-row:last-of-type {
  border-bottom: 0;
  margin-bottom: .75rem;
}
.legal-html-editor,
.re-hidden-input[hidden] { display: none !important; }

.re-wrap {
  border: 1px solid var(--line, #d7dde3);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin-top: .25rem;
}
.re-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  padding: .55rem .6rem;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: linear-gradient(180deg, #f8faf9, #f1f4f3);
}
.re-toolbar.is-source .re-btn:not([data-cmd="toggleSource"]),
.re-toolbar.is-source .re-select,
.re-toolbar.is-source .re-color {
  opacity: .4;
  pointer-events: none;
}
.re-btn {
  appearance: none;
  border: 1px solid #cfd7d3;
  background: #fff;
  color: #24302c;
  border-radius: 8px;
  padding: .28rem .5rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  min-height: 2rem;
}
.re-btn:hover { background: #eef3f0; }
.re-btn[data-cmd="bold"] { font-weight: 800; }
.re-btn[data-cmd="italic"] { font-style: italic; }
.re-btn[data-cmd="underline"] { text-decoration: underline; }
.re-btn[data-cmd="strikeThrough"] { text-decoration: line-through; }
.re-color-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2rem;
  border: 1px solid #cfd7d3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.re-color-wrap .re-color {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100% !important;
  height: 100%;
  cursor: pointer;
  border: 0;
  padding: 0 !important;
}
.re-color-lab {
  font-weight: 800;
  font-size: .95rem;
  pointer-events: none;
  border-bottom: 3px solid #1f2933;
  line-height: 1;
  padding-bottom: 1px;
}
.re-color-lab-bg {
  border-bottom-color: #fff59d;
  background: linear-gradient(transparent 60%, #fff59d 60%);
}
.re-wrap.is-email .re-surface,
.re-wrap.is-email .re-source {
  min-height: 320px;
}
.re-wrap.is-email .re-surface a {
  color: #2f5d50;
}
.re-select {
  width: auto !important;
  min-width: 7.5rem;
  max-width: 11rem;
  margin: 0 !important;
  padding: .28rem .4rem !important;
  font-size: .82rem !important;
  border-radius: 8px !important;
  min-height: 2rem;
}
.re-color {
  width: 2.1rem !important;
  height: 2rem;
  padding: 0 !important;
  border: 1px solid #cfd7d3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.re-sep {
  width: 1px;
  align-self: stretch;
  background: #d5ddd9;
  margin: 0 .15rem;
}
.re-surface {
  min-height: 240px;
  max-height: 520px;
  overflow: auto;
  padding: .85rem 1rem;
  outline: none;
  line-height: 1.55;
  font-size: .95rem;
  color: #1f2933;
}
.re-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(47, 93, 80, .18);
}
.re-surface h2 { margin: .85rem 0 .4rem; font-size: 1.25rem; }
.re-surface h3 { margin: .75rem 0 .35rem; font-size: 1.08rem; }
.re-surface p { margin: .4rem 0; }
.re-surface ul,
.re-surface ol { margin: .4rem 0 .4rem 1.25rem; }
.re-source {
  display: block;
  width: 100%;
  min-height: 240px;
  max-height: 520px;
  border: 0 !important;
  border-radius: 0 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem;
  line-height: 1.45;
  padding: .85rem 1rem !important;
  resize: vertical;
}
.re-source[hidden] { display: none !important; }
.book-color-row {
  display: flex;
  gap: .45rem;
  align-items: center;
}
.book-color-row input[type="color"] {
  width: 2.6rem;
  min-width: 2.6rem;
  height: 2.4rem;
  padding: .15rem;
  cursor: pointer;
}
.book-color-row input[type="text"],
.book-color-row input:not([type="color"]) {
  flex: 1;
}

/* —— Edytor wizualny rezerwacji online —— */
.book-editor { margin-bottom: 1.5rem; }
.book-editor-toolbar { margin-bottom: .85rem; }
.book-editor-toolbar-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.book-editor-toolbar-actions {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  align-items: center;
}
.book-editor-switch {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}
.book-editor-switch input { width: auto; margin: 0; }
.book-top-switch {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .25rem .55rem .25rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.book-top-switch-lab {
  font-size: .82rem;
  font-weight: 650;
  white-space: nowrap;
}
.book-switch-row {
  margin: .45rem 0;
  padding: .4rem 0;
  border-bottom: 0;
}
.book-bubble .book-switch-row {
  gap: .65rem;
}
.book-v2-rules-card .book-switch-row {
  border-bottom: 1px solid var(--line, #e8ece9);
  margin: .25rem 0 .55rem;
  padding: .45rem 0;
}
.book-editor-rules {
  margin-top: .85rem;
  border-top: 1px solid var(--line);
  padding-top: .55rem;
}
.book-editor-rules > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.book-editor-rules > summary::-webkit-details-marker { display: none; }
.book-editor-rules > summary::before { content: '▸ '; }
.book-editor-rules[open] > summary::before { content: '▾ '; }
.book-editor-rules-body { margin-top: .75rem; }
.book-editor-rules-body h4 { margin: 1rem 0 .35rem; font-size: .95rem; }

.book-editor-stage { padding: .85rem; }
.book-editor-stage-bar {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .75rem;
}
.book-editor-steps .btn { padding: .35rem .65rem; font-size: .82rem; }
.book-editor-steps .btn.is-active {
  background: var(--brand);
  color: #fff;
}

.book-editor-colors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .85rem;
}
@media (max-width: 1100px) {
  .book-editor-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.book-color-field {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .6rem;
  background: #fff;
}
.book-color-label {
  display: block;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .35rem;
  font-weight: 600;
}
.book-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .4rem;
}
.book-swatch {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
  cursor: pointer;
  padding: 0;
}
.book-swatch.is-on {
  box-shadow: 0 0 0 2px var(--brand);
}
.staff-color-field {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .7rem;
  background: #fafbfa;
}
.staff-color-preview {
  margin-bottom: .55rem;
}
.staff-color-preview-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand, #3d6b5a);
  border-radius: 8px;
  padding: .45rem .7rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}
.staff-color-swatches {
  margin-bottom: .55rem;
}
.staff-color-swatches .book-swatch {
  width: 1.65rem;
  height: 1.65rem;
}
.staff-color-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
}
.staff-color-picker-lab {
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  margin: 0 !important;
  cursor: pointer;
  color: var(--ink) !important;
  font-size: .85rem !important;
  font-weight: 600;
}
.staff-color-picker-lab input[type="color"] {
  width: 2.35rem;
  height: 2rem;
  padding: .1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.staff-color-hex-more {
  font-size: .82rem;
}
.staff-color-hex-more summary {
  cursor: pointer;
  color: var(--muted);
  user-select: none;
}
.staff-color-hex-more[open] summary {
  margin-bottom: .35rem;
}
.staff-color-hex-more .book-color-hex {
  margin-top: .2rem;
}
.staff-color-hex-more .book-hex-input {
  max-width: 7.5rem;
}
.book-color-hex {
  display: flex;
  gap: .3rem;
  align-items: center;
}
.book-color-picker {
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.15rem;
  padding: .12rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.book-color-picker::-webkit-color-swatch-wrapper { padding: 2px; }
.book-color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}
.book-color-hex .book-hex-input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .85rem;
  padding: .35rem .45rem;
}
.book-color-hex .btn { padding: .35rem .55rem; font-size: .8rem; }

.book-editor-preview {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 420px;
  position: relative;
}
.book-editor-preview-wrap {
  min-height: 420px;
  padding: 1.25rem 1rem;
}
.book-editor-preview .book-card {
  box-shadow: 0 10px 30px rgba(28,36,33,.08);
}
.book-preview-salon,
.book-salon-title {
  margin: 0 0 .35rem;
  font-size: var(--book-title-size, 1.55rem);
  color: var(--ink);
  text-align: var(--book-title-align, center);
}
.book-page {
  font-family: var(--book-font, system-ui, "Segoe UI", sans-serif);
  font-size: var(--book-body-size, 1rem);
  color: var(--ink);
}
.book-page .book-card.login-card,
.book-editor-preview .book-card {
  width: min(var(--book-card-w, 640px), 100%) !important;
  border-radius: var(--book-card-radius, 16px);
  box-shadow: var(--book-card-shadow, 0 10px 30px rgba(28,36,33,.08));
  padding: var(--book-pad, 1.25rem) !important;
  background: color-mix(in srgb, var(--card) var(--book-card-op, 100%), transparent);
  border-width: var(--book-card-border-w, 1px);
  border-style: solid;
  border-color: var(--book-card-border-c, var(--line));
}
.book-page input,
.book-page select,
.book-page textarea,
.book-editor-preview input,
.book-editor-preview select,
.book-editor-preview textarea {
  border-color: var(--book-input-border, var(--line));
}
.book-page .svc-group,
.book-editor-preview .svc-group {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-color: color-mix(in srgb, var(--ink) 14%, transparent);
}
.book-page .svc-item,
.book-editor-preview .svc-item {
  background: color-mix(in srgb, var(--card) 96%, transparent);
}
.book-page.book-card-glass .book-card.login-card,
.book-editor-preview.book-card-glass .book-card {
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.book-split-photo {
  display: none;
  min-height: 100%;
  background-image: var(--book-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
body.book-page.book-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
}
body.book-page.book-split > .book-split-photo,
.book-editor-preview.book-split > .book-split-photo {
  display: block;
}
body.book-page.book-split.book-has-bg,
.book-editor-preview.book-split.book-has-bg {
  background-image: none;
  background-color: var(--bg);
}
body.book-page.book-split.book-has-bg::before,
.book-editor-preview.book-split.book-has-bg::before {
  display: none;
}
body.book-page.book-split > .login-wrap {
  min-height: 100vh;
}
body.book-page.book-split-right > .book-split-photo,
.book-editor-preview.book-split-right > .book-split-photo { order: 2; }
body.book-page.book-split-right > .login-wrap,
.book-editor-preview.book-split-right > .login-wrap { order: 1; }
.book-editor-preview.book-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 0 !important;
  gap: 0;
}
.book-editor-preview.book-split .book-editor-preview-wrap {
  padding: 1.25rem 1rem;
}
.book-editor-preview.book-split > .book-split-photo {
  min-height: 520px;
}
.book-page.book-layout-full > .login-wrap,
.book-editor-preview.book-layout-full > .login-wrap {
  padding: 0;
  place-items: stretch;
  align-items: stretch;
}
.book-page.book-layout-full .book-card.login-card,
.book-editor-preview.book-layout-full .book-card {
  width: 100% !important;
  max-width: none;
  min-height: 100vh;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-bottom: 0;
}
.book-editor-preview.book-layout-full {
  padding: 0 !important;
}
.book-editor-preview.book-layout-full .book-card {
  min-height: 520px;
}
.book-editor-preview[data-device="mobile"].book-hide-banner-mobile .book-banner {
  display: none !important;
}
@media (max-width: 800px) {
  body.book-page.book-split {
    display: block;
  }
  body.book-page.book-split > .book-split-photo {
    display: none;
  }
}
.book-editor-preview[data-device="mobile"].book-split {
  display: block;
  padding: 1.25rem .75rem 2rem !important;
}
.book-editor-preview[data-device="mobile"] .book-split-photo {
  display: none !important;
}
@media (max-width: 640px) {
  .book-page.book-hide-banner-mobile .book-banner {
    display: none !important;
  }
}
.book-page .btn,
.book-editor-preview .btn,
.book-btn-input {
  border-radius: var(--book-btn-radius, 999px) !important;
}
.book-logo {
  display: block;
  max-width: min(var(--book-logo-w, 280px), 100%);
  width: auto;
  max-height: var(--book-logo-h, 72px);
  height: auto;
  object-fit: contain;
  margin: 0 var(--book-logo-mr, auto) .65rem var(--book-logo-ml, auto);
  cursor: pointer;
}
.book-banner {
  display: block;
  width: var(--book-banner-w, 100%);
  max-width: 100%;
  height: var(--book-banner-h, 180px);
  max-height: var(--book-banner-h, 180px);
  object-fit: cover;
  object-position: var(--book-banner-pos, center);
  border-radius: var(--book-banner-radius, 12px);
  margin: 0 var(--book-banner-mr, 0) .85rem var(--book-banner-ml, 0);
  cursor: pointer;
}
.book-subtitle,
.book-subtitle-input {
  font-size: var(--book-subtitle-size, .95rem) !important;
  color: var(--muted);
  text-align: var(--book-title-align, center);
}
.book-page h2,
.book-h2-input {
  font-size: var(--book-h2-size, 1.2rem) !important;
}
.book-hint-input,
.book-page .book-intro,
.book-footer {
  font-size: var(--book-hint-size, .9rem);
}
.svc-item {
  border-radius: var(--book-svc-radius, 12px) !important;
}
.svc-item-img {
  width: var(--book-svc-img, 56px);
  height: var(--book-svc-img, 56px);
  object-fit: cover;
  border-radius: calc(var(--book-svc-radius, 12px) * .75);
  flex-shrink: 0;
}
.svc-item-price,
.book-price-el {
  color: var(--book-price, var(--brand)) !important;
}

/* —— Layout edytora —— */
.book-editor-layout {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 4.5rem;
}
.book-editor-side {
  padding: .75rem;
  position: sticky;
  top: .75rem;
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
}
.book-side-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .75rem;
}
.book-side-tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: .35rem .7rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}
.book-side-tab.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.book-side-hint {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.4;
}
.book-theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
.book-theme-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .55rem .6rem;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font: inherit;
}
.book-theme-card.is-on,
.book-theme-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}
.book-theme-swatch {
  display: block;
  height: 2rem;
  border-radius: 8px;
  margin-bottom: .25rem;
  background:
    linear-gradient(135deg, var(--t1) 0 34%, var(--t2) 34% 55%, var(--tc) 55% 78%, var(--tbg) 78% 100%);
}
.book-theme-card strong { font-size: .86rem; }
.book-theme-card .muted { font-size: .75rem; }
.book-editor-colors-stack {
  grid-template-columns: 1fr !important;
}
.book-design-grid-side {
  grid-template-columns: 1fr !important;
}
.book-toggle-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}
.book-media-field.is-flash {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.book-editor-linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-top: .55rem;
}
.book-editor-url {
  font-size: .78rem;
  background: #f4f1ea;
  padding: .35rem .55rem;
  border-radius: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-preview-bar {
  display: flex;
  justify-content: space-between;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .5rem;
}
.book-device-toggle {
  display: flex;
  gap: .3rem;
}
.book-device-toggle .btn {
  padding: .3rem .65rem;
  font-size: .8rem;
}
.book-device-toggle .btn.is-on {
  background: var(--brand);
  color: #fff;
}
.book-preview-tip {
  margin: 0 0 .55rem;
  font-size: .82rem;
}
.book-editor-preview[data-device="mobile"] .book-editor-preview-wrap {
  max-width: 390px;
  margin-inline: auto;
}
.book-editor-preview[data-device="mobile"] .book-card {
  width: 100% !important;
}
.book-editor-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  background: rgba(255,253,249,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  box-shadow: 0 -8px 24px rgba(28,36,33,.08);
}

/* —— Edytor v2: podgląd + chmurki —— */
.book-editor-v2 { margin-bottom: 4.5rem; }
.book-v2-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: .75rem;
}
.book-v2-top h2 { margin: 0 0 .25rem; }
.book-v2-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.book-v2-rules { margin-bottom: .75rem; }
.book-v2-bar {
  display: flex;
  justify-content: space-between;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .65rem;
}
.book-v2-stage {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 520px;
}
.book-editor-v2 .book-editor-preview {
  min-height: 520px;
  padding: 1.25rem .75rem 2rem;
  cursor: pointer;
}
.book-editor-v2 .book-card { cursor: default; }
.book-hotspot {
  display: block;
  width: 100%;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, #c9d5cf);
  background: color-mix(in srgb, var(--brand) 6%, #fff);
  color: var(--brand);
  border-radius: 12px;
  padding: .7rem .85rem;
  margin: 0 0 .65rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.book-hotspot-banner {
  min-height: 72px;
  display: grid;
  place-items: center;
}
.book-hotspot:hover,
.book-bubble-target {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.book-editor-v2 .book-logo,
.book-editor-v2 .book-banner,
.book-editor-v2 .book-preview-salon,
.book-editor-v2 .progress,
.book-editor-v2 .book-preview-services,
.book-editor-v2 .book-btn-input {
  cursor: pointer;
}
.book-bubble {
  position: fixed;
  z-index: 80;
  width: min(268px, calc(100vw - 24px));
  max-height: min(62vh, 480px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(28,36,33,.16);
  padding: .55rem .65rem .7rem;
}
.book-bubble-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .45rem;
  margin-bottom: .4rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  padding-bottom: .15rem;
}
.book-bubble-head strong { font-size: .88rem; }
.book-bubble-x {
  border: 0;
  background: #f0ebe3;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
}
.book-bubble .book-ctrl {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  margin: .4rem 0 0;
  font-size: .76rem;
  color: var(--muted);
  font-weight: 600;
}
.book-bubble .book-ctrl-val { color: var(--ink); font-weight: 500; }
.book-bubble input:not([type="range"]):not([type="checkbox"]):not([type="file"]),
.book-bubble select,
.book-bubble textarea {
  padding: .35rem .45rem;
  border-radius: 7px;
  font-size: .84rem;
}
.book-bubble input[type="number"] {
  max-width: 5.5rem;
}
.book-bubble input[type="range"] {
  width: 100%;
  max-width: none;
  padding: 0;
}
.book-bubble .book-color-field { margin-top: .25rem; border: 0; padding: 0; }
.book-bubble .book-align-row { margin-top: .25rem; }
.book-bubble .book-theme-grid { grid-template-columns: 1fr; }
.book-bubble .book-editor-switch { margin-top: .4rem; }
.book-v2-rules-card .book-switch-row {
  margin: .35rem 0 .15rem;
  padding: .35rem 0;
}
.book-v2-rules-card h3 { margin-bottom: .35rem; }
.book-v2-rules-card > label { margin-top: .55rem; }
@media (max-width: 720px) {
  .book-bubble {
    left: 12px !important;
    right: 12px;
    width: auto;
    bottom: 72px;
    top: auto !important;
    max-height: 45vh;
  }
}

@media (max-width: 980px) {
  .book-editor-layout {
    grid-template-columns: 1fr;
  }
  .book-editor-side {
    position: static;
    max-height: none;
  }
}

.book-editor-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin: 0 0 1rem;
}
.book-media-field {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
  background: #fff;
}
.book-media-field label.book-ctrl {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin: .45rem 0 0;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
}
.book-media-field .book-ctrl input[type="range"],
.book-design-grid .book-ctrl input[type="range"] {
  width: 100%;
  margin: 0;
}
.book-media-field .book-align-row,
.book-design-grid .book-align-row {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.book-media-field .book-align-row label,
.book-design-grid .book-align-row label {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  font-weight: 500;
  font-size: .82rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .25rem .5rem;
  cursor: pointer;
  background: #fff;
}
.book-media-field .book-align-row input,
.book-design-grid .book-align-row input {
  width: auto;
  margin: 0;
}
.book-media-preview {
  display: block;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
  margin: 0 0 .5rem;
}
.book-media-preview.is-banner {
  max-height: 110px;
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.book-design-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
  background: #fff;
  margin: 0 0 1rem;
}
.book-design-panel > summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.book-design-panel > summary::-webkit-details-marker { display: none; }
.book-design-panel > summary::before { content: '▸ '; }
.book-design-panel[open] > summary::before { content: '▾ '; }
.book-design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}
.book-design-grid .book-ctrl {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
}
.book-design-grid .book-ctrl-val,
.book-media-field .book-ctrl-val {
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.svc-edit-img-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .35rem 0 .55rem;
  flex-wrap: wrap;
}
.svc-edit-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
@media (max-width: 900px) {
  .book-editor-media,
  .book-design-grid { grid-template-columns: 1fr 1fr; }
  .book-theme-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .book-editor-media,
  .book-design-grid { grid-template-columns: 1fr; }
}
.book-inline-input,
.book-inline-area {
  width: 100%;
  border: 1px dashed #c9d5cf;
  background: rgba(255,255,255,.55);
  border-radius: 8px;
  padding: .4rem .55rem;
  font: inherit;
  color: inherit;
  margin: .2rem 0 .45rem;
}
.book-inline-input:focus,
.book-inline-area:focus {
  outline: 2px solid var(--brand);
  border-style: solid;
  background: #fff;
}
.book-subtitle-input,
.book-hint-input {
  color: var(--muted);
  font-size: .95rem;
}
.book-h2-input {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: .35rem;
}
.book-btn-input {
  display: inline-block;
  width: auto;
  min-width: 8rem;
  text-align: center;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  padding: .55rem .95rem;
}
.book-preview-services .svc-item { cursor: default; }
.book-editor-preview .slot {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: .45rem .7rem;
  display: inline-block;
}

@media (max-width: 980px) {
  .book-editor-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .book-editor-colors { grid-template-columns: 1fr; }
}
.svc-item-check {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.svc-item-check .svc-check {
  width: auto;
  margin: .35rem 0 0;
  flex: 0 0 auto;
}
.book-staff-opt {
  display: block;
  margin-bottom: .6rem;
  color: inherit;
  text-decoration: none;
  padding: .65rem .75rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
}
.book-staff-opt strong { display: block; }
.book-staff-opt .muted,
.book-staff-opt .book-staff-warn {
  display: block;
  margin-top: .2rem;
  font-size: .86rem;
}
.book-staff-warn { color: #8b3a3a; }
.book-selected-svcs {
  margin: .35rem 0 .75rem;
  padding: .55rem .7rem;
  border-radius: 10px;
  background: #f6f8f7;
  font-size: .92rem;
}
.book-slot-section-title {
  margin: 1rem 0 .35rem;
  font-size: .95rem;
}
.book-mode-pick { display: grid; gap: .55rem; margin: .35rem 0 1rem; }
.book-mode-opt {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: .7rem .8rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
}
.book-mode-opt strong { display: block; }
.book-mode-opt .muted { display: block; margin-top: .2rem; font-size: .86rem; }
.book-mode-opt.is-active {
  border-color: var(--brand, #2f5d50);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand, #2f5d50) 25%, transparent);
}
.parallel-svc-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: .45rem .65rem;
  margin-bottom: .75rem;
}
.parallel-svc-columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
  margin-bottom: .85rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: #f8faf9;
  max-height: min(420px, 55vh);
  overflow: auto;
}
.parallel-svc-col-title {
  font-weight: 700;
  font-size: .88rem;
  margin: 0 0 .4rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--line, #e5e7eb);
  color: var(--text, #1f2933);
}
.parallel-svc-item {
  display: flex !important;
  align-items: flex-start;
  gap: .4rem;
  margin: .28rem 0 !important;
  color: var(--text, #1f2933);
  font-size: .88rem;
  line-height: 1.3;
  cursor: pointer;
}
.parallel-svc-item input {
  width: auto;
  margin: .15rem 0 0;
  flex: 0 0 auto;
}
.slot-grid button, .slot-grid a.slot {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: .45rem .7rem; cursor: pointer; color: var(--ink);
}
.slot-grid a.slot:hover, .slot-grid button:hover { border-color: var(--brand); }
.progress { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.progress span {
  width: 2rem; height: .35rem; border-radius: 99px; background: #d9d0c4;
}
.progress span.on { background: var(--brand); }
.appt {
  border-left: 4px solid var(--brand);
  padding: .6rem .8rem; margin-bottom: .5rem; background: #fff; border-radius: 8px;
  border: 1px solid var(--line); border-left-width: 4px;
}
a.appt {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.appt:hover {
  border-color: var(--brand);
  background: #f6faf8;
  text-decoration: none;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-head {
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
  padding: .3rem;
}
.cal-cell {
  min-height: 92px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .35rem;
  color: inherit;
  text-decoration: none;
  display: block;
  overflow: hidden;
}
.cal-cell:hover { border-color: var(--brand); text-decoration: none; }
.cal-cell.empty { background: transparent; border-color: transparent; min-height: 0; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--brand-2); }
.cal-cell.focus { border-color: var(--brand); background: #f3faf6; }
.cal-daynum { font-weight: 700; font-size: .9rem; margin-bottom: .25rem; }
.cal-chips { display: flex; flex-direction: column; gap: 3px; }
.cal-chip {
  display: block;
  color: #fff;
  font-size: .65rem;
  line-height: 1.2;
  padding: 2px 4px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-empty-hint { color: #ccc; font-size: .8rem; }

/* Dyżury — przeciąganie / rozciąganie */
.duty-board { overflow: visible; }
.duty-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .65rem 1rem;
  margin-bottom: .85rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf8f4;
}
.duty-filter-bar label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .25rem;
}
.duty-filter-bar select {
  min-width: 220px;
  max-width: 100%;
}
.duty-palette-chip.is-dimmed {
  opacity: .38;
}
.duty-palette-chip.is-filter-active {
  outline: 2px solid #1f3d34;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(47, 93, 80, .2);
}
.duty-palette {
  padding: .75rem .85rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f7f3ec;
}
.duty-palette-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .55rem;
}
.duty-palette-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.duty-palette-chip {
  border: 0;
  border-radius: 999px;
  padding: .4rem .85rem;
  background: var(--chip-c, #3d6b5a);
  color: #fff;
  font: inherit;
  font-size: .88rem;
  font-weight: 650;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  touch-action: none;
}
.duty-palette-chip:active,
.duty-palette-chip.is-dragging { cursor: grabbing; opacity: .55; }
.duty-palette-ghost {
  position: fixed !important;
  z-index: 10001 !important;
  margin: 0 !important;
  pointer-events: none !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  transform: scale(1.06);
  opacity: .95 !important;
}
.duty-board.is-palette-dragging {
  cursor: copying;
}

.duty-cal-grid .duty-day {
  min-height: 150px;
  padding: .3rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.duty-cal-grid .duty-day.drag-over {
  border-color: var(--brand);
  background: #eef6f2;
  box-shadow: inset 0 0 0 2px rgba(47, 93, 80, .25);
}
.duty-day-link {
  color: inherit;
  text-decoration: none !important;
  font-weight: 700;
}
.duty-day-link:hover { color: var(--brand); }
.duty-day-track {
  position: relative;
  flex: 1;
  min-height: 110px;
  margin-top: .15rem;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent calc(100% / 7 - 1px),
      rgba(217, 208, 196, .45) calc(100% / 7 - 1px),
      rgba(217, 208, 196, .45) calc(100% / 7)
    );
}
.duty-block {
  position: absolute;
  left: 2px;
  width: calc(100% - 4px);
  right: auto;
  border-radius: 7px;
  color: #fff;
  font-size: .62rem;
  line-height: 1.15;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  touch-action: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  min-height: 18px;
  box-sizing: border-box;
}
.duty-block.is-split .duty-block-x,
.duty-block.is-split .duty-block-edit {
  width: 16px;
  height: 16px;
  font-size: .65rem;
  line-height: 16px;
}
.duty-block.is-split .duty-block-body strong {
  font-size: .58rem;
}
.duty-block.is-split .duty-block-hours {
  font-size: .52rem;
}
.duty-block.is-template {
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.65), 0 1px 4px rgba(0,0,0,.18);
  opacity: .92;
}
.duty-block.is-removing {
  opacity: .45;
  outline: 2px dashed #8b3a3a;
  filter: grayscale(.35);
}
.duty-block.is-placeholder {
  opacity: .28;
  filter: grayscale(.2);
}
.duty-block-ghost {
  position: fixed !important;
  z-index: 10000 !important;
  margin: 0 !important;
  pointer-events: none !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  transform: scale(1.04);
  cursor: grabbing;
}
.duty-block-ghost.is-removing {
  opacity: .7;
  outline: 2px dashed #8b3a3a;
  filter: grayscale(.2);
}
.duty-board.drop-to-remove {
  box-shadow: inset 0 0 0 2px rgba(139, 58, 58, .35);
}
.duty-board.drop-to-remove::after {
  content: 'Upuść poza kalendarzem, aby usunąć';
  display: block;
  margin-top: .55rem;
  padding: .45rem .7rem;
  border-radius: 10px;
  background: #f8e6e6;
  color: #8b3a3a;
  font-size: .9rem;
  font-weight: 650;
}

.duty-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.duty-modal[hidden] { display: none !important; }
.duty-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 26, .5);
}
.duty-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(92dvh, 640px);
  overflow-y: auto;
  margin: 0;
}
.duty-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}
.duty-modal-person {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
body.duty-modal-open { overflow: hidden; }
.duty-block-body {
  flex: 1;
  padding: 2px 5px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 0;
  cursor: grab;
  overflow: hidden;
}
.duty-block-body strong {
  font-size: .68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duty-block-hours {
  opacity: .95;
  white-space: nowrap;
}
.duty-block-handle {
  flex: 0 0 7px;
  cursor: ns-resize;
  background: rgba(255,255,255,.28);
}
.duty-block-handle:hover,
.duty-block.is-active .duty-block-handle { background: rgba(255,255,255,.45); }
.duty-block-x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 99px;
  background: rgba(20, 20, 20, .55);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
}
.duty-block-edit {
  position: absolute;
  top: 2px;
  right: 22px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 99px;
  background: rgba(20, 20, 20, .55);
  color: #fff;
  font-size: .72rem;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
}
.duty-block-x:hover {
  background: #8b3a3a;
}
.duty-block-edit:hover {
  background: rgba(47, 93, 80, .95);
}
.duty-block.is-split .duty-block-x,
.duty-block.is-split .duty-block-edit {
  width: 16px;
  height: 16px;
  font-size: .65rem;
  line-height: 16px;
}
.duty-block.is-split .duty-block-edit {
  right: 18px;
}
.duty-board-hint { font-size: .9rem; }

/* Aktualizacje */
.updates-list { display: flex; flex-direction: column; gap: .85rem; }
.updates-entry { margin: 0; }
.updates-entry-head { margin-bottom: .55rem; }
.updates-date {
  display: inline-block;
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--brand);
}
.updates-items {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  line-height: 1.4;
}
.updates-items li::marker { color: var(--brand); }

@media (max-width: 860px) {
  .duty-cal-grid .duty-day { min-height: 120px; }
  .duty-day-track { min-height: 88px; }
  .duty-block-body strong { font-size: .6rem; }
  .duty-block-hours { font-size: .55rem; }
  .duty-block-x,
  .duty-block-edit {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: .85rem;
  }
  .duty-block-edit { right: 28px; }
}

/* Grupy usług — accordion (booking + panel) */
.svc-accordion {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  width: 100%;
}
.svc-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 4px 14px rgba(28, 36, 33, .04);
  overflow: hidden;
}
.svc-group + .svc-group { margin-top: 0; }

.svc-group > summary,
.svc-group-summary-admin {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  column-gap: .65rem;
  padding: .95rem 1.05rem;
  margin: 0;
  font-weight: 650;
  user-select: none;
  background: linear-gradient(180deg, #f7f3ec, #f1ebe2);
  border-bottom: 1px solid transparent;
}
.svc-group-summary-admin {
  grid-template-columns: 1fr auto auto;
}
.svc-group-summary-admin.has-actions {
  grid-template-columns: 1fr auto auto auto;
}
.svc-group[open] > summary,
.svc-group[open] > .svc-group-summary-admin {
  border-bottom-color: var(--line);
  background: linear-gradient(180deg, #eef6f2, #e7f0eb);
}

.svc-group > summary::-webkit-details-marker,
.svc-group-summary-admin::-webkit-details-marker,
.svc-group > summary::marker,
.svc-group-summary-admin::marker {
  display: none;
  content: "";
}

.svc-group > summary::after,
.svc-group-summary-admin::after {
  content: "";
  width: .55rem;
  height: .55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .18s ease;
  margin-right: .15rem;
  justify-self: end;
}
.svc-group[open] > summary::after,
.svc-group[open] > .svc-group-summary-admin::after {
  transform: rotate(-135deg);
  margin-top: .25rem;
}

.svc-group-name {
  min-width: 0;
  line-height: 1.3;
  color: var(--ink);
}
.svc-group-count {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: .78rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}
.svc-group-actions {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.svc-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 .35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
}
.svc-move:hover { border-color: var(--brand); color: var(--brand); }
.svc-move.is-disabled {
  opacity: .35;
  pointer-events: none;
}
.svc-edit-link {
  font-size: .85rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--brand);
  margin-left: .15rem;
}
.svc-row-actions {
  white-space: nowrap;
  text-align: right;
}
.svc-row-actions .svc-move { margin-right: .15rem; }
.topbar-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.svc-group-body {
  padding: .65rem .75rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  background: #fff;
}
.svc-group-body table {
  margin: 0;
}
.svc-group-body th,
.svc-group-body td {
  vertical-align: top;
}

.svc-item {
  display: flex;
  gap: .75rem;
  align-items: start;
  margin: 0;
  padding: .7rem .8rem;
  text-decoration: none !important;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.svc-item.has-img .svc-item-main { flex: 1; }
.svc-item:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(47, 93, 80, .08);
}
.svc-item-main { min-width: 0; flex: 1; }
.svc-item-main strong {
  display: block;
  font-size: .98rem;
  line-height: 1.3;
}
.svc-item-meta {
  color: var(--muted);
  font-size: .86rem;
  margin-top: .2rem;
}
.svc-item-desc {
  color: var(--muted);
  font-size: .82rem;
  margin-top: .25rem;
  line-height: 1.35;
}
.svc-item-price {
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
  font-size: .95rem;
  padding-top: .1rem;
}

/* panel Usługi — bez podwójnego .card padding */
.svc-accordion .svc-group.card {
  padding: 0;
  margin-bottom: 0;
}

/* Zaznaczanie usług w karcie pracownika */
.svc-group-summary-staff {
  /* grid dziedziczony — name | count | chevron */
}
.svc-group-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .55rem .65rem;
  margin: 0 0 .35rem;
  background: #f3faf6;
  border: 1px dashed var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.svc-group-toggle input { width: auto; margin: 0; }
.svc-check-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.svc-check-item {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.svc-check-item:hover { border-color: var(--brand); }
.svc-check-item input {
  width: auto;
  margin: .15rem 0 0;
  flex-shrink: 0;
}
.svc-check-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.svc-check-text strong { line-height: 1.3; }

/* Czat firmowy — FAB + UI */
.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 91;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2f5d50;
  color: #fff;
  box-shadow: 0 10px 28px rgba(47, 93, 80, 0.38);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.chat-fab:hover {
  background: #244a40;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}
.chat-fab-icon { display: block; }
.chat-fab-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  animation: chat-fab-blink 1.1s ease-in-out infinite;
}
.chat-fab-dot[hidden] { display: none !important; }
.chat-fab-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  border: 2px solid #fff;
}
.chat-fab-count[hidden] { display: none !important; }
@keyframes chat-fab-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
@media (max-width: 640px) {
  .chat-fab { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}

.chat-app {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 0;
  min-height: calc(100vh - 180px);
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.chat-sidebar {
  border-right: 1px solid var(--line, #e2e8f0);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f8faf8;
}
.chat-sidebar-head {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted, #64748b);
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.chat-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px;
}
.chat-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.chat-list-item:hover { background: rgba(47, 93, 80, 0.08); }
.chat-list-item.is-active { background: rgba(47, 93, 80, 0.14); }
.chat-list-title {
  font-weight: 600;
  font-size: 14px;
  grid-column: 1;
  grid-row: 1;
}
.chat-list-badge {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.chat-list-preview {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 12px;
  color: var(--muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-list-item.has-unread .chat-list-title { font-weight: 700; }
.chat-list-item.is-observer .chat-list-title { font-style: italic; }
.chat-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
.chat-main-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.chat-main-title { min-width: 0; flex: 1 1 auto; }
.chat-main-title strong { display: block; font-size: 15px; }
.chat-main-title .muted { margin: 0; font-size: 12px; }
.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f1f5f3;
}
.chat-day {
  align-self: center;
  font-size: 11px;
  color: var(--muted, #64748b);
  background: rgba(148, 163, 184, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
  margin: 6px 0;
}
.chat-bubble {
  max-width: min(520px, 85%);
  align-self: flex-start;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px 12px 12px 4px;
  padding: 8px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.chat-bubble.is-mine {
  align-self: flex-end;
  background: #dceee6;
  border-color: #9fc4b4;
  border-radius: 12px 12px 4px 12px;
}
.chat-bubble-author {
  font-size: 11px;
  font-weight: 700;
  color: #2f5d50;
  margin-bottom: 2px;
}
.chat-bubble-body {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble-time {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted, #64748b);
  text-align: right;
}
.chat-composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 12px;
  border-top: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
}
.chat-composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  resize: vertical;
  margin: 0;
}
.chat-composer .btn { flex: 0 0 auto; }
.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--muted, #64748b);
  text-align: center;
}
.chat-empty[hidden],
.chat-main[hidden] { display: none !important; }

@media (max-width: 820px) {
  .chat-app {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 160px);
  }
  .chat-app.chat-show-thread .chat-sidebar { display: none; }
  .chat-app:not(.chat-show-thread) .chat-panel { display: none; }
}

/* Wizyty — mini-kalendarz + dzienny board pracowników */
.staff-legend-title {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .55rem;
  font-weight: 600;
}
.staff-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none !important;
  color: inherit;
  padding: .25rem .55rem .25rem .3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .88rem;
  margin: 0 .2rem .35rem 0;
}
.staff-legend-item:hover { border-color: var(--brand); }
.staff-legend-item.is-active {
  border-color: var(--brand);
  background: #e8efe9;
}
.staff-legend-swatch {
  width: .9rem;
  height: .9rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.staff-legend-name { line-height: 1.2; }

.view-tabs { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.settings-view-tabs {
  gap: .3rem;
}
.settings-view-tabs .btn {
  padding: .35rem .7rem;
  font-size: .82rem;
  font-weight: 600;
}
.settings-subtabs {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  margin: -.35rem 0 1rem;
  padding: .28rem;
  background: rgba(0,0,0,.03);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.settings-master-switch {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.settings-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ui-switch {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.ui-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.ui-switch-track {
  position: relative;
  width: 3rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #c5c9ce;
  transition: background .2s ease;
  flex-shrink: 0;
}
.ui-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.ui-switch input:checked + .ui-switch-track {
  background: var(--brand, #3d6b5a);
}
.ui-switch input:checked + .ui-switch-track .ui-switch-knob {
  transform: translateX(1.3rem);
}
.ui-switch-text {
  font-weight: 650;
  font-size: .92rem;
  min-width: 5.5rem;
}
.ui-switch-sm .ui-switch-track {
  width: 2.35rem;
  height: 1.35rem;
}
.ui-switch-sm .ui-switch-knob {
  width: 1.05rem;
  height: 1.05rem;
}
.ui-switch-sm input:checked + .ui-switch-track .ui-switch-knob {
  transform: translateX(1rem);
}
.ui-switch-sm .ui-switch-text {
  font-size: .78rem;
  min-width: 2.2rem;
  color: var(--muted, #6b7280);
}
.settings-event-list {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.settings-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: .55rem .15rem;
  border-bottom: 1px solid var(--line, #e8ece9);
}
.settings-event-row:last-child {
  border-bottom: 0;
}
.settings-event-label {
  font-size: .92rem;
  line-height: 1.35;
  color: var(--ink, #1f2933);
}
.settings-event-extra {
  padding: .35rem 0 .75rem .15rem;
  border-bottom: 1px solid var(--line, #e8ece9);
}
.ui-switch input:focus-visible + .ui-switch-track {
  outline: 2px solid var(--brand, #3d6b5a);
  outline-offset: 2px;
}
.ui-switch input:disabled + .ui-switch-track {
  opacity: .55;
}
.ui-switch:has(input:disabled) {
  cursor: not-allowed;
  opacity: .9;
}
.ui-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  flex-wrap: wrap;
  margin: .55rem 0;
}
.ui-switch-label {
  font-size: .92rem;
  line-height: 1.35;
  color: var(--ink, #1f2933);
  flex: 1 1 12rem;
}
.ui-switch-stack {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin: .55rem 0 .85rem;
}
.ui-switch-stack .ui-switch-row {
  margin: 0;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line, #e8ece9);
}
.ui-switch-stack .ui-switch-row:last-child {
  border-bottom: 0;
}
.settings-subtab {
  display: inline-flex;
  align-items: center;
  padding: .32rem .65rem;
  border-radius: 7px;
  text-decoration: none !important;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.settings-subtab:hover {
  background: rgba(255,255,255,.75);
  border-color: var(--line);
}
.settings-subtab.is-active {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  color: var(--brand, #3d6b5a);
}
.settings-panels-disabled {
  opacity: .62;
  filter: grayscale(.12);
}
.settings-off-banner,
.settings-shared-banner,
.settings-cost-warning {
  margin: .75rem 0 0;
  padding: .65rem .8rem;
  border-radius: 8px;
  font-size: .88rem;
  line-height: 1.35;
}
.settings-off-banner {
  background: #f4f1ea;
  border: 1px solid #e4ddd0;
  color: #5c5346;
}
.settings-shared-banner {
  background: #eef5f1;
  border: 1px solid #d5e6dc;
  color: #2f5d50;
}
.settings-cost-warning {
  background: #fbf3e8;
  border: 1px solid #efd9b8;
  color: #7a4e1a;
}
.settings-advanced {
  margin-top: 1rem;
  padding: .65rem .8rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
}
.settings-advanced summary {
  cursor: pointer;
  font-weight: 650;
}
.book-v2-rules-card {
  margin: 0 0 1rem;
}
.book-hex-more {
  margin-top: .45rem;
}
.book-hex-more summary {
  cursor: pointer;
  font-size: .82rem;
  color: var(--muted, #6b7280);
}
.mail-tpl-select {
  max-width: 32rem;
}
.ph-picker {
  max-width: 32rem;
  margin-bottom: 1rem;
}
.ph-picker .appt-picker-list {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
}
.btn.secondary.is-active {
  outline: 2px solid var(--brand);
  background: #e8efe9;
}

/* —— Pracownicy: lista + godziny pracy —— */
.staff-list { display: flex; flex-direction: column; gap: .65rem; }
.staff-list-row {
  display: flex;
  gap: .85rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfb;
}
.staff-list-row.is-off { opacity: .72; background: #f5f5f5; }
.staff-list-main { min-width: 0; flex: 1 1 220px; }
.staff-list-name {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: 1.02rem;
}
.staff-list-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.staff-list-meta { margin-top: .2rem; font-size: .88rem; }
.staff-list-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.staff-pill {
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #e8efe9;
  color: var(--brand);
}
.staff-pill.is-off { background: #eee; color: #666; }
.staff-pill.is-on { background: #e8efe9; }

.sched-intro { margin: 0 0 .55rem; max-width: 42rem; line-height: 1.35; font-size: .9rem; }
.sched-tabs { margin-bottom: .65rem !important; }
.sched-week-card h2,
.sched-month-card h2 { font-size: 1.1rem; margin-bottom: .25rem; }
.sched-week-card > .muted,
.sched-month-nav .muted { font-size: .88rem; margin-bottom: .35rem; }
.sched-week-list { display: flex; flex-direction: column; gap: .28rem; margin: .55rem 0 .75rem; }
.sched-week-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .45rem .65rem;
  align-items: center;
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
  transition: background .15s, border-color .15s;
}
.sched-week-row.is-on {
  background: #f3faf6;
  border-color: #c5d9cc;
}
.sched-week-toggle {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  font-weight: 600;
  min-width: 11.5rem;
}
.sched-week-day { font-size: .9rem; }
.sched-week-times {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}
.sched-break-label {
  margin-left: .35rem;
  font-size: .75rem;
  font-weight: 650;
  color: var(--muted);
}
.sched-flex-controls {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
  margin-left: .15rem;
}
.sched-flex-min {
  width: 4.4rem !important;
  min-width: 4.4rem !important;
  padding: .28rem .35rem !important;
}
.sched-time-label {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 500;
}
.sched-time-label input[type="time"] {
  width: auto;
  min-width: 6.4rem;
  margin: 0;
  padding: .28rem .4rem;
  font-size: .88rem;
}
.sched-time-sep { color: var(--muted); }
.sched-week-badge {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--muted);
  justify-self: end;
}
.sched-week-row.is-on .sched-week-badge { color: var(--brand); }

.sched-month-nav {
  display: flex;
  justify-content: space-between;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .55rem;
}
.sched-month-controls {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}
.sched-month-title {
  min-width: 8rem;
  text-align: center;
  font-size: .98rem;
}
.sched-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  margin: 0 0 .55rem;
  font-size: .76rem;
  color: var(--muted);
}
.sched-leg { display: inline-flex; align-items: center; gap: .3rem; }
.sched-leg i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid var(--line);
}
.sched-leg-work i { background: #eef7f1; border-color: #b7d4c2; }
.sched-leg-off i { background: #fdecea; border-color: #e8b4ae; }
.sched-leg-custom i { background: #eef3fb; border-color: #b4c7e8; }
.sched-leg-default-off i { background: #f3f3f3; border-color: #ddd; }
.sched-leg-appts i { background: #c4a574; border-color: #a88955; }
.sched-day-appts {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 .25rem;
  border-radius: 999px;
  background: #c4a574;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}
.sched-cal-grid .sched-day { position: relative; }
.reassign-card .reassign-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  align-items: flex-end;
  margin: 0 0 1rem;
  padding: .75rem .85rem;
  background: #f7f3ec;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.reassign-bulk label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; }
.reassign-bulk select { min-width: 220px; }
.reassign-list { display: flex; flex-direction: column; gap: .75rem; }
.reassign-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: .85rem 1.1rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.reassign-info strong { font-size: 1.05rem; }
.reassign-fields {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: .55rem .75rem;
  align-items: start;
}
.reassign-fields label { display: flex; flex-direction: column; gap: .2rem; font-size: .82rem; }
.reassign-status { grid-column: 1 / -1; font-size: .8rem; }
.reassign-actions { flex-wrap: wrap; }
.reassign-notify-opt {
  margin: 0 0 1rem;
  padding: .75rem .85rem;
  border: 1px solid var(--brand-2);
  border-radius: 12px;
  background: #f8f1e4;
}
.reassign-notify-opt .ui-switch-row {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.reassign-notify-opt .ui-switch-label {
  font-weight: 650;
  color: var(--ink);
}
@media (max-width: 720px) {
  .reassign-row { grid-template-columns: 1fr; }
  .reassign-fields { grid-template-columns: 1fr; }
}

.sched-cal-grid { gap: 4px; }
.sched-cal-grid .cal-head { font-size: .72rem; padding: .1rem 0; }
.sched-cal-grid .sched-day {
  min-height: 52px;
  padding: .28rem .32rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sched-cal-grid .sched-day .cal-daynum { font-size: .82rem; margin-bottom: 0; }
.sched-cal-grid .sched-day:disabled { cursor: default; opacity: 1; }
.sched-cal-grid .sched-day.is-working { background: #eef7f1; }
.sched-cal-grid .sched-day.is-off { background: #fdecea; }
.sched-cal-grid .sched-day.is-custom { background: #eef3fb; }
.sched-cal-grid .sched-day.is-default-off { background: #f6f6f6; color: #888; }
.sched-cal-grid .sched-day.is-selected {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
  z-index: 1;
}
.sched-day-meta {
  font-size: .65rem;
  font-weight: 600;
  line-height: 1.15;
  color: #355;
}
.sched-day.is-off .sched-day-meta { color: #8a3a32; }
.sched-day.is-custom .sched-day-meta { color: #2f4d7a; }
.sched-day.is-default-off .sched-day-meta { color: #999; }
.sched-day-note {
  font-size: .58rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sched-day-editor {
  margin-top: .75rem;
  padding: .75rem .85rem;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: #f7fbf8;
}
.sched-cal-wrap {
  position: relative;
}
.sched-day-popover {
  position: absolute;
  z-index: 40;
  max-width: calc(100% - 8px);
  padding: .7rem .8rem .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 10px 28px rgba(28, 36, 33, .16), 0 2px 6px rgba(28, 36, 33, .06);
  animation: sched-pop-in .16s ease-out;
}
.sched-day-popover[hidden] { display: none !important; }
@keyframes sched-pop-in {
  from { opacity: 0; transform: translateY(4px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.sched-day-popover-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fffdf9;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
  pointer-events: none;
}
.sched-day-popover.place-below .sched-day-popover-arrow {
  top: -7px;
}
.sched-day-popover.place-above .sched-day-popover-arrow {
  bottom: -7px;
  transform: rotate(225deg);
}
.sched-day-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .45rem;
}
.sched-day-popover-head h3 {
  font-size: .98rem;
  font-weight: 700;
}
.sched-day-popover-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .15rem;
  border-radius: 6px;
}
.sched-day-popover-close:hover {
  color: var(--ink);
  background: #f0ebe3;
}
.sched-popover-actions {
  margin-top: .65rem;
  margin-bottom: 0;
}
.sched-day-popover .sched-choice-list {
  grid-template-columns: 1fr;
  gap: .3rem;
}
@media (min-width: 520px) {
  .sched-day-popover .sched-choice-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.sched-day-popover h3 { font-size: 1rem; margin-bottom: .35rem; }
.sched-choice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  margin: .45rem 0 .65rem;
}
.sched-choice {
  display: flex;
  gap: .4rem;
  align-items: flex-start;
  margin: 0;
  padding: .45rem .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: .88rem;
}
.sched-choice:has(input:checked),
.sched-choice.is-checked {
  border-color: var(--brand);
  background: #eef7f1;
  box-shadow: inset 0 0 0 1px var(--brand);
}
.sched-choice input { width: auto; margin: .1rem 0 0; flex-shrink: 0; }
.sched-choice span { display: flex; flex-direction: column; gap: 0; line-height: 1.25; }
.sched-choice strong { font-size: .86rem; }
.sched-choice .muted { font-size: .72rem; }
.sched-custom-times { margin-bottom: .15rem; }
.sched-custom-times.is-locked {
  opacity: .55;
  pointer-events: none;
}
.sched-custom-times.is-locked input {
  background: #eee9e1;
  color: #6a655c;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .sched-week-row {
    grid-template-columns: 1fr auto;
    gap: .3rem .5rem;
  }
  .sched-week-times { grid-column: 1 / -1; }
  .sched-week-badge { justify-self: end; }
  .sched-choice-list { grid-template-columns: 1fr; }
  .sched-cal-grid .sched-day { min-height: 44px; padding: .2rem; }
  .staff-list-actions { width: 100%; }
  .staff-list-actions .btn { flex: 1 1 auto; text-align: center; }
}

.appt-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.appt-topbar {
  flex-wrap: wrap;
  align-items: flex-start;
}
.appt-topbar .appt-view-modes {
  width: 100%;
  margin-top: .15rem;
}
.appt-month-grid .appt-month-day {
  min-height: 118px;
}
.appt-month-day .cal-daynum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
}
.appt-month-day .cal-daynum > a:first-child {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}
.appt-month-day .cal-daynum > a:first-child:hover {
  color: var(--brand);
  text-decoration: underline;
}
.appt-month-add {
  font-size: .85rem;
  line-height: 1;
  padding: 0 .2rem;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
}
.appt-month-day:hover .appt-month-add,
.appt-month-day.focus .appt-month-add {
  opacity: 1;
}
.appt-month-add:hover { color: var(--brand); text-decoration: none; }
.cal-chip.is-pending { outline: 1px dashed rgba(255,255,255,.85); }
.cal-chip.is-manual { font-style: italic; }
.cal-chip.appt-month-more {
  background: #ebe4d8;
  color: var(--muted);
  text-align: center;
}
.appt-mini {
  position: sticky;
  top: .75rem;
  padding: .85rem;
  min-width: 0;
  max-width: 100%;
}
.appt-mini-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .7rem;
}
.appt-mini-nav strong { font-size: .95rem; text-align: center; min-width: 0; }
.appt-mini-nav .btn { padding: .25rem .55rem; flex-shrink: 0; }
.mini-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
}
.mini-cal-head {
  text-align: center;
  font-size: .7rem;
  color: var(--muted);
  font-weight: 600;
  padding: .15rem 0;
}
.mini-cal-cell {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-decoration: none !important;
  color: inherit;
  font-size: .78rem;
  border: 1px solid transparent;
  position: relative;
}
.mini-cal-cell:hover { background: #efe8dc; }
.mini-cal-cell.empty { pointer-events: none; }
.mini-cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.mini-cal-cell.selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.mini-cal-cell.has-appts .mini-dot {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--brand-2);
}
.mini-cal-cell.selected .mini-dot { background: #fff; }
.mini-daynum { font-weight: 600; line-height: 1; }
.appt-mini-filter { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.appt-mini-filter .staff-legend-item { display: flex; width: 100%; margin: 0 0 .35rem; }

.appt-dayboard-card {
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}
.dayboard-head { margin-bottom: .75rem; }
.day-board-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.day-board {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--cols), minmax(140px, 1fr));
  grid-template-rows: auto var(--board-h);
  min-width: calc(var(--gutter) + var(--cols) * 140px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.day-board-corner {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f7f3ec;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.day-board-staffhead {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .6rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #f7f3ec;
  font-weight: 600;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-board-hours {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fffdf9;
  border-right: 1px solid var(--line);
}
.day-hour-label {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  background: #fffdf9;
}
.day-board-col {
  position: relative;
  border-right: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent calc(60px * 1.35 - 1px),
      rgba(217, 208, 196, .55) calc(60px * 1.35 - 1px),
      rgba(217, 208, 196, .55) calc(60px * 1.35)
    );
  min-width: 0;
}
.day-gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(217, 208, 196, .7);
  pointer-events: none;
}
.day-block {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 8px;
  padding: 0;
  color: #fff;
  font-size: .75rem;
  line-height: 1.2;
  overflow: hidden;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.day-block-body {
  padding: .3rem .4rem;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
}
.day-block-buffer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: lowercase;
  opacity: .95;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,.22) 0 4px,
    rgba(0,0,0,.08) 4px 8px
  );
  border-top: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.92);
}
.day-block:hover { filter: brightness(1.08); z-index: 2; }
.day-block strong { font-size: .78rem; }
.day-block-client { opacity: .9; font-size: .7rem; }
.day-block.is-pending {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,.12) 0 6px,
    transparent 6px 12px
  ) !important;
  box-shadow: 0 0 0 2px #c4a574, 0 2px 8px rgba(0,0,0,.12);
}
.day-block-pending {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #efe2cc;
  color: #6b4e1f;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  z-index: 2;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}
.day-block-pending svg {
  width: .85rem !important;
  height: .85rem !important;
  max-width: .85rem;
  max-height: .85rem;
  min-width: 0;
  min-height: 0;
  fill: currentColor;
  display: block;
}
.day-block-pending-bang {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: .75rem;
  height: .75rem;
  border-radius: 99px;
  background: #8b3a3a;
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  line-height: .75rem;
  text-align: center;
}
.day-block.is-pending .day-block-client::after {
  content: ' · e-mail?';
  font-weight: 700;
  opacity: 1;
}
.pending-legend {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .65rem;
  font-size: .82rem;
  vertical-align: middle;
}
.day-block-pending--legend {
  position: relative;
  top: auto;
  right: auto;
  display: inline-grid;
}
.day-block-manual {
  position: absolute;
  top: 2px;
  right: 3px;
  z-index: 2;
  width: 1rem;
  height: 1rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, .92);
  color: #3d4a5c;
  font-size: .62rem;
  font-weight: 800;
  line-height: 1rem;
  text-align: center;
  letter-spacing: -.02em;
  border: 1px solid rgba(61, 74, 92, .35);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.day-block-manual--legend {
  position: relative;
  top: auto;
  right: auto;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
}
.day-block.is-manual {
  box-shadow: inset 0 0 0 1.5px rgba(61, 74, 92, .28);
}
.badge-pending {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #efe2cc;
  color: #6b4e1f;
  font-weight: 650;
}
.badge-manual {
  background: #e8edf3;
  color: #3d4a5c;
  font-weight: 650;
}
.badge-online {
  background: #e5eef8;
  color: #2a5080;
  font-weight: 650;
}
.badge-pending svg {
  width: .95rem !important;
  height: .95rem !important;
  max-width: .95rem;
  max-height: .95rem;
  min-width: 0;
  min-height: 0;
  fill: currentColor;
  flex-shrink: 0;
  display: block;
}
.appt.is-pending-appt {
  background: #fff8ef;
  border-left-width: 5px;
}
.day-col-add {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  text-decoration: none !important;
  font-size: .9rem;
  z-index: 1;
  border: 1px solid var(--line);
}
.day-col-add:hover { background: var(--brand); color: #fff; }
.badge-paid {
  background: #e5f4ea;
  color: #2f6b4f;
  font-weight: 650;
}
.badge-unpaid {
  background: #f8e6e6;
  color: #8b3a3a;
  font-weight: 650;
}
.settle-box {
  margin-top: .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  padding: .55rem .75rem .75rem;
}
.settle-box > summary {
  cursor: pointer;
  font-weight: 650;
  padding: .25rem 0;
  list-style: none;
}
.settle-box > summary::-webkit-details-marker { display: none; }
.settle-box > summary::before {
  content: '▸ ';
  color: var(--brand);
}
.settle-box[open] > summary::before { content: '▾ '; }
.settle-form { margin-top: .55rem; }
.settle-paid {
  margin: .55rem 0 .85rem;
}
.settle-paid .ui-switch-label {
  font-weight: 650;
}
.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .75rem;
}
.pay-method {
  display: inline-flex !important;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: .4rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
}
.pay-method:has(input:checked) {
  border-color: var(--brand);
  background: #e8efe9;
  font-weight: 650;
}
.pay-method input { width: auto; margin: 0; }
.settle-voucher-wrap { display: none; margin-bottom: .75rem; }
#settle-voucher-wrap { display: none; }
.voucher-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem;
  align-items: center;
}
.voucher-check-result {
  margin-top: .55rem;
  padding: .65rem .75rem;
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.35;
  border: 1px solid var(--line);
  background: #f7f3ec;
}
.voucher-check-result.status-full { background: #e5f4ea; border-color: #b7d9c4; color: #2f6b4f; }
.voucher-check-result.status-partial { background: #efe2cc; border-color: #d4b98a; color: #6b4e1f; }
.voucher-check-result.status-used,
.voucher-check-result.status-expired,
.voucher-check-result.status-not_found,
.voucher-check-result.status-inactive,
.voucher-check-result.status-empty,
.voucher-check-result.status-error { background: #f8e6e6; border-color: #e0b4b4; color: #8b3a3a; }
.voucher-check-result.status-loading { background: #eef2f0; color: var(--muted); }
.settle-rest-wrap { margin-top: .75rem; }
.settle-cash-wrap {
  margin: .75rem 0 1rem;
  padding: .75rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f3ec;
}
.settle-cash-due-line { margin: 0 0 .55rem; font-size: .95rem; }
.settle-cash-change-box {
  margin-top: .65rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: .95rem;
}
.settle-cash-change-box strong {
  font-size: 1.35rem;
  font-weight: 750;
}
.settle-cash-change-box strong.cash-ok { color: #2f6b4f; }
.settle-cash-change-box strong.cash-exact { color: var(--brand); }
.settle-cash-change-box strong.cash-short { color: #8b3a3a; }

.settle-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.settle-modal[hidden] { display: none !important; }
.settle-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 26, .5);
}
.settle-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(92dvh, 760px);
  overflow-y: auto;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}
.settle-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .25rem;
}
body.settle-open { overflow: hidden; }

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.confirm-modal[hidden] { display: none !important; }
.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 26, .5);
}
.confirm-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  margin: 0;
}
body.confirm-open { overflow: hidden; }

.settle-products {
  margin: .55rem 0 1rem;
  padding: .65rem .7rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
}
.settle-product-search-wrap { position: relative; margin-bottom: .55rem; }
.settle-product-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(28,36,33,.12);
}
.settle-suggest-item {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: .55rem .7rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.settle-suggest-item:last-child { border-bottom: 0; }
.settle-suggest-item:hover { background: #e8efe9; }
.settle-suggest-item span { color: var(--muted); font-size: .82rem; }
.settle-suggest-empty {
  padding: .65rem .7rem;
  color: var(--muted);
  font-size: .9rem;
}
.settle-product-list { display: flex; flex-direction: column; gap: .45rem; }
.settle-product-row {
  display: grid !important;
  grid-template-columns: 1fr 72px;
  gap: .55rem;
  align-items: center;
  margin: 0;
  color: var(--ink);
}
.settle-product-selected {
  grid-template-columns: 1fr 72px 2rem;
  padding: .35rem .4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
}
.settle-product-remove {
  padding: .25rem .4rem !important;
  min-width: 2rem;
  line-height: 1;
  font-size: 1.1rem;
}
.settle-product-name {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  font-size: .92rem;
  min-width: 0;
}
.settle-product-qty {
  width: 72px;
  text-align: center;
  padding: .4rem .35rem;
}
.settle-total { margin: .55rem 0 0; font-size: 1.02rem; }
.sold-products {
  margin: .35rem 0 .2rem;
  padding-left: 1.1rem;
  font-size: .88rem;
  color: var(--muted);
}
.station-svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .85rem;
  margin: .5rem 0 1rem;
}
.svc-group-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .65rem .7rem;
  background: #fff;
}

/* Raporty */
.report-page { display: flex; flex-direction: column; gap: 1.25rem; }
.report-hero { margin-bottom: 0; }
.report-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}
.report-period-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .25rem;
  background: #efe8dc;
  border-radius: 999px;
}
.report-period-tabs a {
  padding: .45rem .85rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none !important;
  font-weight: 650;
  font-size: .9rem;
}
.report-period-tabs a.is-active {
  background: var(--brand);
  color: #fff;
}
.report-period-bar { margin-bottom: .55rem; }
.report-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
.report-nav input[type="date"] { width: auto; min-width: 10rem; }
.report-range-fields {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}
.report-range-fields > div { min-width: 10rem; }
.report-period-label {
  font-size: 1.15rem;
  font-weight: 750;
  margin-top: .35rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: baseline;
}
.report-scope-chip {
  display: inline-flex;
  align-items: center;
  font-size: .82rem;
  font-weight: 650;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: #e8efe9;
  color: var(--brand);
}
.report-scope-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
  margin-bottom: .75rem;
}
.report-scope-bar > div { min-width: 11rem; flex: 1 1 11rem; }
.report-scope-bar select { width: 100%; }

.report-highlight {
  margin: 0;
  background: linear-gradient(160deg, #e8efe9, #fffdf9 60%);
  border-color: #c5d6cb;
}
.report-highlight-label {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  margin-bottom: .45rem;
}
.report-highlight-main {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.report-highlight-main strong { font-size: 1.15rem; }
.report-highlight-note { margin: .65rem 0 0; font-size: .88rem; }
.report-staff-card.is-top {
  border-color: #b7d9c4;
  box-shadow: 0 0 0 1px #b7d9c4;
}
.report-staff-head .report-rank-num {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #efe8dc;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: .9rem;
  flex-shrink: 0;
}
.report-bar-label a { color: inherit; font-weight: 650; }
.report-bar-label a:hover { color: var(--brand); }
.report-bar-val { gap: .15rem; }

.report-section-title {
  margin: 0 0 .65rem;
  font-size: 1.15rem;
}
.report-section-head { margin-bottom: .65rem; }
.report-section-hint { margin: .2rem 0 0; font-size: .9rem; }

.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}
.report-kpi {
  margin-bottom: 0;
  padding: 1rem 1.05rem;
}
.report-kpi-main {
  background: linear-gradient(160deg, #e8efe9, #fffdf9 55%);
  border-color: #c5d6cb;
}
.report-kpi-label {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.report-kpi-val {
  font-size: 1.7rem;
  font-weight: 750;
  margin-top: .35rem;
  line-height: 1.15;
}
.report-kpi-note {
  margin-top: .4rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.35;
}
.report-kpi-note.warn { color: #8b3a3a; font-weight: 650; }

.report-staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.report-staff-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.report-staff-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .55rem;
  align-items: center;
}
.report-staff-revenue {
  font-size: 1.15rem;
  font-weight: 750;
  white-space: nowrap;
}
.report-staff-util-top {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
  font-size: .9rem;
}
.util-bar {
  height: 6px;
  background: #efe8dc;
  border-radius: 99px;
  overflow: hidden;
  max-width: 110px;
}
.util-bar-lg {
  max-width: none;
  height: 10px;
  margin-bottom: .35rem;
}
.util-bar span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 99px;
}
.util-hi { color: #2f6b4f; }
.util-hi .util-bar span { background: #2f6b4f; }
.util-mid { color: #6b4e1f; }
.util-mid .util-bar span { background: #c4a574; }
.util-lo { color: #8b3a3a; }
.util-lo .util-bar span { background: #8b3a3a; }
.report-staff-time { font-size: .82rem; }
.report-staff-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  padding-top: .55rem;
  border-top: 1px solid var(--line);
}
.report-staff-meta > div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  font-size: .82rem;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.report-detail-card { margin-bottom: 0; }
.report-detail-card h3 {
  margin: 0 0 .75rem;
  font-size: 1rem;
}
.report-share-list,
.report-simple-list,
.report-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.report-share-top,
.report-simple-list li,
.report-rank-list li {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  align-items: baseline;
}
.report-share-bar {
  height: 8px;
  background: #efe8dc;
  border-radius: 99px;
  overflow: hidden;
  margin: .35rem 0 .2rem;
}
.report-share-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2f5d50, #3d7a68);
}
.report-simple-list li {
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
}
.report-simple-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.report-rank-list li {
  align-items: center;
  gap: .65rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
}
.report-rank-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.report-rank-num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #efe8dc;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: .85rem;
  flex-shrink: 0;
}
.report-rank-body { flex: 1; min-width: 0; }
.report-rank-val { font-weight: 700; white-space: nowrap; }

.report-bars { display: flex; flex-direction: column; gap: .45rem; }
.report-bar-row {
  display: grid;
  grid-template-columns: 52px 1fr minmax(110px, auto);
  gap: .55rem;
  align-items: center;
  font-size: .88rem;
}
.report-bar-track {
  height: 12px;
  background: #efe8dc;
  border-radius: 99px;
  overflow: hidden;
}
.report-bar-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2f5d50, #3d7a68);
  border-radius: 99px;
}
.report-bar-val {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: .05rem;
  line-height: 1.2;
}
.report-bar-label { color: var(--muted); font-weight: 650; }

@media (max-width: 1100px) {
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-staff-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .report-kpis,
  .report-grid { grid-template-columns: 1fr; }
  .report-staff-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-bar-row { grid-template-columns: 44px 1fr; }
  .report-bar-val { grid-column: 2; text-align: left; flex-direction: row; gap: .5rem; }
}

.appt:target {
  outline: 2px solid var(--brand);
  background: #f3faf6;
}

/* Mobile day board (stacked) — ukryty na desktopie */
.day-board-mobile { display: none; }

@media (max-width: 980px) {
  .appt-workspace { grid-template-columns: 1fr; }
  .appt-mini { position: static; }
}
@media (max-width: 860px) {
  /* Menu zostaje z lewej; na wąskich ekranach startowo zwinięte (JS + localStorage) */
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  html.sidebar-collapsed .shell { grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar { padding: .9rem .7rem 1rem; height: 100dvh; max-height: 100dvh; overflow: hidden; }
  .main {
    padding: .85rem .65rem 5rem;
    min-width: 0;
    overflow-x: hidden;
  }
  .sidebar-toggle-label { display: none; }
  html:not(.sidebar-collapsed) .sidebar-toggle { padding: .4rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 70px; padding: .2rem; }
  .cal-chip { font-size: .58rem; }
  .svc-group > summary,
  .svc-group-summary-admin {
    padding: .8rem .85rem;
  }
  .topbar { flex-wrap: wrap; gap: .55rem; }
  .appt-topbar h1 { font-size: 1.25rem; margin: 0; }
  .appt-topbar .view-tabs .btn { padding: .45rem .7rem; font-size: .88rem; }

  .appt-workspace { gap: .75rem; }
  .appt-mini {
    padding: .7rem;
    margin-bottom: 0;
  }
  .mini-cal { gap: 2px; }
  .mini-cal-cell { font-size: .72rem; border-radius: 6px; }
  .mini-cal-head { font-size: .65rem; }
  .appt-mini-filter { margin-top: .75rem; padding-top: .65rem; }
  .appt-mini-filter-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: .4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .2rem;
  }
  .appt-mini-filter .staff-legend-item {
    display: inline-flex;
    width: auto;
    flex-shrink: 0;
    margin: 0;
    white-space: nowrap;
  }

  /* Desktop multi-col board off; stacked mobile on */
  .day-board-desktop { display: none !important; }
  .day-board-mobile { display: flex; flex-direction: column; gap: .85rem; }
  .mob-staff-board {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
  }
  .mob-staff-head {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .7rem;
    background: #f7f3ec;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
  }
  .mob-staff-head strong { font-size: .92rem; }
  .mob-staff-head .muted { margin-left: auto; font-size: .8rem; }
  .mob-staff-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mob-staff-grid {
    display: grid;
    grid-template-columns: var(--gutter) minmax(0, 1fr);
    grid-template-rows: var(--board-h);
    width: 100%;
    min-width: 0;
  }
  .mob-staff-grid .day-board-hours {
    position: relative;
    left: auto;
  }
  .mob-staff-grid .day-board-col {
    border-right: 0;
  }
  .day-block {
    font-size: .7rem;
  }
  .day-block-body {
    padding: .25rem .35rem;
  }
  .pending-legend {
    display: flex;
    flex-wrap: wrap;
    margin-left: 0;
    margin-top: .35rem;
    gap: .4rem;
  }
  .day-block-pending--legend {
    width: 1.2rem;
    height: 1.2rem;
  }
  .card { padding: .75rem .8rem; }
  #day-details .form-actions .btn {
    flex: 1 1 auto;
    text-align: center;
    font-size: .85rem;
    padding: .5rem .65rem;
  }
}

/* Ustawienia SMS — placeholdery */
.sms-ph-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .35rem 0 .65rem;
}
.sms-ph-chip {
  border: 1px solid var(--line);
  background: #f7f3ec;
  color: var(--text);
  border-radius: 8px;
  padding: .28rem .55rem;
  font: inherit;
  font-size: .82rem;
  font-family: ui-monospace, Consolas, monospace;
  cursor: pointer;
}
.sms-ph-chip:hover { border-color: var(--brand); background: #eef6f2; }
.sms-ph-chip.is-copied {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.sms-tpl-area { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.mail-tpl-block {
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
}
.mail-tpl-block:last-of-type { border-bottom: 0; }

/* Globalny loader przy przełączaniu stron */
.page-loading {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 243, 236, .72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.page-loading[hidden] { display: none !important; }
.page-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.1rem 1.35rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line, #e4ddd2);
  box-shadow: 0 10px 36px rgba(31, 45, 40, .14);
}
.page-loading-spinner {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 3px solid #e4ddd2;
  border-top-color: var(--brand, #2f5d50);
  animation: page-loading-spin .7s linear infinite;
}
.page-loading-text {
  font-size: .92rem;
  font-weight: 650;
  color: var(--muted, #6b6560);
}
@keyframes page-loading-spin {
  to { transform: rotate(360deg); }
}
html.is-page-loading,
html.is-page-loading body {
  cursor: progress;
}

.role-card { margin-bottom: 1rem; }
.role-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 1rem;
  align-items: start;
}
.role-sidebar { padding: 1rem; }
.role-side-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.role-side-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .7rem .8rem;
  border: 1px solid var(--line, #e4ddd2);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.role-side-item:hover { border-color: var(--brand, #2f5d50); }
.role-side-item.is-active {
  border-color: var(--brand, #2f5d50);
  background: #eef6f2;
}
.role-editor { padding: 1rem 1.1rem 1.2rem; }
.role-editor-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}
.role-accordion { margin-bottom: 1rem; }
.role-group-body { padding: .85rem 1rem 1.1rem; }
.role-rename { max-width: 420px; flex: 1; }
.role-perm-section { margin-bottom: 1.1rem; }
.role-perm-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .55rem;
}
.role-perm-section-head h3 {
  margin: 0;
  font-size: 1rem;
}
.role-perm-bulk { display: flex; gap: .4rem; flex-wrap: wrap; }
.role-perm-bulk .btn { padding: .35rem .65rem; font-size: .82rem; }
.role-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .55rem .85rem;
}
.role-perm-item {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  margin: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--line, #e4ddd2);
  border-radius: 10px;
  background: #faf8f5;
}
.role-perm-item input { margin-top: .2rem; width: auto; flex: 0 0 auto; }
.role-perm-item span { display: flex; flex-direction: column; gap: .15rem; line-height: 1.25; }
.role-perm-item .muted { font-size: .82rem; }
.role-perm-item.is-locked {
  opacity: .78;
  cursor: default;
}
.role-editor.is-admin-locked .role-perm-check {
  pointer-events: none;
}
#staff-perm-matrix.is-role-mode .role-perm-item {
  opacity: .72;
}
.staff-perm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin: .85rem 0 1rem;
  padding: .65rem .75rem;
  background: #f7f9f8;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.role-delete-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line, #e4ddd2); }
.role-create-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.role-create-modal[hidden] { display: none !important; }
.role-create-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 26, .45);
}
.role-create-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: 0;
}
@media (max-width: 860px) {
  .role-layout { grid-template-columns: 1fr; }
  .role-perm-section-head { align-items: flex-start; flex-direction: column; }
}

.appt-services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin: 0 0 .35rem;
}
.appt-services-head label { margin: 0; }
.appt-svc-add {
  min-width: 2.4rem;
  padding: .35rem .65rem;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}
.appt-services {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin: 0 0 1rem;
}
.appt-svc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .45rem;
  align-items: start;
}
.appt-svc-row .appt-picker { margin: 0; }
.appt-svc-remove {
  min-width: 2.4rem;
  padding: .45rem .65rem;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
}
.appt-svc-remove[hidden] { display: none !important; }
.appt-picker {
  margin: 0 0 1rem;
  position: relative;
}
.appt-picker-filter {
  width: 100%;
  margin: 0;
}
.appt-picker-list {
  display: none;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: .35rem;
  flex-direction: column;
  gap: .25rem;
  margin-top: .35rem;
  box-shadow: 0 8px 24px rgba(28, 36, 33, .1);
  z-index: 5;
}
.appt-picker.is-open .appt-picker-list {
  display: flex;
}
.appt-picker-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .1rem;
  width: 100%;
  margin: 0;
  padding: .55rem .65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.appt-picker-item[hidden],
.appt-picker-empty[hidden],
.appt-picker-chosen[hidden],
.client-selected-card[hidden],
#client-new-wrap[hidden] {
  display: none !important;
}
.appt-picker-empty {
  margin: .35rem 0 0;
}
.appt-picker:not(.is-open) .appt-picker-empty {
  display: none !important;
}
.appt-picker-item:hover {
  background: #f3efe8;
}
.appt-picker-item.is-selected {
  background: #e4efe9;
  box-shadow: inset 0 0 0 1px rgba(47, 93, 80, .35);
}
.appt-picker-item-meta {
  font-size: .82rem;
  color: var(--muted);
}
.appt-picker-chosen {
  margin: .4rem 0 0;
}
.client-selected-card {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf8;
}
.client-selected-card h3 {
  margin: 0 0 .65rem;
  font-size: 1rem;
}
.client-selected-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem .85rem;
  margin: 0;
}
.client-selected-dl > div {
  min-width: 0;
}
.client-selected-dl dt {
  font-size: .75rem;
  color: var(--muted);
  margin: 0 0 .15rem;
}
.client-selected-dl dd {
  margin: 0;
  word-break: break-word;
}
button.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
@media (max-width: 700px) {
  .client-selected-dl { grid-template-columns: 1fr; }
}

.pz-meta { margin-bottom: .85rem; }
.pz-table-wrap { overflow: auto; max-height: min(62vh, 640px); margin-top: .35rem; }
.pz-table { width: 100%; }
.pz-table th:last-child,
.pz-table td:last-child { width: 7.5rem; text-align: right; }
.pz-table .pz-stock { white-space: nowrap; color: var(--muted); }
.pz-qty {
  width: 5.5rem;
  text-align: right;
  padding: .35rem .45rem;
}
.pz-row.has-qty td { background: #eef7f1; }
.pz-row.is-off { opacity: .72; }
.pz-row[hidden] { display: none; }
.pz-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .9rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}
.pz-summary { font-weight: 650; }
.pz-history { display: flex; flex-direction: column; gap: .35rem; }
.pz-hist-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .45rem .7rem;
  background: #fff;
}
.pz-hist-item summary { cursor: pointer; }
.pz-hist-item ul { margin: .4rem 0 0; padding-left: 1.1rem; }
@media (max-width: 720px) {
  .pz-table th:nth-child(2),
  .pz-table td:nth-child(2) { display: none; }
}



