/* juridico_patch.css v4 — Fix fondo oscuro claro + recuadros tarjetas — carga DESPUÉS de extra_css */
/* FONDO OSCURO — /juridico/ quedaba claro porque sections/juridico.html usa [data-theme="dark"] */
html.dark-theme, html[data-theme="dark"], body.dark-theme, body[data-theme="dark"], [data-theme="dark"]{
    background: #0a0e14 !important;
    color-scheme: dark !important;
}
html.dark-theme body, html[data-theme="dark"] body, body.dark-theme, [data-theme="dark"] body{
    background: #0a0e14 !important;
}
.dark-theme .main-content, html.dark-theme .main-content, [data-theme="dark"] .main-content, html[data-theme="dark"] .main-content,
.dark-theme .juridico-container, html.dark-theme .juridico-container, [data-theme="dark"] .juridico-container{
    background: transparent !important;
}
.dark-theme #content, html.dark-theme #content, [data-theme="dark"] #content{ background: transparent !important; }

/* Header principal — SIN caja */
.juridico-header{
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--text-main, var(--juridico-text-light)) !important;
    padding: 0.6rem 0 1.2rem 0 !important;
    margin-bottom: 1.4rem !important;
}
.juridico-header h2, .juridico-header h3, .juridico-header .card-title,
.juridico-title-section h2, .juridico-title-section h3{
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: var(--text-main, var(--juridico-text-light)) !important;
}
.juridico-header p{
    color: var(--text-muted, #64748b) !important;
    background: transparent !important;
    border: none !important;
}
.juridico-header .btn-juridico-secondary{
    background: var(--bg-card, #fff) !important;
    border: 1px solid var(--border-color) !important;
    color: #475569 !important;
    backdrop-filter: none !important;
}
/* Oscuro — soporta .dark-theme, html.dark-theme y [data-theme="dark"] (sections/juridico.html usa data-theme) */
.dark-theme .juridico-header, html.dark-theme .juridico-header, [data-theme="dark"] .juridico-header, html[data-theme="dark"] .juridico-header{
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #E0E7FF !important;
}
.dark-theme .juridico-header h2, html.dark-theme .juridico-header h2, [data-theme="dark"] .juridico-header h2,
.dark-theme .juridico-header h3, html.dark-theme .juridico-header h3, [data-theme="dark"] .juridico-header h3,
.dark-theme .juridico-header .card-title, html.dark-theme .juridico-header .card-title, [data-theme="dark"] .juridico-header .card-title{ color: #E0E7FF !important; }
.dark-theme .juridico-header p, html.dark-theme .juridico-header p, [data-theme="dark"] .juridico-header p{ color: #94a3b8 !important; }
.dark-theme .juridico-header .btn-juridico-secondary, html.dark-theme .juridico-header .btn-juridico-secondary, [data-theme="dark"] .juridico-header .btn-juridico-secondary{
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #cbd5e1 !important;
}
.juridico-header .admin-item-icon-jur{ filter: none !important; }
.dark-theme .juridico-header .admin-item-icon-jur, html.dark-theme .juridico-header .admin-item-icon-jur, [data-theme="dark"] .juridico-header .admin-item-icon-jur{ filter: brightness(0) invert(1) !important; }

/* Quitar caja envolvente extra */
.juridico-card, .juridico-card.juridico-actions-card{
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 1.2rem !important;
}
.juridico-card .juridico-header, .summary-board-card .juridico-header, .legal-card .juridico-header{
    background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important;
}

/* Tarjetas Procesos/Abogados/Juicios/Contratos — SIN recuadro bordeando datos, solo sombra suave */
.juridico-grid{ gap: 1.2rem !important; }
.legal-card{
    background: var(--bg-card, var(--juridico-card-light, #fff)) !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 10px rgba(15,23,42,0.07) !important;
}
.legal-card-header{
    background: transparent !important; border: none !important; box-shadow: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    margin-bottom: 0.9rem !important; padding-bottom: 0.75rem !important; border-radius: 0 !important;
}
.legal-card-body, .legal-info-item, .legal-card-body h4, .legal-card-body strong{
    background: transparent !important; border: none !important; box-shadow: none !important;
}
.legal-card-body h4{ color: var(--text-main) !important; }
.legal-info-item{ padding: 0 !important; margin-top: 0.5rem !important; }
.legal-card-icon{ background: rgba(46,111,117,0.08) !important; border: none !important; }
.legal-badge{ border: none !important; box-shadow: none !important; }

/* Oscuro tarjetas — sin recuadro blanco, fondo elevado visible */
.dark-theme .legal-card, html.dark-theme .legal-card, [data-theme="dark"] .legal-card,
.dark-theme .legal-card, html[data-theme="dark"] .legal-card{
    background: rgba(22,28,48,0.96) !important; border: none !important; box-shadow: 0 8px 24px rgba(0,0,0,0.32) !important;
}
.dark-theme .legal-card-header, html.dark-theme .legal-card-header, [data-theme="dark"] .legal-card-header{ border-bottom-color: rgba(255,255,255,0.07) !important; }
.dark-theme .legal-card-body h4, html.dark-theme .legal-card-body h4, [data-theme="dark"] .legal-card-body h4{ color: #fff !important; }
.dark-theme .legal-info-item, html.dark-theme .legal-info-item, [data-theme="dark"] .legal-info-item{ color: #94a3b8 !important; }
.dark-theme .legal-info-item strong, html.dark-theme .legal-info-item strong, [data-theme="dark"] .legal-info-item strong{ color: #cbd5e1 !important; }
.dark-theme .legal-card-icon, html.dark-theme .legal-card-icon, [data-theme="dark"] .legal-card-icon{ background: rgba(255,255,255,0.05) !important; border: none !important; }

/* Footer de tarjetas — 3 botones SIN recuadro único que los encierra (procesos) */
.legal-card-footer{
    background: transparent !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 1rem !important;
    gap: 8px !important;
}
.legal-card-footer .btn-juridico{
    flex: 0 0 auto !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: var(--bg-card, #fff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    box-shadow: none !important;
}
.dark-theme .legal-card-footer .btn-juridico, html.dark-theme .legal-card-footer .btn-juridico, [data-theme="dark"] .legal-card-footer .btn-juridico{
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.10) !important;
}
.legal-card-footer .btn-juridico:hover{ transform: translateY(-1px) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important; }

/* Buscador y tabla — también sin recuadro pesado */
.juridico-search-container{ background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; border-radius: 14px !important; box-shadow: 0 2px 8px rgba(15,23,42,0.05) !important; }
.juridico-table-container{ background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; border-radius: 14px !important; box-shadow: 0 2px 8px rgba(15,23,42,0.05) !important; }
.dark-theme .juridico-search-container, html.dark-theme .juridico-search-container, [data-theme="dark"] .juridico-search-container,
.dark-theme .juridico-table-container, html.dark-theme .juridico-table-container, [data-theme="dark"] .juridico-table-container{ background: rgba(22,28,48,0.96) !important; border-color: rgba(255,255,255,0.07) !important; }
.jur-table th{ background: transparent !important; border-bottom: 1px solid var(--border-color) !important; }
.dark-theme .jur-table th, html.dark-theme .jur-table th, [data-theme="dark"] .jur-table th{ color: #94a3b8 !important; }

/* Summary board */
.summary-board-card{ background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; border-radius: 16px !important; box-shadow: 0 2px 12px rgba(15,23,42,0.06) !important; }
.dark-theme .summary-board-card, html.dark-theme .summary-board-card, [data-theme="dark"] .summary-board-card{ background: rgba(22,28,48,0.96) !important; border-color: rgba(255,255,255,0.07) !important; }
.board-item{ background: var(--bg-body, #f8fafc) !important; border: 1px solid var(--border-color) !important; }
.dark-theme .board-item, html.dark-theme .board-item, [data-theme="dark"] .board-item{ background: rgba(255,255,255,0.03) !important; border-color: rgba(255,255,255,0.06) !important; }

/* AUDITORIA DASHBOARD — oscuro: contenedores y tarjetas estaban claros por .audit-light */
.dark-theme body, html.dark-theme body, [data-theme="dark"] body, html[data-theme="dark"] body{ background: #0a0e14 !important; }
.dark-theme .audit-light, html.dark-theme .audit-light, [data-theme="dark"] .audit-light, html[data-theme="dark"] .audit-light{
    background: transparent !important;
}
.dark-theme .audit-light .stat-card, html.dark-theme .audit-light .stat-card, [data-theme="dark"] .audit-light .stat-card,
.dark-theme .stat-card, html.dark-theme .stat-card, [data-theme="dark"] .stat-card{
    background: rgba(22,28,48,0.96) !important;
    border-color: rgba(255,255,255,0.07) !important;
    color: #E0E7FF !important;
}
.dark-theme .audit-light .project-card, html.dark-theme .audit-light .project-card, [data-theme="dark"] .audit-light .project-card,
.dark-theme .project-card, html.dark-theme .project-card, [data-theme="dark"] .project-card{
    background: rgba(22,28,48,0.96) !important;
    border-color: rgba(255,255,255,0.07) !important;
    color: #E0E7FF !important;
}
.dark-theme .audit-light .audit-panel, html.dark-theme .audit-light .audit-panel, [data-theme="dark"] .audit-light .audit-panel,
.dark-theme .audit-panel, html.dark-theme .audit-panel, [data-theme="dark"] .audit-panel{
    background: rgba(22,28,48,0.96) !important;
    border-color: rgba(255,255,255,0.07) !important;
    color: #E0E7FF !important;
}
.dark-theme .audit-light .stat-value, html.dark-theme .audit-light .stat-value, [data-theme="dark"] .audit-light .stat-value{ color: #38bdf8 !important; }
.dark-theme .audit-light .stat-label, html.dark-theme .audit-light .stat-label, [data-theme="dark"] .audit-light .stat-label,
.dark-theme .audit-light .project-meta, html.dark-theme .audit-light .project-meta, [data-theme="dark"] .audit-light .project-meta{ color: #94a3b8 !important; }
.dark-theme .audit-light .project-info h3, html.dark-theme .audit-light .project-info h3, [data-theme="dark"] .audit-light .project-info h3{ color: #fff !important; }
.dark-theme .audit-light h1, html.dark-theme .audit-light h1, [data-theme="dark"] .audit-light h1{ color: #fff !important; }
/* Header auditoría centrado — oscuro */
.dark-theme .audit-header, html.dark-theme .audit-header, [data-theme="dark"] .audit-header{ background: rgba(22,28,48,0.96) !important; border-color: rgba(255,255,255,0.07) !important; box-shadow: 0 4px 16px rgba(0,0,0,0.28) !important; }
.dark-theme .audit-header h1, html.dark-theme .audit-header h1, [data-theme="dark"] .audit-header h1{ color: #fff !important; }
.dark-theme .audit-header .btn-audit[style*="Ver Plan Maestro"], html.dark-theme .audit-header .btn-audit[style*="Ver Plan Maestro"], [data-theme="dark"] .audit-header .btn-audit[style*="Ver Plan Maestro"],
.dark-theme .audit-header .btn-audit[style*="Abonos"], html.dark-theme .audit-header .btn-audit[style*="Abonos"], [data-theme="dark"] .audit-header .btn-audit[style*="Abonos"]{ background: rgba(255,255,255,0.06) !important; color: #E0E7FF !important; border-color: rgba(255,255,255,0.10) !important; }
/* Títulos y números que quedaban negros por .audit-light {color: var(--audit-text) !important} — excluye los que ya tienen color accent inline */
.dark-theme .audit-light h3:not([style*="color:"]), html.dark-theme .audit-light h3:not([style*="color:"]), [data-theme="dark"] .audit-light h3:not([style*="color:"]),
.dark-theme .audit-light h4:not([style*="color:"]), html.dark-theme .audit-light h4:not([style*="color:"]), [data-theme="dark"] .audit-light h4:not([style*="color:"]),
.dark-theme .audit-light strong:not([style*="color:"]), html.dark-theme .audit-light strong:not([style*="color:"]), [data-theme="dark"] .audit-light strong:not([style*="color:"]),
.dark-theme .audit-light span:not([style*="color:"]), html.dark-theme .audit-light span:not([style*="color:"]), [data-theme="dark"] .audit-light span:not([style*="color:"]){
    color: #E0E7FF !important;
}
/* Los 5 bloques de abonos — restaurar sus colores de acento y hacer labels más claros */
.dark-theme .audit-light .audit-panel div[style*="font-size: 1.8rem"], html.dark-theme .audit-light .audit-panel div[style*="font-size: 1.8rem"], [data-theme="dark"] .audit-light .audit-panel div[style*="font-size: 1.8rem"]{
    color: #fff !important;
}
.dark-theme .audit-light .audit-panel div[style*="color: #10b981"], html.dark-theme .audit-light .audit-panel div[style*="color: #10b981"], [data-theme="dark"] .audit-light .audit-panel div[style*="color: #10b981"]{ color: #10b981 !important; }
.dark-theme .audit-light .audit-panel div[style*="color: #f59e0b"], html.dark-theme .audit-light .audit-panel div[style*="color: #f59e0b"], [data-theme="dark"] .audit-light .audit-panel div[style*="color: #f59e0b"]{ color: #f59e0b !important; }
.dark-theme .audit-light .audit-panel div[style*="color: #ef4444"], html.dark-theme .audit-light .audit-panel div[style*="color: #ef4444"], [data-theme="dark"] .audit-light .audit-panel div[style*="color: #ef4444"]{ color: #ef4444 !important; }
.dark-theme .audit-light .audit-panel div[style*="color: var(--audit-accent)"], html.dark-theme .audit-light .audit-panel div[style*="color: var(--audit-accent)"], [data-theme="dark"] .audit-light .audit-panel div[style*="color: var(--audit-accent)"]{ color: #38bdf8 !important; }
.dark-theme .audit-light .audit-panel div[style*="color: #64748b"], html.dark-theme .audit-light .audit-panel div[style*="color: #64748b"], [data-theme="dark"] .audit-light .audit-panel div[style*="color: #64748b"]{ color: #cbd5e1 !important; }
.dark-theme .audit-light h3[style*="color: var(--audit-accent)"], html.dark-theme .audit-light h3[style*="color: var(--audit-accent)"], [data-theme="dark"] .audit-light h3[style*="color: var(--audit-accent)"]{ color: #38bdf8 !important; }
/* Líder / Alcance en tarjetas de proyecto — estaban en #64748b muy oscuro */
.dark-theme .audit-light .project-meta, html.dark-theme .audit-light .project-meta, [data-theme="dark"] .audit-light .project-meta,
.dark-theme .audit-light .project-card .project-meta, html.dark-theme .audit-light .project-card .project-meta, [data-theme="dark"] .audit-light .project-card .project-meta{
    color: #cbd5e1 !important;
}
/* Fix directo para los 5 valores y labels que siguen oscuros (inline style pisado por .audit-light div !important) */
.dark-theme .audit-light .audit-panel div[style*="font-size: 1.8rem"][style*="color: #fff"], html.dark-theme .audit-light .audit-panel div[style*="font-size: 1.8rem"][style*="color: #fff"], [data-theme="dark"] .audit-light .audit-panel div[style*="font-size: 1.8rem"][style*="color: #fff"]{ color: #fff !important; }
.dark-theme .audit-light .audit-panel div[style*="font-size: 0.75rem"], html.dark-theme .audit-light .audit-panel div[style*="font-size: 0.75rem"], [data-theme="dark"] .audit-light .audit-panel div[style*="font-size: 0.75rem"]{ color: #cbd5e1 !important; }
.dark-theme .audit-light .project-card span[style*="color: var(--audit-accent)"], html.dark-theme .audit-light .project-card span[style*="color: var(--audit-accent)"], [data-theme="dark"] .audit-light .project-card span[style*="color: var(--audit-accent)"]{ color: #38bdf8 !important; }
.dark-theme .audit-light .audit-panel span, html.dark-theme .audit-light .audit-panel span, [data-theme="dark"] .audit-light .audit-panel span{ color: #cbd5e1 !important; }
/* Títulos y resúmenes de contenedores/tarjetas — estaban oscuros por .audit-light */
.dark-theme .audit-light .audit-panel h3, html.dark-theme .audit-light .audit-panel h3, [data-theme="dark"] .audit-light .audit-panel h3,
.dark-theme .audit-light .audit-panel h4, html.dark-theme .audit-light .audit-panel h4, [data-theme="dark"] .audit-light .audit-panel h4,
.dark-theme .audit-light .audit-panel label, html.dark-theme .audit-light .audit-panel label, [data-theme="dark"] .audit-light .audit-panel label{
    color: #E0E7FF !important;
}
.dark-theme .audit-light .stat-card .stat-label, html.dark-theme .audit-light .stat-card .stat-label, [data-theme="dark"] .audit-light .stat-card .stat-label,
.dark-theme .audit-light .audit-panel .stat-label, html.dark-theme .audit-light .audit-panel .stat-label, [data-theme="dark"] .audit-light .audit-panel .stat-label{
    color: #cbd5e1 !important;
}
.dark-theme .audit-light .audit-panel p, html.dark-theme .audit-light .audit-panel p, [data-theme="dark"] .audit-light .audit-panel p,
.dark-theme .audit-light .audit-panel small, html.dark-theme .audit-light .audit-panel small, [data-theme="dark"] .audit-light .audit-panel small{
    color: #94a3b8 !important;
}
