/* ===========================================================================
   EL ASISTENTE — estilos
   Blanco como el correo. Azul del tema (--ac). Esquinas 2-3px, nunca
   redondeadas. Botones SÓLIDOS, con fondo, que se vean.
   =========================================================================== */

.mvrail .ag-btn.on { color: #fff; background: var(--ac); }

/* ---- El panel, junto al correo SIN taparlo ---- */
.agente {
  display: none;
  flex: 0 0 408px; min-width: 350px; max-width: 620px;
  background: #fff; border-left: 1px solid #d8e2e8;
  height: 100%; overflow: hidden; position: relative;
}
.agente.on { display: flex; }
.ag-col { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }

/* Pantalla completa: barra lateral + chat ancho */
.mail.agente-pleno .agente { position: absolute; inset: 0; z-index: 40; flex: 1 1 auto; max-width: none; border-left: 0; }
.mail { position: relative; }

/* ---- Barra lateral (solo en pantalla completa) ----
   3 zonas: arriba fijo (nueva + buscador) · lista con SU PROPIO scroll ·
   abajo fijo (atajos + espacio). Con 200 conversaciones lo de abajo NO se cae. */
.ag-lado { display: none; flex: 0 0 244px; border-right: 1px solid #e4ebef; background: #fafcfd;
  padding: 11px 9px 9px; overflow: hidden; flex-direction: column; min-height: 0; }
.agente.pleno .ag-lado { display: flex; }
.ag-lado-top { flex: 0 0 auto; }
.ag-lista { flex: 1 1 auto; min-height: 60px; overflow-y: auto; overflow-x: hidden; margin: 0 -3px; padding: 0 3px; }
.ag-lado-abajo { flex: 0 0 auto; border-top: 1px solid #e4ebef; margin-top: 8px; padding-top: 4px; }

/* Buscador de conversaciones */
.ag-buscar { display: flex; align-items: center; gap: 6px; border: 1px solid #cfdde5; background: #fff;
  border-radius: 2px; padding: 5px 7px; margin: 7px 0 2px; }
.ag-buscar i { color: #7c929c; font-size: 14px; flex: 0 0 auto; }
.ag-buscar input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 12.5px;
  color: #17323d; background: transparent; }
.ag-buscar:focus-within { border-color: var(--ac); }
.ag-buscar button { border: 0; background: transparent; cursor: pointer; color: #7c929c; padding: 0; display: flex; }
.ag-buscar button:hover { color: #c0392b; }

/* Fila de conversación con su botón de quitar */
.ag-conv-fila { display: flex; align-items: center; border-radius: 2px; }
.ag-conv-fila:hover { background: #eaf1f5; }
.ag-conv-fila.on { background: color-mix(in srgb, var(--ac) 13%, #fff); }
.ag-conv-fila.on .ag-conv2 { color: var(--ac); font-weight: 600; }
.ag-conv-x { flex: 0 0 auto; border: 0; background: transparent; cursor: pointer; color: #a8bcc6;
  padding: 4px 6px; display: none; font-size: 13px; }
.ag-conv-fila:hover .ag-conv-x { display: flex; }
.ag-conv-x:hover { color: #c0392b; }
.ag-vermas { display: block; width: 100%; border: 1px solid #cfdde5; background: #fff; border-radius: 2px;
  padding: 6px 9px; margin: 6px 0 2px; font: inherit; font-size: 12px; color: #3d5560; cursor: pointer; }
.ag-vermas:hover { border-color: var(--ac); color: var(--ac); }
.ag-nuevo { display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--ac); color: #fff; border: 0; border-radius: 2px; padding: 9px 12px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: 5px; }
.ag-nuevo:hover { filter: brightness(1.08); }
.ag-sh { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: #7c929c; padding: 11px 8px 4px; }
.ag-conv2, .ag-nav { display: block; width: 100%; text-align: left; background: transparent; border: 0;
  border-radius: 2px; padding: 7px 9px; font: inherit; font-size: 13px; color: #3d5560; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-nav:hover { background: #eaf1f5; }
.ag-nav.on { background: color-mix(in srgb, var(--ac) 13%, #fff); color: var(--ac); font-weight: 600; }
.ag-nav i { margin-right: 6px; color: var(--ac); }
.ag-nav em { float: right; font-style: normal; font-size: 11.5px; color: #7c929c; font-weight: 600; }
.ag-vacio3 { font-size: 12px; color: #9aacb4; padding: 4px 9px; }
.ag-lado-pie { margin-top: auto; padding-top: 12px; }

/* ---- Cabecera ---- */
.ag-head { display: flex; align-items: center; justify-content: space-between;
  padding: 9px 10px 9px 14px; border-bottom: 1px solid #e4ebef; background: #fff; flex: 0 0 auto; }
.ag-tit { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; color: #0d2a35;
  overflow: hidden; }
.ag-tit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-tit i { color: var(--ac); font-size: 17px; flex: 0 0 auto; }
.ag-hbtns { display: flex; gap: 2px; flex: 0 0 auto; }
.ag-ico { width: 28px; height: 28px; border: 0; border-radius: 2px; background: transparent;
  color: #4a6270; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.ag-ico:hover { background: #eef3f6; color: #0d2a35; }
.ag-ico.on { background: var(--ac); color: #fff; }

/* ---- Aviso del 80% del gasto ---- */
.ag-aviso { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12.5px;
  background: #fdf7ea; border-bottom: 1px solid #e8c78a; color: #7a5510; }
.ag-aviso i { color: #a9701f; font-size: 15px; flex: 0 0 auto; }

/* ---- Atajos rápidos ---- */
.ag-quick { display: flex; gap: 6px; padding: 9px 12px; border-bottom: 1px solid #e4ebef;
  background: #f7f9fb; overflow-x: auto; flex: 0 0 auto; }
.ag-qb { white-space: nowrap; border: 1px solid #cfdde5; background: #fff; border-radius: 2px;
  padding: 5px 10px; font: inherit; font-size: 12px; color: #3d5560; cursor: pointer; }
.ag-qb:hover { border-color: var(--ac); color: var(--ac); }
.agente.pleno .ag-quick { padding: 10px 20px; }

/* ---- Cuerpo ---- */
.ag-cuerpo { flex: 1 1 auto; display: flex; min-height: 0; min-width: 0; }
.ag-hilo { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 14px 13px 6px; }
.ag-pagina { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 18px 20px 30px; }

/* El panel de la derecha. En el panel angosto REEMPLAZA al chat (no caben los
   dos); en pantalla completa va SIEMPRE al lado, como la maqueta: 3 columnas. */
.ag-lateral { display: none; flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 12px; background: #fafcfd; }
.agente.lat-abierto .ag-lateral { display: block; }
.agente.lat-abierto .ag-hilo { display: none; }
.agente.pleno .ag-lateral { display: block !important; flex: 0 0 320px;
  border-left: 1px solid #e4ebef; padding: 14px 14px 26px; }
.agente.pleno .ag-hilo { display: block; }
/* El chat NUNCA se puede aplastar: si no caben las 3 columnas, se cae primero
   la de la derecha y luego la de la izquierda. */
.agente.pleno .ag-col { min-width: 420px; }
@media (max-width: 1180px) { .agente.pleno .ag-lateral { display: none !important; } }
@media (max-width: 900px)  { .agente.pleno .ag-lado { display: none !important; } }
.agente.pleno .ag-hilo { padding: 18px 20px 8px; }
.agente.pleno .ag-hilo .ag-msg, .agente.pleno .ag-pie > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.agente.pleno .ag-pagina { max-width: 940px; }

/* ---- Burbujas ---- */
.ag-msg { display: flex; gap: 9px; margin-bottom: 14px; }
.ag-av { width: 24px; height: 24px; border-radius: 2px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; }
.ag-av.me { background: #e0e9ee; color: #4a6270; }
.ag-av.ia { background: var(--ac); color: #fff; }
.ag-bub { border: 1px solid #e6edf1; border-radius: 3px; padding: 10px 12px; min-width: 0; flex: 1 1 auto;
  font-size: 13.5px; background: #fff; }
.ag-yo .ag-bub { background: color-mix(in srgb, var(--ac) 7%, #fff); border-color: color-mix(in srgb, var(--ac) 26%, #fff); }
.ag-tx { color: #17323d; line-height: 1.58; }
.ag-tx b { color: #0d2a35; }

/* ---- Lo que hice ---- */
.ag-pasos { border: 1px solid #e4ebef; border-radius: 2px; overflow: hidden; margin-bottom: 9px; background: #f7f9fb; }
.ag-pasos-h { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid #eef3f6;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #7c929c; background: #fff; }
.ag-pasos-h i { color: var(--ac); font-size: 13px; }
.ag-paso { display: flex; align-items: flex-start; gap: 7px; padding: 6px 10px; font-size: 12.4px;
  color: #3d5560; border-bottom: 1px solid #eef3f6; }
.ag-paso:last-child { border-bottom: 0; }
.ag-paso i { color: #2f7d55; font-size: 14px; flex: 0 0 auto; margin-top: 1px; }
.ag-paso.mal i { color: #c0392b; }
.ag-paso b { font-weight: 600; color: #17323d; }
.ag-det { color: #62808d; }
.ag-api { font-size: 10.5px; color: #7c929c; font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #eef3f6; padding: 1px 5px; border-radius: 2px; margin-left: 5px; }

/* ---- Tabla de vista previa ---- */
.ag-tabla { overflow-x: auto; margin: 9px 0; border: 1px solid #e4ebef; border-radius: 2px; }
.ag-tabla table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.ag-tabla th { background: #f7f9fb; text-align: left; font-weight: 600; color: #3d5560;
  padding: 6px 9px; border-bottom: 1px solid #e4ebef; white-space: nowrap; }
.ag-tabla td { padding: 6px 9px; border-bottom: 1px solid #eef3f6; white-space: nowrap; color: #17323d; }
.ag-tabla tr:last-child td { border-bottom: 0; }
.ag-mas { color: #7c929c !important; font-style: italic; }

/* ---- Tarjeta del archivo ---- */
.ag-file { display: flex; align-items: center; gap: 10px; border: 1px solid #e4ebef; background: #f7f9fb;
  border-radius: 2px; padding: 9px 11px; margin-top: 9px; }
.ag-fi { width: 30px; height: 30px; border-radius: 2px; background: color-mix(in srgb, #2f7d55 13%, #fff);
  color: #2f7d55; display: grid; place-items: center; flex: 0 0 auto; font-size: 16px; }
.ag-fn { min-width: 0; flex: 1 1 auto; }
.ag-fn b { display: block; font-size: 12.6px; color: #17323d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-fn em { font-style: normal; font-size: 11.5px; color: #7c929c; }
.ag-fa { display: flex; gap: 5px; flex: 0 0 auto; }

/* ---- Alerta del guardián ---- */
.ag-alerta { border-radius: 2px; padding: 10px 12px; margin-top: 9px; font-size: 12.6px; }
.ag-alerta.alto { border: 1px solid #e0a99f; background: #fdf1ef; color: #7e2e23; }
.ag-alerta.medio { border: 1px solid #e8c78a; background: #fdf7ea; color: #7a5510; }
.ag-al-t { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 5px; text-transform: capitalize; }
.ag-al-i { line-height: 1.45; margin-top: 3px; }

/* ---- Botones ---- */
.ag-b2 { border: 0; border-radius: 2px; padding: 6px 12px; font: inherit; font-size: 12.2px;
  font-weight: 600; cursor: pointer; background: var(--ac); color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; }
.ag-b2:hover { filter: brightness(1.08); }
.ag-b2.ghost { background: #fff; color: #3d5560; border: 1px solid #cfdde5; }
.ag-b2.ghost:hover { background: #eef3f6; filter: none; }
.ag-b2.ghost.rojo { color: #b23c37; border-color: #e3c3c0; }
.ag-b2.ghost.rojo:hover { background: #fdf1ef; }
.ag-b2:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Confirmación ---- */
.ag-confirm { border: 1px solid #e8c78a; background: #fdf7ea; border-radius: 2px; padding: 11px 12px; }
.ag-confirm.hecho { opacity: .55; pointer-events: none; }
.ag-cf-t { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #8a5d0d; font-size: 12.8px; margin-bottom: 5px; }
.ag-cf-x { font-size: 13.2px; color: #4a3a1c; line-height: 1.5; margin-bottom: 10px; }
.ag-cf-b { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-si, .ag-no { border: 0; border-radius: 2px; padding: 7px 14px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ag-si { background: var(--ac); color: #fff; }
.ag-no { background: #e7edf1; color: #3d5560; }

/* ---- Pensando ---- */
.ag-pensando { display: flex; gap: 4px; padding: 3px 0; }
.ag-pensando span { width: 6px; height: 6px; border-radius: 50%; background: var(--ac); opacity: .35; animation: agp 1.1s infinite; }
.ag-pensando span:nth-child(2) { animation-delay: .18s; }
.ag-pensando span:nth-child(3) { animation-delay: .36s; }
@keyframes agp { 0%,60%,100% { opacity: .28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .ag-pensando span { animation: none; } }

/* ---- Pie ---- */
.ag-pie { flex: 0 0 auto; border-top: 1px solid #e4ebef; padding: 10px 13px 11px; background: #fff; }
.agente.pleno .ag-pie { padding: 12px 20px 16px; }
.ag-caja { border: 1px solid #cfdde5; border-radius: 3px; padding: 7px 10px; background: #fff; }
.ag-caja:focus-within { border-color: var(--ac); }
#agtxt { width: 100%; border: 0; outline: 0; resize: none; font: inherit; font-size: 13.5px;
  line-height: 1.45; max-height: 150px; color: #17323d; background: transparent; }
.ag-barra { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.ag-tool { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 2px;
  border: 1px solid #cfdde5; background: #fff; color: #4a6270; font: inherit; font-size: 12px; cursor: pointer; }
.ag-tool:hover { background: #eef3f6; }
.ag-tool.on { background: #c0392b; color: #fff; border-color: #c0392b; }
.ag-enviar { margin-left: auto; background: var(--ac); color: #fff; border: 0; border-radius: 2px;
  padding: 6px 15px; font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.ag-enviar:hover { filter: brightness(1.08); }
.ag-enviar:disabled { opacity: .5; cursor: default; }
.ag-nota { display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11.4px; color: #7c929c; margin-top: 7px; }

/* ---- Adjuntos ---- */
.ag-files { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.ag-chip { display: inline-flex; align-items: center; gap: 5px; background: #f7f9fb; border: 1px solid #d8e2e8;
  border-radius: 2px; padding: 3px 4px 3px 7px; font-size: 12px; color: #24515f; }
.ag-chip i { color: var(--ac); }
.ag-chip button { border: 0; background: transparent; cursor: pointer; color: #7c929c; padding: 0 2px; display: flex; }
.ag-chip button:hover { color: #c0392b; }

.ag-soltar { display: none; position: absolute; inset: 0; z-index: 50;
  background: color-mix(in srgb, var(--ac) 8%, #fff); border: 2px dashed var(--ac);
  align-items: center; justify-content: center; flex-direction: column; gap: 8px;
  color: var(--ac); font-weight: 600; font-size: 14px; }
.ag-soltar.on { display: flex; }
.ag-soltar i { font-size: 32px; }

/* ===========================================================================
   PÁGINAS: Tareas · Vigilancias · Mis archivos · Lo que ha aprendido
   =========================================================================== */
.ag-carga { font-size: 13px; color: #7c929c; padding: 14px 0; }
.ag-pg-h { margin-bottom: 18px; }
.ag-pg-h h2 { margin: 0 0 3px; font-size: 18px; font-weight: 600; color: #0d2a35; }
.ag-pg-h p { margin: 0; font-size: 13px; color: #62808d; line-height: 1.5; }
.ag-pg-s { margin-bottom: 20px; }
.ag-pg-s h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 9px; font-size: 11.5px;
  font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #7c929c; }
.ag-pg-s h3 i { color: var(--ac); font-size: 14px; }
.ag-vacio2 { font-size: 12.8px; color: #62808d; line-height: 1.55; background: #f7f9fb;
  border: 1px solid #e4ebef; border-radius: 2px; padding: 11px 13px; }
.ag-vacio2 i { color: #46606c; }

.ag-tarea { border: 1px solid #e0e9ee; border-radius: 2px; padding: 11px 13px; margin-bottom: 7px; background: #fff; }
.ag-tarea.off { opacity: .58; }
.ag-t-x b { display: block; font-size: 13.4px; color: #17323d; font-weight: 600; line-height: 1.4; }
.ag-t-x em { font-style: normal; font-size: 11.8px; color: #7c929c; }
.ag-t-r { font-size: 12.2px; color: #62808d; background: #f7f9fb; border-left: 2px solid var(--ac);
  padding: 6px 9px; margin: 8px 0 0; line-height: 1.45; }
.ag-t-b { display: flex; gap: 5px; margin-top: 9px; flex-wrap: wrap; }

/* Una lista grande en preparación (los 165 adjuntos → un Excel).
   Misma caja que una tarea, más la barra de avance. Verde SOLO cuando ya
   quedó lista; el rojo se reserva para lo que salió mal. */
.ag-trab { border: 1px solid #e0e9ee; border-radius: 2px; padding: 11px 13px; margin-bottom: 7px; background: #fff; }
.ag-trab.ok { border-color: color-mix(in srgb, var(--ac) 40%, #e0e9ee); background: color-mix(in srgb, var(--ac) 4%, #fff); }
.ag-bar { height: 5px; background: #eef3f6; border-radius: 2px; margin-top: 9px; overflow: hidden; }
.ag-bar i { display: block; height: 100%; background: var(--ac); border-radius: 2px;
  transition: width .4s ease; }
.ag-mal { color: #b4541f; }

.ag-seg { display: flex; align-items: center; gap: 12px; border: 1px solid #e0e9ee; border-radius: 2px;
  padding: 9px 13px; margin-bottom: 6px; background: #fff; }
.ag-s-d { flex: 0 0 46px; text-align: center; font-size: 20px; font-weight: 700; color: #a9701f; line-height: 1;
  font-variant-numeric: tabular-nums; }
.ag-s-d em { display: block; font-style: normal; font-size: 10.5px; font-weight: 400; color: #7c929c; }
.ag-s-x { flex: 1 1 auto; min-width: 0; }
.ag-s-x b { display: block; font-size: 13px; color: #17323d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-s-x em { font-style: normal; font-size: 11.8px; color: #7c929c; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; display: block; }

.ag-arch2 { display: flex; align-items: center; gap: 10px; border: 1px solid #e0e9ee; border-radius: 2px;
  padding: 9px 12px; margin-bottom: 5px; background: #fff; }
.ag-arch2 > i { color: var(--ac); font-size: 19px; flex: 0 0 auto; }
.ag-a-x { flex: 1 1 auto; min-width: 0; }
.ag-a-x b { display: block; font-size: 13px; color: #17323d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-a-x em { font-style: normal; font-size: 11.5px; color: #7c929c; }

.ag-barra2 { margin-bottom: 12px; }
.ag-b-t { display: flex; justify-content: space-between; font-size: 12px; color: #5f7682; margin-bottom: 4px; }
.ag-b-t b { color: #17323d; font-variant-numeric: tabular-nums; }
.ag-b-r { height: 6px; background: #e4ebef; border-radius: 2px; overflow: hidden; }
.ag-b-r i { display: block; height: 100%; background: var(--ac); border-radius: 2px; }
.ag-b-r i.lleno { background: #c0392b; }

.ag-apr2 { margin: 0; padding-left: 17px; }
.ag-apr2 li { font-size: 13px; color: #3d5560; line-height: 1.5; margin-bottom: 7px; }

/* ---- Panel de la derecha: tarjetas ---- */
.ag-lat-s { margin-bottom: 14px; border: 1px solid #e4ebef; border-radius: 3px; overflow: hidden; background: #fff; }
.ag-lat-s h4 { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .4px; color: #7c929c; margin: 0; font-weight: 700;
  padding: 8px 11px; background: #f7f9fb; border-bottom: 1px solid #e4ebef; }
.ag-lat-s > *:not(h4) { margin-left: 11px; margin-right: 11px; }
.ag-lat-s > *:nth-child(2) { margin-top: 10px; }
.ag-lat-s > *:last-child { margin-bottom: 11px; }
.ag-lat-s h4 i { color: var(--ac); font-size: 14px; }
.ag-vacio { font-size: 12.2px; color: #7c929c; line-height: 1.45; margin: 5px 0 0; }
.ag-watch { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #17323d;
  margin-bottom: 8px; line-height: 1.4; }
.ag-d { width: 6px; height: 6px; border-radius: 50%; background: #2f7d55; margin-top: 6px; flex: 0 0 auto; }
.ag-d.off { background: #9aacb4; }
.ag-ws { font-size: 11.4px; color: #7c929c; }
.ag-apr { margin: 0; padding-left: 15px; }
.ag-apr li { font-size: 12.2px; color: #3d5560; line-height: 1.45; margin-bottom: 5px; }

/* ---- Historial ---- */
.ag-modal { position: fixed; inset: 0; z-index: 300; background: rgba(13,42,53,.42);
  display: flex; align-items: center; justify-content: center; }
.ag-mbox { background: #fff; border-radius: 3px; width: min(460px, 92vw); max-height: 74vh; display: flex; flex-direction: column; }
.ag-mh { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 12px 15px;
  border-bottom: 1px solid #e4ebef; font-weight: 700; color: #0d2a35; font-size: 14px; }
.ag-mlist { overflow-y: auto; padding: 8px; }
.ag-conv { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border: 1px solid #e4ebef; border-radius: 2px; padding: 9px 11px; margin-bottom: 5px;
  cursor: pointer; text-align: left; font: inherit; font-size: 13px; color: #17323d; }
.ag-conv:hover { border-color: var(--ac); background: #f5fafc; }
.ag-conv em { font-style: normal; font-size: 11.5px; color: #7c929c; flex: 0 0 auto; }

/* ---- En celular el asistente NO existe ---- */
@media (max-width: 760px) { .agente, .mvrail .ag-btn { display: none !important; } }

/* ===========================================================================
   PANTALLA DE ADMINISTRACIÓN DEL ASISTENTE
   =========================================================================== */
.agl { padding: 4px 0 30px; position: relative; }
.agl-top { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start;
  background: #fff; border: 1px solid #e0e9ee; border-radius: 3px; padding: 17px 19px; margin-bottom: 16px; }
.agl-num { display: flex; align-items: baseline; gap: 7px; }
.agl-num b { font-size: 38px; font-weight: 700; color: var(--ac); line-height: 1; font-variant-numeric: tabular-nums; }
.agl-num span { font-size: 15px; color: #5f7682; font-variant-numeric: tabular-nums; }
.agl-lbl { font-size: 12.5px; color: #5f7682; margin: 3px 0 10px; }
.agl-bar { height: 7px; background: #e4ebef; border-radius: 2px; overflow: hidden; }
.agl-bar i { display: block; height: 100%; background: var(--ac); border-radius: 2px; }
.agl-bar i.lleno { background: #c0392b; }
.agl-libres { font-size: 12.4px; color: #3d5560; margin-top: 7px; font-weight: 600; }
.agl-info p { font-size: 13px; color: #3d5560; line-height: 1.55; margin: 0 0 7px; }
.agl-info b { color: #0d2a35; }
.agl-cuota { color: #62808d !important; font-size: 12.3px !important; }

/* Indicadores del admin */
.agl-stats { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.agl-stat { border: 1px solid #e0e9ee; background: #fff; border-radius: 3px; padding: 11px 14px; min-width: 158px; flex: 1 1 158px; }
.agl-stat .n { font-size: 22px; font-weight: 600; color: #0d2a35; font-variant-numeric: tabular-nums; line-height: 1.15; }
.agl-stat .n small { font-size: 13px; color: #7c929c; font-weight: 400; }
.agl-stat .l { font-size: 12px; color: #7c929c; margin-top: 2px; }

.agl-super { background: #f5fafc; border: 1px solid #cfdde5; border-radius: 3px; padding: 14px 16px; margin-bottom: 16px; }
.agl-s-h { display: flex; align-items: center; gap: 7px; font-weight: 700; color: #0d2a35; font-size: 13.5px; margin-bottom: 11px; }
.agl-s-h i { color: var(--ac); font-size: 16px; }
.agl-s-h span { font-weight: 400; color: #7c929c; font-size: 12px; }
.agl-s-row { display: grid; grid-template-columns: 1fr 130px 110px 250px; gap: 12px; align-items: center;
  background: #fff; border: 1px solid #e0e9ee; border-radius: 2px; padding: 9px 12px; margin-bottom: 5px; }
.agl-s-n { font-size: 13.3px; font-weight: 600; color: #17323d; }
.agl-s-n em { display: block; font-style: normal; font-size: 11.5px; color: #7c929c; font-weight: 400; }
.agl-s-u, .agl-s-g { font-size: 12.3px; color: #5f7682; font-variant-numeric: tabular-nums; }
.agl-s-e { display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.agl-s-e label { font-size: 12px; color: #5f7682; }
.agl-s-e input { width: 68px; padding: 5px 8px; border: 1px solid #cfdde5; border-radius: 2px;
  font: inherit; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; color: #17323d; }
.agl-s-e input:focus { outline: 0; border-color: var(--ac); }

.agl-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.agl-rows { border: 1px solid #e0e9ee; border-radius: 3px; overflow: hidden; background: #fff; }
.agl-row { display: grid; grid-template-columns: 1fr 150px 150px 92px 110px; gap: 12px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid #eef3f6; }
.agl-row:last-child { border-bottom: 0; }
.agl-row.on { background: color-mix(in srgb, var(--ac) 4%, #fff); }
.agl-p-n { font-size: 13.4px; font-weight: 600; color: #17323d; }
.agl-p-e { font-size: 12.2px; color: #62808d; }
.agl-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 2px; }
.agl-tag.act { background: color-mix(in srgb, var(--ac) 13%, #fff); color: var(--ac); }
.agl-tag.pau { background: #fdf2e3; color: #96690f; }
.agl-tag.no  { background: #f2f5f7; color: #7c929c; }
.agl-tag.nube { background: color-mix(in srgb, #2f7d55 13%, #fff); color: #2f7d55; }
.agl-tag.local { background: #eef3f6; color: #4a6270; }
.agl-gasto { font-size: 12.4px; color: #5f7682; font-variant-numeric: tabular-nums; text-align: right; }
.agl-acc { text-align: right; }
.agl-b { border: 0; border-radius: 2px; padding: 7px 16px; font: inherit; font-size: 12.8px; font-weight: 600; cursor: pointer; }
.agl-b.dar { background: var(--ac); color: #fff; }
.agl-b.dar:hover:not(:disabled) { filter: brightness(1.08); }
.agl-b.quitar { background: #e7edf1; color: #3d5560; }
.agl-b.quitar:hover { background: #dbe4e9; }
.agl-b:disabled { opacity: .45; cursor: not-allowed; }

.agl-nota { border-left: 3px solid var(--ac); background: color-mix(in srgb, var(--ac) 7%, #fff);
  padding: 10px 13px; border-radius: 0 2px 2px 0; font-size: 12.6px; color: #3d5560; margin-top: 14px; }
.agl-nota b { color: #0d2a35; }

.agl-aviso { position: fixed; left: 50%; bottom: -70px; transform: translateX(-50%);
  background: #0d2a35; color: #fff; padding: 11px 20px; border-radius: 3px; font-size: 13px;
  z-index: 400; transition: bottom .22s ease; max-width: 84vw; }
.agl-aviso.on { bottom: 26px; }
.agl-aviso.malo { background: #b23c37; }

@media (max-width: 1100px) {
  .agl-top { grid-template-columns: 1fr; }
  .agl-s-row { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .agl-row { grid-template-columns: 1fr 130px 130px 110px; }
  .agl-gasto { display: none; }
}

/* ---- Panel derecho: resumen de cada cosa con enlace a su pantalla ---- */
.ag-mas2 { margin-left: auto; border: 0; background: transparent; color: var(--ac);
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; text-transform: none;
  letter-spacing: 0; padding: 0; }
.ag-mas2:hover { text-decoration: underline; }
.ag-mini { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; }
.ag-mi { width: 24px; height: 24px; border-radius: 2px; background: #f2f6f8; border: 1px solid #e4ebef;
  display: grid; place-items: center; color: #4a6270; flex: 0 0 auto; font-size: 13px; }
.ag-mi-t { font-size: 12.5px; color: #17323d; line-height: 1.35; }
.ag-lat-s .ag-watch:last-child, .ag-lat-s .ag-mini:last-child { margin-bottom: 0; }

/* ---- Texto del asistente: párrafos, listas y tablas de verdad ---- */
.ag-tx p { margin: 0 0 8px; }
.ag-tx p:last-child { margin-bottom: 0; }
.ag-lista-tx { margin: 4px 0 9px; padding-left: 19px; }
.ag-lista-tx li { margin-bottom: 4px; line-height: 1.5; }
.ag-tx code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  background: #eef3f6; padding: 1px 5px; border-radius: 2px; color: #24515f; }
.ag-tx .ag-tabla { margin: 9px 0; }
.ag-tx .ag-tabla td, .ag-tx .ag-tabla th { white-space: normal; }
.ag-tx .ag-tabla th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; }
.ag-chip-op { font-style: normal; font-size: 10.5px; color: #2f7d55;
  background: color-mix(in srgb, #2f7d55 12%, #fff); padding: 1px 5px; border-radius: 2px; }
