:root {
  --bg: #FFF3F8;
  --surface: #FFFFFF;
  --surface-2: #FFE4EE;
  --fg: #4A2338;
  --muted: #8A6379;
  --line: #F5CFDF;
  --accent: #D6457A;
  --accent-2: color-mix(in srgb, var(--accent) 38%, #FFFFFF);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #FFFFFF);
  --accent-fg: #FFFFFF;
  --gold: #F2B84B;
  --ok: #1F8A5B;
  --bad: #C0264B;
  --shadow: 0 6px 18px rgba(214, 69, 122, .14);
  --r: 18px;
  --font-display: 'Fredoka', 'Quicksand', system-ui, sans-serif;
  --font-script: 'Pacifico', 'Fredoka', cursive;
  --font-body: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #25121D; --surface: #351A2B; --surface-2: #462339; --fg: #FFE9F2; --muted: #D7A9C1; --line: #5B3349;
    --accent: #F2779F; --ok: #4CC38A; --bad: #FF8AA6; --shadow: 0 6px 18px rgba(0, 0, 0, .35);
    --accent-soft: color-mix(in srgb, var(--accent) 18%, #351A2B);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #25121D; --surface: #351A2B; --surface-2: #462339; --fg: #FFE9F2; --muted: #D7A9C1; --line: #5B3349;
  --accent: #F2779F; --ok: #4CC38A; --bad: #FF8AA6; --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #351A2B);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23D6457A' fill-opacity='.07'%3E%3Ccircle cx='30' cy='28' r='5'/%3E%3Ccircle cx='38' cy='34' r='5'/%3E%3Ccircle cx='38' cy='23' r='5'/%3E%3Ccircle cx='22' cy='23' r='5'/%3E%3Ccircle cx='22' cy='34' r='5'/%3E%3Cpath d='M118 112c-8-5-11-9-11-13 0-3 2-5 5-5 2 0 4 1 6 3 2-2 4-3 6-3 3 0 5 2 5 5 0 4-3 8-11 13z'/%3E%3Cpath d='M122 28l2 5 5 2-5 2-2 5-2-5-5-2 5-2z'/%3E%3Ccircle cx='70' cy='128' r='3'/%3E%3Ccircle cx='140' cy='70' r='3'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-bottom: 150px;
}
body.no-dock { padding-bottom: 40px; }
.app { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
h1, h2, h3, p { margin: 0; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.1; text-wrap: balance; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* cabeçalho fofo */
.hdr-stack { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 14px 16px 16px; box-shadow: var(--shadow); }
.garland { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 0 4px; }
.garland svg { width: 20px; height: 20px; flex: none; }
.garland svg:nth-child(3n) { transform: rotate(-12deg); }
.garland svg:nth-child(3n+1) { transform: rotate(10deg); }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { flex: none; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-family: var(--font-script); font-size: 22px; overflow: hidden; border: 3px solid var(--accent-2); }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand .grow { flex: 1; min-width: 0; }
.brand h1 { font-family: var(--font-script); font-weight: 400; font-size: 25px; line-height: 1.15; color: var(--accent); overflow-wrap: anywhere; }
.brand p { font-size: 14px; color: var(--muted); margin-top: 3px; font-weight: 600; }

/* passos */
.progress { display: flex; gap: 6px; margin-bottom: 12px; }
.progress span { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); }
.progress span.on { background: var(--accent); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.lead { color: var(--muted); margin-top: 6px; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.opt { width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 13px 15px; display: flex; align-items: center; gap: 12px; min-width: 0; transition: border-color .15s, box-shadow .15s, transform .1s; }
.opt:hover { border-color: var(--accent-2); }
.opt:active { transform: scale(.985); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 22%, transparent); }
.opt .grow { flex: 1; min-width: 0; }
.opt .t { font-weight: 700; }
.opt .s { font-size: 14px; color: var(--muted); font-weight: 600; }
.opt .price { font-weight: 700; white-space: nowrap; color: var(--accent); }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 22px; border: 2px solid var(--accent-2); }
.box { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; font-size: 14px; line-height: 1; }
.opt[aria-pressed="true"] .box { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.cathead { display: flex; align-items: center; gap: 8px; margin: 10px 0 -2px; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--accent); }
.cathead:first-child { margin-top: 0; }
.cathead::after { content: ""; flex: 1; border-top: 2px dotted var(--accent-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 15px; font-size: 15px; font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.subhead { font-size: 14px; font-weight: 700; margin: 8px 0 -2px; }
.scroll-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.scroll-chips .chip { flex: none; }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-top: 16px; }
.day { flex: none; min-width: 66px; border: 2px solid var(--line); background: var(--surface); border-radius: 20px; padding: 8px 6px; text-align: center; line-height: 1.15; }
.day .w { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day .d { font-family: var(--font-display); font-weight: 600; font-size: 26px; }
.day .m { font-size: 12px; color: var(--muted); font-weight: 600; }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.day[aria-pressed="true"] .w, .day[aria-pressed="true"] .m, .day[aria-pressed="true"] .d { color: var(--accent-fg); }
.day:disabled { opacity: .4; cursor: not-allowed; }

.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.slot { min-height: 46px; border: 2px solid var(--line); background: var(--surface); border-radius: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.slot:disabled { opacity: .35; border-style: dashed; cursor: not-allowed; }
.empty { margin-top: 14px; padding: 18px; border: 2px dashed var(--line); border-radius: var(--r); color: var(--muted); text-align: center; font-weight: 600; }
.error { margin-top: 14px; padding: 12px 14px; border-radius: 14px; color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); font-weight: 700; font-size: 15px; }

label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; min-width: 0; }
.field input, .field textarea, .field select { font: inherit; font-weight: 500; color: var(--fg); background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%; min-width: 0; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; }
.field textarea { min-height: 76px; resize: vertical; }

dl.review { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 16px; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); }
dl.review dt { color: var(--muted); font-size: 14px; font-weight: 600; }
dl.review dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; text-align: right; }

/* barra fixa */
.dock { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 2px solid var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -6px 20px rgba(214, 69, 122, .12); padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); z-index: 5; }
.dock[hidden] { display: none; }
.dock-in { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.dock-sum { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); font-weight: 600; }
.dock-sum strong { color: var(--accent); }
.dock-btns { display: flex; gap: 8px; }
.btn { border-radius: 999px; border: 2px solid var(--line); background: var(--surface); padding: 12px 20px; font-weight: 700; min-height: 48px; }
.btn.primary { flex: 1; background: var(--accent); border-color: var(--accent); color: var(--accent-fg); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.sm { padding: 7px 14px; min-height: 0; font-size: 14px; }
.btn.danger { color: var(--bad); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; color: var(--fg); }
.link { border: 0; background: none; padding: 6px 0; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: underline; text-align: left; }

/* confirmação */
.ticket { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.ticket .ok { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; }
.ticket hr { border: 0; border-top: 2px dotted var(--accent-2); margin: 0; }
.code { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: .08em; color: var(--accent); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* painel */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); }
.stats > div { padding: 12px 6px; text-align: center; min-width: 0; }
.stats > div + div { border-left: 2px dotted var(--line); }
.stats .v { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.stats .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
.list { display: flex; flex-direction: column; gap: 10px; }
.appt { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 6px 12px; }
.appt .time { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.appt .time small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--muted); margin-top: 4px; }
.appt .who { font-weight: 700; overflow-wrap: anywhere; }
.appt .what { font-size: 14px; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.appt .acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.appt.cancelled .who, .appt.cancelled .what { text-decoration: line-through; opacity: .65; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.pill.confirmed { color: var(--accent); background: var(--accent-soft); }
.pill.done { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.pill.cancelled { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pill.fresh { color: var(--accent-fg); background: var(--accent); }

.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.toast[hidden] { display: none; }
.login { max-width: 380px; margin: 30px auto 0; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 2px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); }

@media (max-width: 380px) { .slots { grid-template-columns: repeat(3, 1fr); } .row2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- várias lojas: link da loja, administração ---- */
.linkcard { background: var(--accent-soft); border: 2px dashed var(--accent-2); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.linkcard .eyebrow { margin: 0; }
.linkcard .url { font-weight: 700; overflow-wrap: anywhere; user-select: all; }
.shopcard { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.shopcard.off { opacity: .8; }
.shophead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shophead .logo { width: 46px; height: 46px; font-size: 16px; }
.shophead .grow { flex: 1; min-width: 0; }
.shophead .nm { font-weight: 700; overflow-wrap: anywhere; }
.shophead .sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; font-weight: 600; }
.colors { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.colors label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.colors input[type="color"] { width: 64px; height: 44px; padding: 3px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.pill.off { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pill.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.pill.seg { color: var(--accent); background: var(--accent-soft); }
.confirm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; }
