:root {
  --bg: #f6f4f1; --card: #fff; --ink: #1f1d1a; --muted: #6d675f; --line: #e3ded7;
  --brand: #8a1c1c; --brand-ink: #fff; --good: #2f7d4a; --good-bg: #e7f4ec;
  --warn: #9a6400; --warn-bg: #fff3d6; --bad: #b3261e; --bad-bg: #fde4e1; --info-bg: #e8f0fb;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.topbar { background: #1f1d1a; color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; }
.brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav a, .linklike { color: #f1ebe3; text-decoration: none; font-size: 14px; }
.linklike { background: none; border: 0; cursor: pointer; padding: 0; font: inherit; }
.lang-switch a { padding: 2px 6px; border: 1px solid #555; border-radius: 4px; margin-left: 2px; }
.lang-switch a.active { background: #f1ebe3; color: #1f1d1a; }
main.wrap { padding-top: 24px; padding-bottom: 48px; }
.footer { color: var(--muted); font-size: 13px; padding-bottom: 32px; }
h1 { font-size: 26px; margin: 0 0 12px; } h2 { font-size: 20px; margin: 24px 0 10px; } h3 { margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.card.info { background: var(--info-bg); border-color: #c9d8f0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.shop-card { text-decoration: none; color: inherit; display: block; transition: box-shadow .15s; }
.shop-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.hero { text-align: center; padding: 24px 0 28px; }
.search { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.search input { flex: 1; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 8px; padding: 8px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-small { padding: 4px 10px; font-size: 13px; }
.btn-large { padding: 12px 22px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.form label { display: block; margin-bottom: 12px; font-weight: 500; }
.form label.checkbox, .form label.radio { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=time], select, textarea {
  display: block; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; margin-top: 4px;
}
td input, .datenav input, .datenav select, .step input[type=date] { display: inline-block; width: auto; margin: 0; }
.table td input[type=number], .table td input[type=time] { display: inline-block; width: auto; margin: 0; }
.table td input[type=text] { display: block; width: 100%; min-width: 120px; margin: 0; }
.form > .btn-large { margin-bottom: 18px; }
.w-num { width: 80px !important; }
.inline { display: inline; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: var(--good-bg); color: var(--good); }
.alert-error { background: var(--bad-bg); color: var(--bad); }
.alert-info { background: var(--info-bg); }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 13px; color: var(--muted); font-weight: 600; background: #faf8f5; }
.table.compact td { padding: 4px 6px; }
tr.inactive { opacity: .5; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.subnav strong { margin-right: 10px; }
.subnav a { padding: 6px 12px; border-radius: 999px; text-decoration: none; background: #fff; border: 1px solid var(--line); font-size: 14px; }
.subnav a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; color: var(--muted); text-decoration: none; }
.stat span { display: block; font-size: 26px; font-weight: 700; color: var(--ink); }
.stat-warn span { color: var(--bad); }
.datenav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
/* steps */
.step { margin-bottom: 18px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; background: #fff; font-weight: 400 !important; margin: 0 !important; }
.choice.selected { border-color: var(--brand); background: #fbeeee; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.slot input, .rating-scale input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.slot input:focus-visible + span, .rating-scale input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
/* appointments */
.appts { list-style: none; padding: 0; margin: 0; }
.appt { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.appt-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.appt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 160px; }
.appt.rel-warn { border-left-color: var(--warn); background: linear-gradient(90deg, var(--warn-bg), #fff 40%); }
.appt.rel-bad { border-left-color: var(--bad); background: linear-gradient(90deg, var(--bad-bg), #fff 40%); }
.appt.st-cancelled { opacity: .55; }
tr.rel-warn td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
tr.rel-bad td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
tr.rel-bad { background: var(--bad-bg); } tr.rel-warn { background: var(--warn-bg); }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.legend { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: #eee; }
.status-attended { background: var(--good-bg); color: var(--good); }
.status-late { background: var(--warn-bg); color: var(--warn); }
.status-no_show { background: var(--bad-bg); color: var(--bad); }
.status-upcoming, .status-in_progress { background: var(--info-bg); color: #24518f; }
.status-cancelled { background: #eee; color: #777; }
.rel-card.rel-warn { border-left: 5px solid var(--warn); } .rel-card.rel-bad { border-left: 5px solid var(--bad); } .rel-card.rel-good { border-left: 5px solid var(--good); }
details.mark summary { cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 600; text-align: right; }
.mark-form { margin-top: 8px; padding: 12px; background: #fcfaf8; border: 1px solid var(--line); border-radius: 8px; width: 300px; }
.mark-form label { display: block; margin-bottom: 8px; font-size: 13px; }
.mark-form .radio { display: inline-block; margin-right: 12px; font-weight: 600; }
.rating { border: 0; padding: 0; margin: 0 0 8px; }
.rating legend { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.rating-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.rating-scale label { margin: 0 !important; position: relative; }
.rating-scale span { display: block; text-align: center; padding: 5px 0; border: 1px solid var(--line); border-radius: 5px; background: #fff; cursor: pointer; font-size: 13px; }
.rating-scale input:checked + span { background: var(--bad); color: #fff; border-color: var(--bad); }
.rating-ends { display: flex; justify-content: space-between; }
/* accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
fieldset.plain, fieldset.step { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset legend h3 { margin: 0 0 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
/* misc components */
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: #eee; color: #555; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; border-radius: var(--radius); }
.table-wrap .table { margin: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; align-items: start; }
.grid-form .span-2 { grid-column: 1 / -1; }
.grid-form > .btn { justify-self: start; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.blocks { list-style: none; padding: 0; margin: 0 0 10px; }
.block-row { background: repeating-linear-gradient(45deg, #f1eeea, #f1eeea 8px, #e9e5df 8px, #e9e5df 16px); border: 1px dashed #cfc8bf; border-radius: var(--radius); padding: 8px 14px; margin-bottom: 8px; font-size: 14px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { width: auto; flex: 1 1 220px; margin: 0; }
.toolbar select { width: auto; margin: 0; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; }
.hours { list-style: none; padding: 0; margin: 8px 0 12px; }
.hours span:first-child { display: inline-block; min-width: 2.5em; font-weight: 600; }
details.card > summary { cursor: pointer; }
details.card[open] > summary { margin-bottom: 12px; }
.staff-book { margin-top: 18px; }
.cancelled-list { margin: 6px 0 16px; }
.cancelled-list summary { cursor: pointer; }
.settings .card h2 { margin-top: 0; }
.inline-form { margin-top: 8px; max-width: 420px; }
@media (max-width: 640px) {
  .appt { grid-template-columns: 1fr; }
  .appt-side { align-items: flex-start; min-width: 0; }
  details.mark summary { text-align: left; }
  .mark-form { width: 100%; }
  .topbar-inner { padding-top: 8px; padding-bottom: 8px; }
  .nav { gap: 10px; }
  .shop-head .btn-large { width: 100%; text-align: center; }
}
/* phone verification */
.verify-box { text-align: center; }
.verify-instruction { font-size: 16px; background: var(--info-bg); border-radius: var(--radius); padding: 12px 14px; text-align: left; }
.verify-code { font-size: 40px; font-weight: 700; letter-spacing: .25em; font-variant-numeric: tabular-nums; margin: 8px 0 14px; }
.verify-sms { display: block; margin: 0 auto 10px; max-width: 320px; }
.verify-status { font-weight: 600; }
.account-choice { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.password-once { margin-top: 16px; }
.password-once summary { cursor: pointer; }
.shop-mod-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.shop-mod-head h3 { margin: 0; }
.shop-mod.status-pending { border-left: 5px solid var(--warn); }
.shop-mod.status-suspended { border-left: 5px solid var(--bad); }
.shop-mod-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.suspend-form { display: inline-flex; gap: 6px; align-items: center; }
.suspend-form input[type=text] { width: 220px; margin: 0; }
.delete-account summary { cursor: pointer; color: var(--bad); }
.danger-zone { border-color: var(--bad-bg); }
.danger-zone summary { color: var(--bad); }
