/* =====================================================
   CONFIG NAVIGATION BAR
===================================================== */

.config-nav-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    overflow: hidden;
}

.config-nav-body {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 992px) {
    .config-nav-body {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ===============================
   NAV PILLS PERSONALIZADO
================================= */

.config-nav-card .nav-pills .nav-link {
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #46724a;
    background: #f3f4f6;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-nav-card .nav-pills .nav-link i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.config-nav-card .nav-pills .nav-link:hover {
    background: #e5e7eb;
    color: #111827;
}

/* ACTIVE TAB */
.config-nav-card .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(11, 168, 103, 0.3);
}

/* ===============================
   BOTONES DE ACCIÓN
================================= */

.config-nav-card .btn {
    border-radius: 10px;
    font-size: 0.8rem;
    padding: 6px 14px;
    transition: all .2s ease;
}

.config-nav-card .btn-primary {
    background: #059669;
    border: none;
}

.config-nav-card .btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* ==========================================
   CONFIGURACIÓN GENERAL - AGUAS
========================================== */

.empresas-page {
    padding-bottom: 40px;
}

.empresas-hero {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 25px 30px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(11, 168, 103, 0.3);
}

.empresas-hero h2 {
    font-weight: 600;
    font-size: 1.6rem;
}

.empresas-hero p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.empresas-list-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(11, 168, 103, 0.3);
    transition: all 0.25s ease;
}

.empresas-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.empresas-list-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 0.95rem;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}
.empresas-list-card .border {
    border: 1px solid #e9ecef !important;
    border-radius: 14px !important;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.empresas-list-card .border:hover {
    border-color: #059669!important;
    box-shadow: 0 4px 12px rgba(7, 197, 118, 0.3);
}
.empresas-badge {
    background-color: #e7f1ff;
    color: #059669;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
}
/* ==========================================
   BOTÓN VER CONFIGURACIÓN
========================================== */

.empresas-page .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #ffffff;
    border-radius: 10px;
    font-size: 0.85rem;
    padding: 6px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.empresas-page .btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.35);
}
.empresas-page .alert {
    border-radius: 10px;
    font-size: 0.9rem;
}

/* ==========================================
   BADGES CONFIGURACIÓN POR EMPRESA
========================================== */

/* General */
.empresas-list-card .badge.bg-secondary {
    background: #d1fae5 !important; /* verde muy suave */
    color: #065f46 !important;      /* verde oscuro elegante */
    border-radius: 30px;
    font-weight: 500;
    padding: 6px 12px;
}

/* Por empresa */
.empresas-list-card .badge.bg-info {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    padding: 6px 12px;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}
/* ==========================================
   TÍTULOS INTERNOS CON ICONO VERDE PRO
========================================== */

.empresas-list-card h5 {
    font-weight: 600;
    font-size: 1rem;
    color: #065f46; /* verde oscuro elegante */
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Icono dentro de círculo suave */
.empresas-list-card h5 i {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    padding: 8px;
    border-radius: 50%;
    font-size: 0.8rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

/* Línea decorativa debajo del título */
.empresas-list-card h5::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 42px;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 3px;
    opacity: 0.6;
    transition: all .2s ease;
}

/* Hover del módulo */
.empresas-list-card .border:hover h5 i {
    background: #059669;
    color: #ffffff;
    transform: scale(1.05);
}

.empresas-list-card .border:hover h5::after {
    width: 70px;
    opacity: 1;
}
/* ==========================================
   TABLA - SERIES LABORATORIO
========================================== */

.empresas-page .table {
    border-radius: 14px;
    overflow: hidden;
    font-size: 0.9rem;
}

.empresas-page .table thead {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.empresas-page .table thead th {
    font-weight: 600;
    color: #065f46;
    border-bottom: 2px solid #a7f3d0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empresas-page .table tbody tr {
    transition: all .2s ease;
}

.empresas-page .table tbody tr:hover {
    background-color: #f0fdf4;
}
/* Botón editar verde técnico */
.empresas-page .btn-outline-secondary {
    border-color: #059669;
    color: #059669;
    border-radius: 8px;
    font-size: 0.8rem;
    padding: 5px 12px;
    transition: all .2s ease;
}

.empresas-page .btn-outline-secondary:hover {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
    transform: translateY(-1px);
}
.empresas-page .table tbody td.text-muted {
    padding: 40px 0;
    font-size: 0.9rem;
    color: #6b7280 !important;
}
.empresas-page .table td {
    border-color: #f3f4f6;
}
/* ==========================================
   CARD RESUMEN CONFIG APP
========================================== */

.empresas-page .card-header span i {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    padding: 7px;
    border-radius: 50%;
    font-size: 0.75rem;
}
/* ==========================================
   TABLA RESUMEN CONFIG APP
========================================== */

.empresas-page .table-bordered {
    border-radius: 14px;
    overflow: hidden;
    font-size: 0.9rem;
}

.empresas-page .table-bordered thead {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.empresas-page .table-bordered th {
    font-weight: 600;
    color: #065f46;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-color: #a7f3d0;
}

.empresas-page .table-bordered td {
    border-color: #f3f4f6;
}

.empresas-page .table-bordered tbody tr:hover {
    background-color: #f0fdf4;
    transition: all .2s ease;
}
/* Valores técnicos estilo badge */
.empresas-page .table-bordered td {
    font-weight: 500;
}

.empresas-page .table-bordered td:not(:first-child) {
    color: #047857;
}
/* Botón editar resumen app */
.empresas-page .card-header .btn-primary {
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 8px;
}
/* ==========================================
   HERO CONFIG PDF
========================================== */

.empresas-page .empresas-hero i {
    margin-right: 6px;
    color: #059669;
}
/* ==========================================
   FILTRO CONFIG PDF
========================================== */

.empresas-page .form-select {
    border-radius: 10px;
    border: 1px solid #d1fae5;
    transition: all .2s ease;
}

.empresas-page .form-select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.15rem rgba(16,185,129,.25);
}

.empresas-page .btn-outline-primary {
    border-radius: 10px;
    font-weight: 500;
}
/* ==========================================
   TABLA RESUMEN ACTIVO
========================================== */

.empresas-page .empresas-list-card:first-of-type .table {
    border-radius: 14px;
    overflow: hidden;
}

.empresas-page .empresas-list-card:first-of-type th {
    width: 30%;
    background: #f0fdf4;
    color: #065f46;
    font-weight: 600;
    border-color: #bbf7d0;
}

.empresas-page .empresas-list-card:first-of-type td {
    font-weight: 500;
    color: #047857;
}
/* ==========================================
   BLOQUES DE ALCANCE
========================================== */

.empresas-page h6.fw-bold {
    color: #065f46;
    margin-top: 10px;
    margin-bottom: 10px;
    position: relative;
}

.empresas-page h6.fw-bold::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #34d399);
    margin-top: 6px;
    border-radius: 4px;
}
/* ==========================================
   TABLAS HISTORIAL PDF
========================================== */

.empresas-page .table-striped thead {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.empresas-page .table-striped th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #065f46;
    font-weight: 600;
}

.empresas-page .table-striped tbody tr {
    transition: all .2s ease;
}

.empresas-page .table-striped tbody tr:hover {
    background-color: #f0fdf4;
    transform: scale(1.005);
}
.empresas-page .table-striped td:nth-child(5) {
    font-weight: 600;
    color: #059669;
}
.empresas-page .card-header .btn-primary {
    border-radius: 8px;
    padding: 6px 14px;
    box-shadow: 0 4px 10px rgba(5,150,105,.25);
}