/* =========================================================
   Rezerwacje – arkusz stylów (strona publiczna + panel)
   Kolory i czcionki pochodzą ze zmiennych motywu (includes/themes.php)
   ========================================================= */

:root {
  --radius: 18px;
  --radius-sm: 10px;
  --primary-soft: color-mix(in srgb, var(--primary) 12%, transparent);
  --primary-softer: color-mix(in srgb, var(--primary) 6%, transparent);
  --shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent), 0 12px 32px -12px color-mix(in srgb, var(--text) 18%, transparent);
  --shadow-lg: 0 30px 60px -25px color-mix(in srgb, var(--primary) 45%, transparent);
  --ok: #2f8f5b;
  --warn: #c58a12;
  --danger: #c2413b;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
::selection { background: var(--primary); color: var(--primary-contrast); }

h1, h2, h3, .display, .h1, .h2, .h3 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-spacing);
  line-height: 1.1;
  margin: 0 0 .4em;
  font-variant-numeric: lining-nums;
}
.stat-value, .hero-facts strong, .footer-brand, .brand-name, .summary-title { font-variant-numeric: lining-nums; }
.display { font-size: calc(clamp(2.6rem, 6.5vw, 5.2rem) * var(--heading-scale)); }
.h1 { font-size: calc(clamp(2rem, 4vw, 2.9rem) * var(--heading-scale)); }
.h2 { font-size: calc(clamp(1.55rem, 3vw, 2.1rem) * var(--heading-scale)); }
.h3 { font-size: calc(1.3rem * var(--heading-scale)); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.15em; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(760px, 100% - 2.5rem); }
.page-pad { padding-block: 3rem 5rem; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none !important;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap; line-height: 1.2;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--primary); color: var(--primary-contrast); box-shadow: var(--shadow-lg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -16px var(--primary); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }
.btn-danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: .5rem .95rem; font-size: .85rem; }
.btn-xs { padding: .3rem .65rem; font-size: .78rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.02rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.loading-btn { position: relative; color: transparent !important; }
.loading-btn::after {
  content: ''; position: absolute; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  border: 2px solid var(--primary-contrast); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none !important; min-width: 0; }
.brand-name { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(1.35rem * var(--heading-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { height: 40px; width: auto; border-radius: 8px; }
.logo-dot {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--primary) 70%);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-phone { display: inline-flex; align-items: center; gap: .4rem; color: var(--text); font-weight: 500; font-size: .92rem; }
@media (max-width: 640px) { .header-phone span { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 600;
  color: var(--primary); background: var(--primary-soft); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 34em; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-facts { display: flex; gap: 2.2rem; list-style: none; padding: 0; margin: 2.6rem 0 0; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-heading); font-size: calc(1.9rem * var(--heading-scale)); font-weight: var(--heading-weight); line-height: 1; }
.hero-facts span { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.hero-art { position: relative; min-height: 380px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); animation: float 9s ease-in-out infinite; }
.orb-1 { width: 330px; height: 330px; background: radial-gradient(circle at 35% 30%, var(--accent), var(--primary) 75%); opacity: .9; top: 0; right: 4%; }
.orb-2 { width: 150px; height: 150px; background: radial-gradient(circle at 40% 35%, var(--surface), var(--accent)); bottom: 6%; left: 6%; animation-delay: -4s; opacity: .85; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.hero-card {
  position: relative; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow);
  display: grid; gap: .8rem; transform: translateY(40px) rotate(-2deg); min-width: 270px;
}
.hero-card-row { display: flex; align-items: center; gap: .75rem; font-weight: 500; font-size: .95rem; }
.hero-card-row .icon { color: var(--primary); width: 1.3em; height: 1.3em; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

/* ---------- Sekcje ---------- */
.booking-section { padding: 2rem 0 5rem; scroll-margin-top: 60px; }
.section-head { margin-bottom: 2rem; }
.about-section, .pricelist-section { padding: 4.5rem 0; border-top: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.prose { color: var(--muted); font-size: 1.05rem; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.team-member { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.team-name { font-weight: 600; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.pricelist { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem 3.5rem; margin-top: 1.5rem; }
.price-group ul { list-style: none; padding: 0; margin: 0; }
.price-group li { display: flex; align-items: baseline; gap: .6rem; padding: .6rem 0; }
.pl-name { font-weight: 500; }
.pl-dots { flex: 1; border-bottom: 1px dotted var(--border); transform: translateY(-4px); min-width: 20px; }
.pl-price { font-weight: 600; white-space: nowrap; }

/* ---------- Karty ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-state { padding: 3rem 2rem; text-align: center; }

/* ---------- Rezerwacja ---------- */
.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1.5rem; align-items: start; }
.booking-layout > * { min-width: 0; }
.booking-card { padding: clamp(1.2rem, 3vw, 2.2rem); min-height: 480px; }
.summary-card { padding: 1.5rem; position: sticky; top: 88px; }
.summary-title { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(1.35rem * var(--heading-scale)); margin-bottom: 1rem; }
.summary-list { margin: 0; display: grid; gap: .1rem; }
.summary-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px dashed var(--border); }
.summary-list dt { color: var(--muted); font-size: .88rem; }
.summary-list dd { margin: 0; font-weight: 600; text-align: right; font-size: .92rem; }
.summary-list .sum-total { border-bottom: 0; padding-top: 1rem; }
.summary-list .sum-total dd { font-size: 1.15rem; color: var(--primary); }
.summary-list.big dd { font-size: 1rem; }
.summary-foot { display: flex; gap: .5rem; align-items: flex-start; color: var(--muted); font-size: .85rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
@media (max-width: 960px) {
  .booking-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; order: -1; display: none; }
  .summary-card.has-data { display: block; }
}

.steps { display: flex; list-style: none; padding: 0; margin: 0 0 2rem; gap: .5rem; counter-reset: s; }
.steps li { flex: 1; display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; position: relative; padding-bottom: .9rem; }
.steps li::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--border); transition: background .3s; }
.steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--surface-2); flex-shrink: 0; transition: all .3s; }
.steps li em { font-style: normal; font-weight: 500; }
.steps li.active { color: var(--text); }
.steps li.active span { background: var(--primary); color: var(--primary-contrast); }
.steps li.active::after, .steps li.done::after { background: var(--primary); }
.steps li.done { cursor: pointer; color: var(--text); }
.steps li.done span { background: var(--primary-soft); color: var(--primary); }
.steps.finished li { cursor: default; pointer-events: none; }
@media (max-width: 560px) { .steps li em { display: none; } .steps li { justify-content: center; } }

.step-panel { display: none; animation: fadeUp .4s var(--ease); }
.step-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.back-link { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; color: var(--muted); padding: 0; margin-bottom: 1rem; cursor: pointer; font-size: .88rem; }
.back-link:hover { color: var(--primary); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.chip { border: 1px solid var(--border); background: transparent; padding: .45rem 1rem; border-radius: 999px; cursor: pointer; font-size: .88rem; font-weight: 500; transition: all .2s; }
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.service-list { display: grid; gap: .65rem; }
.service-item {
  display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.15rem;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s, background .2s;
}
.service-item:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.service-item.selected { border-color: var(--primary); background: var(--primary-softer); }
.si-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.si-name { font-weight: 600; font-size: 1.02rem; }
.si-desc { color: var(--muted); font-size: .87rem; margin-top: .15rem; }
.si-meta { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.si-price { font-weight: 700; }
.si-dur { color: var(--muted); font-size: .82rem; }
.si-arrow { font-size: 1.6rem; color: var(--muted); line-height: 1; transition: transform .2s; }
.service-item:hover .si-arrow { transform: translateX(3px); color: var(--primary); }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.staff-item {
  display: flex; align-items: center; gap: .9rem; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.staff-item:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.staff-name { display: block; font-weight: 600; }
.staff-role { display: block; color: var(--muted); font-size: .84rem; }
.avatar {
  --avatar: var(--primary);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; font-size: .95rem; letter-spacing: .02em;
  background: color-mix(in srgb, var(--avatar) 18%, var(--surface)); color: var(--avatar);
  border: 2px solid color-mix(in srgb, var(--avatar) 35%, transparent);
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; border-width: 1px; }
.avatar-any { background: var(--primary); color: var(--primary-contrast); border-color: transparent; }

.date-strip-wrap { min-width: 0; display: flex; align-items: center; gap: .5rem; margin: .5rem 0 1.5rem; }
.date-strip { display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .25rem; flex: 1; }
.date-strip::-webkit-scrollbar { display: none; }
.strip-nav { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1.4rem; line-height: 1; }
.strip-nav:hover { border-color: var(--primary); color: var(--primary); }
@media (max-width: 560px) { .strip-nav { display: none; } }
.day {
  scroll-snap-align: start; flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; padding: .6rem 0;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; transition: all .2s;
}
.day:hover:not(.disabled) { border-color: var(--primary); }
.day.selected { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.day.disabled { opacity: .35; cursor: not-allowed; }
.d-dow { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.d-num { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.d-mon { font-size: .72rem; opacity: .8; }

.slots-day { font-weight: 600; margin-bottom: 1rem; }
.slots-day::first-letter { text-transform: uppercase; }
.slot-group { margin-bottom: 1.25rem; }
.slot-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .55rem; font-weight: 600; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: .5rem; }
.slot {
  padding: .65rem 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; transition: all .15s;
}
.slot:hover { border-color: var(--primary); color: var(--primary); }
.slot.selected { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }
.empty-slots, .loading { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; width: 100%; }

/* ---------- Formularze ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1rem; }
.span-2 { grid-column: span 2; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-size: .85rem; font-weight: 600; }
.field small { color: var(--muted); font-size: .8rem; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { resize: vertical; }
input[type=color] { width: 56px; height: 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 3px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { margin-top: .15rem; flex-shrink: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { background: var(--surface-2); padding: .9rem 1rem; border-radius: 12px; font-size: .88rem; margin: 0; }
.form-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); padding: .8rem 1rem; border-radius: 12px; font-weight: 500; }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-top: .5rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Sukces ---------- */
.success { text-align: center; padding: 2rem 0; }
.success-icon { width: 76px; height: 76px; margin: 0 auto 1.2rem; border-radius: 50%; background: var(--primary); color: var(--primary-contrast); display: grid; place-items: center; animation: pop .5s var(--ease); box-shadow: var(--shadow-lg); }
.success-icon .icon { width: 38px; height: 38px; stroke-width: 2.5; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-summary { display: inline-grid; gap: .25rem; background: var(--surface-2); padding: 1.1rem 1.6rem; border-radius: 14px; margin: 1rem 0 1.6rem; }
.success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

/* ---------- Zarządzanie rezerwacją ---------- */
.manage-card { padding: clamp(1.4rem, 4vw, 2.5rem); }
.manage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.manage-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.8rem; }
.manage-actions form { margin: 0; }

/* ---------- Komunikaty, odznaki ---------- */
.alert { padding: .9rem 1.1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 500; border: 1px solid transparent; }
.alert-success { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-info { background: var(--primary-soft); color: var(--primary); }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge-confirmed { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge-completed { background: var(--primary-soft); color: var(--primary); }
.badge-cancelled { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.badge-no_show { background: var(--surface-2); color: var(--muted); }
.theme-dark .badge-confirmed, .theme-dark .alert-success { color: #6fd39b; }
.theme-dark .badge-pending { color: #f0c05a; }
.theme-dark .badge-cancelled, .theme-dark .alert-error, .theme-dark .form-error { color: #f08a84; }

/* ---------- Stopka ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 3.5rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.footer-brand { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(1.6rem * var(--heading-scale)); }
.footer-title { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .9rem; color: var(--muted); }
.footer-list, .hours { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .93rem; }
.footer-list li { display: flex; gap: .5rem; align-items: flex-start; }
.footer-list .icon { margin-top: .25rem; color: var(--primary); }
.footer-list a { color: var(--text); }
.hours li { display: flex; justify-content: space-between; gap: 1rem; }
.hours em { color: var(--muted); }
.social { display: flex; gap: 1rem; margin-top: 1rem; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ---------- Logowanie / instalacja ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background: radial-gradient(1200px 600px at 10% -10%, var(--primary-soft), transparent), radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--accent) 25%, transparent), transparent), var(--bg); }
.auth-wrap { width: 100%; max-width: 420px; }
.auth-wrap.auth-wide { max-width: 620px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(1.5rem, 5vw, 2.6rem); box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; margin-bottom: 1.6rem; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; }
.auth-card form { margin-top: 1.4rem; }
.auth-card .form-grid.single { grid-template-columns: 1fr; }
.checklist { list-style: none; padding: .9rem 1.1rem; margin: 1.2rem 0; background: var(--surface-2); border-radius: 12px; display: grid; gap: .25rem; font-size: .88rem; }
.checklist .ok { color: var(--ok); }
.checklist .fail { color: var(--danger); font-weight: 600; }
.auth-foot { text-align: center; margin-top: 1.2rem; font-size: .85rem; }

/* =========================================================
   PANEL ADMINISTRATORA
   ========================================================= */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--border); padding: 1.4rem 1rem; display: flex; flex-direction: column;
}
.sidebar .brand { padding: 0 .6rem 1.4rem; }
.sidebar .brand-name { font-size: calc(1.2rem * var(--heading-scale)); }
.nav { display: grid; gap: .15rem; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 1rem .8rem .4rem; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px;
  color: var(--text); font-weight: 500; font-size: .93rem; text-decoration: none !important; transition: background .15s, color .15s;
}
.nav a .icon { color: var(--muted); width: 1.15em; height: 1.15em; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav a.active .icon { color: var(--primary); }
.nav .count { margin-left: auto; background: var(--primary); color: var(--primary-contrast); font-size: .7rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); display: grid; gap: .15rem; }
.admin-main { min-width: 0; }
.grid-2 > *, .grid-2-even > * { min-width: 0; }
.topbar { display: none; }
.admin-content { padding: clamp(1.2rem, 3vw, 2.5rem); max-width: 1320px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .3rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.sidebar-backdrop { display: none; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 100; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .admin-shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow); }
  .admin-shell.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 90; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1.1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
  .menu-btn { background: none; border: 1px solid var(--border); border-radius: 10px; width: 40px; height: 40px; cursor: pointer; font-size: 1.2rem; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { padding: 1.25rem 1.35rem; position: relative; overflow: hidden; }
.stat-label { color: var(--muted); font-size: .84rem; font-weight: 500; }
.stat-value { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: calc(2.2rem * var(--heading-scale)); line-height: 1.1; margin-top: .3rem; }
.stat-sub { font-size: .8rem; color: var(--muted); }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--primary-soft); }
.stat.accent { background: var(--primary); color: var(--primary-contrast); border-color: transparent; }
.stat.accent .stat-label, .stat.accent .stat-sub { color: color-mix(in srgb, var(--primary-contrast) 75%, transparent); }
.stat.accent::after { background: color-mix(in srgb, var(--primary-contrast) 15%, transparent); }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 1100px) { .grid-2, .grid-2-even { grid-template-columns: 1fr; } }
.panel { padding: 1.4rem; }
.panel + .panel { margin-top: 1.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: calc(1.25rem * var(--heading-scale)); }
.panel-desc { color: var(--muted); font-size: .88rem; margin: -.5rem 0 1rem; }

.table-wrap { overflow-x: auto; margin: 0 -1.4rem; padding: 0 1.4rem; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: .7rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .8rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--primary-softer); }
.table .actions { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: wrap; }
.table .num { text-align: right; white-space: nowrap; }
.cell-strong { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: .8rem; }
.inline { display: inline; margin: 0; }

.agenda { display: grid; gap: .6rem; }
.agenda-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 1rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 14px; border-left: 4px solid var(--item-color, var(--primary)); background: var(--surface); }
.agenda-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.agenda-time small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.agenda-empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1.2rem; }
.filters .field { min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 200px; }

/* Kalendarz tygodniowy */
.week { display: grid; grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: .6rem; overflow-x: auto; padding-bottom: .5rem; }
.week-day { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; min-height: 260px; display: flex; flex-direction: column; }
.week-day.today { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.week-day.off { background: var(--surface-2); }
.week-head { padding: .7rem .8rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: baseline; }
.week-head strong { font-size: 1.3rem; }
.week-head span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.week-body { padding: .5rem; display: grid; gap: .4rem; align-content: start; }
.week-ev { display: block; padding: .5rem .6rem; border-radius: 10px; font-size: .8rem; color: var(--text); text-decoration: none !important;
  background: color-mix(in srgb, var(--ev, var(--primary)) 14%, var(--surface)); border-left: 3px solid var(--ev, var(--primary)); line-height: 1.35; }
.week-ev:hover { background: color-mix(in srgb, var(--ev, var(--primary)) 24%, var(--surface)); }
.week-ev b { display: block; font-variant-numeric: tabular-nums; }
.week-ev.st-cancelled { opacity: .45; text-decoration: line-through !important; }
.week-ev.st-pending { border-left-style: dashed; }
.week-nav { display: flex; gap: .5rem; align-items: center; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; font-size: .85rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Godziny pracy */
.hours-table { display: grid; gap: .5rem; }
.hours-row { display: grid; grid-template-columns: 150px 1fr; gap: .75rem; align-items: center; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 12px; }
.hours-row .ranges { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hours-row input[type=time] { width: 118px !important; padding: .45rem .6rem !important; }
.hours-row .sep { color: var(--muted); }
.hours-row.closed .ranges { opacity: .35; pointer-events: none; }
@media (max-width: 600px) { .hours-row { grid-template-columns: 1fr; } }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.check-grid .check { padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 10px; }

/* Wygląd – wybór motywu */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.theme-option { position: relative; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; }
.theme-card { border: 2px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color .2s, transform .2s var(--ease); background: var(--surface); }
.theme-option:hover .theme-card { transform: translateY(-2px); }
.theme-option input:checked + .theme-card { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.theme-preview { height: 108px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.tp-line { height: 9px; border-radius: 5px; width: 60%; }
.tp-line.short { width: 35%; opacity: .5; }
.tp-row { display: flex; gap: 6px; align-items: center; }
.tp-btn { height: 22px; width: 70px; border-radius: 11px; }
.tp-dot { width: 22px; height: 22px; border-radius: 50%; }
.theme-meta { padding: .7rem .9rem; }
.theme-meta strong { display: block; font-size: .95rem; }
.theme-meta > span { color: var(--muted); font-size: .8rem; line-height: 1.35; display: block; }
.font-card { padding: 1rem 1.1rem; }
.font-sample-h { font-size: 1.6rem; line-height: 1.1; margin-bottom: .3rem; }
.font-sample-b { font-size: .88rem; color: var(--muted); }
.logo-preview { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--surface-2); border-radius: 12px; margin-bottom: 1rem; }
.logo-preview img { max-height: 60px; }
.color-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }

.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: .35rem; border: 1px solid var(--border); }
.tag { display: inline-block; font-size: .74rem; padding: .15rem .55rem; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.4rem; flex-wrap: wrap; }
.pagination { display: flex; gap: .35rem; justify-content: center; margin-top: 1.2rem; }
.pagination a, .pagination span { padding: .4rem .8rem; border-radius: 8px; border: 1px solid var(--border); font-size: .85rem; color: var(--text); }
.pagination .current { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }
.copy-box { display: flex; gap: .5rem; }
.copy-box input { font-family: ui-monospace, monospace; font-size: .85rem !important; }

@media print {
  .sidebar, .topbar, .page-actions, .filters, .btn { display: none !important; }
  .admin-shell { display: block; }
}
