:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e8eaee;
  --line-2: #d8dce2;
  --ink: #1c2430;
  --ink-2: #4d5664;
  --ink-3: #8a929e;
  --brand: #14875f;
  --brand-2: #0f7350;
  --brand-soft: #eaf6f0;
  --side: #ffffff;
  --side-ink: #4d5664;
  --hover: #f2f4f7;
  --ok: #1d8a57; --ok-soft: #e8f6ee;
  --warn: #a26a00; --warn-soft: #fff5e0;
  --bad: #c2412f; --bad-soft: #fdeeeb;
  --info: #2f6bc4; --info-soft: #ebf2fd;
  --mute-soft: #f0f2f5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --font: "Segoe UI", "Inter", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.num, td.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--ink); }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.brand b { display: block; font-size: 14px; } .brand span { font-size: 11.5px; color: var(--ink-3); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 6px; }
.side .foot { margin-top: auto; padding: 10px 8px 0; font-size: 12px; border-top: 1px solid var(--line); color: var(--ink-3); }
.side .foot b { color: var(--ink); display: block; font-weight: 600; }
.side .foot button { margin-top: 8px; }
.main { padding: 26px 32px 60px; min-width: 0; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar .sub { color: var(--ink-3); margin-top: 3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mobile-bar { display: none; }

/* ---------- componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card > .bd { padding: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; cursor: pointer; transition: border-color .15s; }
.kpi:hover { border-color: var(--line-2); }
.kpi .lbl { color: var(--ink-2); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 28px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--hover); border-color: #c9ced6; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: var(--brand-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--mute-soft); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.side .btn { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.mute { background: var(--mute-soft); color: var(--ink-2); }
.chip.plain::before { display: none; }

table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--surface-2); }
.t td.right, .t th.right { text-align: right; }
.t .nome { font-weight: 600; }
.t .acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.tablewrap { overflow-x: auto; }
.empty { padding: 34px 16px; text-align: center; color: var(--ink-3); }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=time], select, textarea {
  height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); font: 14px var(--font); width: 100%; }
textarea { height: auto; padding: 9px 10px; min-height: 110px; resize: vertical; font-family: var(--font); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(20,135,95,.15); border-color: var(--brand-2); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.row { display: flex; gap: 12px; } .row > * { flex: 1; }
.search { position: relative; } .search input { padding-left: 34px; width: 280px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 17px; height: 17px; color: var(--ink-3); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: 600 13.5px var(--font); color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .n { background: var(--mute-soft); color: var(--ink-2); border-radius: 99px; padding: 0 7px; font-size: 11.5px; margin-left: 5px; }

.banner { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: var(--radius); margin-bottom: 16px; background: var(--warn-soft); color: #6b4a00; border: 1px solid #f5e2b8; }
.banner.info { background: var(--info-soft); color: #23497a; border-color: #cfdcf0; }
.banner svg { width: 18px; height: 18px; flex: none; }

.dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
.dl dt { color: var(--ink-3); font-size: 12.5px; } .dl dd { margin: 0; font-weight: 500; }
.headmei { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.headmei .id { display: flex; gap: 14px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.back { color: var(--ink-3); text-decoration: none; font-size: 13px; display: inline-flex; gap: 4px; margin-bottom: 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.list li:last-child { border-bottom: 0; }
.progress { height: 8px; border-radius: 99px; background: var(--mute-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand-2); transition: width .3s; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat3 div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.stat3 b { font-size: 20px; display: block; font-variant-numeric: tabular-nums; }
.linha { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 8px 10px; word-break: break-all; }

/* ---------- modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, .28); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 50px rgba(16,24,40,.16); border: 1px solid var(--line); }
.modal.wide { width: min(820px, 100%); }
.modal .hd { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal .bd { padding: 18px 20px; }
.modal .ft { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: #2a3340; color: #fff; padding: 10px 14px; border-radius: 9px; box-shadow: var(--shadow); max-width: 380px; animation: fade .15s; }
.toast.erro { background: var(--bad); }
.toast.ok { background: var(--ok); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- login / portal ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: linear-gradient(160deg, #eaf6f0 0%, #f4f8fb 70%); border-right: 1px solid var(--line); color: var(--ink-2); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login .art h1 { font-size: 30px; color: var(--ink); max-width: 420px; line-height: 1.2; }
.login .art p { max-width: 420px; color: var(--ink-2); }
.login .art ul { padding: 0; list-style: none; display: grid; gap: 10px; color: var(--ink-2); }
.login .art li::before { content: "✓"; color: var(--brand); margin-right: 8px; font-weight: 700; }
.login .form { display: grid; place-items: center; padding: 24px; }
.login .box { width: min(360px, 100%); }
.login .box h2 { font-size: 20px; margin-bottom: 4px; }
.portal { max-width: 920px; margin: 0 auto; padding: 22px 16px 60px; }
.portal .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.guia-card { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.guia-card:last-child { border-bottom: 0; }
.guia-card .v { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink); position: sticky; top: 0; z-index: 30; }
  .mobile-bar button { background: none; border: 0; color: var(--ink); font-size: 22px; }
  .main { padding: 18px 16px 50px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g2, .g3 { grid-template-columns: 1fr; }
  .search input { width: 100%; }
  .login { grid-template-columns: 1fr; } .login .art { display: none; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; } .dl dd { margin-bottom: 8px; }
  .row { flex-direction: column; gap: 0; }
}

/* caixa postal */
.nav .badge { margin-left: auto; background: #d9483b; color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.alerta-rfb { border-color: #efb9b2; margin-bottom: 16px; }
.alerta-rfb > .hd { background: var(--bad-soft); border-radius: var(--radius) var(--radius) 0 0; border-bottom-color: #efb9b2; }
.alerta-rfb > .hd h2 { color: #8d2a21; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.alerta-rfb > .hd svg { width: 18px; height: 18px; }
.imp { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; margin-right: 6px; vertical-align: 1px; }
.msg-corpo { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface-2); max-height: 380px; overflow: auto; }
.msg-corpo p { margin: 0 0 8px; }

/* menu MEIs com submenus */
.nav .grupo { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--side-ink); font: 500 14px var(--font); cursor: pointer; text-align: left; }
.nav .grupo:hover { background: var(--hover); color: var(--ink); }
.nav .grupo.on { color: var(--ink); font-weight: 600; }
.nav .grupo svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav .grupo .seta { margin-left: auto; font-size: 11px; opacity: .7; }
.nav .grupo .badge + .seta { margin-left: 8px; }
.subnav { margin: 2px 0 4px 18px; padding-left: 10px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.subnav[hidden] { display: none; }
.nav a.sub { padding: 7px 10px; font-size: 13.5px; }

.secao { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 6px 0 10px; display: flex; gap: 8px; align-items: center; }
.nav a.alerta-menu { background: var(--bad-soft); color: var(--bad); margin: 8px 0 2px; }
.nav a.alerta-menu:hover { background: #fbe1dc; color: #a33322; }

/* consulta de CNPJ */
.busca-cnpj { margin-bottom: 16px; }
.cnaes { margin: 0; padding-left: 16px; } .cnaes li { margin-bottom: 3px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 16px; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand-2); }
.novo-cliente { align-items: start; }

.agenda h3 { font-size: 14px; } .agenda hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 14px; }

/* ---------- multiatendimento WhatsApp ---------- */
.main.atend-main { padding: 0; height: 100vh; overflow: hidden; }
.atend { display: grid; grid-template-columns: 360px minmax(0, 1fr) 300px; height: 100vh; background: var(--surface); }
.at-lista { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.at-topo { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 10px; }
.at-abas { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.at-abas button { background: none; border: 0; padding: 9px 9px; font: 600 12.5px var(--font); color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.at-abas button.on { color: var(--brand); border-bottom-color: var(--brand); }
.at-abas .n { background: var(--mute-soft); color: var(--ink-2); border-radius: 99px; padding: 0 6px; font-size: 11px; margin-left: 4px; }
.at-abas .n.alerta { background: var(--bad); color: #fff; }
.at-filtros { display: flex; gap: 6px; padding: 10px; }
.at-filtros input { flex: 1; height: 32px; font-size: 13px; } .at-filtros select { width: 120px; height: 32px; font-size: 12.5px; }
.at-itens { overflow-y: auto; flex: 1; }
.at-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.at-item:hover { background: var(--hover); } .at-item.on { background: var(--brand-soft); }
.at-item-txt { min-width: 0; flex: 1; }
.at-item .l1, .at-item .l2 { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.at-item .l1 b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.at-item .l2 span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-item .l3 { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; } .at-item .l3 .chip { font-size: 11px; padding: 1px 7px; }
.badge-n { background: #25a244; color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; flex: none; }
.avatar.sm { width: 38px; height: 38px; border-radius: 50%; font-size: 13px; }
.at-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #f3f5f8; }
.at-cab { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.at-msgs { flex: 1; overflow-y: auto; padding: 16px 6% 10px; display: flex; flex-direction: column; gap: 4px; }
.at-msg { display: flex; } .at-msg.out { justify-content: flex-end; }
.at-msg .bolha { max-width: min(560px, 78%); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 7px 11px 5px; font-size: 14px; }
.at-msg.out .bolha { background: #e4f6ec; border-color: #cdebd9; }
.at-msg.sistema .bolha, .at-msg.bot .bolha { background: #eef4fd; border-color: #d9e5f7; } .at-msg.celular .bolha { background: #eef6ea; border-color: #dbead3; }
.at-msg .rot { font-size: 11.5px; font-weight: 700; color: var(--brand-2); margin-bottom: 2px; }
.at-msg.sistema .rot, .at-msg.bot .rot { color: var(--info); }
.at-msg .txt { white-space: normal; word-wrap: break-word; }
.at-msg .meta { font-size: 11px; color: var(--ink-3); text-align: right; margin-top: 2px; display: flex; gap: 4px; justify-content: flex-end; }
.at-msg img, .at-msg video { max-width: 280px; max-height: 320px; border-radius: 6px; display: block; margin: 2px 0 4px; }
.at-msg audio { width: 260px; }
.at-msg .erro { color: var(--bad); font-size: 12px; margin-top: 2px; }
.at-doc { display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.05); border-radius: 6px; padding: 8px 10px; margin: 2px 0 4px; color: var(--ink); text-decoration: none; font-size: 13px; }
.at-doc svg { width: 20px; height: 20px; color: var(--bad); flex: none; }
.tick { color: var(--ink-3); font-size: 11px; } .tick.lida { color: #34b7f1; } .tick.erro { color: var(--bad); }
.at-nota { align-self: center; background: #fff5c4; color: #6b5800; font-size: 12px; padding: 3px 10px; border-radius: 7px; margin: 4px 0; }
.at-sep { align-self: center; font-size: 11px; color: var(--ink-3); background: #fff; border: 1px solid var(--line); padding: 2px 10px; border-radius: 7px; margin: 10px 0 4px; }
.at-comp { padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); position: relative; }
.at-comp.nota { background: #fff8d9; }
.at-comp-linha { display: flex; gap: 6px; align-items: flex-end; }
.at-comp textarea { min-height: 40px; height: 40px; max-height: 160px; resize: none; padding: 9px 12px; border-radius: 20px; }
.at-comp .btn.on { background: #ffe58f; }
.at-rr { position: absolute; bottom: 100%; left: 12px; right: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; padding: 4px; }
.at-rr .rr { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.at-rr .rr:hover { background: var(--surface-2); } .at-rr .rr span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-rr .rr-novo { padding: 6px; border-top: 1px solid var(--line); }
.at-info { border-left: 1px solid var(--line); overflow-y: auto; }
.at-info-bd { padding: 16px; } .at-info h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 14px 0 6px; }
.at-guia { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.at-vazio { margin: auto; text-align: center; color: var(--ink-2); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.at-vazio > div:first-child svg { width: 54px; height: 54px; color: #25a244; }
.at-equipe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.wa-qr { display: flex; gap: 16px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.wa-qr img { width: 210px; height: 210px; background: #fff; border-radius: 8px; }
@media (max-width: 1200px) { .atend { grid-template-columns: 300px minmax(0, 1fr); } .at-info { display: none; } }
@media (max-width: 860px) { .main.atend-main { height: calc(100vh - 52px); } .atend { grid-template-columns: 1fr; height: 100%; } .at-chat { display: none; } .atend:has(.at-cab) .at-lista { display: none; } .atend:has(.at-cab) .at-chat { display: flex; } }

.at-cab .actions { flex-wrap: nowrap; } .at-voltar { display: none; }
@media (max-width: 860px) { .at-voltar { display: inline-flex; } .at-cab { flex-wrap: wrap; } }

/* tarefas e assinatura no atendimento */
.nav .badge.tarefa, .badge.tarefa { background: #e0a100; margin-left: 4px; }
.nav a .badge + .badge.tarefa { margin-left: 4px; }
.at-abas .n.tarefa { background: #e0a100; color: #fff; }
.tf-filtros { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px; border-bottom: 1px solid var(--line); }
.tarefa { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; background: #fff; border-left: 3px solid var(--info); }
.at-info .tarefa { border: 1px solid var(--line); border-left: 3px solid var(--info); border-radius: 8px; margin-bottom: 6px; }
.tarefa:hover { background: var(--surface-2); }
.tarefa.atrasada { border-left-color: var(--bad); } .tarefa.concluida, .tarefa.cancelada { opacity: .6; border-left-color: var(--ok); }
.tf-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 2px; } .tf-l1 b { font-size: 13.5px; }
.at-tarefas-hd { display: flex; justify-content: space-between; align-items: center; }
.tarefa-box { border: 1px dashed var(--line-2); border-radius: 10px; padding: 12px; margin-top: 6px; background: var(--surface-2); }
.at-comp .assin { font-size: 12px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.at-comp .assin.on { background: var(--brand-soft); color: var(--brand); }

.at-ferr { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 6px; }
.at-ferr .btn { font-size: 12px; height: 26px; color: var(--ink-2); }
.at-comp .assin { max-width: none; }
.at-abas button { padding: 9px 6px; font-size: 12px; }
.at-abas { gap: 0; padding: 0 6px; }

/* contatos do cliente */
.contatos-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 10px; margin-bottom: 12px; background: var(--surface-2); }
.secao-mini { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 2px 0 8px; }
.secao-mini span { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-3); font-size: 12px; margin-top: 1px; }
.contatos-box .secao-mini + .row, .contatos-box #ctLista { margin-top: 4px; }
.contatos-box #ctLista:not(:empty) { margin-bottom: 8px; }
.contatos-box .row + .secao-mini { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ct-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 6px; }
.ct-linha input[type=text], .ct-linha input[type=email] { height: 32px; font-size: 13px; }
.ct-linha [data-ctdel] { justify-self: end; color: var(--ink-3); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: 600 12px var(--font); cursor: pointer; text-decoration: underline; margin-left: 6px; }
.ct-card { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; margin-bottom: 6px; font-size: 13px; }
.ct-card.atual { border-color: #bfe3cf; background: var(--brand-soft); }
.ct-card .small { margin-top: 2px; }

/* envios automáticos na conversa */
.st-txt { font-weight: 600; } .st-txt:empty { display: none; }
.st-txt.entregue, .st-txt.lida { color: var(--ok); } .st-txt.erro { color: var(--bad); } .st-txt.pendente { color: var(--warn); }
.at-msg.email .bolha { background: #f4f1fc; border-color: #e3dcf5; } .at-msg.email .rot { color: #6a4fb3; }
.at-msg.falha .bolha { background: var(--bad-soft); border-color: #f3c9c1; border-left: 3px solid var(--bad); }
.at-item.envio .ev-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--mute-soft); display: grid; place-items: center; font-size: 17px; flex: none; }
.at-item.envio.falha { background: #fff8f6; } .at-item.envio.falha .ev-ic { background: var(--bad-soft); }
