/* =========================================================
   WILD WOLF — Design system
   Forest Green #1F4A36 · Earth Brown #654A35 · Gold #C6A15B
   Warm Beige #F3EBDD · Charcoal #252525
   ========================================================= */
:root {
  --forest: #1F4A36;
  --forest-deep: #15342600;
  --forest-dark: #153326;
  --forest-soft: #2C5E47;
  --brown: #654A35;
  --gold: #C6A15B;
  --gold-soft: #E7D3A6;
  --beige: #F3EBDD;
  --beige-deep: #E9DDC8;
  --paper: #FBF8F2;
  --charcoal: #252525;
  --ink: #2B2B28;
  --muted: #6E6A62;
  --line: #E2D8C6;
  --white: #FFFFFF;

  --green-level: #3E7A55;
  --yellow-level: #C9962B;
  --red-level: #A8432F;
  --danger: #A8432F;
  --ok: #3E7A55;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow: 0 1px 2px rgba(31, 74, 54, .06), 0 8px 24px rgba(31, 74, 54, .08);
  --shadow-lg: 0 18px 50px rgba(21, 51, 38, .22);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--beige);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--forest); }
[hidden] { display: none !important; }

.app { min-height: 100vh; min-height: 100dvh; }

/* ---------- Boot / loading ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; background: var(--forest); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(198, 161, 91, .25); border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
.spinner.dark { border-color: rgba(31, 74, 54, .15); border-top-color: var(--forest); }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--beige-deep) 0%, #F6EFE3 50%, var(--beige-deep) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Typography ---------- */
/* Cormorant defaults to old-style figures (1 looks like I): force lining numbers */
h1, h2, h3, .display, .price, .card-title, .date-chip .dn { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: .2px; color: var(--forest-dark); margin: 0; line-height: 1.1; }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

/* ---------- Layout ---------- */
.screen { padding: 0 var(--s4) calc(var(--nav-h) + var(--s6) + env(safe-area-inset-bottom, 0px)); max-width: 720px; margin: 0 auto; }
.screen.no-nav { padding-bottom: var(--s6); }
.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 380px) { .grid-2 { grid-template-columns: 1fr; } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: var(--s6) 0 var(--s3); }
.section-title h3 { font-size: 22px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--forest); color: var(--beige);
  padding: calc(var(--s3) + env(safe-area-inset-top, 0px)) var(--s4) var(--s3);
  display: flex; align-items: center; gap: var(--s3);
}
.topbar .title { font-family: var(--font-display); font-size: 22px; font-weight: 600; flex: 1; color: var(--beige); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(243, 235, 221, .1); color: var(--beige); cursor: pointer; position: relative;
}
.icon-btn:hover { background: rgba(243, 235, 221, .18); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; background: var(--gold); border-radius: 50%; border: 2px solid var(--forest); }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; }
.brand .mark { width: 36px; height: 36px; }
.brand .name { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: 1.5px; color: var(--beige); line-height: 1; }
.brand .name small { display: block; font-family: var(--font-body); font-size: 9px; letter-spacing: 2.4px; color: var(--gold); font-weight: 600; margin-top: 3px; }

/* ---------- Hero ---------- */
.hero {
  margin: 0 calc(var(--s4) * -1);
  padding: var(--s5) var(--s4) 84px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(198, 161, 91, .22), transparent 55%),
    linear-gradient(180deg, var(--forest) 0%, var(--forest-dark) 100%);
  color: var(--beige);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60 L0 38 L40 18 L70 34 L110 6 L150 30 L190 14 L230 36 L270 10 L310 32 L350 16 L400 34 L400 60 Z' fill='%23F3EBDD'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}
.hero h1 { color: var(--beige); font-size: 32px; }
.hero p { color: rgba(243, 235, 221, .82); margin: var(--s2) 0 0; max-width: 34ch; }
.hero .quote { font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--gold-soft); margin-top: var(--s4); line-height: 1.3; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border-radius: var(--r-md); padding: var(--s4);
  box-shadow: var(--shadow); border: 1px solid rgba(226, 216, 198, .6);
}
.card.lift { margin-top: calc(var(--s6) * -1); position: relative; z-index: 2; }
.card.dark { background: var(--forest); color: var(--beige); border: 0; }
.card.dark h3, .card.dark .display { color: var(--beige); }
.card.gold { background: linear-gradient(135deg, #FFF9EC, #F6E9CC); border-color: var(--gold-soft); }
.card.clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.card.clickable:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.card-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--forest-dark); margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 var(--s5); border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--forest); color: var(--beige); }
.btn-primary:hover:not(:disabled) { background: var(--forest-soft); }
.btn-gold { background: var(--gold); color: var(--forest-dark); }
.btn-gold:hover:not(:disabled) { background: #D3B272; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--paper); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(168, 67, 47, .35); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 var(--s4); font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--forest); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Forms ---------- */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--forest-dark); margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--paper); outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 88px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(31, 74, 54, .12); background: var(--white); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--forest); margin-top: 1px; flex: none; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--forest-dark); margin-bottom: var(--s3); padding: 0; }
.form-error { background: #FBEDE9; color: var(--danger); border-radius: var(--r-sm); padding: 10px 14px; font-size: 14px; }
.form-info { background: #EEF4EF; color: var(--forest); border-radius: var(--r-sm); padding: 10px 14px; font-size: 14px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--beige); color: var(--forest-dark); white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.lvl-green { background: #E5F0E8; color: var(--green-level); }
.lvl-yellow { background: #FBF0D7; color: #8E6714; }
.lvl-red { background: #F7E2DC; color: var(--red-level); }
.lvl-none { background: #ECE8E1; color: var(--muted); }
.st-pending { background: #FBF0D7; color: #8E6714; }
.st-confirmed { background: #E5F0E8; color: var(--green-level); }
.st-in_progress { background: #E3ECF3; color: #2E5A7A; }
.st-completed { background: #ECE8E1; color: var(--brown); }
.st-cancelled, .st-no_show { background: #F7E2DC; color: var(--red-level); }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(251, 248, 242, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 720px; height: var(--nav-h); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.bottom-nav a.active { color: var(--forest); }
.bottom-nav a.active svg { color: var(--gold); }
.bottom-nav .book-pill { width: 50px; height: 50px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--gold); box-shadow: var(--shadow-lg); border: 3px solid var(--paper); }
.bottom-nav a.active .book-pill { background: var(--forest-dark); }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; gap: var(--s3); }
.list-item { display: flex; gap: var(--s3); align-items: center; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--beige); color: var(--forest); font-family: var(--font-display); font-size: 22px; font-weight: 700; border: 2px solid var(--gold-soft);
}
.avatar.lg { width: 76px; height: 76px; font-size: 32px; }
.avatar.has-photo { background-size: cover; background-position: center; color: transparent; }
.avatar-edit { position: relative; flex: none; cursor: pointer; }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--forest); color: var(--gold); display: grid; place-items: center; border: 2px solid var(--white); font-size: 14px; }
details summary { color: var(--forest); font-weight: 600; }
.service-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--beige); color: var(--forest); flex: none; }
.price { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--forest-dark); white-space: nowrap; }
.price small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--muted); }

/* ---------- Booking wizard ---------- */
.steps { display: flex; gap: 6px; margin: var(--s4) 0 var(--s5); }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--beige-deep); }
.steps span.done { background: var(--gold); }
.steps span.current { background: var(--forest); }
.choice {
  width: 100%; text-align: left; display: flex; gap: var(--s3); align-items: center;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4); cursor: pointer; transition: border-color .15s, background .15s;
}
.choice:hover:not(:disabled) { border-color: var(--gold); }
.choice.selected { border-color: var(--forest); background: #F4F8F5; box-shadow: 0 0 0 3px rgba(31, 74, 54, .1); }
.choice:disabled { opacity: .55; cursor: not-allowed; }
.choice .grow { flex: 1; min-width: 0; }
.choice .name { font-weight: 600; color: var(--forest-dark); }
.cat-label { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--brown); margin: var(--s5) 0 var(--s2); }
.date-strip { display: flex; gap: var(--s2); overflow-x: auto; padding: 2px 2px var(--s3); scrollbar-width: thin; }
.date-chip {
  flex: none; width: 62px; padding: 10px 0; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--white);
  text-align: center; cursor: pointer; line-height: 1.2;
}
.date-chip .dw { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.date-chip .dn { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--forest-dark); }
.date-chip .dm { font-size: 11px; color: var(--muted); }
.date-chip.selected { background: var(--forest); border-color: var(--forest); }
.date-chip.selected .dw, .date-chip.selected .dm { color: var(--gold-soft); }
.date-chip.selected .dn { color: var(--beige); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s2); }
.slot { min-height: 44px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--white); font-weight: 600; cursor: pointer; color: var(--forest-dark); }
.slot:hover { border-color: var(--gold); }
.slot.selected { background: var(--forest); color: var(--beige); border-color: var(--forest); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--forest); }
.stepper output { min-width: 36px; text-align: center; font-weight: 700; }
.summary-line { display: flex; justify-content: space-between; gap: var(--s3); padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.summary-line:last-child { border-bottom: 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s3); margin-top: var(--s2); border-top: 1.5px solid var(--forest); }
.sticky-cta { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 8px); margin-top: var(--s5); z-index: 5; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--muted); }
.empty svg { color: var(--gold); margin: 0 auto var(--s3); }
.empty h3 { margin-bottom: var(--s2); }

/* ---------- Auth ---------- */
.auth {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(198, 161, 91, .25), transparent 60%),
    linear-gradient(170deg, var(--forest) 0%, var(--forest-dark) 70%);
}
.auth-head { padding: calc(var(--s6) + env(safe-area-inset-top, 0px)) var(--s5) var(--s6); color: var(--beige); max-width: 480px; margin: 0 auto; width: 100%; }
.auth-head .mark { width: 58px; height: 58px; margin-bottom: var(--s4); }
.auth-head h1 { color: var(--beige); font-size: 30px; letter-spacing: 3px; }
.auth-head .sub { font-size: 11px; letter-spacing: 3px; color: var(--gold); font-weight: 600; margin-top: 6px; }
.auth-head .quote { font-family: var(--font-display); font-style: italic; font-size: 20px; color: var(--gold-soft); margin-top: var(--s5); line-height: 1.3; }
.auth-card { flex: 1; background: var(--beige); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: var(--s6) var(--s5) calc(var(--s6) + env(safe-area-inset-bottom, 0px)); }
.auth-card > div { max-width: 420px; margin: 0 auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px)); z-index: 100;
  background: var(--charcoal); color: var(--beige); padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: 14px; max-width: calc(100% - 32px); width: max-content;
}
.toast.error { background: var(--danger); }

/* ---------- Misc ---------- */
.center { text-align: center; }
.divider { height: 1px; background: var(--line); margin: var(--s4) 0; border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tabs { display: flex; gap: var(--s2); margin: var(--s4) 0; overflow-x: auto; }
.tab { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--muted); }
.tab.active { background: var(--forest); color: var(--beige); border-color: var(--forest); }
.notice { display: flex; gap: var(--s3); align-items: flex-start; background: #FFF9EC; border: 1px solid var(--gold-soft); border-radius: var(--r-md); padding: var(--s3) var(--s4); font-size: 14px; }
.notice svg { color: var(--gold); flex: none; margin-top: 2px; }
.credits-bar { height: 8px; background: var(--beige-deep); border-radius: 8px; overflow: hidden; margin-top: var(--s2); }
.credits-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #D9B978); border-radius: 8px; }
.notif { display: flex; gap: var(--s3); }
.notif .bullet { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 7px; flex: none; }
.notif.read .bullet { background: var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--beige); text-decoration: none; }

/* ---------- PC (wildwolf.dog): client area as a website, admin/pro stay phone-like ---------- */
@media (min-width: 1024px) {
  body[data-area="client"] .screen { max-width: 1080px; padding-bottom: var(--s7); }
  body[data-area="client"] .bottom-nav {
    top: 0; bottom: auto; left: auto; right: 68px; z-index: 25;
    background: transparent; border: 0; backdrop-filter: none;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 0 0;
  }
  body[data-area="client"] .bottom-nav ul { display: flex; height: 44px; gap: 4px; max-width: none; }
  body[data-area="client"] .bottom-nav a { flex-direction: row; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: rgba(243, 235, 221, .78); }
  body[data-area="client"] .bottom-nav a:hover { background: rgba(243, 235, 221, .08); color: var(--beige); }
  body[data-area="client"] .bottom-nav a.active { color: var(--beige); background: rgba(243, 235, 221, .14); }
  body[data-area="client"] .bottom-nav svg { width: 18px; height: 18px; }
  body[data-area="client"] .bottom-nav .book-pill { width: auto; height: auto; margin: 0; border: 0; box-shadow: none; background: transparent; color: inherit; }
  body[data-area="client"] .bottom-nav li:nth-child(3) a { background: var(--gold); color: var(--forest-dark); }
  body[data-area="client"] .bottom-nav li:nth-child(3) a:hover { background: #D3B272; }
  body[data-area="client"] .bottom-nav li:nth-child(3) svg { color: var(--forest-dark) !important; }
  body[data-area="client"] .sticky-cta { bottom: 16px; }
  body[data-area="client"] .toast { bottom: 24px; }
  body[data-area="client"] .hero { padding: var(--s7) var(--s6) 110px; }
  body[data-area="client"] .hero h1 { font-size: 52px; }
  body[data-area="client"] .hero .quote { font-size: 24px; max-width: 32ch; }
  body[data-area="client"] .grid-2 { grid-template-columns: repeat(4, 1fr); }
  body[data-area="client"] #home-body .card.lift { max-width: 640px; }
  /* admin & pro: keep the phone layout, centered, with a subtle frame */
  body[data-area="admin"], body[data-area="pro"] { background: var(--beige-deep); }
  body[data-area="admin"] .app, body[data-area="pro"] .app { max-width: 760px; margin: 0 auto; background: var(--beige); min-height: 100vh; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
  body[data-area="admin"] .bottom-nav ul { max-width: 760px; }
  body[data-area="admin"] .bottom-nav { left: 50%; right: auto; width: 760px; transform: translateX(-50%); }
}
@media (min-width: 1024px) and (max-width: 1240px) {
  body[data-area="client"] .bottom-nav a span { display: none; }
  body[data-area="client"] .bottom-nav li:nth-child(3) a span { display: inline; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  .hero { padding: var(--s6) var(--s5) 92px; margin: 0 calc(var(--s5) * -1); border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .hero h1 { font-size: 40px; }
  .screen { padding-left: var(--s5); padding-right: var(--s5); }
}
