/* Marcos Varela Cabeleireiro: cores tiradas da logo (vermelho, grafite, prata, creme). */
:root {
  --red: #b3161f;
  --red-press: #8f1119;
  --red-ink: #ffffff;
  --red-soft: #f6e3e4;
  --graphite: #22272e;
  --graphite-2: #2d333b;
  --silver: #e4e6e8;
  --silver-line: #cfd3d7;
  --cream: #f3e4d7;

  --bg: var(--silver);
  --surface: #ffffff;
  --surface-2: #f2f3f4;
  --ink: #1b1f24;
  --ink-soft: #59616b;
  --line: var(--silver-line);
  --accent: var(--red);
  --accent-ink: var(--red-ink);
  --accent-soft: var(--red-soft);
  --user: var(--graphite);
  --user-ink: #f5f6f7;
  --danger: #b3161f;
  --ok: #1f6b45;

  --radius: 14px;
  --shadow: 0 1px 1px rgba(27, 31, 36, .04), 0 4px 14px rgba(27, 31, 36, .07);
  --shadow-lift: 0 2px 4px rgba(27, 31, 36, .06), 0 10px 28px rgba(27, 31, 36, .12);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Archivo", "Onest", system-ui, sans-serif;
  color-scheme: light;
}

/* Sempre claro: o salão escolheu o fundo prata em qualquer tema do aparelho. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
::selection { background: var(--red); color: #fff; }
input { caret-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

/* ---------- Faixa da marca ---------- */
.brand {
  background: var(--graphite);
  color: #f5f6f7;
  position: sticky; top: 0; z-index: 5;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 1px 0 1px color-mix(in srgb, var(--silver-line) 14%, transparent);
}
.brand-in > div { min-width: 0; }
.brand-in { max-width: 600px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 52px; height: 52px; flex: none; display: block; }
.brand-name { white-space: nowrap; font: 800 clamp(16px, 4.6vw, 20px)/1 var(--font-display); font-stretch: 112%; letter-spacing: .02em; text-transform: uppercase; margin: 0; }
.brand-sub { white-space: nowrap; margin: 5px 0 0; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream); font-weight: 600; }
.brand-link {
  margin-left: auto; white-space: nowrap; flex: none; color: #f5f6f7; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18);
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.brand-link:active { transform: scale(0.97); }

/* Trilho de etapas */
.rail { max-width: 600px; margin: 0 auto; padding: 0 16px 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rail-step { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: rgba(245, 246, 247, .55); }
.rail-step::before {
  content: ""; display: block; height: 3px; border-radius: 3px; margin-bottom: 6px;
  background: linear-gradient(var(--red), var(--red)) left / 0% 100% no-repeat, rgba(255, 255, 255, .14);
  transition: background-size 420ms var(--ease-out);
}
.rail-step[data-state="done"], .rail-step[data-state="now"] { color: #f5f6f7; }
.rail-step[data-state="done"]::before { background-size: 100% 100%; }
.rail-step[data-state="now"]::before { background-size: 45% 100%; }

/* Comanda: resumo vivo das escolhas */
.comanda { border-top: 1px solid rgba(255, 255, 255, .1); background: #1b1f25; animation: dock-in 240ms var(--ease-out) both; }
.comanda-in { max-width: 600px; margin: 0 auto; padding: 9px 16px; display: flex; gap: 12px; align-items: baseline; font-size: 13px; }
.comanda-in span { flex: 1; min-width: 0; color: var(--cream); line-height: 1.35; }
.comanda-in strong { font: 800 14px/1 var(--font-display); font-variant-numeric: tabular-nums; color: #fff; }

/* ---------- Estrutura ---------- */
.shell { max-width: 600px; margin: 0 auto; min-height: calc(100dvh - 110px); display: flex; flex-direction: column; padding: 0 16px; }

/* Conversa */
.chat { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 20px 0 8px; }
.msg {
  max-width: 85%; padding: 11px 15px; border-radius: 16px; font-size: 15.5px;
  animation: msg-in 260ms var(--ease-out) both;
}
.msg.bot { background: var(--surface); border-bottom-left-radius: 5px; align-self: flex-start; box-shadow: var(--shadow); transform-origin: 0% 100%; }
.msg.user { background: var(--user); color: var(--user-ink); border-bottom-right-radius: 5px; align-self: flex-end; transform-origin: 100% 100%; }
.msg.user + .msg.bot, .msg.bot + .msg.user { margin-top: 6px; }
.msg.user .edit {
  display: flex; width: fit-content; align-items: center; min-height: 32px; padding: 6px 10px; margin: 0 -10px -8px;
  background: none; border: 0; border-radius: 8px; color: inherit; font-size: 12.5px; opacity: .78; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; position: relative;
}
.msg.user .edit::after { content: ""; position: absolute; inset: -6px -4px; }
.msg.user .edit:focus-visible { outline: 2px solid var(--cream); outline-offset: 0; opacity: 1; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px) scale(0.97); } }

.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-soft); animation: blink 1s infinite var(--ease-in-out); }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }

/* Área de resposta */
.dock { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 82%, transparent); padding: 14px 0 max(18px, env(safe-area-inset-bottom)); }
.dock > * { animation: dock-in 240ms var(--ease-out) both; }
@keyframes dock-in { from { opacity: 0; transform: translateY(10px); } }

.row { display: flex; gap: 8px; }
.field {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); outline: none; min-height: 52px; font-size: 16px;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.field::placeholder { color: var(--ink-soft); opacity: 1; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 14px 20px; min-height: 52px; cursor: pointer;
  font: 700 15px/1.1 var(--font); letter-spacing: .01em;
  background: var(--accent); color: var(--accent-ink); white-space: nowrap; text-decoration: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .12), 0 4px 12px rgba(20, 23, 27, .18);
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid currentColor; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { background: var(--red-press); }
  .btn.ghost:not(:disabled):hover, .btn.danger:hover { background: var(--surface-2); }
  .brand-link:hover { background: rgba(255, 255, 255, .08); }
  .option:hover, .slot:hover, .day:not(:disabled):hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
}

.hint { font-size: 13px; color: var(--ink-soft); margin: 8px 2px 0; }
.err { font-size: 14px; color: var(--danger); margin: 8px 2px 0; font-weight: 600; }

.stack { display: flex; flex-direction: column; gap: 8px; }
.group-title {
  font: 800 11px/1 var(--font-display); font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 14px 2px 4px;
}
.group-title:first-child { margin-top: 2px; }
.scroll { max-height: clamp(180px, 100dvh - 380px, 46dvh); overflow-y: auto; padding: 2px; margin: -2px; overscroll-behavior: contain; }

/* Opções (serviços e profissionais) */
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.option:active { transform: scale(0.985); }
.option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.option .grow { flex: 1; min-width: 0; }
.option strong { display: block; font-weight: 600; }
.option small { color: var(--ink-soft); font-size: 13px; }
.option .price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.check {
  width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.check svg { width: 14px; height: 14px; color: #fff; clip-path: inset(0 100% 0 0); transition: clip-path 220ms var(--ease-out); }
.option[aria-pressed="true"] .check { background: var(--accent); border-color: var(--accent); }
.option[aria-pressed="true"] .check svg { clip-path: inset(0 0 0 0); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--graphite); color: var(--cream); font: 800 16px/1 var(--font-display); font-stretch: 112%;
  box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 1.5px var(--graphite);
}
.avatar.any { background: var(--accent); color: #fff; box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 1.5px var(--accent); }
.avatar svg { width: 20px; height: 20px; }

/* Dias e horários */
.days { scrollbar-width: none; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.day {
  flex: none; width: 62px; padding: 9px 0 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  text-align: center; cursor: pointer; scroll-snap-align: start;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 160ms var(--ease-out);
}
.day:active:not(:disabled) { transform: scale(0.96); }
.day small { display: block; font-size: 11px; text-transform: uppercase; color: var(--ink-soft); letter-spacing: .08em; font-weight: 600; }
.day b { display: block; font: 800 22px/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.day:disabled { opacity: .38; cursor: not-allowed; background: transparent; }
.day:disabled b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.day[aria-pressed="true"] { background: var(--graphite); color: #fff; border-color: var(--graphite); }
.day[aria-pressed="true"] small { color: var(--cream); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.slot {
  padding: 11px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-weight: 600; font-variant-numeric: tabular-nums;
  animation: msg-in 220ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 18ms);
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.slot:active { transform: scale(0.95); background: var(--accent); color: #fff; border-color: var(--accent); }

/* Cartões */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); animation: msg-in 280ms var(--ease-out) both; }
.card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.card dt { color: var(--ink-soft); font-size: 13px; padding-top: 1px; }
.card dd { margin: 0; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; font-weight: 700; }
.total span:last-child { font: 800 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }

/* Selo de confirmação */
.seal-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.seal { width: 116px; height: 116px; flex: none; color: var(--accent); transform: rotate(-8deg); animation: seal-press 420ms var(--ease-out) 100ms both; }
.seal svg { width: 100%; height: 100%; display: block; overflow: visible; }
.seal-ring { font: 800 9.6px var(--font-display); font-stretch: 112%; letter-spacing: .1em; fill: currentColor; }
.seal-code { font: 800 13.5px var(--font-display); font-stretch: 100%; font-variant-numeric: tabular-nums; letter-spacing: .06em; fill: currentColor; }
@keyframes seal-press {
  from { opacity: 0; transform: rotate(-8deg) scale(1.06); filter: blur(3px); }
  to { opacity: 1; transform: rotate(-8deg) scale(1); filter: blur(0); }
}
.seal-text p { margin: 0 0 6px; }
.links { display: grid; gap: 8px; margin-top: 14px; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge.off { background: var(--surface-2); color: var(--ink-soft); }

/* Páginas internas */
.page { padding: 22px 0 40px; display: flex; flex-direction: column; gap: 14px; }
.page h2 { font: 800 15px/1.2 var(--font-display); font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase; margin: 8px 0 0; color: var(--ink-soft); }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-soft); font-weight: 600; }
.wide { max-width: 1040px; }
.brand-in.wide { max-width: 1040px; }
.table-wrap { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  .msg, .card, .slot, .dock > * { animation: fade 160ms linear both; }
  .seal { animation: fade 200ms linear both; }
  .typing i { animation: none; opacity: .6; }
  .rail-step::before, .check svg { transition-duration: 1ms; }
  @keyframes fade { from { opacity: 0; } }
}

@media (max-width: 420px) {
  .brand-in { gap: 10px; padding: 10px 16px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-name { font-size: 15.5px; font-stretch: 106%; }
  .brand-sub { font-size: 9.5px; letter-spacing: .12em; }
  .brand-link { font-size: 12px; padding: 8px 10px; }
}

.days::-webkit-scrollbar { display: none; }
.demo-note {
  max-width: 600px; margin: 12px auto 0; padding: 10px 14px; border-radius: 12px;
  background: var(--red); color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.4; text-align: center;
  box-shadow: 0 2px 8px rgba(20, 23, 27, .16);
}
.demo-note strong { display: block; font: 800 12px/1.2 var(--font-display); font-stretch: 112%; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }

/* Tela de agendamento como app: só a conversa rola, o topo e a área de resposta ficam parados.
   Evita a página "pular" no celular quando o conteúdo da resposta troca de tamanho. */
html:has(body.app) { height: 100%; }
body.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.app .brand { position: relative; top: auto; flex: none; }
body.app .shell { flex: 1; min-height: 0; width: 100%; }
body.app .demo-note { flex: none; }
body.app .chat { min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -16px; padding: 16px 16px 12px; -webkit-overflow-scrolling: touch; }
body.app .dock { position: relative; flex: none; background: var(--bg); padding-top: 10px; box-shadow: 0 -1px 0 var(--line); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
body.app .scroll { max-height: clamp(130px, 100dvh - 540px, 38dvh); }

/* Ticket do agendamento, na horizontal (cores da logo: vermelho, creme e grafite) */
.ticket {
  --ticket-paper: var(--red); --ticket-ink: #fff; --ticket-notch: 12px; --ticket-stub: 34%;
  position: relative; width: min(100%, 31rem); align-self: center; margin: 10px 0 4px;
  filter: drop-shadow(0 1px 1px rgb(15 15 15 / 10%)) drop-shadow(0 16px 24px rgb(15 15 15 / 16%));
  animation: ticket-in 520ms var(--ease-out) both; touch-action: pan-y;
}
.ticket-tilt {
  width: 100%; transform-style: preserve-3d; transition: transform 220ms var(--ease-out);
  /* Recortes redondos em cima e embaixo, na linha do picote entre o corpo e o canhoto */
  -webkit-mask:
    radial-gradient(circle var(--ticket-notch) at calc(100% - var(--ticket-stub)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--ticket-notch) at calc(100% - var(--ticket-stub)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--ticket-notch) at calc(100% - var(--ticket-stub)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--ticket-notch) at calc(100% - var(--ticket-stub)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
}
.ticket-inner {
  --scallop: 5px; --scallop-gap: 16px;
  -webkit-mask:
    radial-gradient(circle var(--scallop) at 0 50%, #0000 96%, #000) left / 51% var(--scallop-gap) repeat-y,
    radial-gradient(circle var(--scallop) at 100% 50%, #0000 96%, #000) right / 51% var(--scallop-gap) repeat-y;
  mask:
    radial-gradient(circle var(--scallop) at 0 50%, #0000 96%, #000) left / 51% var(--scallop-gap) repeat-y,
    radial-gradient(circle var(--scallop) at 100% 50%, #0000 96%, #000) right / 51% var(--scallop-gap) repeat-y;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--ticket-stub); color: var(--ticket-ink);
  background: linear-gradient(120deg, rgb(255 255 255 / 12%), transparent 45%), var(--ticket-paper);
}
.ticket-body { position: relative; z-index: 1; padding: 18px 20px 18px 22px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ticket-body::after {
  content: ""; position: absolute; top: calc(var(--ticket-notch) + 8px); bottom: calc(var(--ticket-notch) + 8px); right: -2.5px; width: 5px;
  background: radial-gradient(circle 2.2px, rgba(255, 255, 255, .7) 92%, #0000) center top / 5px 11px repeat-y;
}
.ticket-body p { margin: 0; }
.ticket-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ticket-logo { width: 34px; height: 34px; flex: none; }
.ticket-kicker { font-size: 12.5px; font-weight: 600; color: var(--cream); }
.ticket-when { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ticket-time { font: 900 40px/1 var(--font-display); font-stretch: 116%; font-variant-numeric: tabular-nums; }
.ticket-day { font: 800 14px/1 var(--font-display); font-stretch: 112%; text-transform: uppercase; letter-spacing: .04em; color: var(--cream); }
.ticket-line { font-size: 13.5px; font-weight: 600; line-height: 1.35; margin-top: 6px !important; }
.ticket-line.muted { color: var(--cream); font-weight: 500; margin-top: 0 !important; }
.ticket-stub { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 14px 14px 14px 10px; background: var(--graphite); }
.ticket-stub span { font-size: 11px; font-weight: 600; color: var(--cream); }
.ticket-stub strong { font: 900 22px/1 var(--font-display); font-stretch: 108%; letter-spacing: .1em; font-variant-numeric: tabular-nums; user-select: all; }
.ticket-copy {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 7px 12px; min-height: 34px;
  border: 0; border-radius: 999px; cursor: pointer; font: 700 12.5px/1 var(--font);
  background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.ticket-copy svg { width: 15px; height: 15px; }
.ticket-copy span { color: inherit; font-size: inherit; font-weight: inherit; }
.ticket-copy:active { transform: scale(0.96); }
.ticket-copy.done { background: var(--red); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .ticket-copy:hover { background: rgba(255, 255, 255, .2); } }
@media (max-width: 380px) { .ticket { --ticket-stub: 38%; } .ticket-time { font-size: 34px; } .ticket-stub strong { font-size: 19px; } }
@keyframes ticket-in { from { opacity: 0; transform: translateY(14px) rotate(-1deg); filter: blur(4px); } }
@media (prefers-reduced-motion: reduce) { .ticket { animation: none; } }

/* Botão com troca animada de conteúdo (Copiar -> Copiado) */
.dyn-btn { position: relative; overflow: hidden; white-space: nowrap; }
.dyn-row { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.dyn-icon, .dyn-text { position: relative; display: inline-grid; overflow: hidden; }
.dyn-icon { width: 15px; height: 15px; }
.dyn-item { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; }
.dyn-text .dyn-item { justify-content: flex-start; }
.dyn-item.leaving { position: absolute; top: 0; bottom: 0; left: 0; pointer-events: none; }

/* Editar e Cancelar logo abaixo do ticket */
.ticket-actions { display: flex; gap: 8px; width: min(100%, 31rem); align-self: center; margin-bottom: 4px; animation: msg-in 260ms var(--ease-out) both; }
.ticket-actions .btn { min-height: 46px; padding: 10px 16px; font-size: 14px; }
.ticket-edit { flex: 0 0 auto; }
.hold-btn {
  position: relative; isolation: isolate; flex: 1; min-height: 46px; padding: 10px 14px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none;
  border-radius: 12px; border: 1px solid var(--red); background: var(--red-soft); color: var(--red);
  font: 700 14px/1 var(--font); cursor: pointer;
  transition: transform 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.hold-btn[data-input="pointer"]:active { transform: scale(0.98); }
.hold-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.hold-row { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.hold-row svg { width: 16px; height: 16px; }
.hold-fill, .undo-fill { position: absolute; inset: 0; overflow: hidden; transition-property: transform; will-change: transform; }
.hold-fill-in, .undo-fill-in {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; transition-property: transform; will-change: transform;
}
.hold-fill { transform: translateX(-100%); }
.hold-fill-in { background: var(--red); transform: translateX(100%); }

/* Aviso "Horário cancelado" com Desfazer */
.undo-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 31rem); align-self: center;
  min-height: 46px; padding: 5px 5px 5px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); animation: msg-in 220ms var(--ease-out) both;
}
.undo-msg { display: flex; align-items: center; gap: 8px; min-width: 0; }
.undo-msg svg { width: 17px; height: 17px; color: var(--ok); flex: none; }
.undo-msg p { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.undo-btn {
  position: relative; isolation: isolate; overflow: hidden; min-width: 104px; min-height: 36px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font: 700 13px/1 var(--font); cursor: pointer; transition: transform 150ms var(--ease-out);
}
.undo-btn:active { transform: scale(0.97); }
.undo-row { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.undo-row svg { width: 14px; height: 14px; }
.undo-fill, .undo-fill-in { transition-timing-function: linear; }
.undo-fill-in { background: var(--graphite); }
.ticket { transition: opacity 240ms var(--ease-out), filter 240ms var(--ease-out); }
.ticket.is-cancelled { opacity: .45; filter: grayscale(.8); }
.ticket-gone { align-self: center; text-align: center; }
@media (prefers-reduced-motion: reduce) { .ticket-actions, .undo-notice { animation: none; } }

/* ---------- Área do salão: abas e configurações ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.tab { font: 700 14px/1 var(--font); padding: 12px 14px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--ink-soft); cursor: pointer; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cfg h2 { margin-top: 14px; }
.cfg .card { display: flex; flex-direction: column; gap: 12px; }
.cfg .field { min-height: 40px; padding: 8px 10px; font-size: 15px; }
.cfg label.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.cfg .hint { margin: 0; }
.svc-table td { vertical-align: middle; padding: 6px 4px; }
.svc-table th { text-align: left; font-size: 12px; color: var(--ink-soft); padding: 4px; font-weight: 600; }
.svc-table .field { width: 100%; }
.svc-table td.num { width: 110px; }
.svc-table td.act { width: 1%; }
.week { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; }
.week span { font-weight: 600; font-size: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.checks label { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.checks input, .inline-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.inline-check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 6px 4px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--ink-soft); font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 99px; }
.chip button:hover { background: var(--silver); color: var(--danger); }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.savebar { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 80%, transparent); padding: 14px 0 max(14px, env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.savebar .status { font-size: 14px; color: var(--ink-soft); }
.savebar .status.ok { color: var(--ok); font-weight: 600; }
@media (max-width: 640px) {
  .svc-table thead { display: none; }
  .svc-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .svc-table td { padding: 0; width: auto !important; }
  .svc-table td.name, .svc-table td.cat { grid-column: 1 / -1; }
  .svc-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 2px; }
  .svc-table td.act { grid-column: 1 / -1; }
  .week { grid-template-columns: 70px 1fr; }
}

/* Botão para mandar o resumo ao profissional pelo WhatsApp */
.btn.zap { background: #1f7a4a; color: #fff; }
.btn.zap:hover { background: #17603a; }
