/* Agente BWING — layout v2 (aprovado no Figma "Agente BWING — Layout v2").
   Tokens = páginas "01 · Design System"; animações = página "04 · Movimento". */

:root {
  --bg: #0A0A0C;
  --shell: #111114;
  --s1: #151518;
  --s2: #1B1B1F;
  --s3: #232328;
  --s4: #2C2C32;
  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);
  --text: #F4F4F5;
  --text-2: #A1A1AA;
  --text-3: #62626B;
  --text-4: #3F3F46;
  --green: #4ADE80;
  --green-2: #16A34A;
  --green-soft: rgba(74,222,128,.12);
  --amber: #FBBF24;
  --amber-soft: rgba(251,191,36,.12);
  --orange: #FF8A3D;
  --red: #F87171;
  --red-soft: rgba(248,113,113,.12);
  --violet: #A78BFA;
  --violet-soft: rgba(167,139,250,.12);
  --pink: #F0ABFC;
  --blue: #60A5FA;
  --blue-btn: #3B82F6;
  --teal: #5EEAD4;
  --iris: linear-gradient(110deg, #F0ABFC 0%, #A78BFA 35%, #60A5FA 70%, #5EEAD4 100%);
  --amber-grad: linear-gradient(90deg, #FF7A2F, #FFC46B);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 320ms;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --side: 236px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(167,139,250,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caps { font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.iris-text { background: var(--iris); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- shell ---------- */
#app { display: flex; height: 100dvh; padding: 12px; gap: 8px; position: relative; }
#app::before {
  content: ""; position: fixed; width: 1040px; height: 1040px; right: -160px; top: -640px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120,110,255,.08), transparent); pointer-events: none;
}
.side { width: var(--side); flex: none; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 14px; margin-bottom: 6px; }
.brand b { font-size: 15px; font-weight: 600; }
.brand .tag { font: 500 11px var(--mono); color: var(--text-3); letter-spacing: .04em; }
.searchbtn {
  display: flex; align-items: center; gap: 10px; height: 38px; margin: 6px 10px 18px; padding: 0 10px 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text-3); cursor: pointer; transition: var(--t-base) var(--ease);
}
.searchbtn:hover { background: rgba(255,255,255,.06); color: var(--text-2); }
.searchbtn span:first-of-type { flex: 1; min-width: 0; text-align: left; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font: 500 11px var(--font); color: var(--text-2); }
.nav { display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px 0 14px; border-radius: 12px;
  color: var(--text-2); font-size: 13.5px; transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.nav a svg { width: 18px; height: 18px; color: var(--text-3); transition: color var(--t-base); flex: none; }
.nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav a:hover svg { color: var(--text); }
.nav a.on { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); color: var(--text); font-weight: 500; }
.nav a.on svg { color: var(--text); }
.nav a.on::before { content: ""; position: absolute; left: 0; top: 12px; width: 3px; height: 16px; border-radius: 2px; background: var(--text); animation: grow-y var(--t-slow) var(--ease-out); }
.nav a .lbl { flex: 1; }
.badge { min-width: 22px; height: 18px; padding: 0 6px; border-radius: 9px; display: grid; place-items: center; font: 600 11px var(--font); background: var(--red-soft); color: var(--red); }
.badge.g { background: rgba(74,222,128,.14); color: var(--green); }
.side-group { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 8px; }
.recent { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px; }
.recent a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 10px; color: var(--text-3); font-size: 13px; transition: var(--t-base) var(--ease); }
.recent a:hover, .recent a.on { color: var(--text); background: rgba(255,255,255,.05); }
.recent a .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 8px var(--violet); flex: none; animation: pulse 1.6s ease-in-out infinite; }
.side-foot { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.limits { border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.limits .r { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-2); margin-bottom: 5px; }
.limits .r .mono { color: var(--text-3); }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 12px; }
.me:hover { background: rgba(255,255,255,.04); }

.panel {
  flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: 24px; border: 1px solid var(--line); position: relative;
  background-color: var(--shell);
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 24px 24px; overflow: hidden; z-index: 1;
}
.topbar { display: flex; align-items: center; gap: 10px; height: 68px; flex: none; padding: 0 24px 0 28px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); min-width: 0; }
.crumbs b { color: var(--text); font-weight: 500; }
.crumbs svg { width: 13px; height: 13px; color: var(--text-4); }
.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.page { padding: 28px 28px 48px; max-width: 1240px; margin: 0 auto; }
.page-h { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-h h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin: 0 8px 0 4px; line-height: 1.2; }

/* ---------- botões ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 11px; border: 1px solid transparent; cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; user-select: none;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast), box-shadow var(--t-base) var(--ease), color var(--t-fast);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: 60ms; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(167,139,250,.7); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: #F4F4F5; color: #0A0A0C; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.btn.primary:hover { background: #fff; box-shadow: 0 8px 24px -10px rgba(255,255,255,.35); }
.btn.primary:active { background: #D4D4D8; }
.btn.secondary { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); color: var(--text); }
.btn.secondary:hover { background: rgba(255,255,255,.10); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: rgba(255,255,255,.08); color: var(--text); }
.btn.danger { background: rgba(248,113,113,.10); border-color: rgba(248,113,113,.25); color: var(--red); }
.btn.danger:hover { background: rgba(248,113,113,.16); }
.btn.green { background: var(--green); color: #052e14; }
.btn.ai { background: #16151B; border: 0; color: var(--text); }
.btn.ai::before { content: ""; position: absolute; inset: -1px; border-radius: 12px; padding: 1px; background: var(--iris); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.btn.ai:hover { background: #1E1C25; box-shadow: 0 6px 24px -10px rgba(167,139,250,.6); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 14px; border-radius: 14px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn.block { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--text-2) transparent var(--text-2) var(--text-2); animation: spin .7s linear infinite; }
.btn.primary.loading::after { border-color: #0A0A0C transparent #0A0A0C #0A0A0C; }

/* ---------- chips, campos, seleção ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.05); color: var(--text-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; font-style: normal; }
.chip.g { color: var(--green); background: var(--green-soft); border-color: rgba(74,222,128,.22); }
.chip.y { color: var(--amber); background: var(--amber-soft); border-color: rgba(251,191,36,.22); }
.chip.r { color: var(--red); background: var(--red-soft); border-color: rgba(248,113,113,.22); }
.chip.v { color: var(--violet); background: var(--violet-soft); border-color: rgba(167,139,250,.22); }
.chip.t { color: var(--teal); background: rgba(94,234,212,.10); border-color: rgba(94,234,212,.22); }
.chip.b { color: var(--blue); background: rgba(96,165,250,.10); border-color: rgba(96,165,250,.22); }
.chip.lg { height: 28px; font-size: 12px; border-radius: 10px; padding: 0 11px; }
button.chip { cursor: pointer; transition: var(--t-fast) var(--ease); }
button.chip:hover { color: var(--text); border-color: var(--line-2); }

.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.35); outline: none;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
textarea.input { height: auto; padding: 11px 14px; resize: vertical; min-height: 84px; line-height: 1.5; }
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: rgba(167,139,250,.75); box-shadow: 0 0 0 4px rgba(167,139,250,.12); }
.input.err { border-color: rgba(248,113,113,.7); }
select.input, select.pick { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2362626B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; padding-right: 32px; }
select.input[multiple] { background-image: none; height: 120px; padding: 6px; }
label.f { display: block; font-size: 12px; color: var(--text-2); margin: 0 0 7px; }
.field { margin-bottom: 14px; }

.check { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,.22); background: transparent; cursor: pointer; display: grid; place-items: center; flex: none; padding: 0; transition: var(--t-fast) var(--ease); }
.check:hover { border-color: var(--green); transform: scale(1.06); }
.check svg { width: 14px; height: 14px; color: #052e14; stroke-width: 3; stroke-dasharray: 24; stroke-dashoffset: 24; }
.check.on { background: var(--green); border-color: var(--green); }
.check.on svg { animation: draw var(--t-base) var(--ease-out) forwards; }

.switch { position: relative; width: 40px; height: 24px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: var(--s4); transition: background var(--t-base) var(--ease); }
.switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #A1A1AA; transition: transform var(--t-slow) var(--spring), background var(--t-base); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--line); position: relative; }
.seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: color var(--t-base) var(--ease); }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { color: var(--text); background: var(--s4); }
.seg button:not(.on):hover { color: var(--text-2); }

.pick { height: 30px; border-radius: 10px; border: 1px solid var(--line); background-color: rgba(0,0,0,.25); padding: 0 28px 0 10px; font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; outline: none; transition: var(--t-fast); }
.pick:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- menu suspenso próprio ---------- */
.dd-native { display: none !important; }
.dd { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; max-width: 100%; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast); }
.dd .dd-l { overflow: hidden; text-overflow: ellipsis; }
.dd svg { width: 14px; height: 14px; flex: none; color: var(--text-3); transition: transform var(--t-base) var(--ease); }
.dd:hover, .dd[aria-expanded="true"] { color: var(--text); border-color: var(--line-2); background: rgba(255,255,255,.04); }
.dd[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(167,139,250,.6); }
.dd-input { display: flex; width: 100%; height: 42px; padding: 0 12px 0 14px; border-radius: 12px; background: rgba(0,0,0,.35); color: var(--text); font-size: 14px; font-weight: 400; justify-content: space-between; }
.dd-input[aria-expanded="true"] { border-color: rgba(167,139,250,.75); box-shadow: 0 0 0 4px rgba(167,139,250,.12); }
.composer .hd .dd { border-color: transparent; background: transparent; }
.composer .hd .dd:hover, .composer .hd .dd[aria-expanded="true"] { background: rgba(255,255,255,.06); }
.dd-menu { position: fixed; z-index: 400; max-width: min(340px, calc(100vw - 16px)); max-height: min(360px, 60vh); overflow-y: auto; padding: 6px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(28,28,33,.94); backdrop-filter: blur(20px); box-shadow: 0 24px 60px -16px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05); animation: dd-in 180ms var(--ease-out); }
.dd-menu.out { animation: dd-out 130ms var(--ease) forwards; }
.dd-head { padding: 8px 10px 6px; font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.dd-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); text-align: left; cursor: pointer; font-size: 13.5px; }
.dd-item.act { background: rgba(255,255,255,.07); color: var(--text); }
.dd-item.sel { color: var(--text); }
.dd-item .dd-t { display: block; font-weight: 500; }
.dd-item .dd-d { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.dd-item .ck { width: 16px; height: 16px; flex: none; color: var(--violet); opacity: 0; transform: scale(.6); transition: opacity var(--t-fast), transform var(--t-base) var(--spring); }
.dd-item .ck svg { width: 16px; height: 16px; }
.dd-item.sel .ck { opacity: 1; transform: none; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes dd-out { to { opacity: 0; transform: scale(.98); } }

/* botão Auto (Sonnet + Opus conselheiro + Haiku) */
.pickers { display: inline-flex; align-items: center; gap: 6px; }
.pickers.auto-on select[id$="model"] + .dd { display: none; }
.auto-tg { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: var(--t-fast) var(--ease); }
.auto-tg .sw { position: relative; width: 26px; height: 16px; border-radius: 8px; background: var(--s4); transition: background var(--t-base); flex: none; }
.auto-tg .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #A1A1AA; transition: transform var(--t-slow) var(--spring), background var(--t-base); }
.auto-tg .auto-sub { display: none; color: var(--text-3); font-weight: 400; }
.auto-tg:hover { color: var(--text); border-color: var(--line-2); }
.auto-tg.on { color: var(--text); border-color: transparent; background: rgba(167,139,250,.12); box-shadow: inset 0 0 0 1px rgba(167,139,250,.35); }
.auto-tg.on .sw { background: var(--iris); }
.auto-tg.on .sw::after { transform: translateX(10px); background: #fff; }
.auto-tg.on .auto-sub { display: inline; }
.composer .hd .auto-tg { border-color: transparent; background: transparent; }
.composer .hd .auto-tg.on { background: rgba(167,139,250,.12); }
.step.adv .nm { color: var(--violet); }
@media (max-width: 760px) { .auto-tg .auto-sub { display: none !important; } }

/* ---------- cards ---------- */
.card {
  position: relative; border-radius: 22px; border: 1px solid var(--line); padding: 20px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 60px), var(--s1);
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.card.hov:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgba(0,0,0,.9); }
.card.glass { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.09); }
.card.ai { background: radial-gradient(120% 90% at 10% 0%, rgba(167,139,250,.12), transparent 60%), #141318; border-color: transparent; }
.card.ai::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--iris); opacity: .55; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.card.ai.pulse::before { animation: ai-pulse .6s var(--ease-out); }
.card.amber { background: linear-gradient(135deg, rgba(255,122,47,0) 40%, rgba(255,122,47,.12) 70%, rgba(255,170,80,.6) 100%), #1C1A19; border-color: rgba(255,255,255,.08); overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; min-height: 22px; }
.card-h h3 { margin: 0; font-size: 12.5px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; gap: 10px; white-space: nowrap; min-width: 0; }
.card-h .grow { flex: 1; }
.ind { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.ind::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: inherit; opacity: .18; }
.ind.y { background: var(--amber); } .ind.r { background: var(--red); } .ind.v { background: var(--violet); } .ind.b { background: var(--blue); } .ind.off { background: var(--text-3); }
.bento { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c3 { grid-column: span 3; } .c12 { grid-column: span 12; }

/* números */
.money { font-size: 48px; line-height: 1.05; font-weight: 600; letter-spacing: -.03em; color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.money small { font-size: .46em; font-weight: 500; color: rgba(74,222,128,.55); letter-spacing: 0; }
.money.xl { font-size: 56px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 92px; margin-top: 22px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .col { position: relative; width: 100%; border-radius: 8px; background: rgba(255,255,255,.06); overflow: hidden; transform-origin: bottom; animation: bar-grow .7s var(--ease-out) both; }
.bars .col i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; background: rgba(74,222,128,.35); }
.bars .b.cur .col { background: rgba(255,255,255,.09); }
.bars .b.cur .col i { background: linear-gradient(180deg, var(--green), var(--green-2)); }
.bars .lbl { font: 500 10.5px var(--mono); color: var(--text-3); text-transform: uppercase; }
.bars .b.cur .lbl { color: var(--text); }
.meter { height: 6px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-2), var(--green)); transform-origin: left; animation: bar-grow-x .8s var(--ease-out) both; }
.meter.warn i { background: var(--amber); } .meter.hot i { background: var(--red); } .meter.v i { background: var(--violet); }
.ring { position: relative; display: grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring .trk { stroke: rgba(255,255,255,.07); }
.ring .val { transition: stroke-dashoffset 1s var(--ease-out); }
.ring .in { text-align: center; line-height: 1.1; }

/* listas */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.li:first-child { border-top: 0; }
.li .main { flex: 1; min-width: 0; }
.li .t { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li.click { cursor: pointer; border-radius: 12px; transition: background var(--t-fast); }
.li.click:hover { background: rgba(255,255,255,.03); }
.prio { width: 3px; align-self: stretch; border-radius: 2px; background: var(--amber); flex: none; margin: 4px 0; }
.prio.p1 { background: var(--red); } .prio.p3 { background: var(--text-4); }
.empty { color: var(--text-3); font-size: 13px; padding: 20px 4px; text-align: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* ---------- orbe ---------- */
.orb { position: relative; width: 26px; height: 26px; flex: none; }
.orb::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff 0, rgba(255,255,255,.92) 13%, rgba(214,190,255,.75) 30%, rgba(120,170,255,.45) 52%, rgba(255,255,255,.08) 72%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; transform: translate(28%, 16%) scale(.9); background: radial-gradient(circle at 60% 60%, rgba(255,200,240,.5), rgba(150,210,255,.15) 55%, transparent 70%); }
.orb.glow { filter: drop-shadow(0 0 14px rgba(167,139,250,.45)); }
.orb.live::before { animation: breathe 2.4s ease-in-out infinite; }
.orb.live::after { animation: orbit 2.4s ease-in-out infinite; }
.orb.sm { width: 16px; height: 16px; } .orb.lg { width: 54px; height: 54px; } .orb.xl { width: 76px; height: 76px; }

.shimmer { background: linear-gradient(90deg, #6B6B74 0%, #F4F4F5 35%, #E9D5FF 55%, #5A5A62 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }

/* ---------- início ---------- */
.hello { text-align: center; padding: 36px 0 26px; }
.hello .date { font: 500 11.5px var(--mono); letter-spacing: .06em; color: var(--text-3); text-transform: uppercase; }
.hello h1 { font-size: 42px; font-weight: 600; letter-spacing: -.025em; margin: 10px 0 8px; line-height: 1.1; }
.hello p { margin: 0; color: var(--text-2); font-size: 15px; }
.cmd { max-width: 760px; margin: 0 auto 6px; border-radius: 24px; border: 1px solid rgba(255,255,255,.11); background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 64px), #1A1A1E; box-shadow: 0 24px 50px -24px rgba(0,0,0,.8); transition: border-color var(--t-base), box-shadow var(--t-base); }
.cmd:focus-within { border-color: rgba(255,255,255,.2); box-shadow: 0 24px 60px -20px rgba(0,0,0,.9), 0 0 0 4px rgba(167,139,250,.08); }
.cmd .top { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 6px; }
.cmd .top svg { width: 19px; height: 19px; color: var(--text-3); margin-top: 3px; flex: none; }
.cmd textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; font-size: 17px; line-height: 1.45; min-height: 26px; max-height: 200px; padding: 0; }
.cmd textarea::placeholder { color: var(--text-3); }
.cmd .bot { display: flex; align-items: center; gap: 8px; padding: 10px 14px 14px 20px; flex-wrap: wrap; }
.cmd .bot .attach { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 14px; cursor: pointer; flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; }
.cmd .bot .attach:hover { color: var(--text-2); }
.cmd .bot .attach svg { width: 17px; height: 17px; flex: none; }
.slashes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 760px; margin: 14px auto 0; padding: 0 4px; }
.slashes > svg { width: 17px; height: 17px; color: var(--text-3); margin-right: 4px; }
.slash { height: 36px; padding: 0 12px; border-radius: 11px; border: 0; background: rgba(255,255,255,.05); color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: var(--t-fast) var(--ease); }
.slash::before { content: "/ "; color: var(--text-3); }
.slash:hover { background: rgba(255,255,255,.08); color: var(--text); transform: translateY(-1px); }
.home-grid { margin-top: 36px; }
.brief { min-height: 268px; display: flex; flex-direction: column; }
.brief .md { font-size: 13.5px; color: var(--text-2); position: relative; z-index: 1; max-width: 78%; }
.brief .art { position: absolute; right: 22px; bottom: 26px; width: 120px; height: 100px; pointer-events: none; }
.brief .art span { position: absolute; width: 58px; height: 74px; border-radius: 11px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.16); display: grid; place-items: center; }
.brief .art span::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.28); }
.brief .art span:first-child { left: 0; top: 0; transform: rotate(-8deg); }
.brief .art span:last-child { left: 42px; top: 12px; transform: rotate(10deg); background: rgba(255,236,210,.3); border-color: rgba(255,255,255,.45); }
.brief:hover .art span:first-child { transform: rotate(-12deg) translateY(-3px); }
.brief:hover .art span:last-child { transform: rotate(14deg) translateY(-5px); }
.brief .art span { transition: transform var(--t-slow) var(--spring); }
.quick { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); margin-bottom: 6px; transition: border-color var(--t-base); }
.quick:focus-within { border-color: rgba(167,139,250,.6); }
.quick svg { width: 16px; height: 16px; color: var(--text-3); }
.quick input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.quick input::placeholder { color: var(--text-3); }

/* ---------- chat ---------- */
.chat { display: flex; height: 100%; min-height: 0; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thread { flex: 1; overflow-y: auto; padding: 32px 24px 24px; }
.thread-in { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.msg-u { align-self: flex-end; max-width: 86%; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; animation: rise var(--t-slow) var(--ease-out); }
.msg-u .bub { background: var(--s3); border: 1px solid var(--line); border-radius: 20px 20px 6px 20px; padding: 12px 18px; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.msg-u .when { font: 500 11px var(--mono); color: var(--text-3); }
.msg-a { display: flex; gap: 16px; animation: rise var(--t-slow) var(--ease-out); }
.msg-a > .orb { margin-top: 1px; }
.msg-a .body { flex: 1; min-width: 0; }
.msg-a .status { font-size: 17px; font-weight: 500; margin: 2px 0 14px; }
.msg-a .meta { font-size: 11.5px; color: var(--text-3); margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--mono); }
.steps { position: relative; display: flex; flex-direction: column; gap: 18px; margin: 4px 0 18px -28px; padding-left: 28px; }
.steps::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: rgba(255,255,255,.10); }
.step { position: relative; animation: step-in 240ms var(--ease-out) both; }
.step::before { content: ""; position: absolute; left: -31.5px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #4A4A52; }
.step .nm { font-size: 15px; color: var(--text-3); }
.step .in { font-size: 13px; color: var(--text-4); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.step.run::before { width: 16px; height: 16px; left: -36px; top: 3px; background: radial-gradient(circle at 36% 30%, #fff, rgba(214,190,255,.8) 35%, rgba(120,170,255,.4) 65%, transparent 72%); box-shadow: 0 0 12px rgba(167,139,250,.6); animation: breathe 2.4s ease-in-out infinite; }
.step.run .nm { background: linear-gradient(90deg, #F4F4F5, #F5D0FE 60%, #7C7C86); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 500; }
.step.run .in { color: var(--text-2); }
.step.err::before { background: var(--red); }
.steps-tg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); cursor: pointer; margin-bottom: 10px; user-select: none; border: 0; background: none; padding: 0; }
.steps-tg svg { width: 14px; height: 14px; transition: transform var(--t-base) var(--ease); }
.steps-tg.open svg { transform: rotate(180deg); }
.steps-tg:hover { color: var(--text-2); }
.think-txt { font-size: 13px; color: var(--text-3); white-space: pre-wrap; max-height: 150px; overflow-y: auto; border-left: 1px solid var(--line-2); padding-left: 12px; margin-bottom: 12px; }
.waiting { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.waiting .dots { display: flex; gap: 3px; width: 26px; justify-content: center; }
.waiting .dots i { width: 4px; height: 4px; border-radius: 50%; border: 1px solid #55555E; animation: blink 1.2s infinite; }
.waiting .dots i:nth-child(2) { animation-delay: .15s; } .waiting .dots i:nth-child(3) { animation-delay: .3s; }

.md { line-height: 1.65; font-size: 15px; word-wrap: break-word; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .8em; }
.md h1, .md h2, .md h3, .md h4 { font-size: 1.05em; font-weight: 600; margin: 1.2em 0 .5em; }
.md ul, .md ol { padding-left: 1.3em; margin: 0 0 .8em; }
.md li { margin: .25em 0; }
.md li::marker { color: var(--text-3); }
.md code { font-family: var(--mono); font-size: .86em; background: var(--s3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.md pre { background: #0C0C0E; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; overflow-x: auto; }
.md pre code { background: none; border: 0; padding: 0; }
.md table { border-collapse: collapse; width: 100%; margin: .6em 0 1em; font-size: 13.5px; display: block; overflow-x: auto; }
.md th, .md td { border-bottom: 1px solid var(--line-2); padding: 8px 10px; text-align: left; }
.md th { color: var(--text-3); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.md blockquote { margin: 0 0 .8em; padding-left: 14px; border-left: 3px solid var(--violet); color: var(--text-2); }
.md a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.md strong { font-weight: 600; }

.composer-wrap { padding: 0 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.composer { width: 100%; max-width: 720px; border-radius: 22px; border: 1px solid rgba(255,255,255,.10); background: #1C1C20; box-shadow: 0 18px 40px -16px rgba(0,0,0,.7); overflow: hidden; transition: border-color var(--t-base), box-shadow var(--t-base); }
.composer:focus-within { border-color: rgba(255,255,255,.18); }
.composer .hd { display: flex; align-items: center; gap: 4px; height: 46px; padding: 0 10px; background: rgba(255,255,255,.025); border-bottom: 1px solid rgba(255,255,255,.06); }
.composer .hd .sep { width: 1px; height: 16px; background: rgba(255,255,255,.08); margin: 0 6px; }
.composer .hd select.pick { border: 0; background-color: transparent; font-size: 12.5px; }
.composer .hd .timer { margin-left: auto; font: 500 12px var(--mono); color: var(--amber); padding-right: 6px; }
.composer textarea { display: block; width: 100%; border: 0; outline: 0; background: transparent; resize: none; padding: 16px 18px 6px; font-size: 15px; line-height: 1.5; min-height: 52px; max-height: 240px; }
.composer textarea::placeholder { color: var(--text-3); }
.atts { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 18px 2px; }
.att { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); animation: pop var(--t-slow) var(--spring); }
.att .ic { width: 24px; height: 28px; border-radius: 5px; background: #3A3A40; display: grid; place-items: center; }
.att .ic svg { width: 15px; height: 15px; color: var(--text-2); }
.att button { width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--text-2); }
.att button svg { width: 10px; height: 10px; }
.composer .ft { display: flex; align-items: center; gap: 6px; padding: 8px 12px 12px; }
.composer .hint { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--text-3); }
.composer .hint span:last-child { margin-left: 6px; }
.send { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--blue-btn); color: #fff; box-shadow: 0 6px 16px -6px rgba(29,78,216,.8); transition: transform var(--t-fast) var(--ease), background var(--t-fast), box-shadow var(--t-base); flex: none; }
.send svg { width: 18px; height: 18px; stroke-width: 2.2; }
.send:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 10px 22px -6px rgba(29,78,216,.9); }
.send:active { transform: scale(.94); }
.send.stop { background: rgba(248,113,113,.14); color: var(--red); box-shadow: inset 0 0 0 1px rgba(248,113,113,.3); }
.send.idle { background: rgba(255,255,255,.10); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.toolpill { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 32px; background: rgba(60,60,68,.55); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(18px); box-shadow: 0 14px 30px -12px rgba(0,0,0,.7); }
.toolpill .ring-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: conic-gradient(from 0deg, #F472B6, #FBBF24, #34D399, #60A5FA, #F472B6); -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); mask: radial-gradient(circle, transparent 11px, #000 12px); transition: transform var(--t-slow) var(--spring); }
.toolpill .ring-btn:hover { transform: rotate(90deg); }
.toolpill .sep { width: 1px; height: 22px; background: rgba(255,255,255,.12); margin: 0 4px; }
.toolpill button.tp { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.10); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform var(--t-fast) var(--ease), background var(--t-fast); }
.toolpill button.tp svg { width: 17px; height: 17px; }
.toolpill button.tp:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.chat-side { width: 330px; flex: none; border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 16px 24px; }
.chat-side h4 { margin: 0 8px 2px; font-size: 15px; font-weight: 600; }
.chat-side .path { margin: 0 8px 18px; font: 500 11.5px var(--mono); color: var(--text-3); word-break: break-all; }
.chat-side .sec { margin: 22px 8px 10px; }
.src { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); margin-bottom: 8px; }
.src svg { width: 18px; height: 18px; color: var(--text-2); }
.chat-empty { max-width: 640px; margin: 8vh auto 0; text-align: center; }
.chat-empty .orb { margin: 0 auto 24px; }
.chat-empty h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 8px; }

/* ---------- tarefas ---------- */
.rhythm { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 8px); gap: 2px 3px; }
.heat i { width: 11px; border-radius: 2.5px; background: rgba(74,222,128,.07); animation: fade-in .4s var(--ease-out) both; }
.heat i.l1 { background: rgba(74,222,128,.28); } .heat i.l2 { background: rgba(74,222,128,.55); } .heat i.l3 { background: var(--green); }
.stat b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--text-3); }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; align-items: start; }
.bcol-h { display: flex; align-items: center; gap: 10px; margin: 0 4px 12px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.bcol-h .n { font-family: var(--mono); color: var(--text-3); }
.bcol-h .grow { flex: 1; }
.bcol { display: flex; flex-direction: column; gap: 10px; min-height: 60px; border-radius: 18px; transition: background var(--t-base); }
.bcol.drop { background: rgba(167,139,250,.06); box-shadow: inset 0 0 0 1px rgba(167,139,250,.35); }
.tcard { background: var(--s2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: grab; transition: border-color var(--t-base), transform var(--t-base) var(--ease), box-shadow var(--t-base), opacity var(--t-base); animation: rise var(--t-slow) var(--ease-out) both; }
.tcard:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(0,0,0,.9); }
.tcard.dragging { opacity: .4; }
.tcard .t { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.tcard .meta { display: flex; align-items: center; gap: 6px; }
.tcard .cl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.tcard .cl i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tcard.done { opacity: .55; }
.tcard.done .t { color: var(--text-2); display: flex; gap: 10px; align-items: center; }
.dropzone { height: 54px; border-radius: 16px; border: 1px dashed rgba(255,255,255,.12); display: grid; place-items: center; font-size: 12.5px; color: var(--text-3); }

/* ---------- whatsapp ---------- */
.wa { display: flex; height: 100%; min-height: 0; }
.wa-list { width: 330px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.wa-list .top { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.wa-list .top .seg { display: flex; }
.wa-list .top .seg button { flex: 1; justify-content: center; }
.wa-items { flex: 1; overflow-y: auto; padding: 0 8px 16px; }
.wi { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; cursor: pointer; transition: background var(--t-fast); position: relative; }
.wi:hover { background: rgba(255,255,255,.035); }
.wi.on { background: rgba(255,255,255,.06); }
.wi .main { flex: 1; min-width: 0; }
.wi .t { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi .s { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi .wi-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.wi .when { font: 500 11px var(--mono); color: var(--text-3); }
.unread { min-width: 18px; height: 18px; border-radius: 9px; background: var(--green); color: #052e14; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; padding: 0 5px; }
.wa-conv { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wa-conv .hd { display: flex; align-items: center; gap: 12px; height: 72px; flex: none; padding: 0 20px; border-bottom: 1px solid var(--line); }
.wa-msgs { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.daysep { align-self: center; font: 500 10.5px var(--mono); color: var(--text-3); background: rgba(255,255,255,.05); padding: 3px 12px; border-radius: 11px; margin: 6px 0; }
.bub { max-width: 76%; padding: 9px 14px; border-radius: 16px; background: var(--s3); border: 1px solid var(--line); font-size: 14px; white-space: pre-wrap; word-wrap: break-word; animation: rise var(--t-base) var(--ease-out) both; }
.bub .aud { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.bub .aud svg { width: 14px; height: 14px; color: var(--violet); }
.bub .tr { display: block; margin-top: 6px; font-size: 14px; color: var(--text); border-left: 2px solid rgba(167,139,250,.5); padding-left: 10px; animation: fade-in .3s var(--ease-out); }
.bub .tr-btn { display: flex; margin-top: 6px; height: 28px; }
.bub.me { align-self: flex-end; background: #123321; border-color: rgba(74,222,128,.18); }
.bub .w { font: 500 10.5px var(--mono); color: var(--text-3); margin-left: 10px; float: right; margin-top: 4px; }
.bub .who { display: block; font-size: 11.5px; color: var(--violet); margin-bottom: 2px; }
.wa-sug { margin: 0 20px 10px; padding: 14px 18px; }
.wa-input { display: flex; align-items: center; gap: 10px; margin: 0 20px 20px; padding: 6px 8px 6px 18px; border-radius: 27px; border: 1px solid rgba(255,255,255,.10); background: #1C1C20; transition: border-color var(--t-base); }
.wa-input:focus-within { border-color: rgba(74,222,128,.4); }
.wa-input textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; font-size: 14px; max-height: 120px; padding: 9px 0; line-height: 1.4; }
.wa-send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--green); color: #052e14; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform var(--t-fast) var(--ease); }
.wa-send:hover { transform: scale(1.06); } .wa-send:active { transform: scale(.94); }
.wa-send svg { width: 17px; height: 17px; stroke-width: 2; }
.wa-agent { width: 340px; flex: none; border-left: 1px solid var(--line); overflow-y: auto; padding: 20px 16px; }
.det { border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; animation: rise var(--t-slow) var(--ease-out) both; }
.qr-box { background: #fff; padding: 16px; border-radius: 18px; display: inline-block; box-shadow: 0 20px 60px -20px rgba(167,139,250,.5); }

.sync { margin: 0 16px 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(167,139,250,.25); background: rgba(167,139,250,.06); animation: rise var(--t-slow) var(--ease-out); }
.sync .row { gap: 8px; font-size: 13px; }
.sbar { position: relative; height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; margin: 10px 0 8px; }
.sbar i { position: absolute; top: 0; bottom: 0; width: 35%; border-radius: 4px; background: var(--iris); animation: load 1.3s var(--ease) infinite; }
.chip.sync-chip i { animation: pulse 1.2s ease-in-out infinite; }

/* ---------- financeiro ---------- */
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: rgba(255,255,255,.12); }
.legend i.g { background: var(--green); }
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .ico svg { width: 18px; height: 18px; }
.kpi b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 10.5px; font-weight: 500; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; padding: 0 8px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background var(--t-fast); }
.table tbody tr:hover td { background: rgba(255,255,255,.02); }
.table .r { text-align: right; white-space: nowrap; }
.pos { color: var(--green); }

/* ---------- memória ---------- */
.mem { display: flex; height: 100%; min-height: 0; }
.mem-files { width: 290px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; padding: 18px 12px; }
.mem-files .grp { display: flex; align-items: center; gap: 8px; padding: 18px 10px 8px; font: 500 12.5px var(--mono); color: var(--text-3); }
.mem-files .grp svg { width: 16px; height: 16px; }
.mf { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px 0 22px; border-radius: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; transition: background var(--t-fast); }
.mf svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.mf:hover { background: rgba(255,255,255,.04); }
.mf.on { background: rgba(255,255,255,.07); color: var(--text); font-weight: 500; }
.mf.on svg { color: var(--text); }
.mem-ed { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mem-ed .hd { display: flex; align-items: center; gap: 10px; height: 64px; flex: none; padding: 0 24px 0 32px; border-bottom: 1px solid var(--line); }
.mem-ed .bd { flex: 1; overflow-y: auto; padding: 36px 56px; }
.mem-ed .bd .md h1 { font-size: 28px; letter-spacing: -.02em; margin-top: 0; }
.mem-ed .bd .md h2 { font-size: 18px; }
.mem-ed textarea { width: 100%; height: 100%; min-height: 60vh; border: 0; outline: 0; resize: none; background: transparent; font: 13px/1.7 var(--mono); color: var(--text); }
.mem-act { width: 300px; flex: none; border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 16px; }
.tl { position: relative; padding-left: 22px; }
.tl .ev { position: relative; padding-bottom: 20px; }
.tl .ev::before { content: ""; position: absolute; left: -18px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.tl .ev::after { content: ""; position: absolute; left: -14.5px; top: 18px; bottom: 2px; width: 1px; background: rgba(255,255,255,.08); }
.tl .ev:last-child::after { display: none; }

/* ---------- config ---------- */
.cfg { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
.cfg-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; align-self: start; }
.cfg-nav a { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-radius: 11px; color: var(--text-2); font-size: 13.5px; transition: var(--t-fast); }
.cfg-nav a svg { width: 17px; height: 17px; color: var(--text-3); }
.cfg-nav a:hover, .cfg-nav a.on { background: rgba(255,255,255,.07); color: var(--text); }
.cfg-sec { margin-bottom: 44px; scroll-margin-top: 20px; }
.cfg-sec > h2 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px; }
.cfg-sec > p { margin: 0 0 20px; color: var(--text-2); font-size: 13.5px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dev { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.dev .ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.05); display: grid; place-items: center; flex: none; }
.dev .ic svg { width: 20px; height: 20px; color: var(--text-2); }

/* ---------- login ---------- */
.login { height: 100dvh; display: grid; place-items: center; padding: 16px; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 24px 24px; position: relative; }
.login::before { content: ""; position: absolute; width: 1040px; height: 1040px; left: 50%; top: 250px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(140,120,255,.16), rgba(96,165,250,.05) 50%, transparent); pointer-events: none; }
.login .box { position: relative; width: 100%; max-width: 480px; text-align: center; animation: rise .5s var(--ease-out); }
.login .orb { margin: 0 auto 28px; }
.login h1 { font-size: 34px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 10px; }
.login .sub { color: var(--text-2); font-size: 15px; margin: 0 0 32px; }
.login .lcard { border-radius: 28px; border: 1px solid rgba(255,255,255,.10); background: rgba(24,24,28,.85); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); text-align: left; overflow: hidden; }
.login .stepsbar { display: flex; align-items: center; gap: 10px; height: 72px; padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13px; font-weight: 500; color: var(--text-2); }
.login .stepsbar .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.login .stepsbar .n svg { width: 14px; height: 14px; stroke-width: 2.6; }
.login .stepsbar .n.ok { background: var(--green-soft); color: var(--green); }
.login .stepsbar .n.cur { background: rgba(167,139,250,.18); box-shadow: inset 0 0 0 1px rgba(167,139,250,.5); color: var(--violet); }
.login .stepsbar .ln { width: 60px; height: 1px; background: rgba(255,255,255,.15); }
.login .lb { padding: 32px; }
.codes { display: flex; justify-content: center; gap: 10px; margin-bottom: 26px; }
.codes .gap { width: 4px; }
.codes input { width: 56px; height: 64px; border-radius: 14px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.05); text-align: center; font: 500 24px var(--mono); outline: none; caret-color: var(--violet); transition: var(--t-base) var(--ease); }
.codes input:focus { border-color: rgba(167,139,250,.8); background: rgba(255,255,255,.08); box-shadow: 0 0 0 4px rgba(167,139,250,.12); }
.codes.shake { animation: shake .4s; }
.login .foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; color: var(--text-3); font-size: 13px; }
.login .foot svg { width: 16px; height: 16px; color: var(--green); }

/* ---------- modal / toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); animation: fade-in 200ms var(--ease-out); }
.overlay.out { animation: fade-out 160ms var(--ease) forwards; }
.modal { width: 100%; max-width: 480px; max-height: 90dvh; overflow-y: auto; border-radius: 24px; border: 1px solid var(--line-2); background: #141518; padding: 24px; box-shadow: 0 40px 80px -20px rgba(0,0,0,.9); animation: modal-in 280ms var(--ease-out); }
.overlay.out .modal { animation: modal-out 160ms var(--ease) forwards; }
.modal.wide { max-width: 820px; }
.modal-h { display: flex; align-items: center; margin-bottom: 18px; }
.modal-h h2 { flex: 1; font-size: 17px; font-weight: 600; margin: 0; }
.modal-f { display: flex; gap: 10px; margin-top: 22px; }
.modal-f .btn { flex: 1; height: 44px; border-radius: 14px; }
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px; border: 1px solid var(--line-2); background: #1B1C20; box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); font-size: 13.5px; font-weight: 500; animation: toast-in 300ms var(--spring); }
.toast.err { border-color: rgba(248,113,113,.4); }
.toast.out { animation: fade-out 200ms forwards; }
.toast .ind { flex: none; }

/* entrada de tela em cascata */
.enter > * { animation: rise var(--t-slow) var(--ease-out) both; }
.enter > *:nth-child(2) { animation-delay: 40ms; } .enter > *:nth-child(3) { animation-delay: 80ms; } .enter > *:nth-child(4) { animation-delay: 120ms; }
.enter > *:nth-child(5) { animation-delay: 160ms; } .enter > *:nth-child(6) { animation-delay: 200ms; } .enter > *:nth-child(7) { animation-delay: 240ms; }
.enter > *:nth-child(n+8) { animation-delay: 280ms; }
.loading-line { height: 3px; border-radius: 3px; background: var(--s3); overflow: hidden; margin: 40px auto; max-width: 320px; }
.loading-line i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--iris); animation: load 1.1s var(--ease) infinite; }

/* ---------- animações (página 04 · Movimento) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: scale(.96) translateY(6px); } }
@keyframes modal-out { to { opacity: 0; transform: scale(.97); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes orbit { 0%, 100% { transform: translate(28%, 16%) scale(.9); } 50% { transform: translate(14%, 26%) scale(.95); } }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes step-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes bar-grow { from { transform: scaleY(0); } }
@keyframes bar-grow-x { from { transform: scaleX(0); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; background: var(--text-2); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes ai-pulse { 0% { opacity: .55; } 40% { opacity: 1; filter: drop-shadow(0 0 10px rgba(167,139,250,.8)); } 100% { opacity: .55; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- navegação mobile (pílula flutuante) ---------- */
.mtop { display: none; }
.only-mobile { display: none !important; }
.pillnav { display: none; }

/* ---------- responsivo ---------- */
@media (max-width: 1280px) {
  .chat-side, .wa-agent, .mem-act { display: none; }
  .c5, .c7 { grid-column: span 6; }
  .c3 { grid-column: span 6; }
}
@media (max-width: 1100px) {
  :root { --side: 76px; }
  .brand b, .brand .tag, .brand .collapse, .searchbtn span, .searchbtn .kbd, .nav a .lbl, .side-group, .recent, .limits, .me .who, .me .gear { display: none; }
  .brand { justify-content: center; padding: 0; }
  .searchbtn { justify-content: center; margin: 6px 14px 18px; padding: 0; }
  .nav a { justify-content: center; padding: 0; }
  .nav a .badge { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
  .side-foot { margin-top: auto; align-items: center; }
  .bento > * { grid-column: span 6; }
  .bento > .c12, .bento > .wide { grid-column: span 12; }
  .wa-list { width: 280px; }
  .cfg { grid-template-columns: 1fr; }
  .cfg-nav { display: none; }
}
@media (max-width: 760px) {
  #app { padding: 0; }
  .side { display: none; }
  .panel { border-radius: 0; border: 0; }
  .topbar { display: none; }
  .mtop { display: flex; align-items: center; gap: 10px; height: 60px; flex: none; padding: 0 16px; padding-top: env(safe-area-inset-top); }
  .mtop .ttl { flex: 1; font-size: 16px; font-weight: 600; min-width: 0; }
  .page { padding: 8px 16px 130px; }
  .hello { text-align: left; padding: 12px 4px 18px; }
  .hello h1 { font-size: 30px; }
  .hello p { font-size: 14px; }
  .cmd .top { padding: 16px 16px 4px; }
  .cmd textarea { font-size: 16px; }
  .cmd .bot { padding: 8px 10px 10px 16px; }
  .cmd .bot .attach span { display: none; }
  .slashes { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px; scrollbar-width: none; }
  .slashes > svg { display: none; }
  .slash { flex: none; }
  .home-grid { margin-top: 22px; }
  .bento { gap: 12px; }
  .bento > * { grid-column: span 12 !important; }
  .money { font-size: 40px; }
  .money.xl { font-size: 46px; }
  .page-h h1 { font-size: 24px; }
  .board { grid-template-columns: 1fr; }
  .rhythm { gap: 20px; }
  .heat { display: none; }
  .pillnav { display: flex; position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; gap: 4px; padding: 8px; border-radius: 34px; background: rgba(52,52,60,.72); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(20px); box-shadow: 0 14px 30px -10px rgba(0,0,0,.7); }
  .pillnav::before { content: ""; position: fixed; left: -50vw; right: -50vw; bottom: -40px; height: 150px; z-index: -1; background: linear-gradient(180deg, rgba(10,10,12,0), rgba(10,10,12,.92) 60%, #0A0A0C); pointer-events: none; }
  .pillnav .ind-bg { position: absolute; top: 8px; left: 8px; width: 48px; height: 48px; border-radius: 50%; background: #F4F4F5; transition: transform var(--t-slow) var(--spring); }
  .pillnav a { position: relative; z-index: 1; width: 56px; height: 48px; display: grid; place-items: center; color: var(--text-2); transition: color var(--t-base); }
  .pillnav a svg { width: 22px; height: 22px; }
  .pillnav a.on { color: #0A0A0C; }
  .pillnav a .unread { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 9.5px; }
  .chat-main .thread { padding: 16px 16px 12px; }
  .composer-wrap { padding: 0 10px 12px; }
  .composer .hint { display: none; }
  .toolpill { display: none; }
  .msg-a { gap: 12px; }
  .steps { margin-left: -24px; padding-left: 24px; }
  .wa-list { width: 100%; border-right: 0; }
  .wa.conv-open .wa-list { display: none; }
  .wa:not(.conv-open) .wa-conv { display: none; }
  .wa-msgs { padding: 14px 16px; }
  .wa-sug, .wa-input { margin-left: 12px; margin-right: 12px; }
  .wa-input { margin-bottom: 16px; }
  .mem { flex-direction: column; }
  .mem-files { width: 100%; border-right: 0; max-height: 34vh; border-bottom: 1px solid var(--line); }
  .mem-ed .bd { padding: 20px 18px 120px; }
  .codes input { width: 44px; height: 54px; font-size: 20px; }
  .codes { gap: 7px; }
  .login .lb { padding: 24px 20px; }
  .table .hide-sm, .hide-sm { display: none; }
  .only-mobile { display: flex !important; }
  body[data-view="chat"] .pillnav, body.wa-conv .pillnav { display: none; }
  body[data-view="chat"] .page, body.wa-conv .page { padding-bottom: 24px; }
  .composer #effort, .composer .hd .sep { display: none; }
  .composer .send { margin-left: auto; }
  .chat-empty { margin-top: 4vh; }
  .chat-empty .slashes { justify-content: flex-start !important; }
  .page-h h1 { display: none; }
  .cfg-sec .row { flex-wrap: wrap; }
  .cfg-sec > .row > .grow { flex-basis: 100%; }
  .composer .hd { overflow-x: auto; }
  .modal { border-radius: 22px 22px 0 0; align-self: end; max-height: 88dvh; animation: sheet-in 320ms var(--ease-out); }
  .overlay { padding: 0; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
