/* Consola de diagnostico integral (prefijo diag). */
.diag { --d-acc: #d98a0b; --d-soft: #fff4de; --d-line: var(--line, #cfdae6); --d-muted: #4a5d70;
  background: var(--card, #fff); color: #0b1f33; border: 1px solid var(--d-line); border-radius: 8px; padding: 18px; margin: 26px 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.diag *, .diag *::before, .diag *::after { box-sizing: border-box; }
.diag-head { display: flex; flex-direction: column; gap: 2px; }
.diag-head strong { font-size: 1.15rem; }
.diag-head span { color: var(--d-muted); font-size: .92rem; line-height: 1.5; }
.diag button { font: inherit; cursor: pointer; color: #0b1f33; }
.diag button:disabled { cursor: not-allowed; opacity: .55; }
.diag button:focus-visible, .diag select:focus-visible { outline: 3px solid var(--d-acc); outline-offset: 2px; }
.diag-cases, .diag-steps, .diag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.diag-case, .diag-step, .diag-chip { font-size: .88rem; font-weight: 600; padding: 7px 12px; min-height: 40px; border-radius: 4px; border: 1px solid var(--d-line); background: #f3f6f9; }
.diag-case[aria-pressed="true"], .diag-step[aria-pressed="true"] { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.diag-chip[aria-pressed="true"] { background: var(--d-soft); border-color: var(--d-acc); }
.diag-hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.diag-kpi { background: #eef2f6; border: 1px solid var(--d-line); border-radius: 4px; padding: 6px 8px; display: flex; flex-direction: column; min-width: 0; }
.diag-kpi span { font-size: .74rem; color: var(--d-muted); text-transform: uppercase; letter-spacing: .04em; }
.diag-kpi strong { font-size: .95rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.diag-new { grid-column: 1 / -1; min-height: 38px; border: 1px solid var(--d-line); background: #fff; border-radius: 4px; font-size: .86rem; font-weight: 600; }
.diag-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.diag-panel[hidden] { display: none; }
.diag-box { border: 1px solid var(--d-line); border-radius: 6px; padding: 10px 12px; background: #fff; color: #0b1f33; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.diag-box > strong { font-size: .95rem; }
.diag-box p { margin: 0; line-height: 1.5; font-size: .92rem; }
.diag-why { margin: 0; padding: 10px 12px; border-left: 4px solid #1f5fa8; background: #eef4fb; color: #0b1f33; border-radius: 0 4px 4px 0; font-size: .9rem; line-height: 1.5; }
.diag-note { font-size: .82rem !important; color: var(--d-muted); }
.diag-note.okt { color: #14663d; font-weight: 700; }
.diag-note.badt { color: #b42318; font-weight: 700; }
.diag-msg { margin: 0; padding: 10px 12px; border-radius: 4px; border-left: 4px solid #1f5fa8; background: #eef4fb; color: #0b1f33; font-size: .92rem; line-height: 1.5; min-height: 2.6em; }
.diag-msg.ok { border-left-color: #1a7f4b; background: #e9f6ef; }
.diag-msg.warn { border-left-color: #d98a0b; background: #fff4de; }
.diag-msg.bad { border-left-color: #b42318; background: #fdecea; }
.diag-primary { min-height: 44px; padding: 8px 16px; border-radius: 4px; border: 0; background: #0b1f33; color: #fff !important; font-weight: 700; align-self: flex-start; }
.diag-mini { min-height: 38px; padding: 6px 12px; border-radius: 4px; border: 1px solid var(--d-line); background: #f3f6f9; font-size: .86rem; font-weight: 600; }
.diag-mini.on { background: #1a7f4b; border-color: #1a7f4b; color: #fff; }
.diag-list { display: flex; flex-direction: column; gap: 8px; }
.diag-item { display: flex; gap: 10px; align-items: flex-start; }
.diag-item div { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.diag-item span { font-size: .84rem; color: var(--d-muted); line-height: 1.45; }
.diag-tog { flex: 0 0 auto; width: 40px; height: 40px; border: 2px solid #0b1f33; background: #fff; border-radius: 4px; font-weight: 800; font-size: 1.1rem; }
.diag-tog[aria-pressed="true"] { background: #1a7f4b; border-color: #1a7f4b; color: #fff; }
.diag-tech { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.diag-mb { text-align: left; padding: 8px 10px; min-height: 52px; border: 1px solid var(--d-line); background: #f3f6f9; border-radius: 4px; display: flex; flex-direction: column; gap: 2px; }
.diag-mb strong { font-size: .9rem; }
.diag-mb span { font-size: .78rem; color: var(--d-muted); }
.diag-mb[aria-pressed="true"] { border-color: var(--d-acc); background: var(--d-soft); }
.diag-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-width: 0; }
.diag-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 860px) { .diag-two { grid-template-columns: minmax(0, 1fr); } }
.diag-tw { overflow-x: auto; min-width: 0; }
.diag-tb { border-collapse: collapse; width: 100%; font-size: .84rem; }
.diag-tb th, .diag-tb td { border: 1px solid var(--d-line); padding: 4px 6px; text-align: left; color: #0b1f33; vertical-align: top; }
.diag-tb th { background: #eef2f6; }
.diag-tb td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.diag-tb tr.diag-grp td { background: #dbe5ef; font-weight: 700; }
.diag-tb td.st0 { color: #14663d; font-weight: 700; }
.diag-tb td.st1 { color: #8a5a00; font-weight: 700; background: #fff4de; }
.diag-tb td.st2 { color: #b42318; font-weight: 700; background: #fdecea; }
.diag-svg { display: block; width: 100%; height: auto; max-width: 100%; background: #f8fafc; border: 1px solid #e1e8ef; border-radius: 4px; }
.diag-svg text { font-family: Helvetica, Arial, sans-serif; fill: #0b1f33; }
.diag-svg .diag-v { font-size: 12px; font-weight: 700; }
.diag-svg .diag-l { font-size: 11px; fill: #4a5d70; }
.diag-ax { stroke: #0b1f33; stroke-width: 1.5; }
.diag-lim { stroke: #b42318; stroke-width: 2; stroke-dasharray: 4 3; }
.diag-bar.b0 { fill: #1a7f4b; } .diag-bar.b1 { fill: #d98a0b; } .diag-bar.b2 { fill: #b42318; }
.diag-hy { border: 1px solid var(--d-line); border-radius: 4px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.diag-hy.conf { border-color: #1a7f4b; box-shadow: inset 4px 0 0 #1a7f4b; }
.diag-hy.off { opacity: .55; }
.diag-hy-top { display: flex; justify-content: space-between; gap: 8px; }
.diag-hy-top strong { font-size: .9rem; }
.diag-hy-top span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.diag-pb { height: 10px; background: #e1e8ef; border-radius: 5px; overflow: hidden; }
.diag-pf { height: 100%; background: #2a6fb0; transition: width .4s; }
.diag-hy .diag-hd { font-size: .82rem; color: var(--d-muted); }
.diag-hy .diag-hm { font-size: .8rem; }
.diag-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.diag-fixes { display: flex; flex-direction: column; gap: 6px; }
.diag-fx { text-align: left; padding: 8px 10px; min-height: 48px; border: 1px solid var(--d-line); background: #f3f6f9; border-radius: 4px; display: flex; flex-direction: column; gap: 2px; }
.diag-fx span { font-size: .8rem; color: var(--d-muted); }
.diag-fx.on { border-color: var(--d-acc); background: var(--d-soft); }
.diag-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.diag-row select { min-height: 40px; font: inherit; padding: 6px 8px; border: 1px solid var(--d-line); border-radius: 4px; background: #fff; color: #0b1f33; }
.diag-dl { margin: 0; display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); gap: 4px 10px; font-size: .9rem; }
.diag-dl dt { font-weight: 700; } .diag-dl dd { margin: 0; overflow-wrap: anywhere; }
.diag-rep { border: 2px solid #0b1f33; }
.diag-score { font-size: 1.6rem !important; font-weight: 800; }
@media (max-width: 520px) { .diag-tb td.n { white-space: normal; } .diag-tb { font-size: .72rem; } .diag { padding: 12px; } .diag-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); } .diag-tb { font-size: .76rem; } .diag-tb th, .diag-tb td { padding: 3px 4px; } .diag-dl { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .diag-pf { transition: none; } }
