@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #f5f3ee; --surface: #ffffff; --surface-2: #edeae3;
  --border: #d8d3c8; --border-strong: #b7af9e;
  --text: #1b1f23; --text-muted: #6b655a;
  --accent: #b5651d; --accent-soft: rgba(181,101,29,.1); --accent-contrast: #ffffff;
  --ok-fg: #2f7d5b; --ok-bg: rgba(47,125,91,.1);
  --warn-fg: #a9740a; --warn-bg: rgba(169,116,10,.12);
  --crit-fg: #b23a2e; --crit-bg: rgba(178,58,46,.1);
  --info-fg: #3d5a80; --info-bg: rgba(61,90,128,.1);
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-sans: 'Public Sans', -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Archivo', 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(27,31,35,.06);
  --shadow-md: 0 8px 24px rgba(27,31,35,.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#1a1714; --surface:#221e19; --surface-2:#2a251f; --border:#3b342b; --border-strong:#5c5142;
    --text:#f2efea; --text-muted:#a79e8e; --accent:#e08a3c; --accent-soft:rgba(224,138,60,.14); --accent-contrast:#1a1714;
    --ok-fg:#74d3a3; --ok-bg:rgba(116,211,163,.14); --warn-fg:#e0b84a; --warn-bg:rgba(224,184,74,.14);
    --crit-fg:#e88477; --crit-bg:rgba(232,132,119,.14); --info-fg:#8fb2d9; --info-bg:rgba(143,178,217,.14);
  }
}
:root[data-theme="dark"] {
  --bg:#1a1714; --surface:#221e19; --surface-2:#2a251f; --border:#3b342b; --border-strong:#5c5142;
  --text:#f2efea; --text-muted:#a79e8e; --accent:#e08a3c; --accent-soft:rgba(224,138,60,.14); --accent-contrast:#1a1714;
  --ok-fg:#74d3a3; --ok-bg:rgba(116,211,163,.14); --warn-fg:#e0b84a; --warn-bg:rgba(224,184,74,.14);
  --crit-fg:#e88477; --crit-bg:rgba(232,132,119,.14); --info-fg:#8fb2d9; --info-bg:rgba(143,178,217,.14);
}

/* Alto contraste — se combina con claro u oscuro, nunca reemplaza esos bloques. */
:root[data-contrast="high"] {
  --border:#000000; --border-strong:#000000; --text:#000000; --text-muted:#1a1a1a;
  --bg:#ffffff; --surface:#ffffff; --surface-2:#e8e8e8;
  --accent:#7a3300; --accent-soft:#ffe0c2; --accent-contrast:#ffffff;
  --ok-fg:#0a5c2e; --ok-bg:#d9f2e3; --warn-fg:#7a4b00; --warn-bg:#fff0cc;
  --crit-fg:#8a0f00; --crit-bg:#ffd9d3; --info-fg:#0a2f66; --info-bg:#d6e4fa;
}
:root[data-theme="dark"][data-contrast="high"] {
  --border:#ffffff; --border-strong:#ffffff; --text:#ffffff; --text-muted:#e6e6e6;
  --bg:#000000; --surface:#000000; --surface-2:#1a1a1a;
  --accent:#ffb066; --accent-soft:#3d2100; --accent-contrast:#000000;
  --ok-fg:#7fe8a8; --ok-bg:#0f3d24; --warn-fg:#ffd76b; --warn-bg:#3d2f00;
  --crit-fg:#ff9d8f; --crit-bg:#4d130a; --info-fg:#a9c8f2; --info-bg:#122a4d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-contrast="high"] {
    --border:#ffffff; --border-strong:#ffffff; --text:#ffffff; --text-muted:#e6e6e6;
    --bg:#000000; --surface:#000000; --surface-2:#1a1a1a;
    --accent:#ffb066; --accent-soft:#3d2100; --accent-contrast:#000000;
    --ok-fg:#7fe8a8; --ok-bg:#0f3d24; --warn-fg:#ffd76b; --warn-bg:#3d2f00;
    --crit-fg:#ff9d8f; --crit-bg:#4d130a; --info-fg:#a9c8f2; --info-bg:#122a4d;
  }
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family:var(--font-sans); font-size:14px; line-height:1.5; }
a { color: var(--accent); text-decoration:none; }
button { font: inherit; }
h1,h2,h3,h4 { font-family: var(--font-display); }

header.app { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:24px; padding:14px 28px; border-bottom:1px solid var(--border); background:var(--surface); box-shadow:var(--shadow-sm); position:relative; z-index:10; }
.tc-chip { display:flex; align-items:center; gap:10px; background:var(--surface-2); border:1px solid var(--border); border-radius:20px; padding:6px 14px 6px 6px; white-space:nowrap; }
.tc-chip .tc-dot { width:22px; height:22px; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:13px; }
.tc-chip .tc-nums { display:flex; align-items:baseline; gap:10px; font-size:12px; }
.tc-chip .tc-nums .k { font-family:var(--font-mono); font-size:9.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); margin-right:4px; }
.tc-chip .tc-nums b { font-weight:700; font-variant-numeric:tabular-nums; }
.tc-chip .tc-stale { font-size:11px; color:var(--warn-fg); }
.wordmark { display:flex; align-items:center; gap:10px; }
.wordmark .mark { width:36px; height:36px; border-radius:9px; background:var(--accent); color:var(--accent-contrast); display:flex; align-items:center; justify-content:center; font-family:var(--font-display); font-weight:700; font-size:14px; box-shadow:var(--shadow-sm); }
.wordmark .name { display:flex; flex-direction:column; gap:1px; }
.wordmark .name b { font-family:var(--font-display); font-size:14px; font-weight:700; }
.wordmark .name span { font-size:10.5px; color:var(--text-muted); }
.header-right { display:flex; align-items:center; gap:8px; }

/* Pablo, 2026-09-03: "se ve algo desordenado" — el toolbar tenía 6 tratamientos visuales
   distintos (2 íconos, 2 píldoras de texto, un chip, un bloque de cuenta, un link con borde).
   Reordenado en 3 grupos (Acciones / Apariencia / Cuenta) separados por un divisor fino, todos
   los controles sueltos como .icon-btn del mismo tamaño — aprobado sobre mockup en Artifact.
   .icon-btn reemplaza a .notif-bell (mismo aspecto, nombre genérico porque ahora también lo usan
   Tema/Alto contraste/Salir, no solo notificaciones) y a .theme-btn. */
.header-cluster { display:flex; align-items:center; gap:2px; }
.header-divider { width:1px; align-self:stretch; background:var(--border); margin:0 8px; }
.icon-btn { position:relative; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:8px; color:var(--text-muted); background:none; border:none; cursor:pointer; text-decoration:none; font:inherit; }
.icon-btn svg { width:19px; height:19px; }
.icon-btn:hover { background:var(--surface-2); color:var(--text); }
.icon-btn[aria-pressed="true"] { background:var(--accent-soft); color:var(--accent); }
.icon-badge { position:absolute; top:2px; right:2px; min-width:15px; height:15px; padding:0 3px; background:var(--crit-fg); color:#fff; font-size:9.5px; font-weight:700; line-height:15px; text-align:center; border-radius:999px; }
.account { display:flex; align-items:center; gap:9px; padding:2px 4px; }
.account .avatar { width:32px; height:32px; border-radius:50%; background:var(--surface-2); border:1px solid var(--border-strong); display:flex; align-items:center; justify-content:center; font-family:var(--font-mono); font-size:11px; font-weight:600; flex:none; }
.account .who { display:flex; flex-direction:column; line-height:1.28; }
.account .who b { font-size:12.5px; }
.account .who span { font-size:10.5px; color:var(--text-muted); }

/* Chat PIZ IA (comprador) */
.chat-launcher { position:fixed; right:26px; bottom:26px; display:flex; align-items:center; gap:8px; padding:12px 18px; border-radius:999px; background:var(--accent); color:var(--accent-contrast); border:none; box-shadow:var(--shadow-md); cursor:pointer; font-size:13px; font-weight:600; z-index:40; }
.chat-launcher i { font-size:16px; }
.chat-panel { position:fixed; right:26px; bottom:88px; width:340px; max-height:min(560px, 70vh); background:var(--surface); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow-md); display:none; flex-direction:column; overflow:hidden; z-index:40; transition:width .15s ease, height .15s ease, max-height .15s ease; }
.chat-panel.open { display:flex; }
.chat-panel.expanded { width:min(720px, 94vw); height:min(82vh, 780px); max-height:min(82vh, 780px); }
.chat-panel.expanded .chat-body { font-size:15px; }
.chat-head { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--border); background:var(--accent-soft); }
.chat-head .who { display:flex; align-items:center; gap:8px; }
.chat-head .who b { font-family:var(--font-display); font-size:13px; }
.chat-head-actions { display:flex; align-items:center; gap:6px; }
.chat-expand { background:none; border:none; color:var(--text-muted); font-size:15px; cursor:pointer; padding:4px; line-height:1; border-radius:6px; }
.chat-expand:hover { background:var(--surface-2); color:var(--text); }
.chat-expand.active { color:var(--accent); }
.chat-close { border:none; background:none; color:var(--text-muted); font-size:16px; cursor:pointer; line-height:1; padding:2px; }
.chat-body { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; font-size:12.5px; }
.chat-body .msg { max-width:85%; padding:9px 12px; border-radius:12px; line-height:1.5; }
.chat-body .msg.bot { align-self:flex-start; background:var(--surface-2); border-bottom-left-radius:3px; }
.chat-body .msg.user { align-self:flex-end; background:var(--accent); color:var(--accent-contrast); border-bottom-right-radius:3px; }
.chat-body .msg p { margin:0 0 8px; }
.chat-body .msg p:last-child { margin-bottom:0; }
.chat-body .msg ul { margin:2px 0 8px 18px; padding:0; }
.chat-body .msg ul:last-child { margin-bottom:0; }
.chat-body .msg li { margin-bottom:3px; }
.chat-body .msg strong { font-weight:700; }
.chat-body .msg .msg-time { display:block; margin-top:4px; font-size:10px; opacity:.65; }
.chat-body .msg.user .msg-time { text-align:right; }

.ai-text p { margin:0 0 10px; line-height:1.6; }
.ai-text p:last-child { margin-bottom:0; }
.ai-text ul { margin:2px 0 10px 20px; padding:0; }
.ai-text ul:last-child { margin-bottom:0; }
.ai-text li { margin-bottom:5px; }
.ai-text strong { font-weight:700; }
.ai-text img { max-width:100%; height:auto; border-radius:6px; margin:6px 0; display:block; }
.ai-text iframe { max-width:100%; }
.chat-input-row { display:flex; gap:8px; padding:10px; border-top:1px solid var(--border); }
.chat-input-row input[type="text"] { flex:1; border:1px solid var(--border-strong); border-radius:8px; padding:8px 10px; font-size:12.5px; background:var(--surface); color:var(--text); font-family:inherit; }
.chat-input-row button { border:none; background:var(--accent); color:var(--accent-contrast); border-radius:8px; padding:8px 12px; font-weight:600; cursor:pointer; }
.chat-input-row button:disabled { opacity:.6; cursor:default; }

/* Hilo de conversación comprador↔proveedor (Mensajes) — mismo patrón de burbujas que .chat-body,
   generalizado para dos personas reales en vez de bot/usuario. */
.conv-thread { display:flex; flex-direction:column; gap:10px; min-height:140px; max-height:55vh; overflow-y:auto; padding:6px 4px; }
.conv-thread .msg { max-width:72%; padding:9px 12px; border-radius:12px; line-height:1.5; font-size:13px; }
.conv-thread .msg.mine { align-self:flex-end; background:var(--accent); color:var(--accent-contrast); border-bottom-right-radius:3px; }
.conv-thread .msg.other { align-self:flex-start; background:var(--surface-2); border-bottom-left-radius:3px; }
.conv-thread .msg p { margin:0 0 8px; }
.conv-thread .msg p:last-child { margin-bottom:0; }
.conv-thread .msg img { max-width:100%; border-radius:6px; margin:4px 0; }
.conv-thread .msg-time { display:block; margin-top:4px; font-size:10px; opacity:.65; }
.conv-thread .msg.mine .msg-time { text-align:right; }
.conv-thread-empty { color:var(--text-muted); font-size:13px; padding:20px 4px; }
.conv-composer { border-top:1px solid var(--border); margin-top:14px; padding-top:14px; }
.conv-composer-actions { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:10px; }
@media (max-width:480px) { .chat-panel { right:10px; left:10px; width:auto; } .chat-launcher { right:16px; bottom:16px; } }


.shell { display:grid; grid-template-columns:236px 1fr; min-height:calc(100vh - 65px); transition: grid-template-columns .18s ease; position:relative; }
html.sidebar-collapsed .shell { grid-template-columns: 0 1fr; }
html.sidebar-collapsed nav.side { padding:18px 0; overflow:hidden; border-right:none; }
html.sidebar-collapsed nav.side > * { opacity:0; pointer-events:none; }
nav.side { border-right:1px solid var(--border); background:var(--surface); padding:18px 0; }

.side-arrow {
  position:absolute; top:18px; left:236px; transform:translateX(-50%);
  width:26px; height:26px; border-radius:50%; z-index:5;
  border:1px solid var(--border-strong); background:var(--surface); color:var(--text-muted);
  font-size:15px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:left .18s ease;
}
.side-arrow:hover { background:var(--surface-2); color:var(--text); }
html.sidebar-collapsed .side-arrow { left:13px; transform:translateX(-50%) rotate(180deg); box-shadow:0 0 0 3px var(--surface); }
.side-head { padding:0 18px 10px; }
.side-label { font-family:var(--font-mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); }
.nav-item { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 18px; font-size:13.5px; color:var(--text); border-left:2px solid transparent; }
.nav-item:hover { background:var(--surface-2); }
.nav-item.active { border-left-color:var(--accent); background:var(--accent-soft); color:var(--accent); font-weight:600; }
.nav-item.disabled { color:var(--text-muted); opacity:.6; }

main { padding:32px 40px 80px; }
.crumb { font-family:var(--font-mono); font-size:10.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--text-muted); margin-bottom:8px; }
.page-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:24px; flex-wrap:wrap; }
.page-head h1 { font-size:23px; margin:0 0 6px; }
.page-head .sub { font-size:13px; color:var(--text-muted); }

.kpi-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:22px; }
.kpi-row.n3 { grid-template-columns:repeat(3,1fr); }
.kpi-row.n5 { grid-template-columns:repeat(5,1fr); }
@media (max-width:900px) { .kpi-row,.kpi-row.n3,.kpi-row.n5 { grid-template-columns:repeat(2,1fr); } }
@media (max-width:1024px) {
  header.app { grid-template-columns:auto 1fr; padding:12px 16px; gap:10px; }
  header.app > div:nth-child(2) { display:none; }
  .wordmark .name span { display:none; }
  .header-right { flex-wrap:wrap; gap:8px; justify-content:flex-end; }
  .org .who { display:none; }
  main { padding:20px 16px 60px; }
}
.kpi { display:flex; align-items:flex-start; gap:13px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow-sm); padding:16px 18px; transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.kpi:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--accent); }
.kpi-icon { flex:none; width:38px; height:38px; border-radius:10px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; font-size:17px; }
.kpi-body { min-width:0; }
.kpi .label { font-size:11px; color:var(--text-muted); margin-bottom:7px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.kpi .value { font-size:26px; font-weight:700; font-family:var(--font-display); font-variant-numeric:tabular-nums; line-height:1.15; }
.kpi .note { font-size:11.5px; color:var(--text-muted); margin-top:6px; }

.panel { border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow-sm); overflow:hidden; margin-bottom:18px; }
.panel-head { padding:16px 20px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.panel-head h2 { margin:0; font-size:14.5px; }
.panel-body { padding:20px; }
.grid2 { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(280px,420px); gap:18px; align-items:start; }
.grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
@media (max-width:900px) { .grid2,.grid3 { grid-template-columns:1fr; } }
.stack { display:flex; flex-direction:column; gap:18px; }

/* Panel del comprador: Agente de Analítica destacado (no compite con los demás widgets)
   y cuadrícula de widgets independientes (cada uno con tope de filas + "Ver todas"),
   en vez de apilarlos en una sola columna que crece sin fin al agregar más. */
.ai-feature { display:flex; align-items:flex-start; gap:16px; padding:18px 22px; border-radius:12px; background:linear-gradient(135deg, var(--accent-soft), var(--surface) 65%); border:1.5px solid var(--accent); }
.ai-feature-icon { width:40px; height:40px; border-radius:10px; background:var(--accent); color:var(--accent-contrast); display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
.ai-feature-body { flex:1; min-width:0; }
.ai-feature-head { display:flex; align-items:center; gap:9px; margin-bottom:6px; flex-wrap:wrap; }
.ai-feature-head h2 { font-size:14.5px; margin:0; }
.ai-feature p { margin:0 0 10px; font-size:13px; }
.ai-feature .meta { font-size:11px; color:var(--text-muted); margin-bottom:12px; }
.ai-feature .ai-actions { display:flex; gap:8px; }
@media (max-width:600px) { .ai-feature { flex-direction:column; } }

.section-label { display:flex; align-items:baseline; gap:8px; margin:24px 0 12px; }
.section-label h3 { font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); margin:0; font-weight:700; }
.section-label .rule { flex:1; height:1px; background:var(--border); }
.widget-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:18px; align-items:start; margin-bottom:20px; }
.widget-count { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); font-weight:400; }

table { width:100%; border-collapse:collapse; font-size:13px; }
th { text-align:left; font-family:var(--font-mono); font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--text-muted); padding:11px 20px; background:var(--surface-2); border-bottom:1px solid var(--border-strong); white-space:nowrap; }
td { padding:14px 20px; border-bottom:1px solid var(--border); }
tr:last-child td { border-bottom:none; }
.row-link { cursor:pointer; }
.row-link:hover { background:var(--surface-2); }

.chip { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:20px; font-size:11px; font-weight:600; font-family:var(--font-mono); }
.chip.ok { background:var(--ok-bg); color:var(--ok-fg); }
.chip.warn { background:var(--warn-bg); color:var(--warn-fg); }
.chip.crit { background:var(--crit-bg); color:var(--crit-fg); }
.chip.info { background:var(--info-bg); color:var(--info-fg); }
.chip.neutral { background:var(--surface-2); color:var(--text-muted); border:1px solid var(--border); }
.chip::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.chip.plain::before { display:none; }

/* ---- Tarjeta compacta de mensaje de contacto ---- */
.msg-card { border:1px solid var(--border); border-radius:10px; background:var(--surface); box-shadow:var(--shadow-sm); overflow:hidden; }
.msg-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:14px 18px; border-bottom:1px solid var(--border); }
.msg-head h2 { font-family:var(--font-display); font-size:15px; margin:0 0 3px; }
.msg-head .sub { font-size:12px; color:var(--text-muted); font-family:var(--font-mono); }
.msg-badges { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.msg-data { display:grid; grid-template-columns:repeat(4,1fr); }
.msg-data .cell { padding:10px 18px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); }
.msg-data .cell:nth-child(4n) { border-right:none; }
.msg-data .k { font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); margin-bottom:3px; }
.msg-data .v { font-size:13px; font-weight:500; }
.msg-comment { padding:12px 18px; border-bottom:1px solid var(--border); font-size:13px; background:var(--surface-2); }
.msg-comment .k { font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); margin-bottom:4px; }
.msg-actions { display:flex; align-items:flex-end; gap:10px; padding:12px 18px; flex-wrap:wrap; }
.msg-actions .f { display:flex; flex-direction:column; gap:4px; }
.msg-actions .f label { font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); line-height:1; }
.msg-actions select, .msg-actions input[type="text"] { box-sizing:border-box; height:34px; font-family:var(--font-sans); font-size:12.5px; padding:0 10px; border-radius:7px; border:1px solid var(--border-strong); background:var(--surface); color:var(--text); }
.msg-actions .notes { flex:1; min-width:220px; }
.msg-actions .notes input { width:100%; }
.msg-actions button.btn { height:34px; box-sizing:border-box; }
.msg-notes-log { padding:12px 18px; border-bottom:1px solid var(--border); display:flex; flex-direction:column; gap:10px; }
.msg-notes-log > .k { font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); }
.msg-notes-log .note-entry { display:flex; flex-direction:column; gap:2px; padding-left:10px; border-left:2px solid var(--border-strong); }
.msg-notes-log .note-meta { font-family:var(--font-mono); font-size:11px; color:var(--text-muted); }
.msg-notes-log .note-body { font-size:13px; }

.budget-current { padding:16px 20px; }
.budget-cells { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:10px; overflow:hidden; margin-bottom:14px; }
.budget-cells .cell { background:var(--surface); padding:10px 14px; }
.budget-cells .k { font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); margin-bottom:3px; }
.budget-cells .v { font-size:14px; font-weight:700; }
.budget-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.budget-row input, .budget-row select { height:32px; box-sizing:border-box; font-family:inherit; font-size:12.5px; padding:0 9px; border-radius:7px; border:1px solid var(--border-strong); background:var(--surface); color:var(--text); }
.budget-row button.btn { height:32px; box-sizing:border-box; }
@media (max-width:640px) { .budget-cells { grid-template-columns:repeat(2,1fr); } }

@media (max-width:640px) {
  .msg-data { grid-template-columns:repeat(2,1fr); }
  .msg-data .cell:nth-child(4n) { border-right:1px solid var(--border); }
  .msg-data .cell:nth-child(2n) { border-right:none; }
}

/* ---- Wizard tabs (Mi organización) ---- */
.tabbar-wrap { margin-bottom:22px; }
.tabbar { display:flex; align-items:stretch; gap:4px; border-bottom:1px solid var(--border); overflow-x:auto; }
.tab-step {
  display:flex; align-items:center; gap:9px; padding:11px 16px 13px; border:none; background:none; cursor:pointer;
  font-family:var(--font-sans); color:var(--text-muted); white-space:nowrap; border-bottom:2.5px solid transparent; margin-bottom:-1px;
}
.tab-step:hover { color:var(--text); }
.tab-step.active { color:var(--text); border-bottom-color:var(--accent); }
.tab-num {
  flex:none; width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-size:10.5px; font-weight:600; background:var(--surface-2); color:var(--text-muted);
  border:1px solid var(--border-strong);
}
.tab-step.active .tab-num { background:var(--accent); border-color:var(--accent); color:var(--accent-contrast); }
.tab-step.done .tab-num { background:var(--ok-bg); border-color:var(--ok-fg); color:var(--ok-fg); }
.tab-step.done .tab-num::before { content:'✓'; }
.tab-title { font-size:13px; font-weight:600; }
.tab-sep { flex:none; width:1px; align-self:center; height:20px; background:var(--border); margin:0 6px; }
.step-panel { display:none; }
.step-panel.active { display:block; }

.list-simple { list-style:none; margin:0; padding:0; }
.list-simple li { padding:12px 20px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; gap:10px; align-items:center; font-size:13px; }
.list-simple li:last-child { border-bottom:none; }
.lmuted { font-size:11.5px; color:var(--text-muted); }

.btn { font-family:var(--font-sans); font-weight:600; font-size:12.5px; padding:8px 14px; border-radius:8px; border:1px solid var(--border-strong); background:var(--surface); color:var(--text); cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.btn:hover { background:var(--surface-2); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-contrast); }
.btn.accent { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); }
.btn.accent:hover { background:var(--accent); color:var(--accent-contrast); }
.btn.sm { padding:5px 10px; font-size:11.5px; }
.btn.icon { padding:6px; width:30px; height:30px; justify-content:center; }
.btn.icon i { font-size:16px; line-height:1; }

.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
@media (max-width:640px) { .form-grid { grid-template-columns:1fr; } }
.field { display:flex; flex-direction:column; gap:7px; }
.field.full { grid-column:1/-1; }
.field label { font-size:12.5px; font-weight:600; }
input[type=text],input[type=number],input[type=email],input[type=password],input[type=date],input[type=datetime-local],input[type=time],select,textarea {
  border:1px solid var(--border-strong); border-radius:8px; padding:10px 12px; font-family:var(--font-sans); font-size:13.5px; color:var(--text); background:var(--surface); box-sizing:border-box;
}
input:focus,select:focus,textarea:focus { outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
textarea { resize:vertical; min-height:76px; }
/* Pablo, 2026-09-07: "coloca una regla y te vas a dar cuenta" — medido con getBoundingClientRect():
   un <select> con el mismo padding/borde que un <input> igual renderiza ~2px más alto en Chrome
   (metrica nativa del control, no del CSS). Sin esto, cualquier fila que empareje un <input> con un
   <select> (ej. Presupuesto referencial / Moneda) queda con los recuadros de distinta altura. */
select { height:38px; }

.list-search { padding:14px 20px; border-bottom:1px solid var(--border); }
.list-search input { width:100%; max-width:360px; }
.list-search input::placeholder { color:var(--text-muted); }

.scombo { position:relative; }
.scombo-input { width:100%; }
.scombo-menu { display:none; position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:40; max-height:260px; overflow-y:auto; background:var(--surface); border:1px solid var(--border-strong); border-radius:8px; box-shadow:var(--shadow-md); }
.scombo-menu.open { display:block; }
.scombo-group { padding:8px 12px 4px; font-family:var(--font-mono); font-size:10px; letter-spacing:.05em; text-transform:uppercase; color:var(--text-muted); }
.scombo-item { padding:9px 12px; font-size:13.5px; cursor:pointer; }
.scombo-item:hover { background:var(--accent-soft); color:var(--accent); }
.scombo-empty { padding:12px; font-size:13px; color:var(--text-muted); }

.pager { display:flex; align-items:center; gap:12px; padding:14px 20px; border-top:1px solid var(--border); }
.pager button:disabled { opacity:.4; cursor:not-allowed; }

.mu-rows { display:flex; flex-direction:column; gap:10px; margin-bottom:10px; }
.mu-row { display:grid; grid-template-columns:1fr 2fr auto; gap:10px; align-items:stretch; }
@media (max-width:640px) { .mu-row { grid-template-columns:1fr; } }
.mu-name { min-width:0; }
.mu-drop {
  display:flex; align-items:center; justify-content:center; text-align:center; min-width:0;
  border:1.5px dashed var(--border-strong); border-radius:8px; padding:10px 14px;
  font-size:12.5px; color:var(--text-muted); cursor:pointer; background:var(--surface);
}
.mu-drop:hover { border-color:var(--accent); color:var(--accent); }
.mu-drop-over { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.mu-drop-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mu-remove { border:1px solid var(--border-strong); background:var(--surface); color:var(--text-muted); border-radius:8px; width:36px; cursor:pointer; font-size:16px; }
.mu-remove:hover { background:var(--crit-bg); border-color:var(--crit-fg); color:var(--crit-fg); }

.tl-rows { display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.tl-row { display:grid; grid-template-columns:1fr auto; gap:10px; }
.fd-row { display:grid; grid-template-columns:1fr 1.4fr auto; gap:10px; margin-bottom:8px; }
@media (max-width:640px) { .fd-row { grid-template-columns:1fr; } }
.sd-row { display:grid; grid-template-columns:1.3fr 1.7fr 90px 90px 30px; gap:8px; margin-bottom:8px; align-items:center; }
.sd-row.sd-with-flags { grid-template-columns:1fr 1.1fr 172px 172px 85px 85px 75px 65px 30px; }
.sd-row.sd-head { font-size:11px; text-transform:uppercase; letter-spacing:.04em; margin-bottom:4px; }
.sd-row input { border:1px solid var(--border-strong); border-radius:8px; padding:8px 10px; font-family:var(--font-sans); font-size:13px; color:var(--text); background:var(--surface); width:100%; }
.sd-row input[type=checkbox] { width:auto; justify-self:center; }
@media (max-width:720px) { .sd-row { grid-template-columns:1fr; } .sd-row.sd-head { display:none; } }

tr:target, [id]:target { background:var(--accent-soft) !important; scroll-margin-top:90px; }

.doc-item { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 20px; border-bottom:1px solid var(--border); }
.doc-item:last-child { border-bottom:none; }
.doc-item .dname { font-weight:600; font-size:13px; }
.doc-item .dsub { font-size:11.5px; color:var(--text-muted); }
.doc-item.active-row { background:var(--accent-soft); }
.doc-panel { display:none; gap:8px; align-items:center; padding:14px 20px; background:var(--accent-soft); border-bottom:1px solid var(--border); }
.block-label { padding:9px 20px; font-family:var(--font-mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); background:var(--surface-2); border-bottom:1px solid var(--border); border-top:1px solid var(--border); }
.block-label:first-child { border-top:none; }

.progress { height:8px; border-radius:4px; background:var(--surface-2); overflow:hidden; }
.progress > span { display:block; height:100%; background:var(--accent); }

.alert-box { padding:12px 16px; border-radius:8px; font-size:13px; margin-bottom:16px; white-space:pre-wrap; }
.alert-box.ok { background:var(--ok-bg); color:var(--ok-fg); }
.alert-box.crit { background:var(--crit-bg); color:var(--crit-fg); }
.alert-box.warn { background:var(--warn-bg); color:var(--warn-fg); }

.cat-picker { position:relative; }
.cat-picker-input { width:100%; padding:9px 12px; border:1px solid var(--border-strong); border-radius:8px; font-family:var(--font-sans); font-size:13px; background:var(--surface); color:var(--text); }
.cat-picker-input:focus { outline:none; border-color:var(--accent); }
.cat-picker-dropdown { position:absolute; top:calc(100% + 4px); left:0; right:0; background:var(--surface); border:1px solid var(--border-strong); border-radius:8px; box-shadow:var(--shadow-md); max-height:240px; overflow-y:auto; z-index:20; display:none; }
.cat-picker-dropdown.open { display:block; }
.cat-picker-sector { padding:8px 12px 3px; font-family:var(--font-mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); }
.cat-picker-option { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:7px 12px; font-size:13px; color:var(--text); cursor:pointer; }
.cat-picker-option-code { flex:none; font-family:var(--font-mono); font-size:10.5px; color:var(--text-muted); }
.cat-picker-option:hover .cat-picker-option-code, .cat-picker-option.active .cat-picker-option-code { color:inherit; opacity:.75; }
.cat-picker-option:hover, .cat-picker-option.active { background:var(--accent-soft); color:var(--accent); }
.cat-picker-empty { padding:14px 12px; font-size:12px; color:var(--text-muted); }
.cat-picker-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.cat-picker-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 6px 4px 10px; border-radius:99px; background:var(--accent-soft); color:var(--accent); font-size:12px; font-weight:600; }
.cat-picker-chip button { all:unset; display:flex; align-items:center; justify-content:center; width:15px; height:15px; border-radius:50%; font-size:12px; line-height:1; cursor:pointer; }
.cat-picker-chip button:hover { background:rgba(0,0,0,.12); }

/* Tour de bienvenida tipo spotlight — ver initOnboardingTour() en piz.js */
.tour-overlay { position:fixed; inset:0; z-index:1000; }
.tour-highlight { position:fixed; z-index:1001; border-radius:10px; box-shadow:0 0 0 9999px rgba(20,16,10,.68); pointer-events:none; transition:left .2s ease, top .2s ease, width .2s ease, height .2s ease; }
.tour-tooltip { position:fixed; z-index:1002; background:var(--surface); border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow-md); padding:18px; width:280px; transition:left .2s ease, top .2s ease; }
.tour-tooltip h3 { margin:0 0 6px; font-size:14px; font-family:var(--font-display); }
.tour-tooltip p { margin:0 0 14px; font-size:13px; color:var(--text-muted); line-height:1.5; }
.tour-tooltip .tour-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tour-step-count { font-size:11px; color:var(--text-muted); font-family:var(--font-mono); }

.html-editor-expand-link { all:unset; cursor:pointer; display:inline-flex; align-items:center; gap:4px; font-size:11.5px; color:var(--text-muted); }
.html-editor-expand-link:hover { color:var(--accent); }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color:var(--border) !important; }
.ql-toolbar.ql-snow { border-radius:8px 8px 0 0; }
.ql-container.ql-snow { border-radius:0 0 8px 8px; }
.ql-editor { min-height:80px; font-family:var(--font-sans); font-size:13px; }
.ql-editor img { max-width:100%; border-radius:4px; margin:4px 0; }
.ql-editor.ql-blank::before { color:var(--text-muted); font-style:normal; }
.html-editor-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9999; display:flex; align-items:center; justify-content:center; padding:24px; }
.html-editor-modal { background:var(--surface); border-radius:10px; width:min(720px,100%); max-height:85vh; display:flex; flex-direction:column; box-shadow:var(--shadow-md); overflow:hidden; }
.html-editor-modal-head { display:flex; justify-content:space-between; align-items:center; padding:14px 18px; border-bottom:1px solid var(--border); font-weight:600; font-size:14px; }
.html-editor-wrap-expanded { flex:1; display:flex; flex-direction:column; padding:16px 18px; overflow:auto; }
.html-editor-wrap-expanded .ql-container { flex:1; display:flex; flex-direction:column; }
.html-editor-wrap-expanded .ql-editor { flex:1; min-height:300px; }

/* Confirmación con estilo del sitio en vez del confirm() nativo del navegador — ver
   templates/footer.php y assets/js/piz.js (pizConfirm). */
.piz-confirm-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9999; align-items:center; justify-content:center; padding:24px; }
.piz-confirm-overlay.open { display:flex; }
.piz-confirm-box { background:var(--surface); border-radius:10px; width:min(400px,100%); box-shadow:var(--shadow-md); padding:20px; }
.piz-confirm-box p { margin:0 0 18px; font-size:13.5px; line-height:1.5; color:var(--text); }
.piz-confirm-actions { display:flex; justify-content:flex-end; gap:8px; }

/* Modal genérico para formularios cortos (p.ej. "Nuevo ticket") — mismo overlay que
   piz-confirm-overlay pero con caja ancha, header con título+cerrar, y scroll propio si el
   formulario no entra. Pablo, 2026-09-04: "creo q va a tener q ser mejor un modal" — el panel
   colapsable en línea empujaba el resto de la página y quedaba confuso al abrirse/cerrarse. */
.piz-form-modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:9999; align-items:center; justify-content:center; padding:24px; }
.piz-form-modal-box { background:var(--surface); border-radius:10px; width:min(640px,100%); max-height:85vh; display:flex; flex-direction:column; box-shadow:var(--shadow-md); overflow:hidden; }
.piz-form-modal-head { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--border); }
.piz-form-modal-head h2 { margin:0; font-size:15.5px; }
.piz-form-modal-close { background:none; border:none; cursor:pointer; font-size:20px; line-height:1; color:var(--text-muted); padding:2px 4px; }
.piz-form-modal-close:hover { color:var(--text); }
.piz-form-modal-body { padding:20px; overflow:auto; }

/* Paleta de datos (gráficos del panel) — 8 huES categóricos fijos, validados para
   distinguibilidad (incluye daltonismo) en orden fijo — nunca reordenar por serie.
   Ver dataviz skill / palette.md. Claro y oscuro declarados aparte, mismo patrón que
   el resto del tema de PIZ (:root[data-theme] / prefers-color-scheme). */
.viz { color-scheme: light; }
.viz {
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100;
  --viz-5: #e87ba4; --viz-6: #008300; --viz-7: #4a3aa7; --viz-8: #e34948;
  --viz-grid: var(--border); --viz-label: var(--text-muted); --viz-value: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .viz {
    color-scheme: dark;
    --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500;
    --viz-5: #d55181; --viz-6: #008300; --viz-7: #9085e9; --viz-8: #e66767;
  }
}
:root[data-theme="dark"] .viz {
  color-scheme: dark;
  --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500;
  --viz-5: #d55181; --viz-6: #008300; --viz-7: #9085e9; --viz-8: #e66767;
}
.viz-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.viz-grid-3 { grid-template-columns:1fr 1fr 1fr; }
@media (max-width:1100px) { .viz-grid-3 { grid-template-columns:1fr 1fr; } }
@media (max-width:900px) { .viz-grid, .viz-grid-3 { grid-template-columns:1fr; } }
.viz-card { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px 18px; }
.viz-card h3 { margin:0 0 2px; font-size:13.5px; font-family:var(--font-display); }
.viz-card .viz-sub { font-size:11.5px; color:var(--text-muted); margin:0 0 12px; }
.viz-empty { font-size:12.5px; color:var(--text-muted); padding:24px 0; text-align:center; }
.viz-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.viz-bar-row:last-child { margin-bottom:0; }
.viz-bar-label { width:110px; font-size:11.5px; color:var(--viz-label); flex-shrink:0; text-align:right; }
.viz-bar-track { flex:1; background:var(--surface-2); border-radius:4px; height:16px; overflow:hidden; }
.viz-bar-fill { height:100%; border-radius:4px; min-width:2px; }
.viz-bar-value { width:56px; font-size:11.5px; font-weight:600; color:var(--viz-value); font-variant-numeric:tabular-nums; }
.viz-legend { display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:10px; font-size:11.5px; color:var(--viz-label); }
.viz-legend-item { display:flex; align-items:center; gap:6px; }
.viz-legend-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.viz-legend b { color:var(--viz-value); font-variant-numeric:tabular-nums; }

.viz-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.viz-periodo { display:flex; gap:2px; background:var(--surface-2); border-radius:8px; padding:2px; flex-shrink:0; }
.viz-periodo-btn { border:none; background:none; font-family:var(--font-sans); font-size:10.5px; font-weight:600; color:var(--text-muted); padding:5px 8px; border-radius:6px; cursor:pointer; }
.viz-periodo-btn:hover { color:var(--text); }
.viz-periodo-btn.active { background:var(--surface); color:var(--accent); box-shadow:var(--shadow-sm); }
.line-wrap { position:relative; }
.line-tip { position:absolute; pointer-events:none; background:var(--text); color:var(--bg); font-family:var(--font-mono); font-size:11px; padding:5px 8px; border-radius:6px; transform:translate(-50%,-130%); opacity:0; transition:opacity .12s; white-space:nowrap; z-index:5; }
.line-tip.show { opacity:1; }
.viz-ahorro-total { margin-top:8px; padding-top:12px; border-top:1px dashed var(--border); display:flex; justify-content:space-between; align-items:baseline; font-size:11.5px; color:var(--text-muted); }
.viz-ahorro-total b { font-family:var(--font-display); font-size:17px; font-weight:800; color:var(--ok-fg); }

/* --- Centro de notificaciones: ícono + color por tipo (2026-09-02, diseño aprobado por Pablo,
   ver notif_tipo_meta() en lib/helpers.php — mismos íconos/colores acá y en Mi perfil). --- */
.notif-card { padding:0; }
.notif-list { list-style:none; margin:0; padding:0; }
.notif-list li { display:flex; gap:12px; align-items:flex-start; padding:14px 20px; border-bottom:1px solid var(--border); }
.notif-list li:last-child { border-bottom:none; }
.notif-list li.unread { background:var(--accent-soft); }
.notif-icon { width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; font-size:15px; }
.notif-icon.ok { background:var(--ok-bg); color:var(--ok-fg); }
.notif-icon.warn { background:var(--warn-bg); color:var(--warn-fg); }
.notif-icon.crit { background:var(--crit-bg); color:var(--crit-fg); }
.notif-icon.info { background:var(--info-bg); color:var(--info-fg); }
.notif-icon.accent { background:var(--accent-soft); color:var(--accent); }
.notif-icon.neutral { background:var(--surface-2); color:var(--text-muted); }
.notif-body { flex:1; }
.notif-msg { font-size:12.5px; color:var(--text); }
.notif-time { font-size:11px; color:var(--text-muted); margin-top:2px; }
.notif-dot { width:7px; height:7px; border-radius:50%; background:var(--accent); margin-top:6px; flex-shrink:0; }

/* --- Preferencias de notificaciones (Mi perfil), estilo Moodle: tabla + switches. --- */
.pref-table { width:100%; border-collapse:collapse; font-size:13px; }
.pref-table th { text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); padding:8px 12px; border-bottom:1px solid var(--border); font-weight:700; }
.pref-table th.center, .pref-table td.center { text-align:center; }
.pref-table td { padding:12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.pref-table tr:last-child td { border-bottom:none; }
.pref-name { display:flex; align-items:center; font-weight:600; font-size:13px; }
.switch { position:relative; display:inline-block; width:38px; height:22px; }
.switch input { opacity:0; width:0; height:0; position:absolute; }
.switch-track { position:absolute; inset:0; background:var(--surface-2); border:1px solid var(--border-strong); border-radius:999px; cursor:pointer; transition:background .15s, border-color .15s; }
.switch-track::before { content:''; position:absolute; width:16px; height:16px; left:2px; top:2px; background:var(--surface); border-radius:50%; box-shadow:var(--shadow-sm); transition:transform .15s; }
.switch input:checked + .switch-track { background:var(--accent); border-color:var(--accent); }
.switch input:checked + .switch-track::before { transform:translateX(16px); background:#fff; }
.switch input:focus-visible + .switch-track { outline:2px solid var(--accent); outline-offset:2px; }

/* --- Agente de Analítica v2 (2026-09-07): modal de alertas priorizadas, disparado desde el
   ícono con badge del header (.icon-btn/.icon-badge, mismas clases de notificaciones/mensajes).
   Reemplaza al widget del panel que Pablo ocultó el 2026-09-05 por no encontrarle uso — ver
   piz_agente_analitica_generar() en lib/analitica.php. Prefijo .agente- para no chocar con los
   otros overlays del sitio (.piz-confirm-overlay, .piz-form-modal-overlay, .html-editor-modal). */
.agente-overlay { position:fixed; inset:0; background:rgba(20,16,10,.5); display:none; align-items:flex-start; justify-content:center; padding:9vh 20px 20px; z-index:9998; }
.agente-overlay.open { display:flex; }
.agente-modal { background:var(--surface); border-radius:14px; width:min(560px,100%); max-height:80vh; display:flex; flex-direction:column; box-shadow:var(--shadow-md); border:1px solid var(--border); }
.agente-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 22px 16px; border-bottom:1px solid var(--border); }
.agente-head .badge-ai { width:38px; height:38px; border-radius:10px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:18px; }
.agente-title { display:flex; gap:12px; }
.agente-title h2 { font-size:16px; font-weight:700; margin:0; font-family:var(--font-display); }
.agente-title .headline { font-size:12.5px; color:var(--text-muted); margin-top:3px; }
.agente-title .meta { font-size:11px; color:var(--text-muted); font-family:var(--font-mono); margin-top:5px; display:flex; align-items:center; gap:6px; }
.agente-title .meta button { background:none; border:none; color:var(--accent); cursor:pointer; display:inline-flex; align-items:center; gap:3px; font-family:var(--font-mono); font-size:11px; padding:0; }
.agente-close { background:none; border:none; cursor:pointer; color:var(--text-muted); font-size:19px; line-height:1; padding:4px 6px; border-radius:6px; }
.agente-close:hover { background:var(--surface-2); color:var(--text); }
.agente-list { list-style:none; margin:0; padding:6px 0; overflow-y:auto; }
.agente-item { display:flex; gap:12px; align-items:flex-start; padding:13px 22px; border-bottom:1px solid var(--border); }
.agente-item:last-child { border-bottom:none; }
.agente-ic { width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px; font-size:15px; }
.agente-ic.crit { background:var(--crit-bg); color:var(--crit-fg); }
.agente-ic.warn { background:var(--warn-bg); color:var(--warn-fg); }
.agente-ic.ok { background:var(--ok-bg); color:var(--ok-fg); }
.agente-body { flex:1; min-width:0; font-size:13px; }
.agente-body .cta { margin-top:6px; }
.agente-body .cta a { font-size:11.5px; font-weight:600; color:var(--accent); text-decoration:none; font-family:var(--font-mono); }
.agente-body .cta a:hover { text-decoration:underline; }
.agente-empty { padding:30px 22px; text-align:center; color:var(--text-muted); font-size:13px; }
.agente-foot { padding:12px 22px; border-top:1px solid var(--border); font-size:10.5px; color:var(--text-muted); background:var(--surface-2); border-radius:0 0 14px 14px; }
