/* ConverteZap: sistema visual "Ferramenta azul".
   Superfícies brancas, azul só em ações, cantos pequenos e densidade de ferramenta de trabalho. Só tema claro. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --surface-3: #e8ebef;
  --side: #f6f7f9;
  --line: #e4e7ec;
  --line-soft: #eff1f4;
  --line-strong: #d3d8e0;
  --ink: #1a2029;
  --ink-2: #454e5b;
  --muted: #626b78;
  --primary: #1f64d8;
  --primary-hover: #1a55b8;
  --primary-ink: #ffffff;
  --brand: #1f64d8;
  --brand-strong: #1a55b8;
  --brand-soft: #edf3fd;
  --brand-soft-ink: #1a55b8;
  --ok: #0f7a56;
  --ok-soft: #e6f4ee;
  --danger: #c0392b;
  --danger-soft: #fbecea;
  --warn: #8a5a00;
  --warn-soft: #fdf7e3;
  --info-soft: #edf3fd;
  --info-ink: #1a55b8;
  --series-1: #1f64d8;
  --series-2: #0f8a6a;
  --r: 6px;
  --r-lg: 8px;
  --shadow: none;
  --shadow-lg: 0 8px 28px rgba(26, 32, 41, .14);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: var(--sans);
  color-scheme: light;
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1 { font-size: 22px; line-height: 1.2; margin: 0; letter-spacing: -.01em; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 2px; font-weight: 700; }
h3 { font-size: 15px; margin: 0 0 12px; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-strong); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
.muted { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.hidden { display: none !important; }
.error { color: var(--danger); min-height: 1.3em; margin: 6px 0; font-size: 13px; }
svg.i { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono, .ag-time, .next-appts .when b, .ag-day-head b, td.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .92em; }

/* Marca */
.brand { display: flex; align-items: center; font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand > span:not(.badge) { color: inherit; }
.brand .badge { margin-left: 4px; }

/* Assinatura no rodapé */
.credit { text-align: center; font-size: 12.5px; color: var(--muted); padding: 24px 16px 12px; }
.credit strong { color: var(--ink-2); font-weight: 700; }

/* Formulários */
label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 16px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: inherit; transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.switch input { appearance: none; width: 38px; height: 22px; margin: 0; border-radius: 11px; background: var(--surface-3); border: 0; position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:focus { box-shadow: none; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 9px 15px; border-radius: var(--r); font: inherit; font-weight: 700; cursor: pointer;
  transition: background .12s, border-color .12s; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg.i { width: 15px; height: 15px; }
.link { background: none; border: 0; color: var(--brand-strong); cursor: pointer; font: inherit; font-weight: 700; padding: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Etiquetas de estado: pílulas suaves */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.badge:has(.dot)::before, .badge:has(svg)::before, .badge:empty::before { display: none; }
.badge:empty { display: none; }
.badge .dot { width: 6px; height: 6px; }
.badge svg.i { width: 13px; height: 13px; }
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.ok::before { background: var(--ok); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.warn::before { background: var(--warn); }
.badge.err { color: var(--danger); background: var(--danger-soft); }
.badge.err::before { background: var(--danger); }
.badge.info { color: var(--info-ink); background: var(--info-soft); }
.badge.info::before { background: var(--info-ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-hero { background: var(--surface-2); color: var(--ink); padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h2 { font-size: 32px; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 700; max-width: 480px; }
.auth-hero p { color: var(--ink-2); max-width: 440px; font-size: 15.5px; }
.auth-hero ul { list-style: none; padding: 0; margin: 32px 0 0; max-width: 440px; display: grid; gap: 10px; }
.auth-hero li { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 500; }
.auth-hero li svg { width: 18px; height: 18px; color: var(--brand-strong); }
.auth-hero .small { color: var(--ink-2); }
.auth-main { display: flex; flex-direction: column; padding: 28px 24px; background: var(--surface); }
.auth-top { display: flex; justify-content: space-between; align-items: center; }
.auth-card { width: 100%; max-width: 360px; margin: auto; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card form { margin-top: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Estrutura do app */
.layout { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid var(--line); color: var(--ink-2); padding: 18px 10px 14px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 0 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--r); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a svg { color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--brand-strong); background: var(--brand-soft); font-weight: 600; }
.nav a.active svg { color: var(--brand-strong); }
.nav .status { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.nav .status.on { background: var(--ok); }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-foot::before { content: attr(data-initials); width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.side-foot:not([data-initials])::before { display: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who div:first-child { color: var(--ink); font-weight: 700; }
.side-foot button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.side-foot button:hover { color: var(--ink); background: var(--surface-2); }
.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main-col .content { flex: 1; }
.content { padding: 32px 36px 44px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 640px; }

/* Painéis */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow); }
.card + .card, .grid-2 + .card, .card + .grid-2, form > .card + .card { margin-top: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: start; }
.grid-2 > .card { margin-top: 0; }
form.card, form > .card { max-width: 820px; }

/* Indicadores: um painel com divisórias */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.stats:empty { display: none; }
.stat { padding: 16px 18px 17px; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: 0; }
.stat .top { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .small { margin-top: 2px; color: var(--brand-strong); font-weight: 700; font-size: 12.5px; }

/* Checklist */
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); margin: 0 0 8px; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li + li { border-top: 1px solid var(--line-soft); }
.steps a { display: flex; align-items: center; gap: 12px; padding: 11px 6px; margin: 0 -6px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; }
.steps a:hover { background: var(--surface-2); }
.steps .check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex-shrink: 0; }
.steps .done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .done .check svg { width: 12px; height: 12px; stroke-width: 3; }
.steps .done span.t { color: var(--muted); font-weight: 400; }
.steps .go { margin-left: auto; color: var(--muted); }

/* Gráfico */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .legend { display: flex; gap: 18px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: var(--surface-2); }
.tooltip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: var(--r); padding: 9px 11px; font-size: 12.5px; min-width: 130px; transform: translate(-50%, -100%); z-index: 2; }
.tooltip b { display: block; margin-bottom: 4px; }
.tooltip div { display: flex; justify-content: space-between; gap: 14px; color: var(--ink-2); }
.tooltip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* Opções de escolha (modelo de negócio, especialidade, modo) */
.radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; display: inline-grid; place-items: center; background: var(--surface); }
.selected .radio { border-color: var(--brand); }
.selected .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; text-align: left; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 16px 18px; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, background .12s; }
.choice .radio { margin-top: 2px; grid-row: span 2; }
.choice:hover { border-color: var(--line-strong); }
.choice.selected { border-color: var(--brand); background: var(--brand-soft); }
.choice strong { display: block; font-size: 15px; font-weight: 700; }
.choice span:not(.radio) { color: var(--muted); font-size: 13px; }
.choice.selected span:not(.radio) { color: var(--ink-2); }
.specialties { display: flex; flex-wrap: wrap; gap: 8px; }
.spec { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 22px; background: var(--surface); padding: 7px 14px 7px 11px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink-2); text-align: left; }
.spec svg.i { width: 16px; height: 16px; color: var(--muted); }
.spec:hover { border-color: var(--line-strong); color: var(--ink); }
.spec.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.spec.selected svg.i { color: var(--brand-strong); }
.section-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 22px 0 10px; }

/* WhatsApp (QR) */
.qr-box { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.qr-frame { width: 260px; height: 260px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; display: grid; place-items: center; padding: 12px; position: relative; overflow: hidden; }
.qr-frame img { width: 100%; height: 100%; }
.qr-frame.empty { background: var(--surface-2); color: var(--muted); text-align: center; padding: 24px; font-size: 13px; }
.qr-frame .big { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-strong); margin: 0 auto 12px; display: grid; place-items: center; }
.qr-frame .big svg { width: 26px; height: 26px; }
.howto { counter-reset: s; list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.howto li { display: flex; gap: 12px; align-items: center; color: var(--ink-2); }
.howto li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; flex-shrink: 0; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { color: var(--muted); font-weight: 700; font-size: 12.5px; border-bottom-color: var(--line); }
tr:last-child td { border-bottom: 0; }
.empty-state { padding: 36px 16px; color: var(--muted); text-align: center; }
.empty-state .big { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-strong); margin: 0 auto 12px; display: grid; place-items: center; }
.empty-state .big svg { width: 24px; height: 24px; }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 2px; font-weight: 700; }

.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sticky-save { position: sticky; bottom: 12px; margin-top: 18px; padding: 12px 14px; max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: flex; justify-content: flex-end; gap: 10px; }

dialog { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); width: min(440px, calc(100% - 32px)); padding: 24px; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(17, 22, 20, .4); }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(90px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; transition: transform .2s; z-index: 20; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); font-weight: 700; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* Mídia nas mensagens (compartilhado com o admin) */
.wa-media { display: block; max-width: 320px; max-height: 340px; width: 100%; border-radius: 8px; object-fit: cover; background: rgba(0,0,0,.06); }
.wa-sticker { display: block; width: 150px; height: 150px; object-fit: contain; }
.wa-audio { display: block; width: 270px; max-width: 100%; height: 40px; }
.wa-doc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(0,0,0,.05); text-decoration: none; color: inherit; min-width: 220px; }
.wa-doc .ext { width: 32px; height: 38px; border-radius: 4px; background: #e8574a; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }

/* Agenda */
.ag-card { padding-top: 6px; }
.ag-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0 14px; }
.ag-nav { display: flex; align-items: center; gap: 6px; }
.ag-nav strong { margin-left: 10px; font-size: 16px; font-weight: 700; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: var(--r); }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; cursor: pointer; }
.seg button svg { width: 14px; height: 14px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ag-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ag-day { background: var(--surface-2); border-radius: 12px; min-height: 380px; display: flex; flex-direction: column; }
.ag-day.past { opacity: .7; }
.ag-day.today { background: var(--brand-soft); }
.ag-day-head { display: flex; align-items: baseline; gap: 6px; padding: 10px 10px 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: capitalize; }
.ag-day-head b { font-size: 18px; color: var(--ink); font-weight: 700; }
.ag-day.today .ag-day-head, .ag-day.today .ag-day-head b { color: var(--brand-strong); }
.ag-day-list { display: flex; flex-direction: column; gap: 6px; padding: 2px 6px 8px; }
.ag-free { color: var(--muted); font-size: 12px; padding: 4px 4px; }
.ag-item {
  display: grid; align-content: start; gap: 1px; text-align: left; width: 100%; cursor: pointer; font: inherit; color: var(--ink);
  background: var(--surface); border: 0; border-left: 3px solid var(--brand); border-radius: 8px; padding: 7px 9px 8px; box-shadow: 0 1px 2px rgba(31, 43, 38, .06);
}
.ag-item:hover { box-shadow: 0 2px 8px rgba(31, 43, 38, .12); }
.ag-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ag-time { font-size: 12px; font-weight: 700; color: var(--brand-strong); }
.ag-who { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-what { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.ag-tags:empty { display: none; }
.ag-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
.ag-tag svg { width: 12px; height: 12px; }
.ag-tags .badge { font-size: 11px; padding: 1px 7px; }
.ag-item.s-concluido { border-left-color: var(--info-ink); }
.ag-item.s-concluido .ag-time { color: var(--info-ink); }
.ag-item.s-faltou { border-left-color: var(--warn); }
.ag-item.s-faltou .ag-time { color: var(--warn); }
.ag-item.s-cancelado { border-left-color: var(--line-strong); color: var(--muted); box-shadow: none; background: transparent; }
.ag-item.s-cancelado .ag-time, .ag-item.s-cancelado .ag-what { color: var(--muted); }
.ag-item.s-cancelado .ag-who { text-decoration: line-through; font-weight: 600; }
.ag-group { padding: 14px 0 6px; }
.ag-group + .ag-group { border-top: 1px solid var(--line-soft); }
.ag-group-head { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.ag-group-head::first-letter { text-transform: uppercase; }
.ag-rows { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ag-rows .ag-item { background: var(--surface-2); box-shadow: none; }
.ag-rows .ag-item:hover { background: var(--surface-3); }
.ag-dialog { width: min(480px, calc(100% - 32px)); }
.ag-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.ag-dlg-head h3 { margin: 6px 0 0; font-size: 19px; }
form .ag-dlg-head h3 { margin-top: 0; }
.ag-facts { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin: 0 0 18px; }
.ag-facts dt { color: var(--muted); }
.ag-facts dd { margin: 0; color: var(--ink-2); }
.ag-facts dd::first-letter { text-transform: uppercase; }
.ag-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.row.three { grid-template-columns: 1.3fr 1fr 1fr; }
.next-appts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.next-appts li { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.next-appts .when { display: grid; width: 82px; flex-shrink: 0; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.next-appts .when b { font-size: 15px; font-weight: 700; color: var(--brand-strong); }
.next-appts .who { display: grid; flex: 1; min-width: 0; }
.next-appts .who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Responsivo */
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .ag-week { grid-template-columns: 1fr; gap: 6px; }
  .ag-day { min-height: 0; flex-direction: row; align-items: stretch; }
  .ag-day-head { flex-direction: column; align-items: flex-start; gap: 0; width: 64px; flex-shrink: 0; padding: 10px 10px; }
  .ag-day-list { flex: 1; padding: 8px 8px 8px 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { min-width: 0; position: static; height: auto; padding: 12px 16px 10px; gap: 10px; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .nav { flex-direction: row; overflow-x: auto; order: 3; margin: 0 -16px; width: calc(100% + 32px); padding: 2px 12px; gap: 4px; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 8px 12px; }
  .side-foot { order: 2; margin: 0; padding: 0; border: 0; }
  .side-foot::before, .side-foot .who { display: none; }
  .main-col { min-height: 0; }
  .content { padding: 20px 16px 40px; }
  .card { padding: 18px 16px; }
  .row, .choices { grid-template-columns: 1fr; }
  .qr-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .howto li { text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 14px 16px; border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(-n + 2) { border-top: 0; }
}
@media (max-width: 560px) {
  .row.three { grid-template-columns: 1fr 1fr; }
  .ag-nav { flex-wrap: wrap; }
  .ag-nav strong { width: 100%; margin: 8px 0 0; }
}

/* Conversas ocupam a altura toda da tela */
.layout.inbox-mode { height: 100vh; height: 100dvh; grid-template-rows: minmax(0, 1fr); }
.layout.inbox-mode .main-col { min-height: 0; }
.layout.inbox-mode .content { padding: 0; max-width: none; min-height: 0; display: flex; }
.layout.inbox-mode .main-col > .credit { display: none; }
@media (max-width: 820px) { .layout.inbox-mode { grid-template-rows: auto minmax(0, 1fr); } }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: var(--primary-ink); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }

/* Equipe */
.team-form { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 14px; align-items: end; }
.team-form label { margin: 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
tr.inactive td { opacity: .5; }
@media (max-width: 760px) { .team-form { grid-template-columns: 1fr; } }

/* Controles compartilhados das telas novas */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select { width: auto; margin: 0; padding: 7px 10px; }
.field-search { position: relative; flex: 1; min-width: 220px; }
.field-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.field-search input { margin: 0; padding: 7px 10px 7px 32px; }
.toolbar-card { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; padding: 12px 16px; }
label.inline { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
label.inline input { width: auto; margin: 0; padding: 6px 8px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 14px; }
.pager:empty { display: none; }
.lb { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.lb i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.lb.plain { color: var(--muted); background: var(--surface-2); border-radius: 4px; padding: 0 6px; }
.label-row { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.meter { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.meter span { min-width: 24px; font-weight: 600; }
.meter i { height: 8px; border-radius: 2px; background: var(--brand); display: block; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choice { border-radius: var(--r-lg); padding: 12px 14px; }
.usage { margin-top: 14px; display: grid; gap: 6px; }
.progress { height: 5px; margin: 0; }
.voice-list { list-style: none; margin: 0; padding: 0; display: grid; }
.voice-row { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.voice-row:last-child { border-bottom: 0; }
.grow { flex: 1; min-width: 0; }
.script { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface-2); line-height: 1.6; color: var(--ink); }
.rec-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; }
.rec-box audio { height: 34px; max-width: 100%; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: ib-pulse 1.2s infinite; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
label.check input { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border-color: var(--brand); }
.plan h3 { margin: 0; }
.plan .price b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan .price span { color: var(--muted); margin-left: 2px; }
.plan ul { list-style: none; margin: 0 0 auto; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.plan li { display: flex; gap: 7px; }
.plan li svg { width: 15px; height: 15px; margin-top: 2px; color: var(--ok); }
.plan .badge { align-self: flex-start; }
.integration { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.integration img { width: 36px; height: 36px; flex-shrink: 0; }
.integration .grow strong { display: block; }
details.advanced { margin-bottom: 14px; }
details.advanced summary { cursor: pointer; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.connect-steps { margin: 4px 0 16px; }
.pixel-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.pixel-list button { width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; border-radius: var(--r); cursor: pointer; font: inherit; color: inherit; }
.pixel-list button:hover { border-color: var(--brand); }
.paywall-note { background: var(--warn-soft); color: var(--warn); padding: 10px 14px; border-radius: var(--r-lg); margin-bottom: 18px; }
.wide-dialog { width: min(560px, calc(100% - 32px)); }
.manage-list { list-style: none; margin: 0 0 14px; padding: 0; max-height: 240px; overflow-y: auto; }
.manage-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.manage-list li > :first-child { flex-shrink: 0; }
.manage-list .small:not(.grow) { margin-left: auto; }
.link.danger { color: var(--danger); }
.color-pick { display: flex; gap: 8px; margin-bottom: 16px; }
.color-pick label { margin: 0; cursor: pointer; }
.color-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-pick span { display: block; width: 24px; height: 24px; border-radius: 4px; background: var(--c); }
.color-pick input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.color-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 960px) { .plans, .choices.three { grid-template-columns: 1fr; } }

/* Texto digitado nunca herda o peso do rótulo */
input, textarea, select { font-weight: 400; }
::placeholder { font-weight: 400; }
.choice { align-content: start; }
#meta-adv, #meta-form { max-width: none; }
@media (max-width: 760px) {
  /* Contatos no celular: cada linha vira um cartão, com as ações sempre à vista */
  #ct-table thead { display: none; }
  #ct-table table, #ct-table tbody, #ct-table tr, #ct-table td { display: block; width: 100%; }
  #ct-table tr { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  #ct-table td { border: 0; padding: 2px 0; }
  #ct-table td:nth-child(3), #ct-table td:nth-child(5), #ct-table td:nth-child(6) { display: none; }
  #ct-table .row-actions { justify-content: flex-start; margin-top: 8px; }
}
@media (max-width: 760px) { #ct-table td:nth-child(4):not(:has(.lb)) { display: none; } }
