/* ============================================================
   Capris — design system
   Premium tailor brand: warm cream, deep ink, gold accents,
   Georgia serif throughout (matches /galeria/ visual language).
   ============================================================ */

:root {
  /* Jasna, kremowa strona — złoto/mosiądz jako jedyny akcent, zero ciemnych sekcji */
  --cream: #faf7f2;
  --cream-deep: #f3ede2;
  --ink: #2b2620;
  --muted: #6b6459;
  --muted-light: #8a8276;
  --gold: #b8965f;
  --gold-light: #cbb98c;
  --wine: #b8965f;
  --wine-light: #cbb98c;
  --line: #ece6db;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  /* Header is position:fixed (always visible), so it's out of flow — this reserves its
     real, JS-measured height so page content doesn't start underneath it. */
  padding-top: var(--header-h, 73px);
}
/* Only applied to <body> when running as the installed admin PWA (includes/header.php adds the
   class conditionally) — adds room for the iPhone's notch/home-indicator when running standalone.
   env() resolves to 0 everywhere else, so this is inert for every normal browser tab. */
body.pwa-safe-area {
  padding-left: calc(env(safe-area-inset-left) + 0px);
  padding-right: calc(env(safe-area-inset-right) + 0px);
  padding-bottom: env(safe-area-inset-bottom);
}
body.pwa-safe-area .site-header {
  padding-top: env(safe-area-inset-top);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: 0.02em; margin: 0 0 0.6rem; color: var(--ink); }
h1 { font-size: 2.6rem; letter-spacing: 0.03em; }
h2 { font-size: 2rem; letter-spacing: 0.03em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.05em;
  font-size: 0.92rem;
  padding: 0.8rem 2.1rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }
.btn-solid {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.btn-solid:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--ink);
}
.btn-gold:hover { background: var(--gold); border-color: var(--gold); }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 2px solid var(--gold-light);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  gap: 1.5rem;
}
.site-logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.site-logo__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream);
  padding: 4px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.site-logo__badge img { height: 34px; width: 34px; object-fit: contain; }
.site-logo span { font-size: 1.15rem; letter-spacing: 0.04em; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.is-active { border-color: var(--gold); color: var(--gold); }
.site-nav a.btn-solid { color: var(--cream); border-bottom: none; padding: 0.8rem 2.1rem; display: inline-block; }
.site-nav a.btn-solid:hover { color: var(--ink); }
.site-nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}
@media (max-width: 900px) {
  .site-nav {
    /* display:none (not just an off-screen transform) when closed — a transformed
       position:fixed box still counts toward the page's scrollable width in Chromium even
       though it's visually off-screen, which was letting the whole page be dragged sideways. */
    display: none;
    position: fixed;
    top: var(--header-h, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .site-nav.is-open.is-visible { transform: translateX(0); }
  .site-nav__toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5rem 1.5rem 4.5rem;
  text-align: center;
  background: var(--cream);
  overflow: hidden;
}
.hero--photo {
  background-size: cover;
  background-position: top center;
  min-height: 420px;
  display: flex;
  align-items: center;
  color: var(--white);
}
.hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20,17,13,0.55), rgba(20,17,13,0.75));
}
.hero__inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero--photo h1, .hero--photo .eyebrow { color: var(--white); }
.hero--photo p { color: #e9e2d3; }
.hero h1 { margin-bottom: 1rem; }
.hero p.lead { font-size: 1.1rem; font-style: italic; max-width: 600px; margin: 0 auto 1.8rem; }
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__tagline {
  margin-top: 1.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* ---------- Icon (shared by cards / value props / steps) ---------- */
.icon-badge {
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 auto 1rem;
  color: var(--gold);
}
.icon-badge svg { width: 100%; height: 100%; fill: currentColor; }
.card .icon-badge, .value-prop .icon-badge { margin: 0 0 1rem; }

/* ---------- Value props (icon-box row under hero) ---------- */
.value-props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.value-prop { text-align: center; padding: 0 1rem; }
.value-prop .icon-badge { margin: 0 auto 1rem; }
.value-prop h3 { font-size: 1.05rem; }
.value-prop p { font-size: 0.92rem; }

/* ---------- Sections ---------- */
section { padding: 4rem 1.5rem; }
.section-cream { background: var(--cream-deep); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 0.9rem auto 0;
  background: var(--gold);
  border-radius: 2px;
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  max-width: 1200px;
  margin: 0 auto;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2rem 1.7rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.08); transform: translateY(-4px); border-color: var(--gold-light); }
.card img { border-radius: 6px; margin-bottom: 1.2rem; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card h3 { margin-bottom: 0.5rem; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  counter-reset: step;
}
.step { text-align: center; padding: 0 1rem; }
.step .icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.7rem;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.92rem; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.2rem 0;
}
.faq summary {
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: 0.8rem; font-size: 0.96rem; }

/* ---------- Pricing table ---------- */
.price-table { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.6rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.price-row:last-child { border-bottom: none; }
.price-row__label { color: var(--ink); font-size: 1rem; }
.price-row__value { color: var(--gold); font-size: 1.1rem; white-space: nowrap; }
.price-note { text-align: center; font-size: 0.85rem; color: var(--muted-light); font-style: italic; margin-top: 1.2rem; }

/* ---------- Article (poradnik) ---------- */
.back-link { display: inline-block; font-size: 0.88rem; color: var(--gold); text-decoration: none; margin-bottom: 1rem; }
.back-link:hover { text-decoration: underline; }
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { font-size: 1.4rem; margin-top: 2rem; }
.article-card { display: block; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.8rem; text-decoration: none; transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease; }
.article-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.08); transform: translateY(-4px); border-color: var(--gold-light); }
.article-card h3 { color: var(--ink); }
.article-card .read-more { color: var(--gold); font-size: 0.88rem; font-weight: bold; }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.split img { border-radius: 10px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split--reverse .split__media { order: 2; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 1.8rem; }
  .split--reverse .split__media { order: 0; }
}

/* ---------- Contact cards ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-card { text-align: center; padding: 1.8rem 1rem; }
.contact-card__icon { font-size: 1.6rem; color: var(--gold); margin-bottom: 0.8rem; }
.contact-card__icon svg { width: 1.5rem; height: 1.5rem; fill: currentColor; margin: 0 auto; }
.contact-card a { text-decoration: none; color: var(--ink); }
.contact-card a:hover { color: var(--gold); }

/* ---------- Forms ---------- */
.form { max-width: 560px; margin: 0 auto; }
.form label, .wizard label { display: block; font-size: 0.88rem; letter-spacing: 0.02em; margin-bottom: 0.3rem; color: var(--ink); }
.form input, .form select, .form textarea,
.wizard input, .wizard select, .wizard textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
  accent-color: var(--gold);
}
.form input:focus, .form select:focus, .form textarea:focus,
.wizard input:focus, .wizard select:focus, .wizard textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form textarea, .wizard textarea { min-height: 120px; resize: vertical; }
.form .btn { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.form-note { text-align: center; font-size: 0.85rem; color: var(--muted-light); margin-top: 1rem; }
.alert { padding: 1rem 1.2rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.92rem; }
.alert-success { background: #eef6ea; color: #3a6b2e; border: 1px solid #c9e3bd; }
.alert-error { background: #fbecec; color: #9c3b3b; border: 1px solid #f0c6c6; }

/* ---------- Footer ---------- */
.site-footer { background: var(--cream-deep); color: var(--muted); padding: 3.5rem 1.5rem 2rem; border-top: 3px solid var(--gold-light); }
.site-footer a { text-decoration: none; color: var(--ink); }
.site-footer a:hover { color: var(--gold); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}
.footer-grid h4 { color: var(--gold); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.6rem; font-size: 0.92rem; }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ---------- Booking wizard ---------- */
.wizard { max-width: 680px; margin: 0 auto; }
.wizard-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2.2rem 2rem;
  box-shadow: 0 10px 30px rgba(43,38,32,0.06);
}
.step-indicator { display: flex; justify-content: center; gap: 0.6rem; margin-bottom: 2.2rem; font-size: 0.85rem; color: var(--muted-light); flex-wrap: wrap; }
.step-indicator span { padding: 0.3rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); }
.step-indicator span.is-active { color: var(--ink); font-weight: bold; border-color: var(--gold); background: var(--gold-light); }
.wizard-step { display: none; }
.wizard-step.is-active { display: block; }
.wizard-step label { font-weight: bold; }
.consent-check { display: flex; align-items: flex-start; gap: 0.6rem; font-weight: normal; font-size: 0.85rem; color: var(--muted); cursor: pointer; margin-bottom: 1.2rem; }
.consent-check input[type="checkbox"] { width: auto; margin: 0.2rem 0 0; accent-color: var(--gold); flex-shrink: 0; }
.consent-check a { color: var(--gold); }
.wizard-step input[type="date"] { max-width: 240px; }
.service-list { display: flex; flex-direction: column; gap: 0.8rem; }
.service-option {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  cursor: pointer;
  background: var(--cream);
  transition: border-color 0.2s ease, background 0.2s ease;
  text-align: left;
}
.service-option:hover { border-color: var(--gold-light); }
.service-option.is-selected { border-color: var(--gold); background: var(--gold-light); }
.service-option input { position: absolute; opacity: 0; pointer-events: none; }
.service-option__body { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.service-option__name { font-size: 0.98rem; font-weight: bold; }
.service-option__meta { display: flex; align-items: center; gap: 0.7rem; }
.service-option__duration { font-size: 0.85rem; color: var(--muted-light); white-space: nowrap; }
.badge-free { font-size: 0.72rem; background: var(--white); color: var(--gold); border: 1px solid var(--gold-light); padding: 0.25rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.service-option__details { margin-top: 0.3rem; }
.service-option__details summary { cursor: pointer; font-size: 0.82rem; color: var(--gold); list-style: none; width: fit-content; }
.service-option__details summary::-webkit-details-marker { display: none; }
.service-option__details summary:hover { text-decoration: underline; }
.service-option__details p { margin: 0.6rem 0 0; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.calendar { margin-top: 0.6rem; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.calendar-header button {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.calendar-header button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.calendar-header button:disabled { opacity: 0.3; cursor: not-allowed; }
.calendar-title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; font-weight: bold; text-transform: capitalize; }
.calendar-dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 0.4rem; }
.calendar-dow span { text-align: center; font-size: 0.75rem; color: var(--muted-light); text-transform: lowercase; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; }
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--cream);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  position: relative;
}
.calendar-day:hover:not(:disabled) { border-color: var(--gold); }
.calendar-day.is-outside,
.calendar-day.is-disabled { background: var(--cream-deep); color: var(--muted-light); opacity: 0.55; cursor: not-allowed; }
.calendar-day.is-selected { background: var(--ink); color: var(--cream); }
.calendar-day.is-today::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.calendar-day.is-selected.is-today::after { background: var(--cream); }
.slots-label { font-size: 0.88rem; font-weight: bold; color: var(--ink); margin: 1.4rem 0 0.2rem; }
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0.7rem; margin-top: 0.8rem; }
.slot-btn {
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.slot-btn:hover { border-color: var(--gold); background: var(--gold-light); transform: translateY(-1px); }
.slot-btn.is-selected { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2.2rem; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.slots-empty { color: var(--muted-light); font-style: italic; margin-top: 1rem; }
.summary-box { background: var(--cream-deep); border-radius: 10px; padding: 1.2rem 1.5rem; margin-bottom: 1.5rem; font-size: 0.95rem; }

/* ---------- Admin panel ---------- */
.admin-layout { display: flex; gap: 2rem; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem; align-items: flex-start; }
.admin-sidebar { flex: 0 0 210px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; position: sticky; top: 90px; }
.admin-sidebar nav a { display: block; padding: 0.65rem 0.9rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.9rem; margin-bottom: 0.3rem; }
.admin-sidebar nav a:hover { background: var(--cream); }
.admin-sidebar nav a.is-active { background: var(--gold-light); font-weight: bold; }
.admin-nav-badge { display: inline-block; background: #9c3b3b; color: #fff; font-size: 0.72rem; padding: 0.05rem 0.5rem; border-radius: 999px; margin-left: 0.3rem; }
.admin-attention { background: #fffdfa; border: 1px solid var(--gold-light); border-radius: 10px; padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; }
.admin-attention h3 { font-size: 1rem; margin: 0 0 0.8rem; }
.admin-attention ul { margin: 0; padding-left: 1.2rem; }
.admin-attention li { font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--ink); }
.admin-attention li a { color: var(--gold); text-decoration: none; }
.admin-attention li a:hover { text-decoration: underline; }
.admin-attention .none { color: var(--muted-light); font-style: italic; font-size: 0.9rem; }
.email-log-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.email-log-table th, .email-log-table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
.email-log-table th { color: var(--muted-light); font-weight: bold; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
@media (max-width: 700px) {
  .email-log-table thead { display: none; }
  .email-log-table, .email-log-table tbody, .email-log-table tr, .email-log-table td { display: block; width: 100%; }
  .email-log-table tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 0.9rem; padding: 0.7rem 0.9rem; }
  .email-log-table td { border: none; padding: 0.3rem 0; }
  .email-log-table td::before { content: attr(data-label) ": "; font-weight: bold; color: var(--muted-light); }
}
.email-status-ok { color: #3a6b2e; font-weight: bold; }
.email-status-fail { color: #9c3b3b; font-weight: bold; }
.email-type-badge { font-size: 0.72rem; background: var(--cream); border: 1px solid var(--line); padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.admin-sidebar form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.admin-sidebar .btn { width: 100%; text-align: center; }
.admin-content { flex: 1; min-width: 0; }
.admin-filters { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.6rem; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; }
.admin-filters > div { display: flex; flex-direction: column; }
.admin-filters label { font-size: 0.78rem; margin-bottom: 0.25rem; }
.admin-filters input, .admin-filters select { margin-bottom: 0; padding: 0.5rem 0.7rem; }
.admin-service-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.3rem 1.5rem; margin-bottom: 1.2rem; }
.admin-service-card .form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.admin-service-card .form-row > div { flex: 1; min-width: 160px; }
.admin-service-card label { font-size: 0.8rem; }
.admin-service-card input, .admin-service-card textarea { margin-bottom: 0.9rem; }
.admin-service-card textarea { min-height: 70px; }
.admin-inactive-badge { display: inline-block; font-size: 0.72rem; background: #fbecec; color: #9c3b3b; padding: 0.2rem 0.6rem; border-radius: 999px; margin-left: 0.6rem; }
.client-count-badge { display: inline-block; font-size: 0.72rem; background: var(--gold-light); color: var(--ink); padding: 0.2rem 0.6rem; border-radius: 999px; margin-left: 0.5rem; white-space: nowrap; vertical-align: middle; }
.token-code { font-family: "Courier New", monospace; font-size: 0.75rem; background: var(--cream); padding: 0.15rem 0.4rem; border-radius: 4px; color: var(--ink); }
.token-copy-btn { font-family: inherit; font-size: 0.72rem; border: 1px solid var(--line); background: var(--white); color: var(--muted); padding: 0.1rem 0.5rem; border-radius: 999px; cursor: pointer; margin-left: 0.2rem; }
.token-copy-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Reservations status chart ---------- */
.resv-chart { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.3rem 1.5rem 1.5rem; margin-bottom: 1.6rem; }
.resv-chart__title { font-size: 0.85rem; font-weight: bold; color: var(--ink); margin-bottom: 1.1rem; }
.resv-chart__title span { font-weight: normal; color: var(--muted-light); }
.resv-bar-row { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.7rem; }
.resv-bar-row--total { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); margin-bottom: 0; }
.resv-bar-row:last-child { margin-bottom: 0; }
.resv-bar-row__label { flex: 0 0 120px; font-size: 0.85rem; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
.resv-bar-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.resv-bar-track { flex: 1; height: 22px; background: var(--cream); border-radius: 4px; position: relative; }
.resv-bar-fill { height: 100%; border-radius: 0 4px 4px 0; transition: width 0.3s ease; }
.resv-bar-value { flex: 0 0 28px; text-align: right; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.has-tooltip { position: relative; }
.has-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  font-size: 0.78rem;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}
.has-tooltip:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  margin-bottom: -2px;
  z-index: 10;
}
@media (max-width: 760px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { display: none; }
  .admin-content { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
}

/* ---------- Admin mobile bottom nav ---------- */
.admin-bottom-nav {
  display: none;
}
/* Hidden (instead of just losing to the keyboard) while a text field inside .admin-content
   has focus, so the bar never ends up stranded above/below the on-screen keyboard. */
.admin-bottom-nav.is-keyboard-hidden { display: none !important; }
@media (max-width: 760px) {
  .admin-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.1);
    z-index: 500;
    padding: 0.3rem 0.2rem calc(0.3rem + env(safe-area-inset-bottom));
    /* Same off-screen-still-scrollable Chromium quirk as .wizard-nav — keep this bar from
       ever contributing to horizontal scroll on narrow viewports. */
    max-width: 100%;
    overflow: hidden;
  }
}
.admin-bottom-nav__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 52px;
  padding: 0.3rem 0.1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.66rem;
  line-height: 1.1;
  border: none;
  background: none;
  font-family: inherit;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
}
.admin-bottom-nav__item svg { width: 22px; height: 22px; fill: currentColor; }
.admin-bottom-nav__item.is-active { color: var(--gold); }
.admin-bottom-nav__item .admin-nav-badge {
  position: absolute;
  top: 0;
  right: 22%;
  margin-left: 0;
}

.admin-more-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(43,38,32,0.45);
  z-index: 600;
}
.admin-more-overlay.is-open { display: block; }
.admin-more-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  border-radius: 16px 16px 0 0;
  padding: 0.6rem 0 calc(0.6rem + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 601;
  max-height: 80vh;
  overflow-y: auto;
}
.admin-more-overlay.is-visible .admin-more-panel { transform: translateY(0); }
.admin-more-panel__handle {
  width: 42px;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  margin: 0.5rem auto 0.8rem;
}
.admin-more-panel__title {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 1.2rem 0.5rem;
}
.admin-more-panel a,
.admin-more-panel button {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-family: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.admin-more-panel a:active,
.admin-more-panel button:active { background: var(--cream); }
.admin-more-panel a svg,
.admin-more-panel button svg { width: 20px; height: 20px; fill: var(--gold); flex-shrink: 0; }
.admin-more-panel .admin-nav-badge { margin-left: auto; }
.admin-more-panel hr { border: none; border-top: 1px solid var(--line); margin: 0.4rem 0; }

/* ---------- Admin mobile UX pass (scoped to body.pwa-safe-area = admin panel only) ---------- */
body.pwa-safe-area input,
body.pwa-safe-area select,
body.pwa-safe-area textarea {
  font-size: 16px; /* below 16px, iOS Safari auto-zooms the page on focus */
}
body.pwa-safe-area .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.pwa-safe-area label:has(input[type="checkbox"]),
body.pwa-safe-area label:has(input[type="radio"]) {
  min-height: 44px;
}

.hero--admin img { display: none; }
@media (max-width: 760px) {
  .hero--admin { padding: 1.1rem 1.2rem 1rem; }
  .hero--admin .hero__inner { display: flex; align-items: center; justify-content: flex-start; gap: 0.7rem; text-align: left; }
  .hero--admin img { display: block; width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
  .hero--admin .eyebrow { display: none; }
  .hero--admin h1 { font-size: 1.15rem; margin: 0; }
}

.status-pill { display: inline-block; font-size: 0.72rem; font-weight: bold; padding: 0.2rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.status-pill--pending { background: var(--gold-light); color: var(--ink); }
.status-pill--confirmed { background: #eef6ea; color: #3a6b2e; }
.status-pill--cancelled { background: #fbecec; color: #9c3b3b; }

.admin-quick-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.admin-quick-btn {
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.admin-quick-btn:hover { border-color: var(--gold); color: var(--gold); }

.admin-stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-bottom: 1.2rem; }
.admin-stat-tile { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; }
.admin-stat-tile__label { font-size: 0.72rem; color: var(--muted-light); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.admin-stat-tile__value { font-size: 1.25rem; color: var(--ink); font-weight: bold; line-height: 1.2; }
@media (max-width: 760px) {
  .admin-stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .admin-stat-tile__value { font-size: 1.1rem; }
}

.admin-quick-filters { display: flex; gap: 0.6rem; margin-bottom: 1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.2rem; }
.admin-quick-filters a {
  flex-shrink: 0;
  font-size: 0.82rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.admin-quick-filters a.is-active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.admin-filters-toggle summary { cursor: pointer; }
@media (max-width: 760px) {
  .admin-filters-toggle summary {
    font-size: 0.85rem;
    color: var(--gold);
    list-style: none;
    padding: 0.6rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .admin-filters-toggle summary::-webkit-details-marker { display: none; }
}

.slot-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  background: var(--white);
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.slot-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.slot-check:has(input:checked) { background: var(--ink); color: var(--cream); border-color: var(--ink); }

@media (max-width: 760px) {
  .price-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
  }
  .price-row > *:last-child { justify-content: flex-start !important; }
  .price-row > a.btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .admin-service-card .form-row { flex-direction: column; }
}

@media (max-width: 760px) {
  .admin-attention li { padding: 0.5rem 0; line-height: 1.4; }
  .admin-attention li a { display: block; min-height: 44px; display: flex; align-items: center; }
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 1.5rem;
  right: 1.5rem;
  bottom: -200px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--cream);
  padding: 1.3rem 1.6rem;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  z-index: 500;
  transition: bottom 0.4s ease;
}
.cookie-banner.is-visible { bottom: 1.5rem; }
.cookie-banner p { color: var(--cream); font-size: 0.88rem; margin: 0 0 1rem; }
.cookie-banner a { color: var(--gold-light); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 0.8rem; justify-content: flex-end; flex-wrap: wrap; }
.cookie-banner .btn { padding: 0.55rem 1.4rem; font-size: 0.85rem; }
.cookie-banner .btn:not(.btn-solid) { border-color: var(--cream); color: var(--cream); }
.cookie-banner .btn:not(.btn-solid):hover { background: var(--cream); color: var(--ink); }

.inapp-banner {
  display: none;
  position: fixed;
  top: calc(var(--header-h, 73px) + 0.8rem);
  left: 1rem;
  right: 1rem;
  max-width: 560px;
  margin: 0 auto;
  background: var(--gold-light);
  color: var(--ink);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  z-index: 400;
  font-size: 0.85rem;
}
.inapp-banner.is-visible { display: block; }
.inapp-banner p { margin: 0 0 0.7rem; }
.inapp-banner__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.inapp-banner .btn { padding: 0.45rem 1.1rem; font-size: 0.8rem; }

@media (max-width: 640px) {
  .hero { padding: 3.5rem 1.2rem 3rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  section { padding: 2.8rem 1.2rem; }

  .wizard-step.is-active { padding-bottom: 4.5rem; }
  .wizard-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 0;
    background: var(--white);
    border-top: 1px solid var(--line);
    padding: 0.9rem 1.2rem;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.1);
    z-index: 60;
    justify-content: center;
    gap: 0.8rem;
    /* position:fixed elements aren't clipped by an ancestor's overflow-x:hidden on some mobile
       browsers, so without this the bar's own content can still make the whole page draggable
       sideways even though nothing else overflows. */
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  .wizard-nav span:empty { display: none; }

  .cookie-banner__actions { justify-content: center; }
  /* On mobile the banner becomes a centered card in the middle of the screen instead of a
     bottom-docked bar — away from the thumb and the sticky wizard-nav bar at the bottom. */
  .cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .cookie-banner.is-visible {
    bottom: auto;
    opacity: 1;
    pointer-events: auto;
  }
}
