/* EstagiZap — mesma família visual do OrçarIA (azul brand, slate, Plus Jakarta Sans). Tokens em design-system/estagizap/MASTER.md */
:root {
  --primary: #2563eb; --primary-hover: #1d4ed8; --primary-soft: #eff6ff; --primary-ink: #1d4ed8; --on-primary: #fff;
  --brand-ink: #172554; --hero-from: #2563eb; --hero-to: #172554; --on-hero: #fff; --hero-btn: #1d4ed8;
  --wa: #25d366; --on-wa: #0f172a;
  --good: #047857; --good-soft: #d1fae5;
  --warn: #92400e; --warn-soft: #fef3c7; --danger: #b91c1c; --danger-soft: #fee2e2;
  --bg: #f8fafc; --fg: #0f172a; --card: #fff; --muted: #f1f5f9; --muted-fg: #475569; --border: #e2e8f0; --border-strong: #cbd5e1;
  --wa-bg: #efeae2; --wa-in: #d9fdd3; --wa-out: #fff; --wa-head: #075e54;
  --r-sm: 12px; --radius: 16px; --r-lg: 24px;
  --shadow: 0 1px 3px rgb(15 23 42 / .08), 0 1px 2px -1px rgb(15 23 42 / .08);
  --shadow-primary: 0 1px 3px rgb(37 99 235 / .3);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
/* Light is the default (like OrçarIA); dark only when the user picks it (cookie → data-theme on <html>). */
:root[data-theme="dark"] {
    --primary: #60a5fa; --primary-hover: #93c5fd; --primary-soft: #172554; --primary-ink: #bfdbfe; --on-primary: #0b1220;
    --brand-ink: #e2e8f0; --hero-from: #1d4ed8; --hero-to: #172554; --hero-btn: #1d4ed8;
    --good: #34d399; --good-soft: #052e22;
    --warn: #fbbf24; --warn-soft: #3a2a06; --danger: #f87171; --danger-soft: #3f1414;
    --bg: #0b1220; --fg: #e2e8f0; --card: #131c2e; --muted: #1e293b; --muted-fg: #94a3b8; --border: #273449; --border-strong: #3b4a61;
    --wa-bg: #0b141a; --wa-in: #005c4b; --wa-out: #202c33; --wa-head: #202c33;
    --shadow: none; --shadow-primary: none; color-scheme: dark;
}
.theme-btn { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--card); color: var(--muted-fg); text-decoration: none; }
.theme-btn:hover { color: var(--fg); background: var(--muted); }
.topbar .theme-btn { margin-left: auto; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(1.4rem, 4vw, 1.85rem); }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; font-weight: 700; }
a { color: var(--primary-ink); }
small { display: block; color: var(--muted-fg); font-size: .85rem; }
code { background: var(--muted); padding: .1em .35em; border-radius: 6px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 99; background: var(--card); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--primary-ink); outline-offset: 2px; }
.muted { color: var(--muted-fg); }
.grow { flex: 1; min-width: 0; }

/* ---------- marca ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; color: var(--brand-ink); text-decoration: none; }
.wordmark svg { width: 1.6em; height: 1.6em; flex: none; }
.wordmark em { font-style: normal; color: var(--primary-ink); }

/* ---------- shell: topo + nav inferior no celular, sidebar no desktop ---------- */
.shell { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 0; max-width: 1100px; margin: 0 auto; }
.pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 12px; border-radius: 999px; background: var(--muted); color: var(--muted-fg); font-size: .8rem; font-weight: 600; }
.main { width: 100%; padding: 16px 16px 110px; max-width: 1100px; margin: 0 auto; }
.nav { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; background: var(--card); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 60px; justify-content: center; min-width: 0;
  font-size: .72rem; font-weight: 600; color: var(--muted-fg); text-decoration: none; transition: color .15s; }
.nav a .i { width: 32px; height: 24px; padding: 2px 6px; border-radius: 999px; box-sizing: content-box; transition: background .15s; }
.nav a[aria-current] { color: var(--primary-ink); }
.nav a[aria-current] .i { background: var(--primary-soft); }
.nav a:hover { color: var(--fg); }
.brand { display: none; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 248px 1fr; }
  .topbar { display: none; }
  .nav { position: sticky; top: 0; height: 100vh; flex-direction: column; gap: 4px; padding: 20px 12px; border: 0; border-right: 1px solid var(--border); }
  .nav a { flex: none; flex-direction: row; gap: 10px; justify-content: flex-start; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font-size: .95rem; }
  .nav a .i { width: 20px; height: 20px; padding: 0; }
  .nav a:hover { background: var(--muted); }
  .nav .wordmark, .nav .wordmark:hover { padding: 0; font-size: 1.15rem; color: var(--brand-ink); background: none; }
  .nav a[aria-current] { background: var(--primary-soft); }
  .nav a[aria-current] .i { background: none; }
  .brand { display: block; padding: 4px 8px 20px; }
  .brand .pill { display: inline-block; max-width: 100%; margin-top: 10px; }
  .main { padding: 32px 32px 48px; }
}

/* ---------- blocos ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.eyebrow { margin: 0 0 4px; color: var(--muted-fg); font-size: .9rem; font-weight: 600; }
.head-side { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero { border-radius: var(--r-lg); padding: 20px; color: var(--on-hero); background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); box-shadow: 0 10px 24px -8px rgb(23 37 84 / .35); }
.hero .eyebrow { display: flex; gap: 6px; align-items: center; color: var(--on-hero); }
.hero .eyebrow .i { width: 16px; height: 16px; }
.hero h1 { color: var(--on-hero); }
.hero .btn { background: #fff; border-color: #fff; color: var(--hero-btn); /* button is always white */ font-weight: 800; box-shadow: none; }
.hero .btn:hover { background: #eff6ff; filter: none; }
@media (max-width: 599px) { .hero .btn { width: 100%; min-height: 48px; } }
.section-title { display: flex; gap: 8px; align-items: center; margin: 28px 0 12px; }
.section-title .i { color: var(--primary-ink); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.cards .card { margin: 0; }
.empty { color: var(--muted-fg); padding: 12px 0; }
.hint { color: var(--muted-fg); font-size: .85rem; }
.link { font-weight: 700; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; min-height: 44px; }
.link:hover { text-decoration: underline; }
.flash { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); margin: 0 0 16px; font-weight: 600; }
.flash.ok { background: var(--good-soft); color: var(--good); }
.flash.err { background: var(--danger-soft); color: var(--danger); }

.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: var(--card); color: var(--fg); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, filter .15s, transform .1s; }
.btn:hover { background: var(--muted); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary-ink); color: var(--on-primary); font-weight: 700; box-shadow: var(--shadow-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.accent { background: var(--wa); border-color: var(--wa); color: var(--on-wa); font-weight: 700; }
.btn.accent:hover { filter: brightness(.95); }
.btn.good { color: var(--good); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--primary-ink); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.sm { min-height: 44px; padding: 0 12px; font-size: .85rem; }
.icon-btn { width: 44px; padding: 0; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
@media (min-width: 700px) { .stats { max-width: 640px; } }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat span { color: var(--muted-fg); font-size: .8rem; font-weight: 600; }
.stat b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat.warn b { color: var(--warn); }
.stat.good b { color: var(--good); }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--muted); color: var(--muted-fg); }
.chip.atrasado, .chip.faltou { background: var(--warn-soft); color: var(--warn); }
.chip.agendado, .chip.marcado, .chip.respondeu { background: var(--primary-soft); color: var(--primary-ink); }
.chip.feito, .chip.agendou, .chip.em { background: var(--good-soft); color: var(--good); }
.chip.cancelado { background: var(--danger-soft); color: var(--danger); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 0 6px; border-radius: 6px; background: var(--muted); color: var(--muted-fg); text-transform: uppercase; letter-spacing: .03em; }

.list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.row { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row.top { align-items: flex-start; }
.row time { font-weight: 800; min-width: 3.2em; }
.row.status-cancelado b { text-decoration: line-through; opacity: .7; }
.avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); font-weight: 800; font-size: .85rem; }
.quote { margin: 6px 0 0; color: var(--muted-fg); font-size: .9rem; }

/* sugestões */
.insight-head { display: flex; gap: 12px; margin-bottom: 12px; }
.insight-head p { margin: 4px 0 0; color: var(--muted-fg); font-size: .92rem; }
.badge-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary-ink); }
.insight.reativacao .badge-icon { background: var(--warn-soft); color: var(--warn); }
.insight.postagem .badge-icon { background: var(--good-soft); color: var(--good); }
.pick { list-style: none; padding: 0; margin: 0 0 12px; max-height: 320px; overflow: auto; }
.pick li { padding: 8px 0; border-top: 1px solid var(--border); }
.pick label { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.pick input { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary-ink); }
.pick details summary { font-size: .85rem; font-weight: 600; color: var(--primary-ink); cursor: pointer; margin-left: 30px; min-height: 32px; display: flex; align-items: center; }
.pick .bubble { margin: 8px 0 0 30px; }

/* agenda: grade de horários como a do celular (horas à esquerda, uma coluna por equipe ou por dia) */
.day-nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cal { --h: 60px; --tw: 52px; --minw: 120px; overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.cal-head, .cal-body { display: grid; grid-template-columns: var(--tw) repeat(var(--n), minmax(var(--minw), 1fr)); min-width: calc(var(--tw) + var(--n) * var(--minw)); }
.cal-head { border-bottom: 1px solid var(--border); }
.cal-colhead { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 8px; border-left: 1px solid var(--border); text-align: center; min-width: 0; }
.cal-colhead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-colhead .avatar, .cal-colhead .team-photo { width: 32px; height: 32px; }
.cal-colhead small { text-transform: uppercase; font-weight: 700; font-size: .72rem; }
.cal-colhead.today b { color: var(--primary-ink); }
.cal-head:has(small) .cal-colhead { flex-direction: column; gap: 0; }
.cal-head:has(small) .cal-colhead.today b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.cal-times { position: sticky; left: 0; z-index: 2; background: var(--card); }
.cal-times span { display: block; height: var(--h); padding-right: 8px; text-align: right; font-size: .75rem; color: var(--muted-fg); transform: translateY(-.6em); }
.cal-times span:first-child { transform: none; }
.cal-col { position: relative; height: calc(var(--rows) * var(--h)); border-left: 1px solid var(--border);
  background: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px var(--h)); }
.cal-add { position: absolute; inset: 0; }
.cal-add:hover { background: var(--muted); opacity: .5; }
.cal-now { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--t) * var(--h) / 60); border-top: 2px solid var(--danger); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.ev { --c: var(--primary); position: absolute; z-index: 1; overflow: hidden; text-align: left; font: inherit; color: var(--fg); cursor: pointer;
  top: calc(var(--t) * var(--h) / 60 + 1px); height: calc(var(--len) * var(--h) / 60 - 2px);
  left: calc(2px + (100% - 4px) * var(--lane) / var(--lanes)); width: calc((100% - 4px) / var(--lanes) - 2px);
  padding: 4px 8px; border: 0; border-left: 4px solid var(--c); border-radius: 8px; background: color-mix(in srgb, var(--c) 16%, var(--card));
  font-size: .8rem; line-height: 1.25; }
.ev:hover { background: color-mix(in srgb, var(--c) 26%, var(--card)); }
.ev time { font-weight: 800; }
.ev small { font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.status-feito { --c: var(--good); }
.ev.status-faltou { --c: var(--warn); }
.ev.status-cancelado { opacity: .55; text-decoration: line-through; }
.ev-pop { width: min(92vw, 380px); padding: 20px; border: 1px solid var(--border); color: var(--fg); }
.ev-pop::backdrop { background: rgb(15 23 42 / .35); }
.ev-pop h2 { margin-bottom: 4px; }
.ev-pop p { margin: 0 0 4px; }
.ev-pop form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
@media (max-width: 599px) { .cal { --tw: 44px; --minw: 104px; --h: 56px; } }

/* agendamento (painel e site), no estilo do Calendly: serviço → dia e hora → nome e WhatsApp */
.bk-services, .bk-summary, .bk-cal, .bk-times { --bk-bg: var(--card); --bk-line: var(--border); --bk-fg: var(--fg); }
.bk-services { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 640px; }
.bk-service { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; border: 1px solid var(--bk-line); border-radius: var(--radius);
  background: var(--bk-bg); color: var(--bk-fg); text-decoration: none; transition: border-color .15s; }
.bk-service:hover { border-color: var(--primary); }
.bk-price { font-weight: 700; white-space: nowrap; }
.bk-summary { display: flex; align-items: center; gap: 12px; max-width: 760px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--bk-line); border-radius: var(--radius); background: var(--bk-bg); color: var(--bk-fg); }
.bk-pick { display: grid; gap: 16px; max-width: 760px; }
@media (min-width: 700px) { .bk-pick { grid-template-columns: 1fr 240px; align-items: start; } }
.bk-cal, .bk-times { padding: 16px; border: 1px solid var(--bk-line); border-radius: var(--radius); background: var(--bk-bg); color: var(--bk-fg); }
.bk-month { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bk-pick .bk-month h2, .bk-pick .bk-times h2 { font-size: 1.1rem; max-width: none; } /* beats the site's big section titles */
.bk-month h2 { text-transform: capitalize; }
.bk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.bk-grid > span:not(.bk-day) { font-size: .75rem; font-weight: 700; opacity: .6; padding: 4px 0; }
.bk-day { display: grid; place-items: center; aspect-ratio: 1; max-height: 48px; min-height: 40px; margin: auto; width: 100%; max-width: 48px; border-radius: 50%; font-weight: 700; text-decoration: none; }
a.bk-day { color: var(--primary-ink); background: color-mix(in srgb, var(--primary) 14%, transparent); }
a.bk-day:hover { background: color-mix(in srgb, var(--primary) 26%, transparent); }
a.bk-day.sel { background: var(--primary); color: var(--on-primary); }
.bk-day.off { opacity: .35; font-weight: 500; }
.bk-times h2 { margin-bottom: 12px; }
.bk-times { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.bk-times > h2, .bk-times > .empty { grid-column: 1 / -1; }
/* desktop: the times column is as tall as the calendar (contain: size keeps it from stretching the row) and scrolls */
@media (min-width: 700px) { .bk-times { grid-template-columns: 1fr; align-self: stretch; contain: size; overflow: hidden auto; scrollbar-width: thin; align-content: start; } }
.bk-time { display: grid; place-items: center; min-height: 48px; border: 1.5px solid var(--primary); border-radius: var(--r-sm); color: var(--primary-ink); font-weight: 700; text-decoration: none; }
.bk-time:hover { background: var(--primary); color: var(--on-primary); }
.bk-form { max-width: 760px; }
.bk-confirm { width: 100%; min-height: 52px; margin-top: 8px; }

/* formulários */
.form h2 { margin-bottom: 12px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 700; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { font-weight: 600; font-size: .9rem; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 10px 12px; min-height: 44px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-ink); box-shadow: 0 0 0 3px rgb(37 99 235 / .2); }
input::placeholder, textarea::placeholder { color: var(--muted-fg); }
textarea { resize: vertical; }
.grid2, .grid3 { display: grid; gap: 0 16px; }
@media (min-width: 700px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 2fr 1fr 1fr; } }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.choices.days, .choices.times { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; padding: 10px 12px; border: 1.5px solid var(--border-strong); border-radius: var(--r-sm); background: var(--card); min-height: 44px; transition: border-color .15s, background .15s; }
.choice:hover span { border-color: var(--primary-ink); }
.choice input:checked + span { border-color: var(--primary-ink); background: var(--primary-soft); }
.choice input:focus-visible + span { outline: 3px solid var(--primary-ink); outline-offset: 2px; }
.new-client { margin-bottom: 16px; }
.new-client summary { cursor: pointer; font-weight: 700; color: var(--primary-ink); min-height: 44px; display: flex; align-items: center; }
.inline { display: flex; gap: 8px; align-items: flex-end; }
.inline .btn { margin-bottom: 12px; }
.plain { list-style: none; padding: 0; margin: 0 0 12px; }
.plain li { display: flex; gap: 8px; align-items: center; padding: 6px 0; flex-wrap: wrap; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.tabs a { display: inline-flex; align-items: center; white-space: nowrap; padding: 0 14px; min-height: 44px; border-radius: 999px; background: var(--card); border: 1px solid var(--border-strong); color: var(--fg); text-decoration: none; font-weight: 600; font-size: .9rem; }
.tabs a:hover { border-color: var(--primary-ink); }
.tabs a[aria-current] { background: var(--primary); border-color: var(--primary-ink); color: var(--on-primary); }

.row-actions { position: relative; }
.row-actions summary { list-style: none; }
.row-actions summary::-webkit-details-marker { display: none; }
.pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(300px, 80vw); display: grid; gap: 8px; padding: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(15 23 42 / .15); }
.pop form { display: grid; gap: 6px; }
.clients .row { flex-wrap: wrap; }
@media (max-width: 699px) { .clients .grow { flex-basis: calc(100% - 52px); } .clients .chip { margin-left: 52px; } .clients .row-actions { margin-left: auto; } }

.bubble { max-width: 82%; margin: 0; padding: 8px 10px 4px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgb(0 0 0 / .08);
  background: var(--wa-out); color: var(--fg); align-self: flex-start; font-size: .95rem; }
.bubble time { display: block; text-align: right; font-size: .7rem; color: var(--muted-fg); margin-top: 2px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .btn:active { transform: none; } }


/* client branding: logo, team photos, palette */
.pill { display: inline-flex; align-items: center; gap: 6px; }
.biz-logo { width: 20px; height: 20px; border-radius: 6px; object-fit: contain; background: #fff; }
.brand-current { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.biz-logo-lg, .logo-empty { flex: none; width: 88px; height: 88px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; object-fit: contain; padding: 6px; }
.logo-empty { display: grid; place-items: center; background: var(--muted); color: var(--muted-fg); font-weight: 800; font-size: 1.4rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { width: 48px; height: 48px; border-radius: 50%; background: var(--sw); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--border); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--primary); }
.swatch input:focus-visible + span { outline: 3px solid var(--primary-ink); outline-offset: 3px; }
.swatch code { font-size: .75rem; }
.team-photo { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.team-head { display: inline-flex; align-items: center; gap: 10px; }
.teams li { gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.teams li:first-child { border-top: 0; }
.photo-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; }
.photo-form input[type=file] { flex: 1; min-width: 0; min-height: 44px; padding: 8px; font-size: .85rem; }
img.avatar.wa { object-fit: contain; background: #fff; padding: 2px; }

/* client logo replaces the EstagiZap mark once uploaded */
.wordmark.client { gap: 10px; min-width: 0; }
.wordmark.client img { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #fff; border: 1px solid var(--border); }
.wordmark.client > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.wordmark.client b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.wordmark.client small { font-size: .72rem; font-weight: 600; color: var(--muted-fg); letter-spacing: 0; }
.wordmark.client small em { font-style: normal; color: var(--primary-ink); }
.svc-list li { display: block; padding: 0; border-bottom: 1px solid var(--border); }
.svc-edit summary { display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; list-style: none; }
.svc-edit summary::-webkit-details-marker { display: none; }
.svc-edit[open] summary .link { visibility: hidden; }
.svc-edit form { padding: 4px 0 16px; }
.svc-edit .row-actions { display: flex; gap: 8px; justify-content: space-between; }
.rename-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.rename-form input[name="phone"] { flex: 1 1 150px; font-weight: 400; }
.rename-form input { min-width: 0; font-weight: 700; }

/* Ajustes → Seu site */
.site-card-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.site-card-head h2 { margin-bottom: 4px; }
.plan { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); margin-bottom: 16px; }
.plan.on { border-style: solid; border-color: var(--good); background: var(--good-soft); }
.plan b { display: inline-flex; gap: 6px; align-items: center; }
.ai-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ai-row .hint { margin: 0; }
.gal-title { margin: 20px 0 10px; }
.gal-title small { display: inline; font-weight: 500; margin-left: 6px; }
.gal-admin { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin-bottom: 10px; }
.gal-admin figure { position: relative; margin: 0; }
.gal-admin img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }
.gal-admin form { position: absolute; top: 4px; right: 4px; }
.gal-admin .btn { background: var(--card); min-height: 36px; width: 36px; padding: 0; }
.topbar .theme-btn + .theme-btn { margin-left: 0; }
.nav .nav-site, .nav .nav-theme { display: none; }
@media (min-width: 900px) { .nav .nav-site { display: flex; margin-top: auto; } .nav .nav-theme { display: flex; } }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--primary); }
.field.bio input { font-weight: 700; color: var(--primary-ink); background: var(--primary-soft); }
.field.bio span { display: inline-flex; gap: 6px; align-items: center; }

/* login + admin */
.auth { min-height: 100vh; }
.auth-main { max-width: 1000px; margin: 0 auto; padding: 32px 16px 64px; }
.auth-main > .wordmark { margin-bottom: 24px; }
.auth-card { max-width: 420px; margin: 8vh auto 0; }
.auth-card h1 { margin-bottom: 6px; }
.new-owner { border-color: var(--good); }
.handoff { white-space: pre-wrap; background: var(--muted); padding: 14px; border-radius: var(--r-sm); font-size: .95rem; user-select: all; }
.admin .row form { display: inline; }
.acting { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--fg); font-size: .9rem; }
.acting span { flex: 1; min-width: 0; }
.nav-out { display: none; }
.nav-out button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--muted-fg); font: 600 .95rem var(--font); cursor: pointer; }
.nav-out button:hover { background: var(--muted); color: var(--fg); }
@media (min-width: 900px) { .nav .nav-out { display: block; } }
.s-ctas { display: flex; flex-wrap: wrap; gap: 8px; }
.owner-form { display: inline-flex !important; gap: 6px; } .owner-form input { min-height: 36px; padding: 4px 10px; width: 200px; }

/* ---------- simple settings: one collapsible card per topic ---------- */
.fold { padding: 0; max-width: 820px; }
.fold > summary { display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 64px; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary > span { flex: 1; display: grid; gap: 2px; min-width: 0; }
.fold > summary b { font-size: 1.05rem; }
.fold > summary small { color: var(--muted-fg); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted-fg); border-bottom: 2px solid var(--muted-fg); transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.fold > summary:focus-visible { outline: 3px solid var(--primary-ink); outline-offset: -3px; border-radius: var(--radius); }
.fold > :not(summary) { margin-left: 16px; margin-right: 16px; }
.fold > :last-child { margin-bottom: 16px; }
.fold .s-ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sub { margin: 4px 0 16px; border-top: 1px solid var(--border); }
.sub > summary { cursor: pointer; font-weight: 700; color: var(--primary-ink); min-height: 44px; display: flex; align-items: center; }
.grid2.keep { grid-template-columns: 1fr 1fr; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--primary-ink); outline-offset: 2px; }
.team-edit { display: grid; gap: 8px; min-width: 0; }
.teams li { align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }

/* conversations handed to a person */
.waiting { border-color: var(--warn); }
.waiting h2 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 1.05rem; }
.waiting li { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.waiting .bubble { margin-top: 6px; max-width: 100%; }
.reply-form { display: grid; gap: 8px; }
.reply-form .s-ctas { display: flex; flex-wrap: wrap; gap: 8px; }
