/* Bella Rose – shared styles. Mobile first. */
:root {
  --rose-900: #5e1730;
  --rose-700: #8c2a4b;
  --rose-600: #9d2f52;
  --rose-100: #f9e4ea;
  --rose-50: #fdf3f5;
  --ink: #2b1d22;
  --muted: #5c4a50;
  --line: #d9c4ca;
  --bg: #fffaf8;
  --card: #ffffff;
  --ok-bg: #e5f4ea;
  --ok-ink: #1d5a33;
  --warn-bg: #fff2d6;
  --warn-ink: #6b4500;
  --err-bg: #fde7e7;
  --err-ink: #8a1c1c;
  --focus: #1f4fbf;
  --radius: 12px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--rose-900); }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); margin: 2rem 0 .75rem; }
h3 { font-size: 1.2rem; margin: 0 0 .25rem; }
p { margin: 0 0 1rem; }
a { color: var(--rose-700); text-underline-offset: 3px; }
a:hover { color: var(--rose-900); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header & footer ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding: .5rem 1rem; max-width: 72rem; margin: 0 auto;
}
.brand {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--rose-900);
  text-decoration: none; display: inline-flex; align-items: center; min-height: 44px;
}
.brand span { color: var(--rose-600); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.site-nav a, .site-nav button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .75rem;
  border-radius: 999px; text-decoration: none; color: var(--ink); font: inherit; font-size: 1rem;
  background: none; border: 0; cursor: pointer;
}
.site-nav a:hover, .site-nav button:hover { background: var(--rose-50); color: var(--rose-900); }
.site-nav a[aria-current="page"] { background: var(--rose-100); color: var(--rose-900); font-weight: 600; }

main { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
main.narrow { max-width: 34rem; }

.site-footer {
  border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem;
  padding: 1.5rem 1rem; text-align: center;
}

/* ---------- Building blocks ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem;
}
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; min-width: 44px; padding: .65rem 1.25rem; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid var(--rose-600); background: var(--rose-600); color: #fff;
}
.btn:hover { background: var(--rose-700); border-color: var(--rose-700); color: #fff; }
.btn.secondary { background: #fff; color: var(--rose-700); }
.btn.secondary:hover { background: var(--rose-50); color: var(--rose-900); }
.btn.small { min-height: 44px; padding: .4rem .9rem; font-size: .95rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

label, legend { font-weight: 600; display: block; margin-bottom: .35rem; }
.hint { color: var(--muted); font-size: .95rem; font-weight: 400; margin: -.15rem 0 .5rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"],
input[type="search"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .75rem; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid #8c7a80; border-radius: 8px;
}
textarea { min-height: 6rem; resize: vertical; }
::placeholder { color: #6b5a60; opacity: 1; }
input[type="file"] { font: inherit; max-width: 100%; min-height: 44px; }
input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--rose-600); }
.field { margin-bottom: 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }

.notice { border-radius: 8px; padding: .85rem 1rem; margin: 0 0 1rem; border: 1px solid transparent; }
.notice:empty { display: none; }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: #a9d3b7; }
.notice.err { background: var(--err-bg); color: var(--err-ink); border-color: #f0b4b4; }
.notice.info { background: var(--rose-50); color: var(--ink); border-color: var(--line); }

.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.badge.confirmed { background: var(--ok-bg); color: var(--ok-ink); }
.badge.pending, .badge.needs_attention { background: var(--warn-bg); color: var(--warn-ink); }
.badge.cancelled, .badge.expired { background: #ececec; color: #3d3d3d; }

/* ---------- Home ---------- */
.hero {
  background: linear-gradient(160deg, var(--rose-50), #fff);
  border: 1px solid var(--line); border-radius: 20px; padding: 1.75rem 1.25rem; margin-bottom: 1.5rem;
}
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1rem 3rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -.1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--rose-600); color: #fff; font-weight: 700;
}
.meta { color: var(--muted); font-size: .95rem; }

/* ---------- Booking choices ---------- */
.choices { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .choices.three { grid-template-columns: repeat(3, 1fr); } .choices.two { grid-template-columns: repeat(2, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  display: block; height: 100%; margin: 0; padding: 1rem; min-height: 44px; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 400;
}
.choice label strong { display: block; font-size: 1.1rem; color: var(--rose-900); }
.choice input:checked + label { border-color: var(--rose-600); background: var(--rose-50); box-shadow: inset 0 0 0 1px var(--rose-600); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.days { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); margin-bottom: .75rem; }
.slots { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); }
.days .choice label, .slots .choice label { text-align: center; padding: .6rem .25rem; }
.days .choice label small { display: block; color: var(--muted); }

.summary { background: var(--rose-50); border-color: var(--rose-100); }
.summary dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0 0 1rem; }
.summary dt { font-weight: 600; }
.summary dd { margin: 0; }

/* ---------- Account ---------- */
.booking-card h3 { margin-bottom: .35rem; }
.booking-card .actions { margin-top: .75rem; }
.booking-card form { margin-top: .75rem; }

/* ---------- Admin ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; border-bottom: 2px solid var(--line); padding-bottom: .5rem; }
.tabs .btn[aria-selected="true"], .tabs .btn[aria-selected="true"]:hover { background: var(--rose-600); color: #fff; border-color: var(--rose-600); }
.filters { display: grid; gap: .75rem; grid-template-columns: 1fr; align-items: end; margin-bottom: 1rem; }
@media (min-width: 900px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr auto; } }
.filters .field { margin: 0; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .97rem; }
table.data th, table.data td { text-align: left; padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--rose-50); color: var(--rose-900); overflow-wrap: normal; word-break: normal; }
table.data td { overflow-wrap: break-word; }
@media (max-width: 899px) {
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; padding: .5rem; }
  table.data td { border: 0; padding: .3rem .25rem; }
  table.data td::before { content: attr(data-label); display: block; font-weight: 600; color: var(--muted); font-size: .85rem; }
}
.row-edit { display: grid; gap: .5rem; }

.hours-row {
  display: grid; gap: .5rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr 1fr;
}
.hours-row .day { grid-column: 1 / -1; font-weight: 600; display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.hours-row .day label { margin: 0; display: flex; align-items: center; gap: .5rem; }
.hours-row .times { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.hours-row .times label { font-weight: 400; font-size: .9rem; margin: 0; }
@media (min-width: 700px) {
  .hours-row { grid-template-columns: 12rem 1fr; }
  .hours-row .day, .hours-row .times { grid-column: auto; }
}

.edit-panel { border: 2px solid var(--rose-600); }
.pager { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .choice label, .site-nav a { transition: background-color .15s ease, border-color .15s ease; }
  html { scroll-behavior: smooth; }
}
