/* T.H.E.O. — TOPMIXX Inteligência Empresarial */
:root {
  --abyss: #03070D;
  --panel: #0A1522;
  --panel-2: #0E1C2D;
  --line: #17324A;
  --line-soft: #10243A;
  --blue: #1F6FFF;
  --cyan: #3FE0FF;
  --ice: #E6F5FF;
  --steel: #7D93A8;
  --steel-2: #A9BCCD;
  --amber: #FFB547;
  --red: #FF4D6A;
  --green: #4BE3A3;
  --c-warn: #ffd79c;
  --c-critical: #ffb3c0;
  --c-ok: #a9f0cf;
  --input-bg: #06101B;
  --topbar-bg: rgba(3, 7, 13, .86);
  --radius-s: 6px;
  --radius-m: 10px;
  --rail: 68px;
  --font: 'Saira', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--abyss);
  color: var(--ice);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(63, 224, 255, .3); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: .01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .6em; }
.muted { color: var(--steel); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ── Estrutura ── */
.shell { --side: 236px; display: grid; grid-template-columns: var(--side) 1fr; height: 100dvh; transition: grid-template-columns .18s ease; }
.shell.mini { --side: 68px; }
.side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line-soft); background: #040A12; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 14px 14px 16px; }
.side-brand img { width: 34px; height: 34px; flex: 0 0 34px; }
.side-name { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.side-name b { font-weight: 500; letter-spacing: .22em; font-size: .98rem; }
.side-name span { font-size: .68rem; letter-spacing: .3em; color: var(--steel); }
.side-toggle { margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--steel); cursor: pointer; }
.side-toggle:hover { color: var(--ice); border-color: var(--line); }
.side-toggle svg { width: 16px; height: 16px; transition: transform .18s; }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.side-group + .side-group { margin-top: 10px; }
.side-title { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #5d7387; padding: 8px 10px 4px; white-space: nowrap; }
.side a { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--steel-2); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.side a svg { width: 19px; height: 19px; flex: 0 0 19px; }
.side a .lbl { overflow: hidden; text-overflow: ellipsis; }
.side a:hover { color: var(--ice); background: var(--panel); text-decoration: none; }
.side a.active { color: var(--ice); background: var(--panel-2); }
.side a.active svg { color: var(--cyan); }
.side a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; background: var(--cyan); border-radius: 0 3px 3px 0; }
.side .badge, .mobile-bar .badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: #1a1000; font-size: .7rem; font-weight: 600; display: grid; place-items: center; }
.side-foot { border-top: 1px solid var(--line-soft); padding: 8px 10px 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px 0; min-width: 0; }
.avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #12406b, #0c2b49); color: var(--ice); font-size: .78rem; font-weight: 600; border: 1px solid var(--line); }
.side-user .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.side-user .who b { font-weight: 500; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { font-size: .74rem; color: var(--steel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-logout { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 0; background: none; color: var(--steel); cursor: pointer; }
.side-logout:hover { color: #ffc2cc; background: var(--panel); }
.side-logout svg { width: 18px; height: 18px; }
/* menu recolhido: só ícones (o nome aparece ao passar o mouse) */
.shell.mini .side-name, .shell.mini .side-title, .shell.mini .side a .lbl, .shell.mini .side-user .who, .shell.mini .side-logout { display: none; }
.shell.mini .side-brand { flex-direction: column; gap: 8px; padding: 14px 0 10px; }
.shell.mini .side-toggle { margin: 0; }
.shell.mini .side-toggle svg { transform: rotate(180deg); }
.shell.mini .side-nav { padding: 4px 12px; }
.shell.mini .side-group + .side-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.shell.mini .side a { justify-content: center; padding: 0; }
.shell.mini .side .badge { position: absolute; top: 2px; right: 2px; margin: 0; min-width: 15px; height: 15px; font-size: .62rem; }
.shell.mini .side-user { justify-content: center; padding-left: 0; }
.mobile-bar, .side-backdrop { display: none; }
.main { min-width: 0; overflow: auto; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px;
  padding: 12px 28px; background: var(--topbar-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft);
}
.topbar h1 { font-size: 1.15rem; font-weight: 500; }
.topbar .grow { flex: 1; }
.topbar .who { color: var(--steel); font-size: .88rem; }
.page { padding: 24px 28px 48px; max-width: 1400px; }

/* ── Componentes ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ice); cursor: pointer; font-weight: 500;
  font-size: .92rem; white-space: nowrap;
}
.btn:hover { border-color: var(--steel); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #3a82ff; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255, 77, 106, .5); color: #ffc2cc; }
.btn.ok { border-color: rgba(75, 227, 163, .5); color: #b8f5da; }
.btn.small { padding: 4px 10px; font-size: .84rem; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--steel-2); }
.icon-btn:hover { color: var(--ice); border-color: var(--steel); }
.icon-btn.on { color: var(--abyss); background: var(--cyan); border-color: var(--cyan); }
.icon-btn svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: .85rem; color: var(--steel-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], input[type=url], input[type=tel], input:not([type]), input[type=search], select, textarea {
  background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 9px 11px; width: 100%; color: var(--ice);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .field { flex: 1; min-width: 160px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }

.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-m); padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
.grid > .panel + .panel { margin-top: 0; }
.grid { align-items: start; }
.panel > h2 { margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.figure { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.figure:first-child { border-top: 0; padding-top: 0; }
.figure .v { font-size: 1.7rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.figure .l { color: var(--steel); font-size: .88rem; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 28px; }
.figures .figure { border-top: 1px solid var(--line-soft); padding-top: 14px; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 500; color: var(--steel); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:hover td { background: rgba(63, 224, 255, .03); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
tr.clickable { cursor: pointer; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; border: 1px solid var(--line); color: var(--steel-2); white-space: nowrap; }
.tag.alta, .tag.critica, .tag.erro, .tag.falhou, .tag.rejeitada { border-color: rgba(255, 77, 106, .55); color: #ffb3c0; }
.tag.media, .tag.aguardando_aprovacao, .tag.pendente, .tag.proposta, .tag.aguardando, .tag.parcial { border-color: rgba(255, 181, 71, .55); color: #ffd79c; }
.tag.concluida, .tag.aprovada, .tag.executada, .tag.ativo, .tag.ok, .tag.paga, .tag.resolvido { border-color: rgba(75, 227, 163, .5); color: #a9f0cf; }
.tag.executando, .tag.em_andamento, .tag.na_fila { border-color: rgba(63, 224, 255, .5); color: #aaf0ff; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--steel); margin-right: 6px; }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.off { background: var(--red); }

.empty { padding: 36px 20px; text-align: center; color: var(--steel); }
.empty strong { display: block; color: var(--ice); font-weight: 500; margin-bottom: 4px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 14px; color: var(--steel); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--ice); border-bottom-color: var(--cyan); }

/* ── Modal e toasts ── */
.modal-back { position: fixed; inset: 0; background: rgba(1, 4, 8, .72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(620px, 100%); max-height: 90dvh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px 24px; }
.modal h2 { margin-bottom: 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--cyan); padding: 10px 14px; border-radius: var(--radius-s); font-size: .9rem; animation: toast-in .18s ease-out; }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
.toast strong { display: block; font-weight: 500; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ── Núcleo (esfera + conversa) ── */
.core { display: grid; grid-template-columns: minmax(0, 1fr) var(--conv-w, minmax(340px, 40%)); height: 100dvh; }
.conv { position: relative; }
.conv-grip { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 5; }
.conv-grip:hover, .conv-grip:focus-visible { background: linear-gradient(90deg, transparent 3px, var(--cyan) 3px, var(--cyan) 5px, transparent 5px); }
.core-stage { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.core-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.core-hud { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 28px; pointer-events: none; }
.core-hud > * { pointer-events: auto; }
.core-id h1 { font-size: 1.05rem; font-weight: 500; letter-spacing: .32em; }
.core-id p { color: var(--steel); font-size: .85rem; margin: 2px 0 0; }
.core-state { position: absolute; z-index: 2; left: 0; right: 0; bottom: 92px; text-align: center; pointer-events: none; }
.core-state .s { font-size: 1.25rem; font-weight: 300; letter-spacing: .08em; }
.core-state .d { color: var(--steel); font-size: .9rem; min-height: 1.4em; }
.core-controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 28px; display: flex; justify-content: center; gap: 12px; }
.mic-btn { display: inline-flex; align-items: center; gap: 9px; padding: 10px 20px; border-radius: 999px; border: 1px solid rgba(63, 224, 255, .45); background: rgba(10, 21, 34, .8); color: var(--ice); cursor: pointer; font-weight: 500; }
.mic-btn svg { width: 18px; height: 18px; color: var(--cyan); }
.mic-btn.on { background: var(--cyan); color: var(--abyss); border-color: var(--cyan); }
.mic-btn.on svg { color: var(--abyss); }
.core-glance { position: absolute; z-index: 2; top: 84px; left: 28px; display: flex; flex-direction: column; gap: 10px; font-size: .86rem; color: var(--steel-2); max-width: 260px; }
.core-glance .g { display: flex; flex-direction: column; }
.core-glance .g b { font-weight: 500; color: var(--ice); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.conv { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line-soft); background: linear-gradient(180deg, #050C15, #03070D); }
.conv-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.conv-head h2 { font-size: 1rem; flex: 1; }
.conv-list { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 92%; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--panel-2); border: 1px solid var(--line); padding: 9px 14px; border-radius: 14px 14px 4px 14px; }
.msg.assistant { align-self: flex-start; padding-left: 14px; border-left: 2px solid var(--cyan); }
.msg.assistant.error { border-left-color: var(--red); }
.msg .meta { font-size: .76rem; color: var(--steel); margin-top: 5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.msg .meta button { background: none; border: 0; color: var(--steel); cursor: pointer; padding: 0; font-size: .8rem; }
.msg .meta button:hover { color: var(--cyan); }
.msg .steps { font-size: .8rem; color: var(--steel); margin-bottom: 6px; }
.msg.live { color: var(--steel-2); font-style: italic; }
.md p:last-child { margin-bottom: 0; }
.md table { margin: 8px 0; font-size: .86rem; }
.md ul, .md ol { margin: .2em 0 .6em; padding-left: 1.3em; }
.md h3, .md h4 { margin: .8em 0 .3em; font-weight: 500; }
.md code { background: var(--input-bg); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.conv-input { display: flex; gap: 8px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); align-items: flex-end; }
.conv-input textarea { min-height: 44px; max-height: 160px; resize: none; border-radius: 12px; }
.conv-suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 12px; }
.conv-suggest button { background: transparent; border: 1px solid var(--line); color: var(--steel-2); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: .84rem; }
.conv-suggest button:hover { border-color: var(--cyan); color: var(--ice); }

/* ── Login ── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr minmax(320px, 440px); }
.auth-stage { position: relative; overflow: hidden; }
.auth-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px 44px; background: var(--panel); border-left: 1px solid var(--line-soft); }
.auth-form h1 { font-size: 1.5rem; letter-spacing: .3em; font-weight: 500; }
.auth-form .sub { color: var(--steel); margin: 6px 0 30px; }
.auth-form .err { color: #ffb3c0; min-height: 1.4em; font-size: .9rem; }

/* ── Notificações ── */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); background: var(--panel); border-left: 1px solid var(--line); z-index: 40; display: flex; flex-direction: column; box-shadow: -20px 0 40px rgba(0, 0, 0, .4); }
.drawer header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.drawer header h2 { flex: 1; }
.drawer .items { overflow-y: auto; padding: 8px 0; }
.notif { padding: 11px 18px; border-bottom: 1px solid var(--line-soft); }
.notif.unread { background: rgba(63, 224, 255, .04); }
.notif .t { font-weight: 500; }
.notif .b { color: var(--steel-2); font-size: .88rem; white-space: pre-line; }
.notif .w { color: var(--steel); font-size: .78rem; }

.pre { white-space: pre-wrap; background: var(--input-bg); border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 12px; font-size: .85rem; max-height: 420px; overflow: auto; }
.steps-list { list-style: none; padding: 0; margin: 0; }
.steps-list li { padding: 5px 0 5px 16px; border-left: 1px solid var(--line); position: relative; font-size: .88rem; }
.steps-list li::before { content: ''; position: absolute; left: -4px; top: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.bar { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--cyan); }
.bar.warn > i { background: var(--amber); }
.bar.over > i { background: var(--red); }
.code-big { font-size: 2.4rem; letter-spacing: .35em; font-weight: 500; color: var(--cyan); text-align: center; padding: 14px 0; font-variant-numeric: tabular-nums; }

/* ── Responsivo ── */
@media (max-width: 980px) {
  .core { grid-template-columns: 1fr !important; grid-template-rows: 46dvh 1fr; height: calc(100dvh - 60px); }
  .conv-grip { display: none; }
  .conv { border-left: 0; border-top: 1px solid var(--line-soft); }
  .core-glance { display: none; }
  .core-state { bottom: 70px; }
  .core-controls { bottom: 14px; }
  .auth { grid-template-columns: 1fr; grid-template-rows: 34dvh auto; }
  .auth-form { border-left: 0; padding: 32px 24px; }
}
@media (max-width: 720px) {
  .shell, .shell.mini { grid-template-columns: 1fr; grid-template-rows: 54px 1fr; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line-soft); background: #040A12; }
  .mobile-bar img { width: 26px; height: 26px; }
  .mobile-bar .mobile-title { font-weight: 500; }
  .mobile-bar .grow { flex: 1; }
  .mobile-bar .icon-btn { position: relative; width: 40px; height: 40px; border: 0; background: none; }
  .mobile-bar .badge { position: absolute; top: 4px; right: 2px; }
  .side { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(290px, 84vw); transform: translateX(-102%); transition: transform .2s ease; }
  .shell.open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
  .shell.open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .5); }
  .shell.mini .side-name, .shell.mini .side-user .who { display: flex; } .shell.mini .side-title { display: block; } .shell.mini .side a .lbl { display: inline; } .shell.mini .side-logout { display: grid; } .shell.mini .side a { justify-content: flex-start; padding: 0 10px; } .shell.mini .side .badge { position: static; margin-left: auto; } .shell.mini .side-brand { flex-direction: row; padding: 16px 14px 14px 16px; }
  .side-toggle { display: none; }
  .shell .side a { height: 42px; }
  .page { padding: 18px 16px 40px; }
  .topbar { padding: 12px 16px; }
  .topbar .who { display: none; }
  .core { height: calc(100dvh - 54px); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Mapa vivo da empresa ── */
.orgmap-links { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.orgmap-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sector {
  --heat: 0;
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  width: 178px; padding: 10px 12px; text-align: left; cursor: pointer;
  background: rgba(8, 18, 30, .88); color: var(--ice);
  border: 1px solid rgba(63, 224, 255, calc(.16 + var(--heat) * .7));
  border-radius: var(--radius-m);
  box-shadow: 0 0 calc(var(--heat) * 28px) rgba(63, 224, 255, calc(var(--heat) * .45));
  backdrop-filter: blur(4px);
}
.sector:hover { border-color: rgba(63, 224, 255, .6); }
.sector.alerting { border-color: rgba(255, 181, 71, .65); }
.sector-name { font-weight: 500; font-size: .95rem; }
.sector-people { display: flex; flex-wrap: wrap; gap: 4px; font-size: .78rem; }
.person { padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--steel-2); }
.person.online { border-color: rgba(75, 227, 163, .55); color: #c8f7e2; }
.person.talking { border-color: var(--cyan); color: var(--abyss); background: var(--cyan); }
.person.more { border-style: dashed; }
.sector-status { font-size: .76rem; color: var(--steel); line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.sector.mid { width: 148px; padding: 8px 10px; }
.sector.mid .sector-status { display: none; }
.sector.mid .sector-people { font-size: .72rem; }
.sector.compact { width: auto; max-width: 104px; padding: 5px 9px; gap: 2px; }
.sector.compact .sector-name { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 86px; }
.sector.compact .sector-people, .sector.compact .sector-status { display: none; }
.orgmap-ticker { position: absolute; z-index: 3; left: var(--cx, 50%); top: calc(var(--cy, 50%) + var(--hud, 120px) + 62px); transform: translateX(-50%); margin: 0; padding: 0; list-style: none; font-size: .78rem; color: var(--steel-2); width: min(300px, 46%); text-align: center; pointer-events: none; }
.orgmap-ticker li { padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orgmap-ticker li:first-child { color: var(--ice); }
.core.map-mode .core-glance { display: none; }
.core.map-mode .core-state { bottom: auto; right: auto; left: var(--cx, 50%); top: calc(var(--cy, 50%) + var(--hud, 120px) + 14px); transform: translateX(-50%); width: min(320px, 50%); text-align: center; }
.core.map-mode .core-hud p { display: none; }
.core.map-mode .core-state .s { font-size: 1rem; }
.core.map-mode .core-state .d { font-size: .8rem; }
.core.map-mode .core-controls { left: auto; right: 24px; bottom: 22px; }
.mapfull { position: relative; height: 100dvh; overflow: hidden; }
.mapfull > canvas.sphere { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapfull .core-hud { position: absolute; top: 0; left: 0; right: 0; }
@media (max-width: 980px) {
  .core.map-mode { grid-template-rows: 62dvh 1fr; }
  .orgmap-ticker { display: none; }
  .core.map-mode .core-state { display: none; }
  .core.map-mode .core-controls { right: 12px; bottom: 10px; }
  .core.map-mode .mic-btn { padding: 7px 14px; font-size: .85rem; }
}
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.toolbar input[type=search] { min-width: 260px; }
.conv-head .listen-toggle { gap: 4px; }
.conv-head .listen-toggle .dot { margin-right: 2px; }
.talk-btn { width: 44px; height: 44px; flex: 0 0 44px; border-color: rgba(63, 224, 255, .45); color: var(--cyan); }
.talk-btn.on { background: var(--cyan); color: var(--abyss); box-shadow: 0 0 18px rgba(63, 224, 255, .55); }
@media (max-width: 720px) { .conv-head select { display: none; } }

/* ── Módulos: cobrança, compras, B2B ── */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid2 > .panel + .panel { margin-top: 0; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 120px; gap: 10px; align-items: center; font-size: .9rem; }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; }
.hbar .bar { height: 8px; }
.divs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.divs li { padding: 8px 10px; border-left: 3px solid var(--amber); background: rgba(255, 181, 71, .06); border-radius: 4px; }
.divs li b { color: #ffd79c; margin-right: 6px; }
.drop { border: 1px dashed var(--line); border-radius: var(--radius-m); padding: 22px; text-align: center; color: var(--steel); }
.drop.over { border-color: var(--cyan); color: var(--ice); background: rgba(63, 224, 255, .05); }
@media (max-width: 640px) {
  .hbar { grid-template-columns: 90px 1fr 96px; font-size: .82rem; }
  .grid2 { grid-template-columns: 1fr; }
  .toolbar input, .toolbar select, .toolbar input[type=search] { min-width: 0; width: 100%; }
  .toolbar .btn { flex: 1 1 auto; }
}

/* ── Páginas públicas (advogado, pedidos B2B) ── */
.public { max-width: 880px; margin: 0 auto; padding: 22px 16px 110px; }
.pub-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.pub-head img { width: 54px; height: 54px; }
.pub-head h1 { font-size: 1.35rem; margin: 2px 0; }
.pub-brand { letter-spacing: .25em; font-size: .75rem; color: var(--cyan); }
.pub-list { display: flex; flex-direction: column; gap: 14px; }
.pub-list > .panel + .panel { margin-top: 0; }
.pub-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.pub-foot { text-align: center; margin-top: 28px; }
.pub-ok { border-color: rgba(75, 227, 163, .5); margin-bottom: 14px; }
.prod { display: grid; grid-template-columns: 1fr auto 92px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.prod .price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prod .qty { width: 92px; text-align: right; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px max(16px, calc(50% - 424px)); background: var(--panel); border-top: 1px solid var(--line); z-index: 20; }
.cart-bar.hidden { display: none; }
@media (max-width: 520px) { .prod { grid-template-columns: 1fr 80px; } .prod .price { grid-column: 1; grid-row: 2; } .prod .qty { grid-row: 1 / span 2; grid-column: 2; width: 80px; } }
@media (min-width: 721px) and (max-height: 820px) { .side a { height: 32px; } .side-title { padding-top: 6px; } .side-group + .side-group { margin-top: 6px; } .side-brand { padding-top: 10px; padding-bottom: 8px; } }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 8px 2px; }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.check input { margin-top: 3px; width: auto; }
.modal:has(.checks) { width: min(860px, 100%); }
.sector-resp { font-size: .72rem; color: var(--cyan); opacity: .85; }
.sector.compact .sector-resp, .sector.mid .sector-resp { display: none; }

/* ── Saúde do sistema ── */
.health { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.health-item { border: 1px solid var(--line-soft); border-left: 3px solid rgba(75, 227, 163, .6); border-radius: var(--radius-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.health-item.aviso { border-left-color: var(--amber); }
.health-item.erro { border-left-color: var(--red); background: rgba(255, 77, 106, .05); }
.health-top { display: flex; gap: 8px; align-items: center; }
.help-doc { max-width: 860px; line-height: 1.6; }
.help-doc h3 { font-size: 1.35rem; margin-top: 0; }
.help-doc h4 { font-size: 1.05rem; margin-top: 1.4em; color: var(--cyan); }
.code-inline { font-family: ui-monospace, Consolas, monospace; background: var(--input-bg); padding: 2px 8px; border-radius: 4px; color: var(--cyan); }

/* Núcleo mais limpo: histórico de atividade numa faixa própria, título só no menu */
.core.map-mode .core-id { display: none; }
.orgmap-ticker { left: 18px; right: 18px; top: auto; bottom: 12px; transform: none; width: auto; text-align: left; display: flex; gap: 18px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.orgmap-ticker li { flex: 0 1 auto; min-width: 0; }
.orgmap-ticker li:first-child::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); margin-right: 7px; vertical-align: middle; box-shadow: 0 0 8px var(--cyan); }
.orgmap-ticker li + li { color: var(--steel); }
.orgmap-hint { position: absolute; z-index: 3; top: 16px; left: 18px; font-size: .8rem; color: var(--steel); border: 1px dashed var(--line); border-radius: 999px; padding: 3px 11px; }
.orgmap-hint:hover { color: var(--ice); border-color: var(--steel); text-decoration: none; }

/* ── Ajustes em abas ── */
.settings { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
.set-nav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line, rgba(120,190,255,.14)); border-radius: 14px; background: rgba(10,20,36,.55); }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 14px; opacity: .78; }
.set-nav a svg { width: 18px; height: 18px; flex: none; }
.set-nav a:hover { background: rgba(120,190,255,.08); opacity: 1; }
.set-nav a.active { background: rgba(70,170,255,.16); opacity: 1; box-shadow: inset 3px 0 0 #5cc8ff; }
.set-body { min-width: 0; display: flex; flex-direction: column; gap: 16px; max-width: 920px; }
.set-head h2 { margin: 0 0 4px; font-size: 20px; }
.set-head p { margin: 0; }
.set-card h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: .02em; }
.set-card .row { display: flex; flex-wrap: wrap; gap: 14px; }
.set-card .row > * { flex: 1 1 220px; }
.set-actions { display: flex; gap: 10px; justify-content: flex-end; }
.set-actions.top { justify-content: flex-start; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 12px; }
dl.kv dt { opacity: .65; }
dl.kv dd { margin: 0; }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .set-nav a { white-space: nowrap; }
  .set-nav a.active { box-shadow: inset 0 -3px 0 #5cc8ff; }
}
.set-card .row { align-items: flex-start; }
.set-card input[type=file] { width: 100%; padding: 8px; border: 1px dashed rgba(120,190,255,.32); border-radius: 10px; background: rgba(7,17,31,.6); color: inherit; font: inherit; cursor: pointer; }
.set-card input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 1px solid rgba(120,190,255,.3); border-radius: 8px; background: rgba(70,170,255,.14); color: inherit; font: inherit; cursor: pointer; }

/* ── Painel executivo ── */
:root { --viz-1: #3987e5; --viz-2: #d95926; --st-good: #0ca30c; --st-warn: #fab219; --st-serious: #ec835a; --st-critical: #d03b3b; }
.dash { display: flex; flex-direction: column; gap: 16px; }
.dash-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-hello { font-size: 1.35rem; font-weight: 600; letter-spacing: .01em; }
.dash-fresh { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; color: var(--steel-2); background: var(--panel); }
.dash-fresh .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-good); box-shadow: 0 0 0 3px rgba(12,163,12,.18); }
.dash-fresh.none .dot { background: var(--st-warn); box-shadow: 0 0 0 3px rgba(250,178,25,.16); }
.dash-fresh a { margin-left: 4px; }
.dash-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1400px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-m); padding: 14px 16px 13px; min-width: 0; }
.kpi-l { font-size: .78rem; color: var(--steel); letter-spacing: .02em; }
.kpi-v { font-size: 1.65rem; font-weight: 600; line-height: 1.25; margin: 4px 0 2px; color: var(--ice); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-s { font-size: .78rem; color: var(--steel-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend { font-weight: 600; } .trend.up { color: #3fcf6b; } .trend.down { color: #f07070; }
.kpi.down { box-shadow: inset 3px 0 0 var(--st-critical); }
.kpi.warn { box-shadow: inset 3px 0 0 var(--st-warn); }
.dash-row { display: grid; gap: 16px; }
.dash-row.r-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dash-row.r-11 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dash-row.r-111 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash .panel, .dash-card { margin: 0; }
.dash-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dash-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dash-card-head h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.dash-card-act { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.dash-brief { margin-bottom: 16px; }
.dash-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.dash-list li { display: flex; gap: 8px; flex-wrap: wrap; font-size: .9rem; }
.dash-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dash-alerts li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: .88rem; align-items: start; }
.dash-alerts li:first-child { border-top: 0; padding-top: 0; }
.dash-alerts .lv { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.dash-alerts .lv svg { width: 14px; height: 14px; }
.dash-alerts .lv-alta .lv { color: var(--st-critical); }
.dash-alerts .lv-media .lv { color: var(--st-warn); }
.dash-alerts .lv-baixa .lv { color: var(--steel-2); }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mini-stat { display: flex; flex-direction: column; padding: 10px 12px; background: var(--panel-2); border-radius: var(--radius-s); min-width: 0; }
.mini-stat strong { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-stat span { font-size: .75rem; color: var(--steel-2); }
.mini-stat.warn { box-shadow: inset 3px 0 0 var(--st-warn); }
.dash-note { color: var(--steel-2); display: flex; align-items: center; gap: 6px; margin: 0; }
.dash-note svg { width: 14px; height: 14px; color: var(--st-warn); }
.dash-budget { display: flex; flex-direction: column; gap: 8px; }
.dash-budget-v { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-budget-v span { font-size: .9rem; font-weight: 400; }
.meter { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--viz-1); }
.meter.warn i { background: var(--st-warn); }
.meter.over i { background: var(--st-critical); }

/* gráficos */
.viz { position: relative; min-width: 0; }
.viz-svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-grid { stroke: var(--line-soft); stroke-width: 1; }
.viz-base { stroke: var(--line); stroke-width: 1; }
.viz-tick { fill: var(--steel); font-size: 11px; font-family: var(--font); }
.viz-bar { pointer-events: none; }
.viz-hit { fill: transparent; cursor: default; }
.viz-hit.on { fill: rgba(169, 188, 205, .06); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--steel-2); margin-bottom: 6px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i, .viz-tip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 150px; padding: 18px; text-align: center; color: var(--steel); font-size: .88rem; border: 1px dashed var(--line-soft); border-radius: var(--radius-s); }
.viz-empty svg { width: 18px; height: 18px; color: var(--st-good); flex: none; }
.viz-tip { position: fixed; z-index: 1000; display: none; pointer-events: none; min-width: 150px; padding: 8px 10px; background: #0E1C2D; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: .8rem; color: var(--ice); }
.viz-tip-row { display: flex; align-items: center; gap: 7px; line-height: 1.6; }
.viz-tip-row:first-child { color: var(--steel-2); margin-bottom: 2px; }
.viz-tip-row strong { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.viz-toggle { background: none; border: 0; padding: 0; color: var(--steel-2); font: inherit; font-size: .8rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.viz-toggle:hover { color: var(--ice); }
.viz-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.viz-table th, .viz-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.viz-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.vhbs { display: flex; flex-direction: column; gap: 11px; }
.vhb { outline: none; }
.vhb:focus-visible { box-shadow: 0 0 0 2px var(--viz-1); border-radius: 4px; }
.vhb-top { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 4px; }
.vhb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vhb-val { font-variant-numeric: tabular-nums; color: var(--steel-2); white-space: nowrap; }
.vhb-track { height: 8px; border-radius: 4px; background: var(--panel-2); }
.vhb-fill { position: relative; height: 100%; border-radius: 4px; background: var(--viz-1); overflow: hidden; }
.vhb-part { position: absolute; right: 0; top: 0; bottom: 0; background: var(--viz-2); border-left: 2px solid var(--panel); }
.vhb-sub { font-size: .74rem; color: var(--steel); margin-top: 3px; }
@media (max-width: 1100px) { .dash-row.r-21, .dash-row.r-111 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .dash-row.r-11 { grid-template-columns: minmax(0, 1fr); } .kpi-v { font-size: 1.4rem; } .mini-stats { grid-template-columns: 1fr 1fr 1fr; } }
.dash-stack { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 760px) { .topbar h1 { display: none; } .topbar { flex-wrap: wrap; justify-content: flex-end; gap: 8px; } }

/* conversa no Mapa da empresa (legenda + controles, embaixo ao centro) */
.map-conv { position: absolute; z-index: 3; left: 50%; bottom: 66px; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; pointer-events: none; }
.map-conv > * { pointer-events: auto; }
.mc-state { font-size: .82rem; letter-spacing: .06em; color: var(--steel-2); }
.map-conv[data-state="ouvindo"] .mc-state { color: var(--cyan); }
.mc-you, .mc-theo { max-height: 0; opacity: 0; overflow: hidden; transition: opacity .35s, max-height .35s; }
.map-conv.show .mc-you, .map-conv.show .mc-theo { max-height: 220px; opacity: 1; }
.mc-you { font-size: .92rem; color: var(--steel-2); font-style: italic; }
.mc-theo { font-size: 1.08rem; line-height: 1.5; color: var(--ice); padding: 10px 16px; background: rgba(4, 10, 18, .72); border: 1px solid var(--line-soft); border-radius: 12px; backdrop-filter: blur(6px); max-width: 100%; }
.mc-theo:empty { display: none; }
.mc-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px; background: rgba(4, 10, 18, .7); border: 1px solid var(--line-soft); border-radius: 999px; backdrop-filter: blur(6px); }
.mc-form { display: flex; align-items: center; gap: 6px; }
.mc-form input { width: min(320px, 40vw); background: transparent; border: 0; color: var(--ice); font: inherit; padding: 6px 8px; outline: none; }
@media (max-width: 760px) { .map-conv { bottom: 70px; } .mc-form input { width: 38vw; } .mc-bar .listen-toggle { display: none; } }
.mapfull .orgmap-hint { top: auto; bottom: 66px; left: 18px; }
/* Mapa limpo: só a esfera, os setores e dois botões pequenos no canto */
.map-tools { position: absolute; z-index: 4; top: 14px; right: 14px; display: flex; gap: 8px; }
.map-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-soft); background: rgba(4, 10, 18, .55); color: var(--steel); cursor: pointer; opacity: .55; transition: opacity .2s, color .2s, border-color .2s, box-shadow .2s; }
.map-btn svg { width: 16px; height: 16px; }
.map-btn:hover, .map-btn:focus-visible { opacity: 1; color: var(--ice); }
.map-btn.on { opacity: .95; color: var(--cyan); border-color: rgba(63, 224, 255, .45); box-shadow: 0 0 12px rgba(63, 224, 255, .25); }
/* painéis holográficos do mapa */
.holo-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.holo { position: absolute; pointer-events: auto; display: flex; flex-direction: column; max-height: 62%; background: linear-gradient(180deg, rgba(8, 30, 52, .78), rgba(4, 14, 26, .82)); border: 1px solid rgba(63, 224, 255, .32); border-radius: 12px; box-shadow: 0 0 0 1px rgba(63, 224, 255, .06) inset, 0 0 24px rgba(63, 224, 255, .12), 0 18px 40px rgba(0, 0, 0, .45); backdrop-filter: blur(8px); color: var(--ice); opacity: 0; transform: scale(.92) translateY(8px); transform-origin: top center; transition: opacity .26s ease, transform .26s ease, width .26s ease, height .26s ease, left .26s ease, top .26s ease; overflow: hidden; }
.holo::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(63, 224, 255, .035) 0 1px, transparent 1px 3px); }
.holo::after { content: ''; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-left: 2px solid var(--cyan); border-top: 2px solid var(--cyan); border-top-left-radius: 12px; opacity: .8; pointer-events: none; }
.holo.in { opacity: 1; transform: none; }
.holo.out { opacity: 0; transform: scale(.94); }
.holo.big { left: 6% !important; top: 6% !important; width: 88% !important; max-height: 88%; }
.holo-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; border-bottom: 1px solid rgba(63, 224, 255, .16); cursor: grab; user-select: none; touch-action: none; }
.holo-head:active { cursor: grabbing; }
.holo-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; letter-spacing: .03em; color: #bff3ff; }
.holo-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.holo-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); flex: none; }
.holo-time { font-size: .72rem; color: var(--steel); }
.holo-btn { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgba(63, 224, 255, .22); border-radius: 6px; background: transparent; color: var(--steel-2); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
.holo-btn svg { width: 12px; height: 12px; }
.holo-btn:hover { color: var(--ice); border-color: var(--cyan); }
.holo-body { position: relative; padding: 12px 14px 14px; overflow: auto; font-size: .9rem; scrollbar-width: thin; scrollbar-color: rgba(63, 224, 255, .3) transparent; }
.holo-body .md table { font-size: .82rem; }
.holo-body .md > :first-child { margin-top: 0; }
.holo-body .md > :last-child { margin-bottom: 0; }
.holo-error { color: #ffc2cd; }
.holo-loading { display: flex; gap: 6px; padding: 8px 0; }
.holo-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); opacity: .3; animation: holo-dot 1s infinite ease-in-out; }
.holo-loading span:nth-child(2) { animation-delay: .15s; } .holo-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes holo-dot { 50% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .holo, .holo-loading span { transition: none; animation: none; } }

/* ── revisão geral 1.4 ── */
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.drop input[type=file] { display: none; }
.drop strong { color: var(--ice); font-weight: 500; }
input[type=file] { color: var(--steel-2); font: inherit; font-size: .88rem; max-width: 100%; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); color: var(--ice); font: inherit; cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--steel); }
.tabs { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
@media (min-width: 721px) and (max-height: 960px) { .side a { height: 32px; } .side-title { padding-top: 6px; padding-bottom: 2px; } .side-group + .side-group { margin-top: 4px; } }
.side-foot .side-notif + .side-notif { margin-top: 0; }

/* agentes por setor */
.agent-sectors { display: flex; flex-direction: column; gap: 22px; margin-top: 6px; }
.agent-sector h3 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-2); font-weight: 600; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.agent-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-m); cursor: pointer; transition: border-color .15s, background .15s; outline: none; }
.agent-card:hover, .agent-card:focus-visible { border-color: var(--line); background: var(--panel-2); }
.agent-card.off { opacity: .6; }
.agent-card header { display: flex; align-items: flex-start; gap: 10px; }
.agent-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(63,224,255,.08); color: var(--cyan); }
.agent-ico svg { width: 18px; height: 18px; }
.agent-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agent-name b { font-weight: 600; line-height: 1.3; }
.agent-desc { margin: 0; font-size: .86rem; color: var(--steel-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-card footer { display: flex; align-items: center; gap: 12px; font-size: .8rem; color: var(--steel); border-top: 1px solid var(--line-soft); padding-top: 9px; }
.agent-card footer b { color: var(--ice); font-weight: 600; }
.agent-card footer .warn b { color: var(--amber); }
.agent-card footer .grow { flex: 1; }
.agent-cta { color: var(--cyan); font-weight: 500; }

/* ═══════════ Tema claro nas telas de trabalho (1.5) ═══════════
   O menu lateral, o Núcleo e o Mapa continuam escuros (.dark-zone). */
.txt-warn { color: var(--c-warn); } .txt-critical { color: var(--c-critical); } .txt-ok { color: var(--c-ok); }
tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--st-warn); }
tr.row-critical td:first-child { box-shadow: inset 3px 0 0 var(--st-critical); }
.segmented { display: inline-flex; gap: 2px; padding: 3px; margin: -6px 0 16px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 9px; }
.segmented:empty { display: none; }
.segmented button { border: 0; background: transparent; color: var(--steel-2); padding: 6px 14px; border-radius: 7px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.segmented button.active { background: var(--panel); color: var(--ice); box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.figures { gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.figures .figure, .figures .figure:first-child { border: 1px solid var(--line-soft); border-radius: var(--radius-m); background: var(--panel); padding: 14px 16px; }
.figures .figure .v { font-size: 1.5rem; font-weight: 600; }
.figures .figure .l { font-size: .8rem; }
.panel .figures .figure { background: var(--panel-2); }
.help-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--steel-2); font-weight: 600; cursor: pointer; display: grid; place-items: center; font-size: .9rem; }
.help-btn:hover { color: var(--ice); border-color: var(--steel); }
.help-pop { position: absolute; z-index: 30; max-width: 380px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 12px 30px rgba(0,0,0,.25); font-size: .88rem; color: var(--steel-2); line-height: 1.5; }

html[data-theme="light"] {
  --abyss: #f3f5f8; --panel: #ffffff; --panel-2: #f2f5f9; --line: #d5dde7; --line-soft: #e5eaf0;
  --blue: #1f6fff; --cyan: #0b74c4; --ice: #142233; --steel: #66768a; --steel-2: #44546a;
  --amber: #b86e00; --red: #c8283f; --green: #12805a;
  --c-warn: #a35c00; --c-critical: #b4232f; --c-ok: #137a52;
  --input-bg: #ffffff; --topbar-bg: rgba(255, 255, 255, .92);
  --viz-1: #2a78d6; --viz-2: #eb6834;
  color-scheme: light;
}
/* zonas que continuam escuras mesmo no tema claro */
html[data-theme="light"] :is(.side, .mobile-bar, .dark-zone, .mapfull) {
  --abyss: #03070D; --panel: #0A1522; --panel-2: #0E1C2D; --line: #17324A; --line-soft: #10243A;
  --blue: #1F6FFF; --cyan: #3FE0FF; --ice: #E6F5FF; --steel: #7D93A8; --steel-2: #A9BCCD;
  --amber: #FFB547; --red: #FF4D6A; --green: #4BE3A3; --c-warn: #ffd79c; --c-critical: #ffb3c0; --c-ok: #a9f0cf;
  --input-bg: #06101B; --topbar-bg: rgba(3, 7, 13, .86); --viz-1: #3987e5; --viz-2: #d95926;
  color-scheme: dark; color: var(--ice);
}
html[data-theme="light"] .main.dark-zone { background: #03070D; }
html[data-theme="light"] .main:not(.dark-zone) { background: var(--abyss); }
html[data-theme="light"] :is(.btn.danger):not(.dark-zone *) { border-color: rgba(200, 40, 63, .45); color: #b4232f; }
html[data-theme="light"] :is(.btn.ok):not(.dark-zone *) { border-color: rgba(18, 128, 90, .45); color: #137a52; }
html[data-theme="light"] .btn:not(.primary):not(.dark-zone *) { background: #fff; }
html[data-theme="light"] .btn.ghost:not(.dark-zone *) { background: transparent; }
html[data-theme="light"] .tag:is(.alta, .critica, .erro, .falhou, .rejeitada):not(.dark-zone *) { border-color: rgba(200, 40, 63, .4); color: #b4232f; background: #fdf1f2; }
html[data-theme="light"] .tag:is(.media, .aguardando_aprovacao, .pendente, .proposta, .aguardando, .parcial):not(.dark-zone *) { border-color: rgba(184, 110, 0, .4); color: #8a5300; background: #fff7e8; }
html[data-theme="light"] .tag:is(.concluida, .aprovada, .executada, .ativo, .ok, .paga, .resolvido):not(.dark-zone *) { border-color: rgba(18, 128, 90, .35); color: #137a52; background: #eefaf4; }
html[data-theme="light"] .tag:is(.executando, .em_andamento, .na_fila):not(.dark-zone *) { border-color: rgba(11, 116, 196, .35); color: #0b5f9e; background: #eef6fd; }
html[data-theme="light"] tr:hover td:not(.dark-zone *) { background: #f6f9fc; }
html[data-theme="light"] .modal-back { background: rgba(20, 34, 51, .38); }
html[data-theme="light"] :is(.modal, .drawer, .toast, .help-pop) { box-shadow: 0 18px 48px rgba(20, 34, 51, .18); }
html[data-theme="light"] .notif.unread { background: #eef6fd; }
html[data-theme="light"] .divs li { background: #fff7e8; }
html[data-theme="light"] .divs li b { color: #8a5300; }
html[data-theme="light"] .drop.over { background: #eef6fd; }
html[data-theme="light"] .health-item.erro { background: #fdf1f2; }
html[data-theme="light"] .set-nav { background: #fff; border-color: var(--line-soft); }
html[data-theme="light"] .set-nav a:hover { background: var(--panel-2); }
html[data-theme="light"] .set-nav a.active { background: #e9f2fd; box-shadow: inset 3px 0 0 var(--blue); }
html[data-theme="light"] .set-card input[type=file] { background: #fff; border-color: var(--line); }
html[data-theme="light"] input[type=file]::file-selector-button { background: var(--panel-2); color: var(--ice); }
html[data-theme="light"] .trend.up { color: #137a52; } html[data-theme="light"] .trend.down { color: #b4232f; }
html[data-theme="light"] .viz-tip { background: #fff; color: var(--ice); }
html[data-theme="light"] .viz-hit.on { fill: rgba(20, 34, 51, .05); }
html[data-theme="light"] .agent-ico { background: #e9f2fd; color: var(--blue); }
html[data-theme="light"] .agent-cta { color: var(--blue); }
html[data-theme="light"] .dash-fresh, html[data-theme="light"] .kpi { box-shadow: 0 1px 2px rgba(20, 34, 51, .04); }
html[data-theme="light"] :is(.panel, .kpi, .agent-card, .figures .figure):not(.dark-zone *) { box-shadow: 0 1px 2px rgba(20, 34, 51, .05); }
html[data-theme="light"] .meter, html[data-theme="light"] .vhb-track { background: #e8edf3; }
html[data-theme="light"] .vhb-part { border-left-color: #fff; }
html[data-theme="light"] .code-big { color: var(--blue); }
html[data-theme="light"] ::selection { background: rgba(31, 111, 255, .2); }
html[data-theme="light"] .kpi.down { box-shadow: inset 3px 0 0 var(--st-critical), 0 1px 2px rgba(20, 34, 51, .05); }
html[data-theme="light"] .kpi.warn { box-shadow: inset 3px 0 0 var(--st-warn), 0 1px 2px rgba(20, 34, 51, .05); }
/* "Como funciona" recolhido */
.hint { margin: 0 0 14px; font-size: .86rem; color: var(--steel-2); }
.hint summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--steel); list-style: none; user-select: none; font-size: .82rem; }
.hint summary::-webkit-details-marker { display: none; }
.hint summary svg { width: 15px; height: 15px; }
.hint summary:hover { color: var(--ice); }
.hint[open] summary { color: var(--ice); margin-bottom: 6px; }
.hint p { margin: 0; max-width: 820px; line-height: 1.55; padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-s); }
/* conversa rápida no canto */
.qc-btn { position: fixed; z-index: 45; right: 22px; bottom: 22px; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(63,224,255,.45); background: radial-gradient(circle at 50% 40%, #0e2a44, #03070D 70%); box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 18px rgba(63,224,255,.25); cursor: pointer; display: grid; place-items: center; transition: transform .15s; }
.qc-btn img { width: 32px; height: 32px; }
.qc-btn:hover { transform: scale(1.06); }
.qc-btn.on { box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 0 3px rgba(63,224,255,.35); }
.qc-btn[hidden] { display: none; }
.qc-panel { position: fixed; z-index: 46; right: 22px; bottom: 88px; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 120px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.qc-panel[hidden] { display: none; }
.qc-panel header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.qc-panel header img { width: 24px; height: 24px; }
.qc-panel header b { letter-spacing: .14em; font-weight: 600; font-size: .9rem; }
.qc-panel header .grow { flex: 1; }
.qc-x { border: 0; background: transparent; color: var(--steel); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.qc-list { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.qc-empty { color: var(--steel); font-size: .88rem; text-align: center; margin: auto 10px; }
.qc-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.qc-msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.qc-msg.theo { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.qc-msg.err { color: var(--c-critical); }
.qc-msg .md table { font-size: .8rem; }
.qc-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line-soft); }
.qc-input textarea { flex: 1; min-height: 40px; max-height: 120px; resize: none; }
@media (max-width: 720px) { .qc-btn { right: 14px; bottom: 14px; width: 48px; height: 48px; } .qc-panel { right: 8px; left: 8px; width: auto; bottom: 72px; } }
.main:not(.dark-zone) .page { padding-bottom: 96px; }
html[data-theme="light"] .auth { background: #03070D; }

/* ── menu lateral em categorias (uma aberta por vez) com subcategorias ── */
.side-group:not(.single) .side-items { display: none; }
.side-group.open .side-items { display: block; }
button.side-title { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; width: 100%; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #6f869b; padding: 9px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
button.side-title:hover { color: var(--ice); background: rgba(120, 190, 255, .06); }
button.side-title:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
button.side-title svg { width: 14px; height: 14px; transform: rotate(180deg); transition: transform .15s; opacity: .7; }
.side-group.open button.side-title { color: var(--steel-2); }
.side-group.open button.side-title svg { transform: rotate(-90deg); }
.side-group + .side-group { margin-top: 2px; }
.side-group.single + .side-group, .side-group + .side-group.single { margin-top: 2px; }
.side-sub { display: none; margin: 2px 0 6px 21px; padding-left: 12px; border-left: 1px solid var(--line); }
.side-item.current .side-sub { display: block; }
.side .side-sub a { height: 30px; font-size: .84rem; color: var(--steel); padding: 0 10px; }
.side .side-sub a.active { color: var(--cyan); background: transparent; }
.side .side-sub a.active::before { display: none; }
/* menu recolhido: só os ícones de todas as telas, sem categorias nem subcategorias */
.shell.mini .side-group .side-items { display: block; }
.shell.mini button.side-title { display: none; }
.shell.mini .side-sub { display: none !important; }
@media (max-width: 720px) {
  .shell.mini .side-group:not(.open) .side-items { display: none; }
  .shell.mini button.side-title { display: flex; }
  .shell.mini .side-item.current .side-sub { display: block !important; }
}

/* ── mapa neural: setores como núcleos, pessoas e agentes como neurônios ── */
.nhub { position: absolute; transform: translate(-50%, calc(-100% - 14px)); display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 10px; border: 1px solid rgba(63, 224, 255, .22); border-radius: 999px; background: rgba(3, 10, 18, .72); color: var(--ice); font: inherit; cursor: pointer; pointer-events: auto; white-space: nowrap; backdrop-filter: blur(4px); }
.nhub b { font-size: .8rem; font-weight: 600; letter-spacing: .04em; }
.nhub span { font-size: .66rem; color: var(--steel); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.nhub:hover { border-color: rgba(63, 224, 255, .65); }
.nhub.alerting { border-color: rgba(255, 181, 71, .6); }
.nlabel { position: absolute; transform: translate(-50%, 0); font-size: .66rem; color: rgba(169, 188, 205, .75); white-space: nowrap; pointer-events: auto; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.nlabel.agente { color: rgba(185, 172, 255, .8); }
.nlabel.live { color: #e6f5ff; font-weight: 600; }
.neural-compact .nlabel { display: none; }
.neural-compact .nhub span { display: none; }

/* ── Órbita executiva (mapa da empresa) ── */
.orbita .ohub { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border: 1px solid rgba(63, 224, 255, .35); border-radius: 999px; background: linear-gradient(180deg, rgba(10, 26, 44, .92), rgba(4, 12, 22, .92)); color: var(--ice); font: inherit; text-align: left; cursor: pointer; pointer-events: auto; white-space: nowrap; box-shadow: 0 0 0 1px rgba(63, 224, 255, .06), 0 0 22px rgba(63, 224, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .05); backdrop-filter: blur(6px); transition: border-color .2s, box-shadow .2s, opacity .25s; z-index: 2; }
.orbita .ohub:hover, .orbita .ohub:focus-visible { border-color: rgba(63, 224, 255, .8); box-shadow: 0 0 28px rgba(63, 224, 255, .3); }
.ohub-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #8ff0ff; background: radial-gradient(circle at 50% 35%, rgba(63, 224, 255, .28), rgba(63, 224, 255, .06)); border: 1px solid rgba(63, 224, 255, .45); }
.ohub-ico svg { width: 19px; height: 19px; }
.ohub-txt { display: flex; flex-direction: column; line-height: 1.2; }
.ohub-txt b { font-size: .86rem; font-weight: 600; letter-spacing: .01em; }
.ohub-txt span { font-size: .7rem; color: var(--steel); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.orbita .ohub.alerting { border-color: rgba(255, 181, 71, .65); box-shadow: 0 0 22px rgba(255, 181, 71, .18); }
.orbita .ohub.alerting .ohub-ico { color: #ffd08a; border-color: rgba(255, 181, 71, .55); background: radial-gradient(circle at 50% 35%, rgba(255, 181, 71, .25), rgba(255, 181, 71, .05)); }
.onode { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 7px; max-width: 190px; pointer-events: auto; transition: opacity .25s; }
.onode-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; }
.onode.pessoa .onode-ico { border-radius: 50%; color: #8ff0ff; background: radial-gradient(circle at 50% 30%, rgba(63, 224, 255, .3), rgba(6, 22, 36, .95)); border: 1px solid rgba(63, 224, 255, .55); box-shadow: 0 0 12px rgba(63, 224, 255, .25); }
.onode.pessoa .onode-ico svg { width: 17px; height: 17px; }
.onode.agente .onode-ico { color: #b9a9ff; filter: drop-shadow(0 0 6px rgba(157, 132, 255, .5)); }
.onode.agente .onode-ico svg { width: 30px; height: 30px; }
.onode-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.onode-txt b { font-size: .74rem; font-weight: 600; color: #e6f2fb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onode-txt span { font-size: .64rem; color: rgba(150, 172, 192, .85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onode:not(.online):not(.live) { opacity: .78; }
.onode.live .onode-txt span { color: #8ff0ff; }
.onode.agente.live .onode-txt span { color: #c7b9ff; }
.onode.live .onode-ico { animation: onode-pulse 1.6s ease-in-out infinite; }
@keyframes onode-pulse { 50% { transform: scale(1.1); } }
.orbita .dim { opacity: .18 !important; }
.orbita-compact .onode-txt span, .orbita-compact .ohub-txt span { display: none; }
.orbita-compact .onode-ico { width: 22px; height: 22px; }
.orbita-compact .onode.agente .onode-ico svg { width: 22px; height: 22px; }
.orbita-compact .ohub-ico { width: 28px; height: 28px; }
.orbita-compact .ohub { padding: 4px 10px 4px 4px; gap: 7px; }
.orb-label { position: absolute; z-index: 2; left: var(--cx, 50%); top: calc(var(--cy, 50%) + var(--hud, 100px) * 1.02 + 6px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.orb-label b { font-size: .95rem; letter-spacing: .32em; color: #e9fbff; text-shadow: 0 0 14px rgba(63, 224, 255, .7); padding-left: .32em; }
.orb-label span { font-size: .62rem; letter-spacing: .34em; text-transform: uppercase; color: rgba(63, 224, 255, .75); padding-left: .34em; }
.orb-bar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 16px 0 22px; background: linear-gradient(180deg, rgba(2, 8, 16, .85), rgba(2, 8, 16, 0)); }
.orb-title { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.orb-title b { font-size: 1.05rem; color: #eef8ff; letter-spacing: .02em; }
.orb-title span { font-size: .74rem; color: var(--steel); }
.orb-search { flex: 0 1 380px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid rgba(63, 224, 255, .2); border-radius: 10px; background: rgba(6, 16, 28, .7); color: var(--steel); }
.orb-search:focus-within { border-color: rgba(63, 224, 255, .6); }
.orb-lupa svg { width: 15px; height: 15px; display: block; }
.orb-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ice); font: inherit; font-size: .84rem; outline: none; }
.orb-search kbd { font: inherit; font-size: .66rem; color: var(--steel); border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 6px; }
.orb-chips { display: flex; gap: 8px; }
.orb-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid rgba(63, 224, 255, .18); border-radius: 999px; background: rgba(6, 16, 28, .7); font-size: .76rem; color: var(--steel); white-space: nowrap; transition: border-color .3s, box-shadow .3s; }
.orb-chip b { color: var(--ice); font-weight: 600; }
.orb-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.orb-chip i.a { background: #9d84ff; box-shadow: 0 0 8px #9d84ff; }
.orb-chip i.t { background: #39e6a0; box-shadow: 0 0 8px #39e6a0; }
.orb-chip.pulse { border-color: rgba(57, 230, 160, .6); box-shadow: 0 0 14px rgba(57, 230, 160, .3); }
.orb-bar .map-tools { position: static; }
.orb-bar .map-btn { opacity: .85; }
@media (max-width: 980px) { .orb-chips { display: none; } }
@media (max-width: 640px) { .orb-title span, .orb-search kbd { display: none; } .orb-bar { gap: 10px; padding-left: 14px; } }
.orb-label { padding: 6px 16px 7px; border-radius: 999px; background: radial-gradient(ellipse at center, rgba(2, 8, 16, .9) 40%, rgba(2, 8, 16, 0) 75%); }
.orb-bar .map-tools { margin-left: auto; }
.orb-bar { background: none; }
.arrumavel .ohub, .arrumavel .onode { cursor: grab; user-select: none; touch-action: none; }
.arrumavel .pegando { cursor: grabbing; z-index: 6; }
.arrumavel .ohub.pegando { box-shadow: 0 0 34px rgba(63, 224, 255, .45); border-color: rgba(63, 224, 255, .9); }
.arrumavel .onode.pegando .onode-ico { box-shadow: 0 0 18px rgba(63, 224, 255, .5); }
.arrastando, .arrastando * { cursor: grabbing !important; }
.orb-reset { position: absolute; z-index: 5; left: 18px; bottom: 16px; font: inherit; font-size: .74rem; color: var(--steel); background: rgba(4, 10, 18, .6); border: 1px dashed var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; opacity: .7; }
.orb-reset:hover { opacity: 1; color: var(--ice); }
/* computadores */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pc-card header { display: flex; gap: 10px; align-items: center; }
.pc-card header div { display: flex; flex-direction: column; }
.pc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--steel, #8a9aa8); flex: none; }
.pc-dot.on { background: #2fbf71; box-shadow: 0 0 8px rgba(47, 191, 113, .6); }
.pc-list { margin: 6px 0 10px; padding-left: 18px; }
.pc-list li { margin: 2px 0; }
.pc-card .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-edit { max-height: 62vh; overflow: auto; padding-right: 4px; }
.modal:has(.pc-edit) { width: min(880px, 94vw); max-width: none; }
.pc-edit h3 { margin: 14px 0 4px; font-size: .95rem; }
.pc-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.pc-row input, .pc-row select { flex: 1; min-width: 0; }
.pair-code { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.pair-code b { font-size: 2rem; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.steps { padding-left: 18px; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
/* conhecimento */
.kb-search { display: flex; gap: 8px; margin: 10px 0 14px; }
.kb-search input { flex: 1; }
.kb-hits article { padding: 8px 0; border-top: 1px solid var(--line-soft, rgba(127,127,127,.15)); }
.kb-hits article:first-of-type { border-top: 0; }
.kb-results { margin-bottom: 14px; }
.kb-nav .badge-n { margin-left: auto; font-size: .72rem; opacity: .7; }
.kb-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--line, rgba(127,127,127,.35)); border-radius: 12px; cursor: pointer; text-align: center; margin-bottom: 10px; transition: border-color .2s, background .2s; }
.kb-drop svg { width: 26px; height: 26px; opacity: .7; }
.kb-drop:hover, .kb-drop.over, .kb-drop:focus-visible { border-color: var(--viz-1, #3987e5); background: rgba(57, 135, 229, .06); }
.kb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.kb-doc { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.kb-doc .grow { flex: 1; min-width: 0; }
.kb-doc .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(57, 135, 229, .12); color: var(--viz-1, #3987e5); font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
@media (max-width: 640px) { .kb-doc { flex-wrap: wrap; } }
/* situações e documentos no mapa */
.onode.situacao .onode-ico, .onode.doc .onode-ico, .onode.tarefa .onode-ico { border-radius: 50%; }
.onode.situacao .onode-ico { color: #ffd08a; background: radial-gradient(circle at 50% 30%, rgba(255, 181, 71, .3), rgba(30, 20, 6, .95)); border: 1px solid rgba(255, 181, 71, .6); box-shadow: 0 0 12px rgba(255, 181, 71, .3); }
.onode.doc .onode-ico { color: #8ff5cf; background: radial-gradient(circle at 50% 30%, rgba(80, 230, 170, .28), rgba(5, 26, 20, .95)); border: 1px solid rgba(80, 230, 170, .55); box-shadow: 0 0 12px rgba(80, 230, 170, .25); }
.onode.tarefa .onode-ico { color: #8ff0ff; background: radial-gradient(circle at 50% 30%, rgba(63, 224, 255, .2), rgba(6, 22, 36, .95)); border: 1px solid rgba(63, 224, 255, .4); }
.onode.situacao .onode-ico svg, .onode.doc .onode-ico svg, .onode.tarefa .onode-ico svg { width: 15px; height: 15px; }
.onode.situacao .onode-txt b { color: #ffe2b0; }
/* estilo "rede neural": setores viram núcleos de neurônio, nome embaixo */
.estilo-neural .ohub { flex-direction: column; gap: 0; padding: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; }
.estilo-neural .ohub:hover, .estilo-neural .ohub:focus-visible { border: 0; box-shadow: none; }
.estilo-neural .ohub-ico { width: 48px; height: 48px; border-width: 1.5px; background: radial-gradient(circle at 50% 40%, rgba(160, 245, 255, .55), rgba(63, 224, 255, .18) 45%, rgba(4, 14, 26, .95) 72%); box-shadow: 0 0 22px rgba(63, 224, 255, .45), 0 0 60px rgba(63, 224, 255, .15); animation: soma 3.2s ease-in-out infinite; }
.estilo-neural .ohub:hover .ohub-ico { box-shadow: 0 0 30px rgba(63, 224, 255, .7), 0 0 80px rgba(63, 224, 255, .25); }
.estilo-neural .ohub.alerting .ohub-ico { background: radial-gradient(circle at 50% 40%, rgba(255, 220, 160, .55), rgba(255, 181, 71, .2) 45%, rgba(26, 16, 4, .95) 72%); box-shadow: 0 0 22px rgba(255, 181, 71, .45); }
.estilo-neural .ohub-txt { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 5px; align-items: center; text-align: center; white-space: nowrap; text-shadow: 0 1px 6px #000; }
.estilo-neural .ohub-txt b { font-size: .8rem; }
.estilo-neural .ohub-txt span { font-size: .64rem; }
.estilo-neural .onode .onode-ico { width: 24px; height: 24px; }
.estilo-neural .onode.agente .onode-ico svg { width: 24px; height: 24px; }
.estilo-neural .onode.pessoa .onode-ico svg { width: 14px; height: 14px; }
.estilo-neural .onode-txt b { font-size: .7rem; }
.estilo-neural .onode-txt span { font-size: .6rem; }
@keyframes soma { 50% { box-shadow: 0 0 30px rgba(63, 224, 255, .6), 0 0 70px rgba(63, 224, 255, .22); } }
@media (prefers-reduced-motion: reduce) { .estilo-neural .ohub-ico { animation: none; } }
/* botão de estilo do mapa */
.orb-style { display: inline-flex; border: 1px solid rgba(63, 224, 255, .25); border-radius: 999px; padding: 2px; background: rgba(6, 16, 28, .7); margin-left: auto; }
.orb-style button { font: inherit; font-size: .74rem; color: var(--steel); background: none; border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.orb-style button.on { color: #e9fbff; background: rgba(63, 224, 255, .18); box-shadow: inset 0 0 0 1px rgba(63, 224, 255, .4); }
.orb-bar .orb-style + .map-tools { margin-left: 8px; }
.kb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 4px 0 8px; font-size: .9rem; }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: var(--viz-1, #3987e5); cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.kb-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.kb-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 10px 0; }
.kb-folders:empty { display: none; }
.kb-folder { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.kb-folder:hover { border-color: var(--viz-1, #3987e5); }
.kb-folder > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.kb-folder b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-folder-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 181, 71, .14); color: #d9902a; }
.kb-folder-ico svg { width: 20px; height: 20px; }
.kb-folder { height: 100%; min-height: 64px; }
/* caixa de entrada */
.cx-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 12px; }
.cx-bar input[type="search"] { flex: 1; min-width: 200px; }
.cx-wrap { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 12px; align-items: start; }
.cx-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100dvh - 230px); overflow: auto; padding-right: 2px; }
.cx-row { display: flex; gap: 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line-soft, rgba(127,127,127,.18)); border-radius: 10px; background: var(--panel); color: inherit; font: inherit; cursor: pointer; }
.cx-row:hover, .cx-row.active { border-color: var(--viz-1, #3987e5); }
.cx-row.unread .cx-top b, .cx-row.unread .cx-sub { font-weight: 700; }
.cx-row.unread { box-shadow: inset 3px 0 0 var(--viz-1, #3987e5); }
.cx-ch { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.cx-ch svg { width: 17px; height: 17px; }
.cx-ch.email { background: rgba(57, 135, 229, .12); color: var(--viz-1, #3987e5); }
.cx-ch.whatsapp { background: rgba(37, 211, 102, .14); color: #1fa855; }
.cx-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.cx-top { display: flex; justify-content: space-between; gap: 8px; }
.cx-top b, .cx-sub, .cx-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.cx-detail { min-height: 320px; padding: 16px 18px; }
.cx-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.cx-head h2 { font-size: 1.1rem; margin: 0 0 4px; }
.cx-ai { background: rgba(57, 135, 229, .08); border: 1px solid rgba(57, 135, 229, .25); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: .92rem; }
.cx-text { white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.cx-body { max-height: 46vh; overflow: auto; padding: 4px 0 10px; }
.cx-thread { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; margin-bottom: 10px; }
.cx-bubble { max-width: 82%; padding: 8px 12px; border-radius: 12px; background: var(--bg-soft, rgba(127,127,127,.08)); }
.cx-bubble.out { align-self: flex-end; background: rgba(37, 211, 102, .12); }
.cx-reply { border-top: 1px solid var(--line-soft, rgba(127,127,127,.18)); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.cx-reply h3 { margin: 0; font-size: .95rem; }
.cx-reply textarea { width: 100%; resize: vertical; }
@media (max-width: 900px) { .cx-wrap { grid-template-columns: 1fr; } .cx-list { max-height: none; } }
.cx-bar .tabs { margin-bottom: 0; border-bottom: 0; }
.ch-group { margin-bottom: 14px; }
.ch-group h4 { margin: 4px 0 8px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--steel); }
.ch-toggles { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.ch-toggles .check { margin-top: 0; }
.cx-via { display: flex; align-items: center; gap: 4px; color: var(--viz-1, #3987e5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-via svg { width: 12px; height: 12px; flex: none; }
.cx-bar select { max-width: 280px; }
.ch-agent { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.ch-agent svg { width: 15px; height: 15px; color: #8b74ff; flex: none; }
.at-modes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.at-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-soft, rgba(127,127,127,.2)); border-radius: 10px; cursor: pointer; }
.at-mode:has(input:checked) { border-color: var(--viz-1, #3987e5); background: rgba(57, 135, 229, .06); }
.at-mode > span { display: flex; flex-direction: column; gap: 2px; }
.at-rules { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(139, 116, 255, .07); }
.at-rules ul { margin: 6px 0 0; padding-left: 18px; }
.cx-att { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: rgba(139, 116, 255, .08); border: 1px solid rgba(139, 116, 255, .25); }
.cx-att svg { width: 16px; height: 16px; color: #8b74ff; }
.cx-att button { margin-left: auto; }
.cx-bubble.agente { background: rgba(139, 116, 255, .12); }
.cnpj-row { display: flex; gap: 6px; align-items: center; }
.cnpj-row input { flex: 1; min-width: 0; }
.lic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.lic-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.lic-card.nova { box-shadow: inset 3px 0 0 #f0a030; }
.lic-card.interesse, .lic-card.participando { box-shadow: inset 3px 0 0 var(--c-ok, #2fbf71); }
.lic-card.descartada { opacity: .7; }
.lic-obj { margin: 8px 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.lic-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.lic-meta .warn { color: var(--c-warn, #c77d00); font-weight: 600; }
.bk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.bk-stats .mini-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-soft, rgba(127,127,127,.2)); border-radius: 10px; background: var(--panel); }
.bk-stats b { font-size: 1.1rem; }
@media (max-width: 640px) { .lic-list { grid-template-columns: 1fr; } }
.ct-pre { max-height: 320px; overflow: auto; font-size: .75rem; background: var(--bg-soft, rgba(127,127,127,.08)); padding: 10px; border-radius: 8px; white-space: pre-wrap; word-break: break-word; }
.ct-recs { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.ct-rec { padding: 10px 14px; }
.ct-rec summary { cursor: pointer; }
.ct-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 8px 0; }
.ct-map { display: flex; flex-direction: column; gap: 3px; }
.ct-map code { font-size: .7rem; opacity: .7; }
