:root {
  --bg: #F4F7F9; --surface: #FFFFFF; --surface-2: #EEF3F6; --surface-3: #E2EAEF;
  --ink: #0B2230; --ink-2: #334955; --muted: #607480; --line: #E1E8ED; --line-2: #CBD6DD;
  --accent: #054D6E; --accent-ink: #FFFFFF; --accent-soft: #E1EDF3;
  --verde: #6DB33F; --verde-forte: #3F8A1C; --verde-soft: #EAF5E0;
  --navy: #043A53; --navy-2: #032B3E; --navy-ink: #E6F0F5; --navy-muted: #8FB0C0;
  --good: #3F8A1C; --good-soft: #E6F3DA; --warn: #B7791F; --warn-soft: #F8ECD5; --bad: #C8372D; --bad-soft: #F8DEDA;
  --info: #0B6E99; --info-soft: #DDEEF6;
  --c-in: #93A5B0; --c-bot: #054D6E; --c-hum: #6DB33F;
  --shadow: 0 1px 2px rgba(4, 40, 58, .06), 0 8px 24px -12px rgba(4, 40, 58, .22);
  --r: 12px; --sans: "Inter", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --logo-bg: transparent;
  color-scheme: light;
}
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --bg: #06141D; --surface: #0C1F2B; --surface-2: #112938; --surface-3: #183547; --ink: #E8F1F5; --ink-2: #C3D3DB; --muted: #8AA1AE;
    --line: #1A3345; --line-2: #25445A; --accent: #4FA8D1; --accent-ink: #04202E; --accent-soft: #0F3346;
    --verde: #8CCF55; --verde-forte: #9BD865; --verde-soft: #1A3320; --navy: #081B26; --navy-2: #050F16; --navy-ink: #E6F0F5; --navy-muted: #7F9CAB;
    --good: #8CCF55; --good-soft: #1A3320; --warn: #E2AE52; --warn-soft: #2E2515; --bad: #EF6F63; --bad-soft: #341B18; --info: #6FC0E6; --info-soft: #0F2E3E;
    --c-in: #5E7784; --c-bot: #4FA8D1; --c-hum: #8CCF55; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
    --logo-bg: #FFFFFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #06141D; --surface: #0C1F2B; --surface-2: #112938; --surface-3: #183547; --ink: #E8F1F5; --ink-2: #C3D3DB; --muted: #8AA1AE;
  --line: #1A3345; --line-2: #25445A; --accent: #4FA8D1; --accent-ink: #04202E; --accent-soft: #0F3346;
  --verde: #8CCF55; --verde-forte: #9BD865; --verde-soft: #1A3320; --navy: #081B26; --navy-2: #050F16; --navy-ink: #E6F0F5; --navy-muted: #7F9CAB;
  --good: #8CCF55; --good-soft: #1A3320; --warn: #E2AE52; --warn-soft: #2E2515; --bad: #EF6F63; --bad-soft: #341B18; --info: #6FC0E6; --info-soft: #0F2E3E;
  --c-in: #5E7784; --c-bot: #4FA8D1; --c-hum: #8CCF55; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
  --logo-bg: #FFFFFF;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }

/* shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: var(--navy-ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 16px 12px; gap: 16px; }

nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--navy-muted); font-weight: 500; position: relative; transition: background .15s, color .15s; }
#nav a:hover { background: rgba(255,255,255,.06); color: var(--navy-ink); }
#nav a.ativo { background: rgba(255,255,255,.1); color: #fff; }
#nav a.ativo::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--verde); }
#nav a.ativo svg { color: var(--verde); }
nav .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me { font-size: 12.5px; line-height: 1.3; min-width: 0; flex: 1; }
.me .muted, .sidebar .muted { color: var(--navy-muted); }
.sidebar .btn.ghost { color: var(--navy-ink); }
.sidebar .icon-btn { color: var(--navy-ink); }
.sidebar .icon-btn:hover, .sidebar .btn.ghost:hover { background: rgba(255,255,255,.08); }
.me b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 18px; margin: 0; letter-spacing: -.015em; }
.top-status { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.menu { display: none; }
.view { padding: 20px 24px 48px; outline: none; max-width: 1500px; width: 100%; }

/* componentes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.card-h h2 { font-size: 14px; margin: 0; }
.card-h .acoes { margin-left: auto; display: flex; gap: 6px; }
.card-b { padding: 14px 16px 16px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { padding: 14px 16px; }
.kpi .rot { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .val { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.alerta .val { color: var(--bad); }
.duas { grid-template-columns: 1.6fr 1fr; }
.badge { display: inline-flex; align-items: center; gap: 4px; min-width: 20px; justify-content: center; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); }
.badge:empty { display: none; }
.badge.bad { background: var(--bad); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ok { color: var(--good); } .ok .dot, .dot.ok { background: var(--good); }
.warn { color: var(--warn); } .warn .dot, .dot.warn { background: var(--warn); }
.bad { color: var(--bad); } .bad .dot, .dot.bad { background: var(--bad); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.urgente { background: var(--bad-soft); color: var(--bad); }
.tag.alta { background: var(--warn-soft); color: var(--warn); }
.tag.aberta { background: var(--info-soft); color: var(--info); }
.tag.em_andamento { background: var(--accent-soft); color: var(--accent); }
.tag.aguardando_terceiro { background: var(--warn-soft); color: var(--warn); }
.tag.concluida { background: var(--good-soft); color: var(--good); }
.tag.pronto, .tag.retirado, .tag.enviado { background: var(--good-soft); color: var(--good); }
.tag.teste { background: var(--info-soft); color: var(--info); }
.tag.interno { background: var(--surface-3); }
.tag.bloqueado { background: var(--bad-soft); color: var(--bad); }
.vazio { padding: 28px 16px; text-align: center; color: var(--muted); }

/* formulários */
label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
input, select, textarea { border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 7px 10px; font-size: 14px; min-width: 0; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, nav a:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form-erro { color: var(--bad); font-size: 13px; min-height: 1em; margin: 0; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filtros input[type="search"] { flex: 1 1 220px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::before { transform: translateX(20px); }

/* tabelas */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.clicavel { cursor: pointer; }
tr.clicavel:hover td { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* gráficos */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font: 11px var(--sans); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.barras-h { display: flex; flex-direction: column; gap: 8px; }
.barras-h .linha { display: grid; grid-template-columns: 140px 1fr 32px; gap: 8px; align-items: center; font-size: 12.5px; }
.barras-h .trilho { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.barras-h .trilho b { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* conversas */
.conv { display: grid; grid-template-columns: 340px 1fr 300px; gap: 0; height: calc(100vh - 57px); min-height: 520px; overflow: hidden; background: var(--surface); }
.conv > * { min-height: 0; }
.conv-lista { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.conv-lista .busca { padding: 10px; border-bottom: 1px solid var(--line); }
.conv-lista .busca input { width: 100%; }
.conv-itens { overflow-y: auto; flex: 1; }
.conv-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 12px; cursor: pointer; }
.conv-item:hover { background: var(--surface-2); }
.conv-item.sel { background: var(--accent-soft); }
.conv-item .l1 { display: flex; gap: 6px; align-items: center; }
.conv-item .l1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .l1 time { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.conv-item .l2 { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.conv-item .l3 { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thread-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.thread-h .quem b { display: block; }
.thread-h .acoes { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.msg { max-width: min(560px, 82%); padding: 8px 11px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.msg .meta { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.msg.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.msg.humano { align-self: flex-end; background: var(--info-soft); border-bottom-right-radius: 4px; }
.dia-sep { align-self: center; font-size: 11.5px; color: var(--muted); background: var(--surface-2); padding: 2px 10px; border-radius: 99px; margin: 8px 0; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); }
.composer textarea { flex: 1; min-height: 40px; max-height: 160px; }
.composer .opts { font-size: 12px; }
.lateral { border-left: 1px solid var(--line); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.lateral h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 6px; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font-size: 12.5px; background: var(--surface); }
.mini + .mini { margin-top: 6px; }
.pausa-box { border: 1px solid color-mix(in srgb, var(--info) 35%, var(--line)); background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; }

/* tarefas kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; }
.coluna { background: var(--surface-2); border-radius: var(--r); padding: 10px; min-height: 120px; }
.coluna h3 { font-size: 12.5px; margin: 2px 4px 10px; display: flex; gap: 6px; align-items: center; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.tcard:hover { border-color: var(--line-2); }
.tcard .t1 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.tcard .t2 { margin-top: 6px; font-size: 13px; }
.tcard .t3 { margin-top: 6px; font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; }

/* modal & toast */
.modal { position: fixed; inset: 0; background: rgba(15, 10, 5, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--surface); border-radius: 14px; width: min(720px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px -20px rgba(0,0,0,.5); }
.modal-card .mh { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-card .mh h2 { margin: 0; font-size: 16px; }
.modal-card .mh .icon-btn { margin-left: auto; }
.modal-card .mb { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-card .mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--surface); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .2s; pointer-events: none; z-index: 60; font-weight: 500; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.erro { background: var(--bad); color: #fff; }
.historico { display: flex; flex-direction: column; gap: 8px; }
.historico .h { font-size: 13px; border-left: 2px solid var(--line-2); padding-left: 10px; }
.historico .h small { color: var(--muted); display: block; }
pre.dados { white-space: pre-wrap; word-wrap: break-word; background: var(--surface-2); border-radius: 8px; padding: 10px; margin: 0; font: 12.5px/1.5 var(--mono); }

/* prompt */
.editor { width: 100%; font: 12.5px/1.55 var(--mono); min-height: 420px; }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.abas button { border: 0; background: transparent; padding: 8px 12px; border-bottom: 2px solid transparent; cursor: pointer; font-weight: 500; color: var(--muted); }
.abas button.ativo { color: var(--accent); border-bottom-color: var(--accent); }

/* simulador */
.sim { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.sim .janela { display: flex; flex-direction: column; height: calc(100vh - 57px - 68px); min-height: 480px; overflow: hidden; }

/* login */


@media (max-width: 1180px) {
  .conv { grid-template-columns: 300px 1fr; }
  .conv .lateral { display: none; }
  .duas { grid-template-columns: 1fr; }
  .sim { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.aberta { transform: none; }
  .menu { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .view { padding: 16px 16px 40px; }
  .conv { grid-template-columns: 1fr; height: auto; }
  .conv .conv-lista { max-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); }
  .conv .thread { height: 70vh; }
  .kanban { grid-template-columns: repeat(4, 82vw); }
  .barras-h .linha { grid-template-columns: 110px 1fr 28px; }
  .top-status .pill.opc { display: none; }
}

/* ---------- marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; color: #fff; }
.brand small { color: var(--navy-muted); font-size: 12px; }
.brand-logo { border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 0 2px rgba(141, 207, 85, .35); }
.top-logo { display: none; border-radius: 50%; background: var(--logo-bg); padding: 2px; }
.tema-btn svg { width: 18px; height: 18px; }
.top-tema { display: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.lg { padding: 11px 14px; font-size: 15px; border-radius: 10px; }
.link { border: 0; background: none; color: var(--accent); cursor: pointer; font-weight: 600; padding: 4px; }
.link:disabled { color: var(--muted); cursor: default; font-weight: 500; }
.kpi .val { color: var(--ink); }
.card-h h2::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--verde); margin-right: 8px; vertical-align: 1px; }

/* ---------- login com movimento ---------- */
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); overflow: hidden; background: var(--bg); }
.login-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: flutua 18s ease-in-out infinite alternate; }
.b1 { width: 460px; height: 460px; background: #054D6E; top: -140px; left: -120px; }
.b2 { width: 380px; height: 380px; background: #6DB33F; bottom: -120px; right: -100px; animation-duration: 22s; animation-delay: -6s; }
.b3 { width: 300px; height: 300px; background: #0B7FAE; top: 45%; left: 55%; opacity: .35; animation-duration: 26s; animation-delay: -12s; }
.grade { position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); opacity: .6; }
@keyframes flutua { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.12); } 100% { transform: translate(-40px, 70px) scale(.95); } }
.login-card { position: relative; z-index: 1; width: min(400px, 100%); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 22px; padding: 28px 24px 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 30px 80px -30px rgba(4, 40, 58, .45); animation: entra .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes entra { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.login-marca { position: relative; width: 112px; height: 112px; margin: 0 auto 2px; display: grid; place-items: center; }
.login-logo { position: relative; z-index: 1; width: 84px; height: 84px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: 0 10px 30px -10px rgba(5, 77, 110, .6); animation: pulsa 3.2s ease-in-out infinite; }
@keyframes pulsa { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.orbita { position: absolute; inset: 0; animation: gira 9s linear infinite; }
.arco { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; }
.arco.a1 { border-top-color: #6DB33F; border-right-color: #6DB33F; transform: rotate(10deg); }
.arco.a2 { inset: 8px; border-bottom-color: #8CCF55; border-left-color: #8CCF55; opacity: .8; animation: gira 6s linear infinite reverse; }
@keyframes gira { to { transform: rotate(360deg); } }
.login-titulo { text-align: center; margin: 0; font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.login-sub { text-align: center; margin: -8px 0 4px; color: var(--muted); font-size: 13.5px; }
.passo { display: flex; flex-direction: column; gap: 12px; animation: entra .45s ease both; }
.campo-tel { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); }
.campo-tel span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; border-right: 1px solid var(--line-2); }
.campo-tel input { border: 0; border-radius: 0; flex: 1; font-size: 17px; padding: 11px 12px; letter-spacing: .02em; }
.campo-tel:focus-within { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.otp { display: flex; gap: 10px; justify-content: center; }
.otp input { width: 56px; height: 64px; text-align: center; font-size: 28px; font-weight: 700; border-radius: 12px; border: 1.5px solid var(--line-2); font-family: var(--mono); transition: border-color .15s, transform .15s; }
.otp input:focus { border-color: var(--accent); transform: translateY(-2px); outline: none; box-shadow: 0 6px 16px -8px rgba(5, 77, 110, .5); }
.otp.erro input { border-color: var(--bad); animation: treme .35s; }
@keyframes treme { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.login-info { margin: 0; text-align: center; font-size: 13.5px; color: var(--ink-2); }
.login-nota { margin: 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.login-acoes { display: flex; justify-content: space-between; font-size: 13px; }
.login-rodape { position: relative; z-index: 1; margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.login-tema { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; z-index: 2; background: color-mix(in srgb, var(--surface) 70%, transparent); }
@media (prefers-reduced-motion: reduce) { .blob, .orbita, .arco, .login-logo, .login-card, .passo { animation: none !important; } }

/* ---------- barra inferior (celular / app instalado) ---------- */
.tabbar { display: none; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font: 700 10px/16px var(--sans); font-style: normal; text-align: center; }
.tab-badge:empty { display: none; }
@media (max-width: 820px) {
  .sidebar { display: none; }
  .sidebar.aberta { display: flex; }
  .menu { display: none !important; }
  .top-logo, .top-tema { display: inline-block; }
  .topbar { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--navy); color: #fff; border-bottom: 0; }
  .topbar h1 { color: #fff; font-size: 17px; }
  .topbar .icon-btn { color: #fff; }
  .top-logo { background: #fff; }
  .top-status .pill { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #fff; }
  .view { padding: 14px 14px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 0; background: none;
    color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; cursor: pointer; border-radius: 10px; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.ativo { color: var(--accent); }
  .tabbar a.ativo svg { color: var(--verde-forte); }
  .conv { height: auto; }
  .sim .janela { height: calc(100dvh - 180px); }
  .modal { align-items: end; padding: 0; }
  .modal-card { border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .sidebar.aberta { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: none; }
}
@media (display-mode: standalone) { body { overscroll-behavior-y: none; } }
