[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; }

/* ---------- Agenda do dia: lista enxuta ---------- */
.list.timeline { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list.timeline > * + * { margin-top: 0; }
.list.timeline > .empty { border: 0; }
.dayrow { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.list.timeline > .dayrow:first-child { border-top: 0; }
.dr-time { flex: 0 0 3.6rem; display: flex; flex-direction: column; line-height: 1.15; }
.dr-time b { font-size: 1.2rem; color: var(--brand); }
.dr-time small { color: var(--muted); font-size: .78rem; }
.dr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dr-info b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-info > span { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-info em { font-style: normal; font-size: .82rem; font-weight: 700; margin-top: .2rem; color: var(--muted); }
.dr-info em.now { color: var(--brand); }
.dr-info em.warn { color: var(--warn); }
.dr-info em.pre { color: #7a3fa0; }
.dr-money { flex: 0 0 auto; font-weight: 800; font-size: .95rem; color: var(--muted); }
.dr-money.ok { color: var(--ok); }
.dayrow.past { opacity: .55; }
.dayrow.is-next { background: var(--brand-soft); box-shadow: inset 4px 0 0 var(--brand); }
.dayrow.pendente { box-shadow: inset 4px 0 0 var(--warn); }
.list.timeline .nowline { height: 0; border-top: 2px solid var(--bad); }
.list.timeline .nowline::before { display: none; }
.list.timeline .nowline span { position: relative; top: -.65rem; }
.list.timeline .lunch { border-top: 1px solid var(--line); border-radius: 0; }
.daypick b { font-size: 1rem; } .daypick em { font-size: .85rem; }

/* ---------- Clientes: lista enxuta ---------- */
.searchadd { display: flex; gap: .5rem; align-items: center; }
.searchadd input { flex: 1; min-width: 0; }
.searchadd .btn.small { flex: 0 0 auto; min-height: 3.2rem; }
.csum { margin: .1rem 0 .7rem; color: var(--muted); font-size: .92rem; }
.csum b { color: var(--ink); }
.csum a { text-decoration: none; }
.chips.hscroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1rem .6rem; padding: 0 1rem .3rem; scrollbar-width: none; }
.chips.hscroll::-webkit-scrollbar { display: none; }
.chips.hscroll .chip { flex: 0 0 auto; white-space: nowrap; }
.crow { display: flex; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .65rem .8rem; }
.crow-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; }
.crow .avatar { width: 2.5rem; height: 2.5rem; font-size: .9rem; }
.dr-info em.ok { color: var(--ok); }
.wa-mini { flex: 0 0 2.6rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); text-decoration: none; font-size: 1.15rem; }
.list.clist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list.clist > * + * { margin-top: 0; }
.list.clist .crow { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.list.clist > .crow:first-child { border-top: 0; }
.list.clist .letter { padding: .3rem .9rem; background: var(--bg); border-top: 1px solid var(--line); font-size: .85rem; }
.list.clist > .letter:first-child { border-top: 0; }
.list.clist > .empty { border: 0; }
.list.clist .letter { margin: 0; }

/* ---------- Serviços: botão pequeno do link ---------- */
.linkpill { flex: 0 0 auto; border: 1.5px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: .35rem .65rem; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.linkpill.on { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }

/* ---------- Produtos: estoque na linha ---------- */
.lowbox { display: flex; align-items: center; gap: .6rem; border-color: var(--warn); background: var(--warn-soft); margin-bottom: .7rem; padding: .7rem .8rem; }
.lowbox .grow { display: flex; flex-direction: column; min-width: 0; }
.lowbox .grow b { color: var(--warn); }
.lowbox .grow span { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lowbox .btn.small { flex: 0 0 auto; }
.stk { flex: 0 0 auto; font-weight: 800; font-size: .85rem; color: var(--ok); white-space: nowrap; }
.stk.warn { color: var(--warn); }
.stk.bad { color: var(--bad); }
.addstk { flex: 0 0 2.6rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid var(--brand); background: #fff; color: var(--brand); font-size: 1.4rem; font-weight: 800; line-height: 1; cursor: pointer; }
.qtyrow { display: flex; gap: .5rem; align-items: center; justify-content: center; }
.qtyrow input { max-width: 6rem; text-align: center; font-size: 1.5rem; font-weight: 800; }
.qbtn { width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 2px solid var(--brand); background: #fff; color: var(--brand); font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.lowbox { flex-direction: column; align-items: stretch; }
.lowbox .grow span { white-space: normal; }
.lowbox .btn.small { width: 100%; }

/* ---------- Vender: produto na venda e troco ---------- */
.prodgrid button { position: relative; }
.prodgrid button.on { border-color: var(--brand); background: var(--brand-soft); }
.prodgrid button.out { opacity: .6; }
.prodgrid .incart { position: absolute; top: -.45rem; right: -.35rem; min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem; border-radius: 999px; background: var(--brand); color: #fff; font-style: normal; font-weight: 800; font-size: .85rem; display: grid; place-items: center; }
.change { margin-top: .7rem; background: var(--ok-soft); border-radius: 12px; padding: .7rem .8rem; }
.change .money { flex: 1; }
.troco { flex: 1; font-size: 1.05rem; }

/* ---------- Buscar: linhas enxutas ---------- */
.list.clist > .dayrow:first-child { border-top: 0; }
.list.clist .dayrow.past { opacity: 1; }
.list.clist .dayrow.cancelado { opacity: .6; }
.dr-info em.bad { color: var(--bad); }
.dayrow > .muted { flex: 0 0 auto; }

/* ---------- Agenda: semana ---------- */
.wday-head b { font-size: 1rem; }
.wday.today .wday-head { background: var(--brand); color: #fff; }
.wday.today .wday-head span, .wday.today .wday-head em { color: #fff; }
.wday.past { opacity: .6; }
.wday.noappt .wday-head { background: #fff; }
.wrow { display: flex; align-items: center; gap: .5rem; color: inherit; }
.wrow b { flex: 0 0 auto; }
.wrow .wname { flex: 1; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow .wname small { color: var(--muted); font-size: .88rem; }
.wmark { flex: 0 0 auto; font-style: normal; font-weight: 800; font-size: .9rem; }
.wmark.ok { color: var(--ok); }
.wrow.pendente { background: none; box-shadow: inset 3px 0 0 var(--warn); }
.wrow.wadd { color: var(--brand); font-weight: 700; font-size: .9rem; }

/* ---------- Dinheiro: extrato e linhas ---------- */
.extrato { padding: 0; overflow: hidden; margin-bottom: .8rem; }
.ex-top { display: block; padding: .9rem 1rem .8rem; text-decoration: none; color: inherit; }
.ex-top span { display: block; color: var(--muted); font-weight: 600; font-size: .9rem; }
.ex-top b { display: block; font-size: 1.9rem; color: var(--ok); line-height: 1.2; }
.ex-top small { color: var(--muted); font-size: .82rem; }
.ex-row { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.ex-row span { flex: 1; }
.ex-row b { font-size: 1.05rem; }
.ex-row i { font-style: normal; color: var(--muted); width: .8rem; text-align: center; }
.ex-top.on, .ex-row.on { background: var(--brand-soft); }
.mrow { flex-wrap: wrap; }
.mrow-main { flex: 1 1 100%; display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; min-width: 0; }
.mrow .payin { margin-left: 4.4rem; margin-top: .4rem; }
.mrow .quickprice { flex: 1 1 100%; margin: .5rem 0 0 4.4rem; }
.extrato > .ex-row:first-child { border-top: 0; }

/* ---------- Mais: perfil clicável e "falta configurar" ---------- */
a.card.profile { color: inherit; text-decoration: none; }
a.card.profile .mi-go { color: var(--muted); font-size: 1.3rem; }
details.ready { margin-bottom: .5rem; }
details.ready > summary { list-style: none; cursor: pointer; }
details.ready > summary::-webkit-details-marker { display: none; }
details.ready[open] > summary .muted { visibility: hidden; }
.menu-item.faq > summary { display: flex; align-items: center; gap: .8rem; }
details.ready { padding: .7rem 1rem; }

/* ---------- Venda a prazo: parcelas ---------- */
.later { margin-top: .8rem; background: var(--brand-soft); border-radius: 14px; padding: .8rem; }
.later .datefield { max-width: none; }
.lt-list { margin-top: .7rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lt-list > div { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .8rem; border-top: 1px solid var(--line); font-size: .95rem; }
.lt-list > div:first-child { border-top: 0; }
.lt-list > div.ok { color: var(--ok); }
.lt-list > div.late { color: var(--bad); font-weight: 700; }
.planbox { margin-bottom: 1rem; border-color: var(--brand); }
.planbox .warnline { color: var(--bad); font-weight: 700; }

/* ---------- Ficha da cliente: histórico enxuto ---------- */
.hrow { border-top: 1px solid var(--line); }
.list.clist > .hrow:first-child { border-top: 0; }
.hrow > .dayrow { border-top: 0; }
.hrow-x { padding: 0 .9rem .7rem 5.3rem; }
.hrow-x .quickprice { margin: 0; }
.list.clist .letter + .hrow, .list.clist .letter + .dayrow { border-top: 1px solid var(--line); }

/* ---------- Vender: busca de produto e carrinho compacto ---------- */
.prodgrid button { min-height: 3rem; padding: .45rem .65rem; }
.prodgrid button b { font-size: .95rem; }
.cl-bottom .money.small { flex: 0 1 7.5rem; }
.cl-bottom .line-total { margin-left: auto; min-width: 4.2rem; }
.cart-line { padding: .5rem 0; }
.linkish { border: 0; background: none; color: var(--brand); font-weight: 700; padding: .3rem 0; cursor: pointer; font: inherit; font-weight: 700; }
#ana-tabs { margin-top: -.2rem; }

/* ---------- Agenda: topo mais leve ---------- */
.push-slim { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem .5rem .9rem; margin-bottom: .7rem; }
.push-slim span { flex: 1; font-weight: 700; font-size: .95rem; }
.pending-banner.slim { display: flex; align-items: center; gap: .3rem; padding: .6rem .9rem; margin-bottom: .7rem; }
.pending-banner.slim i { margin-left: auto; font-style: normal; }
.extrato.also .also-h { padding: .5rem 1rem 0; font-size: .8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.extrato.also .ex-row:first-of-type { border-top: 0; }
.tomorrow { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; padding: .7rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
.tomorrow span { color: var(--muted); font-weight: 700; }
.tomorrow b { flex: 1; font-weight: 600; }
.tomorrow i { font-style: normal; color: var(--muted); }
.sortrow { gap: .5rem; }
.sortrow select { width: auto; }
.sortrow select { flex: 0 1 10rem; min-width: 0; max-width: 10rem; }

/* ---------- Dinheiro: entrou por dia e receber ao lado ---------- */
.list.clist .dayhead { display: flex; justify-content: space-between; color: var(--muted); }
.list.clist .dayhead b { color: var(--ok); }
.pay-ic { flex: 0 0 2.2rem; font-size: 1.3rem; text-align: center; }
.mrow { flex-wrap: nowrap; }
.mrow.wrap { flex-wrap: wrap; }
.mrow:not(.wrap) .mrow-main { flex: 1 1 auto; }
.mrow .payin { margin: 0 0 0 .2rem; padding: .35rem .6rem; flex: 0 0 auto; }
.mrow .dr-money:empty { display: none; }

/* ---------- Tela do horário ---------- */
.appt-hero .big { display: block; font-size: 1.45rem; font-weight: 800; color: var(--brand); text-decoration: none; margin-bottom: .2rem; }
.appt-hero p { margin: .25rem 0; }
.appt-hero .when { font-size: 1.15rem; }
.appt-hero .status-line { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.moneybox { margin-top: .9rem; }
.moneybox .ex-row { gap: .6rem; }
.moneybox .ex-row > span { flex: 1; }
.moneybox .quickprice { flex: 0 1 13rem; margin: 0; }
.moneybox .paid-how { display: block; font-size: .8rem; margin-top: .15rem; }
.moneybox .dayrow { border-top: 1px solid var(--line); }
.moneybox + .btn { margin-top: .8rem; }

/* ---------- Vender: desconto ---------- */
#disc-box { margin: -.4rem 0 1rem; }
.disc-f { background: var(--ok-soft); border-radius: 12px; padding: .7rem .8rem; }
.disc-f .money { flex: 1; }
.cart-sub { display: flex; justify-content: space-between; padding: .35rem 0 0; font-size: .95rem; color: var(--muted); }

/* ---------- Horário: vários serviços ---------- */
.svc-list { margin-top: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.svc-line { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem .45rem .8rem; border-top: 1px solid var(--line); }
.svc-line:first-child { border-top: 0; }
.svc-line .grow { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.svc-line .grow small { color: var(--muted); font-size: .8rem; }
.svc-line .money.small { flex: 0 0 8.5rem; }
.svc-line .money.small input { min-height: 2.5rem; padding: .2rem .5rem .2rem 2.2rem; font-size: .95rem; }
.svc-line .money.small::before { left: .6rem; font-size: .85rem; }
.total-f input { font-size: 1.4rem; font-weight: 800; }
.svc-line .money.small { width: 8.5rem; }
.svc-line .money.small input { width: 100%; }
.appt-items { margin: .3rem 0; }
.appt-items > div { display: flex; justify-content: space-between; gap: .5rem; padding: .15rem 0; }

/* ---------- Vender: item sem cadastro ---------- */
.cl-name { flex: 1; min-width: 0; min-height: 2.5rem !important; padding: .3rem .6rem !important; font-weight: 700; }
.cl-tag { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; font-size: .82rem; }
.chip.mini-chip { min-height: 2rem; padding: .2rem .6rem; font-size: .82rem; }

/* ---------- Agenda: mês ---------- */
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.mcal-w { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding-bottom: .1rem; }
.mcal-d { position: relative; aspect-ratio: 1; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); min-width: 0; }
.mcal-d.out { background: none; border: 0; }
.mcal-d b { font-size: .95rem; }
.mcal-d i { font-style: normal; font-size: .72rem; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; min-width: 1.3rem; padding: 0 .3rem; line-height: 1.3rem; text-align: center; margin-top: .1rem; }
.mcal-d em { position: absolute; top: .1rem; right: .15rem; font-style: normal; font-size: .7rem; }
.mcal-d.busy { background: var(--brand-soft); border-color: transparent; }
.mcal-d.today { border: 2px solid var(--brand); }
.mcal-d.past { opacity: .5; }
.mcal-d.closed:not(.busy) { background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(0,0,0,.04) 4px, rgba(0,0,0,.04) 8px); }
.viewtoggle { grid-template-columns: repeat(3, 1fr) !important; display: grid; }
.mcal-d i.pend { background: var(--warn); }
.cl-desc { width: 100%; min-height: 2.4rem !important; padding: .25rem .6rem !important; font-size: .92rem; margin-top: .35rem; }
.cl-desc-open { display: block; font-size: .85rem; padding: .15rem 0; }

/* ---------- Mais: menu ---------- */
.mi-badge { flex: 0 0 auto; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: 999px; background: var(--brand); color: #fff; font-style: normal; font-weight: 800; font-size: .8rem; display: grid; place-items: center; }
.mi-badge.alert { background: var(--warn); }
.pk-bar { flex: 0 0 3.5rem; height: .5rem; background: var(--line); border-radius: 999px; overflow: hidden; }
.pk-bar i { display: block; height: 100%; background: var(--ok); }

/* ---------- Relatórios ---------- */
.rep-dates { gap: .5rem; margin-top: .4rem; }
.rep-dates label { flex: 1; font-weight: 700; font-size: .9rem; display: flex; flex-direction: column; gap: .2rem; }
.report { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.rep-head { display: flex; flex-direction: column; border-bottom: 2px solid var(--brand); padding-bottom: .5rem; margin-bottom: .4rem; }
.rep-head b { font-size: 1.2rem; }
.rep-head small { color: var(--muted); }
.rsec h2 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.rcell { border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; }
.rcell span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.rcell b { font-size: 1rem; }
.rcell b.ok { color: var(--ok); } .rcell b.bad { color: var(--bad); }
.rtable { width: 100%; border-collapse: collapse; font-size: .88rem; }
.rtable th, .rtable td { padding: .35rem .3rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.rtable th { font-size: .78rem; color: var(--muted); }
.rtable .n { text-align: right; white-space: nowrap; }
.rtable tfoot td { font-weight: 800; border-top: 2px solid var(--line); border-bottom: 0; }
.rtable small { color: var(--warn); }

@media print {
  #top, #tabs, .fabs, .no-print, #toast, .sheet-bg { display: none !important; }
  body { background: #fff !important; padding: 0 !important; font-size: 11pt; }
  main { max-width: none !important; padding: 0 !important; }
  .report { border: 0; padding: 0; }
  .rsec { break-inside: avoid-page; }
  .rtable tr { break-inside: avoid; }
  details > summary { display: none; }
  @page { margin: 14mm; }
}
.svcfilter { margin: 0 0 .6rem; }
.svcfilter select { min-height: 2.8rem; font-weight: 600; }
/* relatório: cabe na tela do celular */
.report { overflow: hidden; }
.rwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -.2rem; }
.rtable { font-size: .82rem; }
.rtable th, .rtable td { padding: .35rem .25rem; word-break: break-word; }
.rtable td:first-child { min-width: 4.5rem; }
.checkline { display: flex !important; align-items: center; gap: .5rem; font-weight: 600 !important; margin-top: .6rem; }
.checkline input { width: 1.3rem; height: 1.3rem; min-height: 0; }
.rep-filters .field { margin-bottom: .9rem; }
@media print { .report { overflow: visible; } .rwrap { overflow: visible; } }
.rtable th { white-space: normal !important; line-height: 1.15; vertical-align: bottom; }
.rtable td:first-child { min-width: 0; }
.rtable th { word-break: keep-all; overflow-wrap: normal; }
.rtable td:first-child { word-break: normal; overflow-wrap: anywhere; }
.rtable td:first-child { word-break: normal; overflow-wrap: anywhere; }

/* Relatório em tela cheia (como uma folha) */
.preview { position: fixed; inset: 0; z-index: 50; background: #6b6b6b; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 3.6rem .6rem 1.5rem; }
.preview-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 51; display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; background: #333; }
.preview-bar .btn.small { width: auto; }
.preview-page { background: #fff; color: #222; max-width: 820px; margin: 0 auto; padding: 1rem .9rem; border-radius: 4px; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
@media print { .preview { display: none !important; } }

/* ---------- Ficha da cliente ---------- */
.note-full { background: var(--warn-soft); border-left: 5px solid var(--warn); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .8rem; }
.note-full p { margin: .35rem 0 0; font-size: 1rem; white-space: pre-line; }
.nextcard { position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit; margin-bottom: .8rem; border-left: 5px solid var(--brand); }
.nextcard small { color: var(--brand); font-weight: 700; font-size: .82rem; }
.nextcard b { font-size: 1.15rem; }
.nextcard span { color: var(--muted); }
.nextcard i { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 1.3rem; }
.nextcard.none { border-left-color: var(--line); }
.nextcard.none .btn { align-self: flex-start; margin-top: .5rem; width: auto; }
.owebox { border-color: var(--warn); background: var(--warn-soft); margin-bottom: .8rem; }
.owebox b { color: var(--warn); font-size: 1.05rem; }
.latebox { display: flex; flex-direction: column; gap: .3rem; border-color: var(--brand); background: var(--brand-soft); margin-bottom: .8rem; }
.latebox .btn { align-self: flex-start; width: auto; }
.ex-row .ex-list { text-align: right; line-height: 1.35; }
.dr-info b .flag { font-size: .85rem; margin-left: .3rem; }
.flag-legend { text-align: center; font-size: .8rem; color: var(--muted); margin: .5rem 0 0; }
/* Agenda: escolher o que ver (campo) + dia */
.agtop { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: stretch; margin-bottom: 1rem; }
.agtop select { min-height: 0; height: 100%; width: auto; font-weight: 700; color: var(--brand); border: 2px solid var(--line); border-radius: var(--radius); padding: 0 .6rem; background-color: #fff; }
.agtop .daypick { margin-bottom: 0; min-width: 0; }
.agtop .daypick span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agtop select { padding: 0 .4rem; }
.agtop .daypick { padding: .7rem .8rem; gap: .4rem; }
.agtop .daypick em { font-size: 1.1rem; }
