/* FlashCod — tema escuro com destaque violeta */
:root {
  --bg: #09080f;
  --bg-2: #0e0c18;
  --surface: #13111f;
  --surface-2: #1a1729;
  --surface-3: #221e35;
  --line: #262238;
  --line-2: #342f4d;
  --ink: #f5f3ff;
  --ink-2: #d4d0e8;
  --muted: #9690b4;
  --faint: #635d82;
  --violet: #8b5cf6;
  --violet-2: #7c3aed;
  --violet-soft: rgba(139, 92, 246, .14);
  --violet-line: rgba(139, 92, 246, .35);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, .12);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, .1);
  --red-line: rgba(251, 113, 133, .3);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, .1);
  --amber-line: rgba(251, 191, 36, .28);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, .1);
  --r: 16px;
  --font: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -200px, rgba(124, 58, 237, .16), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 500 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--violet-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid var(--bg); }
svg.i { width: 18px; height: 18px; flex: none; }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; gap: 6px; }
.main { padding: 28px 32px 60px; max-width: 1500px; width: 100%; }

.logo { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, #a78bfa, #6d28d9); box-shadow: 0 8px 24px -8px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255,255,255,.25); color: #fff; }
.logo-txt { font-weight: 800; font-size: 17px; letter-spacing: -.02em; line-height: 1.1; }
.logo-txt small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

.nav-titulo { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; text-align: left; transition: .15s; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.ativa { background: linear-gradient(135deg, var(--violet), var(--violet-2)); color: #fff; box-shadow: 0 6px 20px -8px rgba(139, 92, 246, .9); }
.nav-item .n { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 22px; text-align: center; padding: 2px 7px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nav-item.ativa .n { background: rgba(255,255,255,.2); color: #fff; }
.nav-item .n.red { background: var(--red); color: #1a0710; }

.sidebar-fim { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.cartao-lateral { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; }
.ia-status { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
.ia-status b { color: var(--ink); font-weight: 700; display: block; font-size: 13px; }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); flex: none; }
.ponto.off { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; cursor: pointer; user-select: none; }
.switch small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.switch input { display: none; }
.switch .trilho { width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: .2s; flex: none; }
.switch .trilho::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + .trilho { background: var(--amber); }
.switch input:checked + .trilho::after { left: 19px; }

/* ---------- topo ---------- */
.cabecalho { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cabecalho h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.cabecalho p { margin: 2px 0 0; color: var(--muted); }
.cabecalho p b { color: #c4b5fd; }
.grow { flex: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: .15s; white-space: nowrap; color: var(--ink); }
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--faint); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { border: 0; background: linear-gradient(135deg, var(--violet), var(--violet-2)); color: #fff; box-shadow: 0 8px 24px -10px rgba(139, 92, 246, .9); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn.branco { border: 0; background: #fff; color: #0b0a12; }
.btn.branco:hover:not(:disabled) { background: #e9e7f5; }
.btn.teste { background: linear-gradient(135deg, #fbbf24, #d97706); color: #1c1203; box-shadow: none; }
.btn.danger { color: var(--red); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn svg.i { width: 16px; height: 16px; }

/* ---------- números ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; position: relative; overflow: hidden; }
.stat-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 18px; }
.stat-num { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-rot { color: var(--muted); font-weight: 600; margin-top: 6px; font-size: 13px; }
.stat-tag { position: absolute; top: 18px; right: 18px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--surface-2); color: var(--muted); }
.stat.violeta .stat-ico { background: var(--violet-soft); color: #a78bfa; }
.stat.verde .stat-ico { background: var(--green-soft); color: var(--green); }
.stat.verde .stat-num { color: var(--green); }
.stat.vermelho .stat-ico { background: var(--red-soft); color: var(--red); }
.stat.vermelho .stat-num { color: var(--red); }
.stat.ciano .stat-ico { background: var(--cyan-soft); color: var(--cyan); }

/* ---------- progresso ---------- */
.progresso { background: var(--surface); border: 1px solid var(--violet-line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 22px; box-shadow: 0 0 0 4px var(--violet-soft); }
.progresso-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; }
.progresso-info b { font-weight: 800; }
.progresso-info span { color: var(--muted); font-size: 13px; }
.barra { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.barra div { height: 100%; background: linear-gradient(90deg, #a78bfa, #7c3aed); border-radius: 99px; transition: width .5s; box-shadow: 0 0 12px rgba(139, 92, 246, .8); }

.alerta { background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber); border-radius: 12px; padding: 12px 16px; margin-bottom: 22px; font-size: 13px; }

/* ---------- caixas ---------- */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.box-head { padding: 18px 20px 0; display: flex; align-items: center; gap: 12px; }
.box-head .box-ico { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line-2); display: grid; place-items: center; color: #c4b5fd; background: var(--surface-2); }
.box-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.box-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.box-body { padding: 16px 20px 20px; }
.dica { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
kbd { font: 700 11px var(--font); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); }

.leitura { margin-bottom: 22px; }
.leitura .box-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .leitura .box-body { grid-template-columns: 1fr; } }
textarea.colar { width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px; background: var(--bg-2); line-height: 1.6; transition: .15s; }
textarea.colar::placeholder { color: var(--faint); }
textarea.colar:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.leitura-acoes { display: flex; flex-direction: column; gap: 10px; }
.leitura-acoes .btn { height: 46px; }

/* ---------- filtros ---------- */
.filtros { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filtros h3 { margin: 0; font-size: 16px; font-weight: 800; }
.busca { position: relative; margin-left: auto; }
.busca input { height: 40px; width: 280px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px 0 38px; }
.busca input::placeholder { color: var(--faint); }
.busca input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.busca svg.i { position: absolute; left: 12px; top: 11px; width: 17px; height: 17px; color: var(--faint); }

/* ---------- cartões de pedido ---------- */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: var(--line-2); }
.card.agendando { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft), 0 10px 40px -12px rgba(139, 92, 246, .6); }
.card.erro { border-color: var(--red-line); }
.card.agendado { border-color: rgba(52, 211, 153, .25); }
.card-top { padding: 16px 18px 12px; display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; color: #fff; }
.nome { flex: 1; min-width: 0; }
.nome input { width: 100%; border: 1px solid transparent; background: transparent; font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; padding: 2px 6px; margin-left: -6px; border-radius: 7px; }
.nome input::placeholder { color: var(--faint); }
.nome small { display: block; color: var(--muted); font-size: 12px; margin-top: -1px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pendente { background: var(--surface-2); color: var(--muted); border-color: var(--line-2); }
.badge.fila, .badge.agendando { background: var(--violet-soft); color: #c4b5fd; border-color: var(--violet-line); }
.badge.agendando::before { animation: pulso 1s infinite; }
.badge.agendado, .badge.teste_ok { background: var(--green-soft); color: var(--green); }
.badge.erro { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
@keyframes pulso { 50% { opacity: .2; } }

.campos { padding: 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.campo { display: flex; flex-direction: column; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.campo.full { grid-column: 1 / -1; }
.campo span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.campo input, .campo select { border: 1px solid transparent; background: transparent; padding: 3px 6px; margin: 1px -6px 0; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); width: calc(100% + 12px); font-variant-numeric: tabular-nums; }
.campo input::placeholder { color: var(--faint); font-weight: 500; }
.campo select { appearance: none; cursor: pointer; }
.campo select option { background: var(--surface-2); }
.campo.ruim span { color: var(--red); }
.campo.ruim input, .campo.ruim select { background: var(--red-soft); }
.card:not(.travado) .campo input:hover, .card:not(.travado) .campo select:hover, .card:not(.travado) .nome input:hover { background: var(--surface-2); border-color: var(--line-2); }
.campo input:focus, .campo select:focus, .nome input:focus { outline: none; background: var(--bg-2) !important; border-color: var(--violet) !important; box-shadow: 0 0 0 3px var(--violet-soft); }
.campo input:disabled, .campo select:disabled, .nome input:disabled { color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }

.endereco { margin: 4px 18px 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.endereco svg.i { width: 15px; height: 15px; color: #a78bfa; margin-top: 1px; }
.notas { padding: 10px 18px 0; display: flex; flex-direction: column; gap: 8px; }
.nota { border-radius: 11px; padding: 10px 12px; font-size: 12.5px; display: flex; gap: 9px; align-items: flex-start; border: 1px solid transparent; }
.nota svg.i { width: 16px; height: 16px; margin-top: 1px; }
.nota ul { margin: 0; padding-left: 16px; }
.nota.ruim { background: var(--red-soft); color: #fda4af; border-color: var(--red-line); }
.nota.obs { background: var(--amber-soft); color: #fcd34d; border-color: var(--amber-line); }
.nota.ok { background: var(--green-soft); color: #6ee7b7; }
.nota.info { background: var(--violet-soft); color: #c4b5fd; border-color: var(--violet-line); }
.nota b { font-weight: 800; color: inherit; }
.nota .detalhe { display: block; opacity: .75; font-size: 11.5px; margin-top: 3px; }
.nota .btn { margin-left: auto; height: 26px; }

.card-foot { margin-top: auto; padding: 14px 18px 16px; display: flex; align-items: center; gap: 6px; }
.card-foot .grow a { color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; }
.card-foot .grow a:hover { color: #c4b5fd; }

.vazio { grid-column: 1 / -1; text-align: center; padding: 70px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.vazio svg.i { width: 44px; height: 44px; color: var(--faint); margin-bottom: 10px; }
.vazio h3 { margin: 0 0 4px; color: var(--ink); font-size: 16px; font-weight: 800; }

/* ---------- ofertas ---------- */
.ofertas-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.oferta { display: grid; grid-template-columns: 1fr 90px; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.oferta .full { grid-column: 1 / -1; }
.oferta label { display: flex; flex-direction: column; gap: 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.oferta-rodape { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.oferta-rodape label { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.input { width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 11px; background: var(--bg-2); font-size: 13px; font-weight: 600; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
input[type="radio"] { accent-color: var(--violet); width: 16px; height: 16px; }

/* ---------- avisos ---------- */
#toasts { position: fixed; top: 20px; right: 20px; z-index: 50; display: flex; flex-direction: column; gap: 10px; width: min(390px, calc(100vw - 40px)); }
.toast { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .8); padding: 14px; display: flex; gap: 12px; animation: entra .25s ease-out; font-size: 13px; }
.toast .t-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.toast.erro { border-color: var(--red-line); }
.toast.erro .t-ico { background: var(--red-soft); color: var(--red); }
.toast.ok .t-ico { background: var(--green-soft); color: var(--green); }
.toast.aviso .t-ico { background: var(--amber-soft); color: var(--amber); }
.toast .t { font-weight: 800; }
.toast .m { color: var(--ink-2); white-space: pre-line; margin-top: 1px; }
.toast > button { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 20px; line-height: 1; padding: 0 2px; align-self: flex-start; margin-left: auto; }
.toast > button:hover { color: var(--ink); }
@keyframes entra { from { transform: translateY(-8px); opacity: 0; } }

/* ---------- telas menores ---------- */
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 20px 16px 60px; }
  .busca, .busca input { width: 100%; }
}

/* ---------- progresso de cada pedido ---------- */
.prog { margin: 10px 18px 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); }
.prog-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.prog-etapa { display: flex; align-items: center; gap: 7px; min-width: 0; }
.prog-etapa svg.i { width: 15px; height: 15px; color: #a78bfa; }
.prog-etapa span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog-pct { font-size: 15px; font-weight: 800; color: #c4b5fd; font-variant-numeric: tabular-nums; }
.prog-barra { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.prog-barra div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #a78bfa, #7c3aed); box-shadow: 0 0 12px rgba(139, 92, 246, .7); transition: width .7s cubic-bezier(.3, .8, .3, 1); position: relative; overflow: hidden; }
.prog-barra div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: brilho 1.4s infinite; }
@keyframes brilho { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.prog-passos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.passo-p { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--faint); }
.passo-p i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; font-style: normal; font-size: 9px; }
.passo-p.feito { color: var(--ink-2); }
.passo-p.feito i { background: var(--violet); border-color: var(--violet); color: #fff; }
.passo-p.atual { color: #c4b5fd; }
.passo-p.atual i { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); animation: pulso 1s infinite; }

.prog.ok { border-color: rgba(52, 211, 153, .3); background: var(--green-soft); }
.prog.ok .prog-barra div { background: linear-gradient(90deg, #6ee7b7, #10b981); box-shadow: 0 0 12px rgba(52, 211, 153, .6); }
.prog.ok .prog-barra div::after, .prog.falhou .prog-barra div::after, .prog.espera .prog-barra div::after { display: none; }
.prog.ok .prog-pct, .prog.ok .prog-etapa svg.i { color: var(--green); }
.prog.ok .passo-p i { background: var(--green); border-color: var(--green); color: #052e1c; }
.prog.ok .passo-p { color: #6ee7b7; }
.prog.falhou { border-color: var(--red-line); background: var(--red-soft); }
.prog.falhou .prog-barra div { background: var(--red); box-shadow: none; }
.prog.falhou .prog-pct, .prog.falhou .prog-etapa svg.i { color: var(--red); }
.prog.falhou .passo-p.atual { color: var(--red); }
.prog.falhou .passo-p.atual i { border-color: var(--red); background: var(--red); color: #1a0710; animation: none; box-shadow: none; }
.prog.espera .prog-etapa svg.i { color: var(--muted); }


/* ---------- etiquetas de CPF/CEP e opções de CEP ---------- */
.chip-ficticio, .chip-busca { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; margin-left: 6px; }
.chip-ficticio { background: var(--amber); color: #1c1203; }
.chip-busca { background: var(--violet-soft); color: #c4b5fd; border: 1px solid var(--violet-line); }
.opcoes-cep { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.opcao-cep { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: 9px; padding: 8px 10px; cursor: pointer; font-size: 12.5px; }
.opcao-cep:hover { border-color: var(--violet); background: var(--violet-soft); }
.opcao-cep b { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #c4b5fd; white-space: nowrap; }
.nota .col { display: flex; flex-direction: column; flex: 1; min-width: 0; }

/* ---------- mensagem original ---------- */
.original { margin: 10px 18px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.original summary { cursor: pointer; padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--muted); list-style: none; }
.original summary::before { content: "▸ "; }
.original[open] summary::before { content: "▾ "; }
.original summary:hover { color: var(--ink); }
.original pre { margin: 0; padding: 0 12px 12px; white-space: pre-wrap; word-break: break-word; font: 500 12px/1.55 var(--font); color: var(--ink-2); max-height: 220px; overflow: auto; }

/* ---------- programados ---------- */
.badge.programado { background: var(--cyan-soft); color: var(--cyan); border-color: rgba(34, 211, 238, .3); }
.card.programado { border-color: rgba(34, 211, 238, .3); }
.nota.prog { background: var(--cyan-soft); color: #67e8f9; border-color: rgba(34, 211, 238, .3); }

/* ---------- conta logada ---------- */
.conta { display: grid; gap: 10px; }
.conta-topo { display: flex; gap: 10px; align-items: center; min-width: 0; }
.conta-topo > span:last-child { min-width: 0; }
.conta-av { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 800; background: var(--violet-soft); color: #c4b5fd; border: 1px solid var(--violet-line); }
.conta b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conta small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conta-rodape { display: flex; align-items: center; justify-content: space-between; }
.conta-plano { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }

/* ---------- primeiros passos ---------- */
.passos-inicio { margin-bottom: 22px; border-color: var(--violet-line); background: linear-gradient(135deg, rgba(139, 92, 246, .08), transparent 55%), var(--surface); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist > li { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: start; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.checklist > li b { font-weight: 800; }
.checklist > li p { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.marca-passo { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.checklist > li.feito { opacity: .7; }
.checklist > li.feito .marca-passo { background: var(--green); border-color: var(--green); color: #052e1c; }
.checklist > li.feito .marca-passo::after { content: "✓"; }
.checklist > li.feito b { text-decoration: line-through; text-decoration-color: var(--green); }
.como { margin-top: 8px; }
.como summary { cursor: pointer; color: #c4b5fd; font-weight: 700; font-size: 13px; }
.como ol { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; display: grid; gap: 4px; }
.como code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
@media (max-width: 700px) { .checklist > li { grid-template-columns: 28px 1fr; } .checklist > li > .btn, .checklist > li > span:last-child { grid-column: 2; justify-self: start; } }

/* ---------- minha assinatura ---------- */
.assin-grade { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .assin-grade { grid-template-columns: 1fr; } }
.assin-rotulo { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.assin-topo { display: flex; align-items: center; gap: 12px; }
.assin-topo h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.assin-preco { margin: 8px 0 6px; color: var(--muted); }
.assin-preco b { font-size: 22px; color: var(--ink); font-weight: 800; margin-right: 2px; }
.assin-plano { border-color: var(--violet-line); background: linear-gradient(135deg, rgba(139, 92, 246, .12), transparent 60%), var(--surface); }
.assin-numero { margin: 0 0 12px; color: var(--muted); }
.assin-numero b { font-size: 34px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.assin-uso .barra div.quase { background: linear-gradient(90deg, var(--amber), var(--red)); box-shadow: none; }
.assin-aviso { margin-bottom: 22px; }
.assin-planos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.assin-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.assin-card.atual { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.assin-card header { display: flex; align-items: center; justify-content: space-between; }
.assin-card h4 { margin: 0; font-size: 17px; font-weight: 800; }
.assin-card p { margin: 0; }
.assin-card-preco { color: var(--muted); }
.assin-card-preco b { font-size: 22px; font-weight: 800; color: var(--ink); }
.assin-card .btn, .assin-card > .dica:last-child { margin-top: auto; }
.assin-card span.btn[aria-disabled] { opacity: .6; cursor: default; }
.assin-conta { display: grid; grid-template-columns: 1fr auto; gap: 14px 12px; align-items: end; }
.campo-conta { display: grid; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.campo-conta span { font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.assin-conta > .campo-conta:last-child { grid-column: 1 / -1; }
@media (max-width: 600px) { .assin-conta { grid-template-columns: 1fr; } }

a.btn { text-decoration: none; }

/* cartões de plano: perfil, selo e volume */
.assin-card { position: relative; }
.assin-card.destaque { border-color: var(--violet); background: linear-gradient(180deg, rgba(139, 92, 246, .14), var(--surface) 70%); }
.assin-selo { position: absolute; top: -11px; left: 16px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 5px 9px; border-radius: 99px; color: #fff; background: linear-gradient(135deg, #f97316, #db2777); }
.assin-perfil { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #a78bfa; margin-top: 4px !important; }
.assin-vol { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.assin-vol b { font-size: 14px; }
.assin-vol span { font-size: 12px; color: var(--green); font-family: ui-monospace, Menlo, monospace; }

/* ---------- suporte ---------- */
.sup-grade { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .sup-grade { grid-template-columns: 1fr; } }
.sup-lado { display: grid; gap: 16px; }
.sup-chat { display: flex; flex-direction: column; height: min(680px, calc(100vh - 170px)); min-height: 460px; border-color: var(--violet-line); }
.sup-online { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); margin-right: 7px; vertical-align: 1px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px 20px 8px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.msg.assistente { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink-2); }
.msg.usuario { align-self: flex-end; background: linear-gradient(135deg, var(--violet), var(--violet-2)); color: #fff; border-bottom-right-radius: 4px; }
.msg.falhou { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.msg.digitando { display: flex; gap: 5px; padding: 14px 16px; }
.msg.digitando span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: digitando 1.2s infinite; }
.msg.digitando span:nth-child(2) { animation-delay: .15s; }
.msg.digitando span:nth-child(3) { animation-delay: .3s; }
@keyframes digitando { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-sugestoes { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 20px 12px; }
.chat-sugestoes button { border: 1px solid var(--violet-line); background: var(--violet-soft); color: #c4b5fd; border-radius: 99px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.chat-sugestoes button:hover { background: rgba(139, 92, 246, .24); color: var(--ink); }
.chat-form { display: flex; gap: 10px; align-items: flex-end; padding: 12px 20px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px; background: var(--bg-2); line-height: 1.45; }
.chat-form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.chat-form .btn { height: 42px; width: 46px; padding: 0; }
.chat-rodape { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 20px 16px; color: var(--muted); font-size: 12.5px; }
.sup-whats { width: 100%; margin-bottom: 16px; background: rgba(37, 211, 102, .12); border-color: rgba(37, 211, 102, .4); color: #4ade80; }
.sup-whats:hover { background: rgba(37, 211, 102, .2) !important; }
.sup-form { display: grid; gap: 12px; }
.sup-texto { height: auto; min-height: 110px; padding: 10px 11px; resize: vertical; font-weight: 500; line-height: 1.5; text-transform: none; letter-spacing: 0; color: var(--ink); }
.sup-form select.input { text-transform: none; letter-spacing: 0; color: var(--ink); }
.sup-anexa { margin: -4px 0 0; }
.sup-chamados { display: grid; gap: 8px; }
.sup-chamados > .dica { margin: 0; }
.sup-chamado { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.sup-chamado summary { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; list-style: none; }
.sup-chamado summary::-webkit-details-marker { display: none; }
.sup-chamado summary small { display: block; color: var(--faint); font-size: 11.5px; }
.sup-chamado .grow { min-width: 0; }
.sup-chamado .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.sup-pergunta { margin: 0; padding: 0 13px 10px; color: var(--muted); font-size: 13px; }
.sup-chamado > .dica { margin: 0; padding: 0 13px 12px; }
.sup-resposta { margin: 0 13px 13px; padding: 10px 12px; border-radius: 10px; background: var(--violet-soft); border: 1px solid var(--violet-line); font-size: 13px; color: var(--ink-2); }
.sup-resposta b:first-child { display: block; color: #c4b5fd; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.sup-faq { display: grid; gap: 10px; }
.sup-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sup-faq summary { padding: 14px 18px; cursor: pointer; font-weight: 700; }
.sup-faq p { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 13.5px; }
.sup-faq code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
@media (max-width: 600px) { .msg { max-width: 92%; } .chat-msgs, .chat-sugestoes, .chat-form { padding-left: 14px; padding-right: 14px; } }
