/* Megane · megane.app · el panel de agentes, vivo (vuelta 12, 21-nov). La hoja de agentes-vivo.js: la réplica del panel en la pestaña
   Agentes (el chat a la izquierda, el Playground a la derecha) que sustituye a las capturas. Es el panel, no la landing: su letra (Onest),
   sus colores (cobalto y lima), sus radios (6 insignias, 8 controles, 12 superficies) y sus tintas, copiados de web/static/app.css y fijos
   en claro, como el panel de muestra de /demo/. Todo va con el prefijo agv- y sus propios tokens (--a-…): no toca nada de la página.
   Movimiento: solo transform y opacity, y lo lleva agentes-vivo.js; aquí no hay ninguna transición. Sin estilos en línea (CSP). */

.agv-app, .agv-flota {
  --a-sup: #FFFFFF; --a-sup-2: #F7F8FC; --a-sup-3: #EDEFF6; --a-sup-4: #E3E6F0;
  --a-linea: #E1E4EE; --a-linea-2: #C9CEDC;
  --a-tinta: #12141F; --a-tinta-2: #424960; --a-tinta-3: #636B80; --a-tinta-4: #8A91A6;
  --a-acento: #2D4BF0; --a-acento-hover: #2440D8; --a-acento-suave: #ECEFFF; --a-acento-suave-2: #D9DFFF; --a-acento-tinta: #2338C8;
  --a-lima: #C8F542; --a-lima-suave: #F2FBD6; --a-lima-tinta: #3A5200; --a-lima-filo: #699000; --a-lima-borde: #9DC214; --a-sobre-lima: #141B00;
  --a-bien: #228700; --a-bien-suave: #DDFAD7; --a-bien-tinta: #007100;
  --a-aviso-tinta: #AD3A00;
  --a-mal: #DE2D45; --a-mal-hover: #C82239; --a-mal-tinta: #C30030;
  --a-sombra-2: 0 1px 3px rgba(18, 20, 31, .06), 0 10px 28px rgba(18, 20, 31, .10);
  --a-sombra-3: 0 4px 12px rgba(18, 20, 31, .08), 0 28px 72px rgba(18, 20, 31, .20);
  color-scheme: light;
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13.5px; line-height: 1.45; font-weight: 400; letter-spacing: 0; text-align: left; color: var(--a-tinta);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
.agv-app *, .agv-flota * { box-sizing: border-box; }
.agv-app button, .agv-app textarea, .agv-flota button { font: inherit; letter-spacing: inherit; color: inherit; }
.agv-app p { margin: 0; }
.agv-app b, .agv-app strong { font-weight: 650; }
.agv-app :focus-visible { outline: 2px solid var(--a-acento); outline-offset: 2px; }
.agv-ico { width: 18px; height: 18px; flex: none; fill: currentColor; }
.agv-oculto { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── el marco: la página lo pone (.captura.agentes-pantalla); dentro, el escenario mide su propio ancho y la réplica se coloca según él ── */
.agv-escenario { container: agv / inline-size; background: #fff; }
.agv-sinjs { width: 100%; height: auto; }
.agv-app { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--a-sup); }
.agv-lat { display: none; }

/* ── el menú lateral (solo en ancho: es el del panel, de adorno) ── */
.agv-lat { flex-direction: column; gap: 1px; min-height: 0; padding: 12px; overflow: hidden; border-right: 1px solid var(--a-linea); font-size: 13px; color: var(--a-tinta-2); user-select: none; }
.agv-marca-m { flex: none; width: 30px; height: 30px; margin: 2px 6px 10px; }
.agv-m-cuerpo { fill: var(--a-acento); }
.agv-m-clave { fill: var(--a-lima); }
.agv-buscar { flex: none; display: flex; align-items: center; gap: 8px; height: 32px; margin-bottom: 8px; padding: 0 8px; border: 1px solid var(--a-linea-2); border-radius: 8px; color: var(--a-tinta-3); }
.agv-buscar .agv-ico { width: 16px; height: 16px; }
.agv-buscar kbd { margin-left: auto; padding: 1px 5px; border: 1px solid var(--a-linea-2); border-radius: 4px; font: inherit; font-size: 10.5px; font-weight: 600; color: var(--a-tinta-2); }
.agv-nav { flex: none; display: flex; align-items: center; gap: 10px; height: 29px; padding: 0 8px; border-radius: 8px; white-space: nowrap; }
.agv-nav .agv-ico { width: 17px; height: 17px; color: var(--a-tinta-3); }
.agv-nav > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.agv-nav-activa { background: var(--a-acento-suave); color: var(--a-acento-tinta); font-weight: 650; }
.agv-nav-activa .agv-ico { color: var(--a-acento); }
.agv-nav-n { display: grid; place-items: center; min-width: 26px; height: 17px; margin-left: auto; padding: 0 6px; border-radius: 999px; background: var(--a-acento); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; }
.agv-nav-n-mal { background: var(--a-mal); }
.agv-nav-n-gris { background: var(--a-sup-4); color: var(--a-tinta-2); }
.agv-nav-g { flex: none; padding: 11px 8px 3px; font-size: 11.5px; color: var(--a-tinta-3); }
.agv-lat-pie { display: flex; flex-direction: column; gap: 1px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--a-linea); }
.agv-yo { display: flex; align-items: center; gap: 9px; padding: 8px 6px 0; }
.agv-yo-n { display: grid; min-width: 0; margin-right: auto; line-height: 1.25; }
.agv-yo-n b { font-size: 12.5px; color: var(--a-tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-yo-n span { font-size: 11.5px; color: var(--a-tinta-3); }
.agv-yo .agv-ico { width: 15px; height: 15px; color: var(--a-tinta-3); }
.agv-avatar { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--a-acento-suave); color: var(--a-acento-tinta); font-size: 10.5px; font-weight: 700; }
.agv-avatar-g { width: 38px; height: 38px; font-size: 13px; }

/* ── el chat ── */
.agv-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-bottom: 1px solid var(--a-linea); }
.agv-chat-cab { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--a-linea); white-space: nowrap; }
.agv-chat-cab > .agv-ico { color: var(--a-tinta-2); }
.agv-chat-cab > .agv-chat-tienda { margin-left: 6px; color: var(--a-tinta-3); }
.agv-chat-cab b { font-size: 14px; }
.agv-chat-punto { color: var(--a-tinta-4); }
.agv-chat-pet { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--a-tinta-3); }
.agv-pgchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 9px; border: 1px solid var(--a-acento-suave-2); border-radius: 8px; background: var(--a-acento-suave); color: var(--a-acento-tinta); font-size: 13px; font-weight: 600; }
.agv-pgchip .agv-ico { width: 15px; height: 15px; }
.agv-pgchip i { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 999px; background: var(--a-acento); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; }
.agv-hilo { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px; }
.agv-msg { max-width: 100%; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.agv-msg-yo { align-self: flex-end; max-width: 92%; padding: 8px 12px; border-radius: 12px 12px 6px 12px; background: var(--a-acento); color: #fff; font-weight: 500; }
.agv-msg-ia { align-self: flex-start; }
.agv-pastilla { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 32px; padding: 5px 12px; border: 1px solid var(--a-lima-borde); border-radius: 999px; background: var(--a-lima-suave); font-size: 13px; }
.agv-pastilla .agv-ico { width: 16px; height: 16px; color: var(--a-lima-tinta); }
.agv-pastilla-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.agv-pastilla-e { flex: none; color: var(--a-tinta-3); }
.agv-pastilla-hecha, .agv-pastilla-fuera { border-color: var(--a-linea-2); background: var(--a-sup); }
.agv-pastilla-hecha .agv-ico { box-sizing: content-box; padding: 2px; border-radius: 50%; background: var(--a-lima); color: var(--a-sobre-lima); }
.agv-pastilla-fuera .agv-ico { color: var(--a-tinta-3); }
.agv-pastilla-fuera .agv-pastilla-t { font-weight: 500; color: var(--a-tinta-2); }
/* lo que se puede pedir: en estrecho va plegado tras «Pedir otra cosa»; en ancho, siempre a la vista y abajo del todo */
.agv-plegar { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 16px; border: 0; border-top: 1px solid var(--a-linea); background: var(--a-sup-2); color: var(--a-acento-tinta); font-size: 13.5px; font-weight: 650; text-align: left; cursor: pointer; }
.agv-plegar .agv-ico { width: 16px; height: 16px; }
.agv-chat.agv-abierto .agv-plegar .agv-ico { transform: rotate(180deg); }
.agv-otras { display: none; padding: 14px 16px 16px; }
.agv-chat.agv-abierto .agv-otras { display: block; }
.agv-sug-t { margin: 0 0 8px; font-size: 12px; color: var(--a-tinta-3); }
.agv-sug-lista { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.agv-sug { min-height: 32px; padding: 5px 11px; border: 1px solid var(--a-linea-2); border-radius: 999px; background: var(--a-sup); color: var(--a-tinta-2); font-size: 12.5px; line-height: 1.3; text-align: left; cursor: pointer; }
.agv-campo { padding: 12px 10px 10px 14px; border: 1.5px solid var(--a-acento); border-radius: 12px; box-shadow: 0 0 0 3px var(--a-acento-suave); }
.agv-campo-t { display: block; min-height: 22px; font-size: 14px; line-height: 22px; color: var(--a-tinta-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-campo-vivo .agv-campo-t { color: var(--a-tinta); }
.agv-campo-pie { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.agv-modelo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--a-tinta-2); }
.agv-modelo .agv-ico { width: 13px; height: 13px; }
.agv-enviar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #A7B4F9; color: #fff; }
.agv-campo-vivo .agv-enviar { background: var(--a-acento); }

/* ── el Playground ── */
.agv-pg { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--a-sup); }
.agv-pg-cab { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--a-linea); box-shadow: inset 0 -3px 0 var(--a-lima); }
.agv-pg-cab strong { display: block; font-size: 14px; line-height: 18px; }
.agv-pg-sub { display: block; font-size: 12px; line-height: 16px; font-weight: 650; color: var(--a-lima-tinta); }
.agv-pg-x { color: var(--a-tinta-3); }
.agv-pg-cerrado .agv-pg-cab { box-shadow: none; }
.agv-pg-cerrado .agv-pg-sub { font-weight: 400; color: var(--a-tinta-3); }
.agv-pg-cuerpo { container: agvpg / inline-size; flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 14px 10px 16px; }
.agv-pg-titulo { display: flex; align-items: flex-start; gap: 8px; }
.agv-pg-ico { flex: none; display: grid; margin-top: 1px; color: var(--a-tinta-2); }
.agv-pg-t { display: block; font-size: 14.5px; line-height: 20px; }
.agv-pg-t:focus-visible { outline-offset: 4px; border-radius: 4px; }
.agv-pg-nota { display: block; font-size: 12.5px; color: var(--a-tinta-3); }
.agv-pg-nota:empty { display: none; }
.agv-pg-escena { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.agv-pista { font-size: 12.5px; line-height: 18px; color: var(--a-tinta-3); }
.agv-pg-pie { flex: none; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 12px; min-height: 60px; padding: 10px 10px 12px; border-top: 1px solid var(--a-linea); }
.agv-pie-res { min-width: 0; font-size: 13px; line-height: 20px; color: var(--a-tinta-2); }
.agv-pie-res strong { color: var(--a-tinta); }
.agv-pie-mal { margin-left: 10px; color: var(--a-mal-tinta); white-space: nowrap; }
.agv-pie-acc { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.agv-pie-fin { display: flex; align-items: flex-start; gap: 9px; min-width: 0; flex: 1 1 240px; }
.agv-pie-fin > .agv-ico { width: 20px; height: 20px; margin-top: 1px; color: var(--a-bien); }
.agv-pie-fin-no > .agv-ico { color: var(--a-tinta-3); }
.agv-pie-fin strong { display: block; font-size: 13.5px; line-height: 20px; }
.agv-demo { display: block; font-size: 12.5px; line-height: 18px; color: var(--a-tinta-3); }

/* botones del panel */
.agv-b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font-size: 13.5px; font-weight: 650; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
.agv-b .agv-ico { width: 16px; height: 16px; }
.agv-app .agv-b-primario { background: var(--a-acento); color: #fff; box-shadow: 0 1px 2px rgba(18, 20, 31, .12), 0 6px 14px -4px rgba(45, 75, 240, .45); }
.agv-app .agv-b-peligro { background: var(--a-mal); color: #fff; }
.agv-app .agv-b-liso { color: var(--a-acento-tinta); }
.agv-app .agv-b-suave { background: var(--a-acento-suave); color: var(--a-acento-tinta); }
.agv-b-chico { min-height: 36px; padding: 0 12px; font-size: 13px; }
.agv-b:disabled { opacity: .45; box-shadow: none; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .agv-b { min-height: 36px; }
  .agv-b-chico { min-height: 32px; }
  .agv-app .agv-b-primario:hover:not(:disabled) { background: var(--a-acento-hover); }
  .agv-app .agv-b-peligro:hover:not(:disabled) { background: var(--a-mal-hover); }
  .agv-app .agv-b-liso:hover, .agv-app .agv-b-suave:hover { background: var(--a-acento-suave-2); }
  .agv-sug:hover { border-color: var(--a-acento); background: var(--a-acento-suave); color: var(--a-acento-tinta); }
  .agv-plegar:hover { background: var(--a-acento-suave); }
}
@media (pointer: coarse) { .agv-sug { min-height: 40px; padding-inline: 13px; } }

/* ── 1 · Programación: la rejilla de horas × cuentas ── */
.agv-rej-marco { border: 1px solid var(--a-linea); border-radius: 8px; overflow: hidden; }
.agv-rej { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 11.5px; user-select: none; -webkit-user-select: none; }
.agv-rej th, .agv-rej td { height: 26px; padding: 0; border-right: 1px solid var(--a-linea); border-bottom: 1px solid var(--a-linea); vertical-align: top; text-align: left; font-weight: 400; }
.agv-rej tr > :last-child { border-right: 0; }
.agv-rej tfoot th, .agv-rej tfoot td { border-bottom: 0; }
.agv-rej thead th { padding: 5px 5px; background: var(--a-sup-2); font-weight: 650; color: var(--a-tinta-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-rej tbody th { padding: 5px 5px; background: var(--a-sup-2); font-weight: 500; color: var(--a-tinta-3); font-variant-numeric: tabular-nums; }
.agv-rej .agv-rej-h { width: 42px; }
.agv-rej thead .agv-rej-n { width: 38px; }
.agv-rej .agv-rej-n { padding: 5px 6px 5px 2px; text-align: right; font-weight: 650; color: var(--a-tinta-2); font-variant-numeric: tabular-nums; }
.agv-rej tfoot th, .agv-rej tfoot td { padding: 5px 5px; background: var(--a-sup-2); font-weight: 650; color: var(--a-tinta); font-variant-numeric: tabular-nums; }
.agv-rej tfoot .agv-rej-n { padding-right: 6px; }
.agv-rej .agv-hueco { padding: 2px; }
.agv-cita { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 5px; align-items: center; width: 100%; margin: 0; padding: 3px 4px 3px 3px; border: 1px solid var(--a-lima-borde); border-radius: 6px; background: var(--a-lima-suave); color: var(--a-tinta); text-align: left; cursor: grab; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.agv-cita + .agv-cita { margin-top: 2px; }
.agv-app .agv-cita-foto, .agv-flota .agv-cita-foto { grid-row: 1; width: 22px; height: 22px; max-width: none; border-radius: 4px; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.agv-cita-h { font-size: 11.5px; font-weight: 700; line-height: 14px; font-variant-numeric: tabular-nums; }
.agv-cita-t { grid-column: 1 / -1; grid-row: 2; min-width: 0; margin-top: 2px; font-size: 10.5px; line-height: 13px; color: var(--a-tinta-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* en estrecho no cabe la marca de «programado» junto a la hora: lo dice el relleno lima de la tarjeta */
.agv-cita-ok { display: none; grid-column: 3; color: var(--a-lima-tinta); }
.agv-cita[aria-pressed="true"] { border-color: var(--a-acento); background: var(--a-sup); box-shadow: 0 0 0 2px var(--a-acento), var(--a-sombra-2); }
.agv-cita.agv-origen { opacity: .3; }
.agv-cita-hecha { border-color: var(--a-lima-filo); background: var(--a-lima); }
.agv-cita:disabled { color: var(--a-tinta); cursor: default; }
/* descartada la propuesta, los anuncios siguen a la vista y sin programar: como una carta sin marcar (blanca, con el filo gris), de trazos */
.agv-rej-fuera .agv-cita { border-color: var(--a-linea-2); border-style: dashed; background: var(--a-sup); }
.agv-eligiendo .agv-hueco, .agv-eligiendo .agv-cita { cursor: pointer; }
.agv-eligiendo .agv-hueco:empty { background-image: radial-gradient(circle, var(--a-linea-2) 1.5px, transparent 2px); background-size: 100% 100%; background-repeat: no-repeat; }
.agv-hueco.agv-sobre { background: var(--a-acento-suave); box-shadow: inset 0 0 0 2px var(--a-acento); }
.agv-arrastrando, .agv-arrastrando .agv-cita { cursor: grabbing; }
.agv-vuela { position: relative; z-index: 2; }
.agv-vuela-alta { z-index: 3; }
@media (hover: hover) and (pointer: fine) { .agv-eligiendo .agv-hueco:hover { background-color: var(--a-acento-suave); box-shadow: inset 0 0 0 2px var(--a-acento); } }
/* lo que va en la mano mientras se arrastra: fuera del marco, pegado al puntero */
.agv-flota { position: fixed; left: 0; top: 0; z-index: 2147483000; width: 0; height: 0; pointer-events: none; }
.agv-fantasma { position: fixed; left: 0; top: 0; margin: 0; box-shadow: var(--a-sombra-3); cursor: grabbing; pointer-events: none; will-change: transform; }

/* ── 2, 3 y 6 · las cartas de anuncio con su casilla ── */
.agv-fila { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.agv-fila-t { font-size: 13px; color: var(--a-tinta-2); }
.agv-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--a-linea); border-radius: 8px; background: var(--a-sup-2); }
.agv-seg-op { position: relative; display: block; cursor: pointer; }
.agv-seg-r { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.agv-seg-op span { display: grid; place-items: center; min-width: 58px; min-height: 34px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 650; color: var(--a-tinta-2); font-variant-numeric: tabular-nums; }
.agv-seg-r:checked + span { background: var(--a-sup); color: var(--a-tinta); box-shadow: 0 0 0 1px var(--a-linea-2), 0 1px 2px rgba(18, 20, 31, .06); }
.agv-seg-r:focus-visible + span { outline: 2px solid var(--a-acento); outline-offset: 2px; }
.agv-seg-r:disabled + span { cursor: default; }
.agv-seg-r:disabled:not(:checked) + span { opacity: .45; }
.agv-cartas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.agv-carta { position: relative; display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 5px 5px 8px; border: 1px solid var(--a-linea-2); border-radius: 10px; background: var(--a-sup); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.agv-carta.agv-si { border-color: var(--a-lima-borde); background: var(--a-lima-suave); }
.agv-cerradas .agv-carta { cursor: default; }
.agv-carta-foto { position: relative; display: block; margin-bottom: 6px; border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: var(--a-sup-3); }
.agv-cartas-altas .agv-carta-foto { aspect-ratio: 4 / 5; }
.agv-app .agv-carta-foto img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.agv-carta:not(.agv-si) .agv-carta-foto img { opacity: .55; }
.agv-quedan .agv-carta .agv-carta-foto img { opacity: 1; }
.agv-quedan .agv-carta .agv-carta-t { color: var(--a-tinta); }
.agv-casilla { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.agv-marca { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--a-linea-2); border-radius: 6px; background: var(--a-sup); color: transparent; }
.agv-marca .agv-ico { width: 14px; height: 14px; }
.agv-casilla:checked + .agv-marca { border-color: #fff; background: var(--a-acento); color: #fff; box-shadow: 0 0 0 1px rgba(18, 20, 31, .12); }
.agv-casilla:focus-visible + .agv-marca { outline: 2px solid var(--a-acento); outline-offset: 2px; }
.agv-cerradas .agv-marca { display: none; }
.agv-cerradas .agv-casilla { cursor: default; }
.agv-carta-t { padding: 0 3px; font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-carta-c { padding: 0 3px; font-size: 12px; line-height: 16px; font-weight: 650; color: var(--a-acento-tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-carta-p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; padding: 3px 3px 0; font-size: 14px; line-height: 19px; font-variant-numeric: tabular-nums; }
.agv-carta-p s { font-size: 12px; color: var(--a-tinta-3); }
.agv-carta-p b { font-weight: 700; }
.agv-carta-p .agv-igual { font-weight: 500; color: var(--a-tinta-2); }
.agv-flecha { color: var(--a-tinta-3); }
.agv-carta:not(.agv-si) .agv-carta-t { color: var(--a-tinta-2); }
.agv-carta-e { display: flex; align-items: center; gap: 4px; padding: 1px 3px 0; font-size: 12px; line-height: 16px; color: var(--a-tinta-3); }
.agv-carta-e .agv-ico { width: 13px; height: 13px; }
.agv-renovada .agv-carta-e { color: var(--a-lima-tinta); font-weight: 650; }
.agv-etq { padding: 0 6px; border-radius: 6px; font-size: 11.5px; line-height: 18px; font-weight: 650; }
.agv-etq-bien { background: var(--a-bien-suave); color: var(--a-bien-tinta); }
.agv-sello { position: absolute; left: 7px; top: 7px; max-width: calc(100% - 14px); padding: 1px 7px; border-radius: 6px; background: var(--a-lima); color: var(--a-sobre-lima); font-size: 11px; line-height: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-vacio { padding: 28px 16px; border: 1px dashed var(--a-linea-2); border-radius: 10px; text-align: center; color: var(--a-tinta-3); }

/* ── 4 · Mensajes ── */
.agv-men { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.agv-men-lista { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.agv-men-q { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 48px; padding: 6px 8px; border: 1px solid var(--a-linea); border-radius: 8px; background: var(--a-sup); text-align: left; cursor: pointer; touch-action: manipulation; }
.agv-men-q[aria-pressed="true"] { border-color: var(--a-linea-2); background: var(--a-sup-2); box-shadow: inset 0 0 0 1px var(--a-linea-2); }
.agv-men-q .agv-avatar { display: none; }
.agv-men-n { display: grid; min-width: 0; line-height: 1.3; }
.agv-men-n b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-men-e { font-size: 12px; color: var(--a-tinta-3); transform-origin: 0 50%; }
.agv-men-ok { font-weight: 650; color: var(--a-bien-tinta); }
.agv-conv { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.agv-conv-cab { display: flex; align-items: center; gap: 10px; }
.agv-conv-cab > div, .agv-conv-prenda > div { display: grid; min-width: 0; line-height: 1.35; }
.agv-conv-cab b { font-size: 14px; }
.agv-conv-cab span, .agv-conv-prenda span { font-size: 12.5px; color: var(--a-tinta-3); }
.agv-conv-prenda { display: flex; align-items: center; gap: 10px; }
.agv-app .agv-conv-prenda img { flex: none; width: 40px; height: 40px; max-width: none; border-radius: 6px; object-fit: cover; }
.agv-conv-prenda b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agv-conv-hilo { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--a-linea); border-radius: 12px; }
.agv-dia { align-self: center; font-size: 12px; color: var(--a-tinta-3); }
.agv-burb { max-width: 86%; padding: 7px 11px 6px; border-radius: 12px; background: var(--a-sup-3); font-size: 13.5px; line-height: 20px; overflow-wrap: anywhere; }
.agv-burb small { display: block; margin-top: 1px; font-size: 11px; line-height: 15px; text-align: right; color: var(--a-tinta-3); }
.agv-burb-ella { align-self: flex-start; border-bottom-left-radius: 4px; }
.agv-burb-yo { align-self: flex-end; border-bottom-right-radius: 4px; }
.agv-burb-nueva { border: 1px solid var(--a-lima-filo); background: var(--a-lima-suave); transform-origin: 100% 100%; }
.agv-burb-nueva small { font-weight: 650; color: var(--a-lima-tinta); }
.agv-borrador { align-self: flex-end; width: min(100%, 440px); padding: 10px 10px 10px 12px; border: 1.5px dashed var(--a-lima-filo); border-radius: 12px 12px 4px 12px; background: var(--a-lima-suave); }
.agv-borrador:focus-within { border-style: solid; box-shadow: 0 0 0 3px rgba(105, 144, 0, .16); }
.agv-app .agv-borrador-t { display: block; width: 100%; min-height: 40px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; resize: none; overflow: hidden; font-size: 13.5px; line-height: 20px; color: var(--a-tinta); outline: 0; }
/* en el teléfono, a 16 px: con menos, iOS amplía la página al tocar el texto */
@media (pointer: coarse) { .agv-app .agv-borrador-t { font-size: 16px; line-height: 22px; } }
.agv-borrador-pie { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--a-lima-tinta); }
.agv-borrador-pie .agv-b { margin-left: auto; }

/* ── 5 · Fichas ── */
.agv-fichas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
.agv-ficha { display: flex; flex-direction: column; min-width: 0; padding: 8px 10px 2px 8px; border: 1px solid var(--a-lima-borde); border-radius: 10px; background: var(--a-lima-suave); }
.agv-ficha-cab { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; }
.agv-app .agv-ficha-cab img { flex: none; width: 64px; height: 80px; max-width: none; border-radius: 6px; object-fit: cover; }
.agv-ficha-cab > div { display: grid; gap: 1px; min-width: 0; }
.agv-ficha-p { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; transform-origin: 0 50%; justify-self: start; }
.agv-ficha-t { font-size: 13.5px; line-height: 19px; transform-origin: 0 50%; overflow-wrap: anywhere; }
.agv-ficha-s { font-size: 12px; color: var(--a-tinta-3); }
.agv-cambio { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 9px 0 10px; border-top: 1px solid rgba(105, 144, 0, .28); }
.agv-cambio-k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--a-tinta-3); }
.agv-cambio-v { grid-column: 1 / -1; display: grid; gap: 3px; min-width: 0; font-size: 13px; line-height: 19px; }
.agv-antes { color: var(--a-tinta-3); text-decoration: line-through; overflow-wrap: anywhere; }
.agv-despues { display: flex; align-items: baseline; gap: 6px; font-weight: 600; color: var(--a-acento-tinta); overflow-wrap: anywhere; }
.agv-despues > span:last-child { min-width: 0; text-decoration: underline; text-decoration-color: rgba(35, 56, 200, .4); text-underline-offset: 3px; }
.agv-cambio-aviso { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 17px; color: var(--a-aviso-tinta); }
.agv-cambio-aviso .agv-ico { width: 14px; height: 14px; margin-top: 1px; }
.agv-cambio-no .agv-antes { color: var(--a-tinta); text-decoration: none; }
.agv-cambio-no .agv-despues { font-weight: 400; color: var(--a-tinta-3); }
.agv-cambio-no .agv-despues > span:last-child { text-decoration: line-through; text-decoration-color: currentColor; }
.agv-cambio-no .agv-cambio-aviso { display: none; }
.agv-dec { display: inline-flex; border: 1px solid var(--a-linea-2); border-radius: 8px; background: var(--a-sup); overflow: hidden; }
.agv-dec-b { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 10px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--a-tinta-2); cursor: pointer; touch-action: manipulation; }
.agv-dec-b + .agv-dec-b { border-left: 1px solid var(--a-linea-2); }
.agv-dec-b .agv-ico { width: 14px; height: 14px; }
.agv-dec-b[aria-pressed="true"] { background: var(--a-sup-3); color: var(--a-tinta); }
.agv-dec-b:first-child[aria-pressed="true"] { background: var(--a-acento-suave); color: var(--a-acento-tinta); font-weight: 700; }
.agv-dec-b:focus-visible { outline-offset: -2px; border-radius: 7px; }
.agv-dec-fin { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; font-size: 12.5px; color: var(--a-tinta-3); transform-origin: 100% 50%; }
.agv-dec-ok { font-weight: 650; color: var(--a-bien-tinta); }
.agv-dec-fin .agv-ico { width: 14px; height: 14px; }
.agv-cambio-ok .agv-antes, .agv-cambio-fuera .agv-despues { display: none; }
.agv-cambio-ok .agv-despues { font-weight: 500; color: var(--a-tinta); }
.agv-cambio-ok .agv-despues .agv-flecha { display: none; }
.agv-cambio-ok .agv-despues > span:last-child { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .agv-dec-b { min-height: 28px; } .agv-dec-b[aria-pressed="false"]:hover { background: var(--a-sup-2); color: var(--a-tinta); } }

/* ── según el ancho del Playground ── */
/* el teléfono más estrecho (320 px): la hora de la tarjeta tiene que caber entera junto a su foto */
@container agvpg (max-width: 329px) {
  .agv-rej .agv-rej-h { width: 38px; }
  .agv-rej thead th, .agv-rej tbody th, .agv-rej tfoot th, .agv-rej tfoot td { padding-inline: 4px; }
  .agv-rej .agv-hueco { padding: 1px; }
  .agv-cita { grid-template-columns: 18px minmax(0, 1fr); column-gap: 4px; padding: 2px 2px 2px 2px; }
  .agv-app .agv-cita-foto { width: 18px; height: 18px; }
  .agv-cita-h { font-size: 11px; }
}
@container agvpg (min-width: 400px) {
  .agv-cartas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agv-cartas-altas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .agv-rej { font-size: 12px; }
  .agv-rej .agv-rej-h { width: 50px; }
  .agv-rej thead .agv-rej-n { width: 44px; }
  .agv-rej th, .agv-rej td { height: 27px; }
  .agv-rej thead th, .agv-rej tbody th, .agv-rej tfoot th, .agv-rej tfoot td { padding-inline: 8px; }
  .agv-rej .agv-rej-n, .agv-rej tfoot .agv-rej-n { padding-right: 8px; }
  .agv-rej .agv-hueco { padding: 3px; }
  .agv-cita { grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 8px; padding: 4px 8px 4px 4px; }
  .agv-app .agv-cita-foto, .agv-flota .agv-cita-foto { grid-row: 1 / 3; width: 30px; height: 30px; }
  .agv-cita-h { font-size: 12.5px; line-height: 15px; align-self: end; }
  .agv-cita-t { grid-column: 2; margin-top: 0; font-size: 11.5px; line-height: 14px; align-self: start; }
  .agv-cita-ok { display: block; grid-row: 1 / 3; width: 16px; height: 16px; }
  .agv-men-q .agv-avatar { display: grid; }
}
@container agvpg (min-width: 560px) {
  .agv-cartas { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .agv-men { grid-template-columns: 172px minmax(0, 1fr); gap: 16px; }
  .agv-men-lista { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; }
  .agv-men-q { border-color: transparent; }
  .agv-fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
/* la tarjeta que va en la mano es un clon fuera del Playground: toma el aspecto ancho cuando la pantalla lo es */
@media (min-width: 560px) {
  .agv-flota .agv-cita { grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 8px; padding: 4px 8px 4px 4px; }
  .agv-flota .agv-cita-foto { grid-row: 1 / 3; width: 30px; height: 30px; }
  .agv-flota .agv-cita-h { font-size: 12.5px; line-height: 15px; align-self: end; }
  .agv-flota .agv-cita-t { grid-column: 2; margin-top: 0; font-size: 11.5px; line-height: 14px; align-self: start; }
}

/* ── según el ancho del marco: en estrecho, el chat arriba (plegado) y el Playground debajo; en ancho, lado a lado y con su alto fijo ── */
@container agv (min-width: 860px) {
  .agv-app { grid-template-columns: minmax(300px, 38fr) minmax(0, 62fr); height: 720px; }
  .agv-chat { border-bottom: 0; border-right: 1px solid var(--a-linea); }
  .agv-hilo { flex: 1; overflow-y: auto; }
  .agv-plegar { display: none; }
  .agv-otras { display: block; flex: none; padding-top: 4px; }
  .agv-pg-cuerpo { padding: 16px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--a-linea-2) transparent; }
  .agv-pg-pie { padding: 10px 16px; }
}
@container agv (min-width: 1080px) {
  .agv-app { grid-template-columns: 204px minmax(300px, 33fr) minmax(0, 67fr); }
  .agv-lat { display: flex; }
}

/* ── lo que cambia fuera de la réplica ── */
/* en el teléfono, el marco aprovecha casi todo el ancho y las seis pestañas van encima: debajo de una pantalla tan alta no se encontrarían.
   Encima las pone agentes-vivo.js, que las mueve en el documento a este mismo ancho (859 px): aquí no se cambia el orden a la vista, para
   que el tabulador siga siempre el orden que se ve */
@media (max-width: 859px) {
  .agentes-demo.agv-vivo { display: flex; flex-direction: column; }
  .agentes-demo.agv-vivo .agentes-pistas { margin: 0 0 14px; }
  .agentes-demo.agv-vivo .agentes-pantalla { margin-inline: calc(8px - var(--gutter, 20px)); }
}
