:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --ink: #171511;
  --muted: #6b655c;
  --line: #d9d1c5;
  --paper: #fffdf8;
  --accent: #136f63;
  --accent-strong: #0b4a42;
  --danger: #b3362d;
  --gold: #be8a30;
  --shadow: 0 18px 48px rgba(22, 19, 15, 0.14);
  --pad: clamp(24px, 5vw, 72px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(247, 244, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 3vw, 34px);
  min-width: 0;
}

nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover { color: var(--accent); }

.topbar nav a.nav-back {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
  flex: none;
}
.topbar nav a.nav-back::before { content: "\2190\00a0"; }
.topbar nav a.nav-back:hover { color: var(--accent); border-color: var(--accent); }

.map-section { gap: 12px; }
.map-embed {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.map-embed iframe {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}
.map-directions {
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--accent);
  text-decoration: none;
}
.map-directions::after { content: "\00a0\2192"; }
.map-directions:hover { text-decoration: underline; }

.language-control {
  position: relative;
  width: 58px;
}

.language-trigger {
  width: 58px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.language-control select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 178px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.language-menu button {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.language-menu button:hover,
.language-menu button[aria-selected="true"] {
  background: #f2eee6;
}

.flag-icon {
  width: 26px;
  height: 18px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(23, 21, 17, 0.22);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
}

.language-trigger .flag-icon {
  width: 30px;
  height: 20px;
}

.flag-en {
  background:
    linear-gradient(32deg, transparent 43%, #fff 43% 49%, #c8102e 49% 54%, #fff 54% 60%, transparent 60%),
    linear-gradient(148deg, transparent 43%, #fff 43% 49%, #c8102e 49% 54%, #fff 54% 60%, transparent 60%),
    linear-gradient(90deg, transparent 40%, #fff 40% 60%, transparent 60%),
    linear-gradient(0deg, transparent 35%, #fff 35% 65%, transparent 65%),
    linear-gradient(90deg, transparent 45%, #c8102e 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 42%, #c8102e 42% 58%, transparent 58%),
    #012169;
}

.flag-bs {
  background:
    linear-gradient(58deg, transparent 0 47%, #f7d116 47% 65%, transparent 65%),
    linear-gradient(90deg, #002395 0 72%, #f7d116 72% 100%);
}

.flag-pl {
  background: linear-gradient(#fff 0 50%, #dc143c 50% 100%);
}

.flag-es {
  background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.flag-de {
  background: linear-gradient(#000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.is-admin-route main > :not(.admin-panel) {
  display: none;
}

/* Account/admin SPA routes: full-height flex column so the footer sits at the
   bottom of the viewport — short pages (e.g. the /account login) fill the
   screen instead of forcing extra scroll past whitespace. */
body.is-admin-route,
body.is-account-route {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body.is-admin-route main,
body.is-account-route main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
body.is-admin-route .admin-panel,
body.is-account-route .account-layout {
  flex: 1 0 auto;
}
body.is-admin-route .site-footer,
body.is-account-route .site-footer {
  margin-top: 0;
}

.is-account-route main > :not(.account-layout) {
  display: none;
}

.is-shop-admin-route [data-tab="platform"],
.is-shop-admin-route [data-panel="platform"] {
  display: none !important;
}

/* The shop-admin workspace has its own tabs and toolbar, so the public site
   nav (Home/Services/Book/Manage) is just clutter pointing at hidden sections. */
.is-shop-admin-route .topbar nav {
  display: none !important;
}

.is-platform-admin-route .admin-login {
  display: none !important;
}

.is-platform-admin-route .tabs .tab:not([data-tab="platform"]),
.is-platform-admin-route [data-panel]:not([data-panel="platform"]) {
  display: none !important;
}

.is-platform-admin-route [data-tab="platform"] {
  display: inline-flex;
}

/* The hidden attribute must always win, even over component display rules
   (.button, .tab, etc. set their own display and would otherwise show through). */
[hidden] {
  display: none !important;
}

/* PIN login wrapper exists only to toggle the break-glass form; it should not
   affect layout, so its children lay out as if it weren't there. */
#pinLoginRow {
  display: contents;
}
#pinLoginRow[hidden] {
  display: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 2rem;
  font-size: 0.9rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
/* Language switcher: a native <details> flag dropdown on server-rendered pages
   (current-language flag opens a menu of flags + names). Works without JS;
   public.js adds outside-click close + cookie persistence on selection. */
.lang-switch { position: relative; }
.topbar .lang-switch { justify-self: end; }
.lang-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
}
.lang-trigger::-webkit-details-marker { display: none; }
.lang-switch[open] .lang-trigger { border-color: var(--accent); }
.lang-caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
}
.flag-icon {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 184px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  display: grid;
  gap: 2px;
  z-index: 40;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}
.lang-option:hover { background: rgba(0, 0, 0, 0.05); }
.lang-option.is-active { background: var(--accent); color: #fffdf8; }
.lang-option.is-active .flag-icon { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55); }
.legal-main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem);
}
.legal-section {
  margin-top: 1.5rem;
}
.signup-form {
  display: grid;
  gap: 0.85rem;
  max-width: 460px;
  margin-top: 1.5rem;
}
.signup-form label {
  display: grid;
  gap: 0.3rem;
}
.signup-form .button {
  margin-top: 0.5rem;
}
.legal-section h2 {
  margin-bottom: 0.35rem;
}
.legal-updated {
  opacity: 0.7;
  font-size: 0.9rem;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 2rem));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface, #fff);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 60;
  font-size: 0.9rem;
}
.cookie-banner p {
  margin: 0;
  flex: 1 1 260px;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 16px;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.workspace-id {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.workspace-logo {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
}
.workspace-id__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.workspace-shop {
  font-size: 1rem;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-who {
  font-size: 0.82rem;
  color: var(--muted);
}
.workspace-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.workspace-fs {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.workspace-fs__icon {
  font-size: 1.05rem;
  line-height: 1;
}
.workspace-id { flex: 1 1 auto; }
@media (max-width: 480px) {
  /* Tight phones: keep the fullscreen control as an icon-only button. */
  .workspace-fs span:not(.workspace-fs__icon) { display: none; }
  .workspace-actions { gap: 6px; }
}
.staff-login__primary {
  width: 100%;
}
.staff-login__providers {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.staff-login__providers .button {
  flex: 1;
}
.staff-login__advanced {
  margin-top: 0.5rem;
}
.staff-login__advanced summary {
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.75;
  list-style: revert;
}
.staff-login__advanced summary:hover {
  opacity: 1;
}
.staff-login__advanced > label,
.staff-login__advanced > .button {
  margin-top: 0.5rem;
}
/* The platform panel lives inside #adminWorkspace, so on the platform route the
   shop-admin toolbar would show its own logout. Hide it there; the platform
   workspace has its own logout. */
.is-platform-admin-route #adminWorkspace > .workspace-toolbar {
  display: none !important;
}

.platform-billing {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.platform-billing__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.invoice-row .status-pill {
  font-size: 0.7rem;
  vertical-align: middle;
}

.appointment-row h4 .status-pill {
  font-size: 0.7rem;
  vertical-align: middle;
  margin-left: 0.35rem;
}
.status-pill.status-booked { background: #fcecd0; color: #875300; }
.status-pill.status-confirmed { background: #cfe9df; color: #0b4a42; }
.status-pill.status-completed { background: #d6e6f6; color: #1b4a72; }
.status-pill.status-cancelled { background: #f4d6d6; color: #8a1f1f; }
.appointment-row .appt-location { font-weight: 600; }
/* tenant / membership / invoice statuses */
.status-pill.status-active,
.status-pill.status-paid { background: #cfe9df; color: #0b4a42; }
.status-pill.status-suspended,
.status-pill.status-void { background: #f4d6d6; color: #8a1f1f; }
.status-pill.status-pending,
.status-pill.status-trialing,
.status-pill.status-issued,
.status-pill.status-draft { background: #fcecd0; color: #875300; }

.customer-dashboard__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.customer-appt-row {
  align-items: center;
}

.customer-dashboard__rights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.customer-section-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.customer-section-title:first-child {
  margin-top: 0;
}

select, input, button {
  font: inherit;
}

select, input, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

.hero {
  position: relative;
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__image {
  background-image: url("assets/barbershop-hero.jpg");
  background-image: image-set(url("assets/barbershop-hero.webp") type("image/webp"), url("assets/barbershop-hero.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
}

.hero__shade {
  background: linear-gradient(90deg, rgba(16, 15, 12, 0.82), rgba(16, 15, 12, 0.48) 42%, rgba(16, 15, 12, 0.12));
}

.hero__content {
  position: relative;
  max-width: 720px;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 6vw, 80px);
  color: #fffdf8;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 253, 248, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero__actions,
.toolbar,
.actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero__actions { margin-top: 30px; }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.social-links[hidden] { display: none; }

.social-link {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  color: #fffdf8;
  background: rgba(255, 253, 248, 0.12);
  border: 1px solid rgba(255, 253, 248, 0.28);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
  backdrop-filter: blur(8px);
  transition: transform 160ms ease, background 160ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 253, 248, 0.2);
}

.social-link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.social-link span { font-size: 0.86rem; }

.button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
}

.button--primary {
  color: #fff;
  background: var(--accent);
}

.button--primary:hover { background: var(--accent-strong); }
.button--ghost, .file-button {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.button--danger {
  color: #fff;
  background: var(--danger);
}

.file-button input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.info-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.info-band > div {
  padding: 22px clamp(16px, 4vw, 44px);
  background: var(--paper);
}

.info-band span,
label span,
.field-label,
dt {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 7px;
}

.info-band strong {
  display: block;
  overflow-wrap: anywhere;
}

.info-band a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(16px, 5vw, 72px);
}

.section__header {
  max-width: 680px;
  margin-bottom: 28px;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 210px;
  display: grid;
  align-content: space-between;
  gap: 20px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-card h3 { margin: 0; font-size: 1.25rem; }
.service-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.service-card strong { color: var(--accent); font-size: 1.35rem; }

.reviews-section {
  background: #fffaf1;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.review-card {
  min-height: 210px;
  display: grid;
  gap: 10px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(22, 19, 15, 0.07);
}

.review-card__rating {
  width: max-content;
  padding: 5px 9px;
  color: #171511;
  background: #f3c267;
  border-radius: 999px;
  font-weight: 950;
}

.review-card h3,
.review-card p {
  margin: 0;
}

.review-card p {
  color: var(--muted);
  line-height: 1.5;
}

.review-card strong {
  align-self: end;
}

.booking-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: start;
  overflow: hidden;
  background: #f2eee6;
}

.booking-layout::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 260px;
  background: linear-gradient(135deg, #143c37, #1d5d53 58%, #9d742c);
}

.booking-layout > * {
  position: relative;
  z-index: 1;
}

.booking-layout .section__header {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: #fffdf8;
}

.booking-layout .section__header .eyebrow {
  color: #f3c267;
}

.booking-form,
.booking-summary,
.admin-login,
.platform-login,
.admin-workspace {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  padding: clamp(20px, 4vw, 32px);
}

.booking-form label {
  display: grid;
  align-content: start;
}

.booking-form .field-service,
.booking-form .field-barber,
.booking-form .field-date {
  grid-column: span 2;
}

.booking-form label:not(.field-service):not(.field-barber):not(.field-date) {
  grid-column: span 2;
}

.booking-form > div,
.booking-form > button,
.booking-form .form-note {
  grid-column: 1 / -1;
}

/* These panels receive focus programmatically (not via Tab) when they appear,
   so suppress the outline that would otherwise box the whole panel. */
.booking-success:focus,
.manage-panel:focus { outline: none; }

.booking-success {
  align-self: start;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(19, 111, 99, 0.22);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 18px 46px rgba(22, 19, 15, 0.11);
}

.booking-success[hidden] {
  display: none;
}

.booking-success__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fffdf8;
  background: var(--accent);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 950;
}

.booking-success h3 {
  margin: 4px 0 14px;
  font-size: 1.55rem;
}

.booking-success p {
  margin: 0 0 16px;
  color: var(--muted);
}

.booking-success dl {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.booking-success dl div {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.booking-success dt {
  color: var(--muted);
  font-weight: 800;
}

.booking-success dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.manage-link-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f2e8;
}

.manage-link-card span {
  color: var(--muted);
  font-weight: 850;
}

.manage-link-card code {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(19, 111, 99, 0.2);
  border-radius: 6px;
  color: var(--accent-strong);
  background: #fffdf8;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.booking-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
}

.slot {
  min-height: 58px;
  display: grid;
  gap: 2px;
  place-items: center;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(22, 19, 15, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.slot span {
  font-size: 1rem;
  line-height: 1;
}

.slot small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.slot:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(19, 111, 99, 0.55);
  box-shadow: 0 12px 26px rgba(22, 19, 15, 0.12);
}

.slot.is-selected {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 16px 32px rgba(19, 111, 99, 0.26);
}

.slot.is-selected small {
  color: rgba(255, 255, 255, 0.78);
}

.slot:disabled {
  color: #9a9389;
  background:
    repeating-linear-gradient(135deg, rgba(217, 209, 197, 0.4) 0 7px, rgba(255, 253, 248, 0.72) 7px 14px),
    #eee8de;
  cursor: not-allowed;
  box-shadow: none;
}

.slot:disabled small {
  color: #9a9389;
}

.booking-summary {
  position: sticky;
  top: 88px;
  overflow: hidden;
  padding: 28px;
  color: #fffdf8;
  background: #173d38;
  border-color: rgba(255, 255, 255, 0.12);
}

.booking-summary::before {
  content: "";
  display: block;
  height: 5px;
  margin: -28px -28px 22px;
  background: linear-gradient(90deg, #f3c267, #17a089);
}

.booking-summary h3 {
  margin: 0 0 22px;
  font-size: 1.45rem;
}

.booking-summary dl { margin: 0; display: grid; gap: 16px; }
.booking-summary div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 0 0 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.booking-summary div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.booking-summary dt {
  color: rgba(255, 253, 248, 0.66);
}

.booking-summary dd {
  margin: 0;
  max-width: 180px;
  color: #fffdf8;
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}
.form-note { min-height: 24px; color: var(--accent-strong); font-weight: 750; }

.manage-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  background: #fffdf8;
}

.manage-layout .section__header {
  grid-column: 1 / -1;
}

.manage-lookup,
.manage-panel,
.manage-card,
.manage-editor,
.manage-cancel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(22, 19, 15, 0.08);
}

.manage-lookup {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  align-items: end;
  gap: 14px;
  padding: 18px;
}

.manage-lookup .form-note {
  grid-column: 1 / -1;
  margin: 0;
}

.manage-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 16px;
}

.manage-card,
.manage-editor,
.manage-cancel {
  box-shadow: none;
  padding: 18px;
}

.manage-card {
  display: grid;
  align-content: start;
  gap: 14px;
  color: #fffdf8;
  background: #173d38;
  border-color: rgba(255, 255, 255, 0.12);
}

.manage-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.manage-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.manage-card div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.manage-card dt {
  color: rgba(255, 253, 248, 0.66);
  font-size: 0.84rem;
}

.manage-card dd {
  margin: 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.status-pill {
  width: max-content;
  padding: 5px 10px;
  color: #173d38;
  background: #f3c267;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.is-cancelled {
  color: #fffdf8;
  background: var(--danger);
}

.manage-editor {
  display: grid;
  gap: 16px;
}

.manage-editor .field-time,
.manage-editor > button {
  grid-column: 1 / -1;
}

.manage-cancel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.manage-review {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.manage-review h4 { margin: 0; }

.admin-panel { display: none; background: #f7f4ee; }
body.is-admin-route .admin-panel { display: block; }
.account-layout { display: none; background: #f7f4ee; }
body.is-account-route .account-layout { display: block; }

/* Signed-out account is a focused auth screen: centre the card and drop the
   generic "My appointments" page hero (it's meaningless before you sign in). */
body.is-account-signedout .account-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.is-account-signedout .account-layout > .section__header { display: none; }
body.is-account-signedout .account-signin { margin-top: clamp(1.5rem, 6vh, 4rem); }

.account-signin {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line, #e6ddd0);
  border-radius: 16px;
  padding: 2rem 1.9rem;
  box-shadow: 0 18px 40px rgba(31, 24, 17, 0.08);
}

/* The form/sent/error panels are direct children of the card; give each an even
   internal rhythm (the card's own gap only spaces the panels, not their rows). */
#accountSigninForm {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.account-signin__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.2rem;
}
.account-signin__brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
}
.account-signin__brand-name {
  font-weight: 850;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.account-signin__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.account-signin__head strong { font-size: 1.2rem; }

.account-signin__head span { color: var(--muted, #6b5f50); font-size: 0.9rem; line-height: 1.45; }

.account-signin__primary { width: 100%; }

.account-signin__providers {
  display: flex;
  gap: 0.6rem;
}

.account-signin__providers .button { flex: 1; }

.account-signin__password {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.account-signin__divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.35rem 0;
  color: var(--muted, #6b5f50);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-signin__divider::before,
.account-signin__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line, #e6ddd0);
}

.account-signin__pwactions {
  display: flex;
  gap: 0.6rem;
}

.account-signin__pwactions .button { flex: 1; }

.account-signin__forgot {
  margin-top: 0.6rem;
  align-self: flex-start;
  padding: 4px 2px;
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}

.account-signin__forgot:hover { color: var(--accent-strong); }

.account-verify {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgba(190, 140, 40, 0.35);
  background: rgba(220, 170, 60, 0.12);
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--ink);
}
.account-verify span { flex: 1; min-width: 200px; }
.account-verify .button { flex: none; }

.account-signin__sent {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 0;
}
.account-signin__sent strong { font-size: 1.15rem; }
.account-signin__sent .form-note { margin: 0; }
.account-signin__sent-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 800;
}
.account-signin__sent .button { margin-top: 4px; }
.account-signin__error-icon {
  background: rgba(190, 60, 60, 0.12);
  color: #b94a3b;
}

.account-profile {
  background: #fff;
  border: 1px solid var(--line, #e6ddd0);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.account-profile .customer-section-title { margin: 0; }

.account-profile__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.account-profile button[type="submit"] { align-self: flex-start; }
.admin-login,
.platform-login {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 12px;
  align-items: end;
  max-width: 620px;
  padding: 18px;
}

.staff-login {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.staff-login[hidden] { display: none; }

.staff-login__head,
.staff-login label,
.staff-login .staff-invites,
.staff-login .form-note {
  grid-column: 1 / -1;
}

.staff-login__head {
  display: grid;
  gap: 4px;
}

.staff-login__head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.staff-login__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-login textarea {
  min-height: 74px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.staff-login .staff-invites {
  display: grid;
  gap: 8px;
}

.platform-login {
  margin-bottom: 18px;
  max-width: 760px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.admin-login .form-note,
.platform-login .form-note { grid-column: 1 / -1; margin: 0; }
.admin-workspace { margin-top: 20px; padding: 18px; }
.admin-login[hidden],
.platform-login[hidden],
.platform-workspace[hidden],
#platformWorkspace[hidden],
.admin-workspace[hidden] {
  display: none;
}

/* Sticky footer: server pages are a full-height flex column so the footer
   sits at the bottom of the viewport on short pages (e.g. /cookies) instead
   of floating up mid-screen, and flows after content on long ones. */
.market-page,
.landing-page {
  background: #f7f4ee;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.market-page > main,
.landing-page > main {
  flex: 1 0 auto;
}
.market-page > .site-footer,
.landing-page > .site-footer {
  margin-top: 0;
}

.landing-hero {
  position: relative;
  min-height: min(760px, calc(100svh - 68px));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fffdf8;
  background: #173d38;
}

.landing-hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 35, 31, 0.88), rgba(10, 35, 31, 0.56) 44%, rgba(10, 35, 31, 0.16)),
    url("assets/barbershop-hero.jpg") center / cover;
}
@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .landing-hero__media {
    background:
      linear-gradient(90deg, rgba(10, 35, 31, 0.88), rgba(10, 35, 31, 0.56) 44%, rgba(10, 35, 31, 0.16)),
      image-set(url("assets/barbershop-hero.webp") type("image/webp"), url("assets/barbershop-hero.jpg") type("image/jpeg")) center / cover;
  }
}

.landing-hero__content {
  position: relative;
  z-index: 1;
  max-width: 840px;
  padding: clamp(56px, 8vw, 112px) var(--pad);
}

.landing-hero h1 {
  max-width: 760px;
  margin: 8px 0 18px;
  color: #fffdf8;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.92;
}

.landing-hero p:not(.eyebrow) {
  max-width: 660px;
  margin: 0 0 22px;
  color: rgba(255, 253, 248, 0.88);
  font-size: 1.08rem;
}

.landing-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 76px) var(--pad);
}

.landing-card-grid,
.landing-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center;
  gap: 16px;
}

.landing-card,
.landing-shop {
  display: grid;
  gap: 10px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 19, 15, 0.08);
}

.landing-card span,
.landing-card small,
.landing-shop p {
  color: var(--muted);
}

.landing-card strong,
.landing-shop h2 {
  font-size: clamp(1.45rem, 3vw, 2.3rem);
}

.landing-shop h2,
.landing-shop p {
  margin: 0;
}

.landing-shop > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fffdf8;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 950;
}

.market-hero {
  padding: clamp(58px, 9vw, 116px) var(--pad) clamp(36px, 6vw, 76px);
  color: #fffdf8;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent) 72%, var(--gold));
}

.market-hero .eyebrow {
  display: inline-block;
  padding: 4px 8px;
  color: #171511;
  background: #f3c267;
  border-radius: 6px;
}

.market-hero h1 {
  max-width: 820px;
  margin: 8px 0 18px;
  color: #fffdf8;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.92;
}

.market-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 253, 248, 0.88);
  font-size: 1.08rem;
}

.market-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) var(--pad);
}

.market-intro {
  max-width: 820px;
  margin-bottom: 26px;
}

.market-intro h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.market-intro p {
  margin: 0;
  color: var(--muted);
}

.market-list {
  display: grid;
  gap: 14px;
}

.market-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(22, 19, 15, 0.07);
}

.market-filters label {
  display: grid;
}

.market-filters .market-filter-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
}
.market-filters .market-filter-check input {
  width: auto;
  margin: 0;
}

.market-filters .button {
  min-height: 44px;
}

.market-distance {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary, #1f7a5a);
  background: rgba(31, 122, 90, 0.1);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.market-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.68);
}

.market-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(22, 19, 15, 0.08);
}

/* Whole-card click: a stretched link over the card opens the shop page; the
   Book button sits above it so it stays a separate action. */
.landing-shop,
.market-card {
  position: relative;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}
.landing-shop:hover,
.market-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(22, 19, 15, 0.14);
}
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.card-link:hover { color: var(--accent); }
.card-action { position: relative; z-index: 1; }

.market-card h2 {
  margin: 2px 0 10px;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.market-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.market-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.market-badge--open { color: #0b6b4f; background: #e7f4ee; border-color: #bfe3d3; }
.market-badge--closed { color: var(--muted); background: #f1ede6; }
.market-badge--rating { color: var(--gold); background: #fbf2dd; border-color: #ecdcb4; }

.market-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.market-card p {
  max-width: 760px;
  margin: 0 0 10px;
  color: var(--muted);
}

.market-meta {
  font-size: 0.92rem;
}

.market-card__action {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.market-card__action strong {
  color: var(--accent);
  font-size: 1.2rem;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 5px;
  margin-bottom: 16px;
  background: #f1eadd;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.tab {
  min-height: 38px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.tab:hover { color: var(--ink); }

.tab.is-active {
  color: var(--accent-strong);
  background: #fff;
  border-color: transparent;
  box-shadow: 0 1px 3px rgba(8, 30, 27, 0.12);
}

/* Optional leading glyph per tab (set via ::before content map below). */
.tab__icon { font-size: 1rem; line-height: 1; }

.tab-panel { display: none; padding-top: 18px; }
.tab-panel.is-active { display: block; }

.platform-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.platform-head h3 {
  margin: 0 0 4px;
}

.platform-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
}

.platform-section {
  min-width: 0;
}

.platform-section--detail,
.platform-section--users,
.platform-grid > .platform-collapse,
.platform-section:nth-child(n + 4) {
  grid-column: 1 / -1;
}
.platform-grid > .platform-collapse { margin-top: 0; }

.platform-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.platform-tenant-row {
  align-items: start;
}

.platform-tenant-row.is-selected {
  border-color: rgba(19, 111, 99, 0.55);
  box-shadow: inset 4px 0 0 var(--primary);
}

.platform-invite-row,
.platform-access-row,
.platform-user-row {
  align-items: start;
}

.platform-health-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.platform-health-summary strong {
  font-size: 1.15rem;
}

.platform-health-summary .status-pill.is-degraded {
  color: #fffdf8;
  background: var(--danger);
}

.platform-health-grid {
  display: grid;
  gap: 8px;
}

.platform-health-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: #f7f4ee;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.platform-health-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-health-row strong,
.platform-health-row span {
  overflow-wrap: anywhere;
}

.platform-detail-card {
  display: grid;
  gap: 16px;
}

.platform-detail-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.platform-detail-card__head h4 {
  margin: 8px 0 4px;
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.platform-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-metric-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  background: #f7f4ee;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.platform-metric-grid span,
.platform-detail-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.platform-metric-grid strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
}

.platform-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.platform-detail-list div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.platform-detail-list dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.platform-marketplace-form {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: end;
  padding-top: 4px;
}

.platform-marketplace-form textarea {
  min-height: 84px;
  resize: vertical;
}

.settings-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 24px;
}
.settings-grid.is-active { display: grid; }

.settings-form,
.availability-form,
.day-scheduler,
.service-editor,
.profile-editor {
  display: grid;
  gap: 12px;
}

.settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-form button { grid-column: 1 / -1; }
.wide-field { grid-column: 1 / -1; }
.media-setting {
  display: grid;
  gap: 8px;
}

.media-setting input[type="file"] {
  min-height: auto;
  padding: 9px;
  font-size: 0.88rem;
}

/* Reusable collapsible "card" used to declutter dense dashboards (settings
   groups, customer account sections, platform admin sections). */
.collapse-card,
.settings-group,
.account-collapse,
.platform-collapse {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, #fff);
  overflow: hidden;
}
.collapse-card + .collapse-card,
.settings-group + .settings-group,
.account-collapse + .account-collapse,
.platform-collapse + .platform-collapse {
  margin-top: 12px;
}
.collapse-card > summary,
.settings-group > summary,
.account-collapse > summary,
.platform-collapse > summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.collapse-card > summary::-webkit-details-marker,
.settings-group > summary::-webkit-details-marker,
.account-collapse > summary::-webkit-details-marker,
.platform-collapse > summary::-webkit-details-marker { display: none; }
.collapse-card > summary::after,
.settings-group > summary::after,
.account-collapse > summary::after,
.platform-collapse > summary::after {
  content: "\25be";
  color: var(--muted);
  transition: transform 0.2s ease;
}
.collapse-card[open] > summary::after,
.settings-group[open] > summary::after,
.account-collapse[open] > summary::after,
.platform-collapse[open] > summary::after { transform: rotate(180deg); }
.account-collapse > *:not(summary),
.platform-collapse > *:not(summary) { padding: 0 16px 16px; }

/* Settings form becomes a stack of accordion groups instead of one long grid. */
.settings-form { display: block; grid-template-columns: none; }
.settings-form > button[type="submit"] {
  display: block;
  width: 100%;
  margin-top: 16px;
  grid-column: auto;
}
.settings-group__body {
  padding: 4px 16px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-group__body > .wide-field,
.settings-group__body > .media-setting,
.settings-group__body > fieldset.social-settings { grid-column: 1 / -1; }

.field-help {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* Public shop photo gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-grid__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

/* Admin gallery editor */
.gallery-setting {
  display: grid;
  gap: 8px;
}

.gallery-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-thumb {
  position: relative;
  width: 86px;
  height: 86px;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gallery-thumb__remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--ink, #16130f);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(22, 19, 15, 0.25);
}

.gallery-thumb__remove:hover {
  background: #b3261e;
}

/* Public content blocks */
.content-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.content-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 18px 20px;
}

.content-block h3 {
  margin: 0 0 8px;
}

.content-block p {
  margin: 0;
  white-space: pre-line;
}

/* Admin content blocks editor */
.content-blocks-setting {
  display: grid;
  gap: 8px;
}

.content-block-quickadd {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-block-editor {
  display: grid;
  gap: 12px;
}

.content-block-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--paper);
}

.content-block-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.content-block-row__remove {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--ink, #16130f);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.content-block-row__remove:hover {
  background: #b3261e;
}

.content-block-row textarea {
  resize: vertical;
}

.location-editor {
  display: grid;
  gap: 12px;
}

.location-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--paper);
}

.location-row__head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.location-row__remove {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--ink, #16130f);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.location-row__remove:hover {
  background: #b3261e;
}

.location-row__map {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.location-row__coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--muted, #6b6b6b);
}

/* Map coordinate picker modal */
.map-picker {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.map-picker[hidden] {
  display: none;
}

.map-picker__panel {
  background: var(--paper);
  border-radius: 16px;
  padding: 20px;
  width: 92vw;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.map-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-picker__close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

.map-picker__canvas {
  height: 360px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.map-picker__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.map-picker__coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--muted, #6b6b6b);
}

.map-picker__save,
#locationMapSave {
  margin-left: auto;
}

/* Per-barber schedule editor */
.barber-editor-field {
  display: grid;
  gap: 10px;
}

.barber-editor-field > .field-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.barber-editor {
  display: grid;
  gap: 12px;
}

.barber-row {
  display: block;
}

.barber-row-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.barber-name-field {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
}

.barber-name-field span {
  font-size: 0.8rem;
  color: var(--muted);
}

.settings-form .barber-remove {
  grid-column: auto;
  width: auto;
  flex: 0 0 auto;
}

.barber-stores {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

.barber-store-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.barber-store-toggle {
  margin: 0;
  font-weight: 600;
}

.barber-store-schedule {
  margin-top: 8px;
  padding-left: 26px;
  border-left: 2px solid var(--border);
}

.barber-custom-toggle {
  margin-top: 10px;
}

.barber-follows-hint {
  margin-top: 6px;
}

.barber-grid {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.barber-day-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.barber-day-works {
  margin: 0;
}

.barber-day-time {
  display: grid;
  gap: 4px;
}

.barber-day-time span {
  font-size: 0.78rem;
  color: var(--muted);
}

.settings-form #addBarberButton {
  grid-column: auto;
  width: auto;
  justify-self: start;
}

.social-settings {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.social-settings legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
}
.availability-form {
  grid-template-columns: minmax(180px, 240px) minmax(160px, 220px) minmax(180px, 1fr) auto;
  align-items: end;
}
.service-editor { grid-template-columns: 1fr minmax(180px, 1.2fr) 120px 120px auto; }
.profile-editor { grid-template-columns: 1fr 120px 120px auto; }

.service-translate-all {
  margin-top: 12px;
}

.template-editor {
  display: grid;
  gap: 14px;
}

.template-editor__head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.template-editor h3 {
  margin-bottom: 4px;
}

.bookkeeping-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.bookkeeping-toolbar label {
  min-width: min(220px, 100%);
}

.expense-panel {
  margin-bottom: 22px;
}

.expense-editor {
  display: grid;
  grid-template-columns: 150px 150px minmax(180px, 1fr) 130px auto;
  gap: 10px;
  align-items: end;
}

.review-editor {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 120px 140px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.review-editor textarea {
  grid-column: 1 / -2;
}

.review-admin-row {
  align-items: start;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.report-card {
  padding: 18px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  margin-bottom: 8px;
}

.report-card strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.report-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.ledger-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.ledger-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.ledger-table th,
.ledger-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ledger-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.template-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.template-form .template-subject-field,
.template-form .template-body-field,
.template-form button {
  grid-column: 1 / -1;
}

textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  font: inherit;
}

.availability-manager {
  display: grid;
  gap: 22px;
}

.availability-calendar {
  padding: 16px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-header strong {
  text-align: center;
  font-size: 1.1rem;
}

.icon-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.icon-button:hover {
  border-color: rgba(19, 111, 99, 0.5);
  color: var(--accent);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.calendar-day:hover {
  border-color: rgba(19, 111, 99, 0.5);
  box-shadow: 0 8px 18px rgba(22, 19, 15, 0.08);
}

.calendar-day.is-selected {
  color: #fffdf8;
  background: var(--accent);
  border-color: var(--accent);
}

.calendar-day.is-muted {
  opacity: 0.48;
}

.calendar-day.is-closed:not(.is-selected) {
  background: #f5ede7;
}

.calendar-day.has-override:not(.is-selected) {
  border-color: #c79a44;
  box-shadow: inset 0 0 0 1px rgba(199, 154, 68, 0.28);
}

.calendar-day-number {
  font-size: 1rem;
  font-weight: 900;
}

.calendar-day-status,
.calendar-day-hours,
.calendar-day-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-status {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.calendar-day-hours {
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
}

.calendar-day-note {
  width: fit-content;
  max-width: 100%;
  padding: 3px 6px;
  color: #7d231c;
  background: #f8e5e1;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 900;
}

.calendar-day.is-selected .calendar-day-status,
.calendar-day.is-selected .calendar-day-hours,
.calendar-day.is-selected .calendar-day-note {
  color: rgba(255, 253, 248, 0.85);
}

.calendar-day.is-selected .calendar-day-note {
  background: rgba(255, 253, 248, 0.16);
}

.day-scheduler {
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) minmax(120px, auto) 120px 120px minmax(160px, 1fr) auto auto;
  align-items: end;
  padding: 14px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}

.checkline input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.checkline span {
  margin: 0;
}

.slot-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.slot-toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.availability-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.admin-slot.is-open {
  color: #075448;
  background: #e4f3ef;
  border-color: #9dcbc1;
}

.admin-slot.is-closed {
  color: #7d231c;
  background: #f8e5e1;
  border-color: #d9aaa2;
}

.admin-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-row h4 { margin: 0 0 4px; }

.waitlist-heading {
  margin: 22px 0 0;
}

.waitlist-join {
  margin-top: 12px;
}

.waitlist-note:empty {
  display: none;
}

.reschedule-editor {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.6rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}
.reschedule-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.admin-add-booking {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  padding: 0.4rem 1rem;
}
.admin-add-booking summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.4rem 0;
}
.admin-booking-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 0.6rem 0 0.3rem;
}
.admin-booking-form button[type="submit"] { align-self: end; }
.admin-booking-form .form-note { grid-column: 1 / -1; }
.admin-row p { margin: 0; color: var(--muted); }

.client-row {
  align-items: start;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
}

.client-row__summary {
  display: grid;
  gap: 7px;
}

.client-history {
  max-height: 112px;
  overflow: auto;
  margin: 4px 0 0;
  padding: 10px;
  background: rgba(19, 111, 99, 0.07);
  border: 1px solid rgba(19, 111, 99, 0.16);
  border-radius: 8px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.client-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-editor textarea,
.client-editor button {
  grid-column: 1 / -1;
}

.service-admin-body {
  display: grid;
  gap: 8px;
}

.service-translations {
  margin-top: 6px;
}

.service-translations summary {
  cursor: pointer;
  font-weight: 850;
}

.service-translation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.service-translation-grid textarea {
  resize: vertical;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions button,
.row-actions .row-action-link {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 800;
}

.row-actions .row-action-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

pre {
  width: 100%;
  min-height: 120px;
  max-height: 280px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  background: #221f1a;
  color: #f8f3ea;
  border-radius: 8px;
}

@media (max-width: 980px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-grid { grid-template-columns: 1fr; }
  .landing-card-grid,
  .landing-shop-grid { grid-template-columns: 1fr; }
  .booking-layout { grid-template-columns: 1fr; }
  .booking-summary { position: static; }
  .settings-grid { grid-template-columns: 1fr; }
  .report-grid,
  .report-columns { grid-template-columns: 1fr; }
  .manage-layout,
  .manage-lookup,
  .manage-panel,
  .manage-cancel,
  .review-editor { grid-template-columns: 1fr; }
  .review-editor textarea { grid-column: 1; }
  .manage-cancel { align-items: stretch; }
  .availability-calendar {
    overflow-x: auto;
  }
  .calendar-weekdays,
  .calendar-grid {
    min-width: 720px;
  }
  .availability-form,
  .day-scheduler,
  .expense-editor,
  .service-editor,
  .profile-editor,
  .template-form,
  .settings-form,
  .settings-group__body,
  .social-settings,
  .media-setting,
  .service-translation-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }
  nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 8px;
    order: 3;
  }
  .hero { min-height: 760px; align-items: end; }
  .hero__shade { background: linear-gradient(0deg, rgba(16, 15, 12, 0.88), rgba(16, 15, 12, 0.32)); }
  .info-band,
  .service-grid,
  .booking-form,
  .booking-success,
  .manage-layout,
  .manage-panel,
  .manage-cancel,
  .admin-login,
  .staff-login,
  .platform-login,
  .market-card,
  .market-filters { grid-template-columns: 1fr; }
  .market-card__action {
    justify-items: stretch;
  }
  .booking-form > * { grid-column: auto; }
  .booking-form {
    gap: 14px;
    padding: 18px;
  }
  .booking-success {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .booking-success dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .booking-success dd {
    text-align: left;
  }
  .booking-form .field-service,
  .booking-form .field-barber,
  .booking-form .field-date,
  .booking-form .field-time,
  .booking-form label:not(.field-service):not(.field-barber):not(.field-date) {
    grid-column: 1 / -1;
  }
  .slot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .slot {
    min-height: 50px;
    padding: 7px 4px;
  }
  .slot span {
    font-size: 0.92rem;
  }
  .slot small {
    font-size: 0.62rem;
  }
  .booking-summary {
    padding: 22px;
  }
  .booking-summary::before {
    margin: -22px -22px 18px;
  }
  .booking-summary div {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
  .booking-summary dd {
    max-width: none;
  }
  .calendar-weekdays,
  .calendar-grid {
    min-width: 0;
    gap: 4px;
  }
  .availability-calendar {
    padding: 10px;
    overflow-x: visible;
  }
  .calendar-header {
    grid-template-columns: 44px 1fr 44px;
  }
  .calendar-day {
    min-height: 58px;
    padding: 7px 5px;
  }
  .calendar-day-number {
    font-size: 0.95rem;
  }
  .calendar-day-status,
  .calendar-day-hours,
  .calendar-day-note {
    display: none;
  }
  .section { padding-inline: 14px; }
  .platform-grid { grid-template-columns: 1fr; }
  .platform-section--detail,
  .platform-section--users,
  .platform-section:nth-child(n + 4) { grid-column: auto; }
  .platform-detail-card__head,
  .platform-marketplace-form {
    display: grid;
    grid-template-columns: 1fr;
  }
  .platform-metric-grid,
  .platform-detail-list {
    grid-template-columns: 1fr;
  }
  .admin-row { grid-template-columns: 1fr; }
  .client-row { grid-template-columns: 1fr; }
  .client-editor { grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-start; }
}

.dashboard-overview {
  margin: 0 0 18px;
  padding: 0;
  background: transparent;
  border: none;
}

.dashboard-overview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.dashboard-overview__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.dashboard-overview__head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.dashboard-overview__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-tile {
  position: relative;
  padding: 15px 16px 15px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

/* Accent rail; colour-coded per metric via the --tile-accent custom property. */
.stat-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--tile-accent, var(--accent));
}

.stat-tile__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-tile__icon { font-size: 0.95rem; line-height: 1; }

.stat-tile__value {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 850;
  line-height: 1.15;
}

.stat-tile__sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Dashboard active (signed-in staff): swap the marketing hero for the
   compact CRM header so the workspace reads like an app, not a landing page. */
body.is-dashboard-active .admin-panel > .section__header { display: none; }

/* ---- Fullscreen / kiosk mode: fill the viewport, drop the public site chrome,
   and move section nav into a left sidebar for in-shop screens. ---- */
body.is-dashboard-fullscreen { overflow: hidden; }
body.is-dashboard-fullscreen .topbar,
body.is-dashboard-fullscreen .site-footer,
body.is-dashboard-fullscreen .cookie-banner,
body.is-dashboard-fullscreen .admin-panel > .section__header { display: none !important; }

body.is-dashboard-fullscreen #admin.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
}

body.is-dashboard-fullscreen .admin-workspace {
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #f6f2ea;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "head head" "nav content";
}

body.is-dashboard-fullscreen .workspace-toolbar {
  grid-area: head;
  margin: 0;
  border-radius: 0;
  border-width: 0 0 1px 0;
}

body.is-dashboard-fullscreen .tabs {
  grid-area: nav;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: start;
  gap: 3px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 12px 10px;
  background: #fff;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

body.is-dashboard-fullscreen .tab {
  width: 100%;
  justify-content: flex-start;
  min-height: 42px;
}

body.is-dashboard-fullscreen .tab.is-active {
  background: #e9f1ef;
  box-shadow: none;
}

body.is-dashboard-fullscreen .workspace-content {
  grid-area: content;
  overflow: auto;
  padding: 20px 22px 28px;
}

body.is-dashboard-fullscreen .tab-panel { padding-top: 0; }

/* Small screens: no room for a rail — keep the top tab bar inside fullscreen. */
@media (max-width: 720px) {
  body.is-dashboard-fullscreen .admin-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "head" "nav" "content";
  }
  body.is-dashboard-fullscreen .tabs {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
  body.is-dashboard-fullscreen .tab { width: auto; }
}
