/* Fontes servidas pelo próprio sistema (sem enviar o IP do visitante ao Google) */
@font-face { font-family: 'Gilda Display'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/GildaDisplay-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Gilda Display'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/GildaDisplay-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/Montserrat-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/Montserrat-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Orbita Core: preto profundo, vermelho da logo e anéis em órbita */
:root {
  color-scheme: dark;
  --bg: #070708;
  --panel: #121214;
  --raised: #1b1b1e;
  --text: #f3ecec;
  --muted: #a2979a;
  --line: #2a2629;
  --accent: #e2302e;
  --accent-dark: #c02422;
  --accent-soft: rgba(226, 48, 46, 0.14);
  --glow: #ff6b5e;
  --ok: #3ccf7a;
  --ok-soft: rgba(60, 207, 122, 0.13);
  --danger: #ff6b5e;
  --danger-soft: rgba(255, 107, 94, 0.13);
  --warn: #f2b14c;
  --warn-soft: rgba(242, 177, 76, 0.13);
  --radius: 14px;
  --serif: "Gilda Display", "Didot", Georgia, serif;
  --sans: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: .01em; margin: 0 0 20px; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
a { color: var(--glow); cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 14px; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
  font: inherit; font-weight: 400;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input::placeholder, textarea::placeholder { color: #8f8588; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--raised); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: #4a4346; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.recording { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Entrada ---------- */

.auth { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; background: #000; }
.orbits { position: absolute; inset: 0; pointer-events: none; }
.orbit-tilt { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotateX(58deg); transform-style: preserve-3d; perspective: 900px; }
.ring {
  position: absolute; border-radius: 50%; left: 0; top: 0;
  border: 2px solid rgba(255, 150, 140, .75);
  box-shadow: 0 0 22px rgba(226, 48, 46, .55), inset 0 0 22px rgba(226, 48, 46, .45);
  animation: spin 90s linear infinite;
}
.ring.r1 { width: 380px; height: 380px; margin: -190px; opacity: .55; animation-duration: 60s; }
.ring.r2 { width: 720px; height: 720px; margin: -360px; opacity: .7; border-style: dashed; animation-direction: reverse; }
.ring.r3 { width: 1100px; height: 1100px; margin: -550px; opacity: .8; animation-duration: 140s; }
.ring.r4 { width: 1600px; height: 1600px; margin: -800px; opacity: .35; animation-duration: 200s; animation-direction: reverse; }
.moon { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a1d1d, #1a0909 60%, #000 100%); box-shadow: 0 0 40px rgba(226, 48, 46, .25); }
.moon.m1 { width: 260px; height: 260px; left: 12%; bottom: -90px; }
.moon.m2 { width: 220px; height: 220px; right: 14%; bottom: -60px; }
.moon.m3 { width: 160px; height: 160px; left: 14%; top: 6%; opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring { animation: none; } }

.auth-inner { position: relative; width: 100%; max-width: 820px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-logo { width: 230px; height: auto; filter: drop-shadow(0 0 18px rgba(226, 48, 46, .45)); }
.auth-tagline { font-family: var(--serif); font-size: clamp(20px, 3.2vw, 34px); text-wrap: balance; line-height: 1.3; margin: 26px 0 30px; text-shadow: 0 2px 18px #000; }
.btn.big { font-size: 26px; font-weight: 500; padding: 12px 0; width: min(100%, 420px); border-radius: 22px; box-shadow: 0 0 30px rgba(226, 48, 46, .35); }
.auth-card {
  width: 100%; max-width: 380px; text-align: left; padding: 24px;
  background: rgba(14, 12, 13, .82); border: 1px solid rgba(255, 150, 140, .22); border-radius: 18px;
  backdrop-filter: blur(10px); animation: rise .35s ease-out;
}
.auth-card h1 { font-size: 26px; margin-bottom: 16px; text-align: center; }
.auth-card label { margin-bottom: 14px; }
.auth-card .btn { width: 100%; margin: 6px 0 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }

/* ---------- Estrutura ---------- */

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; }
.brand .logo { width: 40px; height: auto; }

.layout { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { color: var(--text); text-decoration: none; padding: 9px 12px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; font-weight: 500; font-size: 14px; border-left: 2px solid transparent; }
.sidebar nav a:hover { background: var(--raised); }
.sidebar nav a.active { background: var(--accent-soft); color: #fff; border-left-color: var(--accent); font-weight: 700; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
main { padding: 30px; max-width: 1000px; width: 100%; }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.off { background: var(--accent); }

.banner { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; font-weight: 600; }

.segmented { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.segmented button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.segmented button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--raised); color: var(--muted); white-space: nowrap; }
.pill.green { background: var(--ok-soft); color: var(--ok); }
.pill.red { background: var(--accent-soft); color: var(--glow); }
.pill.yellow { background: var(--warn-soft); color: var(--warn); }

.sched { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sched:last-child { border-bottom: 0; }
.sched-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--glow); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; font-size: 13px; }
.sched-body { flex: 1; min-width: 0; }
.sched-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.qr { width: 260px; height: 260px; border-radius: 12px; background: #fff; padding: 10px; border: 1px solid var(--line); }
.wa-profile { display: flex; align-items: center; gap: 14px; }
.wa-profile img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }

.hint { background: var(--raised); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.hint.warn { background: var(--warn-soft); color: var(--warn); }

.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal-card { width: 100%; max-width: 640px; max-height: 85vh; overflow: auto; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 30; max-width: calc(100% - 32px); }
.toast.error { background: var(--accent); color: #fff; }

.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }

.appt { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.appt:last-child { border-bottom: 0; }
.appt-date { width: 58px; flex-shrink: 0; text-align: center; border-radius: 12px; background: var(--ok-soft); color: var(--ok); padding: 6px 0; font-weight: 700; line-height: 1.15; }
.appt-date small { display: block; font-size: 11px; font-weight: 600; }
.appt-date.pending { background: var(--warn-soft); color: var(--warn); }
.appt-body { flex: 1; min-width: 180px; }
.appt-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.switch { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.switch input { width: 44px; height: 24px; margin: 0; appearance: none; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex-shrink: 0; border: 0; padding: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 23px; }

.hours { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; }
.hours span { font-weight: 600; font-size: 14px; }
.hours input { margin: 0; }

/* ---------- Conversa (simulador e caixa de entrada) ---------- */

/* Fundo com planetinhos, anéis e estrelas, no lugar dos desenhos do WhatsApp */
.chat {
  border-radius: 12px; padding: 14px; height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  background-color: #0b0a0b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1.4'%3E%3Ccircle cx='34' cy='38' r='10'/%3E%3Cellipse cx='34' cy='38' rx='19' ry='6' transform='rotate(-18 34 38)'/%3E%3Cpath d='M118 22l2 5 5 2-5 2-2 5-2-5-5-2 5-2z'/%3E%3Ccircle cx='122' cy='112' r='6'/%3E%3Cpath d='M40 118c8-6 20-6 28 0'/%3E%3Ccircle cx='86' cy='74' r='1.6'/%3E%3Ccircle cx='14' cy='96' r='1.6'/%3E%3Cpath d='M70 140l1.5 3.5 3.5 1.5-3.5 1.5-1.5 3.5-1.5-3.5-3.5-1.5 3.5-1.5z'/%3E%3C/svg%3E");
}
.bubble { max-width: 75%; padding: 7px 11px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.bubble.client { align-self: flex-end; background: #a8201f; color: #fff; border-top-right-radius: 3px; }
.bubble.bot { align-self: flex-start; background: #1f1d20; color: var(--text); border-top-left-radius: 3px; }
.bubble.typing { color: var(--muted); font-style: italic; }
.bubble-who { font-size: 11px; font-weight: 700; opacity: .85; margin-bottom: 2px; }
.bubble-time { font-size: 10px; opacity: .7; margin-top: 3px; text-align: right; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.chat-form input:not([type=file]) { margin: 0; border-radius: 999px; padding: 11px 18px; background: var(--raised); border-color: transparent; }
.chat-form .btn { border-radius: 999px; }

.inbox { display: grid; grid-template-columns: 330px 1fr; grid-template-rows: minmax(0, 1fr); padding: 0; overflow: hidden; height: calc(100vh - 60px); min-height: 460px; }
.inbox-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: var(--panel); }
.inbox-brand { background: var(--accent); color: #140404; font-weight: 800; font-size: 22px; letter-spacing: .02em; text-align: center; padding: 10px 12px; }
.inbox-filters { display: flex; flex-direction: column; gap: 10px; margin: 12px; }
.inbox-filters input { margin: 0; border-radius: 999px; padding: 10px 18px; background: var(--raised); border-color: transparent; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chips button { flex-shrink: 0; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chips button.on { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
.inbox-list { overflow-y: auto; flex: 1; padding: 0 8px 8px; }
.inbox-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.inbox-item:hover { background: var(--raised); }
.inbox-item.on { background: #242226; }
.inbox-item-body { flex: 1; min-width: 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; object-fit: cover; display: grid; place-items: center; background: #2a2226; color: var(--glow); font-weight: 700; font-size: 17px; }
.inbox-name, .inbox-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; min-width: 0; }
.inbox-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #0b0a0b; position: relative; }
.bubble-audio { width: 260px; max-width: 100%; height: 40px; display: block; margin: 2px 0; }
.bubble-img { display: block; max-width: 260px; max-height: 320px; border-radius: 8px; margin: 2px 0 4px; }
.bubble-doc { display: inline-block; color: inherit; text-decoration: underline; margin: 2px 0; }
.inbox-ficha { position: absolute; top: 0; right: 0; bottom: 0; width: 340px; max-width: 100%; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 14px; z-index: 4; box-shadow: -8px 0 24px rgba(0, 0, 0, .35); }
.inbox-ficha[hidden] { display: none; }
.inbox-ficha h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.inbox-ficha section { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.inbox-ficha ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.inbox-ficha input { margin: 0; }
.oferta { background: var(--raised); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.oferta-valor { font-size: 16px; font-weight: 700; color: var(--accent); }
.inbox-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.inbox-empty img { width: 120px; opacity: .5; }
.inbox-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.inbox-head b { font-size: 16px; }
.inbox-back { display: none; }
.inbox-pic { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.inbox-thread .lead-card { margin: 10px 16px 0; }
.inbox-thread .hint { margin: 8px 16px 0; }
.inbox-msgs { flex: 1; height: auto; min-height: 0; border-radius: 0; padding: 16px 6%; }
.inbox-thread .chat-form { margin: 0; padding: 10px 16px; background: var(--panel); }
.stage-select { width: auto; max-width: 150px; margin: 0; padding: 6px 8px; font-size: 13px; }

.lead-card { background: var(--accent-soft); border: 1px solid rgba(226, 48, 46, .3); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; font-size: 14px; }
.lead-card ul { margin: 6px 0 0; padding-left: 18px; }
.lead-card li { margin: 2px 0; }
#test-lead .lead-card { margin-top: 10px; }

/* ---------- Funil ---------- */

.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.kcol { flex: 1 0 210px; max-width: 320px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 240px); }
.kcol.over { outline: 2px dashed var(--glow); outline-offset: -2px; }
.kcol header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.kcards { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; }
.kcard { background: var(--raised); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; }
.kcard:hover { border-color: var(--accent); }
.kcard.dragging { opacity: .4; }
main:has(.kanban), main:has(.inbox) { max-width: none; }

/* ---------- Escolher contato ---------- */

.pick-list { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow-y: auto; background: var(--bg); }
.pick-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--raised); }
.pick-item.on { background: var(--accent-soft); }

/* ---------- Celular ---------- */

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; }
  .sidebar nav { flex-direction: row; overflow-x: auto; width: 100%; order: 3; }
  .sidebar nav a { white-space: nowrap; border-left: 0; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  main { padding: 16px; }
  h1 { font-size: 26px; }
  .grid2 { grid-template-columns: 1fr; }
  .qr { width: 220px; height: 220px; }
  .hours { grid-template-columns: 70px 1fr; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .inbox.has-open .inbox-side { display: none; }
  .inbox:not(.has-open) .inbox-thread { display: none; }
  .inbox-back { display: inline-flex; }
  .inbox-msgs { padding: 12px; }
  .kcol { flex-basis: 78vw; max-height: none; }
  .auth-logo { width: 170px; }
  .btn.big { font-size: 22px; }
  .ring.r1 { width: 260px; height: 260px; margin: -130px; }
  .ring.r2 { width: 480px; height: 480px; margin: -240px; }
  .moon.m1 { width: 160px; height: 160px; }
  .moon.m2 { width: 130px; height: 130px; }
}

/* Caixa de entrada: cliente à esquerda; você/equipe em vermelho e robô em vermelho escuro, à direita */
.bubble.in { align-self: flex-start; background: #1f1d20; color: var(--text); border-top-left-radius: 3px; }
.bubble.out { align-self: flex-end; background: var(--accent); color: #fff; border-top-right-radius: 3px; }
.bubble.out.from-bot { background: #6e1716; }

.layout > main { min-width: 0; }
.fun-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.fun-filters input, .fun-filters select { margin: 0; }
.fun-filters select { width: 210px; flex-shrink: 0; }
@media (max-width: 760px) { .fun-filters select { width: 140px; } }

/* ---------- Termos, privacidade e reembolso ---------- */

.legal { max-width: 720px; margin: 0 auto; padding: 32px 20px 60px; font-size: 16px; line-height: 1.65; }
.legal .brand { color: var(--text); text-decoration: none; margin-bottom: 28px; }
.legal h1 { font-size: 36px; margin-bottom: 6px; }
.legal h2 { font-size: 17px; margin: 30px 0 8px; }
.legal p, .legal li { color: #ddd5d6; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }

.legal-note { margin: 0; line-height: 1.5; }
.auth-foot { position: relative; margin-top: 32px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; text-align: center; }
.auth-foot a { color: var(--muted); }
.auth { grid-template-rows: 1fr auto; }
.sidebar-legal { display: flex; gap: 12px; }
.sidebar-legal a { color: var(--muted); }

/* Itens clicáveis que não são links também recebem foco do teclado */
.inbox-item:focus-visible, .kcard:focus-visible { outline: 2px solid var(--glow); outline-offset: -2px; }

/* ---------- Página de venda (antes do login) ---------- */

.landing { background: #000; min-height: 100vh; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.land-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 4vw, 40px); background: rgba(0, 0, 0, .72); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 150, 140, .12); }
.land-top .brand { color: var(--text); text-decoration: none; font-size: 20px; }
.land-top .brand .logo { width: 34px; }
.land-nav { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; }
.land-nav > a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.land-nav > a:not(.btn):hover { color: var(--text); }
.landing .auth { min-height: calc(100svh - 62px); grid-template-rows: none; }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.hero-login { border-color: transparent; color: var(--muted); }
.hero-login:hover { color: var(--text); }
a.btn.big { text-decoration: none; }
section[id] { scroll-margin-top: 70px; }

.land-sec { padding: clamp(56px, 9vw, 110px) clamp(16px, 4vw, 40px); border-top: 1px solid #1a1517; }
.land-wrap { max-width: 1080px; margin: 0 auto; }
.land-sec h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; margin: 0 0 22px; }
.lead { font-size: 17px; line-height: 1.7; color: #d9cfd1; max-width: 60ch; margin: 0 0 14px; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 18px 18px 18px 64px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--glow); border: 1px solid rgba(226, 48, 46, .55); box-shadow: 0 0 14px rgba(226, 48, 46, .25); }
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 14px; line-height: 1.55; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.feature svg { width: 30px; height: 30px; fill: none; stroke: var(--glow); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.feature b { display: block; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.price-wrap { display: grid; place-items: center; }
.price-card { position: relative; width: 100%; max-width: 460px; text-align: center; padding: 34px 28px 26px; border-radius: 24px; background: radial-gradient(120% 80% at 50% 0%, rgba(226, 48, 46, .18), transparent 60%), var(--panel); border: 1px solid rgba(255, 150, 140, .28); box-shadow: 0 0 60px rgba(226, 48, 46, .14); }
.price { font-family: var(--serif); font-size: 84px; line-height: 1; margin: 16px 0 6px; }
.price small { font-family: var(--sans); font-size: 22px; font-weight: 600; vertical-align: top; margin-right: 6px; color: var(--muted); }
.price-sub { margin: 0 0 22px; color: #d9cfd1; font-weight: 600; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.price-card .btn.big { width: 100%; font-size: 20px; }
.price-note { margin: 16px 0 0; line-height: 1.5; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--glow); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--muted); line-height: 1.65; }
.landing .auth-foot { margin: 0; padding: 26px 16px 34px; border-top: 1px solid #1a1517; }

@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .land-nav > a:not(.btn) { display: none; }
  .features { grid-template-columns: 1fr; }
  .price { font-size: 68px; }
}

/* ---------- Versão grátis: anúncios e recursos da completa ---------- */

body.gratis main { padding-bottom: 104px; }
body.gratis .so-completa { display: none !important; }
.key-tutorial ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.5; }
.nav-lock { display: none; font-size: 11px; opacity: .7; }
body.gratis .nav-lock { display: inline; }
.ad-banner { position: fixed; left: 236px; right: 0; bottom: 0; z-index: 40; min-height: 72px; display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: #0d0b0c; border-top: 1px solid rgba(255, 150, 140, .18); }
.ad-banner img { height: 52px; max-width: 160px; object-fit: contain; border-radius: 8px; }
.ad-banner .ad-text { flex: 1; min-width: 0; font-size: 14px; }
.ad-banner .ad-text b { display: block; }
.ad-tag { position: absolute; top: 4px; right: 10px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad-open { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .92); }
.ad-open-card { position: relative; width: min(720px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-align: center; }
.ad-open-card img, .ad-open-card video { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #000; }
.ad-open-body { padding: 22px 26px 26px; display: grid; gap: 12px; justify-items: center; }
.ad-open-body h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0; }
.ad-open-body p { margin: 0; color: var(--muted); max-width: 520px; }
.ad-count { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, .7); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.lock-card { text-align: center; padding: 40px 24px; display: grid; gap: 14px; justify-items: center; }
.lock-card svg { width: 44px; height: 44px; stroke: var(--accent); fill: none; stroke-width: 1.6; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan-grid .card { margin: 0; }
.plan-grid ul { margin: 0; padding-left: 18px; line-height: 1.8; }
.pc-id { font: 700 22px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .06em; background: var(--raised); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; display: inline-block; user-select: all; }
.usage-bar { height: 8px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--accent); }
@media (max-width: 760px) {
  .ad-banner { left: 0; padding: 10px 16px; }
  .plan-grid { grid-template-columns: 1fr; }
}

/* Mídias salvas na conversa */
.media-pop { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 10px; }
.media-pop input#media-caption { margin: 0; }
.media-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.media-item { display: flex; align-items: center; gap: 10px; }
.media-item img, .media-ico { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.media-ico { display: grid; place-items: center; background: var(--raised); font-size: 20px; }
.media-name { min-width: 0; overflow-wrap: anywhere; }
.media-name audio { display: block; width: 100%; max-width: 260px; height: 32px; margin-top: 4px; }

/* Campo de responder com várias linhas e mensagens rápidas */
#reply-form { align-items: flex-end; }
#reply-input { margin: 0; min-height: 0; max-height: 140px; resize: none; overflow-y: auto; border-radius: 20px; padding: 11px 18px; background: var(--raised); border-color: transparent; line-height: 1.35; }
.quick-pop input, .quick-pop textarea { margin: 0; }
.quick-pop textarea { min-height: 90px; }
.quick-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.quick-item:hover, .quick-item.on { background: var(--raised); }
.quick-texto { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.quick-texto b { color: var(--accent); margin-right: 6px; }

/* Seções do editor do agente (abre e fecha) */
.ag-sec { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.ag-sec[open] { padding-bottom: 16px; }
.ag-sec > summary { cursor: pointer; list-style: none; padding: 14px 28px 14px 0; font-weight: 600; position: relative; }
.ag-sec > summary::-webkit-details-marker { display: none; }
.ag-sec > summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 20px; color: var(--glow); }
.ag-sec[open] > summary::after { content: "–"; }
.ag-sec[open] > :not(summary) + * { margin-top: 12px; }
.ag-sec > summary + * { margin-top: 2px; }

/* Robô: cartões dos agentes e "Configurar agente" com menu lateral */
.ag-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ag-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ag-card .btn { align-self: flex-start; }
.ag-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--accent-soft); color: var(--glow); border: 1px solid var(--accent); }
.ag-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.ag-menu { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.ag-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.ag-menu button span { width: 20px; text-align: center; }
.ag-menu button:hover { background: var(--bg); }
.ag-menu button.on { background: var(--accent-soft); color: var(--glow); box-shadow: inset 3px 0 0 var(--accent); }
.ag-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ag-subs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ag-subs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ag-subs button.on { color: var(--text); border-bottom-color: var(--accent); }
.ag-h3 { margin: 10px 0 0; font-size: 15px; }
.ag-salvar { position: sticky; bottom: 0; background: var(--panel); padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .ag-layout { grid-template-columns: 1fr; }
  .ag-menu { position: static; flex-direction: row; overflow-x: auto; }
  .ag-menu button { width: auto; white-space: nowrap; }
}

/* ---------- Fotos dos contatos ---------- */
.avatar.mini { width: 30px; height: 30px; font-size: 13px; }
.avatar.medio { width: 40px; height: 40px; font-size: 15px; }

/* ---------- Etiquetas: quebram em linhas e rolam, para ver todas ---------- */
#chat-chips { flex-wrap: wrap; overflow-x: visible; overflow-y: auto; max-height: 112px; scrollbar-width: thin; flex-shrink: 0; }
.inbox-filters { flex-shrink: 0; }
.inbox-list { min-height: 0; }

/* ---------- Arrastar arquivos ---------- */
body.soltando::after { content: "Solte o arquivo aqui"; position: fixed; inset: 10px; display: flex; align-items: center; justify-content: center; background: rgba(226, 48, 46, .14); border: 2px dashed var(--accent); border-radius: 14px; color: var(--text); font-size: 20px; font-weight: 700; pointer-events: none; z-index: 1000; }

/* ---------- Figurinhas ---------- */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; }
.sticker-grid > p { grid-column: 1 / -1; margin: 0; }
.sticker-item { position: relative; }
.sticker-send { display: block; width: 100%; aspect-ratio: 1; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.sticker-send:hover { border-color: var(--accent); }
.sticker-send img { width: 100%; height: 100%; object-fit: contain; }
.sticker-del { position: absolute; top: 2px; right: 2px; padding: 2px 6px; display: none; }
.sticker-item:hover .sticker-del, .sticker-del:focus-visible { display: block; }
.bubble-sticker { display: block; width: 140px; height: 140px; object-fit: contain; }

/* ---------- Funil ---------- */
.kcol-edit { padding: 2px 4px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; line-height: 1; cursor: pointer; opacity: .75; }
.kcol-edit:hover { opacity: 1; background: var(--raised); }

/* ---------- Dashboard ---------- */
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.dash-tile { margin: 0 !important; }
.dash-num { font-family: var(--serif); font-size: 52px; line-height: 1.15; margin: 4px 0; font-variant-numeric: tabular-nums; }
.dash-etapa { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 44px; align-items: center; gap: 12px; padding: 7px 0; border-radius: 6px; }
.dash-etapa:hover { background: var(--raised); }
.dash-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.dash-barra { display: block; height: 12px; }
.dash-barra i { display: block; height: 100%; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; }
.dash-valor { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Conversa: botões do topo quebram linha em vez de sumir; a barra de envio deixa espaço para escrever ---------- */
.inbox-head { flex-wrap: wrap; }
.inbox-head .grow { min-width: 170px; }
.inbox-head .btn { white-space: nowrap; }
.inbox-thread .chat-form .btn:not(.primary) { padding: 9px; min-width: 38px; }
.inbox-thread .chat-form { gap: 6px; }

/* ---------- Filtros das conversas e não lidas ---------- */
.chat-filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-filtros select { flex: 1 1 120px; min-width: 0; margin: 0; padding: 6px 8px; font-size: 13px; }
.nao-lido { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }

/* ---------- Arquivos da conversa ---------- */
.arquivo { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.arquivo img, .arquivo-ico { width: 46px; height: 46px; flex-shrink: 0; border-radius: 8px; object-fit: cover; display: grid; place-items: center; font-size: 22px; background: var(--raised); }

/* ---------- Perfil ---------- */
.me-linha { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.me-linha #me-name { min-width: 0; overflow-wrap: anywhere; }
.avatar.grande { width: 84px; height: 84px; font-size: 30px; }
.temas { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.tema-op { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--text); font-weight: 600; }
.tema-op input { width: auto; margin: 0; }
.tema-cor { width: 32px; height: 22px; flex-shrink: 0; border-radius: 5px; border: 1px solid var(--line); }
.tema-op[data-amostra=""] .tema-cor { background: linear-gradient(90deg, #070708 60%, #e2302e 60%); }
.tema-op[data-amostra="vermelho-preto"] .tema-cor { background: linear-gradient(90deg, #ee4a47 60%, #0a0607 60%); }
.tema-op[data-amostra="branco-vermelho"] .tema-cor { background: linear-gradient(90deg, #fff 60%, #d6211f 60%); }
.tema-op[data-amostra="vermelho-branco"] .tema-cor { background: linear-gradient(90deg, #b01b19 60%, #fff 60%); }

/* ---------- Carinhas do robô ---------- */
.ag-avatar.rosto { background: transparent; padding: 0; overflow: visible; }
.rostos { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
@media (max-width: 1100px) { .rostos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.rosto-op { display: block; padding: 6px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; aspect-ratio: 1; }
.rosto-op input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.rosto-op:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rosto-op:has(input:focus-visible) { outline: 2px solid var(--glow); outline-offset: 2px; }

/* ---------- Outros ---------- */
.sidebar { overflow-y: auto; gap: 14px; }
.sidebar nav a { padding-top: 7px; padding-bottom: 7px; }
input:disabled { opacity: .6; cursor: not-allowed; }
.ag-etapas { margin: -4px 0 6px; }
.ag-etapas summary { cursor: pointer; color: var(--muted); }
.lista-contatos { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.lista-contatos label[hidden] { display: none; }
.ia-revisao { max-height: 50vh; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }

/* ---------- Temas (valem só no painel; a entrada segue preta) ---------- */
html[data-tema="vermelho-preto"] {
  --bg: #ee4a47; --panel: #e94340; --raised: #f46a67; --text: #0a0607; --muted: #2d0d0d; --line: #a82421;
  --accent: #0a0607; --accent-dark: #2a1012; --accent-soft: rgba(10, 6, 7, .16); --glow: #0a0607; --on-accent: #fff;
  --ok: #0a0607; --ok-soft: rgba(10, 6, 7, .14); --danger: #0a0607; --danger-soft: rgba(10, 6, 7, .14); --warn: #0a0607; --warn-soft: rgba(10, 6, 7, .14);
}
html[data-tema="branco-vermelho"] {
  --bg: #f7f3f3; --panel: #fff; --raised: #f3eaea; --text: #1a1214; --muted: #665a5d; --line: #e4d9d9;
  --accent: #d6211f; --accent-dark: #b01b19; --accent-soft: rgba(214, 33, 31, .1); --glow: #b01b19; --on-accent: #fff;
  --ok: #12703c; --ok-soft: rgba(18, 112, 60, .12); --danger: #b01b19; --danger-soft: rgba(214, 33, 31, .1); --warn: #8a5600; --warn-soft: rgba(138, 86, 0, .12);
}
html[data-tema="vermelho-branco"] {
  --bg: #b01b19; --panel: #a21816; --raised: #8e1412; --text: #fff; --muted: #ffdedb; --line: #c9514f;
  --accent: #fff; --accent-dark: #f3dfdf; --accent-soft: rgba(255, 255, 255, .18); --glow: #fff; --on-accent: #a21816;
  --ok: #fff; --ok-soft: rgba(255, 255, 255, .18); --danger: #fff; --danger-soft: rgba(255, 255, 255, .18); --warn: #fff; --warn-soft: rgba(255, 255, 255, .18);
}
html[data-tema] body, html[data-tema] #app { background: var(--bg); }
html[data-tema] .btn.primary, html[data-tema] .btn.recording, html[data-tema] .segmented button.on, html[data-tema] .toast.error, html[data-tema] .badge, html[data-tema] .bubble.out, html[data-tema] .inbox-brand { color: var(--on-accent); }
html[data-tema] .bubble-who, html[data-tema] .bubble.out .bubble-time { color: var(--on-accent); opacity: .85; }
html[data-tema] .btn.primary:hover:not(:disabled) { color: var(--on-accent); }
html[data-tema] .sidebar nav a.active, html[data-tema] .chips button.on { color: var(--text); }
html[data-tema] input::placeholder, html[data-tema] textarea::placeholder { color: var(--muted); opacity: .8; }
html[data-tema] .btn:hover:not(:disabled) { border-color: var(--accent); }
html[data-tema] .inbox-item.on { background: var(--raised); }
html[data-tema] .avatar { background: var(--raised); color: var(--accent); }
html[data-tema] .inbox-thread, html[data-tema] .chat, html[data-tema] .inbox-msgs { background-color: var(--bg); }
html[data-tema] .bubble.in, html[data-tema] .bubble.bot { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
html[data-tema] .bubble.out { background: var(--accent); }
html[data-tema] .bubble.out.from-bot { background: var(--accent-dark); }
html[data-tema] .bubble.out a { color: var(--on-accent); }
html[data-tema] a { color: var(--accent); }
html[data-tema] .sidebar nav a, html[data-tema] .inbox-item, html[data-tema] .sidebar-legal a { color: var(--text); }
html[data-tema] .sidebar-legal a { color: var(--muted); }
html[data-tema] .btn { color: var(--text); }
html[data-tema] .btn.primary { color: var(--on-accent); }
html[data-tema] .lead-card { border-color: var(--line); }
html[data-tema] .modal { background: rgba(0, 0, 0, .55); }
html[data-tema="vermelho-preto"] img.logo, html[data-tema="vermelho-branco"] img.logo, html[data-tema="vermelho-preto"] .inbox-empty img, html[data-tema="vermelho-branco"] .inbox-empty img { filter: brightness(0); }
html[data-tema="vermelho-branco"] img.logo, html[data-tema="vermelho-branco"] .inbox-empty img { filter: brightness(0) invert(1); }

/* Telas baixas (1366x768): o menu inteiro cabe sem barra de rolagem */
.sidebar { scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-top: 14px; padding-bottom: 12px; gap: 10px; }
.sidebar nav { gap: 0; }
.sidebar nav a { padding-top: 5px; padding-bottom: 5px; white-space: nowrap; }
.sidebar-foot { gap: 4px; }
.me-linha { margin-bottom: 2px; }
