:root {
  --sidebar: #152238;
  --sidebar-2: #1b2d4a;
  --accent: #2f6fed;
  --accent-soft: #e8f0ff;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #1c2434;
  --muted: #6b778c;
  --border: #e2e8f0;
  --pendiente: #e11d48;
  --proceso: #f59e0b;
  --subsanado: #16a34a;
  --nosub: #7c3aed;
  --sci: #2f6fed;
  --za: #22a06b;
  --shadow: 0 10px 30px rgba(21, 34, 56, 0.08);
  --radius: 16px;
  --font: Arial, Helvetica, sans-serif;
  --fs: 8pt;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  font-weight: 400;
  color: var(--text);
  line-height: 1.35;
  background:
    radial-gradient(1200px 500px at 90% -10%, #dbe7ff 0%, transparent 55%),
    radial-gradient(900px 400px at 10% 0%, #dff5ea 0%, transparent 50%),
    var(--bg);
  display: flex;
  min-height: 100vh;
}

button, select, input, textarea, table, th, td, label, span, p, li, a, pre, small {
  font-family: var(--font);
  font-size: var(--fs);
}

button, select, input { font: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4, h5, h6,
.topbar h1,
.card-head h3,
.brand strong,
.kpi .value,
.kpi .label,
th,
.analisis-contexto,
.preg-nro,
.act-title,
.doc-page-head strong,
.guia-title-row th,
.guia-section-row th,
.guia-col-row th,
.manual-list-item .ml-n,
.nav-item {
  font-family: var(--font);
  font-size: var(--fs);
  font-weight: 700;
}

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--sidebar) 0%, #0f1a2c 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 10px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 18px;
}
.brand-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 8px 18px rgba(37,99,235,.35);
}
.brand strong { display: block; font-size: 13px; letter-spacing: .04em; }
.brand span { font-size: 12px; color: #9fb0c9; }

.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-item {
  border: 0;
  background: transparent;
  color: #b7c4d8;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.25;
  transition: .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(47,111,237,.95), rgba(47,111,237,.65));
  color: #fff;
  box-shadow: 0 8px 20px rgba(47,111,237,.28);
}
.nav-item i { width: 18px; text-align: center; margin-top: 2px; flex-shrink: 0; }

.user-card {
  display: flex; gap: 12px; align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 12px;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #334155; display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
}
.user-card strong { display: block; font-size: 13px; }
.user-card small { display: block; color: #93a4bc; font-size: 11px; }
.user-card em { display: flex; align-items: center; gap: 6px; font-style: normal; color: #86efac; font-size: 11px; margin-top: 4px; }
.user-card .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }

.main {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.02em; }
.topbar p { margin: 0; color: var(--muted); font-size: 14px; max-width: 520px; }

.filters {
  display: flex; gap: 10px; flex-wrap: wrap;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.filters select {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 130px;
  color: var(--text);
}

.view { display: none; }
.view.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.8);
  position: relative;
  overflow: hidden;
}
.kpi::after {
  content: "";
  position: absolute; right: -20px; top: -20px;
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--soft, #eef2ff);
  opacity: .9;
}
.kpi-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
  background: var(--tone, var(--accent));
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .value { font-size: 34px; font-weight: 700; margin: 4px 0; letter-spacing: -.03em; }
.kpi .meta { font-size: 12px; color: var(--muted); }

.mid-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.mid-grid.two { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #edf1f6;
  padding: 16px 18px;
}
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 12px;
}
.card-head h3 { margin: 0; font-size: 15px; }
.legend { color: var(--muted); font-size: 12px; display: flex; gap: 10px; align-items: center; }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.legend .sci { background: var(--sci); }
.legend .za { background: var(--za); }

.donut-wrap { position: relative; max-width: 260px; margin: 0 auto; }
.donut-center {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none; text-align: center;
}
.donut-center strong { display: block; font-size: 28px; line-height: 1; }
.donut-center span { color: var(--muted); font-size: 12px; }

.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow: auto; }
.recent-list li {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px;
  align-items: start; padding: 10px; border-radius: 12px; background: #f8fafc;
}
.recent-list .ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 13px;
}
.recent-list strong { display: block; font-size: 13px; line-height: 1.3; }
.recent-list small { color: var(--muted); font-size: 11px; }
.recent-list time { color: var(--muted); font-size: 11px; white-space: nowrap; }

.table-layout {
  display: grid;
  grid-template-columns: 1.7fr .9fr;
  gap: 16px;
  align-items: start;
}
.table-card { padding-bottom: 10px; }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.table-tools input, .table-tools select {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: #fff;
}
.table-tools input { min-width: 220px; }

.table-scroll { overflow: auto; max-height: 640px; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: #f8fafc; z-index: 1;
  text-align: left; padding: 12px 10px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border);
}
tbody td { padding: 12px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
tbody tr { cursor: pointer; transition: background .15s; }
tbody tr:hover, tbody tr.active { background: #f0f6ff; }
.desc-cell { max-width: 320px; }
.desc-cell span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#main-table th:first-child,
#main-table td:first-child { width: 56px; text-align: center; }
#main-table th:nth-child(3),
#main-table td:nth-child(3) { white-space: nowrap; min-width: 110px; }

.matrix-pregunta {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
.matrix-pregunta th,
.matrix-pregunta td {
  padding: 8px 6px;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.matrix-pregunta th {
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}
/* Nro | Pregunta | SUPERVISION DE VISITA (2023-2025) | PDJ 2025 PETRO | Manual + Actividades */
.matrix-pregunta thead th {
  text-align: center;
  vertical-align: middle;
}
.matrix-pregunta th.col-group-sup {
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #e8eef6;
  color: #0c3a6e;
}
.matrix-pregunta th.col-year {
  width: 78px;
  color: #64748b;
}
.matrix-pregunta th.col-nro,
.matrix-pregunta td:nth-child(1) { width: 40px; text-align: center; }
.matrix-pregunta th.col-preg,
.matrix-pregunta td:nth-child(2) { width: 22%; text-align: left; }
.matrix-pregunta td:nth-child(3),
.matrix-pregunta td:nth-child(4),
.matrix-pregunta td:nth-child(5) {
  width: 78px;
  text-align: center;
  min-width: 0;
}
.matrix-pregunta th.col-petro,
.matrix-pregunta td:nth-child(6) {
  width: 78px;
  text-align: center;
  min-width: 0;
}
.matrix-pregunta th.col-manual-act,
.matrix-pregunta td:nth-child(7) {
  width: auto;
  min-width: 220px;
  text-align: left;
}
.matrix-pregunta th.col-manual-act {
  line-height: 1.3;
  padding: 8px 10px;
}
.th-stack-top,
.th-stack-bot {
  display: block;
  font-weight: 700;
  color: #0c3a6e;
  text-transform: uppercase;
}
.th-stack-top { margin-bottom: 2px; }
.th-stack-bot { font-size: 10px; color: #334155; }
.cell-manual-act { vertical-align: top; }
.manual-act-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.manual-act-btn { width: 100%; }
.manual-act-body { width: 100%; }
.matrix-pregunta th.col-observ,
.matrix-pregunta td.cell-observ {
  width: 28%;
  min-width: 200px;
  vertical-align: top;
}
.matrix-pregunta th.col-observ {
  color: #0c3a6e;
  font-weight: 700;
}
.matrix-pregunta th.col-estado-agosto,
.matrix-pregunta td.cell-estado-agosto,
.matrix-ds052 th.col-estado-agosto,
.matrix-ds052 td.cell-estado-agosto {
  width: 118px;
  min-width: 108px;
  vertical-align: top;
  text-align: center;
}
.matrix-pregunta th.col-estado-agosto,
.matrix-ds052 th.col-estado-agosto {
  color: #0c3a6e;
  font-weight: 700;
  background: #eef6ff;
  font-size: 11px;
  line-height: 1.25;
}
.estado-agosto-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #1c2434;
  background: #fff;
  cursor: pointer;
}
.estado-agosto-select:focus {
  outline: 2px solid #93c5fd;
  border-color: #60a5fa;
}

/* DS052 — un solo año 2025 */
.matrix-ds052 th.col-year-2025 {
  background: #dbeafe;
  color: #1e3a8a;
}
.matrix-ds052 th.col-petro-ds052 {
  background: #fef3c7;
  color: #92400e;
}
.matrix-ds052 th.col-hecho,
.matrix-ds052 td.cell-hecho {
  width: 34%;
  text-align: left;
  vertical-align: top;
}
.matrix-ds052 .hecho-block {
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
}
.matrix-ds052 .hecho-block .hecho-meta {
  display: block;
  margin-bottom: 4px;
  color: #0c3a6e;
  font-weight: 700;
  font-size: 11px;
}
.matrix-ds052 .hecho-block .base-legal {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
  color: #475569;
  font-size: 11px;
}
.matrix-ds052 td:nth-child(3),
.matrix-ds052 td:nth-child(4) {
  text-align: center;
  vertical-align: middle;
  width: 110px;
}
.observ-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.observ-input {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  color: #1c2434;
  background: #fff;
  line-height: 1.35;
}
.observ-input:focus {
  outline: 2px solid #93c5fd;
  border-color: #60a5fa;
}
.observ-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-save-observ {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 700;
  cursor: pointer;
}
.btn-save-observ:hover { background: #dcfce7; }
.observ-status {
  color: #64748b;
  font-size: 10px;
}
.observ-status.ok { color: #166534; font-weight: 700; }
.observ-status.dirty { color: #b45309; }
.tag-petro.na {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 8pt;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.cell-petro { text-align: center; }
.matrix-pregunta td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.cell-pregunta .preg-nro { display: block; margin-bottom: 4px; color: #0c3a6e; }
.cell-pregunta .preg-texto {
  font-weight: 400;
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}
.analisis-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.analisis-title-wrap h3 { margin: 0; }
.analisis-contexto {
  font-size: 13px;
  font-weight: 700;
  color: #b91c1c;
  letter-spacing: 0.01em;
}
.tag-existe, .tag-noexiste {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.tag-existe { background: #ffe4e6; color: #e11d48; }
.tag-noexiste { background: #dcfce7; color: #16a34a; }
.cell-existe { background: #fff8f8; }
.cell-noexiste { background: #f7fdf9; }
.cell-manual-q { white-space: normal; }
.btn-manual-q {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid #93c5fd; background: #eff6ff; color: #1d4ed8;
  border-radius: 8px; padding: 5px 7px; font-size: 11px; font-weight: 600;
  white-space: normal; line-height: 1.2; max-width: 100%;
}
.btn-manual-q:hover { background: #dbeafe; }
.cell-actividades {
  font-size: 11px;
  color: #1c2434;
  line-height: 1.35;
  vertical-align: top;
}
.act-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  max-height: 140px;
  overflow: auto;
}
.act-title {
  font-weight: 700;
  font-size: 10px;
  color: #0c3a6e;
  margin-bottom: 4px;
  line-height: 1.3;
}
.act-list {
  margin: 0;
  padding-left: 16px;
}
.act-list li {
  margin-bottom: 3px;
}
.act-full-text {
  white-space: pre-wrap;
}
.preg-filters select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  min-width: 150px;
}
.matrix-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.map-table th:nth-child(2),
.map-table th:nth-child(4),
.map-table th:nth-child(6),
.map-table td:nth-child(2),
.map-table td:nth-child(4),
.map-table td:nth-child(6) { text-align: center; white-space: nowrap; }
.map-table td:nth-child(3),
.map-table td:nth-child(5) { min-width: 220px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.pendiente { background: #ffe4e6; color: var(--pendiente); }
.badge.subsanado { background: #dcfce7; color: var(--subsanado); }
.badge.nosubsanable { background: #ede9fe; color: var(--nosub); }
.badge.enproceso { background: #fef3c7; color: var(--proceso); }

.actions { display: flex; gap: 6px; }
.actions button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--muted);
}
.actions button:hover { color: var(--accent); border-color: #bfdbfe; background: #eff6ff; }

.table-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding-top: 12px; color: var(--muted); font-size: 12px; flex-wrap: wrap;
}
.pager { display: flex; gap: 4px; }
.pager button {
  min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text);
}
.pager button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.detail-card { position: sticky; top: 16px; min-height: 420px; display: flex; flex-direction: column; }
.detail-body { flex: 1; overflow: auto; max-height: 520px; font-size: 13px; line-height: 1.55; }
.detail-body h4 { margin: 0 0 4px; font-size: 18px; }
.detail-body .meta-row { color: var(--muted); margin-bottom: 14px; font-size: 12px; }
.detail-body .block { margin-bottom: 14px; padding: 12px; border-radius: 12px; background: #f8fafc; }
.detail-body .block strong { display: block; margin-bottom: 6px; color: #334155; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }

.btn-primary, .btn-secondary {
  border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; width: 100%; margin-top: 12px; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-secondary { background: #eef2ff; color: #1e3a8a; border: 1px solid #dbeafe; }
.export-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.export-actions .btn-primary,
.export-actions .btn-secondary {
  width: auto;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.export-actions .btn-secondary {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #86efac;
}
.export-actions .btn-secondary:hover { background: #d1fae5; }

.report-box {
  background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 16px;
  overflow: auto; max-height: 420px; font-size: 12px; line-height: 1.5;
}

.doc-list, .config-list { list-style: none; padding: 0; margin: 0; }
.doc-list li, .config-list li {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px;
  background: #f8fafc; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.doc-list small { color: var(--muted); }

.modal {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: grid; place-items: center; z-index: 50; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: #fff; border-radius: 18px; width: min(760px, 100%);
  max-height: 85vh; overflow: auto; padding: 24px; position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
}
.modal-close {
  position: absolute; right: 12px; top: 10px; border: 0; background: transparent;
  font-size: 28px; color: var(--muted); line-height: 1;
}

.doc-toolbar { margin-bottom: 14px; }
.doc-toolbar .card-head { margin-bottom: 6px; }
.pager-label {
  display: inline-flex; align-items: center; min-width: 72px; justify-content: center;
  font-weight: 600; color: var(--text); background: #f1f5f9; border-radius: 10px;
  padding: 8px 12px; border: 1px solid var(--border);
}
.doc-viewer { padding: 16px 18px 22px; }
.doc-page-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 10px; font-size: 14px;
}
.doc-page-head span { color: var(--muted); }
.doc-q-text {
  margin: 0 0 12px; color: var(--text); font-size: 14px; line-height: 1.45;
  padding: 10px 12px; background: #f8fafc; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
}
.doc-page-frame {
  background: #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
  max-height: calc(100vh - 260px);
  text-align: center;
}
.doc-page-frame img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.18);
  background: #fff;
  border-radius: 4px;
}
.map-badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; vertical-align: middle;
}
.map-badge.ok { background: #dcfce7; color: #166534; }
.map-badge.nohay { background: #ffe4e6; color: #9f1239; }
.map-badge.crit { background: #e0e7ff; color: #3730a3; }
.act-block.act-crit { border-color: #c7d2fe; background: #f8faff; }
.map-detail { margin-top: 6px; color: var(--muted); font-size: 13px; }

/* Guías PDJ — misma estructura PDF (SCI y ZA) */
.guia-table-wrap { overflow: auto; margin-bottom: 12px; }
.guia-crit {
  font-size: 13px; color: #334155; margin-bottom: 8px; padding: 6px 2px;
}
.guia-osiner-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  background: #fff;
  border: 1px solid #7b8794;
}
.guia-osiner-table th,
.guia-osiner-table td {
  border: 1px solid #7b8794;
  padding: 8px 10px;
  vertical-align: top;
}
.guia-title-row th {
  background: #0c3a6e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  padding: 10px 12px;
}
.guia-section-row th,
.guia-col-row th {
  background: #d9e2ec;
  color: #1c2434;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
}
.guia-osiner-table .col-n { width: 5%; text-align: center; font-weight: 700; }
.guia-osiner-table .col-preg { width: 34%; }
.guia-osiner-table .col-base { width: 22%; }
.guia-osiner-table .col-cumple { width: 10%; }
.guia-osiner-table .col-visita { width: 10%; }
.guia-osiner-table .col-sup { width: 19%; }
.guia-data-row td { min-height: 110px; }
.guia-data-row .col-preg strong { display: block; margin-bottom: 6px; line-height: 1.35; }
.guia-ayuda { font-weight: 400; font-size: 12px; color: #334155; line-height: 1.35; }
.guia-osiner-table .empty-sup {
  background: #fff;
  min-height: 110px;
  height: 120px;
}
.guia-cover {
  text-align: center; padding: 48px 20px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 12px;
}
.guia-cover h2 { margin: 0 0 12px; color: #0c3a6e; }
.guia-pdf-preview { margin-top: 8px; }
.guia-pdf-preview summary {
  cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px;
}

/* Manual — lista de cuestionarios */
.manual-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 14px;
  align-items: start;
}
.manual-list-panel { position: sticky; top: 12px; max-height: calc(100vh - 160px); display: flex; flex-direction: column; }
.manual-list {
  overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px;
}
.manual-list-item {
  text-align: left; border: 1px solid var(--border); background: #f8fafc;
  border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; width: 100%;
}
.manual-list-item:hover { border-color: #93c5fd; background: #eff6ff; }
.manual-list-item.active {
  border-color: var(--accent); background: #e8f0ff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.manual-list-item .ml-n { font-weight: 700; font-size: 13px; color: #0c3a6e; }
.manual-list-item .ml-q { font-size: 12px; color: var(--muted); line-height: 1.35; }
.manual-list-item .map-badge { justify-self: start; font-size: 10px; padding: 2px 8px; }
.manual-sec { margin: 14px 0; }
.manual-sec h4 {
  margin: 0 0 8px; font-size: 13px; color: #0c3a6e;
  border-bottom: 1px solid var(--border); padding-bottom: 4px;
}
.manual-sec-body {
  white-space: pre-wrap; font-size: 13px; line-height: 1.45;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: #1c2434;
}
.manual-pages { display: flex; flex-direction: column; gap: 14px; }
.manual-page-fig { margin: 0; }
.manual-page-fig figcaption {
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
.manual-page-fig img {
  width: 100%; height: auto; background: #fff;
  border: 1px solid #cbd5e1; border-radius: 6px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
#manual-search { min-width: 160px; }

@media (max-width: 1100px) {
  .manual-layout { grid-template-columns: 1fr; }
  .manual-list-panel { position: static; max-height: 280px; }
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .mid-grid, .table-layout { grid-template-columns: 1fr; }
  .detail-card { position: static; }
}

/* INCUMPLIMIENTOS — fichas tipo informe */
.inc-count {
  font-weight: 700;
  color: #0c3a6e;
  align-self: center;
}
.inc-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.inc-ficha {
  display: grid;
  grid-template-columns: 64px 1fr;
  border: 1px solid #c5ced9;
  background: #fff;
}
.inc-ficha-item {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 8px;
  border-right: 1px solid #c5ced9;
  background: #f8fafc;
  font-weight: 700;
  color: #0c3a6e;
  font-size: 14px !important;
}
.inc-ficha-body {
  padding: 10px 14px 12px;
}
.inc-ficha-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.inc-ficha-head .inc-hecho {
  font-weight: 700;
  color: #0c3a6e;
}
.inc-ficha-head .inc-meta {
  color: #64748b;
}
.inc-sec {
  margin-top: 8px;
}
.inc-sec-title {
  font-weight: 700;
  color: #0c3a6e;
  margin-bottom: 2px;
}
.inc-sec p {
  margin: 0;
  color: #1c2434;
  line-height: 1.4;
  white-space: pre-wrap;
}
.inc-empty {
  text-align: center;
  padding: 28px;
  color: #6b778c;
  border: 1px dashed #cbd5e1;
}
@media (max-width: 860px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .user-card { display: none; }
  .main { padding: 16px; }
}

/* Tipografía global: Arial 8 / títulos Arial 8 Bold */
body, button, select, input, textarea, table, th, td, label, p, li, a, span, small, pre, div {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 8pt !important;
  font-weight: 400;
}
h1, h2, h3, h4, h5, h6,
.topbar h1,
.card-head h3,
.brand strong,
.kpi .label,
.kpi .value,
th,
strong,
b,
.analisis-contexto,
.preg-nro,
.act-title,
.doc-page-head strong,
.guia-title-row th,
.guia-section-row th,
.guia-col-row th,
.manual-list-item .ml-n,
.nav-item,
.badge,
.map-badge,
.tag-existe,
.tag-noexiste,
.btn-primary,
.btn-secondary,
.btn-manual-q {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 8pt !important;
  font-weight: 700 !important;
}
.kpi .value { letter-spacing: 0 !important; }

