/* Estilos adicionales para el Sistema ERP */

/* Scrollbar personalizado para sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a252f;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #3498db;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-in;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background: white;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
}

/* Botones mejorados */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Buscadores con botón limpiar integrado */
.search-input-wrapper {
    position: relative;
}

.search-input-with-clear {
    padding-right: 2.2rem;
}

.search-clear-btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.15rem;
    line-height: 1;
    z-index: 5;
}

.search-clear-btn:hover {
    color: #495057;
}

/* Tablas mejoradas */
.table {
    background: white;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f5;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Badges mejorados */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 4px;
}

/* Modales mejorados */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 2px solid #f0f0f0;
    background: #f8f9fa;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Tarjetas de estadísticas responsive */
.stat-card {
    border-radius: 10px;
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    margin-right: 1rem;
    opacity: 0.8;
}

.stat-info h4 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
}

.stat-info p {
    margin: 0;
    font-size: 0.9rem;
}

/* Menú hamburguesa para móvil */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.menu-toggle:hover {
    background: #34495e;
}

/* Overlay para cerrar menú en móvil */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

/* ========================================
   MEDIA QUERIES - TABLETS
   ======================================== */
@media (max-width: 992px) {
    /* Tarjetas de estadísticas en tablets */
    .stat-info h4 {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    /* Modales más pequeños */
    .modal-dialog {
        max-width: 90%;
        margin: 1.75rem auto;
    }

    .modal-xl {
        max-width: 95%;
    }

    /* Tablas con scroll horizontal */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================
   MEDIA QUERIES - MÓVILES
   ======================================== */
@media (max-width: 768px) {
    /* Mostrar botón de menú */
    .menu-toggle {
        display: block;
    }

    /* Sidebar oculto por defecto en móvil */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay.show {
        display: block;
    }

    /* Ajustar contenido principal */
    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
        width: 100%;
    }

    /* Header más compacto */
    .top-bar {
        padding: 0.5rem 1rem;
        margin-left: 0 !important;
    }

    .page-title {
        font-size: 1.25rem;
        margin-left: 3rem;
    }

    /* Evitar reglas globales que rompan otros layouts */
    .page-stack-mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Tarjetas de estadísticas apiladas */
    .stat-card {
        padding: 1rem;
    }

    .stat-info h4 {
        font-size: 1.25rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    /* Botones de acción más grandes */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .btn:hover {
        transform: none; /* Deshabilitar efecto hover en móvil */
    }

    /* Botones pequeños en tablas */
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
        min-width: 40px;
        min-height: 40px;
    }

    /* Tablas responsive */
    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }

    /* Columnas de acciones siempre visibles */
    .table th:last-child,
    .table td:last-child {
        position: sticky;
        right: 0;
        background: white;
        box-shadow: -2px 0 4px rgba(0,0,0,0.1);
    }

    /* Ocultar columnas menos importantes en móvil */
    .table .d-none-mobile {
        display: none;
    }

    /* Modales más adaptables en móvil */
    .modal-dialog {
        max-width: 100%;
        margin: 0;
        height: 100vh;
    }

    .modal-content {
        border-radius: 0;
        height: 100vh;
        overflow-y: auto;
    }

    .modal-body {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
    }

    .modal-xl {
        max-width: 100%;
    }

    /* Formularios más espaciados */
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    .form-control,
    .form-select {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 0.5rem;
    }

    /* Alertas más compactas */
    .alert {
        font-size: 0.875rem;
        padding: 0.75rem;
    }

    /* Cards sin bordes en móvil */
    .card {
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .card-header h5 {
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Ajustar inputs de búsqueda */
    .input-group {
        flex-wrap: nowrap;
    }
}

/* ========================================
   MEDIA QUERIES - MÓVILES PEQUEÑOS
   ======================================== */
@media (max-width: 576px) {
    /* Texto más pequeño */
    h3 {
        font-size: 1.1rem;
    }

    /* Encabezado de página más compacto */
    .d-flex.justify-content-between h3 {
        font-size: 1rem;
    }

    /* Botones en bloque */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-group-mobile .btn {
        width: 100%;
    }

    /* Tarjetas aún más compactas */
    .stat-card {
        flex-direction: row; /* Mantener horizontal pero compacto */
        padding: 0.75rem;
    }

    .stat-icon {
        font-size: 1.75rem;
        margin-right: 0.75rem;
    }

    .stat-info h4 {
        font-size: 1.1rem;
    }

    .stat-info p {
        font-size: 0.8rem;
    }

    /* Sidebar header en móvil pequeño */
    .sidebar-header h4 {
        font-size: 1rem;
    }

    /* Navegación más compacta */
    .nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .nav-item i {
        font-size: 0.9rem;
    }

    .nav-section {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    /* Footer de modales apilado */
    .modal-footer {
        flex-direction: column-reverse;
        gap: 0.5rem;
        padding: 1rem;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    /* Tablas más compactas */
    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.375rem 0.2rem;
    }

    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        min-width: 36px;
        min-height: 36px;
    }

    /* Cards más compactos */
    .card {
        margin-bottom: 0.75rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .card-header {
        padding: 0.5rem 0.75rem;
    }

    /* Ajustar inputs */
    .form-control,
    .form-select {
        padding: 0.375rem 0.5rem;
    }

    /* Badges más pequeños */
    .badge {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
    }
}

/* ========================================
   UTILIDADES RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }

    .show-desktop {
        display: block !important;
    }
}

/* Touch-friendly buttons */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-item,
    .table-hover tbody tr {
        min-height: 44px; /* Tamaño mínimo para touch */
    }
}

/* Landscape mode en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 200px;
        left: -200px;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-info h4 {
        font-size: 1rem;
    }
}

/* ========================================
   ESTILOS ADICIONALES
   ======================================== */

.modal-footer {
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
}

/* Inputs mejorados */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Alertas personalizadas */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Iconos en botones */
.btn i {
    margin-right: 0.25rem;
}

.btn-sm i {
    margin-right: 0.15rem;
}

/* Mejoras en el layout de login */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.login-card {
    animation: fadeIn 0.5s ease-in;
}

/* Mejoras visuales para estados */
.bg-success {
    background-color: #28a745 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-primary {
    background-color: #007bff !important;
}

/* Texto en badges */
.badge.bg-warning {
    color: #212529;
}

/* Sombras suaves */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Dashboard chart */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 320px;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.kpi-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
}

.kpi-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
}

.kpi-positive {
    background: rgba(40, 167, 69, 0.15);
    color: #198754;
}

.kpi-negative {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.kpi-neutral {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

@media (max-width: 768px) {
    .chart-container {
        min-height: 260px;
    }

    .chart-container.chart-scatter {
        min-height: 320px;
    }

    .kpi-value {
        font-size: 1.25rem;
    }
}

.chart-container.chart-scatter {
    min-height: 420px;
}

.chart-container.chart-horas {
    min-height: 380px;
}

.horas-kpi-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.horas-kpi-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.horas-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.horas-kpi-sub {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: #6c757d;
}

.horas-franjas-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.horas-franja-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}

.horas-franja-madrugada {
    background: rgba(59, 89, 152, 0.14);
}

.horas-franja-manana {
    background: rgba(230, 126, 34, 0.16);
}

.horas-franja-tarde {
    background: rgba(39, 174, 96, 0.14);
}

.horas-franja-noche {
    background: rgba(142, 68, 173, 0.14);
}

.mesa-kpi-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.mesa-kpi-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.mesa-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.mesa-kpi-value-sm {
    font-size: 1.05rem;
}

.dashboard-mesa-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-mesa-tab {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-mesa-tab:hover {
    background: #f8f9fa;
}

.btn-mesa-tab.active {
    border-color: #0d6efd;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.08);
}

.mesa-kpi-ocupada {
    border-color: rgba(220, 53, 69, 0.35);
}

.mesa-kpi-ocupada .mesa-kpi-value {
    color: #dc3545;
}

.mesa-ocupada-leyenda {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    margin-right: 0.35rem;
    border: 3px solid #dc3545;
    border-radius: 50%;
    vertical-align: -0.1rem;
    background: transparent;
}

.operaciones-chart-card {
    overflow: hidden;
}

.operaciones-leyenda-intensidad {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.operaciones-leyenda-texto {
    font-size: 0.78rem;
    color: #6c757d;
}

.operaciones-leyenda-barra {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: #6c757d;
}

.operaciones-leyenda-gradiente {
    width: 120px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(to right, rgb(219, 234, 254), rgb(23, 71, 190));
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.operaciones-heatmap-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.operaciones-heatmap {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.operaciones-heatmap th,
.operaciones-heatmap td {
    padding: 0.45rem 0.55rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

.operaciones-th-tipo {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left !important;
    min-width: 11rem;
    max-width: 14rem;
    background: #f8f9fa;
    font-weight: 600;
}

.operaciones-th-operador {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.operaciones-celda {
    min-width: 3.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: background-color 0.15s ease;
}

.operaciones-celda-con-datos {
    border-color: rgba(23, 71, 190, 0.15);
}

.operaciones-celda-vacia {
    background: #f1f3f5;
    color: transparent;
}

.operaciones-grupo-separador .operaciones-th-tipo,
.operaciones-grupo-separador .operaciones-celda,
.operaciones-grupo-separador .operaciones-celda-vacia {
    border-top-width: 2px;
    border-top-color: rgba(0, 0, 0, 0.12);
}

.operaciones-fila-total th,
.operaciones-fila-total td {
    background: #e9ecef;
    font-weight: 700;
    border-top: 2px solid rgba(0, 0, 0, 0.15);
}

.operaciones-celda-total {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .operaciones-th-tipo {
        min-width: 9rem;
        font-size: 0.78rem;
    }

    .operaciones-celda {
        min-width: 2.75rem;
        font-size: 0.75rem;
    }
}

.cobros-chart-card {
    overflow: hidden;
}

.cobros-leyenda-intensidad {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.cobros-leyenda-texto {
    font-size: 0.78rem;
    color: #6c757d;
}

.cobros-leyenda-barra {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: #6c757d;
}

.cobros-leyenda-gradiente {
    width: 120px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(to right, rgb(220, 252, 231), rgb(22, 101, 52));
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.cobros-heatmap-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.cobros-heatmap {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.cobros-heatmap th,
.cobros-heatmap td {
    padding: 0.45rem 0.55rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

.cobros-th-usuario {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left !important;
    min-width: 11rem;
    max-width: 14rem;
    background: #f8f9fa;
    font-weight: 600;
}

.cobros-th-forma-pago {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cobros-th-sortable {
    cursor: pointer;
    user-select: none;
}

.cobros-th-sortable:hover {
    background: #e9ecef !important;
}

.cobros-th-sortable i {
    font-size: 0.72rem;
    margin-left: 0.15rem;
    vertical-align: middle;
}

.cobros-celda {
    min-width: 5.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.cobros-celda-con-datos {
    border-color: rgba(22, 101, 52, 0.15);
}

.cobros-celda-vacia {
    background: #f1f3f5;
    color: transparent;
}

.cobros-fila-total th,
.cobros-fila-total td {
    background: #e9ecef;
    font-weight: 700;
    border-top: 2px solid rgba(0, 0, 0, 0.15);
}

.cobros-celda-total {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    .cobros-th-usuario {
        min-width: 9rem;
        font-size: 0.78rem;
    }

    .cobros-celda {
        min-width: 2.75rem;
        font-size: 0.75rem;
    }
}

/* Asegurar que las transiciones no interfieran en inputs */
.form-control,
.form-select,
input,
textarea {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

/* Fix para botones hover en desktop */
@media (min-width: 769px) {
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
}

/* Arreglar sticky columns en tablas móvil */
@media (max-width: 768px) {
    .table thead th:last-child {
        position: sticky;
        right: 0;
        background: #f8f9fa;
        z-index: 10;
    }
}

/* ========================================
   ARTICULOS UX REFRESH
   ======================================== */
.articulos-page {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.articulos-header {
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
    border: 1px solid #e9f1fb;
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.articulos-header h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-header-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 0 8px 16px rgba(30, 64, 175, 0.2);
}

.articulos-toolbar-meta {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.articulos-editor-card {
    border-radius: 14px;
    border: 1px solid #e9eef5;
    box-shadow: 0 10px 28px rgba(19, 60, 112, 0.1);
}

.articulos-tabs {
    border-bottom-color: #dbe7f7;
    gap: 0.15rem;
}

.articulos-tabs .nav-link {
    border: none;
    border-radius: 10px 10px 0 0;
    color: #4f5d75;
    font-weight: 600;
    padding: 0.55rem 0.9rem;
}

.articulos-tabs .nav-link.active {
    color: #0f4c81;
    background: #eef5ff;
}

.articulos-tab-panel {
    background: #fcfdff;
    border-color: #dbe7f7 !important;
}

.articulos-list-card {
    border-radius: 14px;
    border: 1px solid #e9eef5;
    box-shadow: 0 6px 24px rgba(13, 42, 77, 0.08);
}

.articulos-table thead th {
    border-bottom: 1px solid #dbe4f2;
    color: #344054;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

.articulos-table-row {
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.articulos-table-row:hover {
    background: #f8fbff;
}

.articulos-footer {
    border-top: 1px solid #edf1f7;
    padding-top: 0.75rem;
}

@media (max-width: 768px) {
    .articulos-header {
        padding: 0.9rem;
    }

    .articulos-header.d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .articulos-header-actions {
        width: 100%;
    }

    .articulos-header-actions .btn {
        flex: 1;
    }

    .articulos-editor-card {
        position: static !important;
        top: auto !important;
    }

    .articulos-tab-selector {
        margin-bottom: 0.75rem;
    }

    .articulos-toolbar-meta {
        width: 100%;
        border-radius: 10px;
        padding: 0.5rem 0.7rem;
    }

    .articulos-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        white-space: nowrap;
        scrollbar-width: thin;
    }

    .articulos-mobile-card {
        border: 1px solid #dbe7f7;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    }

    .articulos-footer {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .articulos-footer .d-flex {
        justify-content: space-between;
    }

    .articulos-editor-actions {
        flex-direction: column-reverse;
        align-items: stretch !important;
    }

    .articulos-editor-actions .btn {
        width: 100%;
    }

    .articulos-mobile-actions .btn {
        width: 100%;
    }

    .articulos-tab-panel .form-label {
        font-size: 0.82rem;
        font-weight: 600;
    }

    .articulos-tab-panel .card {
        border-radius: 10px;
    }

    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .header-right .btn {
        margin-left: 0 !important;
    }
}

/* ========================================
   GLOBAL ERP REDESIGN
   ======================================== */
.erp-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0f172a 0%, #172554 100%);
    color: #f8fafc;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(148, 163, 184, 0.25);
    transition: width 0.25s ease;
}

.sidebar.collapsed {
    width: 62px;
}

.sidebar.collapsed .sidebar-logo {
    display: none;
}

.sidebar.collapsed .sidebar-nav .nav-section {
    font-size: 0;
    padding: 0.4rem 0;
    text-align: center;
}

.sidebar.collapsed .sidebar-nav .nav-section::before {
    content: "·";
    font-size: 1.1rem;
    color: #94a3b8;
}

.sidebar.collapsed .sidebar-nav .nav-item {
    margin: 0.06rem 0.35rem;
    padding: 0.56rem 0;
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav .nav-item i {
    margin-right: 0;
    width: 1.3rem;
    font-size: 1.05rem;
}

.sidebar.collapsed .sidebar-nav .nav-item span {
    display: none;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.65rem 0.3rem 0.85rem;
}

.sidebar.collapsed .sidebar-footer-row {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.sidebar.collapsed .sidebar-version {
    font-size: 0.6rem;
}

.sidebar.collapsed .sidebar-collapse-btn {
    position: static;
    display: inline-flex;
    margin: 0;
}

.sidebar-header {
    position: relative;
    padding: 1.4rem 1.2rem;
    text-align: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #0b1220 0%, #111c34 100%);
    backdrop-filter: blur(8px);
}

.sidebar-collapse-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-collapse-btn:hover {
    background: rgba(59, 130, 246, 0.4);
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.6);
}

.sidebar-header h4 {
    margin: 0;
    color: #f8fafc;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sidebar-logo {
    display: block;
    width: 100%;
    max-width: 210px;
    height: auto;
    margin: 0 auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.85rem 0.65rem 1rem;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 0.65rem 1rem 0.85rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.45);
}

.sidebar-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sidebar-version {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.sidebar .nav-section {
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.85rem 0.75rem 0.3rem;
}

.sidebar .nav-item {
    display: flex;
    align-items: center;
    margin: 0.06rem 0 0.06rem 0.55rem;
    border-radius: 10px;
    padding: 0.56rem 0.82rem;
    color: #dbeafe;
    font-weight: 500;
    line-height: 1.22;
    text-decoration: none;
}

.sidebar .nav-item i {
    display: inline-flex;
    width: 1.2rem;
    margin-right: 0.5rem;
    justify-content: center;
    font-size: 0.95rem;
    opacity: 0.95;
}

.sidebar .nav-item span {
    display: inline-block;
}

.sidebar .nav-item:hover {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.25);
    text-decoration: none;
}

.sidebar .nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(79, 70, 229, 0.95) 100%);
    border-left: none;
    box-shadow: 0 8px 16px rgba(30, 64, 175, 0.35);
    text-decoration: none;
}

.sidebar .nav-item:focus,
.sidebar .nav-item:focus-visible {
    text-decoration: none;
}

.main-content {
    margin-left: 270px;
    width: calc(100% - 270px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease, width 0.25s ease;
}

.sidebar.collapsed + .main-content,
.sidebar.collapsed ~ .main-content {
    margin-left: 62px;
    width: calc(100% - 62px);
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #dbe4f0;
    backdrop-filter: blur(10px);
    padding: 0.85rem 1.55rem;
}

.header-left h5 {
    margin: 0;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.user-info {
    color: #475569;
    font-weight: 500;
}

.content-wrapper {
    padding: 1.5rem;
    flex: 1;
    background: transparent;
}

.pagination .page-link,
.btn-sm {
    border-radius: 8px;
}

.modal-content {
    border-radius: 16px;
    border: 1px solid #dce6f3;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.2);
}

.modal-header,
.modal-footer {
    background: #f8fbff;
}

.badge {
    border-radius: 999px;
    font-weight: 600;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.25), transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(37, 99, 235, 0.28), transparent 42%),
        linear-gradient(145deg, #0f172a 0%, #1e3a8a 52%, #3730a3 100%);
    padding: 1rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(191, 219, 254, 0.8);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    border-radius: 18px;
}

@media (max-width: 992px) {
    .sidebar {
        width: 250px;
    }

    .main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }

    .top-header {
        padding: 0.75rem 1rem;
    }

    /* Forzar layout movil en el bloque global final
       para evitar heredar anchos de escritorio. */
    .erp-layout {
        display: block;
    }

    .sidebar {
        width: 270px;
        left: -270px;
        top: 0;
        z-index: 1050;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* ========================================
   ESTUDIO ESTADISTICO
   ======================================== */
.estudio-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.estudio-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.1rem 1.5rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.estudio-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 8px 16px rgba(30, 64, 175, 0.25);
}

.estudio-filters-card {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.estudio-filters-card .form-label {
    font-weight: 600;
    color: #1f2937;
}

.estudio-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1f2937;
    font-weight: 600;
}

.estudio-pill i {
    color: #2563eb;
}

.estudio-checkbox-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.75rem;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.85rem;
}

.estudio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.estudio-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 10px;
    font-weight: 600;
}

.estudio-panel {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.estudio-panel .table thead th.estudio-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.estudio-panel .table thead th.estudio-sortable:hover {
    background-color: #e2e8f0;
}

.estudio-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    color: #f8fafc;
    border-radius: 16px 16px 0 0;
}

.estudio-panel-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1rem;
}

.estudio-list {
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-right: 0.25rem;
}

.estudio-checklist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem 1.25rem;
}

.estudio-checklist .form-check,
.estudio-list .form-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    color: #1f2937;
}

.estudio-checklist .form-check-label,
.estudio-list .form-check-label {
    margin-bottom: 0;
}

.estudio-total-row {
    background: #f4f8ff;
}

.estudio-informe-col {
    width: 4.5rem;
    white-space: nowrap;
    text-align: center;
}

.estudio-checklist .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.estudio-checklist .form-check-label i {
    color: #1f2937;
    font-size: 1rem;
}

@media (max-width: 1200px) {
    .estudio-checklist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .estudio-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .estudio-actions {
        justify-content: flex-start;
    }

    .estudio-checklist {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ========================================
   CONTROL PRESENCIA
   ======================================== */
.presencia-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.presencia-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.1rem 1.5rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.presencia-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 8px 16px rgba(30, 64, 175, 0.25);
}

.presencia-filters-card {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.presencia-filters-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    color: #f8fafc;
}

.presencia-filters-header-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1rem;
}

.presencia-filter-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.presencia-filter-label::before {
    content: "● ";
    color: #1e3a8a;
    font-size: 0.65rem;
    vertical-align: middle;
}

.presencia-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem 0.2rem;
    border-bottom: 2px solid #cbd5e1;
    background: #ffffff;
    border-radius: 8px 8px 0 0;
    transition: border-color 0.15s ease;
}

.presencia-input-wrap:focus-within {
    border-bottom-color: #2563eb;
}

.presencia-input-icon {
    color: #475569;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.presencia-select {
    border: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    font-weight: 600;
    color: #0f172a;
}

.presencia-select:focus {
    box-shadow: none;
}

.presencia-switch-wrap {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-bottom: 2px solid #cbd5e1;
    background: #ffffff;
    border-radius: 8px 8px 0 0;
}

.presencia-switch .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    cursor: pointer;
}

.presencia-switch .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.presencia-switch .form-check-label {
    font-weight: 600;
    color: #1f2937;
    margin-left: 0.35rem;
}

.presencia-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.presencia-action-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 72px;
    min-height: 72px;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.presencia-action-tile i {
    font-size: 1.35rem;
}

.presencia-action-tile:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.22);
}

.presencia-action-tile:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.presencia-action-search {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

.presencia-action-pdf {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.presencia-panel .table thead th.presencia-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.presencia-panel .table thead th.presencia-sortable:hover {
    background-color: #e2e8f0;
}

.presencia-total-row {
    background: #f4f8ff;
}

.presencia-panel {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.presencia-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    color: #f8fafc;
}

.presencia-panel-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .presencia-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .presencia-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* ========================================
   NEWSPAPER STYLE - PORTADA PERIODÍSTICA
   ======================================== */
.dashboard-view-toggle {
    display: inline-flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.dashboard-view-toggle .btn-toggle {
    border: none;
    padding: 0.45rem 1rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #64748b;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dashboard-view-toggle .btn-toggle:not(:last-child) {
    border-right: 1px solid #e2e8f0;
}

.dashboard-view-toggle .btn-toggle:hover {
    background: #f1f5f9;
    color: #334155;
}

.dashboard-view-toggle .btn-toggle.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.dashboard-view-toggle .btn-toggle.active i {
    color: #2563eb;
}

/* ========================================
   NOTICIAS — Periódico Digital Oscuro
   ======================================== */
.np-page {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Filtros */
.np-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

.np-filter {
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(255, 255, 255, 0.7);
    color: #3b82f6;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.np-filter:hover {
    background: #ffffff;
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.5);
}

.np-filter.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

/* Cabecera */
.np-masthead {
    text-align: center;
    padding: 1.1rem 1.5rem 0.6rem;
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

.np-masthead-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.3), transparent);
    margin-bottom: 0.5rem;
}

.np-masthead-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #0f172a;
    text-transform: uppercase;
    margin: 0.2rem 0;
}

.np-masthead-sub {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}

/* Badge reutilizable */
.np-badge {
    display: inline-block;
    color: #1e3a5f;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    line-height: 1.3;
    background: #dbeafe;
}

.np-badge-sm {
    font-size: 0.6rem;
    padding: 0.15rem 0.45rem;
}

.np-badge-xs {
    font-size: 0.55rem;
    padding: 0.12rem 0.4rem;
}

/* Noticia principal */
.np-main {
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
}

.np-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.75rem;
    right: 1.75rem;
    height: 3px;
    background: var(--np-accent, #3b82f6);
    border-radius: 0 0 2px 2px;
}

.np-main-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.np-main-icon {
    font-size: 1.8rem;
    color: var(--np-accent, #3b82f6);
    opacity: 0.6;
}

.np-main-title {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.np-main-summary {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #334155;
    margin: 0 0 0.2rem;
    max-width: 800px;
}

.np-main-detail {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 0.75rem;
    max-width: 800px;
}

.np-main-metrics {
    display: flex;
    gap: 1.25rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
}

/* Métricas */
.np-metric,
.np-metric-sm {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
}

.np-metric-val {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

.np-metric-lbl {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.np-metric-sm .np-metric-val {
    font-size: 0.88rem;
}

/* Noticias secundarias */
.np-secondary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.np-secondary {
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-top: 3px solid var(--np-accent, #3b82f6);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.np-secondary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.15rem;
}

.np-secondary-icon {
    font-size: 1.1rem;
    color: var(--np-accent, #3b82f6);
    opacity: 0.6;
}

.np-secondary-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    margin: 0;
}

.np-secondary-summary {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #334155;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-secondary-metrics {
    display: flex;
    gap: 0.85rem;
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
}

/* Noticias menores en columnas */
.np-minor-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.np-minor {
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.np-minor-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.1rem;
}

.np-minor-icon {
    font-size: 0.85rem;
    color: var(--np-accent, #3b82f6);
    opacity: 0.6;
}

.np-minor-title {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    margin: 0;
}

.np-minor-summary {
    font-size: 0.72rem;
    line-height: 1.4;
    color: #475569;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-minor-metrics {
    display: flex;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: auto;
    padding-top: 0.3rem;
}

.np-minor-metrics strong {
    color: #0f172a;
}

/* Responsive */
@media (max-width: 992px) {
    .np-secondary-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .np-minor-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .np-main-title {
        font-size: 1.2rem;
    }
    .np-masthead-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .np-secondary-row {
        grid-template-columns: 1fr;
    }
    .np-minor-row {
        grid-template-columns: 1fr;
    }
    .np-main {
        padding: 1.1rem 1.25rem;
    }
    .np-main-title {
        font-size: 1.1rem;
    }
    .np-masthead-title {
        font-size: 1rem;
    }
}

/* ========================================
   PERFIL / CONFIGURACIÓN
   ======================================== */
.perfil-tabs .nav-link {
    font-weight: 600;
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
}

.perfil-tabs .nav-link:hover {
    color: #334155;
    border-bottom-color: #cbd5e1;
}

.perfil-tabs .nav-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: transparent;
}

.perfil-tab-content {
    min-height: 280px;
}

.perfil-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.perfil-check-item {
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: background 0.15s ease;
}

.perfil-check-item:hover {
    background: #f1f5f9;
}

.perfil-check-item .form-check-label {
    font-weight: 600;
    cursor: pointer;
}

.perfil-check-item .form-check-label i {
    margin-right: 0.3rem;
}

.text-purple {
    color: #8b5cf6;
}
