/* ============================================================
   Chat Multi-IA 3.0 — Tema (paleta Violet Studio)
   Deve ser carregado DEPOIS do design system (design.css).
   Direção aprovada: layout sidebar-editorial + paleta violet.
   ============================================================ */
:root {
  --bosia-bg: #0f0b18;
  --bosia-bg-2: #171024;
  --bosia-panel: #201732;
  --bosia-border: #2e2146;
  --bosia-border-2: #3d2c5c;
  --bosia-text: #f0eaff;
  --bosia-muted: #b3a6c9;
  --bosia-accent: #8b5cf6;
  --bosia-ok: #34d399;
  --bosia-fail: #fb7185;
  --bosia-warn: #fbbf24;
  --bosia-radius: 14px;
  --bosia-font: Inter, "Segoe UI", system-ui, sans-serif;

  /* derivados (não substituem os tokens normativos) */
  --bosia-font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --bosia-font-mono: "Cascadia Code", Consolas, monospace;
  --bosia-accent-2: #f472b6;
  --bosia-ring: 0 0 0 3px color-mix(in srgb, var(--bosia-accent) 45%, transparent);
  --bosia-maxw: 1480px;
}

/* Aplicação direta dos tokens no shell */
body {
  background: var(--bosia-bg);
  color: var(--bosia-text);
  font-family: var(--bosia-font);
}

h1, h2, h3, h4, .editorial {
  font-family: var(--bosia-font-serif);
}

/* Ajustes do produto sobre o shell aprovado (sem redesenhar) */
a.nav-item { text-decoration: none; }
a.bosia-btn { text-decoration: none; }
.content-large { max-width: var(--bosia-maxw); }
.ia-order { min-width: 0; }
.ia-order li { padding: 8px 10px; min-width: 0; }
.ia-order li .sel-label {
  display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; min-width: 0;
}
.ia-order li .sel-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--bosia-accent); flex: 0 0 16px;
}
.ia-order li.is-selected {
  border-color: var(--bosia-accent);
  background: rgba(139, 92, 246, 0.10);
}
/* O wrapper do nome precisa poder encolher; sem isto nomes longos expandem o card. */
.ia-order li .sel-label > div { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.ia-order li .sel-label .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-order li .sel-label .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Contenção de largura: grid/flex não podem expandir além do viewport (mobile 360px) */
.split > *, .two-col > *, .chat-layout > *, .kpi-grid > * { min-width: 0; }
.bosia-card, .stack-sm { min-width: 0; }
.table-wrap { max-width: 100%; }

/* Pílulas de participantes com nomes longos não devem estourar a toolbar */
.chat-toolbar { min-width: 0; }
.participants { min-width: 0; max-width: 100%; }
.participants .pill { max-width: 100%; min-width: 0; overflow: hidden; }
.participants .pill-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
