/* ═══════════════════════════════════════════════════════════════
   AUTOMYX GESTÃO v3 — Design System
   ═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;450;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #07080e;
  --bg-2: #0a0b14;
  --card: #0d0e1a;
  --card-2: #11132166;
  --line: #1c1f33;
  --line-2: #262a45;
  --txt: #e6e9f5;
  --txt-2: #9aa1c0;
  --txt-3: #5d6485;
  --cyan: #00d4e8;
  --cyan-dim: #00d4e822;
  --purple: #8b5cf6;
  --magenta: #c084fc;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(135deg, #00d4e8, #8b5cf6, #c084fc);
  --grad-soft: linear-gradient(135deg, #00d4e818, #8b5cf618);
  --sb-w: 248px;
  --r: 14px;
  --r-sm: 9px;
  font-size: 15px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
::selection { background: #00d4e833; }
html { height: 100%; }
body {
  background: var(--bg); color: var(--txt);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 450; line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, #8b5cf60d, transparent 60%),
    radial-gradient(700px 480px at -5% 25%, #00d4e80a, transparent 55%);
}
h1,h2,h3,h4 { font-family: Sora, Inter, sans-serif; font-weight: 700; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--txt);
  background: #0a0b16; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #00d4e866; box-shadow: 0 0 0 3px #00d4e814; }
select { cursor: pointer; }
select option, select optgroup { background: #0d0e1a; }
::placeholder { color: var(--txt-3); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #232743; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Section label (linguagem da marca) ─────────────────── */
.sec-label {
  font-family: Sora; font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cyan);
}
.sec-label::before { content: '// '; opacity: .7; }

/* ── Shell ──────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: var(--sb-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0a0b16f2, #07080ef8);
  border-right: 1px solid #161930;
}
.logo { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  font-family: Sora; font-weight: 800; font-size: .82rem; color: #06070d;
  background: var(--grad);
  box-shadow: 0 4px 18px #00d4e833;
}
.logo-name { font-family: Sora; font-weight: 700; font-size: 1.02rem; line-height: 1.15; }
.logo-name small { display: block; font-family: Inter; font-weight: 500; font-size: .66rem; color: var(--txt-3); letter-spacing: .04em; }

.nav { flex: 1; padding: 6px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px; position: relative;
  color: var(--txt-2); font-weight: 500; font-size: .9rem;
  transition: color .15s, background .15s;
}
.nav a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; transition: opacity .15s; }
.nav a:hover { color: var(--txt); background: #ffffff07; }
.nav a:hover svg { opacity: 1; }
.nav a.active { color: #fff; background: linear-gradient(90deg, #00d4e814, #8b5cf60e); }
.nav a.active svg { opacity: 1; color: var(--cyan); }
.nav a.active::before {
  content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--grad);
}
.nav-label { padding: 16px 12px 5px; font-size: .64rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--txt-3); font-family: Sora; }

.sidebar-foot { padding: 12px; border-top: 1px solid #14172b; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: #ffffff05; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; font-family: Sora; color: #06070d; background: var(--grad);
}
.user-chip .un { font-size: .83rem; font-weight: 600; }
.user-chip .ur { font-size: .68rem; color: var(--txt-3); text-transform: capitalize; }
.btn-logout { margin-left: auto; color: var(--txt-3); padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.btn-logout:hover { color: var(--red); background: #f8717112; }
.btn-logout svg { width: 16px; height: 16px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; border-bottom: 1px solid #12152a;
  background: #07080ecc; backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.crumb { font-size: .86rem; color: var(--txt-3); display: flex; gap: 8px; align-items: center; }
.crumb b { color: var(--txt); font-weight: 600; }
.topbar-search {
  margin-left: auto; display: flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 10px; cursor: pointer;
  background: #0d0e1a; border: 1px solid var(--line);
  color: var(--txt-3); font-size: .82rem; min-width: 250px;
  transition: border-color .15s;
}
.topbar-search:hover { border-color: var(--line-2); }
.topbar-search svg { width: 14px; height: 14px; }
.topbar-search kbd {
  margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: .64rem;
  padding: 2px 7px; border-radius: 5px; background: #181b30; color: var(--txt-3);
}
.live-pill { display: flex; align-items: center; gap: 7px; font-size: .72rem; color: var(--txt-3); font-weight: 600; }
.live-pill .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--txt-3); }
.live-pill .dot.active { background: var(--green); box-shadow: 0 0 8px #34d39988; animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.icon-btn { padding: 8px; border-radius: 9px; color: var(--txt-2); display: grid; place-items: center; position: relative; }
.icon-btn:hover { background: #ffffff0a; color: var(--txt); }
.icon-btn svg { width: 17px; height: 17px; }
.ndot {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 99px; background: var(--cyan); color: #06070d;
  font-size: .58rem; font-weight: 800; display: grid; place-items: center;
}

#main { padding: 26px 28px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; }
.page-head .sub { color: var(--txt-3); font-size: .86rem; margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ── Cards / superfícies ────────────────────────────────── */
.card {
  background: linear-gradient(170deg, #0e101f, #0b0c18);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px;
}
.card-hover { transition: border-color .18s, transform .18s, box-shadow .18s; }
.card-hover:hover { border-color: #2b3052; transform: translateY(-2px); box-shadow: 0 10px 32px #00000055; }

/* ── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .85rem;
  border: 1px solid var(--line-2); background: #141729; color: var(--txt);
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #3a4068; background: #191d33; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--grad); border: 0; color: #06070d; font-weight: 700; box-shadow: 0 4px 18px #8b5cf62e; }
.btn-primary:hover { filter: brightness(1.12); box-shadow: 0 6px 24px #8b5cf648; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--txt-2); }
.btn-ghost:hover { background: #ffffff08; color: var(--txt); border-color: transparent; }
.btn-sm { padding: 5px 11px; font-size: .76rem; border-radius: 8px; }
.btn-danger { color: var(--red); border-color: #f8717133; }
.btn-danger:hover { background: #f871711a; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; font-size: .68rem; font-weight: 600;
  background: #161930; color: var(--txt-2); border: 1px solid var(--line);
}
.badge.cyan { background: #00d4e814; color: var(--cyan); border-color: #00d4e833; }
.badge.purple { background: #8b5cf61a; color: #b89bfb; border-color: #8b5cf640; }
.badge.green { background: #34d39916; color: var(--green); border-color: #34d39938; }
.badge.amber { background: #fbbf2414; color: var(--amber); border-color: #fbbf2435; }
.badge.red { background: #f8717114; color: var(--red); border-color: #f8717135; }
.badge svg { width: 11px; height: 11px; }
.badge-model { font-family: 'JetBrains Mono', monospace; font-size: .62rem; letter-spacing: -.01em; }

/* ── Tabela / listas ────────────────────────────────────── */
.empty { color: var(--txt-3); text-align: center; font-size: .86rem; padding: 36px 20px; }
.skel { background: linear-gradient(90deg, #11132100, #181b3066, #11132100); background-size: 200% 100%; animation: skel 1.4s infinite; border-radius: 8px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Modal ──────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: #04050acc; backdrop-filter: blur(6px);
  align-items: flex-start; justify-content: center; padding: 8vh 20px 20px;
  overflow-y: auto;
}
.modal-bg.open { display: flex; }
.modal {
  width: 100%; max-width: 540px;
  background: linear-gradient(170deg, #10121f, #0b0c18);
  border: 1px solid var(--line-2); border-radius: 18px; padding: 26px;
  animation: modalIn .22s cubic-bezier(.2,.9,.3,1.2);
  box-shadow: 0 24px 80px #000000aa;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal h3 { font-size: 1.12rem; margin-bottom: 18px; }
.modal .field { margin-bottom: 14px; }
.modal label { display: block; font-size: .74rem; font-weight: 600; color: var(--txt-2); margin-bottom: 6px; letter-spacing: .02em; }
.modal input, .modal select, .modal textarea { width: 100%; }
.modal textarea { min-height: 88px; resize: vertical; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ── Combobox de agente (pesquisável) ───────────────────── */
.combo { position: relative; }
.combo input { width: 100%; }
.combo-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  max-height: 290px; overflow-y: auto;
  background: #0e101f; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 18px 50px #000000a0; display: none;
}
.combo-list.open { display: block; }
.combo-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 13px; cursor: pointer;
  font-size: .85rem; border-bottom: 1px solid #14172b;
}
.combo-item:last-child { border-bottom: 0; }
.combo-item:hover, .combo-item.sel { background: #00d4e80d; }
.combo-item .ci-sub { margin-left: auto; font-size: .68rem; color: var(--txt-3); text-align: right; }
.combo-group { padding: 8px 13px 4px; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-3); font-family: Sora; position: sticky; top: 0; background: #0e101f; }

/* ── Toasts ─────────────────────────────────────────────── */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 400; display: flex; flex-direction: column; gap: 9px; }
.toast {
  padding: 12px 18px; border-radius: 12px; font-size: .85rem; font-weight: 500;
  background: #12152a; border: 1px solid var(--line-2); color: var(--txt);
  box-shadow: 0 10px 36px #000000a0; max-width: 380px;
  animation: toastIn .25s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
.toast.success { border-color: #34d39950; }
.toast.error { border-color: #f8717155; }

/* ── Command palette ────────────────────────────────────── */
.cmdk-bg { position: fixed; inset: 0; z-index: 300; display: none; background: #04050ac9; backdrop-filter: blur(7px); padding: 12vh 20px 0; justify-content: center; align-items: flex-start; }
.cmdk-bg.open { display: flex; }
.cmdk { width: 100%; max-width: 560px; background: #0e101f; border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 90px #000c; animation: modalIn .2s cubic-bezier(.2,.9,.3,1.2); }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 20px; font-size: 1rem; background: transparent; }
.cmdk input:focus { box-shadow: none; }
.cmdk-list { max-height: 350px; overflow-y: auto; padding: 8px; }
.cmdk-group { padding: 10px 12px 4px; font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--txt-3); font-family: Sora; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: .88rem; }
.cmdk-item:hover, .cmdk-item.sel { background: #00d4e80f; }
.cmdk-item svg { width: 15px; height: 15px; color: var(--txt-3); }
.ci-meta { margin-left: auto; font-size: .7rem; color: var(--txt-3); }

/* ── Notificações ───────────────────────────────────────── */
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 380px; max-height: 460px;
  overflow-y: auto; z-index: 90; display: none;
  background: #0e101f; border: 1px solid var(--line-2); border-radius: 15px;
  box-shadow: 0 20px 60px #000000b0;
}
.notif-panel.open { display: block; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-family: Sora; font-size: .85rem; }

/* ── Feed ───────────────────────────────────────────────── */
.feed-item { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #12152a; }
.feed-item:last-child { border-bottom: 0; }
.feed-ico { width: 30px; flex-shrink: 0; display: flex; justify-content: center; padding-top: 2px; color: var(--txt-3); }
.feed-ico svg { width: 17px; height: 17px; }
.feed-title { font-size: .84rem; font-weight: 500; }
.feed-detail { font-size: .76rem; color: var(--txt-2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-time { font-size: .68rem; color: var(--txt-3); margin-top: 3px; }
.feed-day { padding: 14px 16px 6px; font-size: .68rem; font-weight: 700; color: var(--txt-3); text-transform: capitalize; font-family: Sora; letter-spacing: .06em; }

/* ── Stats (dashboard) ──────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { position: relative; overflow: hidden; }
.stat .s-label { font-size: .7rem; font-weight: 600; color: var(--txt-3); text-transform: uppercase; letter-spacing: .1em; }
.stat .s-value { font-family: Sora; font-size: 1.9rem; font-weight: 800; margin-top: 6px; letter-spacing: -.03em; }
.stat .s-sub { font-size: .72rem; color: var(--txt-3); margin-top: 2px; }
.stat svg.s-ico { position: absolute; right: 16px; top: 16px; width: 19px; height: 19px; color: var(--txt-3); opacity: .6; }
.stat::after { content: ''; position: absolute; left: 0; right: 60%; bottom: 0; height: 2px; background: var(--grad); opacity: .5; }

/* ── Chat ───────────────────────────────────────────────── */
.chat-layout { display: grid; grid-template-columns: 290px 1fr; gap: 18px; height: calc(100vh - 150px); }
.chat-side { display: flex; flex-direction: column; overflow: hidden; }
.chat-side .cs-head { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.chat-convs { flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.conv-item { padding: 10px 12px; border-radius: 10px; cursor: pointer; margin-bottom: 2px; }
.conv-item:hover { background: #ffffff06; }
.conv-item.active { background: #00d4e810; }
.conv-item .cv-t { font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .cv-m { font-size: .68rem; color: var(--txt-3); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.chat-main { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head .ch-name { font-weight: 700; font-family: Sora; font-size: .95rem; }
.chat-head .ch-sub { font-size: .7rem; color: var(--txt-3); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 78%; padding: 13px 17px; border-radius: 16px; font-size: .9rem; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, #00d4e81f, #8b5cf61f); border: 1px solid #00d4e82e; border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: #11132a; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg .m-meta { font-size: .64rem; color: var(--txt-3); margin-top: 8px; display: flex; gap: 8px; align-items: center; }
.chat-input { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; resize: none; max-height: 130px; min-height: 46px; }
.suggest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; max-width: 720px; margin: 0 auto; }
.suggest-card { text-align: left; padding: 15px 16px; border-radius: 13px; background: #0e101f; border: 1px solid var(--line); cursor: pointer; transition: all .16s; }
.suggest-card:hover { border-color: #00d4e855; transform: translateY(-2px); }
.suggest-card .sg-t { font-weight: 600; font-size: .85rem; display: flex; align-items: center; gap: 9px; }
.suggest-card .sg-t svg { width: 15px; height: 15px; color: var(--cyan); }
.suggest-card .sg-d { font-size: .73rem; color: var(--txt-3); margin-top: 5px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 99px; background: var(--txt-3); animation: ty 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ty { 30% { transform: translateY(-4px); opacity: 1; } }

/* ── Organograma ────────────────────────────────────────── */
.org-toolbar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.org-area { margin-bottom: 26px; }
.org-area-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.org-area-head .oa-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.org-area-head .oa-count { font-size: .7rem; color: var(--txt-3); }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.org-node { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.org-node .on-info { flex: 1; min-width: 0; }
.org-node .on-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-node .on-meta { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; align-items: center; }
.org-node select.on-model { font-size: .68rem; padding: 4px 8px; border-radius: 7px; max-width: 100%; font-family: 'JetBrains Mono', monospace; }
.org-children-btn { font-size: .7rem; color: var(--cyan); cursor: pointer; margin-top: 7px; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.org-children-btn svg { width: 12px; height: 12px; }
.org-sub { margin: 8px 0 4px 18px; padding-left: 14px; border-left: 1px dashed var(--line-2); display: none; }
.org-sub.open { display: block; }
.org-sub .org-node { padding: 9px 10px; }

/* ── Kanban ─────────────────────────────────────────────── */
.kb-board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 13px; align-items: start; overflow-x: auto; }
.kb-col { background: #0a0b16aa; border: 1px solid #14172b; border-radius: var(--r); padding: 12px; min-height: 200px; }
.kb-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; font-family: Sora; font-weight: 700; font-size: .8rem; }
.kb-col-head .kc-n { margin-left: auto; font-size: .68rem; color: var(--txt-3); background: #161930; padding: 1px 8px; border-radius: 99px; }
.kb-card { padding: 12px 13px; margin-bottom: 9px; cursor: pointer; }
.kb-card .kc-t { font-size: .84rem; font-weight: 600; line-height: 1.4; }
.kb-card .kc-meta { display: flex; gap: 6px; margin-top: 9px; align-items: center; flex-wrap: wrap; }

/* ── Task thread (linha direta) ─────────────────────────── */
.task-row { padding: 0; overflow: hidden; margin-bottom: 10px; }
.task-row-head { display: flex; align-items: center; gap: 13px; padding: 14px 17px; cursor: pointer; }
.task-row-head > svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--txt-3); }
.task-row-head:hover { background: #ffffff04; }
.task-row .tr-title { font-weight: 600; font-size: .9rem; flex: 1; min-width: 0; }
.task-row .tr-sub { font-size: .7rem; color: var(--txt-3); margin-top: 2px; }
.task-thread { border-top: 1px solid var(--line); background: #08090f; display: none; }
.task-thread.open { display: block; }
.thread-msgs { max-height: 420px; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.thread-msg { font-size: .82rem; padding: 11px 14px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow-y: auto; }
.thread-msg.user { background: #00d4e80d; border: 1px solid #00d4e826; }
.thread-msg.assistant { background: #11132a; border: 1px solid var(--line); }
.thread-msg .tm-head { font-size: .64rem; color: var(--txt-3); margin-bottom: 6px; font-weight: 600; display: flex; gap: 8px; }
.thread-foot { padding: 11px 18px; border-top: 1px solid #12152a; display: flex; gap: 9px; align-items: center; }

/* ── Login ──────────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; z-index: 1; }
.login-card { width: 100%; max-width: 400px; padding: 38px 34px; }
.login-card .logo { padding: 0 0 22px; }

/* ── Agentes grid ───────────────────────────────────────── */
.agent-card { display: flex; gap: 13px; padding: 16px; align-items: flex-start; }
.agent-card .ac-name { font-weight: 600; font-size: .9rem; }
.agent-card .ac-desc { font-size: .74rem; color: var(--txt-3); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-card .ac-meta { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

/* ── Capability toggles ─────────────────────────────────── */
.cap-toggle { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px; background: #0a0b16; border: 1px solid var(--line); cursor: pointer; font-size: .76rem; color: var(--txt-2); transition: border-color .14s; }
.cap-toggle:hover { border-color: var(--line-2); }
.cap-toggle input { width: 15px; height: 15px; accent-color: var(--cyan); cursor: pointer; }
.cap-toggle span { display: flex; align-items: center; gap: 6px; }
.cap-toggle svg { width: 13px; height: 13px; color: var(--cyan); }
.cap-toggle:has(input:checked) { border-color: #00d4e855; background: #00d4e80a; color: var(--txt); }
.cap-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; font-size: .6rem; font-weight: 600; background: #8b5cf61a; color: #b89bfb; border: 1px solid #8b5cf633; }
.cap-pill svg { width: 10px; height: 10px; }

/* ── Botão excluir (lixeira) ────────────────────────────── */
.del-btn { color: var(--txt-3); padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; transition: all .14s; }
.del-btn:hover { color: var(--red); background: #f8717112; }
.del-btn svg { width: 15px; height: 15px; }

/* ── Subtasks ───────────────────────────────────────────── */
.subtask-list { margin: 8px 0 4px 16px; padding-left: 14px; border-left: 1px dashed var(--line-2); }
.subtask { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: .8rem; }
.subtask .st-dot { width: 7px; height: 7px; border-radius: 99px; flex-shrink: 0; }
.working-now { display: flex; gap: 6px; flex-wrap: wrap; }
.working-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: #34d39912; border: 1px solid #34d39930; font-size: .72rem; }
.working-chip .wc-pulse { width: 6px; height: 6px; border-radius: 99px; background: var(--green); box-shadow: 0 0 6px #34d399; animation: pulse 1.8s infinite; }
.attrib { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; color: var(--txt-3); }

/* ── Projetos ───────────────────────────────────────────── */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.proj-card .pc-name { font-family: Sora; font-weight: 700; font-size: 1rem; }
.proj-card .pc-desc { font-size: .78rem; color: var(--txt-3); margin: 6px 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress { height: 5px; border-radius: 99px; background: #161930; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s; }

@media (max-width: 980px) {
  .sidebar { display: none; }
  .chat-layout { grid-template-columns: 1fr; }
  .kb-board { grid-template-columns: repeat(5, 240px); }
}

/* ═══ V7 — BALÃO DE CHAT FLUTUANTE + ANEXOS ═══════════════════ */
.dock-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 130;
  width: 56px; height: 56px; border-radius: 18px; border: none; cursor: pointer;
  background: var(--grad); color: #05060d; display: grid; place-items: center;
  box-shadow: 0 10px 34px rgba(0,212,232,.35), 0 4px 14px rgba(0,0,0,.5);
  transition: transform .18s cubic-bezier(.22,.9,.28,1), box-shadow .18s;
}
.dock-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 40px rgba(0,212,232,.5), 0 6px 18px rgba(0,0,0,.5); }
.dock-fab:active { transform: scale(.95); }
.dock-fab svg { width: 24px; height: 24px; }
.dock-badge {
  position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; padding: 0 5px; border: 2.5px solid var(--bg, #05060b);
  font-family: var(--font-m, 'JetBrains Mono', monospace);
}
.dock {
  position: fixed; right: 24px; bottom: 94px; z-index: 130;
  width: 410px; max-width: calc(100vw - 32px);
  height: min(660px, calc(100vh - 130px));
  background: var(--card-solid, #0d0e1b); border: 1px solid var(--line-2, #262a47); border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0,212,232,.07);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateY(18px) scale(.97);
  transition: opacity .22s cubic-bezier(.22,.9,.28,1), transform .22s cubic-bezier(.22,.9,.28,1);
}
.dock.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.dock-head {
  display: flex; align-items: center; gap: 9px; padding: 12px 13px;
  border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(0,212,232,.05), rgba(139,92,246,.05));
}
.dock-agent { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.dock-agent .da-n { font-family: var(--font-h, 'Sora', sans-serif); font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-agent .da-s { font-size: .66rem; color: var(--text-3, var(--txt-3)); }
.dock-pick { flex: 1; min-width: 0; }
.dock-ib {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text-2, var(--txt-2)); cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0; transition: all .15s; text-decoration: none;
}
.dock-ib:hover { border-color: var(--border-2); color: var(--cyan); }
.dock-ib svg { width: 16px; height: 16px; }
.dock-ib input { display: none; }
.dock-convbar { display: flex; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--line); align-items: center; }
.dock-convbar select { flex: 1; font-size: .74rem; padding: 7px 10px; }
.dock-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.dock-msgs.dragover { outline: 2px dashed var(--cyan); outline-offset: -8px; border-radius: 14px; background: rgba(0,212,232,.04); }
.dock-hero { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 18px; }
.dock-hero b { font-family: var(--font-h); font-size: .95rem; }
.dock-hero small { color: var(--text-3, var(--txt-3)); font-size: .72rem; max-width: 260px; line-height: 1.6; }
.dk-row { display: flex; gap: 8px; margin-top: 11px; align-items: flex-end; }
.dk-row.user { flex-direction: row-reverse; }
.dk-av { flex-shrink: 0; margin-bottom: 3px; }
.dk-uini { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-size: .6rem; font-weight: 800; font-family: var(--font-h, 'Sora', sans-serif); color: #05060d; background: var(--grad, linear-gradient(135deg, #00d4e8, #8b5cf6)); }
.dk-msg {
  width: fit-content; max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: .82rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.dk-row.user .dk-msg { background: linear-gradient(135deg, rgba(0,212,232,.13), rgba(139,92,246,.1)); border: 1px solid rgba(0,212,232,.25); border-bottom-right-radius: 5px; }
.dk-row.assistant .dk-msg { background: var(--bg-2, #090a13); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.dk-msg pre { background: #060710; border: 1px solid var(--line, #1b1e33); padding: 10px; border-radius: 9px; overflow-x: auto; margin: 7px 0; font-family: var(--font-m, 'JetBrains Mono', monospace); font-size: .78em; }
.dk-msg code { background: rgba(0,0,0,.4); padding: 1px 5px; border-radius: 4px; font-family: var(--font-m, 'JetBrains Mono', monospace); font-size: .82em; }
.dk-meta { font-size: .62rem; color: var(--text-3, var(--txt-3)); margin-top: 5px; white-space: nowrap; }
.dk-deliver { display: flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 700; color: var(--cyan); margin-bottom: 7px; }
.dk-deliver svg { width: 14px; height: 14px; }
.dk-file { border-color: rgba(0,212,232,.3) !important; }

/* anexos */
.att-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.att-thumb { display: block; border-radius: 11px; overflow: hidden; border: 1px solid var(--line-2); max-width: 200px; transition: transform .15s, box-shadow .15s; }
.att-thumb:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.att-thumb img { display: block; width: 100%; max-height: 170px; object-fit: cover; }
.att-chip {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 11px;
  background: rgba(0,212,232,.05); border: 1px solid rgba(0,212,232,.22);
  color: inherit; text-decoration: none; max-width: 100%; transition: all .15s;
}
.att-chip:hover { background: rgba(0,212,232,.1); border-color: var(--cyan); }
.att-chip .att-ico { color: var(--cyan); display: grid; place-items: center; }
.att-chip .att-ico svg { width: 18px; height: 18px; }
.att-chip .att-info { min-width: 0; }
.att-chip .att-info b { display: block; font-size: .72rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.att-chip .att-info small { font-size: .62rem; color: var(--text-3, var(--txt-3)); }
.att-chip .att-dl { margin-left: auto; color: var(--text-3, var(--txt-3)); }
.att-chip .att-dl svg { width: 14px; height: 14px; }

/* bandeja de pendentes */
.dock-tray { display: none; gap: 7px; padding: 8px 13px; border-top: 1px solid var(--line); flex-wrap: wrap; background: rgba(0,212,232,.025); }
.tray-item {
  display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 9px;
  background: var(--bg-2, #090a13); border: 1px solid var(--line-2); font-size: .68rem; max-width: 100%;
}
.tray-item img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.tray-item svg { width: 15px; height: 15px; color: var(--cyan); }
.tray-item .ti-name { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-item button { background: none; border: none; color: var(--text-3, var(--txt-3)); cursor: pointer; display: grid; place-items: center; padding: 2px; }
.tray-item button:hover { color: var(--red); }
.tray-item button svg { width: 12px; height: 12px; }

/* composer do dock */
.dock-comp { display: flex; gap: 8px; padding: 11px 13px; border-top: 1px solid var(--line); align-items: flex-end; background: var(--panel, #0b0c17); }
.dock-comp textarea {
  flex: 1; background: var(--bg-2, #090a13); border: 1px solid var(--line-2); border-radius: 12px;
  color: inherit; font-family: inherit; font-size: .82rem; padding: 9px 12px; resize: none;
  max-height: 120px; min-height: 38px; outline: none; transition: border-color .15s;
}
.dock-comp textarea:focus { border-color: rgba(0,212,232,.45); }
.dock-send {
  width: 38px; height: 38px; border-radius: 12px; border: none; cursor: pointer; flex-shrink: 0;
  background: var(--grad); color: #05060d; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(139,92,246,.3); transition: filter .15s, transform .1s;
}
.dock-send:hover { filter: brightness(1.15); }
.dock-send:active { transform: scale(.93); }
.dock-send[disabled] { opacity: .4; }
.dock-send svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .dock { right: 8px; bottom: 84px; width: calc(100vw - 16px); } .dock-fab { right: 14px; bottom: 14px; } }

/* anexos na task (linha expansível) */
.task-atts { background: rgba(0,212,232,.025); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; margin-bottom: 12px; }
.task-atts .ta-head { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; color: var(--txt-2, #9aa3c2); margin-bottom: 9px; }
.task-atts .ta-head svg { width: 14px; height: 14px; color: var(--cyan); }

/* barra de modelo do dock */
.dock-modelbar { display: flex; gap: 8px; padding: 8px 13px; border-bottom: 1px solid var(--line, #1b1e33); align-items: center; background: rgba(139,92,246,.03); }
.dock-modelbar .dm-label { display: flex; align-items: center; gap: 6px; font-size: .66rem; font-weight: 700; color: var(--txt-3, #59607f); white-space: nowrap; text-transform: uppercase; letter-spacing: .08em; }
.dock-modelbar .dm-label svg { width: 13px; height: 13px; color: var(--cyan, #00d4e8); }
.dock-modelbar select { flex: 1; font-size: .72rem; padding: 6px 9px; font-family: var(--font-m, 'JetBrains Mono', monospace); }
.dock-modelbar .dock-ib { width: 30px; height: 30px; }
.dock-modelbar .dock-ib.on { border-color: var(--cyan, #00d4e8); color: var(--cyan, #00d4e8); background: rgba(0,212,232,.08); box-shadow: 0 0 10px rgba(0,212,232,.2); }

/* atalhos iniciais do dock */
.dock-sugs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; width: 100%; max-width: 320px; }
.dock-sug {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: rgba(0,212,232,.04); border: 1px solid var(--line-2, #262a45); border-radius: 12px;
  color: var(--txt-2, #9aa1c0); font-size: .74rem; font-weight: 600; text-align: left;
  cursor: pointer; transition: all .15s;
}
.dock-sug:hover { border-color: var(--cyan, #00d4e8); color: var(--txt, #e6e9f5); background: rgba(0,212,232,.09); transform: translateY(-1px); }
.dock-sug svg { width: 14px; height: 14px; color: var(--cyan, #00d4e8); flex-shrink: 0; }
.dock-sug span { line-height: 1.3; }
