/* Booking page styles */
:root {
  --accent: #C8102E;
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, #fff);
  --accent-line: color-mix(in srgb, var(--accent) 35%, #fff);
  --bg: #f6f4f2;
  --card: #ffffff;
  --ink: #1d1a1a;
  --ink-2: #5d5757;
  --ink-3: #8f8888;
  --line: #e9e4e1;
  --line-2: #f1edeb;
  --ok: #128a4a;
  --wa: #1fa855;
  --held: #c27c0e;
  --held-soft: #fff6e6;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(40, 20, 20, .04), 0 8px 28px rgba(40, 20, 20, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .page { grid-template-columns: 340px 1fr; gap: 28px; padding: 40px 24px 60px; align-items: start; }
  .profile { position: sticky; top: 40px; }
}

/* ---------- Profile ---------- */
.profile-inner {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px 22px;
  text-align: center;
  overflow: hidden;
}
.profile-inner::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 84px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
}
.lang {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  display: flex; background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px;
}
.lang button {
  border: 0; background: transparent; color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .04em;
}
.lang button.on { background: #fff; color: var(--accent); }
.avatar {
  position: relative;
  width: 96px; height: 96px; margin: 18px auto 12px;
  border-radius: 50%; border: 4px solid #fff; background: var(--accent-soft);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  display: grid; place-items: center; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar span { font-size: 32px; font-weight: 800; color: var(--accent); }
.profile h1 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.role { margin: 4px 0 12px; color: var(--accent); font-weight: 600; font-size: 14px; }
.intro { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.facts { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 10px; text-align: left; }
.facts li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.facts svg { color: var(--accent); }
@media (max-width: 899px) {
  .profile-inner { padding: 24px 18px 18px; }
  .facts { grid-template-columns: repeat(3, 1fr); text-align: center; gap: 6px; }
  .facts li { flex-direction: column; gap: 4px; font-size: 12px; line-height: 1.3; }
}

/* ---------- Cards & steps ---------- */
.flow { display: grid; gap: 16px; min-width: 0; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  min-width: 0;
  animation: rise .35s ease both;
}
@media (min-width: 600px) { .card { padding: 26px 26px; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.step-head.second { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.step-head h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; }
.num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none;
}
.tz { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ok); background: #e9f7ef; padding: 3px 10px 3px 8px; border-radius: 999px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 1.8s infinite; }
.live.off { color: var(--ink-3); background: var(--line-2); }
.live.off i { animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18,138,74,.5); } 70% { box-shadow: 0 0 0 7px rgba(18,138,74,0); } 100% { box-shadow: 0 0 0 0 rgba(18,138,74,0); } }

/* ---------- Calendar ---------- */
.cal-range { font-weight: 700; font-size: 14px; color: var(--ink-2); margin: -4px 0 10px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 2px; }
.day {
  position: relative;
  height: clamp(50px, 13.5vw, 62px);
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2px; gap: 1px;
  transition: transform .12s, background .15s, border-color .15s;
}
.day .dn { font-size: 15px; font-weight: 700; line-height: 1; }
.day .mo { font-size: 8.5px; font-weight: 800; line-height: 1; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.day.open .mo { color: var(--accent); }
.day .cnt { font-size: 10px; font-weight: 600; line-height: 1.1; color: var(--ink-3); }
.day.open { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }
.day.open .cnt { color: var(--accent); }
.day.open:hover { transform: translateY(-1px); border-color: var(--accent); }
.day.sel { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.day.sel .cnt, .day.sel .mo { color: rgba(255,255,255,.85); }
.day.full { background: #fff; border-color: var(--line); color: var(--ink-3); }
.day.na { background: transparent; color: #cfc8c5; cursor: default; }
.day.na .cnt { display: none; }
.day.today .dn { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.day:disabled { cursor: default; }
.day.pad { visibility: hidden; }
@media (max-width: 380px) { .cal { gap: 4px; } .day .cnt { font-size: 9px; } }

/* ---------- Slots ---------- */
.day-title { font-weight: 700; margin: -4px 0 12px; font-size: 15px; }
.slot-group + .slot-group { margin-top: 14px; }
.slot-group h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (max-width: 420px) { .slots { grid-template-columns: 1fr 1fr; } }
.slot {
  position: relative;
  border: 1.5px solid var(--accent-line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 10px;
  text-align: center;
  font-weight: 700; font-size: 15px;
  color: var(--accent);
  transition: background .15s, color .15s, border-color .15s, transform .12s;
  line-height: 1.25;
}
.slot small { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-top: 1px; }
.slot.open:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-1px); }
.slot.mine { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot.mine small { color: rgba(255,255,255,.85); }
.slot.held { border-style: dashed; border-color: #e8c27e; background: var(--held-soft); color: var(--held); cursor: not-allowed; }
.slot.held small { color: var(--held); }
.slot.booked { border-color: var(--line); background: var(--line-2); color: var(--ink-3); cursor: not-allowed; }
.slot.booked .tm { text-decoration: line-through; }
.slot.flash { animation: flash .9s ease; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); } }
.slot.busy::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(255,255,255,.5); }

.empty { padding: 18px; border-radius: 12px; background: var(--line-2); color: var(--ink-2); font-size: 14px; text-align: center; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 16px 0 0; font-size: 12px; color: var(--ink-3); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-open { border: 1.5px solid var(--accent-line); background: #fff; }
.lg-held { border: 1.5px dashed #e8c27e; background: var(--held-soft); }
.lg-booked { background: var(--line); }

/* ---------- Details form ---------- */
.hold {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 20px;
}
.hold-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.hold-when { font-size: 15px; }
.hold-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; color: var(--accent); }
.timer.low { color: #b45309; }
.hold.expired { background: #fff6e6; border-color: #e8c27e; }

.field { display: block; border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.field > span, .field legend { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
input:not([type=checkbox]):not([type=radio]), textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.phone { display: flex; align-items: stretch; }
.phone b { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--line-2); font-weight: 700; color: var(--ink-2); font-size: 15px; }
.phone input { border-radius: 0 12px 12px 0 !important; }
.hint { display: block; color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: #fff; cursor: pointer;
  transition: all .15s; user-select: none;
}
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 4px 0 6px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { display: block; font-style: normal; color: #c0262d; font-size: 13px; font-weight: 600; margin-top: 4px; }
.err:empty { display: none; }
.invalid input, .invalid textarea { border-color: #e49a9e !important; }
.form-error { background: #fdecec; color: #9b1c22; border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 500; margin: 10px 0 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 14px; padding: 13px 18px;
  font-weight: 700; font-size: 15px; text-decoration: none; transition: filter .15s, transform .12s, background .15s;
}
.btn:active { transform: scale(.985); }
.btn.block { width: 100%; margin-top: 12px; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { filter: grayscale(.3) brightness(1.1); cursor: wait; }
.btn.wa { background: var(--wa); color: #fff; width: 100%; }
.btn.wa:hover { filter: brightness(1.05); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--ink-3); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.link.danger { color: #9b1c22; }

/* ---------- Done / manage ---------- */
.done, .manage { text-align: center; }
.badge-ok { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: #e9f7ef; color: var(--ok); display: grid; place-items: center; }
.badge-ok svg { width: 28px; height: 28px; stroke-width: 2.6; }
.badge-ok.big { width: 68px; height: 68px; animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.badge-ok.big svg { width: 36px; height: 36px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s ease forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h2, .manage h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.big-when { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--accent); line-height: 1.35; }
.big-when span { display: block; }
.big-when span + span { font-size: 20px; }
.muted { color: var(--ink-2); font-size: 14px; margin: 4px 0; }
.actions { display: grid; gap: 8px; margin-top: 16px; }
.actions.two { grid-template-columns: 1fr 1fr; margin-top: 6px; }
.cal-label { margin: 18px 0 0; font-size: 12px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.links { margin-top: 18px; display: flex; justify-content: center; gap: 10px; color: var(--ink-3); }

.foot { text-align: center; color: var(--ink-3); font-size: 12px; padding: 8px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1d1a1a; color: #fff; padding: 12px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 500; max-width: calc(100vw - 32px); width: max-content;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: all .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .badge-ok.big svg { stroke-dashoffset: 0; }
}
