/* ConstruChat · design system — azul-marinho sólido, sem gradientes. */
:root {
  --bg: #0a1020; --side: #070c19; --panel: #0d1428; --card: #101a31; --card-2: #142039;
  --line: #1c2843; --line-2: #26345a;
  --tx: #e7ecf6; --tx-2: #9aa7c2; --tx-3: #66738f;
  --pri: #2f6bff; --pri-2: #2459e0; --pri-soft: rgba(47,107,255,.14);
  --ok: #22c55e; --ok-soft: rgba(34,197,94,.13); --warn: #f59e0b; --warn-soft: rgba(245,158,11,.13);
  --bad: #ef4444; --bad-soft: rgba(239,68,68,.13); --vio: #8b5cf6; --vio-soft: rgba(139,92,246,.13); --cy: #38bdf8;
  --r: 10px; --r-sm: 8px; --shadow: 0 12px 30px rgba(0,0,0,.4);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--tx); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--pri); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
select option, select optgroup { background-color: var(--panel); color: var(--tx); }
select option:checked { background-color: var(--pri); color: #fff; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 19px; } h2 { font-size: 15px; } h3 { font-size: 14px; }
.ico-svg { flex: none; }
.muted { color: var(--tx-2); } .dim { color: var(--tx-3); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; } .right { margin-left: auto; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid { display: grid; gap: 12px; } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.hidden { display: none !important; }
.mt { margin-top: 12px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 12px; } .p0 { padding: 0 !important; }

/* ---------- shell: menu lateral único e recolhível */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; overflow: hidden; }
.shell.mini { grid-template-columns: 60px 1fr; }
.sidebar { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.brandbar { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.brandbar img { width: 26px; height: 26px; }
.brandbar .word { font-weight: 700; font-size: 15px; color: var(--tx); white-space: nowrap; }
.brandbar .collapse { margin-left: auto; }
.navscroll { flex: 1; overflow-y: auto; padding: 10px 8px; scrollbar-width: thin; }
.navgrp { margin-bottom: 2px; }
.navhead { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--tx-2); border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; text-align: left; }
.navhead:hover { background: var(--card); color: var(--tx); }
.navhead.on { color: var(--tx); }
.navhead .chev { margin-left: auto; transition: transform .15s; color: var(--tx-3); }
.navgrp.open .navhead .chev { transform: rotate(90deg); }
.navitems { display: none; padding: 2px 0 6px 0; }
.navgrp.open .navitems { display: block; }
.navlink { display: block; padding: 6px 10px 6px 38px; border-radius: 8px; color: var(--tx-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navlink:hover { background: var(--card); color: var(--tx); }
.navlink.on { background: var(--pri-soft); color: #fff; box-shadow: inset 2px 0 0 var(--pri); }
.shell.mini .brandbar .word, .shell.mini .navhead .lbl, .shell.mini .navhead .chev, .shell.mini .navitems, .shell.mini .wsbox .meta, .shell.mini .wsbox > svg { display: none !important; }
.shell.mini .navhead { justify-content: center; padding: 10px 0; }
.shell.mini .navhead.on { background: var(--pri-soft); color: #fff; }
.shell.mini .brandbar { justify-content: center; padding: 0; } .shell.mini .brandbar img { display: none; } .shell.mini .brandbar .collapse { margin: 0; }
.wsbox { margin: 8px; padding: 8px; border-radius: 8px; display: flex; align-items: center; gap: 10px; cursor: pointer; border-top: 1px solid var(--line); flex: none; }
.wsbox:hover { background: var(--card); }
.wsbox .meta { min-width: 0; flex: 1; } .wsbox .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; } .wsbox .meta small { color: var(--tx-3); }
.shell.mini .wsbox { justify-content: center; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--pri-2); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { height: 56px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 18px; background: var(--bg); flex: none; }
.cmdk-btn { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 440px; height: 34px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent; color: var(--tx-3); cursor: pointer; text-align: left; }
.cmdk-btn:hover { color: var(--tx-2); }
.cmdk-btn kbd, .kbd { margin-left: auto; font: 500 11px var(--font); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; color: var(--tx-3); }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--tx-2); display: grid; place-items: center; cursor: pointer; position: relative; flex: none; }
.icon-btn:hover { background: var(--card); color: var(--tx); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.presence { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; background: var(--card); cursor: pointer; font-size: 12px; }
.pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--tx-3); display: inline-block; flex: none; }
.pdot.online { background: var(--ok); } .pdot.away { background: var(--warn); } .pdot.offline { background: var(--tx-3); } .pdot.invisible { background: transparent; border: 1.5px solid var(--tx-3); }
.content { flex: 1; overflow: auto; padding: 22px 24px 40px; }
.content.flush { padding: 0; overflow: hidden; display: flex; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.page-head .sub { color: var(--tx-2); margin-top: 4px; font-size: 13px; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid; font-size: 13px; }
.banner.warn { background: var(--warn-soft); border-color: rgba(245,158,11,.35); color: #fbbf24; }
.banner.info { background: var(--pri-soft); border-color: rgba(47,107,255,.35); color: #a9c3ff; }
.banner.bad { background: var(--bad-soft); border-color: rgba(239,68,68,.35); color: #fca5a5; }
.banner.ok { background: var(--ok-soft); border-color: rgba(34,197,94,.35); color: #86efac; }

/* paleta de comandos */
.cmdk { width: min(600px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; align-self: start; margin-top: 12vh; }
.cmdk input { width: 100%; border: 0; outline: none; padding: 14px 16px; font-size: 15px; background: transparent; border-bottom: 1px solid var(--line); }
.cmdk .list { max-height: 52vh; overflow: auto; padding: 6px; }
.cmdk .it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.cmdk .it.on, .cmdk .it:hover { background: var(--pri-soft); }
.cmdk .grp { font-size: 11px; font-weight: 600; color: var(--tx-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px 4px; }

/* ---------- componentes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.pad-l { padding: 20px; } .card.tight { padding: 12px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head .sub { color: var(--tx-2); font-size: 12px; }
.kpi .label { color: var(--tx-2); font-size: 12px; } .kpi .val { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.kpi .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--pri-soft); color: var(--pri); }
.delta { font-size: 11px; padding: 2px 6px; border-radius: 6px; font-weight: 600; } .delta.up { background: var(--ok-soft); color: var(--ok); } .delta.down { background: var(--bad-soft); color: var(--bad); }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--tx); cursor: pointer; font-weight: 550; white-space: nowrap; }
.btn:hover { border-color: var(--tx-3); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.pri { background: var(--pri-2); border-color: var(--pri-2); color: #fff; } .btn.pri:hover { background: var(--pri); }
.btn.ok { background: #16a34a; border-color: #16a34a; color: #fff; } .btn.bad { background: transparent; border-color: rgba(239,68,68,.5); color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx-2); } .btn.ghost:hover { background: var(--card-2); color: var(--tx); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; } .btn.xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 6px; }
.btn svg { width: 16px; height: 16px; } .btn.sm svg { width: 14px; height: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--tx-2); cursor: pointer; font-size: 13px; }
.chip.on, .chip:hover { color: var(--tx); border-color: var(--pri); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--card-2); color: var(--tx-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .badge.pri { background: var(--pri-soft); color: var(--pri); border-color: transparent; }
.badge.vio { background: var(--vio-soft); color: var(--vio); border-color: transparent; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 12px; color: var(--tx-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--tx); border-bottom-color: var(--pri); }
.field { display: flex; flex-direction: column; gap: 5px; } .field > label { font-size: 12px; color: var(--tx-2); font-weight: 550; }
.field .hint { font-size: 11px; color: var(--tx-3); }
.input, select.input, textarea.input { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; outline: none; min-height: 36px; }
.input:focus { border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-soft); }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.5; }
.input.sm { min-height: 30px; padding: 5px 8px; font-size: 13px; }
.switch { position: relative; width: 36px; height: 20px; flex: none; } .switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--pri-2); } .switch input:checked + span::before { transform: translateX(16px); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-cards label { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.radio-cards input:checked + span { color: var(--pri); } .radio-cards label:has(input:checked) { border-color: var(--pri); background: var(--pri-soft); }
.radio-cards input { accent-color: var(--pri); }
.section { display: grid; grid-template-columns: 280px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; } .section .desc { color: var(--tx-2); font-size: 13px; margin-top: 4px; }
@media (max-width: 900px) { .section { grid-template-columns: 1fr; gap: 10px; } }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--tx-2); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); position: sticky; top: 0; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--card-2); }
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.empty { text-align: center; padding: 48px 20px; color: var(--tx-2); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--card-2); display: grid; place-items: center; color: var(--tx-3); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--pri); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 40px; color: var(--tx-2); }
.bar { height: 8px; background: var(--card-2); border-radius: 999px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--pri); border-radius: 999px; }
.progress-steps { display: flex; gap: 4px; } .progress-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line-2); } .progress-steps i.on { background: var(--pri); } .progress-steps i.late { background: var(--bad); }
.list-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:hover { background: var(--card-2); } .list-item.on { background: var(--pri-soft); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; } .kv dt { color: var(--tx-2); } .kv dd { margin: 0; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }

/* ---------- kanban */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.kcol { width: 290px; flex: none; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.kcol .khead { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.kcol .khead .count { color: var(--tx-3); font-size: 12px; }
.kcol .kbody { padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.kcol.drop { border-color: var(--pri); background: var(--pri-soft); }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; }
.kcard:hover { border-color: var(--line-2); } .kcard.dragging { opacity: .5; }
.kcard .t { font-weight: 600; } .kcard .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--tx-2); }

/* ---------- chat */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.bubble { max-width: 72%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; position: relative; }
.bubble.in { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--pri-2); color: #fff; border-top-right-radius: 4px; }
.bubble.ai { align-self: flex-end; background: #312e81; color: #e0e7ff; border-top-right-radius: 4px; }
:root[data-theme="light"] .bubble.ai { background: #e0e7ff; color: #1e1b4b; }
.bubble.tpl { align-self: flex-end; background: #064e3b; color: #d1fae5; } :root[data-theme="light"] .bubble.tpl { background: #d1fae5; color: #064e3b; }
.bubble .who { font-size: 10px; opacity: .75; margin-bottom: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bubble .ts { font-size: 10px; opacity: .65; margin-top: 4px; text-align: right; }
.bubble img { max-width: 240px; border-radius: 8px; display: block; margin-bottom: 4px; }
.sysline { align-self: center; font-size: 11px; color: var(--tx-3); background: var(--card); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; max-width: 90%; }
.toolline { align-self: flex-end; font-size: 11px; color: var(--tx-2); background: var(--card); border: 1px dashed var(--line-2); padding: 4px 10px; border-radius: 8px; max-width: 72%; cursor: pointer; }
.toolline pre { white-space: pre-wrap; margin: 6px 0 0; max-height: 220px; overflow: auto; }
.composer { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; align-items: flex-end; background: var(--panel); }
.composer textarea { flex: 1; resize: none; min-height: 40px; max-height: 160px; }

/* ---------- overlay */
.overlay { position: fixed; inset: 0; background: rgba(3,7,18,.6); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal.lg { width: min(860px, 100%); } .modal.xl { width: min(1100px, 100%); }
.modal .mh { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.modal .mb { padding: 18px; overflow: auto; } .modal .mf { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--panel); border-left: 1px solid var(--line); z-index: 90; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slidein .15s; }
.drawer .dh { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; } .drawer .db { flex: 1; overflow: auto; padding: 18px; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.toasts { position: fixed; top: 14px; right: 14px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--card-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; min-width: 260px; max-width: 420px; box-shadow: var(--shadow); display: flex; gap: 8px; align-items: flex-start; animation: slidein .15s; }
.toast.ok { border-color: rgba(34,197,94,.5); } .toast.bad { border-color: rgba(239,68,68,.5); } .toast.warn { border-color: rgba(245,158,11,.5); }
.menu { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 80; min-width: 200px; padding: 4px; }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; background: none; border: 0; border-radius: 6px; color: var(--tx); cursor: pointer; text-align: left; }
.menu button:hover { background: var(--card-2); }

/* ---------- auth */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-page .card { width: min(400px, 100%); padding: 28px; }
@media (max-width: 860px) {
  .shell, .shell.mini { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 95; transform: translateX(-100%); transition: transform .18s; }
  .shell.open .sidebar { transform: none; box-shadow: var(--shadow); }
  .content { padding: 16px; } .presence .lbl, .topbar .hide-m { display: none; } .menu-m { display: grid !important; }
}
.menu-m { display: none !important; }
.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; } .btn.pri:hover { background: var(--pri-2); border-color: var(--pri-2); }
.bubble.out { background: var(--pri-2); color: #fff; }
.bubble.ai { background: #17306b; color: #dce7ff; }
.kpi .ico { background: var(--pri-soft); color: var(--pri); }

/* ---------- imagens redondas (logos de integração, avatar de agente) */
.logo-dot { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--card-2); border: 1px solid var(--line); }
.logo-dot.sm { width: 28px; height: 28px; } .logo-dot.lg { width: 64px; height: 64px; } .logo-dot.xl { width: 88px; height: 88px; }
.avatar-pick { position: relative; cursor: pointer; display: inline-block; }
.avatar-pick .edit { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--pri); color: #fff; display: grid; place-items: center; border: 2px solid var(--card); }
.cover-pick { height: 180px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--card-2) center/cover no-repeat; display: grid; place-items: center; color: var(--tx-3); cursor: pointer; position: relative; overflow: hidden; }
.cover-pick:hover { border-color: var(--pri); }

/* ---------- login com banner lateral (configurado no superadmin) */
.auth-split { min-height: 100vh; display: flex; gap: 20px; padding: 20px; background: var(--bg); }
.auth-banner { flex: 0 0 clamp(340px, 38vw, 600px); height: calc(100vh - 40px); position: sticky; top: 20px; border-radius: 24px; overflow: hidden;
  background: #0d1428 center/cover no-repeat; display: flex; flex-direction: column; justify-content: space-between; padding: 32px; border: 1px solid var(--line); }
.auth-banner .shade { position: absolute; inset: 0; background: rgba(5,10,25,.45); }
.auth-banner.noimg .shade { display: none; }
.auth-banner.art { border-color: transparent; justify-content: flex-end; }
.auth-banner.art > .row, .auth-banner.art > .small { display: none; }
.auth-banner.art:not(.has-text) .shade { display: none; }
.auth-banner > * { position: relative; z-index: 1; }
.auth-banner > .shade { position: absolute; z-index: 0; }
.auth-banner h1 { font-size: 26px; line-height: 1.25; color: #fff; }
.auth-banner p { color: #cfd8ea; font-size: 15px; margin: 8px 0 0; }
.auth-split .auth-page { flex: 1; min-height: calc(100vh - 40px); padding: 24px; }
.auth-form { width: min(400px, 100%); }
.auth-form .brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 36px; }
.auth-form .brand b { font-size: 20px; }
.auth-form h2 { font-size: 26px; margin: 0 0 6px; }
.auth-form .input { height: 46px; border-radius: 12px; font-size: 15px; }
.auth-form .btn.pri { height: 48px; border-radius: 999px; justify-content: center; font-size: 15px; }
.auth-form .links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 22px; font-size: 13px; }
@media (max-width: 900px) { .auth-split { padding: 0; } .auth-banner { display: none; } .auth-split .auth-page { min-height: 100vh; } }

/* ---------- tema claro */
:root[data-theme="light"] {
  --bg: #f4f6fb; --side: #ffffff; --panel: #ffffff; --card: #ffffff; --card-2: #f1f4fa;
  --line: #e3e8f2; --line-2: #cfd7e6;
  --tx: #0f172a; --tx-2: #475569; --tx-3: #8391a7;
  --pri: #2459e0; --pri-2: #2f6bff; --pri-soft: rgba(47,107,255,.10);
  --ok-soft: rgba(34,197,94,.12); --warn-soft: rgba(245,158,11,.14); --bad-soft: rgba(239,68,68,.10);
  --shadow: 0 10px 28px rgba(15,23,42,.10);
  color-scheme: light;
}
:root[data-theme="light"] .navlink.on, :root[data-theme="light"] .shell.mini .navhead.on { color: var(--pri); }
:root[data-theme="light"] .banner.warn { color: #92400e; } :root[data-theme="light"] .banner.info { color: #1e40af; }
:root[data-theme="light"] .banner.bad { color: #b91c1c; } :root[data-theme="light"] .banner.ok { color: #15803d; }
:root[data-theme="light"] .overlay { background: rgba(15,23,42,.35); }
:root[data-theme="light"] .auth-banner.noimg { background-color: #0d1428; }
/* transição do tema */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 9999; }
.theme-fade, .theme-fade * { transition: background-color .4s ease, color .4s ease, border-color .4s ease !important; }
.theme-btn .ico-svg { animation: spin-in .5s cubic-bezier(.65,0,.35,1); }
@keyframes spin-in { from { transform: rotate(-90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- status da IA (topo) */
.ai-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--tx-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.ai-pill .led { width: 8px; height: 8px; border-radius: 50%; background: var(--tx-3); }
.ai-pill.ok { color: var(--ok); border-color: rgba(34,197,94,.35); } .ai-pill.ok .led { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.ai-pill.bad { color: var(--bad); border-color: rgba(239,68,68,.4); } .ai-pill.bad .led { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.ai-pill.wait .led { background: var(--warn); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.ai-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card-2); }
.ai-card .big { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ai-card.ok .big { background: var(--ok-soft); color: var(--ok); } .ai-card.bad .big { background: var(--bad-soft); color: var(--bad); } .ai-card.wait .big { background: var(--warn-soft); color: var(--warn); }

/* ---------- login: voltar */
.auth-back { display: inline-flex; align-items: center; gap: 6px; color: var(--tx-2); font-size: 13px; margin-bottom: 14px; cursor: pointer; }
.auth-back:hover { color: var(--tx); }
.auth-theme { position: fixed; top: 18px; right: 18px; z-index: 5; border: 1px solid var(--line); background: var(--card); }

/* ---------- simulador */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; height: calc(100vh - 150px); min-height: 520px; }
.sim .phone { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.sim .phone-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--card-2); }
.sim .msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.sim .side { overflow: auto; display: flex; flex-direction: column; gap: 12px; } .sim .side .kv { grid-template-columns: 120px 1fr; } .sim .toolline { align-self: flex-start; }
.sim .bubble.lead { align-self: flex-end; background: #005c4b; color: #e9fdf5; border-top-right-radius: 4px; }
:root[data-theme="light"] .sim .bubble.lead { background: #d9fdd3; color: #0b3d2e; }
.sim .bubble.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-top-left-radius: 4px; }
.sim .bubble.hum { align-self: flex-start; background: var(--ok-soft); border: 1px solid rgba(34,197,94,.35); border-top-left-radius: 4px; }
.sim .bubble .doc { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; background: var(--card-2); margin-bottom: 4px; }
.sim .tl { font-size: 12px; display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sim .tl:last-child { border-bottom: 0; }
@media (max-width: 1100px) { .sim { grid-template-columns: 1fr; height: auto; } .sim .phone { height: 70vh; } }
