/* =====================================================================
   Estilos base de las aplicaciones de TFS (TFS Ecosystem).
   Es el mismo estilo del TFS Project Management System. No cambies los
   colores ni los componentes de aquí: agrega lo propio de tu app al final,
   en la sección "Propio de esta aplicación".
   ===================================================================== */
:root {
  /* Marca (muestreados del logo de TFS) */
  --navy: #1E233B; --navy-2: #2A3150; --green: #75A748; --green-d: #48722A; --blue: #8CB9CA; --blue-d: #3C6E80;
  /* Superficies y texto */
  --bg: #F4F6F3; --card: #FFFFFF; --soft: #F4F6F8; --input: #FFFFFF; --line: #DDE2E6; --line-2: #EDF0F2;
  --text: #1E233B; --ink: #1E233B; --muted: #5F6875;
  /* Estados */
  --red: #B42318; --red-bg: #FDECEA; --amber: #9A5B00; --amber-bg: #FFF4E0; --ok-bg: #EAF3E2; --dev-bg: #E6F0F4;
  --radius: 8px; --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #10131C; --card: #191D2A; --soft: #202536; --input: #141826; --line: #2D3446; --line-2: #232838;
  --text: #E3E8EF; --ink: #E9EEF5; --muted: #98A3B3; --blue-d: #8CB9CA;
  --red: #FF9A85; --red-bg: #3A1F1F; --amber: #F1D9A0; --amber-bg: #3A2F17; --ok-bg: #1F3020; --dev-bg: #1C2D36;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-d); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 17px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
[hidden] { display: none !important; }
.boot { padding: 40px; color: var(--muted); }
.sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 10px 0; font-size: 13px; }

/* ---------- Estructura: barra lateral navy + contenido ---------- */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: #E8ECF0; display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: block; margin-bottom: 10px; text-decoration: none; }
.side .app-name { color: #fff; font-weight: 700; font-size: 15px; padding: 2px 8px 0; }
.side .app-sub { color: var(--blue); font-size: 12px; padding: 0 8px 10px; letter-spacing: .03em; }
.nav-link { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 6px; color: #E8ECF0; text-decoration: none; }
.nav-link:hover { background: var(--navy-2); }
.nav-link.active { background: var(--navy-2); box-shadow: inset 3px 0 0 var(--green); }
.badge { background: var(--green); color: #1E233B; font-weight: 700; border-radius: 10px; padding: 0 7px; font-size: 12px; }
.side .spacer { flex: 1; }
.side .back-link { color: var(--blue); font-size: 12.5px; text-decoration: none; padding: 4px 8px 10px; }
.side .back-link:hover { text-decoration: underline; }
.side .who { border-top: 1px solid var(--navy-2); padding: 12px 8px 0; font-size: 12px; color: #BFCBD6; }
.side .who b { color: #fff; display: block; font-size: 13px; }
.side .who button { background: none; border: none; color: var(--blue); padding: 6px 0 0; cursor: pointer; margin-right: 12px; }
main { padding: 22px 28px 40px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

/* ---------- Logo TFS: siempre sobre blanco, también en modo nocturno ---------- */
.tfs-mark { display: inline-flex; background: #fff; border-radius: 8px; padding: 6px 10px; line-height: 1; }
.tfs-mark img { display: block; height: 40px; width: auto; }
.side .brand .tfs-mark { width: 100%; justify-content: center; padding: 12px; }
.side .brand .tfs-mark img { width: 100%; height: auto; max-width: 150px; }

/* ---------- Tarjetas, rejillas e indicadores ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; overflow-x: auto; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; border-top: 4px solid var(--blue); }
.kpi .v { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kpi.good { border-top-color: var(--green); } .kpi.warn { border-top-color: #E0A030; }
.kpi.bad { border-top-color: #B42318; } .kpi.bad .v { color: var(--red); }

/* ---------- Tablas ---------- */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: rgba(140, 185, 202, .12); }

/* ---------- Chips de estado (siempre con texto, nunca solo color) ---------- */
.chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.gray { background: var(--soft); color: var(--muted); border: 1px solid var(--line-2); }
.chip.info { background: var(--dev-bg); color: var(--blue-d); }
.chip.ok { background: var(--ok-bg); color: var(--green-d); }
.chip.warn { background: var(--amber-bg); color: var(--amber); }
.chip.bad { background: var(--red-bg); color: var(--red); }
:root[data-theme="dark"] .chip.ok { color: #A9D58A; }

/* ---------- Avance ---------- */
.bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar .track { flex: 1; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--green); }
.bar .pct { width: 38px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* ---------- Avisos en línea ---------- */
.info-line, .warn-line, .err-line { border-radius: 6px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }
.info-line { background: var(--dev-bg); color: var(--blue-d); }
.warn-line { background: var(--amber-bg); color: var(--amber); }
.err-line { background: var(--red-bg); color: var(--red); }
:root[data-theme="dark"] .info-line { color: var(--text); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 6px; padding: 7px 12px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #B9C1C8; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.green { background: var(--green); border-color: var(--green); color: #1E233B; font-weight: 600; }
.btn.danger { color: var(--red); }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.btn.link { border: none; background: none; color: var(--blue-d); padding: 2px 4px; }
.btn:disabled { opacity: .5; cursor: default; }
:root[data-theme="dark"] .btn { background: var(--soft); }
:root[data-theme="dark"] .btn.primary { background: #3C4A7A; border-color: #3C4A7A; }
:root[data-theme="dark"] .btn.green { background: var(--green); border-color: var(--green); }
:root[data-theme="dark"] .btn.link { background: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Formularios: obligatorio con *, opcional con "(opcional)" ---------- */
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f > .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.rq { color: var(--red); font-weight: 700; margin-left: 2px; }
.opt { font-weight: 400; color: var(--muted); }
.req-note { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=url], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; background: var(--input); font-weight: 400; color: var(--text); min-width: 0; width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
textarea { resize: vertical; min-height: 70px; }
input:disabled, select:disabled, textarea:disabled { background: var(--soft); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .span2 { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.check input { margin-top: 3px; accent-color: var(--green); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.seg button { border: none; background: none; padding: 6px 12px; cursor: pointer; font-size: 13px; color: var(--text); }
.seg button.on { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .seg button.on { background: #3C4A7A; }

/* ---------- Inicio de sesión ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 20px; position: relative; }
.login .box { background: var(--card); border-radius: 12px; padding: 28px; width: 100%; max-width: 400px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.login-logo .tfs-mark { box-shadow: 0 0 0 1px var(--line); padding: 12px 16px; }
.login-logo .tfs-mark img { height: 64px; }
.login-theme { position: absolute; top: 16px; right: 16px; }
.ms-btn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 15px; }
.preview-hint { margin-top: 14px; background: #FFF7E6; border: 1px solid #EBCB8B; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #6B4A00; text-align: left; }
:root[data-theme="dark"] .preview-hint { background: rgba(235,203,139,.12); border-color: #8A6A2A; color: #F1D9A6; }
.legal { white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 260px; overflow: auto; font-size: 13px; }

/* ---------- Ventanas, avisos y notificaciones ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 24, 40, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
:root[data-theme="dark"] .modal-bg { background: rgba(0, 0, 0, .68); }
.modal { background: var(--card); color: var(--text); border-radius: 10px; padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h2 { margin-bottom: 12px; }
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; max-width: 90vw; }
#toast.show { opacity: 1; } #toast.err { background: #B42318; }
.notif { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.notif.unread .msg { font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; flex: none; }
.dot.off { background: transparent; }
.hist { font-size: 12.5px; } .hist div { padding: 6px 0; border-bottom: 1px solid var(--line-2); } .hist .when { color: var(--muted); }

/* ---------- Botón de tema claro / nocturno ---------- */
.theme-btn { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #E8ECF0; border-radius: 16px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; white-space: nowrap; }
.theme-btn:hover { background: var(--navy-2); }
.side .theme-btn { align-self: flex-start; margin: 0 0 8px 8px; }

/* ---------- Celular y pantallas angostas ---------- */
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, 1fr); } .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .side .brand { width: 120px; margin: 0 8px 0 0; } .side .app-sub, .side .spacer { display: none; }
  .side .who { width: 100%; }
  main { padding-block: 16px 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .form-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Propio de esta aplicación (agrega aquí tus estilos)
   ===================================================================== */
/* ayuda (manual de uso) */
.ayuda-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ayuda-head h1 { font-size: 22px; margin: 0; }
.ayuda-head .sub { margin: 4px 0 0; }
.ayuda-head a.btn { text-decoration: none; }
.ayuda-cols { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; margin-top: 16px; }
.ayuda-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; position: sticky; top: 12px; }
.ayuda-nav a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.35; }
.ayuda-nav a:hover { background: var(--line-2); }
.ayuda-nav a.on { background: var(--line-2); box-shadow: inset 3px 0 0 var(--green); font-weight: 600; }
.ayuda-doc { min-width: 0; line-height: 1.6; }
.ayuda-doc h2 { font-size: 19px; margin: 0 0 10px; }
.ayuda-doc h3 { font-size: 15.5px; margin: 20px 0 6px; }
.ayuda-doc p, .ayuda-doc li { font-size: 14.5px; }
.ayuda-doc img.cap { display: block; max-width: 100%; height: auto; margin: 12px auto 18px; border: 1px solid var(--line); border-radius: 10px; }
.ayuda-doc img.cap.cel { max-width: 300px; }
.ayuda-doc blockquote { margin: 12px 0; padding: 8px 14px; border-left: 4px solid var(--green); background: var(--line-2); border-radius: 0 8px 8px 0; }
.ayuda-doc table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0; display: block; overflow-x: auto; }
.ayuda-doc th, .ayuda-doc td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.ayuda-temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.ayuda-tema { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; background: var(--card); }
.ayuda-tema:hover { border-color: var(--green); }
.rol-tag { display: inline-block; font-size: 11px; font-weight: 600; background: var(--navy); color: #fff; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
:root[data-theme="dark"] .rol-tag { background: #3C4A7A; }
@media (max-width: 760px) { .ayuda-cols { grid-template-columns: 1fr; } .ayuda-nav { position: static; } .ayuda-head .btn { width: 100%; justify-content: center; } }

/* ---------- TFS Quality Issues ---------- */
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-grid .span3 { grid-column: 1 / -1; }
.form-grid.g3 .half { grid-column: span 3; }
.filtros { margin-bottom: 16px; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.scroll { overflow-x: auto; max-width: 100%; }
.cta { display: flex; gap: 14px; align-items: center; background: var(--navy); color: #fff; border-radius: 12px; padding: 16px 18px; text-decoration: none; margin-bottom: 14px; }
.cta .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: var(--navy); display: grid; place-items: center; font-size: 28px; font-weight: 700; flex: none; }
.cta b { display: block; font-size: 17px; } .cta span span { color: #D6DCE8; font-size: 13px; }
.srch { margin-bottom: 16px; } .srch input { flex: 1; min-width: 0; }
.card.todo { border-left: 4px solid var(--green); }
.note { background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: 13.5px; }
.note.warn { border-left-color: #E0A030; background: var(--amber-bg); }
.note.bad { border-left-color: var(--red); background: var(--red-bg); }
.note.ok { border-left-color: var(--green); background: var(--ok-bg); }
.note.todo-note { border-left-color: var(--green); }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.steps li { flex: 1; min-width: 110px; display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--muted); }
.steps li i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); font-size: 12px; font-weight: 700; flex: none; }
.steps li.done { color: var(--text); } .steps li.done i { background: var(--green); border-color: var(--green); color: var(--navy); }
.steps li.now { color: var(--text); font-weight: 600; border-color: var(--navy); } .steps li.now i { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .steps li.now { border-color: var(--blue); } :root[data-theme="dark"] .steps li.now i { background: var(--blue); color: var(--navy); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.kv div { min-width: 0; } .kv span { display: block; color: var(--muted); font-size: 12px; } .kv b { font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.acciones { margin: 0 0 16px; }
.adj { justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-2); } .adj > span { min-width: 0; overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; gap: 8px; }
.it { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); }
.it .h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.ishw { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.ishw svg { display: block; width: 100%; min-width: 640px; height: auto; }
.espinas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.esp { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.esp h3 { font-size: 14px; margin-bottom: 6px; }
.cz { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.cz.root > span:first-child { font-weight: 700; } .cz.out > span:first-child { text-decoration: line-through; color: var(--muted); }
.espf { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.espf.todo { border-left: 4px solid var(--green); padding-left: 12px; }
.hb { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 32px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; }
.hb .t { background: var(--soft); border-radius: 99px; height: 10px; overflow: hidden; } .hb .t i { display: block; height: 100%; background: var(--blue-d); border-radius: 99px; }
.hb b { text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.link-x { border: none; background: none; padding: 0 0 0 4px; color: var(--blue-d); text-decoration: underline; cursor: pointer; font-size: 11.5px; }
.doc h3 { margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--blue); font-size: 15px; }
.doc p { margin: 6px 0; white-space: pre-wrap; }
.doc-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 3px solid var(--green); }
.plogo .tfs-mark { width: 110px; display: inline-block; } .plogo .tfs-mark img { width: 100%; }
@media (max-width: 1000px) { .form-grid.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.g3 .half { grid-column: 1 / -1; } }
@media (max-width: 820px) { .form-grid.g3, .form-grid.g5 { grid-template-columns: 1fr; } .steps li { min-width: 0; flex-basis: calc(50% - 6px); } .hb { grid-template-columns: 100px 1fr 28px; } }
.t td.mono { white-space: nowrap; }
@media (max-width: 820px) { table.t.resp thead { display: none; } table.t.resp tr { display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); } table.t.resp td { border: none; padding: 0; } table.t.resp td.mono { font-weight: 700; } }

/* ---------- RCFA: investigación de falla de equipo ---------- */
.xtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.xtabs button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; }
.xtabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
:root[data-theme="dark"] .xtabs button.on { background: #3C4A7A; border-color: #3C4A7A; }
.xsteps li { min-width: 120px; font-size: 12px; }
.xhead { margin-bottom: 12px; }
.gate { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.gate.ok { border-left: 4px solid var(--green); } .gate.now { border-left: 4px solid var(--navy); background: var(--soft); }
:root[data-theme="dark"] .gate.now { border-left-color: var(--blue); }
.reqs { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; font-size: 13px; }
.reqs li.y { color: var(--green-d); } .reqs li.n { color: var(--red); }
:root[data-theme="dark"] .reqs li.y { color: #A9D08A; }
.chk3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin-top: 6px; }
.falt { margin: 0 0 6px; padding-left: 18px; } .falt li { margin: 3px 0; }
table.xt td, table.xt th { font-size: 12.5px; }
table.xt select { max-width: 200px; padding: 3px 6px; font-size: 12.5px; }
td.nowrap, .nowrap { white-space: nowrap; }
.list .it.hip { border-left: 3px solid var(--blue); }
.hipf { background: var(--soft); border-radius: 8px; padding: 10px; }
.kpis.xk { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
button.kpi { text-align: left; cursor: pointer; font: inherit; color: inherit; }
button.kpi:hover { border-color: var(--blue-d); } button.kpi.sel { box-shadow: 0 0 0 2px var(--navy) inset; }
:root[data-theme="dark"] button.kpi.sel { box-shadow: 0 0 0 2px var(--blue) inset; }
.xfil { grid-template-columns: repeat(4, 1fr); margin-bottom: 10px; }
ul.cols { columns: 3 220px; padding-left: 18px; margin: 0; } ul.cols li { break-inside: avoid; margin: 2px 0; } ul.cols li.off, tr.off td { color: var(--muted); }
.ftw svg { min-width: 0; }
.doc h2.cap { margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--blue); font-size: 16px; }
.doc p { margin: 6px 0; } .toc { columns: 2 260px; margin: 0; padding-left: 22px; font-size: 13px; }
details > summary { cursor: pointer; padding: 6px 0; }
@media (max-width: 760px) {
  .xfil { grid-template-columns: 1fr 1fr; }
  .xtabs button { flex: 1 1 calc(50% - 6px); text-align: left; }
  .xsteps li { min-width: calc(50% - 6px); }
  table.xt select { max-width: 150px; }
}
/* El texto solo para lectores de pantalla queda dentro de su tabla (si no, ensancha la página) */
.scroll, .gate { position: relative; }

/* ---------- Contención en los cuatro lugares ---------- */
.lug { display: grid; gap: 8px; }
.lug-r { display: grid; grid-template-columns: minmax(130px, 170px) minmax(150px, 230px) minmax(0, 1fr); gap: 8px; align-items: center; }
.lug-r b { font-size: 13px; }
@media (max-width: 760px) { .lug-r { grid-template-columns: 1fr; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); } }

/* Cierre del ACR: evidencia de la verificación de eficacia (auditoría QI-11) */
fieldset.f { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-inline: 0; }
fieldset.f legend { padding: 0 4px; }
