/* ===========================================================
   Project Office: sistema visual único (06/10/2026)
   Antes havia dois sistemas (este e o style-iso.css) brigando pelas
   mesmas classes (.card, .list, .pill). Agora os tokens moram aqui e o
   style-iso.css só estiliza o escritório, com seletores escopados.

   Raios: campo 10px, botão 10px, card 14px, diálogo 20px, chip 999px.
   Camadas (z-index): 10 HUD do palco, 20 sidebar, 30 topbar,
   40 painel deslizante, 60 Jarvis, 70 dock do Jarvis, 80 tooltip,
   90 sobreposições (modal, monitor, reunião), 100 toast.
   =========================================================== */
:root{
  color-scheme:dark;
  --bg:#080a14;
  --surface-1:#0d1020;
  --surface-2:#131729;
  --surface-3:#1a1f36;
  --field:#0a0d1a;
  --line:#232a45;
  --line-strong:#343c60;
  --text:#eef0fa;
  --text-2:#a7afcb;
  --text-3:#8f97b5;
  --accent:#8b5cf6;
  --accent-hi:#a78bfa;
  --accent-text:#c4b5fd;
  --accent-soft:rgba(139,92,246,.14);
  --accent-line:rgba(139,92,246,.45);
  --cyan:#22d3ee;
  --ok:#34d399;
  --warn:#fbbf24;
  --bad:#fb7185;
  --font:"IBM Plex Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --condensed:"IBM Plex Sans Condensed","IBM Plex Sans",ui-sans-serif,sans-serif;
  --r-field:10px;
  --r-card:14px;
  --r-dialog:20px;
  --glow:0 18px 50px rgba(18,10,48,.55);
  --glow-accent:0 8px 22px rgba(139,92,246,.28);
  --ease-out:cubic-bezier(.23,1,.32,1);
  --topbar-h:64px;

  /* aliases para o código do escritório, que ainda lê os nomes antigos */
  --panel:var(--surface-1);
  --panel2:var(--surface-2);
  --muted:var(--text-2);
  --accent2:var(--cyan);
  --green:var(--ok);
  --yellow:var(--warn);
  --red:var(--bad);
  --shadow:var(--glow);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;min-height:100dvh;
  font-family:var(--font);font-size:14px;line-height:1.5;
  color:var(--text);
  background:radial-gradient(1200px 520px at 12% -10%,rgba(139,92,246,.10),transparent 60%),var(--bg);
  -webkit-font-smoothing:antialiased;
}
body.office-mode{overflow:hidden;height:100dvh}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation}
h1,h2,h3{text-wrap:balance}
.clock,.stat b,.count-badge,.card .big,.kpi b,.rn-meta b{font-variant-numeric:tabular-nums}
a{color:var(--accent-text)}
h1,h2,h3,h4{line-height:1.25;letter-spacing:-.01em}
.hidden{display:none!important}
[hidden]{display:none!important}
.ico{flex:0 0 auto;display:block}
:focus-visible{outline:2px solid var(--accent-hi);outline-offset:2px}
::selection{background:rgba(139,92,246,.35)}
*{scrollbar-width:thin;scrollbar-color:#2a3152 transparent}

.muted{color:var(--text-2);font-size:12.5px}
.error{color:var(--bad);font-size:12.5px;margin:0}
.error:empty{display:none}
code,kbd{font-family:var(--mono);font-size:12px}

/* ===================== BOTÕES ===================== */
.primary,.ghost,.danger,.btn,.tb-btn,.icon-button,.mini,.chip,.zbtn,.back{
  -webkit-tap-highlight-color:transparent;
  transition:transform 160ms var(--ease-out),background-color 160ms ease,border-color 160ms ease,color 160ms ease,filter 160ms ease;
}
.primary:active,.ghost:active,.danger:active,.btn:active,.tb-btn:active,.icon-button:active,.mini:active,.zbtn:active{transform:scale(.97)}
button:disabled{opacity:.55;cursor:not-allowed;transform:none}

.primary{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:38px;border:0;border-radius:var(--r-field);padding:9px 16px;
  color:#fff;font-weight:600;white-space:nowrap;
  background:linear-gradient(135deg,#7c50e7,#6d4ae0);
  box-shadow:var(--glow-accent),inset 0 1px 0 rgba(255,255,255,.14);
}
.primary:hover{filter:brightness(1.08)}
.wide{width:100%}
.ghost,.danger{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:34px;border:1px solid var(--line);background:var(--surface-2);color:var(--text);
  border-radius:var(--r-field);padding:7px 12px;font-size:12.5px;font-weight:500;white-space:nowrap;
}
.ghost:hover{border-color:var(--line-strong);background:var(--surface-3)}
.danger{border-color:rgba(251,113,133,.32);color:#fda4af;background:rgba(251,113,133,.06)}
.danger:hover{background:rgba(251,113,133,.12)}
.icon-button{
  width:36px;height:36px;border-radius:var(--r-field);border:1px solid var(--line);
  background:var(--surface-2);color:var(--text-2);display:inline-grid;place-items:center;padding:0;
}
.icon-button:hover,.icon-button.active{border-color:var(--accent-line);color:var(--text);background:var(--surface-3)}
.icon-button.active{color:var(--accent-text)}
.icon-button.recording{border-color:var(--bad);color:#fecdd3;animation:pulse-record 1s infinite}
@keyframes pulse-record{50%{box-shadow:0 0 0 5px rgba(251,113,133,.12)}}
.link-button{text-decoration:none}
.count-badge{
  display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:999px;
  background:var(--bad);color:#1e0b13;font:600 10px/1 var(--mono);padding:0 5px;
}

/* ===================== CAMPOS ===================== */
label{display:grid;gap:6px;font-size:12.5px;font-weight:500;color:var(--text-2);min-width:0}
input,select,textarea{
  width:100%;min-width:0;background:var(--field);border:1px solid var(--line);color:var(--text);
  border-radius:var(--r-field);padding:9px 11px;outline:none;font-size:13.5px;font-weight:400;
  transition:border-color 160ms ease,box-shadow 160ms ease;
}
input::placeholder,textarea::placeholder{color:#7983a3}
input:hover,select:hover,textarea:hover{border-color:var(--line-strong)}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(139,92,246,.18)}
textarea{resize:vertical;line-height:1.55}
select{
  appearance:none;padding-right:32px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a7afcb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;
}
input[type=checkbox],input[type=radio]{width:16px;height:16px;padding:0;accent-color:var(--accent);flex:0 0 auto;cursor:pointer}
input[type=file]{padding:7px;font-size:12.5px;color:var(--text-2)}
input[type=file]::file-selector-button{border:1px solid var(--line);background:var(--surface-3);color:var(--text);border-radius:8px;padding:5px 10px;margin-right:10px;cursor:pointer}
label small,label .muted{font-weight:400}
label>small,label>.muted{font-size:11.5px;color:var(--text-3);margin-top:-3px}
/* rótulo que envolve checkbox ou rádio: lado a lado, não empilhado */
label:has(>input[type=checkbox]),label:has(>input[type=radio]),label.row{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;gap:10px}
label:has(>input[type=checkbox])>input,label.row>input{margin-top:2px}
.inline-check{display:inline-flex;align-items:center;gap:8px;color:var(--text-2);font-size:12.5px;font-weight:400}
.inline-check input{width:16px}
.field-with-action{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.field-with-action button{white-space:nowrap}
.json-editor,.large-textarea{
  width:100%;min-height:150px;resize:vertical;background:#070914;border:1px solid var(--line);
  color:#e3e7f8;border-radius:var(--r-field);padding:11px;font:12px/1.6 var(--mono);
}
.large-textarea{min-height:110px;font-family:var(--font);font-size:13.5px}

/* ===================== ESTRUTURA DE CONTEÚDO ===================== */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.card{
  display:block;min-width:0;position:relative;
  background:linear-gradient(170deg,var(--surface-2),var(--surface-1));
  border:1px solid var(--line);border-radius:var(--r-card);padding:16px 18px;
}
.card>:first-child{margin-top:0}
.card>:last-child{margin-bottom:0}
.card h3{margin:0 0 6px;font-size:15px;font-weight:600}
.card h4{margin:14px 0 6px;font-size:12px;font-weight:600;color:var(--text-2)}
.card p{margin:8px 0;line-height:1.55}
.card .big{font:600 28px/1.1 var(--mono);letter-spacing:-.02em;margin:6px 0}
.card.muted{color:var(--text-2);padding:14px 16px;font-size:13px;border-style:dashed;background:transparent}
.card.error{color:var(--bad);border-color:rgba(251,113,133,.35);background:rgba(251,113,133,.06)}
details.card>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
details.card>summary::-webkit-details-marker{display:none}
details.card>summary::before{
  content:"";width:8px;height:8px;border-right:2px solid var(--text-3);border-bottom:2px solid var(--text-3);
  transform:rotate(-45deg);transition:transform 160ms var(--ease-out);margin-right:4px;flex:0 0 auto;
}
details.card[open]>summary::before{transform:rotate(45deg)}
details.card[open]>summary{margin-bottom:10px}

.section-title{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:30px 0 12px;flex-wrap:wrap}
.section-title h3{margin:0;font-size:16px;font-weight:600}
.section-title>div{min-width:0}
.section-title>div>.muted{display:block;margin-top:3px;max-width:72ch}
.platform-title{margin-top:0}
/* O título da página (ou do diálogo) já nomeia a seção; aqui fica só a explicação. */
#workspaceContent>.platform-title h3,#officeToolContent>.platform-title h3,#globalApprovalsContent>.platform-title h3,#globalAccountsContent>.platform-title h3{display:none}
#workspaceContent>.platform-title,#officeToolContent>.platform-title,#globalApprovalsContent>.platform-title{margin-bottom:16px}
.list{display:grid;gap:10px;min-width:0}
.row{
  border:1px solid var(--line);background:var(--surface-1);border-radius:12px;padding:12px 14px;
  display:flex;justify-content:space-between;gap:16px;align-items:center;min-width:0;
}
.row>div{min-width:0}
.row strong{font-size:13.5px;font-weight:600;overflow-wrap:anywhere}
.row small{color:var(--text-2);overflow-wrap:anywhere}
.flat-row{border:0!important;padding:0!important;background:transparent!important;align-items:flex-start}
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.platform-form{display:grid;gap:14px;margin-bottom:18px;align-content:start}
.platform-form>.primary,.platform-form>button.ghost{justify-self:start}
.platform-form>h3{margin:0}
.platform-form>h3+p,.platform-form>h3+.muted{margin:-8px 0 0}
.platform-form>p{margin:0}
.platform-actions{margin-top:12px}

.tag{
  display:inline-flex;align-items:center;gap:5px;white-space:nowrap;
  font:500 11px/1 var(--mono);padding:5px 8px;border-radius:999px;
  background:var(--surface-3);color:var(--text-2);border:1px solid transparent;
}
.tag.review,.tag.approval,.tag.medium,.tag.elevated,.tag.pending,.tag.warn,.tag.unverified,.tag.unknown{background:rgba(251,191,36,.10);color:#fcd34d}
.tag.running,.tag.in_progress{background:rgba(34,211,238,.10);color:#67e8f9}
.tag.completed,.tag.passed,.tag.ok,.tag.healthy,.tag.connected,.tag.approved,.tag.active{background:rgba(52,211,153,.10);color:#6ee7b7}
.tag.failed,.tag.high,.tag.critical,.tag.rejected,.tag.error,.tag.bad{background:rgba(251,113,133,.10);color:#fda4af}
.status{font-size:12px;color:var(--text-2)}
.status.ok{color:var(--ok)}.status.warn{color:var(--warn)}.status.bad{color:var(--bad)}

pre.diff,.chat-code{
  white-space:pre-wrap;word-break:break-word;background:#070914;border:1px solid var(--line);
  border-radius:12px;padding:12px 14px;max-height:480px;overflow:auto;color:#cdd4ee;
  font:12px/1.6 var(--mono);margin:10px 0 0;
}
.compact-diff{max-height:220px!important}
.decision-bar{height:6px;background:var(--surface-3);border-radius:999px;overflow:hidden;margin-top:8px}
.decision-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--cyan))}
.proof-strip{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:12px 0 8px}
.proof-checks{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 12px}
.proof-check{font:500 11px/1 var(--mono);border:1px solid var(--line);padding:5px 8px;border-radius:999px}
.proof-check.ok{color:var(--ok);border-color:rgba(52,211,153,.35)}
.proof-check.bad{color:var(--bad);border-color:rgba(251,113,133,.35)}
.checkpoint-list{display:grid;gap:7px;margin-top:12px}
.terminal-line{display:flex;align-items:center;gap:9px;background:#070914;border:1px solid var(--line);border-radius:var(--r-field);padding:4px 6px 4px 12px}
.terminal-line span{font:600 14px var(--mono);color:var(--ok)}
.terminal-line input{border:0;background:transparent;padding:8px 6px;box-shadow:none!important;font-family:var(--mono)}
.agent-card{display:flex;gap:12px;align-items:center;min-width:0}
.agent-card>div{min-width:0}
.agent-card h3{margin:0}
.agent-icon{
  width:40px;height:40px;flex:0 0 40px;border-radius:11px;display:grid;place-items:center;
  font:600 15px var(--mono);color:var(--accent-text);
  background:var(--accent-soft);border:1px solid var(--accent-line);
}
.empty-state{display:grid;justify-items:start;gap:10px;padding:22px;border:1px dashed var(--line-strong);border-radius:var(--r-card);color:var(--text-2)}
.empty-state strong{color:var(--text);font-size:14px}
.kv{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12.5px;color:var(--text-2);margin:8px 0}
.kv b{font-weight:500;color:var(--text)}
.mermaid{background:#070914;border:1px solid var(--line);border-radius:12px;padding:14px;overflow:auto}

/* ===================== TOPBAR ===================== */
.topbar{
  position:sticky;top:0;z-index:30;height:var(--topbar-h);
  display:flex;align-items:center;gap:14px;padding:0 18px;
  padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right));
  background:rgba(8,10,20,.86);backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.brand{display:flex;align-items:center;gap:10px;min-width:0;flex:0 0 auto}
.brand-mark{
  width:28px;height:28px;border-radius:8px;flex:0 0 28px;
  background:
    linear-gradient(135deg,transparent 46%,rgba(255,255,255,.22) 47% 53%,transparent 54%),
    linear-gradient(145deg,#a78bfa,#6d4ae0 60%,#3b2a8c);
  box-shadow:0 0 0 1px rgba(196,181,253,.25),0 6px 18px rgba(139,92,246,.35);
}
.brand-text{display:flex;flex-direction:column;line-height:1.15;min-width:0}
.brand-text strong{font-size:15px;font-weight:700;letter-spacing:-.02em;white-space:nowrap}
.brand-text small{font:500 10px var(--mono);color:var(--text-3);white-space:nowrap}

.runtime-pills{display:flex;gap:6px;flex-wrap:nowrap;min-width:0;margin-left:6px}
.pill{
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  border:1px solid var(--line);background:var(--surface-1);border-radius:999px;
  padding:4px 9px;font:500 11px/1.2 var(--mono);color:var(--text-2);
}
.pill i{width:7px;height:7px;border-radius:50%;background:#4b5372;flex:0 0 auto}
.pill.ok{color:var(--text)}
.pill.ok i{background:var(--ok);box-shadow:0 0 10px rgba(52,211,153,.55)}

.topbar-pulse{display:flex;align-items:center;gap:12px;margin-left:auto;flex:0 0 auto}
.clock{font:500 15px var(--mono);color:var(--cyan);letter-spacing:.02em}
.stats{display:flex;gap:6px}
.stat{
  display:inline-flex;align-items:baseline;gap:5px;padding:5px 9px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface-1);white-space:nowrap;
}
.stat b{font:600 13px var(--mono)}
.stat span{font-size:11px;color:var(--text-3)}
.stat.working b{color:var(--ok)}.stat.idle b{color:var(--warn)}.stat.off b{color:var(--text-3)}

.topactions{display:flex;align-items:center;gap:4px;flex:0 0 auto}
.tb-sep{width:1px;height:22px;background:var(--line);margin:0 4px}
.tb-btn{
  display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 11px;border-radius:var(--r-field);
  border:1px solid transparent;background:transparent;color:var(--text-2);font-size:13px;font-weight:500;white-space:nowrap;
  position:relative;
}
.tb-btn:hover{background:var(--surface-2);border-color:var(--line);color:var(--text)}
.tb-btn.icon-only{width:36px;padding:0;justify-content:center}
.tb-btn .count-badge{position:absolute;top:2px;right:2px;min-width:16px;height:16px;font-size:9px}
.tb-btn.rec{color:#fff;background:linear-gradient(135deg,#8b5cf6,#5b3fd6);animation:pulse 1.1s infinite}
@keyframes pulse{50%{box-shadow:0 0 0 6px rgba(139,92,246,.18)}}
.new-project{flex:0 0 auto}
.only-compact{display:none}

/* ===================== WORKSPACE ===================== */
.workspace{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:calc(100dvh - var(--topbar-h))}
.sidebar{
  position:sticky;top:var(--topbar-h);height:calc(100dvh - var(--topbar-h));z-index:20;
  display:flex;flex-direction:column;min-height:0;
  border-right:1px solid var(--line);padding:16px 12px 0;background:rgba(10,12,24,.7);
}
/* faixa de baixo reservada para o Jarvis, que fica fixo ali dentro do projeto */
.sidebar::after{content:"";flex:0 0 100px;border-top:1px solid var(--line);margin:0 -12px}
.back{
  display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;color:var(--text-2);
  padding:7px 8px;border-radius:8px;font-size:13px;
}
.back:hover{color:var(--text);background:var(--surface-2)}
.project-identity{
  margin:12px 2px 18px;padding:12px;background:var(--surface-2);border:1px solid var(--line);
  border-radius:var(--r-card);display:flex;gap:11px;align-items:center;min-width:0;
}
.project-identity>div:last-child{min-width:0}
.project-identity small{display:block;font:500 10px var(--mono);color:var(--text-3);letter-spacing:.08em;text-transform:uppercase}
.project-identity strong{display:block;margin-top:2px;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mini-person{width:30px;height:36px;position:relative;flex:0 0 30px}
.mini-person:before{content:"";position:absolute;width:16px;height:16px;border-radius:50%;left:7px;top:1px;background:#f2c29f}
.mini-person:after{content:"";position:absolute;width:26px;height:19px;left:2px;top:16px;border-radius:8px 8px 5px 5px;background:linear-gradient(145deg,var(--accent-hi),#5b3fd6)}
#workspaceNav{display:flex;flex-direction:column;gap:2px;flex:1;min-height:0;overflow-y:auto;margin:0 -6px;padding:0 6px 12px}
.nav-group{display:grid;gap:2px}
.nav-label{margin:14px 10px 4px;font:500 11px var(--mono);letter-spacing:.06em;text-transform:uppercase;color:var(--text-3)}
#workspaceNav button{
  display:flex;align-items:center;gap:10px;border:0;background:transparent;color:var(--text-2);
  text-align:left;padding:8px 10px;border-radius:9px;font-size:13.5px;font-weight:500;position:relative;
}
#workspaceNav button .ico{color:var(--text-3);transition:color 160ms ease}
#workspaceNav button:hover{background:var(--surface-2);color:var(--text)}
#workspaceNav button.active{background:var(--accent-soft);color:var(--text)}
#workspaceNav button.active .ico{color:var(--accent-text)}
#workspaceNav button.active::before{content:"";position:absolute;left:-12px;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--accent)}

.workspace-main{padding:26px 32px 72px;min-width:0;max-width:1320px;width:100%}
.workspace-header{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:22px}
.workspace-heading{min-width:0}
.workspace-header h2{margin:2px 0 0;font-size:26px;font-weight:700;letter-spacing:-.02em}
.repo-path{
  font:500 11.5px var(--mono);color:var(--text-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:min(720px,60vw);
}
.live-badge{
  display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;
  font:500 11px var(--mono);color:var(--text-2);border:1px solid var(--line);padding:5px 10px;border-radius:999px;
}
.live-badge span{width:7px;height:7px;background:var(--ok);border-radius:50%;box-shadow:0 0 8px rgba(52,211,153,.6)}
.live-badge.error span{background:var(--bad);box-shadow:none}

/* ===================== CHAT ===================== */
.chat-pro{
  height:calc(100dvh - var(--topbar-h) - 150px);min-height:460px;
  display:grid;grid-template-rows:minmax(0,1fr) auto;
  border:1px solid var(--line);background:var(--surface-1);border-radius:16px;overflow:hidden;
}
.messages{padding:20px;overflow:auto;display:flex;flex-direction:column;gap:12px}
.chat-pro-messages{min-height:0}
.chat-empty{margin:auto;text-align:center;max-width:36ch}
.chat-empty strong{display:block;color:var(--text);font-size:14px;margin-bottom:4px}
.message{
  max-width:min(78%,760px);padding:11px 14px;border-radius:14px 14px 14px 4px;
  background:var(--surface-2);border:1px solid var(--line);align-self:flex-start;
}
.message.user{align-self:flex-end;background:linear-gradient(160deg,#2a1f52,#1f1840);border-color:#46357e;border-radius:14px 14px 4px 14px}
.message.pending{opacity:.7}
.message-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:5px}
.message-head b{font:600 11px var(--mono);color:var(--text-2);letter-spacing:.02em}
.message-head span{font:500 10px var(--mono);color:var(--text-3);border:1px solid var(--line);background:var(--field);border-radius:999px;padding:2px 6px}
.message-body{font-size:13.5px;line-height:1.6;overflow-wrap:anywhere}
.message-body p{margin:0 0 8px}.message-body p:last-child{margin:0}
.message-body .chat-code{margin:8px 0}
.message-error{
  margin-top:8px;padding:9px 11px;border-radius:10px;font-size:12.5px;
  background:rgba(251,113,133,.07);border:1px solid rgba(251,113,133,.28);color:#fecdd3;
}
.message-error details{margin-top:6px}
.message-error summary{cursor:pointer;color:var(--text-2)}
.inline-code{background:var(--field);border:1px solid var(--line);border-radius:5px;padding:1px 5px;font-family:var(--mono);font-size:12px}
.typing{display:inline-flex;gap:4px;align-items:center;padding:4px 0}
.typing i{width:6px;height:6px;border-radius:50%;background:var(--text-3);animation:typing 1s infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes typing{0%,100%{opacity:.3}50%{opacity:1}}
.chat-attachments{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.chat-attachment{display:flex;flex-direction:column;gap:5px;max-width:240px;text-decoration:none;color:var(--text);border:1px solid var(--line);border-radius:11px;padding:8px;background:var(--field)}
.chat-attachment .att-name{display:flex;align-items:center;gap:6px;font-size:12.5px}
.chat-attachment small{color:var(--text-3)}
.chat-attachment.image img{width:100%;max-height:180px;object-fit:cover;border-radius:8px}
.chat-attachment audio{width:100%;max-width:280px}
.composer-shell{border-top:1px solid var(--line);padding:10px;background:#0a0d1b;transition:border-color 160ms ease,background-color 160ms ease}
.composer-shell.dragging{border-color:var(--accent);background:#121032}
#smartChatForm{display:grid;gap:8px}
#smartChatForm textarea{min-height:64px;max-height:220px;background:var(--surface-1);border-radius:12px;padding:11px 12px}
.composer-toolbar{display:flex;align-items:center;gap:8px;min-width:0}
.composer-tools{display:flex;gap:6px;flex:0 0 auto}
.composer-config{display:flex;gap:6px;flex:1;min-width:0}
.composer-config select,.composer-config input{width:auto;flex:1 1 0;min-width:0;max-width:200px;padding:7px 9px;font-size:12px}
.composer-config select{padding-right:28px;background-position:right 8px center}
.composer-config.is-lovable [name="accountId"],.composer-config.is-lovable .model-select,.composer-config.is-lovable .effort-select{display:none}
.send-button{width:40px;height:38px;min-height:38px;padding:0;flex:0 0 auto}
.composer-hint{font-size:11px;color:var(--text-3)}
.pending-attachments{display:flex;gap:6px;flex-wrap:wrap}
.pending-attachments:empty{display:none}
.pending-chip{display:inline-flex;align-items:center;gap:6px;background:var(--surface-2);border:1px solid var(--line);border-radius:999px;padding:4px 6px 4px 10px;font-size:11.5px}
.pending-chip button{border:0;background:transparent;color:var(--text-2);padding:0;display:grid;place-items:center}

/* ===================== DIÁLOGOS ===================== */
dialog{
  width:min(540px,calc(100vw - 24px));max-height:min(88dvh,900px);overflow:auto;
  border:1px solid var(--line-strong);background:linear-gradient(180deg,#121628,#0d1020);color:var(--text);
  border-radius:var(--r-dialog);padding:0;box-shadow:0 30px 80px rgba(8,4,28,.7);
}
dialog[open]{animation:dialog-in 200ms var(--ease-out)}
@keyframes dialog-in{from{opacity:0;transform:translateY(8px) scale(.98)}}
dialog,.messages,#workspaceNav,.jarvis-dock-panel{overscroll-behavior:contain}
dialog::backdrop{background:rgba(4,5,14,.72);backdrop-filter:blur(6px)}
dialog form{padding:22px;display:grid;gap:14px}
.dialog-shell{padding:22px}
.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.dialog-shell>.dialog-head{margin-bottom:16px}
.dialog-head h3{margin:0;font-size:17px;font-weight:600}
.dialog-head button{
  width:34px;height:34px;flex:0 0 34px;border:1px solid transparent;border-radius:9px;background:transparent;
  color:var(--text-2);display:grid;place-items:center;padding:0;
}
.dialog-head button:hover{background:var(--surface-3);color:var(--text);border-color:var(--line)}
.wide-dialog{width:min(1000px,calc(100vw - 24px))}
.diff-dialog{width:96vw;max-width:96vw;height:92dvh}
.diff-dialog .dialog-shell{height:100%;display:flex;flex-direction:column}
#diffContent{flex:1;overflow:auto;background:#0d1117;color:#c9d1d9;padding:10px;border-radius:12px}
#projectGithubRepoSearch{margin-bottom:6px}
#projectGithubRepo{margin-bottom:4px}
#globalAccountsContent,#officeToolContent,#globalApprovalsContent{min-width:0}

/* ===================== JARVIS ===================== */
.jarvis-fab{
  position:fixed;z-index:60;
  right:max(20px,env(safe-area-inset-right));bottom:max(16px,calc(env(safe-area-inset-bottom) + 12px));
  width:118px;height:118px;border:0;background:transparent;padding:0;
  filter:drop-shadow(0 18px 24px rgba(4,6,20,.6));
  transition:transform 200ms var(--ease-out),opacity 200ms ease;
}
.jarvis-fab:hover{transform:translateY(-4px)}
.jarvis-fab.jarvis-open{transform:scale(.86);opacity:0;pointer-events:none}
.jarvis-fab-glow{
  position:absolute;left:50%;bottom:10px;width:76px;height:26px;transform:translateX(-50%);border-radius:50%;
  background:radial-gradient(ellipse,rgba(34,211,238,.42),rgba(139,92,246,.18) 45%,transparent 72%);
  filter:blur(8px);animation:jarvis-glow 2.6s ease-in-out infinite;
}
.jarvis-bot-3d{position:absolute;inset:0 14px 20px 14px;transform-style:preserve-3d;perspective:500px;animation:jarvis-float 3.2s ease-in-out infinite}
.jarvis-head{
  position:absolute;left:50%;top:17px;width:52px;height:41px;transform:translateX(-50%) rotateX(-5deg);
  border-radius:15px 15px 12px 12px;z-index:6;
  background:linear-gradient(180deg,rgba(255,255,255,.33),transparent 22%),linear-gradient(145deg,#d9e7f4 0%,#91a8bc 38%,#53687c 70%,#29384b 100%);
  border:1px solid rgba(225,242,255,.48);
  box-shadow:inset -8px -9px 13px rgba(15,28,44,.34),inset 8px 4px 10px rgba(255,255,255,.18),0 8px 18px rgba(0,0,0,.28);
}
.jarvis-head:before{content:"";position:absolute;inset:7px 8px 8px;border-radius:10px;background:linear-gradient(160deg,#101b2c,#08111f);border:1px solid rgba(79,209,255,.2)}
.jarvis-eye{position:absolute;top:18px;width:7px;height:5px;z-index:2;border-radius:5px;background:#72f3ff;box-shadow:0 0 8px rgba(76,231,255,.95),0 0 14px rgba(76,231,255,.5)}
.jarvis-eye.left{left:16px}.jarvis-eye.right{right:16px}
.jarvis-mouth{position:absolute;z-index:2;left:50%;bottom:9px;width:13px;height:2px;transform:translateX(-50%);border-radius:999px;background:#4f6c81}
.jarvis-antenna{position:absolute;z-index:4;left:50%;top:3px;width:3px;height:17px;transform:translateX(-50%);background:linear-gradient(#637d91,#c6d7e4);border-radius:3px}
.jarvis-antenna i{position:absolute;top:-4px;left:-3px;width:9px;height:9px;border-radius:50%;background:#67e8f9;box-shadow:0 0 10px rgba(103,232,249,.85)}
.jarvis-neck{position:absolute;z-index:3;left:50%;top:56px;width:17px;height:10px;transform:translateX(-50%);border-radius:4px;background:linear-gradient(90deg,#33475a,#91a6b8,#33475a)}
.jarvis-body{
  position:absolute;z-index:4;left:50%;top:62px;width:58px;height:50px;
  transform:translateX(-50%) perspective(120px) rotateX(4deg);
  clip-path:polygon(16% 0,84% 0,100% 20%,88% 100%,12% 100%,0 20%);
  background:linear-gradient(180deg,rgba(255,255,255,.24),transparent 20%),linear-gradient(145deg,#a9bdce,#657d91 46%,#31465a 76%,#1b2b3d);
  border:1px solid rgba(229,244,255,.28);box-shadow:inset -10px -11px 15px rgba(9,22,34,.32);
}
.jarvis-core{position:absolute;left:50%;top:13px;width:20px;height:20px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle,#e7feff 0 14%,#6ee7f9 16% 34%,#17677a 36% 56%,#0c2532 58%);box-shadow:0 0 15px rgba(34,211,238,.72)}
.jarvis-body-line{position:absolute;left:9px;right:9px;bottom:7px;height:2px;border-radius:3px;background:rgba(126,232,255,.32)}
.jarvis-arm,.jarvis-leg{position:absolute;z-index:2;background:linear-gradient(145deg,#91a6b8,#3b5268 60%,#24364a);border:1px solid rgba(220,239,250,.2)}
.jarvis-arm{top:67px;width:14px;height:43px;border-radius:9px}
.jarvis-arm.left{left:11px;transform:rotate(15deg)}.jarvis-arm.right{right:11px;transform:rotate(-15deg)}
.jarvis-leg{top:103px;width:14px;height:25px;border-radius:6px 6px 9px 9px}
.jarvis-leg.left{left:30px;transform:rotate(3deg)}.jarvis-leg.right{right:30px;transform:rotate(-3deg)}
.jarvis-fab-caption{
  position:absolute;right:92px;bottom:24px;min-width:96px;padding:7px 10px;
  border:1px solid rgba(103,232,249,.2);border-radius:11px 11px 4px 11px;background:rgba(8,12,26,.9);
  backdrop-filter:blur(12px);text-align:right;
}
.jarvis-fab-caption strong{display:block;color:#eafaff;font-size:12px;font-weight:600}
.jarvis-fab-caption small{display:block;color:#7fa0b6;font-size:11.5px}
.jarvis-fab-badge{position:absolute;top:4px;right:8px;min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:999px;background:var(--bad);color:#fff;font:700 11px var(--mono);box-shadow:0 0 0 4px rgba(251,113,133,.14)}
/* Dentro de um projeto o Jarvis encolhe e vai para o canto da sidebar,
   para não cobrir o botão de enviar do chat (06/10/2026). */
body:not(.office-mode) .jarvis-fab{left:max(18px,env(safe-area-inset-left));right:auto;width:74px;height:84px}
body:not(.office-mode) .jarvis-bot-3d{inset:0 0 6px 0;transform:scale(.68);transform-origin:50% 100%}
body:not(.office-mode) .jarvis-fab-glow{bottom:4px;width:50px}
body:not(.office-mode) .jarvis-fab-caption{right:auto;left:72px;bottom:22px;min-width:0;white-space:nowrap;text-align:left;border-radius:11px 11px 11px 4px}

.jarvis-dock{
  position:fixed;z-index:70;right:max(18px,env(safe-area-inset-right));bottom:max(18px,calc(env(safe-area-inset-bottom) + 14px));
  width:min(460px,calc(100vw - 28px));height:min(720px,calc(100dvh - var(--topbar-h) - 36px));pointer-events:none;
}
.jarvis-dock-panel{
  width:100%;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;
  border:1px solid rgba(114,243,255,.16);border-radius:var(--r-dialog);
  background:linear-gradient(180deg,#0e1324,#080b16);
  box-shadow:0 28px 80px rgba(4,4,24,.6);pointer-events:auto;
  animation:dock-in 220ms var(--ease-out);transform-origin:100% 100%;
}
@keyframes dock-in{from{opacity:0;transform:translateY(10px) scale(.98)}}
.jarvis-dock-head{min-height:60px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.06)}
.jarvis-dock-identity{display:flex;align-items:center;gap:10px}
.jarvis-dock-identity strong{display:block;font-size:14px}
.jarvis-dock-identity small{display:block;font:500 11px var(--mono);color:#7fa0b6}
.jarvis-mini-core{width:32px;height:32px;border-radius:10px;background:radial-gradient(circle,#ecfeff 0 8%,#67e8f9 10% 19%,#174c62 22% 40%,transparent 42%),linear-gradient(145deg,#71889b,#27394d);border:1px solid rgba(203,237,255,.28)}
.jarvis-close{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:var(--surface-2);color:var(--text-2);display:grid;place-items:center;padding:0}
.jarvis-close:hover{color:var(--text);border-color:var(--line-strong)}
#jarvisContent{min-height:0;overflow:hidden}
#jarvisContent>.card{margin:14px}
#jarvisContent .chat-pro{height:100%;min-height:0;border:0;border-radius:0;background:transparent}
#jarvisContent .composer-config .model-select{display:none}
@keyframes jarvis-float{0%,100%{transform:translateY(0) rotateY(-3deg)}50%{transform:translateY(-6px) rotateY(3deg)}}
@keyframes jarvis-glow{0%,100%{opacity:.48;transform:translateX(-50%) scale(.9)}50%{opacity:.9;transform:translateX(-50%) scale(1.12)}}
body:not(.office-mode) .jarvis-bot-3d{animation:none}

/* ===================== AVISO (toast) ===================== */
.app-toast{
  position:fixed;z-index:100;left:50%;bottom:max(24px,calc(env(safe-area-inset-bottom) + 16px));
  transform:translateX(-50%);display:flex;align-items:center;gap:10px;max-width:min(560px,calc(100vw - 24px));
  padding:11px 16px;border-radius:12px;font-size:13.5px;font-weight:500;
  background:#13182c;border:1px solid var(--line-strong);box-shadow:var(--glow);
  animation:toast-in 220ms var(--ease-out);
}
.app-toast.ok{border-color:rgba(52,211,153,.4)}.app-toast.ok .ico{color:var(--ok)}
.app-toast.bad{border-color:rgba(251,113,133,.45)}.app-toast.bad .ico{color:var(--bad)}
.app-toast.leaving{opacity:0;transform:translate(-50%,6px);transition:opacity 160ms ease,transform 160ms ease}
@keyframes toast-in{from{opacity:0;transform:translate(-50%,10px)}}

/* ===================== RESPONSIVO ===================== */
/* Topo em degraus, medido na produção de 500 a 2600 px (22/10/2026): com as
   barras de cota, os 4 contadores de status e o Nova empresa, as pílulas
   transbordavam até 585 px por cima do relógio. Cada degrau tira um detalhe;
   o que some das pílulas continua no balão que abre ao passar o mouse. */
@media (max-width:2599px){
  .stat span,.pill .quota em{display:none}
}
@media (max-width:2199px){
  .pill .quota + .quota{display:none}
}
@media (max-width:1999px){
  .pill .quota{display:none}
}
@media (max-width:1899px){
  .topactions .tb-btn:not(.icon-only) span:not(.count-badge){display:none}
  .topactions .tb-btn:not(.icon-only){width:36px;padding:0;justify-content:center}
}
@media (max-width:1439px){
  .new-company span{display:none}
  .new-company{width:38px;padding:0;justify-content:center}
}
@media (max-width:1299px){
  .runtime-pills{display:none}
}
@media (max-width:1180px){
  .workspace{grid-template-columns:216px minmax(0,1fr)}
  .workspace-main{padding:22px 22px 72px}
}
@media (max-width:1099px){
  .clock{display:none}
}
@media (max-width:1080px){
  .only-compact{display:inline-flex}
  body:not(.office-mode) #btn-panel{display:none}
}
@media (max-width:900px){
  :root{--topbar-h:56px}
  .topbar{gap:8px;padding:0 10px}
  .brand-text small{display:none}
  .topbar-pulse{margin-left:auto}
  #btn-voice,#btn-speak{display:none}
  .new-project span{display:none}
  .new-project{width:38px;padding:0}
  .tb-sep{display:none}

  .workspace{display:block}
  .sidebar{
    position:sticky;top:var(--topbar-h);height:auto;overflow:visible;padding:8px 10px;
    border-right:0;border-bottom:1px solid var(--line);background:rgba(10,12,24,.94);backdrop-filter:blur(14px);
    display:flex;flex-direction:row;align-items:center;gap:8px;
  }
  .sidebar::after{display:none}
  .back{flex:0 0 auto;padding:7px}
  .back{font-size:0;gap:0}
  .project-identity,.nav-label{display:none}
  #workspaceNav{flex-direction:row;gap:4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;min-width:0;flex:1;margin:0;padding:0}
  #workspaceNav::-webkit-scrollbar{display:none}
  .nav-group{display:contents}
  #workspaceNav button{flex:0 0 auto;white-space:nowrap;padding:7px 10px;font-size:13px}
  #workspaceNav button.active::before{display:none}
  .workspace-main{padding:16px 14px 110px}
  .workspace-header{margin-bottom:14px;align-items:flex-start}
  .workspace-header h2{font-size:22px}
  .repo-path{max-width:70vw}
  .chat-pro{height:calc(100dvh - var(--topbar-h) - 210px);min-height:380px;border-radius:14px}
  .message{max-width:90%}
  .composer-toolbar{flex-wrap:wrap}
  .composer-config{order:3;flex-basis:100%;flex-wrap:wrap}
  .composer-config select,.composer-config input{max-width:none;flex:1 1 calc(50% - 3px)}
  .send-button{margin-left:auto}

  .jarvis-fab,body:not(.office-mode) .jarvis-fab{width:76px;height:86px;left:auto;right:10px;bottom:max(10px,env(safe-area-inset-bottom))}
  .jarvis-bot-3d,body:not(.office-mode) .jarvis-bot-3d{inset:0 0 6px 0;transform:scale(.68);transform-origin:50% 100%}
  .jarvis-fab-caption{display:none}
  .jarvis-dock{right:8px;left:8px;bottom:max(8px,env(safe-area-inset-bottom));width:auto;height:min(78dvh,680px)}
}
@media (max-width:640px){
  .stats{display:none}
  .brand-text{display:none}
  .topactions{gap:2px}
  input,select,textarea{font-size:16px}
  .composer-config select,.composer-config input{font-size:14px}
  dialog form,.dialog-shell{padding:16px}
  .wide-dialog{width:calc(100vw - 16px)}
  .row{flex-wrap:wrap;align-items:flex-start}
  .card{padding:14px}
  .section-title{margin-top:24px}
  .field-with-action{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* ===================== CONTAS E LOGIN DE PROVEDOR (07/10/2026) ===================== */
.account-id{display:flex;align-items:center;gap:12px;min-width:0}
.account-id>div{min-width:0}
.account-avatar{
  width:40px;height:40px;flex:0 0 40px;border-radius:10px;object-fit:cover;
  border:1px solid var(--line);background:var(--surface-3);
}
.account-avatar.placeholder{display:grid;place-items:center;font:600 11px var(--mono);color:var(--text-2)}
.card>.actions{margin-top:14px}
.card>.error{margin-top:10px}
.account-link-card{
  margin-top:14px;padding:14px 16px;border-radius:12px;
  background:var(--field);border:1px solid var(--accent-line);
}
.account-link-card.error{border-color:rgba(251,113,133,.35)}
.account-link-card.error>strong{color:var(--bad)}
.account-link-card p{margin:6px 0 0}
.account-link-card .actions{margin-top:12px}
.link-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.link-head strong{display:inline-flex;align-items:center;gap:7px;font-size:13.5px}
.link-steps{margin:10px 0 0;padding-left:20px;display:grid;gap:8px;font-size:13px;color:var(--text-2);line-height:1.5}
.link-steps li::marker{font-family:var(--mono);color:var(--accent-text)}
.device-code{display:flex;align-items:center;gap:10px;margin-top:8px;flex-wrap:wrap}
.device-code strong{
  font:600 20px/1 var(--mono);letter-spacing:.12em;color:var(--text);
  padding:10px 14px;border-radius:10px;background:var(--surface-2);border:1px solid var(--line-strong);
  user-select:all;
}
dialog form.link-code-form,.link-code-form{display:flex;gap:8px;margin-top:8px;padding:0;flex-wrap:wrap}
.link-code-form input{flex:1 1 240px;font-family:var(--mono)}
.permission-profile.is-full{border-color:var(--accent-line);background:linear-gradient(170deg,rgba(139,92,246,.10),var(--surface-1))}

/* ===================== CENTRAL DE RECURSOS (08/10/2026) ===================== */
.library-tabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--line);margin:0 -2px 12px;padding:0 2px}
.library-tabs::-webkit-scrollbar{display:none}
.library-tabs button{
  display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;white-space:nowrap;
  padding:10px 12px;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;
  background:none;color:var(--text-2);font-size:13.5px;font-weight:500;
}
.library-tabs button:hover{color:var(--text)}
.library-tabs button.active{color:var(--text);border-bottom-color:var(--accent)}
.library-tabs button.active .ico{color:var(--accent-text)}
.library-hint{margin:0 0 14px}
.library-body>.grid{margin-bottom:6px}
.resources-banner{display:grid;gap:4px;margin-bottom:16px}
.resources-form{display:grid;gap:14px}
.resource-group h3{display:inline-flex;align-items:center;gap:8px;margin:0}
.resource-group h3 .ico{color:var(--accent-text)}
.resource-group select{width:auto}
.resource-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px;margin-top:12px}
label.resource-item{
  display:flex;flex-direction:row;align-items:flex-start;gap:10px;padding:10px 12px;
  border:1px solid var(--line);border-radius:var(--r-field);background:var(--field);cursor:pointer;
}
label.resource-item span{display:grid;gap:2px;min-width:0}
label.resource-item strong{font-size:13px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
label.resource-item small{font-size:11.5px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
label.resource-item:has(input:disabled){cursor:default;opacity:.85}
.resources-form>.primary{justify-self:start}
.unified-agents{display:grid;gap:12px}
.agent-group{display:grid;gap:8px}
.agent-group-title{font-size:12.5px;color:var(--text-2);font-weight:600}

/* Repositórios do projeto (08/10/2026) */
.repo-list { display: grid; gap: 8px; }
.repo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) 40px; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line, #232a3d); border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
.repo-meta { display: grid; gap: 2px; min-width: 0; }
.repo-meta strong { display: flex; align-items: center; gap: 8px; }
.repo-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.repo-add { margin-top: 12px; }
.repo-add summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.repo-add-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; align-items: end; }
@media (max-width: 720px) {
  .repo-row { grid-template-columns: minmax(0, 1fr) auto; }
  .repo-row select { grid-column: 1 / -1; grid-row: 2; }
  .repo-add-grid { grid-template-columns: minmax(0, 1fr); }
}
.repo-title { display: flex; align-items: center; gap: 8px; }
.repo-meta strong .tag { margin-left: 6px; font-weight: 500; }

/* Aba Limites (08/10/2026) */
.limit-card.is-limited { border-color: rgba(251, 191, 36, 0.45); }
.limit-alert { margin: 10px 0; padding: 12px 14px; border-radius: 10px; background: rgba(251, 191, 36, 0.08); display: grid; gap: 4px; }
.limit-alert strong { display: flex; align-items: center; gap: 6px; color: #fcd34d; }
.limit-alert p { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.limit-windows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.limit-window { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.limit-window span { font: 500 11px "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.limit-window strong { font-size: 22px; }
@media (max-width: 560px) { .limit-windows { grid-template-columns: minmax(0, 1fr); } }

/* Vínculo com projeto Lovable (08/10/2026) */
.lovable-link { display: grid; gap: 8px; padding: 10px 14px 4px 38px; }
.lovable-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .lovable-pick { grid-template-columns: minmax(0, 1fr); } }

/* Cota real no topo (08/10/2026) */
.pill .quota { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; font: 500 11px "IBM Plex Mono", monospace; }
.pill .quota + .quota { margin-left: 8px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, 0.12); }
.quota-bar { width: 34px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 99px; background: currentColor; }
.quota.good { color: #6ee7b7; } .quota.warn { color: #fcd34d; } .quota.bad { color: #fb7185; }
.quota b { font-weight: 600; } .quota em { font-style: normal; opacity: 0.7; color: #e5e7ee; }
.pill.limited { border-color: rgba(251, 113, 133, 0.5); }
/* Largura do topo: cota completa só em tela larga; abaixo disso some o tempo e depois a barra */
@media (max-width: 1760px) { .pill .quota em { display: none; } }
@media (max-width: 1480px) { .pill .quota-bar { display: none; } }
@media (max-width: 1180px) { .pill .quota { display: none; } }
.limit-quota { display: grid; gap: 8px; margin: 10px 0; }
.limit-quota-row { display: grid; grid-template-columns: 120px minmax(80px, 1fr) 90px auto; gap: 12px; align-items: center; font-size: 13px; }
.limit-quota-row.good { color: #6ee7b7; } .limit-quota-row.warn { color: #fcd34d; } .limit-quota-row.bad { color: #fb7185; }
.limit-quota-row span, .limit-quota-row small { color: #c9cfdd; }
.quota-bar.wide { width: auto; height: 6px; }
@media (max-width: 560px) { .limit-quota-row { grid-template-columns: 1fr auto; } .limit-quota-row .quota-bar { grid-column: 1 / -1; } }

/* Memória geral (08/10/2026) */
.memory-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.memory-body summary { cursor: pointer; margin-top: 6px; }
.memory-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; padding: 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); font: 12px/1.55 "IBM Plex Mono", monospace; max-height: 360px; overflow: auto; }

/* Várias contas por provedor: a pílula mostra a de mais folga e o mouse abre todas (08/10/2026) */
.pill { position: relative; }
.pill-count { margin-left: 2px; padding: 0 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); font: 600 10px "IBM Plex Mono", monospace; }
.pill-pop { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 270px; padding: 10px 12px; border-radius: 12px; background: rgba(12, 15, 28, 0.97); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); flex-direction: column; gap: 10px; white-space: normal; }
.pill.has-pop:hover .pill-pop, .pill.has-pop:focus-within .pill-pop, .pill.has-pop:focus .pill-pop { display: flex; }
.pop-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
.pop-row strong { color: #e5e7ee; font-size: 12px; }
.pop-row .quota { margin-left: 0; } .pop-row .quota + .quota { margin-left: 0; padding-left: 0; border-left: 0; }
.pop-row .quota-bar, .pop-row .quota em { display: inline-block; }
.pop-row .quota em { color: #aab1c5; }
.pop-flag { color: #fb7185; font: 500 10px "IBM Plex Mono", monospace; }
.pop-row .quota { display: inline-flex; }

/* Chat em tela cheia e passos ao vivo do agente (08/10/2026) */
.workspace-main:has(.chat-pro) { max-width: none; }
.chat-pro { height: calc(100dvh - var(--topbar-h) - 112px); min-height: 520px; }
.message { max-width: min(88%, 1040px); }
.live-row { border-color: rgba(167, 139, 250, 0.35); }
.live-row .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); animation: livepulse 1.2s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: 0.35; } }
.live-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font: 12px/1.45 "IBM Plex Mono", monospace; color: #aab1c5; }
.live-steps li { display: flex; align-items: flex-start; gap: 8px; }
.live-steps li svg { flex: 0 0 auto; margin-top: 2px; opacity: 0.7; }
.live-steps li.now { color: #e5e7ee; }
.activity-done { margin: 2px 0 8px; font-size: 12px; color: #aab1c5; }
.activity-done summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.activity-done ol { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 3px; font: 12px/1.45 "IBM Plex Mono", monospace; max-height: 260px; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .live-row .live-dot { animation: none; } }

/* Botão de recarregar a cota (08/10/2026) */
.pill-refresh { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-1); color: var(--text-2); cursor: pointer; padding: 0; }
.pill-refresh:hover { color: var(--text); border-color: rgba(167, 139, 250, 0.5); }
.pill-refresh:active { transform: scale(0.94); }
.pill-refresh.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pill-refresh.spinning svg { animation: none; opacity: 0.5; } }
.error-row { border-color: rgba(251, 113, 133, 0.45); }

/* Nova empresa: secundário ao lado do Novo projeto, um acento só por tela (22/10/2026) */
.new-company{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:0 14px;border:1px solid var(--line-strong);border-radius:var(--r-field);background:transparent;color:var(--text);font-weight:600;cursor:pointer;transition:transform .12s var(--ease-out)}
.new-company:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){.new-company:hover{background:var(--surface-2)}}

.company-colors{border:0;padding:0;margin:0}
.company-colors legend{font-size:13px;color:var(--text-2);margin-bottom:8px}
.color-row{display:flex;flex-wrap:wrap;gap:4px}
.color-swatch{position:relative;width:44px;height:44px;display:grid;place-items:center;cursor:pointer;border-radius:50%}
.color-swatch input{position:absolute;opacity:0;pointer-events:none}
.color-swatch span{width:28px;height:28px;border-radius:50%;background:var(--c);box-shadow:0 0 0 2px transparent;transition:box-shadow .15s var(--ease-out)}
.color-swatch input:checked+span{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--c)}
.color-swatch input:focus-visible+span{outline:2px solid var(--accent-hi);outline-offset:4px}
/* a regra geral de label do diálogo (flex, gap 10px) tirava a bolinha do centro */
#companyColors .color-swatch{display:grid;place-items:center;place-content:center;gap:0}
.color-swatch:active span{transform:scale(.94)}
.color-swatch span{transition:box-shadow .15s var(--ease-out),transform .12s var(--ease-out)}
/* Cor personalizada: o seletor nativo cobre a bolinha; arco-íris até haver cor */
.color-custom input[type=color]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0;pointer-events:auto}
.color-custom span{background:var(--c);background-image:conic-gradient(from 90deg,#f87171,#fbbf24,#a3e635,#38bdf8,#a5b4fc,#e879f9,#f87171)}
.color-custom.on span{background-image:none;box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--c)}
.color-custom input:focus-visible+span{outline:2px solid var(--accent-hi);outline-offset:4px}
.color-hex{display:flex;align-items:center;gap:10px;margin-top:10px;font-family:var(--mono,ui-monospace,monospace);font-size:11px;text-transform:uppercase;letter-spacing:.16em;color:var(--text-2)}
.color-hex input{width:120px;font-family:var(--mono,ui-monospace,monospace);font-size:13px;letter-spacing:.06em;text-transform:uppercase}
.color-hex input[aria-invalid=true]{border-color:var(--bad,#f87171)}
.color-hex-hint{margin:6px 0 0;min-height:1.2em;font-size:12px;color:var(--bad,#f87171)}
.color-hex-hint:empty{min-height:0}
.company-danger{margin-top:14px;padding-top:14px;border-top:1px solid var(--line);display:grid;gap:8px}
.company-danger-actions{display:flex;gap:8px;flex-wrap:wrap}
.company-danger.hidden,.project-no-company.hidden,.project-fields.hidden,#companyDeleteCancel.hidden{display:none}
.project-fields{display:grid;gap:inherit}
.project-no-company{display:grid;gap:12px;justify-items:start}
.project-no-company p{margin:0;color:var(--text-2)}
@media (prefers-reduced-motion:reduce){.new-company,.color-swatch span{transition:none}}
