/* Paleta: porcelana rosada + esmalte cereja em gel */
:root {
  --ground: #FBF6F5;
  --surface: #FFFFFF;
  --sunk: #F4E9E9;
  --ink: #2B1A22;
  --muted: #76626C;
  --line: #EADCDF;
  --lacquer: #A1173E;
  --lacquer-hi: #CF3F67;
  --lacquer-deep: #6E0C29;
  --on-lacquer: #FFFFFF;
  --lacquer-soft: #F7E3E8;
  --wa: #157A45;
  --on-wa: #FFFFFF;
  --ok: #2B7350;
  --ok-soft: #E2F0E8;
  --warn: #8A4B0F;
  --warn-soft: #FAEBD8;
  --display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(43 26 34 / .06), 0 10px 28px -14px rgb(43 26 34 / .22);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #161013;
    --surface: #21181D;
    --sunk: #2A1F25;
    --ink: #F4E8EB;
    --muted: #B39DA7;
    --line: #3A2B33;
    --lacquer: #E5638A;
    --lacquer-hi: #F28DAA;
    --lacquer-deep: #B53C60;
    --on-lacquer: #22070F;
    --lacquer-soft: #3B1F2A;
    --wa: #4CC585;
    --on-wa: #06200F;
    --ok: #7BCBA0;
    --ok-soft: #1D3027;
    --warn: #F0B77A;
    --warn-soft: #33261A;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 28px -14px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 var(--body);
  padding-inline: max(16px, env(safe-area-inset-left));
  padding-block: calc(10px + env(safe-area-inset-top)) calc(48px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
body.has-bar { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
h1, h2, h3, p, ul, dl { margin: 0; }
a { color: var(--lacquer); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--lacquer-hi); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 540px; margin-inline: auto; display: flex; flex-direction: column; gap: 28px; }
.muted { color: var(--muted); }
.cap-first::first-letter { text-transform: uppercase; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lede { color: var(--muted); font-size: 17px; max-width: 36ch; text-wrap: pretty; }
.ico { display: inline-flex; }
.hint { color: var(--muted); font-size: 14px; }
.fine { color: var(--muted); font-size: 14px; }

/* ---------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1.1 var(--body); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--lacquer); color: var(--on-lacquer); }
.btn.primary:hover { background: var(--lacquer-deep); }
.btn.wa { background: var(--wa); color: var(--on-wa); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: transparent; color: var(--lacquer); border-color: var(--line); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .4; pointer-events: none; }
.icon-btn {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn[disabled] { opacity: .3; cursor: default; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- início */
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 32px; }
.cap {
  position: relative; width: 88px; height: 88px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 95% at 30% 18%, var(--lacquer-hi) 0%, #A1173E 48%, #5E0A23 100%);
  box-shadow: inset 0 -8px 14px rgb(0 0 0 / .22), var(--shadow);
}
.cap::after {
  content: ""; position: absolute; top: 15%; left: 21%; width: 32%; height: 15%;
  border-radius: 50%; background: rgb(255 255 255 / .5); filter: blur(2px); transform: rotate(-26deg);
}
.cap span { font: italic 500 32px/1 var(--display); letter-spacing: .02em; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lacquer); margin-top: 6px; }
.name { font: italic 500 clamp(44px, 12vw, 60px)/.98 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.actions.col { flex-direction: column; }
.info { display: flex; flex-direction: column; gap: 10px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.price-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.price-list li { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- topo das telas internas */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  background: var(--ground); padding-block: 8px; margin-bottom: -8px;
}
.brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font: italic 500 21px/1.1 var(--display); }
.step { font-size: 13px; color: var(--muted); }

/* ---------- serviços */
.svc-group { display: flex; flex-direction: column; gap: 10px; }
.svc-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 15px 16px; cursor: pointer; transition: background-color .15s ease; }
.svc + .svc { border-top: 1px solid var(--line); }
.svc input {
  appearance: none; -webkit-appearance: none; margin: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer;
}
.svc input::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--lacquer); transform: scale(0); transition: transform .15s ease; }
.svc input:checked { border-color: var(--lacquer); }
.svc input:checked::before { transform: scale(1); }
.svc:has(input:checked) { background: var(--lacquer-soft); }
.svc-main { display: flex; flex-direction: column; gap: 3px; }
.svc-name { font-weight: 600; text-wrap: pretty; }
.svc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--muted); }
.svc-price { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc-price small { font-size: 11px; font-weight: 500; color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; color: var(--wa); border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; }

/* ---------- barra inferior */
.bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-inline: max(16px, env(safe-area-inset-left));
  padding-block: 12px calc(12px + env(safe-area-inset-bottom));
}
.bar-inner { max-width: 540px; margin-inline: auto; display: flex; align-items: center; gap: 14px; }
.bar-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bar-sum strong { font-size: 15px; }
.bar-sum span { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- resumo */
.chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--sunk); border-radius: var(--radius); }
.chosen div { display: flex; flex-direction: column; line-height: 1.3; }
.chosen span { font-size: 14px; color: var(--muted); }
.chosen a { font-weight: 600; }
.summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.summary dt { color: var(--muted); font-size: 14px; padding-top: 1px; }
.summary dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- calendário */
.cal-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-title { font: 500 23px/1.2 var(--display); }
.cal-title::first-letter { text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding-block: 2px 6px; }
.cal-day {
  min-height: 48px; border: 0; border-radius: 12px; background: transparent; color: var(--ink);
  font: 600 16px/1 var(--body); font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.cal-day:not([disabled]) { background: var(--sunk); }
.cal-day:not([disabled]):hover { box-shadow: inset 0 0 0 1px var(--lacquer); }
.cal-day[disabled] { color: var(--muted); opacity: .45; cursor: default; }
.cal-day.is-today span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.cal-day.is-sel { background: var(--lacquer); color: var(--on-lacquer); }
.cal-dots { display: flex; gap: 2px; height: 5px; }
.cal-dots i, .cal-legend i { width: 5px; height: 5px; border-radius: 50%; background: var(--lacquer); }
.cal-day.is-sel .cal-dots i { background: var(--on-lacquer); }
.cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- horários */
.slot-box { display: flex; flex-direction: column; gap: 12px; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-family: var(--body); text-align: left; cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.slot:hover { border-color: var(--lacquer); }
.slot-time { font: 500 34px/1 var(--display); font-variant-numeric: lining-nums tabular-nums; }
.slot-end { font-size: 13px; color: var(--muted); }
.slot.is-sel { background: var(--lacquer); border-color: var(--lacquer); color: var(--on-lacquer); }
.slot.is-sel .slot-end { color: inherit; opacity: .85; }

/* ---------- formulários */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; font: 400 17px/1.4 var(--body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--lacquer); box-shadow: 0 0 0 3px var(--lacquer-soft); }
.form-error { color: var(--lacquer); font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--lacquer); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---------- avisos e estados */
.notice { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.notice-title { font: 500 25px/1.2 var(--display); text-wrap: balance; }
.done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 32px; }
.done-mark { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: var(--on-lacquer); background: var(--lacquer); box-shadow: var(--shadow); }
.done-title { font: italic 500 44px/1 var(--display); text-wrap: balance; }
.loading { display: flex; align-items: center; gap: 10px; padding-block: 24px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--lacquer); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 20;
  width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: var(--ground); font-weight: 600;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- painel da Fernanda */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; }
.live { font-size: 13px; color: var(--muted); }
.live.on { color: var(--ok); }
.live.on::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px;
  border-radius: 50%; background: var(--ok); animation: pulsa 2s ease-in-out infinite;
}
@keyframes pulsa { 50% { opacity: .25; } }
.week-box, .day-box, .form-box, .upcoming { display: flex; flex-direction: column; gap: 12px; }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.day-title { font: 500 27px/1.15 var(--display); }
.week { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.chip-day {
  flex: 0 0 58px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding-block: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-family: var(--body); cursor: pointer;
}
.chip-day .wd { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chip-day .dn { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip-day .ct { min-height: 16px; font-size: 11px; font-weight: 700; color: var(--lacquer); }
.chip-day.is-off { background: var(--sunk); border-style: dashed; }
.chip-day.is-sel { background: var(--lacquer); border-color: var(--lacquer); color: var(--on-lacquer); }
.chip-day.is-sel .wd, .chip-day.is-sel .ct { color: inherit; }
.banner-off { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.ag { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ag-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px 16px; }
.ag-row + .ag-row { border-top: 1px solid var(--line); }
.ag-time { display: flex; flex-direction: column; gap: 3px; font-variant-numeric: tabular-nums; }
.ag-time strong { font: 500 24px/1 var(--display); }
.ag-time small { font-size: 12px; color: var(--muted); }
.ag-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ag-status { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.st-livre { color: var(--ok); background: var(--ok-soft); }
.st-bloq { color: var(--warn); background: var(--warn-soft); }
.st-marc { color: var(--lacquer); background: var(--lacquer-soft); }
.ag-name { font-weight: 700; font-size: 17px; }
.ag-note { color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.up-list { list-style: none; padding: 0; }
.up-row {
  width: 100%; display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 12px; padding: 12px 0;
  border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.up-when { font-weight: 600; font-variant-numeric: tabular-nums; }
.up-who { display: flex; flex-direction: column; line-height: 1.3; }
.up-who span { font-size: 14px; color: var(--muted); }

/* ---------- agendamento da cliente */
.mine-list { list-style: none; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mine-list li + li { border-top: 1px solid var(--line); }
.mine-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.mine-list .ico { color: var(--muted); }
.mine-main { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.mine-when { font-weight: 700; font-variant-numeric: tabular-nums; }
.mine-what { font-size: 14px; color: var(--muted); }
.keep { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.notice-sub { font-size: 17px; font-weight: 700; }
.badge { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.badge.pend { color: var(--warn); background: var(--warn-soft); }
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.small { text-transform: none; letter-spacing: 0; font-size: 11px; padding: 2px 8px; margin-top: 4px; }
.st-pend { color: var(--warn); background: var(--warn-soft); }
.pend-card { border-color: var(--warn); }
.ok-card { border-color: var(--ok); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.msg-preview { background: var(--sunk); border-radius: 12px; padding: 12px 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote { color: var(--muted); font-style: italic; }
.month-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.month-chip {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-family: var(--body);
  text-align: left; cursor: pointer;
}
.month-chip.is-open { border-color: var(--lacquer); background: var(--lacquer-soft); }
.month-name { font: 500 19px/1.2 var(--display); color: var(--ink); }
.month-info { font-size: 13px; }
.cal-day.is-past { opacity: .3; }
.cal-day[disabled] .shift-bar { opacity: .5; }
.shift-bars { display: flex; gap: 3px; }
.shift-bar { width: 12px; height: 4px; border-radius: 2px; }
.shift-verde { background: #2E7D32; }
.shift-azul { background: #1565C0; }
.shift-amarelo { background: #C99700; }
.cal-day.is-sel .shift-bar { box-shadow: 0 0 0 1px var(--on-lacquer); }
.shift-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shift-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 13px/1 var(--body); cursor: pointer;
}
.notice .form { width: 100%; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.steps li::marker { color: var(--lacquer); font-weight: 700; }
code { font: 600 14px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--sunk); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.sr-copy { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

@media (max-width: 360px) {
  .grid2 { grid-template-columns: 1fr; }
  .up-row { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
