/* ── Homologaciones PDD ──────────────────────────────────────────────────── */

.hom-breadcrumb {
  font-size: 13px;
  color: var(--axiona-muted, #64748b);
  margin-bottom: 14px;
}
.hom-breadcrumb a {
  color: var(--axiona-blue, #1f78d1);
  cursor: pointer;
  text-decoration: none;
}
.hom-breadcrumb a:hover { text-decoration: underline; }

/* ── KPI cards resumen ─────────────────────────────────────────────────── */
.hom-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.hom-kpi {
  flex: 1 1 160px;
  background: #f7f9fc;
  border: 1px solid var(--axiona-border, #dbe2ea);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
}
.hom-kpi span {
  display: block;
  font-size: 11px;
  color: var(--axiona-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.hom-kpi strong {
  font-size: 20px;
  color: var(--axiona-navy, #0d2238);
}

/* ── Tabla de proyectos / homologaciones ───────────────────────────────── */
.hom-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hom-tabla th {
  background: #f1f5f9;
  color: var(--axiona-navy, #0d2238);
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--axiona-border, #dbe2ea);
  white-space: nowrap;
}
.hom-tabla td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: middle;
}
.hom-tabla tr:hover td { background: #f8fbff; }

/* ── Estado badges ──────────────────────────────────────────────────────── */
.hom-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hom-badge.ACTIVA   { background: #dcfce7; color: #166534; }
.hom-badge.ANULADA  { background: #fee2e2; color: #991b1b; }
.hom-badge.si       { background: #dbeafe; color: #1e40af; }
.hom-badge.no       { background: #f1f5f9; color: #64748b; }

/* ── Homologación accordion row ────────────────────────────────────────── */
.hom-homol-header {
  cursor: pointer;
  background: #f8fbff;
}
.hom-homol-header:hover td { background: #eff6ff; }
.hom-homol-header td:first-child {
  font-weight: 600;
  color: var(--axiona-navy, #0d2238);
}
.hom-homol-detalle {
  background: #fdfdfe;
  border-bottom: 2px solid #e2eaf5;
}
.hom-homol-detalle td {
  padding: 0;
}
.hom-detalle-inner {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hom-subtabla-wrap { overflow-x: auto; }
.hom-subtabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hom-subtabla th {
  background: #eef2f7;
  padding: 5px 8px;
  text-align: left;
  font-weight: 700;
}
.hom-subtabla td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
}

/* ── Overlay modales ─────────────────────────────────────────────────────── */
.hom-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(13, 34, 56, 0.52);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 12px;
  overflow-y: auto;
}
.hom-modal-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(13, 34, 56, 0.26);
  width: min(880px, 98%);
  padding: 24px;
  margin-top: auto;
  margin-bottom: auto;
}
.hom-modal-card h3 {
  margin: 0 0 16px;
  color: var(--axiona-navy, #0d2238);
  font-size: 17px;
  border-bottom: 1px solid var(--axiona-border, #dbe2ea);
  padding-bottom: 10px;
}
.hom-modal-sm { width: min(480px, 98%); }

/* ── Form sections ─────────────────────────────────────────────────────── */
.hom-form-seccion { margin-bottom: 20px; }
.hom-form-seccion h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--axiona-navy, #0d2238);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}
.hom-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.hom-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #374151;
}
.hom-field input,
.hom-field select,
.hom-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 13px;
}
.hom-field textarea { resize: vertical; min-height: 56px; }

/* ── Tarjeta de indicador / relación PDD ─────────────────────────────── */
.hom-ind-card {
  background: #f8fbff;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.hom-ind-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dbe2ea;
}
.hom-ind-card-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--axiona-navy, #0d2238);
}
.hom-ind-btn-del {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.hom-ind-btn-del:hover { background: #fee2e2; }

/* Campo solo lectura */
.campo-readonly {
  background: #f1f5f9 !important;
  color: #64748b;
  cursor: default;
}

/* ── Secciones internas de tarjeta de relación ─────────────────────────── */
.hom-ind-seccion {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2eaf5;
}
.hom-ind-seccion-last {
  padding-bottom: 2px;
}
.hom-ind-seccion-titulo {
  font-size: 11px;
  font-weight: 700;
  color: var(--axiona-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* ── Tabla dinámica metas/fuentes ─────────────────────────────────────── */
.hom-dyn-wrap { overflow-x: auto; margin-bottom: 8px; }
.hom-dyn-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 640px;
}
.hom-dyn-tabla th {
  background: #f1f5f9;
  padding: 5px 6px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid #dbe2ea;
  white-space: nowrap;
}
.hom-dyn-tabla td {
  padding: 4px 4px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.hom-dyn-tabla input,
.hom-dyn-tabla select {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
}
.hom-dyn-tabla td.hom-td-del {
  width: 32px;
  text-align: center;
}
.hom-dyn-tabla td.hom-td-del button {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 15px;
  padding: 2px 4px;
}
.hom-dyn-tabla td.hom-td-del button:hover { color: #b91c1c; }
.hom-btn-add {
  font-size: 12px;
  padding: 4px 10px;
}

/* ── Modal footer ────────────────────────────────────────────────────────── */
.hom-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--axiona-border, #dbe2ea);
}

/* ── Acciones en tabla ───────────────────────────────────────────────────── */
.hom-acciones { display: flex; gap: 5px; flex-wrap: wrap; }
.hom-acciones .btn { font-size: 12px; padding: 4px 8px; }
.hom-btn-peligro {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.hom-btn-peligro:hover { background: #fca5a5; }

/* ── Mensaje vacío ───────────────────────────────────────────────────────── */
.hom-vacio {
  text-align: center;
  padding: 28px;
  color: var(--axiona-muted, #64748b);
  font-size: 14px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .hom-detalle-inner { grid-template-columns: 1fr; }
  .hom-kpi { flex: 1 1 120px; }
}
