:root {
  --bg: #141210;
  --surface: #1e1b18;
  --surface-2: #2a2622;
  --line: #3a342e;
  --text: #f3ece2;
  --muted: #a89e91;
  --accent: #c48b58;
  --accent-ink: #1a1209;
  --ok: #6fbf73;
  --danger: #e0685a;
  --warn: #e5b94e;
  --radius: 12px;
  --display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: .02em; margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }
.wrap.wide { max-width: 1000px; }

/* Cabeçalho com faixa de barbeiro */
.brand {
  text-align: center;
  padding: 36px 16px 24px;
  position: relative;
}
.brand::before {
  content: '';
  display: block;
  width: 44px; height: 6px; margin: 0 auto 14px;
  border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, var(--text) 6px 12px, #b5473c 12px 18px, var(--text) 18px 24px);
}
.brand h1 { font-size: 30px; text-transform: uppercase; }
.brand p { color: var(--muted); margin: 4px 0 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.card h2 { font-size: 18px; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.step-n {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font: 600 13px/24px var(--body); text-align: center; flex: none;
}

label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
input, select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1 1 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 10px;
  padding: 12px 18px; font-weight: 600; cursor: pointer;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid #5a2f2a; }
.btn.ok { background: transparent; color: var(--ok); border: 1px solid #2f4f30; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.error { color: var(--danger); font-size: 14px; margin-top: 8px; min-height: 1em; }

/* Serviços */
.options { display: grid; gap: 8px; }
.option {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; cursor: pointer;
}
.option:hover { border-color: #5a5047; }
.option.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option .price { color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Dias */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.day {
  flex: none; width: 64px; scroll-snap-align: start;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 4px; text-align: center; cursor: pointer;
}
.day .wd { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.day .dn { font: 500 22px/1.2 var(--display); }
.day .mo { font-size: 11px; color: var(--muted); }
.day.sel { border-color: var(--accent); background: #3a2f1f; }
.day:disabled { opacity: .3; cursor: not-allowed; }

/* Horários */
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.time {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 0; cursor: pointer; font-weight: 500;
}
.time.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.summary { background: var(--surface-2); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.summary span:first-child { color: var(--muted); white-space: nowrap; }
.summary strong { text-align: right; }

.success { text-align: center; padding: 28px 20px; }
.success .check {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px;
  background: #23361f; color: var(--ok); display: grid; place-items: center; font-size: 32px;
}

.upcoming { border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--surface-2); border-radius: 0 8px 8px 0; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- Painel ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.topbar h1 { font-size: 20px; text-transform: uppercase; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 10px 14px; cursor: pointer; color: var(--muted); white-space: nowrap;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.alert {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: #3a2f1f; border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px;
}
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.datebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.datebar input { width: auto; }
.date-pick {
  position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  font-weight: 600; white-space: nowrap;
}
.date-pick:hover { border-color: var(--accent); }
.date-pick svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* o campo de data real fica invisível por cima, só para abrir o calendário */
.date-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
#newAppt { margin-left: auto; }

/* atalhos: hoje + próximos dias com agendamento (rola para o lado se tiver muitos) */
.week-strip { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; align-items: stretch; }
.week-strip button { flex: 0 0 auto; min-width: 74px; }
.week-strip button.past { opacity: .6; border-style: dashed; }
.week-strip .strip-empty { align-self: center; padding: 0 8px; }
.week-strip button {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 2px; cursor: pointer; text-align: center;
}
.week-strip button.sel { border-color: var(--accent); }
.week-strip .cnt { font-size: 11px; color: var(--accent); min-height: 1.3em; }

.appt {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px;
}
.appt .t { font: 500 20px var(--display); }
.appt .t small { display: block; font: 12px var(--body); color: var(--muted); }
.appt .who { font-weight: 600; }
.appt .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.appt.st-cancelado, .appt.st-faltou { opacity: .5; }
.appt.st-cancelado .who { text-decoration: line-through; }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pill.confirmado { color: var(--accent); border-color: #6b5530; }
.pill.concluido { color: var(--ok); border-color: #2f4f30; }
.pill.cancelado, .pill.faltou { color: var(--danger); border-color: #5a2f2a; }
.pill.new { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }

.periods { display: flex; flex-direction: column; gap: 6px; }
.period { display: flex; gap: 6px; align-items: center; }
.period input { width: 140px; padding: 8px 10px; }
.closed-tag { color: var(--muted); font-size: 14px; padding: 8px 0; }


/* Calendário de dias livres */
.avail-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd span { text-align: center; font-size: 11px; text-transform: uppercase; color: var(--muted); padding-bottom: 4px; }
.cal-day {
  min-height: 62px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 6px; cursor: pointer; text-align: left; overflow: hidden;
}
.cal-day .num { font-weight: 600; font-size: 14px; }
.cal-day .hrs { font-size: 10.5px; line-height: 1.25; color: var(--accent); }
.cal-day .cnt { font-size: 10.5px; color: var(--text); margin-top: auto; }
.cal-day.other { opacity: .45; }
.cal-day.past { opacity: .25; cursor: not-allowed; }
.cal-day.today .num { color: var(--accent); text-decoration: underline; }
.cal-day.avail { background: #2e2619; border-color: #6b5530; }
.cal-day.sel { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; }
.lg-avail { background: #2e2619; border: 1px solid #6b5530; }
.lg-sel { border: 2px solid var(--accent); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
#availEditor { position: sticky; top: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; }
td input { padding: 8px 10px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

/* z-index acima da barra de baixo (60) e da gaveta "Mais" (70) */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; z-index: 80; overscroll-behavior: contain; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal h2 { font-size: 18px; text-transform: uppercase; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 18px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.toast.err { border-color: var(--danger); color: var(--danger); }

.check-line { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; cursor: pointer; }
.check-line input { width: auto; }

@media (max-width: 800px) {
  .avail-layout { grid-template-columns: 1fr; }
  #availEditor { position: static; }
}

@media (max-width: 600px) {
  .cal-day { min-height: 54px; padding: 4px; }
  .cal-day .hrs { font-size: 9.5px; }
  .appt { grid-template-columns: 60px 1fr; }
  .appt .actions { grid-column: 1 / -1; justify-content: flex-start; }
      .hide-sm { display: none; }
}

/* Adicionar à agenda (tela de confirmação) */
.cal-add { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; text-align: left; }
.cal-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cal-btns .btn { text-decoration: none; font-size: 14px; padding: 11px 10px; }
@media (max-width: 380px) { .cal-btns { grid-template-columns: 1fr; } }

/* Confirmação por WhatsApp no painel */
.btn.wa { background: #1f3b2a; color: #7fe0a1; border: 1px solid #2f6b45; }
.btn.wa:hover { filter: brightness(1.15); }
.pill.wa-ok { color: #7fe0a1; border-color: #2f6b45; }
.pill.wa-pending { color: var(--warn); border-color: #6b5530; }
.site .cal-btns .btn { color: var(--accent-ink); }

/* ===== Painel no celular ===== */
.bottom-nav { display: none; }
.sheet-handle { display: none; }
.sheet-close { display: none; }

/* Serviços em cartões (computador e celular) */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.svc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.svc-card.off { opacity: .6; }
.rv-admin { display: grid; gap: 12px; }
.pay-grid { display: grid; gap: 10px; margin-bottom: 8px; }
.pay-btn { font-size: 17px; padding: 14px; }
.pay-pill { cursor: pointer; background: transparent; color: var(--ok); border-color: #2f4f30; }
.rp-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.rp-nav strong { font-size: 18px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.rp-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.rp-kpi span { font-size: 12px; color: var(--muted); }
.rp-kpi b { font-size: 22px; }
.rp-kpi.main { border-color: #6b5530; background: #2e2619; }
.rp-kpi.main b { color: var(--accent); }
.rp-kpi small { font-size: 12px; color: var(--muted); }
.rp-kpi .up { color: var(--ok); }
.rp-kpi .down { color: var(--danger); }
.rp-warn { border: 1px solid #6b5530; background: #2e2619; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }
.rp-card { margin-bottom: 14px; }
.rp-card h2 { font-size: 15px; }
.rp-bar { margin: 8px 0; }
.rp-bar-top, .rp-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.rp-line { padding: 6px 0; border-top: 1px solid var(--line); }
.rp-line:first-of-type { border-top: 0; }
.rp-track { height: 8px; background: var(--surface-2); border-radius: 4px; margin-top: 4px; overflow: hidden; }
.rp-track div { height: 100%; background: var(--accent); border-radius: 4px; }
.rp-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.rp-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; cursor: pointer; }
.rp-colbar { width: 100%; background: #4a3d2a; border-radius: 4px 4px 0 0; }
.rp-col.on .rp-colbar { background: var(--accent); }
.rp-col span { font-size: 10px; color: var(--muted); }
@media (max-width: 700px) { .rp-kpis { grid-template-columns: 1fr 1fr; } .rp-kpi b { font-size: 19px; } }
.ex-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ex-item:first-of-type { border-top: 0; }
.ex-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ex-right span { display: flex; gap: 6px; }
.rp-profit strong { font-size: 18px; }
.rp-line .up { color: var(--ok); }
.rp-line .down { color: var(--danger); }
.stmt-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cp-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; font-size: 16px; }
.na-search { position: relative; }
.na-multi { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: -4px 0 12px; background: rgba(255,255,255,.02); }
.na-extra { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.na-extra .field { margin-bottom: 8px; }
.na-extra button { margin-bottom: 8px; }
@media (max-width: 600px) { .na-extra { grid-template-columns: 1fr auto; } .na-extra .field:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }
.na-sugg { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; margin-top: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); }
.na-opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.na-opt:last-child { border-bottom: 0; }
.na-opt:hover, .na-opt:focus { background: rgba(255,255,255,.05); }
.na-opt span:last-child { color: var(--muted); font-size: 13px; white-space: nowrap; }
.na-none { padding: 10px 12px; }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.rv-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.rv-item.pendente { border-color: #6b5530; }
.rv-item.escondida { opacity: .6; }
.rv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rv-st { color: #d4a456; font-size: 18px; letter-spacing: 1px; }
.rv-st .off { color: #4a423a; }
.rv-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.rv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #d9534f; color: #fff; font-size: 11px; line-height: 18px; text-align: center; vertical-align: middle; }
.svc-order { display: flex; align-items: center; gap: 6px; margin: -4px 0 -2px; }
.svc-order span { flex: 1; }
.svc-btns { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.svc-card textarea { min-height: 0; resize: vertical; }
.svc-desc { margin: -4px 0 14px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.svc-desc:empty { display: none; }
.coupon-box { margin: 0 0 14px; }
.coupon-form { display: flex; gap: 8px; margin-top: 8px; }
.coupon-form input { flex: 1; min-width: 0; text-transform: uppercase; }
.coupon-ok { margin: 6px 0 0; color: var(--accent); }
.multi { margin: 0 0 14px; }
.multi.on { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.multi-row { display: grid; grid-template-columns: 22px 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.multi-row:first-of-type .multi-main { grid-column: 2; }
.multi-n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.multi-row select, .multi-row input { padding: 9px 10px; font-size: 14px; }
.multi-row:not(:has(button)) { grid-template-columns: 22px 1fr 1fr 34px; }
@media (max-width: 600px) {
  .multi-row { grid-template-columns: 22px 1fr auto; }
  .multi-row:not(:has(button)) { grid-template-columns: 22px 1fr; }
  .multi-row .multi-for { grid-column: 2 / -1; grid-row: 2; }
  .multi-row button { grid-column: 3; grid-row: 1; }
  .multi-row .multi-n { grid-row: 1; }
  .multi-row select, .multi-row input { font-size: 16px; }
}
.picks { border: 1px solid #6b5530; background: #2e2619; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.picks .pk-head { margin-bottom: 6px; color: var(--accent); }
.pk-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.time:disabled { opacity: .3; cursor: not-allowed; }
.pk-done { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pk-links { font-size: 13px; }
.pk-links a { color: var(--accent); }
.svc-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc-card label { margin-bottom: 4px; }
.svc-card .checks { display: flex; gap: 16px; flex-wrap: wrap; }
.svc-card .checks .check-line { font-size: 14px; }

/* Gaveta "Mais" */
.sheet-bg { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; }
.sheet-bg.hidden { display: none; }
.sheet {
  width: 100%; background: var(--surface); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
  padding: 8px 12px calc(14px + env(safe-area-inset-bottom)); animation: sheetUp .22s ease;
  max-height: 88svh; overflow-y: auto; /* celular pequeno ou deitado: rola em vez de cortar */
}
.sheet .sheet-handle, #availEditor .sheet-handle { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.sheet-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 10px; font-size: 16px;
  background: none; border: 0; border-radius: 10px; color: var(--text); text-decoration: none; cursor: pointer; text-align: left;
}
.sheet-item:active, .sheet-item:hover { background: var(--surface-2); }
.sheet-item.hidden { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } }

@media (max-width: 760px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  /* iPhone dá zoom ao tocar em campo com letra menor que 16px */
  input, select, textarea { font-size: 16px; }
  .wrap.wide { padding-top: env(safe-area-inset-top); }
  .topbar { padding: 10px 0; margin-bottom: 10px; }
  .topbar h1 { font-size: 18px; }
  .top-actions, .tabs { display: none !important; }

  .bottom-nav:not(.hidden) {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    /* fundo sólido e camada própria: o desfoque (backdrop-filter) faz a barra "travar" fora do lugar no iPhone */
    background: #1e1b18; transform: translateZ(0); will-change: transform;
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav button {
    position: relative; background: none; border: 0; color: var(--muted); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; font-size: 11px;
  }
  .bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-nav button.active { color: var(--accent); }
  .bn-badge {
    position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
  }

  /* Agenda mais compacta */
  /* linha 1: ◀ Hoje ▶ [data]  ·  linha 2: título + novo agendamento */
  .date-pick { flex: 1; min-width: 0; justify-content: space-between; padding: 9px 12px; }
  #newAppt { order: 6; flex: 1 1 100%; margin-left: 0; }
  .week-strip { gap: 6px; }
  .week-strip button { padding: 6px 0; min-width: 66px; }

  /* Dias livres: calendário maior, horário numa gaveta que sobe de baixo */
  .avail-layout { display: block; }
  .cal { padding: 12px; }
  .cal-grid { gap: 3px; }
  .cal-day { min-height: 60px; padding: 4px 3px; border-radius: 7px; }
  .cal-day .num { font-size: 15px; }
  .cal-day .hrs { font-size: 10px; letter-spacing: -.2px; }
  .cal-day .cnt { font-size: 10px; }
  #availEditor {
    position: fixed; left: 0; right: 0; top: auto; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 55;
    margin: 0; border-radius: 18px 18px 0 0; max-height: 62vh; overflow-y: auto;
    box-shadow: 0 -12px 30px rgba(0,0,0,.5); transform: translateY(110%); transition: transform .25s ease;
    padding-top: 6px;
  }
  #availEditor.open { transform: none; }
  .sheet-close { display: inline-flex; }
  body.avail-sheet #tab-horarios { padding-bottom: 300px; }
  .period input { width: auto; flex: 1; min-width: 0; }

  .modal-bg { align-items: end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; max-height: 92dvh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

.top-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Agendamento: troca de serviço em botões compactos acima das vagas */
.svc-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scroll-snap-type: x proximity; }
.svc-chip {
  flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px;
  cursor: pointer; text-align: left; color: var(--text);
}
.svc-chip strong { font-size: 14px; white-space: nowrap; }
.svc-chip span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.svc-chip.sel { border-color: var(--accent); background: #2e2619; box-shadow: inset 0 0 0 1px var(--accent); }
.svc-chip.sel span { color: var(--accent); }
.pick-info { background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 10px 12px; margin: -4px 0 14px; font-size: 14px; }

/* Dia da semana nas novidades: completo no computador, 3 letras no celular */
.wd-short { display: none; }
@media (max-width: 600px) {
  .wd-long { display: none; }
  .wd-short { display: inline; }
}

/* Página de trás travada enquanto uma janela (ficha do cliente, novo agendamento, Mais) está aberta */
body.scroll-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.sheet-bg { overscroll-behavior: contain; }
.toast { z-index: 90; }

/* Traduções (Configurações) */
.translations { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.translations summary { cursor: pointer; font-weight: 600; }
.translations[open] summary { margin-bottom: 8px; }

/* ===================================================================
   Páginas públicas: link de agendamento, cadastro, entrar, página inicial
   =================================================================== */
.pub-top { position: sticky; top: 0; z-index: 40; background: rgba(20,18,16,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pub-top-in { max-width: 600px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; min-height: 58px; }
.pub-top-in.wide { max-width: 1000px; }
.pub-name { font: 500 19px/1.2 var(--display); letter-spacing: .04em; color: var(--text); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pub-hero { text-align: center; padding: 28px 16px 18px; }
.pub-hero h1 { font-size: clamp(30px, 7vw, 42px); text-transform: uppercase; margin: 6px 0 6px; }
.pub-hero p { color: var(--muted); margin: 0; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.pub-contacts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pub-contacts a { font-size: 13px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pub-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 40px; }
.pub-foot a { color: var(--muted); }
.notice { text-align: center; padding: 40px 20px; }
.notice .big { font-size: 46px; }

/* Seletor de idioma (bandeira + sigla) */
.lang-switch { position: relative; margin-left: auto; flex: none; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--text); font: 600 13px var(--body); }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--accent); }
.lang-btn .caret { color: var(--muted); font-size: 11px; }
.lang-switch svg { width: 22px; height: 16px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 180px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px -12px rgba(0,0,0,.8); }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text); cursor: pointer; text-align: left; }
.lang-menu button b { min-width: 24px; }
.lang-menu button span { color: var(--muted); }
.lang-menu button:hover { background: rgba(255,255,255,.05); }
.lang-menu button[aria-selected="true"] { background: rgba(196,139,88,.14); }

/* Página inicial do sistema */
.land { max-width: 760px; margin: 0 auto; padding: 30px 16px 60px; }
.land h1 { font-size: clamp(34px, 8vw, 56px); text-transform: uppercase; line-height: 1.05; margin: 10px 0 14px; }
.land .lead { color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.land-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.land-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 34px 0; }
.land-feats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.land-feats b { display: block; margin-bottom: 4px; font-size: 15px; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.price strong { display: block; font: 500 30px/1.2 var(--display); color: var(--accent); margin: 4px 0; }
@media (max-width: 480px) { .prices { grid-template-columns: 1fr; } }

/* Cadastro */
.country-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.country-pick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.country-pick button.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #2e2619; }
.country-pick svg { width: 42px; height: 30px; border-radius: 4px; }
.country-pick small { color: var(--muted); }
.slug-line { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.slug-line span { padding: 11px 0 11px 12px; color: var(--muted); white-space: nowrap; font-size: 14px; align-self: center; }
.slug-line input { border: 0 !important; background: transparent !important; padding-left: 2px !important; min-width: 0; }
.slug-msg { font-size: 13px; margin-top: 4px; min-height: 1.3em; }
.slug-msg.ok { color: var(--ok); } .slug-msg.bad { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Conta aguardando ativação */
.waiting { max-width: 560px; margin: 0 auto; padding: 24px 16px 60px; }
.waiting .card { text-align: left; }
.pay-box { background: var(--surface-2); border: 1px dashed var(--accent); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.pay-box code { font-size: 16px; user-select: all; }

/* Faixa do modo suporte */
.support-bar { background: #5a3b12; color: #ffe2b0; text-align: center; font-size: 13px; padding: 8px 12px; }
.support-bar strong { color: #fff; }

/* Painel do administrador */
.adm-shop { display: grid; gap: 6px; }
.adm-shop .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-shop .meta { font-size: 13px; color: var(--muted); }
.adm-shop .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pill.aguardando { background: rgba(229,185,78,.15); color: var(--warn); }
.pill.ativa { background: rgba(111,191,115,.15); color: var(--ok); }
.pill.suspensa { background: rgba(224,104,90,.15); color: var(--danger); }
.adm-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.adm-filter button.active { border-color: var(--accent); color: var(--accent); }
.log-list { font-size: 13px; }
.log-list div { padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Mensalidade: aviso no topo do painel */
.bill-bar { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; font-size: 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.bill-bar.soon { background: rgba(229,185,78,.12); border: 1px solid #6b5530; }
.bill-bar.late { background: rgba(224,104,90,.12); border: 1px solid #5a2f2a; }
.bill-bar.blocked { background: #4a1f1a; border: 1px solid var(--danger); color: #ffd9d3; }
.bill-bar .btn { flex: none; }

/* Primeiros passos */
.onboard h2 { margin-bottom: 4px; }
.ob-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.ob-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.ob-list li.ok { opacity: .6; }
.ob-list li.ok .ob-t { text-decoration: line-through; }
.ob-list .ob-i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--line); font-size: 13px; }
.ob-list li.ok .ob-i { background: var(--ok); border-color: var(--ok); color: #10200f; }
.ob-list .ob-t { flex: 1; font-size: 14px; }
.ob-list .ob-t small { display: block; color: var(--muted); }
.ob-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.ob-bar span { display: block; height: 100%; background: var(--accent); }
.ob-samples { margin-top: 12px; font-size: 13px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 10px; }
.pill.sample { color: #9fc3ff; border-color: #2f4f7a; }
.appt.is-sample { border-style: dashed; }
.pulse { animation: obPulse 1.2s ease-in-out 2; }
@keyframes obPulse { 50% { box-shadow: 0 0 0 4px rgba(196,139,88,.45); } }

/* ===== Página de venda (página inicial) ===== */
.sale-hero { background: radial-gradient(60% 80% at 80% 0%, rgba(196,139,88,.16), transparent 70%); border-bottom: 1px solid var(--line); }
.sale-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; max-width: 1000px; }
.sale-h2 { font-size: clamp(24px, 5vw, 32px); text-transform: uppercase; margin: 6px 0 16px; }
.land section, section.land { padding-top: 34px; }
.mock-phone { max-width: 300px; margin: 0 auto; width: 100%; border: 8px solid #2a2622; border-radius: 34px; background: var(--bg); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); pointer-events: none; }
.mock-top { padding: 12px 14px; font: 500 15px var(--display); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.mock-body { padding: 12px; }
.mock-body .svc-chips { overflow: hidden; }
.mock-body .day { min-width: 0; }
.mock-body .times { grid-template-columns: repeat(3, 1fr); }
.mock-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mock-ok { margin-top: 12px; text-align: center; color: var(--ok); font-weight: 600; font-size: 14px; }
.sale-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sale-steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.sale-steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; margin-bottom: 4px; }
.sale-steps b { color: var(--text); font-size: 16px; }
.sale-checks { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 6px; }
.sale-checks li::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.sale-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.sale-faq summary { cursor: pointer; font-weight: 600; }
.sale-faq p { color: var(--muted); margin: 8px 0 0; }
.sale-final { text-align: center; padding-bottom: 50px; }
.land-feats div { color: var(--muted); }
.land-feats b { color: var(--text); }
@media (max-width: 760px) { .sale-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .hide-xs { display: none; } }

/* Termos e privacidade */
.legal { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; line-height: 1.7; }
.legal h1 { font-size: 30px; text-transform: uppercase; margin-bottom: 4px; }
.legal h2 { font-size: 19px; margin: 26px 0 6px; }
.legal p, .legal li { color: #ddd4c8; }
.legal .upd { color: var(--muted); font-size: 14px; }
.legal .note { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--muted); }
.pub-top-in .btn + .lang-switch { margin-left: 8px; }
