/* =====================================================================================
   CEN-925 · Multiverso de apariencia: capa de tema única, se carga AL FINAL (después de styles.css).
   Regla #51: todo fondo aqua / menta / cian / teal claro lleva texto oscuro #061522, en ambos temas.
   Esta hoja SOLO pinta (color, background, border-color). Nunca tamaños ni layout.
   ===================================================================================== */
:root,html[data-theme="dark"],html[data-theme="light"]{
  --on-accent:#061522;       /* texto sobre aqua/menta/cian (oscuro) y mostaza (claro) */
  --on-accent-muted:#163040; /* texto secundario sobre acento */
  --on-aqua:#061522;
}

/* 1 · Componentes con fondo de acento que pintaban (o podían pintar) texto blanco */
html .primary,
html .c386-chip.active,
html .c544-tabs button.active,
html .c18-modo button.on,
html .mp-search button.on,
html .dimension-toggle button.active,
html .access-intent button.active,
html #cenAviso button,
html #cenLd .c612-act,
html .c60 input[type=file]::file-selector-button,
html .c744-nav button.on,
html .c749 i,html .c749m i,html .c752b i,
html .cd-foot button:not(.g),
html .c699-info:hover,
html .c739 .t2 th.n,html .c739 .tg,
html .mark{color:var(--on-accent)!important}
html .primary *,html .c386-chip.active *,html .c544-tabs button.active *,html .c18-modo button.on *,html .c744-nav button.on *{color:inherit!important}

/* 2 · Estilos en línea generados por JS (style="background:…" aqua/menta/cian) */
html [style*="background:var(--aqua"],html [style*="background: var(--aqua"],
html [style*="background:var(--accent)"],html [style*="background: var(--accent)"],
html [style*="background:var(--accent,"],html [style*="background: var(--accent,"],
html [style*="background:var(--c22-cyan"],
html [style*="background:#20d9ca" i],html [style*="background: #20d9ca" i],
html [style*="background:#5eeadd" i],html [style*="background: #5eeadd" i],
html [style*="background:#22d3c5" i],html [style*="background: #22d3c5" i],
html [style*="background:#2dd4bf" i],html [style*="background: #2dd4bf" i],
html [style*="background:#14b8a6" i],html [style*="background: #14b8a6" i],
html [style*="background:#35d6c4" i],html [style*="background:#3ee0d2" i],html [style*="background:#4be3d6" i],
html [style*="background:#5eead4" i],html [style*="background:#99f6e4" i],
html [style*="background-color:#20d9ca" i],html [style*="background-color:#5eeadd" i],
html [style*="background-color:#2dd4bf" i],html [style*="background-color:#14b8a6" i],
html [style*="background:linear-gradient"][style*="#20d9ca" i],html [style*="background:linear-gradient"][style*="#2dd4bf" i],
html [style*="background:linear-gradient"][style*="#14b8a6" i],html [style*="background:linear-gradient"][style*="var(--aqua"]{color:var(--on-accent)!important}
html [style*="background:var(--accent"] b,html [style*="background:#20d9ca" i] b,html [style*="background:#5eeadd" i] b{color:inherit!important}

/* 3 · Selección de texto */
::selection{background:var(--accent);color:var(--on-accent)}

/* =====================================================================================
   BETA-994 · Revisión de contraste en claro y oscuro (escaneo automático de todas las secciones, umbral WCAG 4.5 / 3 en texto grande)
   EXCEPCIONES a la regla 51: elementos «activos» cuyo fondo NO es acento llevan el texto normal del tema.
   ===================================================================================== */
html .c744-nav button.c873b.on,html .c744-nav button.c873b.on *{color:var(--text)!important}   /* tablero elegido en Inteligencia Operativa: fondo gris translúcido, no acento (salía oscuro sobre oscuro) */
/* Píldoras de color vivo: texto oscuro */
html .rkp-inactivo{color:#061522!important}  /* .pl y .c703-pill: el color lo calcula cenTxtSobre() según su fondo */
/* Claro: el mostaza (#c99a06) como TEXTO sobre fondo claro no alcanza 4.5 → tono oscuro */
html[data-theme="light"] .tg,html[data-theme="light"] [style*="color:var(--accent"]:not(.primary):not(.on),html[data-theme="light"] [style*="color: var(--accent"]:not(.primary):not(.on){color:var(--accent-ink,#7d5f00)!important}
/* Oscuro: rojos y verdes de variación más claros sobre fondo oscuro */
html[data-theme="dark"] .c969-dn,html[data-theme="dark"] .c973-mal{color:#f87171!important}
html[data-theme="dark"] .c969-up,html[data-theme="dark"] .c973-ok{color:#4ade80!important}
html[data-theme="light"] .c840-t td[style*="#e5484d"],html[data-theme="light"] td[style*="color:#e5484d"]{color:#b42335!important}
html[data-theme="dark"] [style*="color:#2f6fed"]{color:#7aa7ff!important}  /* azul de etiquetas (VENTAS) legible en oscuro */
html[data-theme="dark"] [style*="color:#dc2626"]{color:#f87171!important}  /* rojo de etiquetas (CANCELADAS) en oscuro */
html[data-theme="light"] [style*="color:#2f6fed"]{color:#1d4ed8!important}  /* azul de etiquetas en claro */
html td.cen-num[style*="rgba(37,99,235"],html td.cen-num[style*="rgba(37, 99, 235"]{font-weight:700}  /* mapa de calor de Falla cable de red: cifra en negritas sobre azul */
html[data-theme="light"] [style*="color:#16a34a"]{color:#15803d!important}  /* verde de etiquetas (COMPLETAS) en claro */
/* BETA-1002 · Detalle del mapa (.c512-det) en modo oscuro: antes tabla blanca con letra clara */
html[data-theme="dark"] .c512-det,html[data-theme="dark"] .c512-det *{color:var(--text)}
html[data-theme="dark"] .c512-det .table-wrap,html[data-theme="dark"] .c512-det table,html[data-theme="dark"] .c512-det td{background:var(--panel,#16191d)!important;border-color:var(--line,#2a2f36)!important}
html[data-theme="dark"] .c512-det tr:nth-child(even) td{background:rgba(255,255,255,.04)!important}
html[data-theme="dark"] .c512-det th{background:rgba(255,255,255,.06)!important;color:var(--accent-ink,#3ee0d2)!important}
html[data-theme="dark"] .c512-det .tag.info{background:#1e3a5f;color:#dbeafe}
html[data-theme="dark"] .c512-det button{background:rgba(255,255,255,.08);color:var(--text)}

/* BETA-1007 · Botones de grupo y ventana «Ya se realizó» */
.c1007g{margin-left:10px;display:inline-flex;gap:2px;opacity:.55;transition:opacity .15s}
.c744-g h3:hover .c1007g,.c1007g:focus-within{opacity:1}
.c1007g .tg{padding:2px 6px;font-size:.85rem;background:transparent;border:0;cursor:pointer}
.c1007m{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px}
.c1007c{position:relative;background:var(--surface,#fff);color:var(--text,#0f172a);border:1px solid var(--line,#cbd5e1);border-radius:12px;padding:20px;width:min(520px,100%);max-height:90vh;overflow:auto;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.c1007c h3{margin:0 0 4px}
.c1007c textarea{width:100%;box-sizing:border-box;margin-top:4px;font:inherit;padding:8px;border-radius:8px;border:1px solid var(--line,#cbd5e1);background:var(--bg,#fff);color:inherit}
.c1007x{position:absolute;top:10px;right:10px;background:transparent;border:0;font-size:1.1rem;cursor:pointer;color:inherit}
.c1007p{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.c1007p span{position:relative;display:inline-flex;align-items:center;border:1px solid var(--line,#cbd5e1);border-radius:8px;padding:2px;min-height:40px;font-size:.8rem}
.c1007p img{width:72px;height:72px;object-fit:cover;border-radius:6px}
.c1007p button{position:absolute;top:-8px;right:-8px;width:22px;height:22px;border-radius:50%;border:0;background:#c2410c;color:#fff;cursor:pointer;font-size:.7rem}
.c1007e{color:#c2410c;font-size:.85rem;margin-top:6px;min-height:1em}
.c1007l{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:6px}
.c1007l li{display:flex;align-items:center;gap:8px;justify-content:space-between;font-size:.82rem;border-top:1px solid var(--line,rgba(148,163,184,.3));padding-top:6px}
.c1007l li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.c1007l button{flex:none;font-size:.75rem;padding:3px 8px}
.c1008ng{margin:10px 0 4px;width:100%;border-style:dashed}
/* BETA-1009 · Carpetas y vigencia */
.c873b .c1009c{margin-left:auto;padding:0 4px;opacity:0;font-size:.8rem;cursor:pointer}
.c873b:hover .c1009c,.c873b.on .c1009c,.c1009c:focus{opacity:.8}
.c1009v{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.c1009v input{font:inherit;padding:2px 4px}
.c1009x{color:#c2410c;font-weight:600}

/* BETA-1011 · Contraste: gráficas SVG con texto oscuro fijo y botones secundarios del detalle en modo oscuro */
html[data-theme="dark"] .cd-foot button.g{background:transparent!important;color:var(--text,#e8f1f7)!important;border:1px solid rgba(148,163,184,.45)!important}
html[data-theme="dark"] svg text[fill="#203b61" i],html[data-theme="dark"] svg text[fill="#365779" i],html[data-theme="dark"] svg text[fill="#444"],
html[data-theme="dark"] svg text[fill="#555"],html[data-theme="dark"] svg text[fill="#12212c" i],html[data-theme="dark"] svg text[fill="#0f172a" i],
html[data-theme="dark"] svg text[fill="#1f2937" i],html[data-theme="dark"] svg text[fill="#334155" i]{fill:#e2e8f0!important}
html[data-theme="dark"] svg text[fill="#64748b" i],html[data-theme="dark"] svg text[fill="#475569" i],html[data-theme="dark"] svg text[fill="#8fa6b8" i]{fill:#b6c3d4!important}
html[data-theme="dark"] svg line[stroke="#dbe4ef" i],html[data-theme="dark"] svg line[stroke="#e2e8f0" i]{stroke:rgba(148,163,184,.28)!important}
/* BETA-1011 · Modalidad de auditoría y filtro del Mapa 2.0 */
.c1011m{display:inline-block;font-size:.72rem;font-weight:700;padding:1px 7px;border-radius:999px;white-space:nowrap;vertical-align:middle}
.c1011m.p{background:rgba(22,163,74,.14);color:#15803d}
.c1011m.r{background:rgba(37,99,235,.14);color:#1d4ed8}
.c1011m.n{background:rgba(148,163,184,.18);color:#64748b}
html[data-theme="dark"] .c1011m.p{color:#4ade80}html[data-theme="dark"] .c1011m.r{color:#93c5fd}html[data-theme="dark"] .c1011m.n{color:#cbd5e1}
.c1011a{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0;font-size:.85rem}
.c1011a button{padding:3px 10px;border-radius:999px;border:1px solid var(--line,#cbd5e1);background:transparent;color:inherit;cursor:pointer}
.c1011a button.on{background:#d4a017;border-color:#d4a017;color:#1a1a1a;font-weight:700}
/* BETA-1020 · Junta: asistentes, temario y conclusiones */
.c1020b{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin:.3rem 0}
.c1020b label{display:flex;flex-direction:column;gap:2px;font-size:.85rem}
.c1020cat{max-height:220px;overflow:auto;border:1px solid var(--line,#cbd5e1);border-radius:10px;padding:6px;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:2px 10px}
.c1020u{display:flex;gap:6px;align-items:center;font-size:.85rem;padding:3px 4px;border-radius:6px;cursor:pointer}
.c1020u:hover{background:rgba(148,163,184,.12)}
.c1020chips{display:flex;flex-wrap:wrap;gap:6px;margin:.4rem 0}
.c1020c{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 10px;border-radius:999px;background:rgba(212,160,23,.15);font-size:.82rem}
.c1020c button,.c1020x{border:0;background:transparent;color:#c2410c;cursor:pointer;font-size:.9rem;padding:2px 6px}
.c1020r{display:grid;grid-template-columns:minmax(160px,1fr) minmax(0,2fr) auto;gap:10px;align-items:start;padding:6px 0;border-bottom:1px solid var(--line,rgba(148,163,184,.3))}
.c1020r input,.c1020r textarea{width:100%;box-sizing:border-box}
@media(max-width:640px){.c1020r{grid-template-columns:1fr auto}.c1020r>div:nth-child(2){grid-column:1}}
.c1020add{margin-top:6px}
.c1020foto{display:flex;gap:10px;align-items:center;margin-top:6px}.c1020foto img{width:120px;height:90px;object-fit:cover;border-radius:8px}
.c1020u{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:start;line-height:1.25}.c1020u b{font-size:.8rem}.c1020u small{grid-column:2}

/* BETA-1070 · Celular: las tablas anchas se recorren de lado dentro de su caja (los contenedores flex ya no se estiran al ancho de la tabla) */
.cen-tbox{max-width:100%;min-width:0}
[style*="flex:1"],[style*="flex: 1"]{min-width:0;max-width:100%}
.card,.card>div,section[id^="c510-"]{min-width:0;max-width:100%}
.table-wrap{max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
/* BETA-1071 · Celular: Inteligencia Operativa y la página completa no se salen de lado */
.c744-nav{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.c744-nav+section,section:has(>.c744-nav){max-width:100%;min-width:0}
.c361-list.c386-pop{max-width:calc(100vw - 24px)}
@media (max-width:760px){body{overflow-x:clip}}
