[hidden] { display: none !important; }
:root {
  --bg: #fbf6f8;
  --card: #ffffff;
  --ink: #2a1f26;
  --muted: #6d5f67;
  --line: #ead9e2;
  --brand: #8e3a6b;
  --brand-soft: #f6e6ef;
  --ok: #1e7b45;
  --ok-soft: #e2f4e8;
  --warn: #a24d00;
  --warn-soft: #fff0dc;
  --bad: #b3261e;
  --bad-soft: #fde7e5;
  --header: var(--brand);
  --radius: 16px;
  font-size: 18px;
}
html.big { font-size: 22px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Topo ---------- */
#top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .5rem;
  background: var(--header); color: #fff;
  padding: calc(.7rem + env(safe-area-inset-top)) 1rem .7rem;
  min-height: 3.4rem;
}
#top h1 { font-size: 1.2rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#top .back {
  background: rgba(255,255,255,.18); border: 0; color: #fff;
  border-radius: 12px; padding: .45rem .8rem; font-weight: 600;
}

main { max-width: 640px; margin: 0 auto; padding: 1rem 1rem 6rem; }

/* ---------- Abas ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
#tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: .45rem 0 .5rem; text-decoration: none; font-size: .72rem; color: var(--muted); font-weight: 600;
}
#tabs a span { font-size: 1.45rem; line-height: 1.2; }
#tabs a.on { color: var(--brand); background: var(--brand-soft); }

/* ---------- Botões ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  width: 100%; min-height: 3.2rem; padding: .7rem 1rem;
  border-radius: var(--radius); border: 2px solid var(--brand);
  background: #fff; color: var(--brand); font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn.main { background: var(--brand); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.small { width: auto; min-height: 2.5rem; padding: .35rem .8rem; font-size: .9rem; border-radius: 12px; }
.btn:active { transform: scale(.98); }
.row { display: flex; gap: .6rem; }
.row > * { flex: 1; }
.stack > * + * { margin-top: .7rem; }

.fabs {
  position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 9;
  display: flex; gap: .6rem; justify-content: flex-end; padding: 0 1rem; pointer-events: none;
  max-width: 640px; margin: 0 auto;
}
.fab {
  pointer-events: auto; flex: 0 1 11rem; text-align: center;
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem;
  border: 2px solid var(--brand); border-radius: 999px; padding: .9rem 1rem; box-shadow: 0 6px 18px rgba(142,58,107,.35);
}
.fab.sell { background: #fff; color: var(--brand); }

/* ---------- Cartões ---------- */
.card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1rem; text-decoration: none;
}
.list > * + * { margin-top: .6rem; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
h2:first-child { margin-top: 0; }

.appt { display: flex; gap: .9rem; align-items: flex-start; }
.appt .time { font-size: 1.35rem; font-weight: 800; color: var(--brand); min-width: 4.2rem; }
.appt .time small { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); }
.appt .info { flex: 1; min-width: 0; }
.appt .info b { font-size: 1.1rem; display: block; }
.appt .info > span { display: block; color: var(--muted); }
.appt.cancelado { opacity: .55; }
.appt.cancelado b { text-decoration: line-through; }
.appt.conflict { border: 2px solid var(--warn); background: var(--warn-soft); }

.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.badge { font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Navegação de dia ---------- */
.daynav { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.daynav .arrow {
  width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 2px solid var(--line);
  background: #fff; font-size: 1.6rem; font-weight: 700; color: var(--brand);
}
.daynav .label { flex: 1; text-align: center; }
.daynav .label b { display: block; font-size: 1.25rem; text-transform: capitalize; }
.daynav .label span { color: var(--muted); font-size: .9rem; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; margin-bottom: 1rem; }
.week a {
  text-align: center; text-decoration: none; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: .35rem 0; font-size: .75rem; color: var(--muted);
}
.week a b { display: block; font-size: 1.1rem; color: var(--ink); }
.week a i { display: block; font-style: normal; font-size: .7rem; color: var(--brand); font-weight: 700; min-height: 1em; }
.week a.today { border-color: var(--brand); }
.week a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.week a.on b, .week a.on i { color: #fff; }

/* ---------- Formulários ---------- */
.form .field { margin-bottom: 1.1rem; }
.form label, .form .lbl { display: block; font-weight: 700; margin-bottom: .35rem; }
.form em { color: var(--bad); font-style: normal; }
.form .opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 3.2rem; padding: .6rem .8rem;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { min-height: 5rem; resize: vertical; }
.money { position: relative; }
.money::before { content: "R$"; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.money input { padding-left: 2.7rem; }
.hint { display: block; margin-top: .3rem; font-size: .88rem; color: var(--muted); }
.hint.new { color: var(--brand); font-weight: 600; }
.hint.ok { color: var(--ok); font-weight: 600; }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 12px; padding: .7rem .9rem; font-weight: 700; margin-bottom: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  border: 2px solid var(--line); background: #fff; border-radius: 999px;
  padding: .5rem .9rem; font-weight: 700; min-height: 2.8rem; cursor: pointer;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input { width: 4.5rem; min-height: 0; padding: .1rem .3rem; border-width: 1px; text-align: center; }

.toggle2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.toggle2 button { min-height: 3.2rem; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; }
.toggle2 button.on.yes { background: var(--ok); border-color: var(--ok); color: #fff; }
.toggle2 button.on.no { background: var(--warn); border-color: var(--warn); color: #fff; }
.toggle2.neutral button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.conflict-box {
  background: var(--warn-soft); border: 2px solid var(--warn); color: var(--warn);
  border-radius: 12px; padding: .7rem .9rem; font-weight: 600; margin-top: .5rem;
}

/* Sugestões (autocompletar) */
.ac { position: relative; }
.sug {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  background: #fff; border: 2px solid var(--brand); border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.sug button {
  display: block; width: 100%; text-align: left; border: 0; background: #fff;
  padding: .75rem .9rem; border-bottom: 1px solid var(--line);
}
.sug button:last-child { border-bottom: 0; }
.sug button small { display: block; color: var(--muted); }
.sug button:active { background: var(--brand-soft); }

/* ---------- Detalhe ---------- */
.hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.hero .big { font-size: 1.5rem; font-weight: 800; margin: 0; }
.hero .big a { text-decoration: none; color: var(--brand); }
.hero p { margin: .25rem 0; }

.totals { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.total { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; }
.total span { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; }
.total b { font-size: 1.3rem; }
.total.ok b { color: var(--ok); }
.total.warn b { color: var(--warn); }
.total.full { grid-column: 1 / -1; }

.line { display: flex; align-items: center; gap: .7rem; }
.line .grow { flex: 1; min-width: 0; text-decoration: none; }
.line .grow b { display: block; }
.line .grow span { display: block; color: var(--muted); font-size: .9rem; }
.line .amount { font-weight: 800; white-space: nowrap; }

.search { position: sticky; top: 3.6rem; z-index: 5; padding: .4rem 0 .6rem; background: var(--bg); }
.search input { font-size: 1.1rem; }

.monthnav { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.monthnav b { flex: 1; text-align: center; font-size: 1.2rem; }
.monthnav b::first-letter { text-transform: uppercase; }

.quickprice { display: flex; gap: .4rem; align-items: center; margin-top: .5rem; }
.quickprice .money { flex: 1; }
.quickprice input { min-height: 2.6rem; }

#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: .8rem 1.3rem; border-radius: 999px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Entrar / conta ---------- */
body.logged-out #tabs { display: none; }
.login { max-width: 420px; margin: 1rem auto; text-align: center; }
.login img { border-radius: 18px; }
.login h2 { margin: .8rem 0 1.2rem; font-size: 1.4rem; }
.login .form { text-align: left; }
input[type=email], input[type=password] {
  width: 100%; min-height: 3.2rem; padding: .6rem .8rem;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
}
.btn:disabled { opacity: .6; }
.sync { margin-top: .5rem; font-weight: 700; font-size: .9rem; }
.sync.ok { color: var(--ok); }
.sync.pending { color: var(--warn); }
.sync.offline { color: var(--muted); }

/* ---------- Link e WhatsApp ---------- */
.daysrow { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.daysrow .chip { min-width: 8.5rem; text-align: left; }
.daysrow .hours { display: flex; align-items: center; gap: .4rem; }
.daysrow .hours[hidden], .daysrow [hidden] { display: none; }
.daysrow .hours input { width: 5.2rem; min-height: 2.8rem; text-align: center; font-weight: 700; }
details summary { list-style: none; cursor: pointer; margin: .5rem 0 1rem; }
details summary::-webkit-details-marker { display: none; }
.steps { padding-left: 1.3rem; }
.steps li { margin: .35rem 0; }
.summary { background: var(--brand-soft); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }

/* ---------- Pedidos e avisos ---------- */
.appt.pendente { border: 2px dashed var(--warn); }
.pending-banner { display: block; background: var(--warn-soft); border: 2px solid var(--warn); color: var(--warn); margin-bottom: 1rem; text-decoration: none; }
.push-card { margin-bottom: 1rem; }

/* ---------- Marca do domínio (ex.: Studio Kadosh) ---------- */
.brand-logo { display: block; max-width: min(280px, 80%); height: auto; margin: 0 auto; }
.login .brand-logo { margin-bottom: .4rem; }
.branded .login .brand-wrap { background: var(--header); border-radius: 20px; padding: 1.2rem 1rem; margin-bottom: .5rem; }
#top .top-logo { height: 38px; width: auto; display: block; }

/* ---------- Pagamentos e despesas ---------- */
.total.bad b { color: var(--bad); }
.paygrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.paygrid button { min-height: 3.2rem; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.paygrid button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.paygrid[hidden] { display: none; }
.paylist { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; border-radius: 20px 20px 0 0; padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }

/* ---------- Dinheiro: quadros que filtram ---------- */
.fcard { display: block; text-decoration: none; color: inherit; cursor: pointer; border-width: 2px; transition: .15s; }
.fcard small { display: block; margin-top: .2rem; font-size: .8rem; color: var(--muted); }
.fcard .bignum { font-size: 1.8rem; color: inherit; display: inline; font-weight: inherit; }
.fcard:active { transform: scale(.98); }
.fcard.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.fcard.on small { color: var(--brand); font-weight: 700; }
#fin-detail { scroll-margin-top: 4rem; }
.catbars > div { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: .5rem; margin: .35rem 0; font-size: .9rem; }
.catbars i { display: block; height: 10px; border-radius: 5px; background: var(--bad); opacity: .7; }
.statement .line { padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.statement .line.sum { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: .3rem; padding-top: .6rem; font-size: 1.1rem; }
a.chip { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }

/* ---------- Clientes ---------- */
.avatar { flex: 0 0 auto; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem; }
.avatar.big { width: 4rem; height: 4rem; font-size: 1.4rem; }
.client-row .grow span { font-size: .88rem; }
.letter { font-weight: 800; color: var(--brand); margin: 1rem 0 .3rem .2rem; font-size: .95rem; }
.letter:first-child { margin-top: 0; }
.list > .letter + * { margin-top: 0; }
.chips.filters { margin-bottom: .7rem; }
.chips.filters .chip { white-space: nowrap; min-height: 2.6rem; padding: .35rem .8rem; }
.chip small { opacity: .7; margin-left: .15rem; }
.sortrow { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.sortrow label { font-weight: 700; white-space: nowrap; }
.sortrow select { min-height: 2.6rem; padding: .3rem .6rem; }
.client-hero { display: flex; gap: .9rem; align-items: center; }
.client-hero p { margin: .1rem 0; }
.actions3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.actions3 .btn { flex-direction: column; gap: 0; font-size: 1.3rem; min-height: 3.8rem; padding: .4rem; }
.actions3 .btn small { font-size: .8rem; }
.note { background: var(--warn-soft); border-left: 5px solid var(--warn); border-radius: 12px; padding: .7rem .9rem; margin-bottom: 1rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .6rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .6rem .8rem; }
.stat span { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat b { font-size: 1.05rem; }

/* ---------- Agenda: dia/semana, livres, agora ---------- */
.viewtoggle { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: .2rem; margin-bottom: .8rem; }
.viewtoggle a { text-align: center; padding: .5rem; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--muted); }
.viewtoggle a.on { background: var(--brand); color: #fff; }
.daysum { display: flex; flex-wrap: wrap; gap: .4rem .9rem; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .6rem .8rem; margin-bottom: .8rem; color: var(--muted); }
.daysum b { color: var(--ink); }
.upnext { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; border-left: 5px solid var(--brand); padding: .6rem .8rem; }
.upnext > a.line { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.upnext small { display: block; color: var(--brand); font-weight: 700; font-size: .82rem; }
.upnext .btn.small { flex: 0 0 auto; }
.msgbody summary { cursor: pointer; color: var(--brand); font-size: .88rem; font-weight: 600; margin-top: .4rem; }
.msgbody p { background: var(--brand-soft); border-radius: 10px; padding: .6rem .8rem; margin: .4rem 0 0; font-size: .9rem; }
.lunch { text-align: center; color: var(--muted); font-size: .9rem; padding: .3rem; border-radius: 12px; background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0,0,0,.03) 6px, rgba(0,0,0,.03) 12px); }
.nowline { position: relative; height: 1.2rem; }
.nowline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--bad); }
.nowline span { position: relative; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 800; border-radius: 999px; padding: .1rem .5rem; margin-left: .5rem; }
.appt-wrap { position: relative; }
.quick-done { position: absolute; right: .7rem; top: .7rem; border: 2px solid var(--ok); background: #fff; color: var(--ok); border-radius: 999px; font-weight: 800; padding: .35rem .8rem; cursor: pointer; }
details.cancelled { margin-top: 1.2rem; }
details.cancelled summary { cursor: pointer; color: var(--muted); font-weight: 700; padding: .4rem 0; }
.weeklist { display: grid; gap: .6rem; margin-bottom: 1rem; }
.wday { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.wday.today { border: 2px solid var(--brand); }
.wday-head { display: flex; align-items: baseline; gap: .5rem; padding: .7rem .9rem; text-decoration: none; background: var(--brand-soft); }
.wday-head span { color: var(--muted); }
.wday-head em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--brand); font-size: .9rem; }
.wrow { display: block; padding: .55rem .9rem; border-top: 1px solid var(--line); text-decoration: none; }
.wrow b { color: var(--brand); margin-right: .3rem; }
.wrow span { color: var(--muted); }
.wrow.cancelado { display: none; }
.wrow.pendente { background: var(--warn-soft); }

/* ---------- Mais: menu ---------- */
.profile { display: flex; gap: .9rem; align-items: center; margin-bottom: .5rem; }
.menu { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .85rem 1rem; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; text-decoration: none; color: inherit; cursor: pointer; font: inherit; min-height: 3.6rem; }
.menu > :first-child { border-top: 0; }
.menu-item.static { cursor: default; }
.menu-item:active:not(.static) { background: var(--brand-soft); }
.mi-icon { font-size: 1.4rem; width: 2rem; text-align: center; flex: 0 0 auto; }
.mi-text { flex: 1; min-width: 0; }
.mi-text b { display: block; }
.mi-text small { display: block; color: var(--muted); font-size: .85rem; margin-top: .1rem; }
.mi-go { color: var(--muted); font-size: 1.3rem; }
.menu-item.danger b { color: var(--bad); }
.menu-sub { padding: 0 1rem .9rem 3.8rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.menu-sub:empty { display: none; }
.menu-sub .toggle2 { flex: 1; }
.menu-sub .card { width: 100%; }
.menu-sub .btn.small { flex: 1 1 0; width: auto; white-space: nowrap; }
.menu-sub.wide { padding-left: 1rem; flex-wrap: wrap; }
.menu-sub.wide .btn.small { flex: 1 1 6.5rem; }

/* ---------- Buscar ---------- */
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.shortcuts .chip { justify-content: center; min-height: 3rem; border-radius: 14px; background: #fff; }

/* ---------- Agendar ---------- */
.chips.mini { gap: .35rem; align-items: center; }
.chips.mini .chip { min-height: 2.5rem; padding: .3rem .75rem; font-size: .95rem; }
.chips.mini .muted { font-size: .85rem; margin-right: .2rem; }
.daychips { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.daychips button, .daychips .other-day { position: relative; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: .35rem 0; text-align: center; cursor: pointer; font: inherit; }
.daychips small { display: block; font-size: .75rem; color: var(--muted); font-weight: 700; }
.daychips b { font-size: 1.15rem; }
.daychips .on { background: var(--brand); border-color: var(--brand); color: #fff; }
.daychips .on small { color: #fff; }
.daychips .other-day input { position: absolute; inset: 0; opacity: 0; min-height: 0; width: 100%; cursor: pointer; }
details.more { border: 2px dashed var(--line); border-radius: var(--radius); padding: .2rem 1rem; margin: 1rem 0; }
details.more[open] { padding-bottom: .5rem; }
details.more summary { cursor: pointer; font-weight: 700; padding: .8rem 0; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary small { display: block; font-weight: 400; color: var(--muted); }
.savebar { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 8; background: var(--bg); padding: .6rem 0 .4rem; margin-top: .6rem; box-shadow: 0 -10px 12px -8px rgba(0,0,0,.12); }
.savebar .sum { font-size: .95rem; margin-bottom: .45rem; text-align: center; }

/* ---------- Vender (carrinho) ---------- */
.prodgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.prodgrid button { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: .55rem .7rem; cursor: pointer; font: inherit; min-height: 3.4rem; }
.prodgrid button b { display: block; font-size: .98rem; }
.prodgrid button small { color: var(--muted); font-size: .8rem; }
.prodgrid button:active { background: var(--brand-soft); border-color: var(--brand); }
.cart { background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: .4rem .8rem; margin-bottom: 1rem; }
.cart-line { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.cl-top { display: flex; align-items: center; gap: .5rem; }
.cl-top b { flex: 1; font-size: 1.02rem; }
.cl-bottom { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.cl-bottom .money.small { flex: 1; min-width: 0; }
.cart-line .money.small input { min-height: 2.4rem; padding: .2rem .5rem .2rem 2.2rem; font-size: .95rem; width: 100%; }
.cart-line .money.small::before { left: .6rem; font-size: .85rem; }
.warnline { display: block; color: var(--bad); font-size: .8rem; font-weight: 700; }
.qty { display: flex; align-items: center; gap: .3rem; }
.qty button { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--brand); background: #fff; color: var(--brand); font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.qty b { min-width: 1.4rem; text-align: center; }
.line-total { text-align: right; font-weight: 800; font-size: 1rem; white-space: nowrap; }
.rm { border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: .3rem; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: .7rem 0 .3rem; font-size: 1.1rem; }
.cart-total b { font-size: 1.5rem; }
.paygrid.four { grid-template-columns: 1fr 1fr; }

/* ---------- Pré-reserva e pacotes ---------- */
.badge.pre { background: #efe6fb; color: #5b2a9a; }
.appt.prereserva { border: 2px dashed #8a5cc7; }
.pending-banner.pre { background: #f5effd; border-color: #8a5cc7; color: #5b2a9a; }
.prebox { background: #f5effd; border: 2px solid #8a5cc7; border-radius: var(--radius); padding: .9rem; margin-bottom: 1rem; }
.pkg .bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin: .6rem 0; }
.pkg .bar i { display: block; height: 100%; background: var(--ok); border-radius: 5px; }
.sessions { list-style: none; padding: 0; margin: 0 0 .7rem; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .6rem; font-size: .92rem; }
.sessions li a { text-decoration: none; }
.sessions li.ok { color: var(--ok); }
.sessions li.todo { color: var(--muted); }
.note { display: flex; gap: .5rem; align-items: center; }
.note .btn.small { margin-left: auto; flex: 0 0 auto; }
.note.empty-note { background: #fff; border-left-color: var(--line); }
.jump { margin: .4rem 0 .2rem; }
.actions3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

#update-bar { position: fixed; left: 1rem; right: 1rem; top: calc(4rem + env(safe-area-inset-top)); z-index: 70; border: 0; border-radius: 14px;
  background: var(--ok); color: #fff; font: inherit; font-weight: 800; padding: .9rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); cursor: pointer; }
.newpkg { border: 2px dashed var(--brand); margin-top: .5rem; }
.newpkg .lbl { display: block; font-weight: 700; margin-bottom: .35rem; }

/* ---------- Dinheiro: gráfico e rankings ---------- */
.stat small { display: block; font-size: .78rem; margin-top: .15rem; }
.chart { margin: .8rem 0; padding: .8rem .8rem .5rem; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
.chart-head .muted { font-size: .85rem; font-weight: 700; text-align: right; }
.chart-body { display: flex; gap: .4rem; height: 130px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: .7rem; color: var(--muted); text-align: right; min-width: 3.2rem; padding-bottom: 1px; }
.chart-bars { flex: 1; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 100% 50%; }
.cbar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; text-decoration: none; }
.cbar i { display: block; width: 100%; background: var(--ok); border-radius: 4px 4px 0 0; min-height: 0; }
.cbar:hover i, .cbar.on i, .cbar:focus i { background: #145a31; }
.chart-x { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin: .25rem 0 0 3.6rem; }
.rank { padding: .5rem .8rem; }
.rank-row { display: grid; grid-template-columns: minmax(0, 7.5rem) 1fr auto; gap: .5rem; align-items: center; padding: .35rem 0; font-size: .92rem; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--brand); border-radius: 5px; }

/* ---------- Mais: pronto?, ajuda ---------- */
.ready ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.ready li { padding: .3rem 0; }
.ready li a { font-weight: 700; color: var(--brand); text-decoration: none; }
.ready li.ok { color: var(--muted); }
.ready .pkg .bar { margin: .5rem 0 .2rem; }
.ready-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); margin-bottom: .5rem; }
.help details.faq { display: block; cursor: pointer; }
.help details.faq summary { list-style: none; display: flex; align-items: center; }
.help details.faq summary::-webkit-details-marker { display: none; }
.help details.faq summary::after { content: '＋'; margin-left: auto; color: var(--muted); font-weight: 700; }
.help details.faq[open] summary::after { content: '－'; }
.help details.faq p { margin: .5rem 0 .2rem; color: var(--ink); font-size: .95rem; line-height: 1.45; }

/* ---------- Produtos ---------- */
.prow { align-items: center; }
.prow a.grow { color: inherit; }
.prow .btn.small { flex: 0 0 auto; }
.total small { display: block; margin-top: .15rem; font-size: .8rem; }

/* ---------- Serviços ---------- */
.prow .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .85rem; }
.linkbtn { border-color: var(--line); color: var(--muted); min-width: 6.4rem; }
.linkbtn.on { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }

/* ---------- Dinheiro: caixa de hoje, meta, fixas ---------- */
.cashbox { display: block; color: inherit; text-decoration: none; margin-bottom: .8rem; }
.paysplit { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .5rem 0 .3rem; }
.paysplit span { background: var(--bg, #faf6f8); border: 1px solid var(--line); border-radius: 10px; padding: .35rem .5rem; min-width: 0; }
.paysplit small { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; }
.paysplit b { font-size: .92rem; white-space: nowrap; }
.goal { margin-bottom: .8rem; }
.goal .pbar { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; margin: .5rem 0 .4rem; }
.goal .pbar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.fixedbox { display: grid; gap: .35rem; margin-bottom: .8rem; border-color: var(--warn); }
.fixedbox .line { align-items: center; gap: .5rem; }
a.rank-row { color: inherit; text-decoration: none; }
.rank-row b small { font-weight: 600; font-size: .75rem; }

/* ---------- Clientes: linha com WhatsApp, aniversário ---------- */
.client-row { padding: 0; align-items: stretch; }
.client-row > a.line { flex: 1; color: inherit; text-decoration: none; padding: .75rem .9rem; min-width: 0; align-items: center; }
.client-row .badges { margin-top: .3rem; }
.wa-btn { flex: 0 0 3.2rem; display: grid; place-items: center; font-size: 1.35rem; text-decoration: none; border-left: 1px solid var(--line); background: var(--ok-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.bday-card { background: #fff7e0; border-color: #f1d27a; font-size: 1.4rem; margin-bottom: .6rem; text-decoration: none; color: inherit; }
.bday-card .grow { font-size: 1rem; }
.line .grow .badges span { display: inline-block; font-size: .78rem; }
.total small b { font-size: inherit; }
.actions3 .btn { min-width: 0; padding: .4rem .2rem; }
.actions3 .btn small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .actions3 { gap: .35rem; } .actions3 .btn small { font-size: .66rem; } }
.actions3:has(> .btn:nth-child(4)) { display: flex; }
.actions3:has(> .btn:nth-child(4)) > .btn { flex: 1 1 auto; width: auto; }

/* ---------- Buscar: microfone, atalhos com número ---------- */
.search.with-mic input { padding-right: 3.4rem; }
.mic { position: absolute; right: .35rem; top: calc(50% - .1rem); transform: translateY(-50%); width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 0; background: var(--brand-soft); font-size: 1.3rem; cursor: pointer; }
.mic.on { background: var(--brand); animation: micpulse 1s infinite; }
@keyframes micpulse { 50% { box-shadow: 0 0 0 8px rgba(142,58,107,.2); } }
.shortcuts .chip { position: relative; }
.shortcuts .chip small { position: absolute; top: -.45rem; right: -.3rem; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 800; display: grid; place-items: center; }
.shortcuts .chip.alert { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.shortcuts .chip.alert small { background: var(--warn); color: #fff; }
.subh { font-size: .95rem; color: var(--muted); margin: 1rem 0 .5rem; }
.sumline { margin: -.3rem 0 .4rem; font-size: .92rem; }
.shortcuts .chip { font-size: .9rem; text-align: center; padding: .5rem .5rem; line-height: 1.2; }
.shortcuts .chip small { opacity: 1; }

/* ---------- Agenda: escolher dia e próxima cliente ---------- */
.daypick { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; cursor: pointer; }
.daypick b { font-size: 1.05rem; }
.daypick em { font-style: normal; font-weight: 700; color: var(--brand); white-space: nowrap; font-size: .92rem; }
.daypick.other { border-color: var(--brand); background: var(--brand-soft); }
.daypick input { position: absolute; inset: 0; opacity: 0; min-height: 0; width: 100%; cursor: pointer; }
.appt.is-next { border: 2px solid var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.badge.now { background: var(--brand); color: #fff; }

/* ---------- Novo horário: data digitada + calendário ---------- */
.datefield { display: flex; gap: .5rem; max-width: 20rem; }
.datefield input[type=text] { flex: 1; min-width: 0; }
.calbtn { position: relative; flex: 0 0 3.6rem; width: 3.6rem; font-size: 1.5rem; padding: 0; overflow: hidden; }
.calbtn input { position: absolute; inset: 0; opacity: 0; min-height: 0; width: 100%; height: 100%; cursor: pointer; }

/* ---------- Mais: atalhos ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 5rem; padding: .5rem .3rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; text-align: center; }
.tile span { font-size: 1.5rem; line-height: 1; }
.tile b { font-size: .8rem; line-height: 1.15; }
.tile i { position: absolute; top: .3rem; right: .35rem; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; border-radius: 999px; background: var(--brand); color: #fff; font-style: normal; font-weight: 800; font-size: .75rem; display: grid; place-items: center; }
.tile.alert { border: 2px solid var(--warn); background: var(--warn-soft); }
.tile.alert i { background: var(--warn); }

/* ---------- Dinheiro: atalhos e últimos 6 meses ---------- */
.finactions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.finactions .btn.small { width: 100%; }
.mchart { margin-top: .8rem; }
.mbars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; align-items: end; margin-top: .6rem; }
.mbar { display: flex; flex-direction: column; align-items: center; gap: .2rem; text-decoration: none; color: inherit; }
.mbar span { position: relative; width: 100%; height: 7rem; display: flex; align-items: flex-end; }
.mbar i { display: block; width: 100%; background: var(--ok); opacity: .45; border-radius: 6px 6px 0 0; }
.mbar.on i { opacity: 1; }
.mbar small { font-size: .7rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.mbar em { font-style: normal; font-size: .8rem; font-weight: 700; text-transform: capitalize; }
.mbar.on em { color: var(--ok); }
.finactions .btn.small { flex-direction: row; white-space: nowrap; font-size: .88rem; padding: .35rem .3rem; }
