:root {
  --ink: #16211f;
  --muted: #63706c;
  --line: #d9e1dd;
  --surface: #ffffff;
  --wash: #f4f7f5;
  --brand: #176b5b;
  --brand-strong: #0f4a3f;
  --accent: #c7763d;
  --danger: #b33a3a;
  --success: #1f7a4d;
  --shadow: 0 16px 40px rgba(20, 43, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--brand-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.78rem 0.85rem;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

label span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

main {
  min-height: calc(100vh - 68px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.topnav,
.tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.topnav a,
.tabs a,
.link-button {
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}

.topnav a:hover,
.tabs a:hover,
.tabs a[aria-current="page"],
.link-button:hover {
  background: #e8f0ed;
  color: var(--brand-strong);
}

.inline {
  display: inline;
}

.button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.small-button:hover {
  background: var(--brand-strong);
}

.button.secondary {
  background: var(--accent);
}

.button.ghost {
  background: #e8f0ed;
  color: var(--brand-strong);
}

.button.full {
  width: 100%;
}

.small-button {
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
}

.small-button.danger {
  background: var(--danger);
}

.booking-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(1.25rem, 4vw, 3rem);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.25rem, 5vw, 4rem);
}

.store-hero {
  align-self: start;
  padding-top: clamp(1rem, 5vw, 4rem);
}

.store-hero h1,
.admin-header h1,
.legal-page h1,
.panel h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.store-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.1rem 0 1rem;
}

.store-hero .hero-actions .button {
  min-height: 34px;
  border: 1px solid var(--line);
  padding: 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.store-hero .hero-actions .button:hover {
  background: #fff;
  color: var(--brand-strong);
}

.store-hero .hero-actions .button.secondary,
.store-hero .hero-actions .button.ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
}

.store-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
  max-width: 680px;
}

.store-info {
  max-width: 680px;
  margin-top: 0.4rem;
}

.store-info summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.42rem 0.65rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.store-info summary::-webkit-details-marker {
  display: none;
}

.store-info summary::after {
  content: "+";
  margin-left: 0.45rem;
  color: var(--brand);
}

.store-info[open] summary {
  margin-bottom: 0.55rem;
  background: #fff;
  color: var(--brand-strong);
}

.store-info[open] summary::after {
  content: "-";
}

.store-meta div,
.metric,
.summary-box,
.form-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.75);
}

.store-meta div {
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.45);
}

.store-meta dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.store-meta dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.reservation-form,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.reservation-form h2,
.panel h2,
.legal-section h2,
.legal-page h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.step-grid,
.field-grid,
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.reservation-form .step-grid {
  grid-template-columns: 1fr;
}

.field-grid {
  margin-top: 1rem;
}

.field-grid label:last-child,
.wide {
  grid-column: 1 / -1;
}

.summary-box {
  display: grid;
  gap: 0.2rem;
  margin: 1rem 0;
  background: #f7fbfa;
}

.checkbox-line,
.checkbox-compact {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.checkbox-line {
  margin: 1rem 0;
}

.checkbox-line input,
.checkbox-compact input {
  width: auto;
}

.fine-print,
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.alert,
.success {
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.alert {
  border: 1px solid #f0b4b4;
  background: #fff1f1;
  color: #862929;
}

.success {
  border: 1px solid #a8d8bd;
  background: #edf8f1;
  color: #135f39;
}

.form-result {
  display: grid;
  gap: 0.15rem;
  margin-top: 1rem;
  min-height: 52px;
  box-shadow: none;
}

.admin-shell,
.legal-page,
.pricing-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
}

.admin-header h1,
.legal-page h1,
.pricing-page h1,
.panel h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.notice-line {
  border: 1px solid #d8c9a8;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1.2rem 0 1.5rem;
  background: #fff9ea;
  color: #6f4c17;
  font-weight: 800;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.price-card,
.addon-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
  background: var(--surface);
}

.price-card.featured {
  border-color: #94c8bd;
  box-shadow: var(--shadow);
}

.price-card h2,
.addon-card h3 {
  margin: 0 0 0.5rem;
}

.price {
  margin: 0.6rem 0;
  color: var(--brand-strong);
  font-size: 2rem;
  font-weight: 900;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
}

.price-card ul {
  padding-left: 1.1rem;
}

.price-card .button {
  margin-top: 1rem;
}

.pill-list,
.addon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #f7fbfa;
  color: var(--brand-strong);
  font-weight: 800;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pricing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}

.pricing-cta p {
  margin: 0;
  color: var(--muted);
}

.tabs {
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.4rem;
}

.qr-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.qr {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.86rem;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: #edf1f0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.status.confirmed,
.status.implemented {
  background: #e7f5ed;
  color: var(--success);
}

.status.canceled {
  background: #fff1f1;
  color: var(--danger);
}

.status.pending {
  background: #fff7e8;
  color: #8b5b19;
}

.date-filter {
  display: flex;
  gap: 0.5rem;
}

.settings-list {
  display: grid;
  gap: 1rem;
}

.service-row,
.hours-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 0.75rem;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.hours-row {
  grid-template-columns: 100px repeat(3, minmax(120px, 1fr)) 80px;
}

.add-form {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.panel + .panel,
.legal-section + .legal-section {
  margin-top: 1rem;
}

.panel.narrow {
  max-width: 520px;
  margin: clamp(2rem, 8vw, 5rem) auto;
}

.stack {
  display: grid;
  gap: 1rem;
}

.source-list {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.2rem;
}

@media (max-width: 860px) {
  .topbar,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .booking-shell,
  .store-meta,
  .metric-grid,
  .qr-layout,
  .pricing-grid,
  .addon-grid,
  .step-grid,
  .field-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .store-hero {
    padding-top: 0.5rem;
  }

  .service-row,
  .hours-row {
    grid-template-columns: 1fr;
  }

  .date-filter {
    width: 100%;
  }

  .pricing-cta {
    align-items: stretch;
    flex-direction: column;
  }
}
