/* ============================================================================
   agrario.css — CSS del módulo Agrario.
   Prefijo de clases: .trz-  (trazabilidad de contenedor, G5.1)
   Colores por variable corporativa; los hex de respaldo son la paleta del ERP.
   ============================================================================ */

/* ── Banner de página ─────────────────────────────────────────────────────── */
.trz-banner {
    background: linear-gradient(135deg, var(--primario, #1e3a5f) 0%, #2c5282 100%);
    border-bottom: 3px solid #d4af37;
    border-radius: 6px 6px 0 0;
    padding: 14px 18px;
    margin-bottom: 12px;
    color: #fff;
}

.trz-titulo {
    margin: 0;
    font-weight: 700;
    letter-spacing: .2px;
}

.trz-sub {
    font-size: 12px;
    opacity: .88;
}

/* ── Cabecera del contenedor ──────────────────────────────────────────────── */
.trz-cab {
    margin-bottom: 10px;
}

.trz-cab .trz-lbl {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #6b7a90;
}

.trz-cab .trz-val {
    display: block;
    font-weight: 600;
    color: var(--primario, #1e3a5f);
}

/* ── Estado de la trazabilidad ────────────────────────────────────────────── */
/* El aviso es deliberadamente prominente: un contenedor con líneas sin trazar
   no pasa una auditoría, y eso hay que verlo antes de presentarlo. */
.trz-alerta,
.trz-ok {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
}

.trz-alerta {
    background: #fdeceb;
    border-left: 4px solid #c62828;
    color: #8a1f1f;
}

.trz-ok {
    background: #edf7ee;
    border-left: 4px solid #2e7d32;
    color: #1f5c23;
    align-items: center;
}

.trz-alerta i,
.trz-ok i {
    margin-top: 2px;
    font-size: 15px;
}

/* ── Tablas ───────────────────────────────────────────────────────────────── */
.trz-h6 {
    font-weight: 700;
    color: var(--primario, #1e3a5f);
    margin-bottom: 10px;
}

.trz-tabla thead th,
.trz-tabla-origen thead th {
    background: var(--primario, #1e3a5f);
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    border: 0;
    white-space: nowrap;
}

.trz-tabla tbody tr:nth-child(even),
.trz-tabla-origen tbody tr:nth-child(even) {
    background: #f7f9fc;
}

.trz-tabla tfoot .trz-total td {
    background: #eef2f8;
    font-weight: 700;
    color: var(--primario, #1e3a5f);
}

.trz-tabla-origen thead th {
    background: #2c5282;
    font-size: 10.5px;
}

.trz-tabla-origen {
    margin-bottom: 0;
}

/* ── Línea del packing ────────────────────────────────────────────────────── */
.trz-linea {
    border: 1px solid var(--linea-suave, #e0e4ec);
    border-left: 4px solid #2e7d32;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #fff;
}

/* Rojo = esta línea no llega a un productor. */
.trz-linea-sin {
    border-left-color: #c62828;
    background: #fffafa;
}

.trz-linea-cab {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-bottom: 8px;
}

.trz-chip {
    background: #eef2f8;
    color: var(--primario, #1e3a5f);
    border-radius: 10px;
    padding: 1px 9px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.trz-cant {
    color: #fe7800;
    font-weight: 700;
    white-space: nowrap;
}

.trz-lote {
    margin-left: auto;
    font-size: 12px;
    color: #4a5a70;
    white-space: nowrap;
}

.trz-sin-origen {
    font-size: 12px;
    color: #8a1f1f;
    background: #fdeceb;
    border-radius: 4px;
    padding: 7px 10px;
}

.trz-vacio {
    font-size: 13px;
    color: #6b7a90;
    padding: 14px 0;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .trz-lote {
        margin-left: 0;
        white-space: normal;
    }

    .trz-linea-cab {
        font-size: 12px;
    }
}

/* ── Genealogía multinivel (G5.2) ─────────────────────────────────────────── */
.trz-genealogia {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f3f0e4;
    border-left: 4px solid #d4af37;
    border-radius: 6px;
    padding: 9px 14px;
    margin-top: 8px;
    font-size: 12.5px;
    color: #6b5a1f;
}

/* Nivel = saltos de producción entre el contenedor y la parcela. */
.trz-nivel {
    display: inline-block;
    min-width: 20px;
    text-align: center;
    background: #2c5282;
    color: #fff;
    border-radius: 9px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 6px;
}

/* ============================================================================
   G10 — Control de calidad dinámico.
   Prefijos: .ccfg- (configuración) · .ccal- (modal de captura) · .cdin- (campos)
             .acop- (acopio) · .rec- (recepción)
   ============================================================================ */

/* ── Configuración por producto ───────────────────────────────────────────── */
.ccfg-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primario, #1e3a5f) 0%, #2c5282 100%);
    border-bottom: 3px solid #d4af37;
    border-radius: 6px 6px 0 0;
    padding: 14px 18px;
    margin-bottom: 12px;
    color: #fff;
}

.ccfg-titulo {
    margin: 0;
    font-weight: 700;
}

.ccfg-sub {
    font-size: 12px;
    opacity: .88;
}

.ccfg-ayuda {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #eef4fb;
    border-left: 4px solid #1976d2;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 12.5px;
    color: #1c3f66;
}

.ccfg-h6 {
    font-weight: 700;
    color: var(--primario, #1e3a5f);
}

.ccfg-hint {
    display: block;
    font-size: 11.5px;
    color: #6b7a90;
    margin-top: 2px;
}

.ccfg-tabla thead th {
    background: var(--primario, #1e3a5f);
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    border: 0;
    white-space: nowrap;
}

.ccfg-tabla tbody tr:nth-child(even) {
    background: #f7f9fc;
}

/* Una configuración anulada se ve, pero apagada: sigue explicando por qué ese
   producto dejó de pedir características. */
.ccfg-anulada {
    opacity: .55;
}

.ccfg-vacio {
    text-align: center;
    color: #6b7a90;
    font-size: 12.5px;
    padding: 18px 8px;
}

/* Acopio y recepción con colores distintos: son dos lecturas distintas y la
   pantalla lo dice de un vistazo. */
.ccfg-op {
    display: inline-block;
    border-radius: 10px;
    padding: 1px 9px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.ccfg-op-a { background: #2c5282; }
.ccfg-op-r { background: #fe7800; }

/* Cero características habilitadas es un error de configuración silencioso:
   la fila existe y no pide nada. */
.ccfg-sin-campos {
    display: inline-block;
    background: #fdeceb;
    color: #c62828;
    border-radius: 9px;
    padding: 0 7px;
    font-weight: 700;
}

/* ── Modal de captura ─────────────────────────────────────────────────────── */
.ccal-header {
    background: var(--primario, #1e3a5f);
    color: #fff;
    border-bottom: 3px solid #d4af37;
}

.ccal-header .close {
    color: #fff;
    opacity: .85;
}

.ccal-cod {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, .18);
    border-radius: 9px;
    padding: 1px 8px;
    margin-left: 8px;
}

.ccal-linea {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--linea-suave, #e0e4ec);
}

.ccal-chip {
    background: #eef2f8;
    color: var(--primario, #1e3a5f);
    border-radius: 10px;
    padding: 1px 9px;
    font-size: 11px;
    font-weight: 600;
}

.ccal-firma {
    font-size: 11.5px;
    color: #6b7a90;
    margin-bottom: 10px;
}

.ccal-sin-config {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fdf6e7;
    border-left: 4px solid #c77700;
    border-radius: 6px;
    padding: 11px 14px;
    font-size: 12.5px;
    color: #6b4b06;
}

/* ── Campos dinámicos ─────────────────────────────────────────────────────── */
.cdin-vacio {
    font-size: 12.5px;
    color: #6b7a90;
    padding: 14px 0;
    text-align: center;
}

/* Una característica que se dejó de pedir pero tiene valor guardado: se muestra
   tachada porque es dato histórico, no un campo por llenar. */
.cdin-baja {
    color: #c62828;
    text-decoration: line-through;
}

.cdin-solo-lectura {
    font-weight: 600;
    color: var(--primario, #1e3a5f);
    padding-top: 4px;
}

.cdin-nota {
    font-size: 11.5px;
    color: #fe7800;
    margin-top: 10px;
}

/* ── Acopio y recepción ───────────────────────────────────────────────────── */
.acop-cal-pend {
    font-size: 11px;
    color: #6b7a90;
    white-space: nowrap;
}

.acop-mezcla {
    font-size: 11.5px;
    color: #8a1f1f;
    background: #fdeceb;
    border-radius: 4px;
    padding: 6px 9px;
    margin-top: 4px;
}

/* El indicador de la doble validación: la recepción midió distinto que el acopio. */
.rec-difiere {
    color: #c62828;
    margin-left: 6px;
    font-size: 13px;
}


/* ============================================================================
   CERTIFICACIONES — rediseño 2026-09-12
   Prefijo: .cert-

   Cubre la rama Certificaciones del módulo: Campañas, Agricultores, Certificados
   de campaña, Datos del predio y el modal de cultivo. Las cinco pantallas
   comparten el MISMO lenguaje visual a propósito: tarjeta blanca sobre fondo
   neutro, encabezado con título grande y acción naranja a la derecha, franja de
   KPIs, y tabla con encabezado tenue en versalitas. Reusar estas clases antes de
   inventar una variante: la consistencia entre pantallas es la mitad del rediseño.
   ============================================================================ */

/* ── Encabezado de pantalla ───────────────────────────────────────────────── */
.cert-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 4px 0 18px 0;
}

.cert-head__txt { min-width: 220px; }

.cert-h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.4px;
    color: var(--primario, #1e3a5f);
    line-height: 1.15;
}

.cert-sub {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}

.cert-head__acc {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Botones ──────────────────────────────────────────────────────────────── */
/* El naranja corporativo marca LA acción principal de la pantalla, una sola por
   vista. Todo lo demás es un botón claro con borde: si todo grita, nada guía. */
.cert-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #dbe1ea;
    background: #fff;
    color: #33415c;
    border-radius: 8px;
    padding: 9px 15px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    white-space: nowrap;
}

.cert-btn:hover { background: #f4f7fb; border-color: #c7d1de; }
.cert-btn:disabled { opacity: .55; cursor: not-allowed; }

.cert-btn--pri {
    background: var(--secundario, #fe7800);
    border-color: var(--secundario, #fe7800);
    color: #fff;
    box-shadow: 0 1px 2px rgba(254, 120, 0, .28);
}

.cert-btn--pri:hover { background: #e86d00; border-color: #e86d00; color: #fff; }

.cert-btn--soft {
    background: #eef4ff;
    border-color: #dbe6fb;
    color: #1d4ed8;
}

.cert-btn--soft:hover { background: #e2ecfe; border-color: #c9dbf8; }

.cert-btn--danger { color: #c62828; }
.cert-btn--danger:hover { background: #fdf0f0; border-color: #f3c9c9; }

.cert-btn--icon { padding: 9px 11px; }
.cert-btn--sm { padding: 7px 12px; font-size: 12.5px; }

/* ── Buscador ─────────────────────────────────────────────────────────────── */
.cert-search { position: relative; min-width: 260px; }

.cert-search > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}

.cert-search > input {
    width: 100%;
    border: 1px solid #dbe1ea;
    border-radius: 8px;
    padding: 10px 13px 10px 34px;
    font-size: 13.5px;
    background: #fff;
    color: #1f2937;
}

.cert-search > input::placeholder { color: #9aa7b8; }

.cert-search > input:focus {
    outline: none;
    border-color: #93b4e6;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, .08);
}

/* ── Franja de KPIs ───────────────────────────────────────────────────────── */
.cert-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.cert-kpi {
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 12px;
    padding: 16px 18px;
}

.cert-kpi__lbl {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #7c8798;
    margin-bottom: 8px;
}

.cert-kpi__val {
    font-size: 30px;
    font-weight: 700;
    color: var(--primario, #1e3a5f);
    line-height: 1;
}

.cert-kpi__val--sm { font-size: 22px; }
.cert-kpi__val--bad { color: #c62828; }

.cert-kpi__sub {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #7c8798;
}

/* Porcentaje acopiado de lo esperado, al lado de la cantidad (Datos del predio). */
.cert-avance {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

/* ── Tarjeta genérica ─────────────────────────────────────────────────────── */
.cert-card {
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 12px;
    margin-bottom: 14px;
}

.cert-card--pad { padding: 18px 20px; }

/* ── Fila-tarjeta (listado de campañas) ───────────────────────────────────── */
/* La campaña ABIERTA lleva la franja naranja a la izquierda: de un vistazo se ve
   sobre cuál se está trabajando, sin tener que leer los badges. */
.cert-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: box-shadow .15s, border-color .15s;
}

.cert-row:hover {
    border-color: #d5dee9;
    box-shadow: 0 2px 10px rgba(30, 58, 95, .07);
}

.cert-row--activa::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 12px 0 0 12px;
    background: var(--secundario, #fe7800);
}

.cert-row__anio { min-width: 96px; }

.cert-row__anio b {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primario, #1e3a5f);
    line-height: 1.05;
}

.cert-row__anio span { font-size: 12px; color: #8592a6; }

.cert-row__rango { display: flex; align-items: center; gap: 14px; }

.cert-dato__lbl {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 2px;
}

.cert-dato__val { font-size: 14px; font-weight: 600; color: #33415c; }

.cert-row__flecha { color: #c3cdda; font-size: 14px; }

.cert-row__estados { display: flex; gap: 8px; flex-wrap: wrap; }

.cert-row__acc { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* ── Píldoras de estado ───────────────────────────────────────────────────── */
/* El punto de color hace el trabajo; el relleno saturado del diseño anterior
   competía con los botones por la atención. */
.cert-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.cert-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.cert-pill--ok   { background: #e8f6ed; color: #2e7d32; }
.cert-pill--info { background: #e9f1fe; color: #1976d2; }
.cert-pill--warn { background: #fdf3e3; color: #c77700; }
.cert-pill--bad  { background: #fdeced; color: #c62828; }
.cert-pill--mute { background: #eef1f5; color: #64748b; }

/* Sin punto: para etiquetas que no son un estado (comunidad, unidad de medida). */
.cert-tag {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 600;
    background: #eef4ff;
    color: #2563a8;
    white-space: nowrap;
}

/* ── Chip de campaña activa (esquina superior derecha) ────────────────────── */
.cert-chip-camp {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #e8f6ed;
    color: #2e7d32;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
}

.cert-chip-camp::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.cert-chip-camp b { color: var(--primario, #1e3a5f); }

/* ── Migas ────────────────────────────────────────────────────────────────── */
.cert-migas {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #8592a6;
    margin-bottom: 10px;
}

.cert-migas a { color: #1976d2; cursor: pointer; }
.cert-migas a:hover { text-decoration: underline; }
.cert-migas__sep { margin: 0 8px; color: #c3cdda; }
.cert-migas__act { color: #33415c; font-weight: 600; }

/* ── Filtros por chips ────────────────────────────────────────────────────── */
.cert-filtros {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid #eef1f5;
}

.cert-chip {
    border: 1px solid #dbe1ea;
    background: #fff;
    color: #4a5568;
    border-radius: 999px;
    padding: 7px 15px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}

.cert-chip:hover { background: #f4f7fb; }

.cert-chip--on {
    background: var(--primario, #1e3a5f);
    border-color: var(--primario, #1e3a5f);
    color: #fff;
}

/* ── Tabla ────────────────────────────────────────────────────────────────── */
.cert-tabla {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.cert-tabla thead th {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #8592a6;
    background: #fafbfd;
    border-bottom: 1px solid #eef1f5;
    padding: 12px 16px;
    white-space: nowrap;
    text-align: left;
}

.cert-tabla tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f4f8;
    font-size: 13.5px;
    color: #33415c;
    vertical-align: middle;
}

.cert-tabla tbody tr:last-child td { border-bottom: 0; }
.cert-tabla tbody tr:hover { background: #fafbfd; }

.cert-tabla .cert-num { text-align: right; font-variant-numeric: tabular-nums; }
.cert-tabla .cert-acc { text-align: right; white-space: nowrap; }
.cert-tabla .cert-acc > * + * { margin-left: 6px; }

.cert-tabla tfoot td {
    background: #fafbfd;
    font-weight: 700;
    color: var(--primario, #1e3a5f);
    border-top: 1px solid #e6eaf1;
    padding: 12px 16px;
    font-size: 13px;
}

/* ── Persona: avatar + nombre ─────────────────────────────────────────────── */
.cert-persona { display: flex; align-items: center; gap: 12px; }

.cert-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .3px;
    flex: none;
}

.cert-avatar--lg { width: 56px; height: 56px; border-radius: 14px; font-size: 18px; }

.cert-persona__nom { font-weight: 600; color: #1f2937; line-height: 1.25; }
.cert-persona__sub { font-size: 12px; color: #8592a6; }

/* ── Vacío ────────────────────────────────────────────────────────────────── */
.cert-vacio {
    text-align: center;
    padding: 42px 20px;
    color: #8592a6;
    font-size: 13.5px;
}

.cert-vacio i { display: block; font-size: 26px; color: #cbd5e1; margin-bottom: 10px; }

/* ── Atajo al pie ─────────────────────────────────────────────────────────── */
.cert-atajo {
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 13.5px;
    color: #64748b;
}

.cert-atajo a { color: #1976d2; font-weight: 600; cursor: pointer; margin-left: 6px; }
.cert-atajo a:hover { text-decoration: underline; }

/* ── Ficha del predio ─────────────────────────────────────────────────────── */
.cert-ficha__top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px;
    border-bottom: 1px solid #eef1f5;
}

.cert-ficha__ojo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #94a3b8;
}

.cert-ficha__nom {
    font-size: 25px;
    font-weight: 700;
    color: var(--primario, #1e3a5f);
    line-height: 1.15;
}

/* Rejilla de datos de cabecera: se parte sola y cada celda lleva su separador
   vertical, que desaparece en la primera de la fila. */
.cert-ficha__datos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cert-ficha__dato { padding: 16px 20px; border-left: 1px solid #eef1f5; }
.cert-ficha__dato:first-child { border-left: 0; }

/* ── Lista campo/valor del modal de cultivo (vista de lectura) ────────────── */
/* Convierte los pares `col-md-3 etiqueta | col-md-3 valor` que ya existían en
   filas legibles: etiqueta tenue a la izquierda, valor firme a la derecha. Se
   hace por CSS y no reescribiendo el marcado porque son ~280 líneas de pares
   idénticos: el riesgo de romper uno a mano supera lo que se gana. */
.cert-modal .modal-content { border: 0; border-radius: 14px; }

.cert-modal .modal-body > .row { margin-bottom: 0 !important; }

.cert-modal .modal-body > .row > [class^="col-md-"] {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f4f8;
    display: flex;
    align-items: center;
    min-height: 42px;
    /* Sin border-box el padding se SUMA al ancho de la columna, los cuatro cuartos pasan del
       100% y el par etiqueta/valor se parte en dos renglones. Verificado en el harness. */
    box-sizing: border-box;
}

.cert-modal .modal-body > .row > [class^="col-md-"]:nth-child(odd) { color: #64748b; }

.cert-modal .modal-body > .row > [class^="col-md-"]:nth-child(even) {
    justify-content: flex-end;
    font-weight: 600;
    color: #1f2937;
    text-align: right;
}

.cert-modal .modal-body > .row > [class^="col-md-"] label { margin: 0; padding: 0; }

.cert-modal .modal-header {
    border-bottom: 0;
    padding: 20px 22px 8px 22px;
    align-items: flex-start;
}

.cert-modal .nav-tabs { border-bottom: 1px solid #eef1f5; }

.cert-modal .modal-footer {
    border-top: 1px solid #eef1f5;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cert-modal__ojo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #94a3b8;
}

.cert-modal__tit {
    font-size: 21px;
    font-weight: 700;
    color: var(--primario, #1e3a5f);
    line-height: 1.2;
    margin: 0;
}

.cert-modal__pie { font-size: 12.5px; color: #94a3b8; }

/* El centro de procesamiento no es un campo más: es a dónde va el producto, y la
   maqueta lo saca de la lista a propósito. */
.cert-destacado {
    background: #f5f7fb;
    border: 1px solid #e6eaf1;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 14px;
}

.cert-destacado__lbl {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #94a3b8;
}

.cert-destacado__val { font-size: 15px; font-weight: 700; color: #1f2937; margin-top: 3px; }

/* ── Menú de acciones secundarias ─────────────────────────────────────────── */
.cert-mas { position: relative; }

.cert-mas__pop {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 190px;
    background: #fff;
    border: 1px solid #e0e4ec;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
    padding: 6px;
}

.cert-mas__item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 9px 11px;
    border-radius: 7px;
    font-size: 13px;
    color: #33415c;
    cursor: pointer;
}

.cert-mas__item:hover { background: #f4f7fb; }
.cert-mas__item i { width: 15px; color: #8592a6; }
.cert-mas__item--danger { color: #c62828; }
.cert-mas__item--danger i { color: #c62828; }

.cert-mas__backdrop { position: fixed; inset: 0; z-index: 20; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cert-h1 { font-size: 24px; }
    .cert-row { align-items: flex-start; }
    .cert-row__acc { margin-left: 0; width: 100%; }
    .cert-ficha__dato { border-left: 0; border-top: 1px solid #eef1f5; }
    .cert-kpi__val { font-size: 25px; }
    .cert-search { min-width: 100%; }
}
