:root {
  --ink: #13213f;
  --ink-2: #1f3360;
  --ink-line: #2a4170;
  --ink-soft: #9fb0cf;
  --bg: #f5f5f8;
  --panel: #ffffff;
  --line: #e4e4eb;
  --text: #16161d;
  --muted: #6b6b7b;
  /* Destaques da marca: azul do traço e roxo do raio */
  --accent: #1f3a6e;
  --accent-soft: #e8edf6;
  --accent-ink: #1b2f57;
  --accent-grad: linear-gradient(135deg, #1b2f57, #2c4f8f);
  /* Verde fica só para sucesso (venda, conectado, ativo) */
  --green: #0f9d74;
  --green-soft: #e2f5ee;
  --green-ink: #0a6b50;
  --red: #e0453a;
  --red-soft: #fdecea;
  --amber: #c98a0a;
  --amber-soft: #fdf3dc;
  --blue-soft: #e9ecfd;
  --brand-blue: #2c4f8f;
  --brand-violet: #c9a24a; /* dourado: marca "onde estou" */
  --brand-navy: #1b2f57;
  --brand-gold: #c9a24a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 11, 16, .06), 0 4px 16px rgba(11, 11, 16, .05);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  font-size: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; height: 100vh; }
.side { background: var(--ink); color: #e6ebf5; display: flex; flex-direction: column; padding: 18px 12px; gap: 4px; }
/* Logo AF Vértice: escudo (claro na barra escura, azul-marinho no fundo claro) + seta dourada */
.brand { --shield: #f2f2f7; --gold: var(--brand-gold); display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; color: #fff; }
.brand-logo { display: grid; place-items: center; flex: 0 0 auto; }
.brand-logo svg { width: 38px; height: 38px; }
.brand-word { font-family: 'Montserrat', 'Arial Black', sans-serif; font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #b9b9c8; text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.active { background: rgba(201, 162, 74, .14); color: #fff; box-shadow: inset 3px 0 0 var(--brand-violet); }
.nav a.active svg { color: var(--brand-violet); }
.nav a .badge { margin-left: auto; }
.nav .sep { height: 1px; background: var(--ink-line); margin: 10px 8px; }
.side .me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--ink-line); font-size: 13px; }
.side .me small { color: var(--ink-soft); display: block; }
.side .me button { background: none; border: 0; color: var(--ink-soft); padding: 0; margin-top: 6px; cursor: pointer; text-decoration: underline; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar h1 { font-size: 18px; margin: 0; font-weight: 800; }
.topbar .spacer { flex: 1; }
.content { flex: 1; overflow: auto; padding: 22px 24px; min-height: 0; }
.content.flush { padding: 0; overflow: hidden; display: flex; }
.support-banner { background: var(--amber-soft); color: #7a5300; padding: 8px 24px; display: flex; gap: 12px; align-items: center; font-weight: 600; border-bottom: 1px solid #f0dca8; }

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c4c4d2; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(.92); box-shadow: 0 2px 10px rgba(27, 47, 87, .3); }
.btn.danger { color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px; font-weight: 800; background: var(--line); color: var(--text); }
.badge.red { background: var(--red); color: #fff; }
.badge.green { background: var(--green-soft); color: var(--green-ink); }
.badge.amber { background: var(--amber-soft); color: #7a5300; }
.badge.blue { background: var(--blue-soft); color: #3446c4; }
.pill-alert { background: var(--red); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 800; border: 0; cursor: pointer; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(224, 69, 58, .18); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { margin: 0; padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.card .body { padding: 14px 16px; }
input, select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label { display: block; font-weight: 700; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.red { color: var(--red); }
.empty { padding: 40px; text-align: center; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 6px 10px; border-radius: 7px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at 20% 10%, rgba(44, 79, 143, .45), transparent 55%), radial-gradient(ellipse at 85% 90%, rgba(201, 162, 74, .16), transparent 55%), #0f1a33; }
.login form { width: min(380px, calc(100vw - 32px)); background: #fff; padding: 32px; border-radius: 14px; }
.login .brand { --shield: var(--brand-navy); color: var(--brand-navy); flex-direction: column; gap: 8px; padding: 0 0 16px; }
.login .brand-logo svg { width: 76px; height: 76px; }
.login .brand-word { font-size: 30px; color: #232a36; }
.login form > p { text-align: center; }
.login p { color: var(--muted); margin: 0 0 18px; }
.login .error { color: var(--red); font-weight: 600; min-height: 20px; margin-top: 10px; }

/* ---------- Atendimento ---------- */
.inbox { display: grid; grid-template-columns: 360px 1fr 330px; width: 100%; min-height: 0; }
.inbox > * { min-height: 0; }
/* Lista de conversas (estilo WhatsApp) */
.list { border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--panel); min-width: 0; }
.list .items { overflow: auto; flex: 1; }
.list-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px 6px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: #f0f0f4; border-radius: 10px; padding: 0 12px; color: var(--muted); min-width: 0; }
.search input { border: 0; background: none; padding: 9px 0; outline: none; min-width: 0; }
.search input:focus { outline: none; }
.icon-btn { position: relative; border: 0; background: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); cursor: pointer; flex: 0 0 auto; font-size: 18px; }
.icon-btn:hover { background: #f0f0f4; color: var(--text); }
.icon-btn .dot-on { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.more-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 4px 12px 8px; }
.chips-row { display: flex; gap: 6px; padding: 4px 12px 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.chips-row::-webkit-scrollbar { display: none; }
.chip { border: 0; background: #f0f0f4; color: #4a4a58; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { background: #e6e6ee; }
.chip.on { background: var(--accent-soft); color: var(--accent-ink); }
.chip.chip-alert { background: var(--red-soft); color: var(--red); }
.chip.chip-alert.on { background: var(--red); color: #fff; }
.chip.chip-alert.on .count { background: rgba(255,255,255,.25); color: #fff; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: rgba(0,0,0,.07); color: inherit; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.count:empty { display: none; }
.count.red { background: var(--red); color: #fff; }
.count.green { background: #25a35a; color: #fff; }
.count.amber { background: var(--amber-soft); color: #7a5300; }
.owner-strip { display: flex; gap: 6px; align-items: center; padding: 8px 12px; font-size: 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: #fafafc; }
.owner-strip::-webkit-scrollbar { display: none; }
.owner-strip .muted { white-space: nowrap; }
.owner-strip button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.owner-strip button b { margin-left: 2px; }
.owner-strip button.hot b { color: var(--red); }
.owner-strip button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.owner-strip button.on b { color: #fff; }
.list-foot { padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: #fafafc; }
.list-foot b { color: var(--text); }
.list-foot:empty { display: none; }
.list-group { position: sticky; top: 0; z-index: 1; padding: 6px 16px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f6f6f9; }
.list-group.red { color: var(--red); background: #fff5f4; }
.avatar { --a: var(--accent); flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--a) 18%, #fff); color: var(--a); font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }
.chat { display: flex; gap: 12px; align-items: center; padding: 10px 14px; text-decoration: none; color: inherit; position: relative; cursor: pointer; }
.chat::after { content: ''; position: absolute; left: 72px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.chat:hover { background: #f6f6f9; }
.chat.active { background: #eaf0f9; }
.chat.late::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.chat-main { flex: 1; min-width: 0; }
.chat-top, .chat-mid { display: flex; align-items: center; gap: 8px; }
.chat .name { flex: 1; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat .time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.chat .time.waiting { color: #1f9d55; font-weight: 700; }
.chat .preview { flex: 1; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.chat .tick { color: #53bdeb; letter-spacing: -3px; margin-right: 3px; }
.chat .wait { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #25a35a; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.chat .wait.late { background: var(--red); }
.chat .sale { color: var(--green-ink); font-weight: 800; font-size: 13px; white-space: nowrap; }
.chat-tags { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-tags .stage i, .stage i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.no-owner { color: #b7791f; font-weight: 700; }
/* Conversa */
.thread { display: flex; flex-direction: column; min-width: 0; background-color: #efeae2;
  background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 18px 18px; }
.thread-empty { margin: auto; text-align: center; padding: 30px; }
.thread-empty h2 { margin: 14px 0 6px; font-weight: 800; }
.thread-empty .empty-icon { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.thread .head { background: var(--panel); padding: 8px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.thread .who { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 2px; text-align: left; cursor: pointer; min-width: 0; color: inherit; }
.thread .who .avatar { width: 40px; height: 40px; font-size: 14px; }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-text b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.funnel-bar { display: flex; gap: 6px; align-items: center; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.funnel-bar::-webkit-scrollbar { display: none; }
.funnel-bar .steps, .funnel-bar .outcome { display: flex; gap: 4px; flex: 0 0 auto; }
.funnel-bar .steps { flex: 1; }
.step { --s: var(--muted); border: 1px solid var(--line); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.step:hover { border-color: var(--s); color: var(--s); }
.step.done { color: var(--s); border-color: color-mix(in srgb, var(--s) 35%, #fff); background: color-mix(in srgb, var(--s) 7%, #fff); }
.step.on { background: var(--s); border-color: var(--s); color: #fff; }
.step.won { border-color: #bfe7d6; color: var(--green-ink); background: var(--green-soft); }
.step.won:hover { background: var(--green); color: #fff; }
.step.lost { color: var(--muted); }
.step.lost:hover { border-color: var(--red); color: var(--red); }
.funnel-bar.closed { justify-content: space-between; font-size: 13px; }
.funnel-bar.closed.won { background: var(--green-soft); color: var(--green-ink); }
.funnel-bar.closed.lost { background: #f3f3f6; color: var(--muted); }
.next-step { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #fffbea; border-bottom: 1px solid #f3e7b5; font-size: 13px; color: #6b5300; }
.next-step span { flex: 1; }
.next-step.urgent { background: var(--red-soft); color: #9b2c22; border-bottom-color: #f5c9c4; font-weight: 700; }
.next-step .btn { flex: 0 0 auto; }
.thread .msgs { flex: 1; overflow: auto; padding: 14px 6%; display: flex; flex-direction: column; gap: 3px; }
.bubble { position: relative; max-width: 65%; padding: 6px 9px 8px; border-radius: 8px; background: #fff; box-shadow: 0 1px .5px rgba(11,20,26,.13); white-space: pre-wrap; word-wrap: break-word; font-size: 14.2px; line-height: 1.35; align-self: flex-start; margin-top: 4px; }
.bubble.out { align-self: flex-end; background: #dfe8f6; }
.bubble::before { content: ''; position: absolute; top: 0; width: 10px; height: 12px; }
.bubble.in { border-top-left-radius: 0; }
.bubble.in::before { left: -7px; background: linear-gradient(225deg, #fff 50%, transparent 50%); }
.bubble.out { border-top-right-radius: 0; }
.bubble.out::before { right: -7px; background: linear-gradient(135deg, #dfe8f6 50%, transparent 50%); }
.bubble .by { display: block; font-size: 12px; font-weight: 800; color: var(--accent-ink); margin-bottom: 1px; }
.bubble .meta { float: right; margin: 6px 0 -4px 10px; font-size: 11px; color: #667781; white-space: nowrap; }
.bubble .meta .tick { margin-left: 3px; letter-spacing: -3px; }
.bubble .meta .tick.read { color: #53bdeb; }
.bubble .meta .tick.failed { color: var(--red); letter-spacing: 0; }
.day-sep { align-self: center; background: #fff; padding: 4px 12px; border-radius: 8px; font-size: 12px; color: #54656f; margin: 10px 0 6px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
/* Sugestões automáticas no chat */
.sugg-bar { display: flex; gap: 6px; align-items: center; padding: 6px 12px 0; overflow-x: auto; scrollbar-width: none; background: #f0f2f5; }
.sugg-bar::-webkit-scrollbar { display: none; }
.sugg-bar .sugg-ico { flex: 0 0 auto; font-size: 15px; }
.sugg-bar button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; color: #3b4a54; }
.sugg-bar button:hover { border-color: var(--brand-gold); color: var(--accent-ink); }
.sugg-bar button:first-of-type { border-color: color-mix(in srgb, var(--brand-gold) 60%, #fff); background: #fff9ea; }
.sugg-bar button.sugg-ai { border-color: #7c5cff; background: linear-gradient(135deg, #f3efff, #fff9ea); color: #4b2fbf; }
.sugg-bar select { flex: 0 0 auto; width: auto; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; background: var(--panel); }
.sugg-panel { background: var(--panel); border-top: 1px solid var(--line); padding: 10px 12px; max-height: 46vh; overflow: auto; box-shadow: 0 -6px 16px rgba(11,20,26,.06); }
.sugg-head { display: flex; align-items: center; gap: 8px; }
.sugg-head .grow { flex: 1; }
.sugg-tip { margin: 6px 0 8px; padding: 7px 10px; border-radius: 8px; background: #fff9ea; color: #6b5300; font-size: 12.5px; }
.sugg-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.sugg-item .sugg-text { flex: 1; font-size: 13.5px; line-height: 1.4; }
.sugg-item mark, .sugg-card mark { background: #fff1c2; color: #6b5300; border-radius: 3px; padding: 0 2px; }
.sugg-item .btn { flex: 0 0 auto; }
.sugg-foot { font-size: 11.5px; margin-top: 4px; }
/* Funil automático na lista */
.flow-step.f-interessado.on { background: #e08a0a; }
.flow-step.f-parado.on { background: #8a5a2b; }
.flow-step.f-janela.on { background: #0f9d74; }
.flow-step.f-perdido.on { background: #8d8da0; }
.flow-step.f-interessado:not(.on) .n { color: #c07400; }
.flow-step.f-parado:not(.on) .n { color: #8a5a2b; }
.flow-step.f-janela:not(.on) .n { color: #0f9d74; }
.flow-step.f-perdido:not(.on) .n { color: #8d8da0; }
.ch-ig { color: #c13584; font-weight: 700; }
/* Faixa de cor do engajamento na lista de conversas (verde = vender agora). */
.chat.eng-quente { box-shadow: inset 4px 0 0 var(--hot); background: linear-gradient(90deg, rgba(15, 157, 116, .07), transparent 40%); }
.chat.eng-morno { box-shadow: inset 4px 0 0 var(--warm); }
.chat.eng-frio { box-shadow: inset 4px 0 0 var(--cold); }
.chat.eng-quente.active, .chat.eng-morno.active, .chat.eng-frio.active { background: #eaf0f9; }
.side .me .presence-toggle { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: #fff; font-weight: 700; cursor: pointer; text-align: left; text-decoration: none !important; }
.side .me .presence-toggle i { width: 9px; height: 9px; border-radius: 50%; background: #8d8da0; flex: 0 0 auto; }
.side .me .presence-toggle.on { border-color: rgba(15, 157, 116, .6); background: rgba(15, 157, 116, .15); }
.side .me .presence-toggle.on i { background: #19c48e; box-shadow: 0 0 0 3px rgba(25, 196, 142, .25); }
.side .me .presence-toggle small { margin-left: auto; font-weight: 600; color: var(--ink-soft) !important; display: inline !important; font-size: 11px; }
.presence { font-size: 11.5px; font-weight: 700; color: #9a9aab; margin-left: 6px; }
.presence.on { color: var(--green-ink); }
.chip.chip-hot { background: #e2f5ee; color: #0a6b50; }
.chip.chip-hot.on { background: #0f9d74; color: #fff; }
.camp-preview .bubble { margin-top: 4px; white-space: pre-wrap; }
.camp-bar { position: sticky; top: 0; z-index: 2; }
.foot-metrics { margin-top: 3px; }
.foot-metrics .lvl-tag { min-width: 18px; text-align: center; }
.chat .wait.window { background: #e3f4ec; color: #0a6b50; }
.lvl-tag { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; color: #fff; vertical-align: 1px; }
.lvl-tag.quente { background: var(--hot); }
.lvl-tag.morno { background: var(--warm); }
.lvl-tag.frio { background: var(--cold); }
.funnel-bar .steps .lvl-tag { align-self: center; margin-left: 4px; }
.flow-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 2px 12px 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.flow-step { position: relative; border: 0; background: var(--panel); padding: 7px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); min-width: 0; }
.flow-step + .flow-step { border-left: 1px solid var(--line); }
.flow-step .n { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.1; }
.flow-step .l { font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center; }
.flow-step:hover { background: #f6f6f9; }
.flow-step.on { color: #fff; }
.flow-step.on .n { color: #fff; }
.flow-step.f-aguardando.on { background: #0f9d74; }
.flow-step.f-sem_resposta.on { background: #e08a0a; }
.flow-step.f-agendado.on { background: var(--accent); }
.flow-step.f-aguardando:not(.on) .n { color: #0f9d74; }
.flow-step.f-sem_resposta:not(.on) .n { color: #c07400; }
.flow-step.f-agendado:not(.on) .n { color: var(--accent); }
.chip.chip-rework { background: #f6ede4; color: #8a5a2b; }
.chip.chip-rework.on { background: #8a5a2b; color: #fff; }
.list-hint { padding: 8px 14px; font-size: 12px; color: var(--muted); background: #fafafc; border-bottom: 1px solid var(--line); }
.chat .wait.quiet { background: #f6e6c8; color: #8a5a00; }
.chat .wait.rework { background: #f0e4d8; color: #8a5a2b; }
.chat .appt-when { font-size: 11.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.funnel-bar.auto span.step { cursor: default; }
.funnel-bar.auto span.step:not(.on):hover { border-color: var(--line); color: var(--muted); }
.composer { background: #f0f2f5; padding: 8px 12px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; min-height: 42px; max-height: 140px; border: 0; border-radius: 22px; padding: 11px 16px; background: #fff; }
.composer textarea:focus { outline: none; }
.composer .send { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent-grad); color: #fff; display: grid; place-items: center; cursor: pointer; }
.composer .send:disabled { opacity: .45; cursor: not-allowed; }
.window-closed { background: var(--amber-soft); color: #7a5300; padding: 10px 14px; font-weight: 600; font-size: 13px; }
/* Ficha no estilo "dados do contato" */
.lead-panel .contact { text-align: center; }
.lead-panel .contact .avatar { margin: 6px auto 10px; }
.lead-panel .contact .contact-name { font-size: 19px; font-weight: 800; }
.lead-panel .contact .facts { text-align: left; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 14px 0 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lead-panel { border-left: 1px solid var(--line); background: var(--panel); overflow: auto; }
.lead-panel section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lead-panel h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.source-box { background: var(--blue-soft); border-radius: 8px; padding: 10px; font-size: 13px; }
.note { background: #fffbea; border: 1px solid #f3e7b5; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; white-space: pre-wrap; }
.note small { display: block; color: var(--muted); margin-top: 4px; }
.task-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.task-row input[type=checkbox] { width: auto; margin-top: 3px; }
.task-row.overdue .due { color: var(--red); font-weight: 700; }
.task-row.done .title { text-decoration: line-through; color: var(--muted); }

/* ---------- Funil ---------- */
.board { display: flex; gap: 12px; padding: 18px; overflow-x: auto; width: 100%; align-items: flex-start; }
.col { background: #eaeaf0; border-radius: var(--radius); width: 260px; flex: 0 0 260px; display: flex; flex-direction: column; max-height: 100%; }
.col.won { background: #ddf1e8; }
.col.lost { background: #f3e3e0; }
.col header { padding: 10px 12px; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.col header .sum { margin-left: auto; font-size: 12px; color: var(--muted); }
.col .cards { padding: 0 8px 8px; overflow: auto; display: grid; gap: 8px; min-height: 60px; }
.col.drop { outline: 2px dashed var(--accent); }
.kcard { background: #fff; border-radius: 8px; padding: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: grab; border-left: 4px solid transparent; }
.kcard.late { border-left-color: var(--red); }
.kcard b { display: block; }
.kcard .muted { font-size: 12px; }

/* ---------- Painel ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px; }
.kpi .label { color: var(--muted); font-weight: 700; font-size: 12px; }
.kpi .value { font-size: 28px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kpi.bad { background: var(--red-soft); border-color: #f5c9c4; }
.kpi.bad .value { color: var(--red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent-grad); }

/* ---------- Nível do paciente ---------- */
/* Nível do lead: verde = alto interesse (prioridade), amarelo = médio, vermelho = pouco interesse. */
:root { --hot: #0f9d74; --warm: #e0a40a; --cold: #e0453a; }
.temp-pick { display: flex; gap: 6px; }
.temp-pick button { flex: 1; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 7px 0; font-weight: 700; cursor: pointer; color: var(--muted); }
.temp-pick button.quente.on { background: var(--hot); border-color: var(--hot); color: #fff; }
.temp-pick button.morno.on { background: var(--warm); border-color: var(--warm); color: #fff; }
.temp-pick button.frio.on { background: var(--cold); border-color: var(--cold); color: #fff; }

/* ---------- Relatórios ---------- */
.report-wait { background: var(--accent-soft); color: var(--accent-ink); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; font-weight: 600; }
.report table td:first-child { min-width: 230px; }
.report .grid-2 table td:first-child { min-width: 0; }
.kpis-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.mode-tabs { background: var(--line); border-radius: 9px; padding: 3px; flex-wrap: nowrap; }
.mode-tabs button { padding: 5px 14px; }
.mode-tabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.arbiter { display: grid; gap: 10px; }
.arbiter .row { align-items: flex-start; }
.tag { display: inline-block; flex: 0 0 auto; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.tag.ok { background: var(--green-soft); color: var(--green-ink); }
.tag.svc { background: var(--accent-soft); color: var(--accent-ink); }
.tag.camp { background: #e0f2f5; color: #0e7490; }
.tag.warn { background: var(--amber-soft); color: #7a5300; }
.hint { font-size: 12px; margin-top: 3px; font-weight: 600; }
.hint.ok { color: var(--green-ink); }
.hint.bad { color: var(--red); }
.hint.warn { color: #7a5300; }
.score { display: inline-block; min-width: 38px; text-align: center; padding: 3px 8px; border-radius: 6px; font-weight: 800; background: var(--line); }
.score.good { background: var(--green-soft); color: var(--green-ink); }
.score.mid { background: var(--amber-soft); color: #7a5300; }
.score.bad { background: var(--red-soft); color: var(--red); }
.mix { display: flex; height: 8px; border-radius: 4px; overflow: hidden; min-width: 110px; background: var(--line); margin-bottom: 3px; }
.mix i.quente, .lvl.quente { background: var(--hot); }
.mix i.morno, .lvl.morno { background: var(--warm); }
.mix i.frio, .lvl.frio { background: var(--cold); }
.lvl { color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.convs .conv { border-bottom: 1px solid var(--line); padding: 10px 16px; }
.convs .conv:last-child { border-bottom: 0; }
.convs summary { display: flex; gap: 10px; align-items: center; cursor: pointer; flex-wrap: wrap; }
.convs h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; }
.reasons li::before { font-weight: 800; margin-right: 6px; }
.reasons li.ok::before { content: '✓'; color: var(--green); }
.reasons li.bad::before { content: '✗'; color: var(--red); }

/* ---------- Agenda ---------- */
.agenda-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.agenda-bar .nav-days { gap: 6px; }
.agenda-bar [data-label] { margin-left: 6px; white-space: nowrap; }
.agenda-bar select { width: auto; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; flex: 0 0 auto; }
.cal-empty { font-size: 13px; margin-bottom: 8px; }
.cal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.cal-head, .cal-body { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(96px, 1fr)); min-width: calc(52px + var(--cols) * 96px); }
.cal-head { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.cal-colhead { padding: 8px 6px; font-weight: 800; font-size: 13px; border-left: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-colhead .wd { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.cal-colhead .dn { font-size: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.cal-colhead .dn.today { background: var(--accent); color: #fff; }
.cal-scroll { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); overflow-y: auto; min-width: max-content; }
.cal-body { position: relative; height: calc(var(--hour) * var(--hours)); }
.cal-hours .cal-hour { height: var(--hour); position: relative; }
.cal-hours .cal-hour span { position: absolute; top: -7px; right: 6px; font-size: 11px; color: var(--muted); background: var(--panel); }
.cal-hours .cal-hour:first-child span { display: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: pointer;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(#f2f2f6 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.cal-col:hover { background-color: #fbfbfd; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.ev { position: absolute; z-index: 1; border-radius: 6px; padding: 3px 6px; overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.3;
  background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 3px solid var(--c); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ev:hover { background: color-mix(in srgb, var(--c) 26%, #fff); z-index: 2; }
.ev .ev-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .ev-sub { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .ev-ok { color: var(--green); font-weight: 800; }
.ev.rotina { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff) 0 6px, color-mix(in srgb, var(--c) 18%, #fff) 6px 12px); }
.ev.compareceu { opacity: .75; }
.ev.faltou { border-left-color: var(--red); background: var(--red-soft); }
.ev.faltou .ev-line b { color: var(--red); }
.ev.cancelado { opacity: .5; text-decoration: line-through; }
.agenda-day { margin-bottom: 12px; overflow: hidden; }
.agenda-item { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 16px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; text-align: left; border-left: 4px solid var(--c); }
.agenda-item:hover { background: #fafafc; }
.agenda-item .t { font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; min-width: 48px; }
.agenda-item small { font-weight: 500; color: var(--muted); font-size: 12px; }
.agenda-item .w { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agenda-item .w b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--line); color: var(--text); white-space: nowrap; }
.status-pill.confirmado { background: var(--blue-soft); color: #3446c4; }
.status-pill.compareceu { background: var(--green-soft); color: var(--green-ink); }
.status-pill.faltou { background: var(--red-soft); color: var(--red); }
.status-pill.cancelado { background: var(--line); color: var(--muted); text-decoration: line-through; }
.appt-modal .fixed-lead { padding: 9px 10px; background: var(--soft, #f5f5f8); border: 1px solid var(--line); border-radius: 8px; font-weight: 700; }
.appt-modal .error { color: var(--red); font-weight: 600; min-height: 18px; margin-top: 8px; font-size: 13px; }
.appt-modal small { display: block; margin-top: 4px; font-size: 12px; }
.appt-detail { border-left: 4px solid var(--c); padding-left: 12px; }
.appt-detail h2 { margin: 8px 0 4px; }
.appt-kind { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); flex: 1; }
.status-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn.ok { color: var(--green-ink); }
.agenda-panel .appt-mini { display: flex; gap: 8px; align-items: center; padding: 6px 0; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.agenda-panel .appt-mini .when { font-weight: 700; font-size: 13px; flex: 1; }

/* ---------- AF Vértice: barra da empresa e painel de empresas ---------- */
.af-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 24px; background: var(--brand-navy); color: #e6ebf5; font-size: 13px; }
.af-bar .af-tag { background: var(--brand-gold); color: #13213f; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; }
.af-bar .af-label { font-weight: 700; }
.af-bar select { width: auto; max-width: 260px; padding: 5px 8px; font-weight: 700; background: #fff; color: var(--text); }
.af-bar .af-note { color: #9fb0cf; font-size: 12px; flex: 1; }
.af-bar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.af-table tr.suspended td { color: var(--muted); background: #fafafc; }
.af-table td.af-actions { white-space: nowrap; text-align: right; }
.af-table td.af-actions .btn + .btn { margin-left: 4px; }
.bubble .by.phone { color: var(--muted); }
.wa-connect { display: grid; gap: 10px; }
.wa-connect ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.wa-connect .btn.primary { justify-self: start; padding: 11px 18px; }
.af-panel .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.modal code { background: #f0f0f4; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- Modal e toasts ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(11, 11, 16, .5); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(440px, 100%); padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h2 { margin: 0 0 6px; font-size: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 340px; font-weight: 600; cursor: pointer; }
.toast.error { background: var(--red); }

/* ---------- Retrabalho ---------- */
.rework { display: grid; gap: 14px; max-width: 980px; }
.rework-intro .body { display: grid; gap: 6px; font-size: 14px; }
.rework-by { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rework-by span { background: #f6ede4; color: #8a5a2b; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.rework-row { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.rework-row:last-child { border-bottom: 0; }
.rework-main { display: flex; gap: 12px; align-items: flex-start; }
.rework-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rework-sub { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wait-badge { background: #f0e4d8; color: #8a5a2b; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 800; }
.rework-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 58px; }
.rework-sugg { margin-left: 58px; padding: 8px 12px; border-radius: 10px; background: #fafafc; border: 1px solid var(--line); }
/* ---------- Níveis de clientes ---------- */
.levels tr.click { cursor: pointer; }
.levels tr.click:hover td { background: #fafafc; }
.levels .src-detail td { background: #fafafc; }
.levels .level-filter { display: flex; gap: 6px; flex-wrap: wrap; text-transform: none; letter-spacing: 0; }
.levels .body .lvl { margin: 0 4px 0 10px; }
.levels .body .lvl:first-child { margin-left: 0; }
.lvl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.lvl-dot.quente { background: var(--hot); }
.lvl-dot.morno { background: var(--warm); }
.lvl-dot.frio { background: var(--cold); }
.green-ink { color: var(--green-ink); }
.amber-ink { color: #8a5a2b; font-weight: 800; }
.roles-help .body { display: grid; gap: 6px; font-size: 13.5px; }
.report-brief-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }
/* ---------- Histórico ---------- */
.hist { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 420px; }
.hist > .card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.hist-filters { padding: 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.hist-filters select { flex: 1; }
.hist-items { overflow: auto; flex: 1; }
.hist-count { padding: 8px 14px 4px; font-size: 12px; }
.hist-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: inherit; }
.hist-item .avatar { width: 38px; height: 38px; font-size: 13px; }
.hist-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item small { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item:hover { background: #f6f6f9; }
.hist-item.on { background: #eaf0f9; }
.hist-view .empty { margin: auto; }
.hist-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hist-head .avatar { width: 40px; height: 40px; font-size: 14px; }
.hist-back { display: none; }
.hist-msgs { flex: 1; overflow: auto; padding: 14px 5%; display: flex; flex-direction: column; gap: 3px; background-color: #efeae2; }
/* ---------- Sugestões ---------- */
.sugg-page { display: grid; gap: 14px; max-width: 880px; }
.sugg-intents { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sugg-intent { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; color: inherit; }
.sugg-intent small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.sugg-intent:hover { border-color: var(--brand-gold); }
.sugg-intent.on { border-color: var(--brand-gold); background: #fff9ea; box-shadow: inset 0 0 0 1px var(--brand-gold); }

/* ---------- Manu (recepcionista com IA) ---------- */
.manu { display: grid; gap: 14px; max-width: 1180px; }
.manu-hero { display: flex; gap: 16px; align-items: center; padding: 18px 20px; }
.manu-hero.on { border-color: color-mix(in srgb, var(--brand-gold) 55%, #fff); background: linear-gradient(90deg, #fffaf0, var(--panel)); }
.manu-avatar { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: var(--accent-soft); }
.manu-hero .grow { flex: 1; min-width: 0; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch.big { width: 58px; height: 32px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cfd3dc; cursor: pointer; transition: background .15s; }
.switch span::before { content: ''; position: absolute; left: 3px; top: 3px; width: calc(50% - 3px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: #0f9d74; }
.switch input:checked + span::before { transform: translateX(calc(100% + 0px)); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.brain-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.brain { display: grid; gap: 4px; align-content: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; margin: 0; color: var(--text); }
.brain input { display: none; }
.brain .brain-icon { font-size: 22px; }
.brain .brain-cost { font-size: 12px; font-weight: 800; color: #8a5a2b; }
.brain .brain-cost.free { color: var(--green-ink); }
.brain small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.brain:hover { border-color: var(--brand-gold); }
.brain.on { border-color: var(--brand-gold); background: #fff9ea; box-shadow: inset 0 0 0 1px var(--brand-gold); }
.brain-pick.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Clínica 360 */
.c360 { display: grid; gap: 0; }
.c360 .grid-2 > .card h3, .c360 > .card h3 { margin-bottom: 0; }
.c360 > .card { margin-bottom: 16px; }
.c360-checks { display: grid; gap: 12px; }
.c360-checks > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; font-size: 13.5px; }
.c360-checks > div > .c360-bar, .c360-checks > div > small { grid-column: 1 / -1; }
.c360-checks b { font-size: 16px; }
.c360-bar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.c360-bar i { display: block; height: 100%; background: #0f9d74; border-radius: 4px; }
.c360-bar.bad i { background: #e08a0a; }
.c360-improve { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.c360-improve h4 { margin: 0 0 8px; font-size: 14px; }
.c360-improve h5 { margin: 12px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.c360-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.c360-list li { display: flex; gap: 8px; padding: 5px 8px; background: #fafafc; border-radius: 6px; }
.c360-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
tr.c360-manu td { background: #fffaf0; }
@media (max-width: 900px) { .c360-improve { grid-template-columns: minmax(0, 1fr); } }
.lessons { display: grid; gap: 0; border-top: 1px solid var(--line); }
.lesson { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lesson .grow { flex: 1; min-width: 0; }
.lesson .q { font-weight: 700; font-size: 13.5px; }
.lesson .a { font-size: 13.5px; margin-top: 3px; white-space: pre-wrap; }
.lesson mark { background: #fff1c2; color: #6b5300; border-radius: 3px; padding: 0 2px; }
.lesson-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.miss-box { border: 1px solid #f1d58a; background: #fffaeb; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.miss-row { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid #f3e7b5; margin-top: 6px; }
.miss-row .grow { flex: 1; min-width: 0; }
.brain-more { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fafafc; }
.brain-more summary { cursor: pointer; padding: 11px 0; font-weight: 700; color: var(--accent-ink); }
.brain-more[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.compare { width: 100%; font-size: 13px; }
.compare th { text-align: left; white-space: nowrap; }
.compare td:first-child { font-weight: 600; min-width: 180px; }
.compare-tips { font-size: 13px; padding: 4px 0 10px; }
.compare-tips p { margin: 6px 0; }
@media (max-width: 760px) { .brain-pick, .brain-pick.two { grid-template-columns: minmax(0, 1fr); } }
.manu-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.manu-col { display: grid; gap: 14px; }
.manu textarea { resize: vertical; }
.manu-days { display: grid; gap: 6px; }
.manu-day { display: grid; grid-template-columns: 110px 1fr auto 1fr; gap: 6px; align-items: center; }
.manu-day.off input[type=time] { opacity: .4; }
.manu-chat { display: flex; flex-direction: column; gap: 4px; min-height: 220px; max-height: 420px; overflow: auto; padding: 10px; border-radius: 10px; background: #efeae2; }
.manu-chat .bubble { max-width: 85%; }
.manu-note { align-self: center; font-size: 11.5px; color: #54656f; background: rgba(255,255,255,.75); border-radius: 8px; padding: 3px 10px; margin: 2px 0; }
.manu-typing { align-self: flex-end; font-size: 12px; color: var(--muted); font-style: italic; }
.manu-bar { display: flex; align-items: center; gap: 10px; padding: 7px 14px; background: #fff7e6; border-bottom: 1px solid #f1e2bd; font-size: 13px; color: #6b5300; }
.manu-bar span { flex: 1; }
.manu-bar.paused { background: #eef2f8; border-bottom-color: var(--line); color: var(--accent-ink); }
.bubble .by.ai { color: #9a6b00; }
.manu-gear { color: var(--muted); text-decoration: none; }
.manu-gear.on { color: #0f9d74; }
.manu-gear .dot-ai { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #0f9d74; }

/* ---------- Acabamento premium (VIP) ---------- */
:root { --gold-1: #e6c97a; --gold-2: #c9a24a; --gold-3: #a8822f; --gold-grad: linear-gradient(135deg, #e6c97a, #c9a24a 55%, #a8822f);
  --radius: 14px; --shadow: 0 1px 2px rgba(15, 27, 54, .05), 0 8px 24px rgba(15, 27, 54, .06); --bg: #f4f5f9; }
.side { background: linear-gradient(180deg, #0e1a35 0%, #13213f 55%, #172a50 100%); border-right: 1px solid rgba(201, 162, 74, .18); }
.brand-word { background: linear-gradient(180deg, #fff, #e9e4d6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crest { margin: -8px 10px 14px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(230, 201, 122, .14), rgba(201, 162, 74, .04)); border: 1px solid rgba(201, 162, 74, .35); }
.crest b { display: block; color: #fff; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crest small { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a { transition: background .15s, color .15s; }
.nav a.active { background: linear-gradient(90deg, rgba(201, 162, 74, .22), rgba(201, 162, 74, .04)); color: #fff; box-shadow: inset 3px 0 0 var(--gold-2); }
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px); position: relative; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 162, 74, .55), transparent); }
.topbar h1 { letter-spacing: -.01em; }
.btn { border-radius: 10px; transition: box-shadow .15s, filter .15s, border-color .15s; }
.btn.primary { background: linear-gradient(135deg, #1b2f57, #24427c); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 2px 8px rgba(27, 47, 87, .25); }
.btn.primary:hover { box-shadow: 0 0 0 2px rgba(201, 162, 74, .45), 0 4px 14px rgba(27, 47, 87, .3); filter: none; }
.card { border-color: #e7e8ef; }
.kpi .label { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.kpi .value { color: var(--brand-navy); }
.kpi:not(.bad) { background: linear-gradient(180deg, #fff, #fbfbfd); position: relative; overflow: hidden; }
.kpi:not(.bad)::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: var(--gold-grad); opacity: .7; }
.login { background: radial-gradient(ellipse at 15% 0%, rgba(44, 79, 143, .55), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(201, 162, 74, .22), transparent 55%), #0b1530; }
.login form { border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35), 0 0 0 1px rgba(201, 162, 74, .25); position: relative; overflow: hidden; }
.login form::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold-grad); }

/* Painel AF: visão macro */
.af-panel { min-width: 0; }
.af-hero { background: linear-gradient(135deg, #0e1a35 0%, #1b2f57 60%, #243f73 100%); color: #fff; border-radius: 18px; padding: 22px 24px; margin-bottom: 16px; position: relative; overflow: hidden; box-shadow: 0 12px 40px rgba(14, 26, 53, .25); }
.af-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(230, 201, 122, .28), transparent 70%); }
.af-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.af-hello { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.af-sub { color: #aeb9d3; font-size: 13px; margin-top: 2px; }
.af-sub::first-letter { text-transform: uppercase; }
.af-alert { border: 1px solid rgba(255, 140, 120, .5); background: rgba(224, 69, 58, .18); color: #ffd6cf; border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.af-ok { color: #9fe3c7; font-weight: 700; font-size: 13px; padding: 6px 0; }
.af-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; position: relative; z-index: 1; }
.af-metrics > div { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 12px 14px; }
.af-metrics span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #aeb9d3; }
.af-metrics b { display: block; font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.af-metrics > div:first-child b { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.af-metrics small { display: block; color: #aeb9d3; font-size: 12px; margin-top: 2px; }
.af-toolbar { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.af-toolbar .seg { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; }
.af-toolbar .seg.on { background: var(--brand-navy); color: #fff; }
.af-toolbar .seg i { font-style: normal; margin-left: 4px; background: rgba(224, 69, 58, .15); color: var(--red); border-radius: 999px; padding: 0 7px; font-size: 12px; }
.af-toolbar .seg.on i { background: rgba(255, 255, 255, .2); color: #fff; }
.af-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.af-card { min-width: 0; background: #fff; border: 1px solid #e7e8ef; border-radius: 16px; padding: 16px; display: grid; gap: 14px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; position: relative; }
.af-card > * { min-width: 0; }
.af-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15, 27, 54, .1); }
.af-card.warn { border-color: rgba(224, 69, 58, .35); }
.af-card.warn::before { content: 'Atenção'; position: absolute; top: -9px; right: 16px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.af-card.off { opacity: .6; }
.af-card header { display: flex; gap: 12px; align-items: center; }
.af-mono { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #1b2f57, #2c4f8f); box-shadow: inset 0 0 0 2px rgba(230, 201, 122, .55); }
.af-name { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-card header small { color: var(--muted); font-size: 12px; }
.af-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.af-chips span { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.af-chips span.on { background: var(--green-soft); color: var(--green-ink); }
.af-chips span.on::before { content: '● '; }
.af-chips span.on.gold { background: #fbf3df; color: #8a6a1f; }
.af-chips span.off { background: #f2f3f7; color: #9a9aab; }
.af-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.af-nums > div { padding: 10px 4px; text-align: center; }
.af-nums > div + div { border-left: 1px solid var(--line); }
.af-nums b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--brand-navy); }
.af-nums small { color: var(--muted); font-size: 11px; }
.af-nums .hot b { color: var(--red); }
.af-card footer .btn { width: 100%; justify-content: center; }
.af-foot { color: var(--muted); font-size: 12px; margin-top: 14px; }
.af-pop { position: fixed; top: 0; left: 0; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(15, 27, 54, .18); padding: 6px; display: grid; min-width: 210px; }
.af-pop button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.af-pop button:hover { background: #f4f5f9; }
.af-pop button.danger { color: var(--red); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.af-pop button.danger:hover { background: var(--red-soft); }
@media (max-width: 900px) { .af-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .af-hero { padding: 18px; border-radius: 16px; } .af-hello { font-size: 19px; } .af-metrics b { font-size: 20px; } .af-toolbar { display: flex; overflow-x: auto; } .crest { display: none; } }

/* ---------- Alto padrão e fácil de usar ----------
   Paleta: azul-meia-noite, champanhe (dourado suave) e fundo pérola. Letras e botões maiores,
   contraste alto e áreas de toque largas: quem tem mais idade usa sem esforço. */
:root {
  --night-1: #0a1226; --night-2: #0f1c3a; --night-3: #18295a;
  --champagne: #c8a45c; --champagne-2: #e4cc95; --champagne-soft: #f7f0e1; --champagne-ink: #7d5f22;
  --gold-2: var(--champagne); --brand-gold: var(--champagne); --brand-violet: var(--champagne);
  --gold-grad: linear-gradient(135deg, #ecd9a8, #c8a45c 55%, #a8843c);
  --bg: #f4f2ec; --panel: #ffffff; --line: #e6e1d6; --text: #111827; --muted: #596173;
  --accent: #0f1c3a; --accent-ink: #0f1c3a; --accent-soft: #e9ecf4; --accent-grad: linear-gradient(135deg, #0f1c3a, #1d3570);
  --ink: #0a1226; --ink-2: #16264d; --ink-line: rgba(200, 164, 92, .18); --ink-soft: #a9b3c9;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10, 18, 38, .05), 0 10px 30px rgba(10, 18, 38, .06);
  font-size: 15px;
}
body { background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--champagne-2); color: var(--night-1); }
:focus-visible { outline: 3px solid var(--champagne-2); outline-offset: 2px; }

/* Menu lateral: grupos com nome (Atender, Acompanhar, Configurar) */
.side { background: linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 60%, var(--night-3) 100%); border-right: 1px solid rgba(200, 164, 92, .2); width: auto; }
.shell { grid-template-columns: 236px 1fr; }
.side { scrollbar-width: thin; scrollbar-color: rgba(200, 164, 92, .35) transparent; }
.nav { display: grid; gap: 2px; }
.nav a { padding: 10px 12px; border-radius: 12px; color: #c3cad9; font-size: 14.5px; }
.nav a svg { width: 20px; height: 20px; flex: 0 0 auto; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(200, 164, 92, .24), rgba(200, 164, 92, .05)); color: #fff; box-shadow: inset 3px 0 0 var(--champagne); }
.nav a.active svg { color: var(--champagne-2); }
.nav .sep { height: auto; background: none; margin: 14px 12px 4px; }
.nav .sep span { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(228, 204, 149, .75); }
.nav .sep:not(:has(span)) { height: 1px; background: var(--ink-line); }

/* Topo e conteúdo */
.topbar { padding: 16px 28px; background: rgba(255, 255, 255, .9); }
.topbar h1 { font-size: 21px; color: var(--night-1); }
.content { padding: 24px 28px; }

/* Botões e campos: maiores e com toque firme */
.btn { min-height: 42px; padding: 9px 16px; border-radius: 12px; font-size: 14.5px; border-color: #ddd7ca; justify-content: center; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.btn.primary { background: linear-gradient(135deg, #0f1c3a, #1d3570); box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 4px 14px rgba(15, 28, 58, .22); }
.btn.primary:hover { box-shadow: 0 0 0 3px rgba(200, 164, 92, .45), 0 6px 18px rgba(15, 28, 58, .28); }
.btn:active { transform: translateY(1px); }
input, select, textarea { min-height: 44px; border-radius: 12px; border-color: #dcd6c9; padding: 10px 12px; }
textarea { min-height: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(200, 164, 92, .35); border-color: var(--champagne); }
label { font-size: 13px; color: #4b5263; }
.card { border-color: #ebe6db; border-radius: var(--radius); }
.card h3 { font-size: 15.5px; padding: 16px 18px; color: var(--night-1); }
.card .body { padding: 16px 18px; }
.chip { min-height: 36px; padding: 7px 14px; font-size: 13.5px; background: #efece4; color: #3d4352; }
.chip.on { background: var(--night-2); color: #fff; }
.chip.on .count { background: rgba(255, 255, 255, .2); color: #fff; }
.badge { min-width: 22px; height: 22px; }
.toast { font-size: 15px; border-radius: 14px; }
.modal { border-radius: 20px; }
.modal h2 { color: var(--night-1); }
.muted { color: var(--muted); }
.kpi .value { color: var(--night-1); }
.crest { border-color: rgba(200, 164, 92, .4); }

/* Botão "Online/Ausente" mais visível */
.side .me .presence-toggle { min-height: 48px; border-radius: 14px; }

/* ---------- Modo de atendimento ---------- */
.mode-page { display: grid; gap: 18px; max-width: 1080px; }
.mode-intro { margin: 0; font-size: 16px; color: #3d4352; }
.mode-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mode-card { position: relative; display: grid; align-content: start; gap: 6px; text-align: left; background: #fff; border: 1.5px solid #e3ddcf; border-radius: 20px; padding: 22px 20px 18px; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; color: var(--text); font: inherit; }
.mode-card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(10, 18, 38, .1); border-color: var(--champagne); }
.mode-card.on { border-color: var(--champagne); background: linear-gradient(180deg, #fffaf0, #fff 60%); box-shadow: 0 0 0 3px rgba(200, 164, 92, .28), 0 16px 36px rgba(10, 18, 38, .1); }
.mode-check { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; border: 2px solid #dcd6c9; color: transparent; }
.mode-card.on .mode-check { background: var(--gold-grad); border-color: transparent; color: var(--night-1); }
.mode-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--champagne-soft); margin-bottom: 6px; }
.mode-title { font-size: 19px; color: var(--night-1); }
.mode-tag { justify-self: start; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--champagne-ink); background: var(--champagne-soft); padding: 3px 10px; border-radius: 999px; }
.mode-lead { font-size: 15px; font-weight: 600; margin-top: 4px; }
.mode-card ul { margin: 6px 0 4px; padding: 0; list-style: none; display: grid; gap: 6px; }
.mode-card li { font-size: 14px; color: #3d4352; padding-left: 24px; position: relative; line-height: 1.35; }
.mode-card li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #0f9d74; font-weight: 900; }
.mode-cta { margin-top: 10px; text-align: center; font-weight: 800; padding: 11px; border-radius: 12px; background: var(--night-2); color: #fff; }
.mode-card.on .mode-cta { background: var(--champagne-soft); color: var(--champagne-ink); }
.mode-warn { border-color: #f1d58a; background: #fffaeb; }
.mode-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; line-height: 1.45; }
@media (max-width: 900px) { .mode-pick { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Alarme de paciente esperando ---------- */
.alarm-banner { position: relative; z-index: 5; flex: 0 0 auto; margin: 10px 12px 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 18px; cursor: pointer; text-align: left; color: #fff; font: inherit;
  background: linear-gradient(135deg, #b42318, #e0453a); box-shadow: 0 16px 40px rgba(180, 35, 24, .35); animation: alarm-pulse 1.4s infinite; }
.alarm-bell { font-size: 26px; animation: alarm-ring 1.4s infinite; }
.alarm-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.alarm-text b { font-size: 15.5px; }
.alarm-text small { font-size: 12.5px; opacity: .9; }
.alarm-go { flex: 0 0 auto; background: #fff; color: #b42318; font-weight: 900; padding: 10px 16px; border-radius: 12px; }
@keyframes alarm-pulse { 50% { box-shadow: 0 0 0 8px rgba(224, 69, 58, .25), 0 16px 40px rgba(180, 35, 24, .35); } }
@keyframes alarm-ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }

/* ---------- "Você está aí?" ---------- */
.idle-bg { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(10, 18, 38, .62); backdrop-filter: blur(4px); }
.idle-card { width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 28px 24px 22px; text-align: center; display: grid; gap: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); position: relative; overflow: hidden; }
.idle-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gold-grad); }
.idle-emoji { font-size: 46px; }
.idle-card h2 { margin: 0; font-size: 26px; color: var(--night-1); }
.idle-card p { margin: 0; font-size: 16px; color: #3d4352; line-height: 1.45; }
.idle-card .btn { width: 100%; min-height: 54px; font-size: 18px; }
.idle-card small { font-size: 13px; }

/* ---------- Sininho de avisos da AF ---------- */
.bell { position: relative; border: 1px solid #e3ddcf; background: #fff; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; cursor: pointer; color: var(--night-1); flex: 0 0 auto; }
.bell:hover { border-color: var(--champagne); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.bell-pop { position: fixed; z-index: 75; width: min(400px, calc(100vw - 16px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(10, 18, 38, .22); overflow: hidden; }
.bell-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 16px; }
.bell-list { overflow: auto; }
.bell-item { display: flex; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f0ece3; background: #fff; padding: 12px 16px; cursor: pointer; font: inherit; color: var(--text); }
.bell-item:hover { background: #faf8f3; }
.bell-item.new { background: #fffaf0; box-shadow: inset 3px 0 0 var(--champagne); }
.bell-item .grow { display: grid; gap: 2px; min-width: 0; }
.bell-item small { font-size: 12.5px; color: var(--champagne-ink); font-weight: 700; }
.bell-item small.muted { color: var(--muted); font-weight: 500; }
.bell-body { font-size: 13.5px; color: #3d4352; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-ico { font-size: 20px; }

/* ---------- Extremo luxo ----------
   Para clientes que faturam milhões: títulos em serifa clássica (Cormorant Garamond), números grandes
   e elegantes, fundo pérola com luz suave, filetes dourados finos e sombras discretas. */
:root { --serif: 'Cormorant Garamond', 'Times New Roman', serif; --hair: rgba(200, 164, 92, .38); }
body { background: radial-gradient(1200px 600px at 85% -10%, rgba(200, 164, 92, .08), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(21, 41, 90, .06), transparent 60%), var(--bg); background-attachment: fixed; }
.topbar h1, .help-hero h2, .hub-head h2, .af-hello, .bill-hero b, .mode-title, .iv-q, .idle-card h2, .agent-head b, .manu-hero h2 {
  font-family: var(--serif); font-weight: 700; letter-spacing: .005em; }
.topbar h1 { font-size: 30px; line-height: 1.05; }
.af-hello { font-size: 32px; }
.help-hero h2, .hub-head h2 { font-size: 30px; }
.agent-head b { font-size: 22px; }
.mode-title { font-size: 25px; }
.iv-q { font-size: 28px; }
.kpi .value, .af-metrics b, .port b, .af-nums b { font-family: var(--serif); font-weight: 700; letter-spacing: .01em; }
/* Números retos (sem o "0" com cara de letra "o" da serifa clássica). */
.topbar h1, .af-hello, .bill-hero b, .kpi .value, .af-metrics b, .port b, .af-nums b, .card h3, .iv-q, .mode-title { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: 'lnum' 1, 'tnum' 1; }
.kpi .value { font-size: 36px; }
.af-metrics b { font-size: 34px; }
.card h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: .005em; }
.card h3 .muted, .card h3 small, .card h3 .badge, .card h3 .btn { font-family: 'Manrope', system-ui, sans-serif; letter-spacing: 0; }
.side { background: linear-gradient(180deg, #05080f 0%, #0a1226 55%, #101d3c 100%); box-shadow: inset -1px 0 0 var(--hair); }
.brand-word { letter-spacing: .08em; }
.crest { background: linear-gradient(135deg, rgba(236, 217, 168, .12), rgba(200, 164, 92, .02)); border-color: var(--hair); }
.topbar { background: rgba(252, 251, 248, .86); }
.topbar::after { background: linear-gradient(90deg, transparent, var(--champagne), transparent); opacity: .7; }
.card, .agent, .help-topic, .af-card, .hub-tile, .mode-card { border-color: #ece6d8; box-shadow: 0 1px 1px rgba(10, 18, 38, .03), 0 18px 40px -18px rgba(10, 18, 38, .16); }
.card, .agent { border-radius: 22px; }
.af-hero, .help-hero, .bill-hero, .hub-head { background: linear-gradient(135deg, #05080f 0%, #0d1838 55%, #1a2d5e 100%); box-shadow: 0 30px 60px -30px rgba(5, 8, 15, .6), inset 0 0 0 1px rgba(200, 164, 92, .18); }
.af-metrics > div { background: rgba(255, 255, 255, .04); border-color: rgba(200, 164, 92, .18); }
.btn.primary { background: linear-gradient(135deg, #070b17, #15295a); color: #fff; box-shadow: inset 0 0 0 1px rgba(200, 164, 92, .45), 0 10px 24px -10px rgba(7, 11, 23, .55); letter-spacing: .01em; }
.btn.primary:hover { box-shadow: inset 0 0 0 1px var(--champagne-2), 0 14px 30px -10px rgba(7, 11, 23, .6); }
.btn { border-color: #e2dccd; }
.chip.on, .af-tabs button.on, .af-toolbar .seg.on { background: linear-gradient(135deg, #070b17, #15295a); box-shadow: inset 0 0 0 1px rgba(200, 164, 92, .4); }
.nav a { letter-spacing: .01em; }
.nav a.active { background: linear-gradient(90deg, rgba(200, 164, 92, .2), rgba(200, 164, 92, .02)); box-shadow: inset 2px 0 0 var(--champagne); }
.login { background: radial-gradient(ellipse at 15% 0%, rgba(26, 45, 94, .7), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(200, 164, 92, .25), transparent 55%), #04060c; }
.login .brand-word { font-family: var(--serif); font-size: 38px; letter-spacing: .06em; color: var(--night-1); }
.login form { border-radius: 26px; padding: 40px 36px; }
@media (max-width: 760px) {
  .topbar h1 { font-size: 26px; }
  .af-hello, .help-hero h2, .hub-head h2 { font-size: 26px; }
  .kpi .value { font-size: 30px; }
}

/* ---------- Agente AF (onde melhorar) ---------- */
.agent { background: #fff; border: 1px solid #ebe6db; border-radius: 20px; box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.agent-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.agent-head .grow { display: grid; gap: 2px; min-width: 220px; }
.agent-head b { font-size: 17px; color: var(--night-1); }
.agent-head small { color: var(--muted); font-size: 13px; }
.agent-ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 20px; color: var(--night-1); background: var(--gold-grad); box-shadow: 0 6px 18px rgba(200, 164, 92, .35); }
.agent-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.agent-counts i { font-style: normal; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.agent-counts i.red { background: var(--red-soft); color: #a1271d; }
.agent-counts i.amber { background: var(--amber-soft); color: #7a5300; }
.agent-counts i.blue { background: var(--blue-soft); color: #2c3fb0; }
.agent-list { display: grid; gap: 8px; margin-top: 14px; }
.agent-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid #f0ece3; background: #fcfbf8; flex-wrap: wrap; }
.agent-item.alta { border-left: 3px solid var(--red); }
.agent-item.media { border-left: 3px solid var(--amber); }
.agent-item.oportunidade { border-left: 3px solid #3446c4; }
.agent-item .grow { display: grid; gap: 2px; min-width: 220px; }
.agent-item b { font-size: 14.5px; }
.agent-item small { font-size: 13px; color: var(--muted); }
.agent-more { margin-top: 10px; }
.agent-ok { margin: 12px 0 0; color: var(--green-ink); font-weight: 700; }

/* ---------- Equipe: carteiras e redistribuição em % ---------- */
.team { display: grid; gap: 14px; }
.orphan { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: #fff7e6; border: 1px solid #f1d58a; margin-bottom: 12px; }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.port { border: 1px solid #ebe6db; border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.port b { font-size: 24px; color: var(--night-1); }
.port span { font-size: 13.5px; color: var(--muted); }
.pct-list { display: grid; gap: 8px; margin-top: 8px; }
.pct-row { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border: 1px solid #ebe6db; border-radius: 12px; font-size: 15px; color: var(--text); font-weight: 600; }
.pct-row input { width: 90px; text-align: right; }
.pct-total { margin-top: 10px; font-weight: 800; font-size: 16px; color: var(--red); }
.pct-total.ok { color: var(--green-ink); }

/* ---------- Engrenagem: botão e painel de atalhos (Ajustes e mais) ---------- */
.gear-btn { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(200, 164, 92, .35); background: linear-gradient(135deg, rgba(200, 164, 92, .14), rgba(200, 164, 92, .03)); color: #fff; font: inherit; font-weight: 800; font-size: 14.5px; cursor: pointer; text-align: left; }
.gear-btn svg { width: 24px; height: 24px; color: var(--champagne-2); transition: transform .5s ease; flex: 0 0 auto; }
.gear-btn:hover svg, .gear-btn.active svg { transform: rotate(90deg); }
.gear-btn span { display: grid; gap: 1px; }
.gear-btn small { font-weight: 500; font-size: 11.5px; color: var(--ink-soft); }
.gear-btn.active, .gear-btn:hover { border-color: var(--champagne); }
.tabbar .tab-gear.active { color: #fff; background: rgba(200, 164, 92, .2); box-shadow: inset 0 0 0 1px rgba(200, 164, 92, .35); }
.tabbar .tab-gear.active svg { color: var(--champagne-2); }
.hub-bg { position: fixed; inset: 0; z-index: 70; background: rgba(5, 8, 18, .55); backdrop-filter: blur(6px); display: flex; justify-content: flex-end; opacity: 0; transition: opacity .18s; }
.hub-bg.open { opacity: 1; }
.hub { width: min(560px, 100vw); height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .35); transform: translateX(24px); transition: transform .22s ease; }
.hub-bg.open .hub { transform: none; }
.hub-head { display: flex; align-items: center; gap: 14px; padding: calc(20px + env(safe-area-inset-top)) 22px 16px; background: linear-gradient(135deg, var(--night-1), var(--night-3)); color: #fff; }
.hub-head h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.hub-head small { color: #aeb9d3; font-size: 13px; }
.hub-gear { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; border: 1px solid rgba(200, 164, 92, .45); color: var(--champagne-2); }
.hub-gear svg { width: 26px; height: 26px; animation: hub-spin 6s linear infinite; }
@keyframes hub-spin { to { transform: rotate(360deg); } }
.hub-x { color: #fff; font-size: 28px; }
.hub-x:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.hub-search { margin: 16px 22px 4px; width: auto; font-size: 16px; min-height: 50px; }
.hub-body { flex: 1; overflow-y: auto; padding: 8px 22px calc(28px + env(safe-area-inset-bottom)); }
.hub-group h3 { margin: 18px 0 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--champagne-ink); }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid #ebe6db; text-decoration: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; min-height: 76px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.hub-tile:hover { border-color: var(--champagne); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(10, 18, 38, .08); }
.hub-tile.danger b { color: var(--red); }
.hub-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; background: var(--champagne-soft); color: var(--night-2); font-weight: 900; font-size: 17px; }
.hub-ico svg { width: 22px; height: 22px; }
.hub-ico.on { color: #0f9d74; font-size: 22px; }
.hub-txt { display: grid; gap: 2px; min-width: 0; }
.hub-txt b { font-size: 15px; line-height: 1.25; }
.hub-txt small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.hub-none { padding: 20px 0; }
@media (max-width: 760px) {
  .hub { width: 100vw; }
  .hub-grid { grid-template-columns: minmax(0, 1fr); }
  .hub-tile { min-height: 68px; }
  .hub-txt b { font-size: 16px; }
}

/* ---------- Engrenagem "Mais opções" no menu (versão anterior) ---------- */
.gear { margin-top: 10px; border-top: 1px solid var(--ink-line); padding-top: 10px; }
.gear-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; color: #c3cad9; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; text-align: left; }
.gear-toggle svg { width: 20px; height: 20px; flex: 0 0 auto; transition: transform .35s ease; }
.gear-toggle:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.gear.open .gear-toggle { color: #fff; }
.gear.open .gear-toggle svg { transform: rotate(90deg); color: var(--champagne-2); }
.gear-caret { margin-left: auto; transition: transform .2s; font-size: 12px; opacity: .8; }
.gear.open .gear-caret { transform: rotate(180deg); }
.gear-list { display: none; gap: 2px; padding: 4px 0 0 10px; margin-left: 10px; border-left: 1px solid rgba(200, 164, 92, .25); }
.gear.open .gear-list { display: grid; }
.gear-list a { font-size: 14px; padding: 8px 12px; }
@media (max-width: 760px) { .gear-toggle { padding: 13px 12px; font-size: 16px; } .gear-list a { font-size: 15.5px; padding: 11px 12px; } }

/* ---------- Como funciona (ajuda) ---------- */
.help { display: grid; gap: 16px; max-width: 920px; }
.help-hero { padding: 26px 24px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, var(--night-1), var(--night-3)); display: grid; gap: 8px; position: relative; overflow: hidden; }
.help-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(230, 201, 122, .3), transparent 70%); }
.help-hero h2 { margin: 0; font-size: 24px; }
.help-hero p { margin: 0; font-size: 16px; color: #c9d0de; max-width: 620px; line-height: 1.5; }
.help-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; position: relative; z-index: 1; }
.help-steps div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 12px; font-size: 14px; line-height: 1.35; }
.help-steps b { display: block; font-size: 22px; color: var(--champagne-2); margin-bottom: 4px; }
.help-search { font-size: 16px; }
.help-topic { background: #fff; border: 1px solid #ebe6db; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.help-topic summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; font-size: 17px; font-weight: 800; color: var(--night-1); }
.help-topic summary::-webkit-details-marker { display: none; }
.help-topic summary .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--champagne-soft); flex: 0 0 auto; }
.help-topic summary small { display: block; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.help-topic summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.help-topic[open] summary::after { transform: rotate(180deg); }
.help-body { padding: 0 18px 18px 76px; font-size: 15.5px; line-height: 1.55; color: #2b3140; }
.help-body ul, .help-body ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.help-body p { margin: 0 0 10px; }
.help-body .go { margin-top: 4px; }
.help-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
@media (max-width: 760px) { .help-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .help-body { padding: 0 16px 16px; } .help-hero h2 { font-size: 21px; } }

/* ---------- Entrevista da Manu ---------- */
.interview { width: min(620px, 100%); display: grid; gap: 10px; }
.iv-top { display: flex; align-items: center; }
.iv-step { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--champagne-ink); }
.iv-bar { height: 6px; border-radius: 4px; background: #efe9dc; overflow: hidden; }
.iv-bar i { display: block; height: 100%; background: var(--gold-grad); border-radius: 4px; transition: width .2s; }
.iv-intro { margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--champagne-soft); font-size: 14.5px; line-height: 1.45; }
.iv-q { margin: 8px 0 0; font-size: 22px; line-height: 1.25; color: var(--night-1); }
.iv-help { margin: 0; font-size: 15px; color: #4b5263; }
.iv-a { font-size: 16px; line-height: 1.45; min-height: 150px; }
.iv-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.iv-foot { margin: 0; font-size: 13px; }

/* ---------- Painel AF: abas, situação do cliente, acessar empresa ---------- */
.af-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.af-tabs button { border: 1px solid #e3ddcf; background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 800; font-size: 14px; cursor: pointer; color: #3d4352; min-height: 42px; }
.af-tabs button.on { background: var(--night-2); border-color: var(--night-2); color: #fff; }
.af-toolbar .seg i.plain { background: rgba(15, 28, 58, .08); color: inherit; }
.situ { font-weight: 800; }
.situ.ativo { color: var(--green-ink); }
.situ.pagamento { color: var(--red); }
.situ.inativo { color: var(--muted); }
.access-list { display: grid; gap: 8px; }
.access-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #ebe6db; border-radius: 14px; }
.access-row .grow { display: grid; gap: 2px; min-width: 0; }
.access-row small { font-size: 13px; }
@media (max-width: 760px) { .af-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .af-tabs::-webkit-scrollbar { display: none; } .af-tabs button { flex: 0 0 auto; } .access-row { flex-wrap: wrap; } .access-row .btn { width: 100%; } }

/* ---------- Mensalidade (tela do dono) ---------- */
.bill { display: grid; gap: 16px; max-width: 760px; }
.bill-hero { padding: 22px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, var(--night-1), var(--night-3)); display: grid; gap: 6px; }
.bill-hero.late { background: linear-gradient(135deg, #7a1d16, #c0352b); }
.bill-hero b { font-size: 30px; }
.pix-box { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: #f7f4ec; }
.pix-box textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: 90px; }
.bill-banner { display: flex; align-items: center; gap: 12px; margin: 10px 12px 0; padding: 12px 14px; border-radius: 16px; background: #fff7e6; border: 1px solid #f1d58a; color: #6b5300; font-weight: 700; cursor: pointer; }
.bill-banner.late { background: var(--red-soft); border-color: #f3b4ae; color: #a1271d; }
.bill-banner span { flex: 1; }

/* ---------- Letra maior (opção no menu) ---------- */
html.big-text .main, html.big-text .tabbar { zoom: 1.14; }
.text-size { display: flex; gap: 6px; margin: 10px 0 2px; }
.text-size button { flex: 1; min-height: 36px; border-radius: 10px; border: 1px solid rgba(200, 164, 92, .35) !important; background: rgba(255, 255, 255, .04) !important; color: #e8ecf5 !important; text-decoration: none !important; font-weight: 800; margin: 0 !important; padding: 0 !important; }
.text-size button.on { background: rgba(200, 164, 92, .25) !important; color: #fff !important; }

/* ---------- Responsivo ---------- */
@media (min-width: 1281px) { [data-show-panel] { display: none; } }
@media (max-width: 1000px) { .manu-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1280px) {
  .inbox { grid-template-columns: 340px 1fr; }
  .lead-panel { display: none; }
  .inbox.show-panel .lead-panel { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 100vw); z-index: 30; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
}
/* Peças que só existem no celular */
.tabbar, .menu-backdrop, .pill-alert .short, .mobile-only { display: none; }
.panel-close { display: none; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.board-wrap { display: flex; flex-direction: column; width: 100%; min-height: 0; }
@media (max-width: 1280px) { .panel-close { display: block; } }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: 100vh; height: 100dvh; }
  .main { grid-row: 1; }

  /* Menu completo vira gaveta lateral, aberta pelo botão "Menu" */
  .side { position: fixed; inset: 0 auto 0 0; width: min(280px, 85vw); z-index: 45; transform: translateX(-100%); transition: transform .2s ease; overflow-y: auto; padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .shell.menu-open .side { transform: none; box-shadow: 10px 0 40px rgba(0, 0, 0, .35); }
  .shell.menu-open .menu-backdrop { display: block; position: fixed; inset: 0; background: rgba(11, 11, 16, .5); z-index: 44; }
  .nav a { padding: 12px; }

  /* Abas embaixo, no alcance do polegar */
  .tabbar { display: flex; grid-row: 2; background: var(--ink); border-top: 1px solid var(--ink-line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: #a3a3b5; font-size: 11px; font-weight: 700; text-decoration: none; border-radius: 8px; cursor: pointer; min-width: 0; }
  .tabbar span:not(.badge) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar a.active { color: #fff; background: rgba(201, 162, 74, .16); }
  .tabbar a.active svg { color: var(--brand-violet); }
  .tabbar .badge { position: absolute; top: 0; left: 50%; margin-left: 4px; min-width: 18px; height: 18px; font-size: 11px; }

  /* Barra do topo compacta */
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  .topbar h1 { font-size: 17px; }
  .topbar [data-actions]:not(:empty) { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 8px; }
  .topbar [data-actions] select { flex: 1 1 100%; width: 100%; }
  .topbar [data-actions] .mode-tabs { flex: 1 1 auto; }
  .topbar [data-actions] .mode-tabs button { flex: 1; }
  .pill-alert { padding: 5px 12px; }
  .pill-alert .long { display: none; }
  .pill-alert .short { display: inline; }
  .content { padding: 16px; }
  .support-banner { flex-wrap: wrap; padding: 8px 16px; font-size: 13px; }

  /* Campos com 16px: evita o zoom automático do iPhone ao tocar */
  input, select, textarea { font-size: 16px; }
  .btn { padding: 10px 14px; }
  .btn.small { padding: 7px 11px; }

  /* Atendimento: lista OU conversa; conversa aberta ocupa a tela toda (como no WhatsApp) */
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox.has-lead .list { display: none; }
  .inbox:not(.has-lead) .thread { display: none; }
  .shell:has(.inbox.has-lead) .tabbar, .shell:has(.inbox.has-lead) .topbar { display: none; }
  .thread .head { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; gap: 8px; }
  .thread .msgs { padding: 12px; }
  .composer { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .inbox.show-panel .lead-panel { width: 100vw; padding-top: env(safe-area-inset-top); }
  .hide-sm { display: none; }
  .thread .msgs { padding: 10px 12px; }
  .thread .head { padding: calc(6px + env(safe-area-inset-top)) 8px 6px; }
  .funnel-bar, .next-step { padding-left: 10px; padding-right: 10px; }
  .bubble { max-width: 85%; }

  /* Funil: uma coluna por vez, deslizando */
  .mobile-only { display: block; }
  .board-hint { font-size: 12px; color: var(--muted); padding: 10px 16px 0; }
  .board { padding: 12px 16px; scroll-snap-type: x mandatory; flex: 1; }
  .col { width: 82vw; flex-basis: 82vw; scroll-snap-align: center; }

  /* Painéis e relatórios */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .value { font-size: 22px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card { overflow-x: auto; }
  .card h3 { flex-wrap: wrap; }
  .report table td:first-child { min-width: 200px; }
  td select { min-width: 130px; }

  /* Novas telas */
  .rework-actions, .rework-sugg { padding-left: 0; margin-left: 0; }
  .rework-sub { white-space: normal; }
  .hist { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 190px); }
  .hist.has-view .hist-list { display: none; }
  .hist:not(.has-view) .hist-view { display: none; }
  .hist-back { display: inline-flex; }
  .sugg-intents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step .l { font-size: 10.5px; }
  .manu-hero { flex-wrap: wrap; }
  .manu-day { grid-template-columns: 1fr 1fr auto 1fr; }
  .manu-bar { padding-left: 10px; padding-right: 10px; flex-wrap: wrap; }
  .sugg-panel { max-height: 55dvh; }

  /* Janelas e avisos */
  .modal-bg { align-items: end; padding: 0; }
  .modal { width: 100%; border-radius: 16px 16px 0 0; max-height: 92dvh; overflow-y: auto; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  #toasts { left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }

  /* Alto padrão no celular: letras de 16px, abas grandes, botões no alcance do polegar */
  :root { font-size: 16px; }
  .topbar { padding: calc(14px + env(safe-area-inset-top)) 16px 12px; }
  .topbar h1 { font-size: 21px; }
  .content { padding: 16px; }
  .btn { min-height: 48px; font-size: 15.5px; border-radius: 14px; }
  .btn.small { min-height: 40px; font-size: 14.5px; }
  .tabbar { background: linear-gradient(180deg, var(--night-2), var(--night-1)); border-top: 1px solid rgba(200, 164, 92, .25); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { min-height: 58px; justify-content: center; gap: 4px; font-size: 12px; color: #b8c1d6; border-radius: 14px; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar a.active { color: #fff; background: rgba(200, 164, 92, .2); box-shadow: inset 0 0 0 1px rgba(200, 164, 92, .35); }
  .tabbar a.active svg { color: var(--champagne-2); }
  .side { width: min(300px, 88vw); }
  .nav a { padding: 13px 12px; font-size: 16px; }
  .chip { min-height: 40px; font-size: 14.5px; }
  .card h3 { font-size: 16.5px; }
  .mode-card { padding: 20px 18px 16px; }
  /* Barra de cima compacta: uma linha só (título, botões pequenos e aviso), sobrando mais tela para o atendimento. */
  .topbar { flex-wrap: nowrap; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; min-height: 0; }
  .topbar:has([data-actions] select) { flex-wrap: wrap; }
  .topbar h1 { font-size: 20px; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar [data-actions]:not(:empty) { order: 0; flex: 0 0 auto; flex-basis: auto; flex-wrap: nowrap; gap: 6px; }
  .topbar:has([data-actions] select) [data-actions] { order: 3; flex-basis: 100%; flex-wrap: wrap; }
  .topbar .spacer { display: none; }
  .topbar [data-actions] .btn { min-height: 34px; padding: 5px 10px; font-size: 13px; border-radius: 10px; }
  .topbar .pill-alert { padding: 4px 10px; font-size: 13px; flex: 0 0 auto; animation: none; }
  .topbar .bell { width: 36px; height: 36px; border-radius: 11px; }
  .list-head { padding: 8px 10px 4px; }
  .search input { padding: 7px 0; }
  .alarm-banner { margin: calc(8px + env(safe-area-inset-top)) 8px 0; padding: 10px 12px; }
  .alarm-banner + .topbar { padding-top: 12px; }
  .alarm-go { padding: 10px 12px; }
}

/* ---------- Agenda estilo iCloud: cor = situação ---------- */
.t-confirmado { --c: #1f9d55; } .t-agendado { --c: #e0a100; } .t-cancelado { --c: #d93a3a; }
.t-compareceu { --c: #2f6fd6; } .t-faltou { --c: #8a6fb0; } .t-rotina { --c: #7a8394; }
.ev { border-radius: 8px; border-left-width: 4px; }
.ev.t-agendado { background: #fff6d6; } .ev.t-confirmado { background: #ddf3e6; } .ev.t-cancelado { background: #fde4e4; text-decoration: line-through; color: #9b2c2c; }
.ev.t-compareceu { background: #e3ecfb; } .ev.t-faltou { background: #efe9f6; } .ev.t-rotina { background: repeating-linear-gradient(135deg, #f1f2f5 0 6px, #e7e9ee 6px 12px); }
.ev .ev-line b { color: color-mix(in srgb, var(--c) 80%, #000); }
.ical-bar { gap: 10px; }
.ical-title { display: flex; align-items: baseline; gap: 8px; margin-right: auto; min-width: 0; }
.ical-title b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 700; letter-spacing: .2px; line-height: 1; }
.ical-title span { font-size: 13px; white-space: nowrap; }
.ical-seg { display: inline-flex; background: #ecebe6; border-radius: 10px; padding: 3px; }
.ical-seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.ical-seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ical-nav { gap: 4px; }
.ical { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.ical-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; position: sticky; top: 8px; }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13.5px; }
.mini-head button { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); padding: 0 6px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-grid .mw { font-size: 10.5px; color: var(--muted); font-weight: 700; padding: 2px 0; }
.mini-grid .md { border: 0; background: none; font-size: 12px; aspect-ratio: 1; border-radius: 50%; cursor: pointer; color: var(--text); padding: 0; font-variant-numeric: tabular-nums; }
.mini-grid .md.out { color: #b9b9c3; }
.mini-grid .md.sel { background: var(--accent-soft); }
.mini-grid .md.today { background: #d93a3a; color: #fff; font-weight: 800; }
.mini-grid .md:hover { outline: 1px solid var(--line); }
.ical-legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; }
.lg-title { width: 100%; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 800; margin-top: 4px; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.lg.confirmado { --c: #1f9d55; } .lg.agendado { --c: #e0a100; } .lg.cancelado { --c: #d93a3a; } .lg.compareceu { --c: #2f6fd6; } .lg.faltou { --c: #8a6fb0; } .lg.rotina { --c: #7a8394; }
.lg-toggle { width: 100%; gap: 6px; margin: 6px 0 0; font-size: 12.5px; }
.lg-toggle input { width: auto; }
.ical-pros { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.pro-pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.pro-pill.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pro-head { font-weight: 800; }
.cal-colhead small { color: var(--muted); font-weight: 500; font-size: 11px; }
.ical-cal .cal-colhead { flex-direction: column; gap: 0; }
.ical-cal .cal-colhead .dn.today { background: #d93a3a; }
.month { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mhead { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.mhead span { padding: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); text-align: right; }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(104px, 1fr); }
.mcell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.mcell:nth-child(7n) { border-right: 0; }
.mcell:hover { background: #fbfaf7; }
.mcell.out { background: #faf9f6; } .mcell.out .mday { color: #b9b9c3; }
.mday { align-self: flex-end; font-size: 13px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.mcell.today .mday { background: #d93a3a; color: #fff; }
.mev { display: flex; align-items: center; gap: 5px; border: 0; background: none; font-size: 11.5px; padding: 1px 3px; border-radius: 4px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.mev i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.mev:hover { background: color-mix(in srgb, var(--c) 14%, #fff); }
.mev.t-cancelado { text-decoration: line-through; color: #9b2c2c; }
.mmore { font-size: 11px; color: var(--muted); padding-left: 3px; }
.mdots { display: flex; gap: 3px; justify-content: center; } .mdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.agenda-item { border-left-color: var(--c); }
.status-pill.agendado { background: #fff3cc; color: #8a6400; }
.status-pill.confirmado { background: #ddf3e6; color: #17733f; }
.status-pill.cancelado { background: #fde4e4; color: #b42323; }
.status-pill.compareceu { background: #e3ecfb; color: #2257b0; }
.st-green { border-color: #1f9d55 !important; color: #17733f !important; }
.st-red { border-color: #d93a3a !important; color: #b42323 !important; }
.pro-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pro-row.off { opacity: .5; }
@media (max-width: 900px) {
  .ical { grid-template-columns: 1fr; }
  .ical-side { position: static; display: none; }
}
@media (max-width: 760px) {
  .ical-title b { font-size: 22px; }
  .ical-title span { display: none; }
  .ical-seg button { padding: 6px 10px; }
  .mgrid { grid-auto-rows: 64px; }
  .mcell { align-items: center; }
  .mday { align-self: center; }
}

/* ---------- Quem pode fazer o quê (Equipe) ---------- */
.perms-intro { margin: 0 16px 10px; font-size: 13px; }
.perms-table td, .perms-table th { text-align: center; }
.perms-table td:first-child, .perms-table th:first-child { text-align: left; min-width: 240px; }
.perm.yes { color: #1f9d55; font-weight: 900; } .perm.no { color: #b9b9c3; }
.perms-foot { padding: 10px 16px 14px; font-size: 12.5px; }
.badge.gold { background: var(--champagne-soft, #f7f0e1); color: var(--champagne-ink, #7d5f22); border: 1px solid #e4cc95; }

/* ---------- Campanha com imagem e destaque (Retrabalho) ---------- */
.camp-extra { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; margin-top: 6px; }
.camp-drop { display: grid; place-items: center; min-height: 92px; border: 1.5px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; font-size: 12.5px; color: var(--muted); padding: 8px; background: #fbfaf7; margin: 0; font-weight: 500; }
.camp-drop:hover { border-color: var(--brand-gold); }
.camp-drop.has { padding: 4px; border-style: solid; }
.camp-drop img { max-width: 100%; max-height: 120px; border-radius: 8px; display: block; }
.camp-help { margin: 10px 0 4px; font-size: 13px; }
.camp-help summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); }
.camp-bubble img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.camp-attn { display: block; margin-bottom: 4px; }
@media (max-width: 640px) { .camp-extra { grid-template-columns: 1fr; } }

/* ---------- Aniversário automático ---------- */
.bday-next { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.bday-next span { background: var(--champagne-soft, #f7f0e1); border-radius: 999px; padding: 3px 10px; }

/* Janelas mais altas que a tela rolam por dentro (celular e notebook). */
.modal-bg .modal { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.perms-table .switch { margin: 0; vertical-align: middle; }
.perms-table .switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.perms-table td { padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 760px) {
  .topbar:has(.ical-bar) { flex-wrap: wrap; height: auto; }
  .topbar .row:has(> .ical-bar) { flex: 1 1 100%; width: 100%; min-width: 0; }
  .ical-bar { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t a" "s n"; gap: 8px; align-items: center; }
  .ical-bar .ical-title { grid-area: t; }
  .ical-bar > .btn.primary { grid-area: a; }
  .ical-bar .ical-seg { grid-area: s; justify-self: start; }
  .ical-bar .ical-nav { grid-area: n; }
  .ical-seg button { padding: 6px 9px; }
  .ical-nav .btn { padding-left: 9px; padding-right: 9px; }
}

/* ---------- Vários números e Instagrams ---------- */
.ch-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ch-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ch-row:first-child { border-top: 0; }
.ch-row.off { opacity: .55; }
.ch-ico { font-size: 20px; }
.via-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #eef1f7; color: #34456b; white-space: nowrap; vertical-align: 1px; }
.via-tag.ig { background: #fbeaf3; color: #9b2f6d; }
