/* Panel de firmas PROGITAL — mockup Fase 0
   Registro "producto": una familia de sistema, paleta restringida,
   naranja solo para acción primaria / selección / foco. Grilla base 8 px. */
:root {
  --noche: #131e30;
  --noche-2: #1a2742;
  --naranja: #E64614;
  --naranja-osc: #C73B0E;
  --naranja-claro: #FF7849;
  --fondo: #f3f4f7;
  --superficie: #ffffff;
  --borde: #dfe3e9;
  --borde-fuerte: #c5ccd6;
  --texto: #1a1f29;
  --texto-2: #4f5866;
  --ok: #1d7445; --ok-bg: #e6f4ec;
  --warn: #8a5300; --warn-bg: #fdf1d8;
  --sin: #475163; --sin-bg: #eceff3;
  --err: #b42318; --err-bg: #fdecea;
  --radio: 8px;
  --sombra: 0 1px 2px rgba(19,30,48,.06), 0 4px 16px rgba(19,30,48,.06);
  --ease: cubic-bezier(.23, 1, .32, 1);
  font-family: Inter, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--texto);
  font-size: 15px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--naranja-osc); }
[hidden] { display: none !important; }
/* Tamaño base de todo ícono de trazo (las clases específicas lo ajustan después) */
svg[viewBox="0 0 24 24"] { width: 16px; height: 16px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; border-radius: 4px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--radio);
  border: 1px solid var(--borde-fuerte); background: var(--superficie); color: var(--texto);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #f6f7f9; border-color: #aab3bf; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
/* Texto blanco sobre #E64614 = 4,0:1 (no alcanza AA a 14px); el botón usa el naranja oscuro (5,17:1) */
.btn--primario { background: var(--naranja-osc); border-color: var(--naranja-osc); color: #fff; }
.btn--primario:hover { background: #a8320c; border-color: #a8320c; }
.btn--fantasma { border-color: transparent; background: transparent; }
.btn--fantasma:hover { background: rgba(19,30,48,.06); border-color: transparent; }
.btn--peligro { color: var(--err); }
.btn--sm { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login__marca { background: var(--noche); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login__marca img { width: 200px; }
.login__marca h2 { font-size: 28px; line-height: 1.2; max-width: 16ch; margin-bottom: 16px; }
.login__marca p { color: #c3cbd8; max-width: 42ch; }
.login__marca small { color: #8d98aa; }
.login__form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login__card { width: 100%; max-width: 380px; }
.login__card h1 { margin-bottom: 8px; }
.login__card > p { color: var(--texto-2); margin-bottom: 24px; }
.aviso-demo { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; background: var(--warn-bg); color: var(--warn); border-radius: var(--radio); padding: 8px 12px; margin-top: 16px; }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.campo label, .campo .etiqueta { font-size: 13px; font-weight: 600; color: var(--texto); }
.campo .ayuda { font-size: 12px; color: var(--texto-2); }
.campo input[type=text], .campo input[type=email], .campo input[type=tel], .campo input[type=password], .campo select {
  font: inherit; font-size: 15px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--borde-fuerte);
  border-radius: var(--radio); background: #fff; color: var(--texto); width: 100%;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.campo input:hover { border-color: #97a1ae; }
.campo input:focus { outline: none; border-color: var(--naranja); box-shadow: 0 0 0 3px rgba(230,70,20,.18); }
.campo input[readonly] { background: #f3f4f7; color: var(--texto-2); }
.campo--error input { border-color: var(--err); }
.campo .error { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--err); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--naranja); }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.lateral { background: var(--noche); color: #d6dce6; display: flex; flex-direction: column; padding: 24px 16px; position: sticky; top: 0; height: 100vh; }
.lateral__logo { padding: 0 8px 24px; }
.lateral__logo img { width: 150px; display: block; }
.lateral__logo span { display: block; font-size: 12px; color: #8d98aa; margin-top: 8px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radio); color: #d6dce6; text-decoration: none; font-weight: 500; font-size: 14px; transition: background-color .15s var(--ease); }
.nav a:hover { background: var(--noche-2); color: #fff; }
.nav a[aria-current=page] { background: var(--noche-2); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,120,73,.35); }
.nav a[aria-current=page] svg { color: var(--naranja-claro); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .contador { margin-left: auto; font-size: 12px; background: rgba(255,255,255,.1); padding: 0 8px; border-radius: 99px; }
.lateral__pie { margin-top: auto; font-size: 13px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }
.lateral__pie .quien { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding: 0 8px; }
.lateral__pie .quien b { color: #fff; font-weight: 600; display: block; }
.lateral__pie .btn { width: 100%; background: transparent; color: #d6dce6; border-color: rgba(255,255,255,.18); }
.lateral__pie .btn:hover { background: var(--noche-2); }
.lateral__pie .btn + .btn { margin-top: 8px; }

.principal { min-width: 0; }
@media (min-width: 861px) { .app { background: linear-gradient(90deg, var(--noche) 240px, var(--fondo) 240px); } }
.franja-demo { background: var(--warn-bg); color: var(--warn); font-size: 13px; padding: 8px 32px; display: flex; gap: 8px; align-items: center; }
.contenido { padding: 32px; max-width: 1280px; }
.cabecera { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.cabecera p { color: var(--texto-2); margin-top: 4px; }
.cabecera__acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.migas { font-size: 13px; color: var(--texto-2); margin-bottom: 8px; }
.migas a { color: var(--texto-2); }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--noche-2); flex: none; }
.avatar--nuevo { background: #fff; color: var(--sin); border: 1.5px dashed #97a1ae; }

/* ---------- Estados ---------- */
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 2px 10px 2px 8px; border-radius: 99px; white-space: nowrap; }
.estado svg { width: 14px; height: 14px; }
.estado--aldia { background: var(--ok-bg); color: var(--ok); }
.estado--desact { background: var(--warn-bg); color: var(--warn); }
.estado--sin { background: var(--sin-bg); color: var(--sin); }
.estado--inactivo { background: transparent; color: var(--texto-2); border: 1px solid var(--borde); }

/* ---------- Tarjeta / aviso ---------- */
.panel { background: var(--superficie); border: 1px solid var(--borde); border-radius: 12px; box-shadow: var(--sombra); }
.aviso { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 24px; background: #fff; border: 1px solid #f3c7b5; border-radius: 12px; }
.aviso__txt { display: flex; gap: 12px; align-items: flex-start; }
.aviso__txt svg { width: 20px; height: 20px; color: var(--naranja-osc); flex: none; margin-top: 2px; }
.aviso__txt p { color: var(--texto-2); font-size: 14px; }

/* ---------- Tabla equipo ---------- */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font-size: 12px; font-weight: 600; color: var(--texto-2); padding: 12px 16px; border-bottom: 1px solid var(--borde); background: #fafbfc; }
.tabla th:first-child { border-top-left-radius: 12px; }
.tabla th:last-child { border-top-right-radius: 12px; }
.tabla td { padding: 14px 16px; border-bottom: 1px solid var(--borde); vertical-align: middle; font-size: 14px; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr { transition: background-color .15s var(--ease); }
.tabla tbody tr:hover { background: #fafbfc; }
.tabla tr.inactiva td { color: var(--texto-2); }
.tabla tr.inactiva .persona b { color: var(--texto-2); }
.persona { display: flex; gap: 12px; align-items: center; }
.persona b { display: block; font-weight: 600; }
.persona span { font-size: 13px; color: var(--texto-2); }
.persona .avatar { color: #fff; }
.persona .avatar--nuevo { color: var(--sin); }
.acciones { display: flex; gap: 4px; justify-content: flex-end; }
.muted { color: var(--texto-2); font-size: 13px; }
.falta { color: var(--err); font-weight: 600; font-size: 13px; }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 24px; align-items: start; }
.editor__form { padding: 24px; }
.editor__form h2 { margin-bottom: 16px; }
.editor__form hr { border: 0; border-top: 1px solid var(--borde); margin: 24px 0; }
.disenos { display: flex; flex-direction: column; gap: 8px; }
.diseno { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--borde-fuerte); border-radius: var(--radio); cursor: pointer; background: #fff; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.diseno:hover { border-color: #97a1ae; }
.diseno input { margin-top: 3px; accent-color: var(--naranja); width: 18px; height: 18px; flex: none; }
.diseno b { display: block; font-size: 14px; }
.diseno span { font-size: 13px; color: var(--texto-2); }
.diseno:has(input:checked) { border-color: var(--naranja); box-shadow: 0 0 0 1px var(--naranja); background: #fff8f5; }
.diseno:has(input:focus-visible) { outline: 2px solid var(--naranja); outline-offset: 2px; }

.vista { position: sticky; top: 16px; }
.vista__barra { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--borde); }
.seg { display: inline-flex; background: #eef0f3; border-radius: var(--radio); padding: 3px; gap: 2px; }
.seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; color: var(--texto-2); padding: 6px 12px; min-height: 32px; border-radius: 6px; cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.seg button[aria-pressed=true] { background: #fff; color: var(--texto); box-shadow: 0 1px 2px rgba(19,30,48,.12); }
.seg button:hover:not([aria-pressed=true]) { color: var(--texto); }
.vista__lienzo { padding: 32px; min-height: 260px; background: #fff; overflow-x: auto; }
.vista__lienzo--gmail { padding: 16px; background: #eef0f3; }
.vista__pie { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--borde); font-size: 13px; color: var(--texto-2); }
.contador-car { display: inline-flex; gap: 6px; align-items: center; }
.contador-car b { color: var(--ok); }
.contador-car.alto b { color: var(--err); }
.vista__acciones { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-top: 1px solid var(--borde); background: #fafbfc; border-radius: 0 0 12px 12px; }
.vista__acciones .btn--primario { margin-left: auto; }
.nota-sim { font-size: 12px; color: var(--texto-2); padding: 8px 16px 0; }

.historial-persona { margin-top: 24px; }
.historial-persona h2 { margin-bottom: 12px; }

/* ---------- Lista de eventos / historial ---------- */
.eventos { list-style: none; margin: 0; padding: 0; }
.eventos li { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--borde); font-size: 14px; align-items: baseline; }
.eventos li:last-child { border-bottom: 0; }
.eventos time { color: var(--texto-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.eventos .ver { font-size: 12px; font-weight: 700; color: var(--noche); background: #eef0f3; border-radius: 4px; padding: 1px 8px; white-space: nowrap; }
.eventos .quien { color: var(--texto-2); font-size: 13px; }
.filtros { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.filtros .campo { margin: 0; min-width: 220px; }

/* ---------- Conexión ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.ficha { padding: 24px; }
.ficha h2 { margin-bottom: 12px; }
.ficha dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.ficha dt { color: var(--texto-2); }
.ficha dd { margin: 0; font-weight: 500; }
.ficha code { font-size: 12px; background: #eef0f3; padding: 1px 6px; border-radius: 4px; }
.ficha p + p { margin-top: 8px; }

/* ---------- Diálogos ---------- */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 24px 64px rgba(19,30,48,.3); color: var(--texto); }
dialog.ancho { width: min(760px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(19,30,48,.5); }
dialog[open] { animation: aparecer .2s var(--ease); }
@keyframes aparecer { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg__cab { padding: 20px 24px 0; }
.dlg__cab p { color: var(--texto-2); margin-top: 6px; font-size: 14px; }
.dlg__cuerpo { padding: 16px 24px; max-height: 62vh; overflow: auto; }
.dlg__pie { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--borde); background: #fafbfc; }
.caja-firma { border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px; background: #fff; overflow-x: auto; }
.pasos { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pasos li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--texto-2); }
.pasos li.hecho { color: var(--texto); }
.pasos li.omitido { color: var(--warn); }
.pasos .ind { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.pasos .ind svg { width: 18px; height: 18px; }
.pasos li.hecho .ind { color: var(--ok); }
.girando { width: 16px; height: 16px; border: 2px solid var(--borde-fuerte); border-top-color: var(--naranja); border-radius: 50%; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.resultado { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radio); background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 600; margin-top: 16px; }
.resultado svg { width: 20px; height: 20px; flex: none; }
.lista-aplicar { list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--borde); border-radius: var(--radio); }
.lista-aplicar li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--borde); font-size: 14px; }
.lista-aplicar li:last-child { border-bottom: 0; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 48px)); }
.toast { background: var(--noche); color: #fff; padding: 12px 16px; border-radius: var(--radio); box-shadow: 0 12px 32px rgba(19,30,48,.3); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; animation: aparecer .2s var(--ease); }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #7ee2a8; }
.toast--error svg { color: #ffb4a8; }

/* ---------- Maqueta Gmail ---------- */
.gm { --gm-bg: #f6f8fc; --gm-panel: #fff; --gm-txt: #1f1f1f; --gm-txt2: #5e5e5e; --gm-borde: #e0e3e7; --gm-chip: #e8eaed;
  background: var(--gm-bg); color: var(--gm-txt); font-family: Arial, Helvetica, sans-serif; border-radius: 12px; overflow: hidden; border: 1px solid var(--borde); margin: 0 auto; }
.gm--oscuro { --gm-bg: #111; --gm-panel: #1f1f1f; --gm-txt: #e3e3e3; --gm-txt2: #a8a8a8; --gm-borde: #333; --gm-chip: #333; }
.gm__top { display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.gm__burger { width: 18px; height: 12px; border-top: 2px solid var(--gm-txt2); border-bottom: 2px solid var(--gm-txt2); position: relative; flex: none; }
.gm__burger::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid var(--gm-txt2); }
.gm__logo { font-size: 20px; color: var(--gm-txt2); font-weight: 400; letter-spacing: -.02em; }
.gm__buscar { flex: 1; background: var(--gm-chip); border-radius: 24px; padding: 10px 18px; color: var(--gm-txt2); font-size: 14px; max-width: 520px; }
.gm__ava { width: 32px; height: 32px; border-radius: 50%; background: #e64614; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-left: auto; }
.gm__cuerpo { display: flex; }
.gm__lado { width: 170px; padding: 8px 0; flex: none; font-size: 14px; color: var(--gm-txt); }
.gm__redactar { display: inline-block; margin: 0 0 12px 12px; background: #c2e7ff; color: #001d35; border-radius: 16px; padding: 14px 20px; font-weight: 600; }
.gm--oscuro .gm__redactar { background: #004a77; color: #c2e7ff; }
.gm__lado div { padding: 6px 12px 6px 24px; border-radius: 0 16px 16px 0; }
.gm__lado div.act { background: #d3e3fd; font-weight: 700; }
.gm--oscuro .gm__lado div.act { background: #004a77; }
.gm__msg { flex: 1; background: var(--gm-panel); border-radius: 16px; margin: 0 16px 16px 0; padding: 20px 24px 28px; min-width: 0; }
.gm__asunto { font-size: 21px; font-weight: 400; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gm__asunto span { font-size: 12px; background: var(--gm-chip); color: var(--gm-txt2); padding: 1px 6px; border-radius: 4px; }
.gm__de { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; font-size: 14px; }
.gm__de .gm__ava { margin: 0; width: 40px; height: 40px; flex: none; }
.gm__de small { color: var(--gm-txt2); font-size: 12px; display: block; }
.gm__de time { margin-left: auto; color: var(--gm-txt2); font-size: 12px; white-space: nowrap; }
.gm__texto { font-size: 14px; line-height: 1.55; }
.gm__texto p { margin: 0 0 12px; }
.gm__firma { margin-top: 16px; overflow-x: auto; }
/* Simulación del peor caso de modo oscuro (Gmail iOS / Outlook: inversión completa).
   El contenedor se invierte y las imágenes se re-invierten (los clientes no invierten imágenes). */
.gm--oscuro .gm__firma { background: #e0e0e0; filter: invert(1) hue-rotate(180deg); }
.gm--oscuro .gm__firma img { filter: invert(1) hue-rotate(180deg); }
.gm--celular { width: 375px; max-width: 100%; border-radius: 28px; border: 8px solid #1b1b1b; }
.gm--celular .gm__top { padding: 14px 16px 8px; }
.gm--celular .gm__lado, .gm--celular .gm__buscar, .gm--celular .gm__logo, .gm--celular .gm__burger { display: none; }
.gm--celular .gm__volver { display: block; }
.gm__volver { display: none; font-size: 20px; color: var(--gm-txt2); line-height: 1; }
.gm--celular .gm__msg { margin: 0; border-radius: 0; padding: 12px 16px 24px; }
.gm--celular .gm__asunto { font-size: 18px; }
.gm--celular .gm__de .gm__ava { width: 34px; height: 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .editor { grid-template-columns: 1fr; }
  .vista { position: static; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
  .lateral__logo { padding: 0; margin-right: auto; }
  .lateral__logo img { width: 120px; }
  .lateral__logo span { display: none; }
  .nav { flex-direction: row; width: 100%; min-width: 0; order: 3; overflow-x: auto; }
  .nav a { padding: 10px 12px; min-height: 44px; white-space: nowrap; flex: none; }
  .lateral__pie { margin: 0; border: 0; padding: 0; display: flex; gap: 8px; }
  .lateral__pie .quien { display: none; }
  .lateral__pie .btn { width: auto; }
  .lateral__pie .btn + .btn { margin-top: 0; }
  .contenido { padding: 20px 16px; }
  .franja-demo { padding: 8px 16px; }
  .login { grid-template-columns: 1fr; }
  .login__marca { padding: 32px 24px; gap: 24px; }
  .login__marca h2 { font-size: 22px; }
  .btn { min-height: 44px; }
  /* Tabla → lista apilada */
  .tabla thead { display: none; }
  .tabla, .tabla tbody, .tabla tr, .tabla td { display: block; width: 100%; }
  .tabla tr { border-bottom: 1px solid var(--borde); padding: 12px 0; }
  .tabla tr:last-child { border-bottom: 0; }
  .tabla td { border: 0; padding: 4px 16px; }
  .tabla td[data-etq]::before { content: attr(data-etq) ": "; color: var(--texto-2); font-size: 13px; }
  .acciones { justify-content: flex-start; padding-top: 8px; flex-wrap: wrap; }
  .eventos li { grid-template-columns: 1fr; gap: 2px; }
  .vista__lienzo { padding: 16px; }
  .vista__acciones .btn { flex: 1 1 auto; }
  .gm__lado { display: none; }
  .gm__msg { margin: 0 8px 8px; padding: 16px; }
  .gm__buscar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .girando { animation: none; border-top-color: var(--borde-fuerte); }
}

/* Subselector de banner animado (propuesta 3) */
.banners { border: 0; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.banners legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.diseno--banner { align-items: center; }
.diseno--banner img { width: 120px; height: 30px; border-radius: 4px; flex: none; object-fit: cover; }
.banners .ayuda { font-size: 12px; color: var(--naranja-osc); margin-top: 4px; }
@media (max-width: 420px) { .diseno--banner { flex-wrap: wrap; } }

/* ======================================================================
   Añadidos del panel real (Fase 1). No cambian nada de lo aprobado:
   solo estados que el mockup no necesitaba (errores reales, iframe aislado).
   ====================================================================== */
.error-login { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 600; background: var(--err-bg); color: var(--err); border-radius: var(--radio); padding: 10px 12px; margin: -8px 0 16px; }
.error-login svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.resultado--error { background: var(--err-bg); color: var(--err); }
.pasos li.fallo { color: var(--err); }
.pasos li.fallo .ind { color: var(--err); }
.pasos li.omitido .ind { color: var(--warn); }
.pasos li { flex-wrap: wrap; }
.pasos li .paso-detalle { flex-basis: 100%; padding-left: 30px; margin-top: -6px; font-size: 13px; color: var(--texto-2); }
.pasos li.fallo .paso-detalle { color: var(--err); }
.caja-firma--segura { padding: 0; overflow: hidden; }
.caja-firma--segura iframe { display: block; width: 100%; height: 300px; border: 0; background: #fff; }
.diseno--banner img.logo-muestra { object-fit: contain; background: #fff; }
.enlace { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--naranja-osc); text-decoration: underline; cursor: pointer; }
.paginas { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.lateral__pie form { margin: 0; }
.lateral__pie form .btn { width: 100%; }
@media (max-width: 860px) { .lateral__pie form .btn { width: auto; } }
