/* =====================================================================
   AuditorWEB · Tema "Sello"
   Canvas claro, superficies blancas con bordes finos, acento azul de timbre.
   ===================================================================== */
:root {
  /* Superficies */
  --canvas: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --line: #E2E8F0;
  --line-2: #CBD5E1;

  /* Texto */
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --faint: #94A3B8;

  /* Acento: azul sello */
  --accent: #2B4FD6;
  --accent-ink: #1E3AA8;
  --accent-soft: #EEF2FF;
  --accent-ring: rgba(43, 79, 214, .18);

  /* Semánticos */
  --ok: #059669;   --ok-soft: #ECFDF5;   --ok-line: #A7F3D0;
  --warn: #B45309; --warn-soft: #FFFBEB; --warn-line: #FDE68A;
  --err: #DC2626;  --err-soft: #FEF2F2;  --err-line: #FECACA;

  /* Forma y profundidad */
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-2: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Tipografía */
  --font-ui: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --legacy-alias: 0; /* compatibilidad: variables antiguas usadas en vistas previas */
  --txt: var(--ink); --ok-bg: var(--ok-soft); --err-bg: var(--err-soft); --warn-bg: var(--warn-soft); --info-bg: var(--accent-soft);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 14.5px/1.55 var(--font-ui); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.02em; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 16px; font-weight: 650; margin: 0 0 4px; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .92em; letter-spacing: -.01em; }
code { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; word-break: break-all; }
.mono-num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 12px; }
[hidden] { display: none !important; }

/* ---------- Header translúcido ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 58px; display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .12)); }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.brand-name b { font-weight: 700; color: var(--accent); }
.brand-sub { color: var(--muted); font-size: 13px; padding-left: 14px; border-left: 1px solid var(--line); }
.env-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.env-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* ---------- Estructura ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 28px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow-1);
}
.card-flush { padding: 0; overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; min-width: 0; }
.crumbs .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-con-badge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Botones ---------- */
button, .btn, .btn-sec, .btn-ghost {
  font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 8px; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
  text-decoration: none !important;
}
button, .btn { background: var(--accent); color: #fff; border: 1px solid var(--accent-ink); box-shadow: 0 1px 2px rgba(30, 58, 168, .3), inset 0 1px 0 rgba(255, 255, 255, .14); }
button:hover, .btn:hover { background: var(--accent-ink); color: #fff; }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { background: #A5B4E8; border-color: #A5B4E8; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-sec { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.btn-sec:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); }
.btn-ghost { height: 30px; padding: 0 10px; background: transparent; color: var(--muted); border: 1px solid transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn-spin { display: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: giro .7s linear infinite; }
.cargando .btn-spin { display: inline-block; }
.botones { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Avisos ---------- */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #C7D2FE;
}
.flash svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flash-ok { background: var(--ok-soft); color: #065F46; border-color: var(--ok-line); }
.flash-error { background: var(--err-soft); color: #991B1B; border-color: var(--err-line); }
.aviso { margin-top: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--warn-soft); color: #92400E; border: 1px solid var(--warn-line); font-size: 13.5px; }

/* ---------- Zona de carga ---------- */
.upload-card h2 { margin-bottom: 2px; }
.upload { margin-top: 14px; display: grid; gap: 12px; }
.dropzone {
  position: relative; display: block; cursor: pointer;
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2);
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.dropzone:hover { border-color: var(--accent); background: #FBFCFF; }
.dropzone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.dz-sobre { border-color: var(--accent); border-style: solid; background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-ring); }
.dz-sobre .dz-icon { transform: translateY(-3px); }
.dz-lleno { border-style: solid; border-color: var(--line); background: var(--surface); cursor: default; }
.dz-bloqueada { opacity: .7; pointer-events: none; }
.dz-empty { display: grid; justify-items: center; gap: 6px; padding: 30px 20px; text-align: center; }
.dz-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .2s var(--ease); margin-bottom: 4px; }
.dz-icon svg, .dz-zip svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dz-title { font-weight: 600; color: var(--ink); }
.dz-title u { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dz-hint { font-size: 12.5px; color: var(--muted); }
.dz-file { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.dz-zip { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); flex: none; }
.dz-meta { display: grid; min-width: 0; flex: 1; }
.dz-name { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-size { font-size: 12px; color: var(--muted); }
.upload-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.dz-error { margin: 0 auto 0 0; color: var(--err); font-size: 13px; font-weight: 600; }
.subida { margin-top: 14px; }
.subida p { margin: 8px 0 0; font-size: 13px; }
.subida-error .barra-fill { background: var(--err); animation: none; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px; box-shadow: var(--shadow-1); display: grid; gap: 4px; }
.kpi-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 500; letter-spacing: -.03em; color: var(--ink); }

/* ---------- Grilla de datos ---------- */
.grid-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.grid-head h2 { margin: 0; }
.grid-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 10px; width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search input, .select, .campo {
  font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; height: 36px; padding: 0 12px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.search input { padding-left: 32px; width: 260px; }
.search input:focus, .select:focus, .campo:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.select { padding-right: 30px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%2364748B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
.tabla-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-2); }
.grid th, .grid td { padding: 13px 16px; vertical-align: middle; }
.grid th:first-child, .grid td:first-child { padding-left: 20px; }
.grid th:last-child, .grid td:last-child { padding-right: 20px; }
.grid tbody tr { transition: background .12s var(--ease); }
.grid tbody tr[data-href] { cursor: pointer; }
.grid tbody tr[data-href]:hover { background: #F8FAFF; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid td a { color: var(--ink); font-weight: 500; }
.grid td a:hover { color: var(--accent); }
.grid .archivo { max-width: 340px; }
.grid .archivo a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.grid-vacio td { text-align: center; color: var(--muted); padding: 28px; }
.empty { padding: 40px 24px; text-align: center; }

/* Píldoras de estado con indicador */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill-proceso, .dot-proceso { color: var(--accent); }
.pill-proceso { background: var(--accent-soft); border-color: #C7D2FE; }
.pill-proceso .dot { animation: latido 1.6s var(--ease) infinite; }
.pill-revision, .dot-revision { color: var(--warn); }
.pill-revision { background: var(--warn-soft); border-color: var(--warn-line); }
.pill-aprobada, .dot-aprobada { color: var(--ok); }
.pill-aprobada { background: var(--ok-soft); border-color: var(--ok-line); }
.pill-error { color: var(--err); background: var(--err-soft); border-color: var(--err-line); }
.pill-parcial { color: var(--ink-2); background: var(--surface-2); border-color: var(--line); }
.pill-parcial .dot { background: var(--faint); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.chip-ok { color: #047857; background: var(--ok-soft); }
.chip-err { color: #B91C1C; background: var(--err-soft); }
.chip-warn { color: #92400E; background: var(--warn-soft); }

/* Badges heredados (detalle / revisión) */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border: 1px solid #C7D2FE; vertical-align: middle; letter-spacing: 0; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-clasificada, .badge-extraida, .badge-verificada { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.badge-aprobada, .badge-hecho { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge-en_revision { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge-error, .badge-fallido { background: var(--err-soft); color: var(--err); border-color: var(--err-line); }
.badge-procesando, .badge-ejecutando, .badge-pendiente, .badge-subida { background: var(--accent-soft); color: var(--accent); }

/* ---------- Barra de progreso ---------- */
.barra { position: relative; height: 8px; background: #EEF1F6; border-radius: 999px; overflow: hidden; }
.barra-fill {
  position: relative; height: 100%; width: 0; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, #4F6FF0, var(--accent)); transition: width .8s var(--ease);
}
.barra-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-100%); animation: barrido 1.8s var(--ease) infinite;
}

/* ---------- Tarjeta de ejecución ---------- */
.exec { padding: 24px 26px; box-shadow: var(--shadow-2); border-color: #D9E1F5; }
.exec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.exec-head h2 { font-size: 19px; margin: 0; }
.exec-pct { font-size: 34px; font-weight: 500; letter-spacing: -.04em; color: var(--ink); line-height: 1; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-ring); animation: pulso 1.8s var(--ease) infinite; }
.barra-exec { height: 6px; }
.exec-detalle { margin: 14px 0 18px; color: var(--ink-2); font-size: 14px; min-height: 22px; }
.exec-fin .barra-fill { background: var(--ok); }
.exec-fin .barra-fill::after { animation: none; }

/* Línea de tiempo vertical */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline .paso {
  position: relative; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 14px;
  padding: 9px 12px 9px 6px; border-radius: var(--r); transition: background .3s var(--ease);
}
.timeline .paso:not(:last-child)::before {
  content: ""; position: absolute; left: 19px; top: 34px; bottom: -8px; width: 2px; border-radius: 2px; background: var(--line);
}
.timeline .paso-hecho:not(:last-child)::before { background: var(--ok-line); }
.paso-ico {
  position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2);
  transition: all .3s var(--ease);
}
.paso-ico::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.paso-nombre { font-weight: 500; color: var(--ink-2); }
.paso-estado { font-size: 12px; font-weight: 600; color: var(--faint); font-family: var(--font-mono); letter-spacing: -.01em; }
/* Completado: sello esmeralda */
.paso-hecho .paso-ico { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.paso-hecho .paso-ico::after {
  width: 12px; height: 12px; border-radius: 0; background: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.2 2.2 2.2 4.8-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  animation: sellar .35s var(--ease);
}
.paso-hecho .paso-nombre { color: var(--ink); }
.paso-hecho .paso-estado { color: var(--ok); }
/* Activo: anillo con pulso */
.paso-activo { background: var(--accent-soft); }
.paso-activo .paso-ico { border-color: var(--accent); animation: pulso 1.8s var(--ease) infinite; }
.paso-activo .paso-ico::after { background: var(--accent); }
.paso-activo .paso-nombre { color: var(--ink); font-weight: 650; }
.paso-activo .paso-estado { color: var(--accent); }
/* En cola / error */
.paso-en_cola .paso-ico { border-style: dashed; border-color: var(--warn); }
.paso-en_cola .paso-ico::after { background: var(--warn); }
.paso-en_cola .paso-estado { color: var(--warn); }
.paso-error { background: var(--err-soft); }
.paso-error .paso-ico { background: var(--err); border-color: var(--err); }
.paso-error .paso-ico::after { content: "!"; width: auto; height: auto; background: none; color: #fff; font-weight: 700; font-size: 13px; line-height: 1; }
.paso-error .paso-estado { color: var(--err); }
.paso-pendiente .paso-nombre { color: var(--muted); }

/* Telemetría */
.telemetria { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.tel { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.tel dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.tel dd { margin: 0; font-size: 12.5px; color: var(--ink); }
.tel-warn { color: var(--warn) !important; }

/* ---------- Detalle ---------- */
.ficha { display: grid; grid-template-columns: 190px 1fr; gap: 10px 18px; margin: 16px 0 0; font-size: 14px; }
.ficha dt { color: var(--muted); font-weight: 500; }
.ficha dd { margin: 0; min-width: 0; }
.faltantes { margin: 0; padding-left: 20px; color: var(--err); }
.cta { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: #C7D2FE; background: linear-gradient(180deg, #F7F9FF, #fff 70%); box-shadow: var(--shadow-2); }
.cta h2 { font-size: 17px; }
.cta p { margin: 4px 0 0; }

.docs { display: grid; gap: 8px; margin-top: 12px; }
.doc { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.doc:hover { border-color: var(--line-2); }
.doc[open] { box-shadow: var(--shadow-2); }
.doc.sin-tipo { background: var(--warn-soft); border-color: var(--warn-line); }
.doc > summary { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; cursor: pointer; list-style: none; }
.doc > summary::-webkit-details-marker { display: none; }
.doc[open] > summary { border-bottom: 1px solid var(--line); }
.doc-n { font-family: var(--font-mono); font-weight: 500; color: var(--muted); text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 0; font-size: 12.5px; }
.doc-tit { display: grid; min-width: 0; }
.doc-tit strong { font-weight: 600; }
.doc-tit small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.doc-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.tag-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tag-err { background: var(--err-soft); color: var(--err); border-color: var(--err-line); }
.doc-body { padding: 16px 18px; font-size: 13.5px; }
.doc-body h4 { margin: 16px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.doc-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.doc-meta { font-size: 12px; margin-top: 14px; font-family: var(--font-mono); }
.anomalias { background: var(--warn-soft); color: #92400E; border: 1px solid var(--warn-line); padding: 10px 14px; border-radius: var(--r); }
.anomalias ul { margin: 6px 0 0; padding-left: 18px; }
dl.mini { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 4px 14px; margin: 0; }
dl.mini dt { color: var(--muted); } dl.mini dd { margin: 0; min-width: 0; }
ul.mini { margin: 0; padding-left: 18px; }
table.mini { font-size: 12.5px; margin: 2px 0; } table.mini th, table.mini td { padding: 5px 8px; }
.nulo { color: var(--line-2); } .si { color: var(--ok); font-weight: 600; } .no { color: var(--err); font-weight: 600; }

/* ---------- Revisión ---------- */
.rev-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.rev-tit { min-width: 0; }
.rev-head h1 { margin-bottom: 8px; }
.rev-head p { margin: 2px 0; }
.rev-descarga { flex: none; }
.rev-descarga svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rev-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.rev-meta div { display: grid; gap: 2px; }
.rev-meta dt { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rev-meta dd { margin: 0; font-size: 13.5px; color: var(--ink); }
.rev-hash dd { cursor: help; }
.rev-h2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.contadores { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.contadores .btn-sec { height: 30px; padding: 0 10px; font-size: 12px; }
.campo { width: 100%; height: auto; padding: 8px 11px; line-height: 1.5; }
input.campo, select.campo { height: 38px; }
textarea.campo { resize: vertical; }
.hall { border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: var(--r); margin: 12px 0; background: var(--surface); transition: opacity .2s var(--ease), border-color .2s var(--ease); }
.hall-aceptado { border-left-color: var(--ok); }
.hall-descartado { opacity: .55; }
.hall-pendiente { border-left-color: var(--warn); }
.hall-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r) var(--r) 0 0; }
.hall-cod { font-family: var(--font-mono); font-weight: 500; min-width: 34px; }
.hall-body { padding: 14px; display: grid; gap: 12px; }
.fila { display: grid; gap: 5px; font-size: 12px; color: var(--muted); font-weight: 600; }
.fila.corta { max-width: 280px; }
.evid { margin: 0; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 8px 12px; border-radius: var(--r-sm); }
.sev { font: inherit; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; border: 1px solid transparent; height: auto; cursor: pointer; }
.sev-ALTA { background: var(--err-soft); color: #B91C1C; border-color: var(--err-line); }
.sev-MEDIA { background: var(--warn-soft); color: #92400E; border-color: var(--warn-line); }
.sev-BAJA { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.seg { margin-left: auto; display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-radius: 6px; transition: background .15s var(--ease), color .15s var(--ease); }
.seg label:hover span { color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.seg-aceptado input:checked + span { background: var(--ok); color: #fff; }
.seg-descartado input:checked + span { background: var(--ink-2); color: #fff; }
.seg-pendiente input:checked + span { background: var(--warn-soft); color: var(--warn); }
.nuevo { margin-top: 14px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.nuevo > summary { padding: 11px 14px; cursor: pointer; color: var(--accent); font-weight: 600; }
details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.verifs { padding-left: 0; list-style: none; display: grid; gap: 8px; font-size: 13.5px; }
.barra-acciones {
  position: sticky; bottom: 12px; z-index: 5; display: flex; gap: 16px; align-items: end; justify-content: space-between; flex-wrap: wrap;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px; box-shadow: 0 10px 30px -12px rgba(15, 23, 42, .25); margin-bottom: 20px;
}
.barra-acciones label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 260px; flex: 1; max-width: 380px; }
.barra-acciones small { flex-basis: 100%; }

/* ---------- Animaciones ---------- */
@keyframes giro { to { transform: rotate(360deg); } }
@keyframes barrido { to { transform: translateX(100%); } }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(43, 79, 214, .32); } 70% { box-shadow: 0 0 0 8px rgba(43, 79, 214, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 79, 214, 0); } }
@keyframes latido { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes sellar { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar-in { padding: 0 16px; }
  .brand-sub { display: none; }
  .wrap { padding: 20px 16px 48px; }
  .card { padding: 18px; }
  .card-flush { padding: 0; }
  .exec { padding: 18px; }
  .exec-pct { font-size: 28px; }
  .search input { width: 100%; }
  .grid-tools, .search { width: 100%; }
  .ficha { grid-template-columns: 1fr; gap: 2px; }
  .ficha dt { margin-top: 8px; }
  .doc > summary { grid-template-columns: 30px 1fr; }
  .doc-tags { grid-column: 2; justify-content: flex-start; }
  .seg { margin-left: 0; }
  .rev-head { flex-direction: column; }
  .rev-descarga { width: 100%; }
  .timeline .paso { grid-template-columns: 28px 1fr; }
  .timeline .paso .paso-estado { grid-column: 2; }
}

/* =====================================================================
   Fase producción: shell con menú lateral, acceso, administración
   ===================================================================== */
.small { font-size: 12.5px; }
.vacio { color: var(--muted); padding: 18px 0; margin: 0; }
td.vacio { text-align: center; padding: 28px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi-sub { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.chip-acc { color: var(--accent-ink); background: var(--accent-soft); }
.chip-neutro { color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); }
.btn-bloque { width: 100%; }
.btn-link { background: none; border: 0; box-shadow: none; color: var(--accent); padding: 0; height: auto; font-weight: 600; font-size: inherit; }
.btn-link:hover { background: none; color: var(--accent-ink); text-decoration: underline; }
tfoot th { background: var(--surface-2); color: var(--ink); text-transform: none; font-size: 13px; letter-spacing: 0; }

/* ---------- Shell ---------- */
body.app { background: var(--canvas); }
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; overflow-y: auto;
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.side-cerrar { display: none; }
.nav { display: grid; gap: 2px; }
.nav-grupo { margin: 14px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.nav-grupo:first-child { margin-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500; font-size: 14px; text-decoration: none; transition: background .12s var(--ease), color .12s var(--ease);
}
.nav a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .12s var(--ease); }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a:hover svg { stroke: var(--ink-2); }
.nav a.activo { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.nav a.activo svg { stroke: var(--accent); }
.side-pie { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-pie .env-pill { margin: 0; justify-self: start; }
.yo { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; border: 1px solid #C7D2FE; }
.yo-txt { display: grid; min-width: 0; line-height: 1.3; }
.yo-txt strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yo-txt small { color: var(--muted); font-size: 12px; }
.principal { min-width: 0; }
.principal .wrap { max-width: 1240px; padding-top: 30px; }
.topbar-movil { display: none; }
.velo { display: none; }
.page-head .eyebrow { margin-bottom: 2px; }

/* ---------- Gráficos de barras (una serie) ---------- */
.chart { margin: 14px 0 0; }
.chart-plot { position: relative; }
.chart-v { padding-bottom: 4px; }
.chart-v .chart-plot { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: stretch; height: 230px; }
.chart-v .bar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: 6px; justify-items: center; outline: none; }
.chart-v .bar-val { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; align-self: end; }
.chart-v .bar-track { width: min(46px, 70%); display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-2); }
.chart-v .bar-fill { width: 100%; height: 0; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; transition: height .7s var(--ease); }
.chart-v .bar-lbl { font-size: 12px; color: var(--muted); }
.chart-h .chart-plot { display: grid; gap: 12px; }
.chart-h .bar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto; align-items: center; gap: 12px; outline: none; }
.chart-h .bar-lbl { order: -1; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-h .bar-track { height: 10px; background: #EEF1F6; border-radius: 999px; overflow: hidden; }
.chart-h .bar-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .7s var(--ease); }
.chart-h .bar-val { order: 1; font-size: 12px; color: var(--ink); white-space: nowrap; min-width: 64px; text-align: right; }
.bar { position: relative; cursor: default; }
.bar:hover .bar-fill, .bar:focus-visible .bar-fill { background: var(--accent-ink); }
.bar[data-tip]:hover::after, .bar[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; padding: 6px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 18px -6px rgba(15, 23, 42, .4);
}
.chart-h .bar[data-tip]:hover::after, .chart-h .bar[data-tip]:focus-visible::after { left: auto; right: 0; transform: none; bottom: calc(100% + 4px); }

/* ---------- Administración ---------- */
.form-fila { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 12px; }
.form-fila .fila { flex: 1 1 220px; }
.form-fila .fila.corta { flex: 0 1 200px; }
.form-col { display: grid; gap: 12px; margin-top: 12px; max-width: 460px; }
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px 20px; }
.filtros .fila { flex: 0 1 190px; }
input[type=date].campo { height: 38px; }
.roles-ayuda { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.roles-ayuda dt { font-weight: 650; }
.roles-ayuda dd { margin: 2px 0 0; color: var(--muted); }
.menu-acc { position: relative; display: inline-block; text-align: left; }
.menu-acc > summary { list-style: none; padding: 0 10px; height: 30px; display: inline-flex; font-size: 12.5px; }
.menu-acc > summary::-webkit-details-marker { display: none; }
.menu-acc-lista {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 240px; display: grid; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2);
}
.menu-acc-lista button {
  justify-content: flex-start; height: 34px; padding: 0 10px; background: none; border: 0; box-shadow: none;
  color: var(--ink-2); font-weight: 500; border-radius: 6px; width: 100%; text-align: left;
}
.menu-acc-lista button:hover { background: var(--surface-2); color: var(--ink); }
.menu-acc-lista .peligro { color: var(--err); }
.menu-acc-lista .peligro:hover { background: var(--err-soft); color: var(--err); }
.actividad { list-style: none; margin: 0; padding: 0; }
.actividad li { display: grid; grid-template-columns: 180px 1fr auto; gap: 14px; padding: 11px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: baseline; }
.actividad li:last-child { border-bottom: 0; }
.act-quien { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-cuando { font-size: 12px; color: var(--muted); }
.ficha-comp { grid-template-columns: minmax(150px, auto) 1fr; font-size: 13px; }
.costo-card .grid-head-in { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.costo-total { display: grid; justify-items: end; }
.costo-total span { font-size: 26px; font-weight: 500; letter-spacing: -.03em; }
.costo-total small { color: var(--muted); font-size: 12px; }
.grid-comp th, .grid-comp td { padding: 9px 12px; }
.aprueba { display: grid; gap: 2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.aprueba strong { font-size: 14px; color: var(--ink); }

/* Mi cuenta */
.dispositivos { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.dispositivos li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); }
.disp-ico { width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.disp-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }
.disp-txt { display: grid; min-width: 0; flex: 1; }
.disp-txt small { color: var(--muted); font-size: 11.5px; }
.politica { list-style: none; margin: -4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.politica li { display: inline-flex; align-items: center; gap: 6px; }
.politica li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; box-sizing: border-box; }
.politica li.ok { color: var(--ok); }
.politica li.ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 6.2 2 2 4-4.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/10px no-repeat; }

/* Bandeja de correos (desarrollo) */
.bandeja { display: grid; grid-template-columns: 320px 1fr; min-height: 420px; text-align: left; }
.bandeja-lista { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--line); max-height: 70vh; overflow-y: auto; }
.bandeja-lista a { display: grid; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.bandeja-lista a:hover { background: var(--surface-2); }
.bandeja-lista .activo a { background: var(--accent-soft); }
.bandeja-lista strong { font-size: 13.5px; font-weight: 600; }
.bandeja-lista small { color: var(--muted); font-size: 11.5px; }
.bandeja-msg { padding: 18px 22px; min-width: 0; }
.bandeja-txt { white-space: pre-wrap; font: 13px/1.6 var(--font-ui); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; overflow-wrap: anywhere; }
.codigo-dev { font-size: 32px; letter-spacing: 10px; font-weight: 500; text-align: center; padding: 14px; margin: 10px 0 14px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-ink); cursor: copy; }

/* ---------- Pantallas de acceso ---------- */
body.acceso { background: var(--surface); }
.acceso-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); min-height: 100vh; }
.acceso-visual { position: sticky; top: 0; height: 100vh; }
@media (max-height: 760px) {
  .av-puntos { display: none; }
  .av-texto h2 { font-size: 25px; }
  .acceso-visual { padding: 30px 40px; }
}
.acceso-visual {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 40px 48px; color: #fff;
  background:
    radial-gradient(120% 80% at 85% 10%, rgba(99, 132, 255, .55), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(16, 185, 129, .22), transparent 60%),
    linear-gradient(160deg, #1E3AA8 0%, #172E86 55%, #0F1F5C 100%);
}
.acceso-visual::before {
  content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.av-marca { position: relative; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.av-marca b { font-weight: 700; color: #A5B8FF; }
.av-marca .brand-mark { width: 32px; height: 32px; }
.av-escena { position: relative; flex: 1; min-height: 260px; max-width: 600px; width: 100%; margin: 22px 0 18px; }
.folio {
  position: absolute; width: 250px; padding: 16px 16px 18px; border-radius: 14px; color: var(--ink);
  background: rgba(255, 255, 255, .96); box-shadow: 0 30px 60px -20px rgba(5, 12, 45, .6), 0 0 0 1px rgba(255, 255, 255, .5);
  display: grid; gap: 8px; animation: flotar 7s var(--ease) infinite;
}
.folio::after {
  content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px; border-radius: 0 14px 0 6px;
  background: linear-gradient(225deg, #C7D2FE 50%, rgba(255, 255, 255, .96) 50%);
}
.f-n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); font-weight: 500; }
.f-t { font-weight: 650; font-size: 14px; letter-spacing: -.01em; }
.f-l { height: 7px; border-radius: 4px; background: #E8ECF5; }
.f-l.c { width: 62%; }
.f-nota { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 4px 8px; justify-self: start; }
.f-tabla { display: grid; gap: 5px; }
.f-tabla i { height: 7px; border-radius: 4px; background: #E8ECF5; }
.f-tabla i:nth-child(2) { width: 85%; }
.f-tabla i:nth-child(3) { width: 70%; }
.sello {
  position: absolute; right: -14px; bottom: -14px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 18px;
  background: var(--ok); border: 3px solid #fff; box-shadow: 0 8px 18px -6px rgba(5, 150, 105, .7); transform: rotate(-12deg);
}
.sello.s-pend { background: #F59E0B; font-size: 13px; font-family: var(--font-mono); box-shadow: 0 8px 18px -6px rgba(245, 158, 11, .7); }
.f1 { top: 0; left: 0; transform: rotate(-6deg); animation-delay: -1s; }
.f2 { top: 6%; left: 52%; transform: rotate(5deg); animation-delay: -3s; }
.f3 { top: 50%; left: 12%; transform: rotate(-2deg); animation-delay: -5s; z-index: 3; width: 290px; }
.chip-flot {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-size: 12.5px; font-weight: 600;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.chip-flot .dot-aprobada { color: #34D399; }
.chip-flot .dot-revision { color: #FBBF24; }
.c1 { top: 40%; left: 0; z-index: 4; }
.c2 { bottom: 4%; right: 2%; z-index: 4; }
.av-texto { position: relative; max-width: 520px; }
.av-texto h2 { color: #fff; font-size: 30px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 10px; font-weight: 700; }
.av-texto p { color: rgba(226, 232, 255, .85); font-size: 15px; margin: 0; }
.av-puntos { position: relative; list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, .18); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.av-puntos strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.av-puntos span { font-size: 12.5px; color: rgba(226, 232, 255, .75); line-height: 1.45; }
@keyframes flotar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

.acceso-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 28px 24px; background: var(--surface); }
.acceso-caja { width: 100%; max-width: 380px; margin-top: auto; }
.acceso-pie { margin-top: auto; padding-top: 28px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.acceso-pie svg { width: 15px; height: 15px; fill: none; stroke: var(--ok); stroke-width: 1.8; stroke-linejoin: round; }
.acc-head { text-align: center; margin-bottom: 22px; }
.acc-head h1 { font-size: 26px; margin: 14px 0 6px; }
.acc-head p { margin: 0; }
.acc-ico { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); border: 1px solid #C7D2FE; }
.acc-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acc-ico-alerta { background: var(--warn-soft); border-color: var(--warn-line); }
.acc-ico-alerta svg { stroke: var(--warn); }
.pasos-acc { list-style: none; display: flex; margin: 0 0 22px; padding: 4px; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.pasos-acc li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.pasos-acc li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; border: 1.5px solid currentColor; }
.pasos-acc li.actual { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.pasos-acc li.actual span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pasos-acc li.hecho { color: var(--ok); }
.form-acc { display: grid; gap: 16px; }
.campo-acc { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.campo-fila { display: flex; justify-content: space-between; gap: 8px; }
.campo-fila a { font-weight: 500; font-size: 12.5px; }
.input-ico { position: relative; display: flex; align-items: center; }
.input-ico > svg { position: absolute; left: 12px; width: 17px; height: 17px; fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.input-ico input, .otp {
  width: 100%; height: 44px; padding: 0 44px 0 40px; font: inherit; font-size: 14.5px; font-weight: 400; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input-ico input:focus, .otp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input-ico:focus-within > svg { stroke: var(--accent); }
.ver-pass { position: absolute; right: 6px; width: 34px; height: 34px; padding: 0; background: none; border: 0; box-shadow: none; color: var(--faint); }
.ver-pass:hover { background: var(--surface-2); color: var(--ink); }
.ver-pass svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.otp { padding: 0 12px; height: 58px; text-align: center; font-family: var(--font-mono); font-size: 28px; letter-spacing: .55em; text-indent: .55em; }
.otp::placeholder { color: var(--line-2); }
.btn-acc { width: 100%; height: 46px; font-size: 14.5px; background: var(--ink); border-color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .3); }
.btn-acc:hover { background: #1E293B; }
.acc-nota { text-align: center; font-size: 12.5px; color: var(--muted); margin: 16px 0 0; }
.acc-nota.izq { text-align: left; margin: -8px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.reenviar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 18px; font-size: 13px; }
.acc-dev { margin-top: 18px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); border: 1px dashed var(--warn-line); color: #92400E; font-size: 12.5px; text-align: center; }
.acceso-caja .flash { margin-bottom: 18px; }
.vacio-grande { text-align: center; padding: 48px 24px; }
.acceso-caja .bandeja { grid-template-columns: 1fr; }

/* ---------- Responsive (fase producción) ---------- */
@media (max-width: 1100px) {
  .acceso-shell { grid-template-columns: 1fr minmax(380px, 1fr); }
  .av-puntos { grid-template-columns: 1fr; gap: 10px; }
  .folio { width: 210px; }
  .f3 { width: 240px; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 60; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-2); }
  body.menu-abierto .side { transform: none; }
  body.menu-abierto .velo { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .35); }
  .side-cerrar { display: inline-flex; }
  .topbar-movil {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 54px; padding: 0 12px;
    background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .topbar-movil svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
  .acceso-shell { grid-template-columns: 1fr; }
  .acceso-visual { display: none; }
  .bandeja { grid-template-columns: 1fr; }
  .bandeja-lista { border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; }
  .actividad li { grid-template-columns: 1fr; gap: 2px; }
  .roles-ayuda { grid-template-columns: 1fr; }
}

/* ---------- Foto de perfil ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar-xl { width: 96px; height: 96px; font-size: 32px; border-width: 2px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line); }
.usuario-celda { display: flex; align-items: center; gap: 10px; }
.foto-card { display: flex; gap: 22px; align-items: center; }
.foto-actual { flex: none; }
.foto-actual.nueva .avatar-xl { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent); }
.foto-txt { min-width: 0; display: grid; gap: 6px; }
.foto-txt h2 { margin: 0; }
.foto-txt p { margin: 0; }
.foto-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.foto-acciones label.btn-sec { cursor: pointer; }
.foto-acciones label.btn-sec:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.peligro-link { color: var(--err); font-size: 13px; font-weight: 500; }
.peligro-link:hover { color: #B91C1C; }
@media (max-width: 640px) { .foto-card { flex-direction: column; align-items: flex-start; } }
.disp-txt > .tag { justify-self: start; margin: 2px 0; }

/* ---------- Lista de verificación ---------- */
.crit td { vertical-align: top; }
.crit .crit-doc td { background: var(--surface-2); padding-top: 10px; padding-bottom: 8px; }
.crit .crit-txt { min-width: 320px; font-size: 13.5px; }
.crit .crit-txt .tag { margin-left: 4px; }
.crit .select { height: 32px; min-width: 80px; }
.crit input.campo { height: 32px; min-width: 260px; font-size: 13px; }
.crit tr.crit-no td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.crit tr.crit-si td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.crit tr.crit-pend td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.h3-rev { font-size: 14px; margin: 20px 0 4px; }
