/**
 * Estilos principales - VERSIÓN COMPACTA
 * Plataforma SaaS Email Marketing
 */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #4ade80;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --sidebar-width: 200px;
    --header-height: 45px;
    --sidebar-bg: #1a1d29;
    --sidebar-hover: #252836;
    --sidebar-active: rgba(74, 222, 128, 0.15);
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #4ade80;
    --base-font-size: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--base-font-size);
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* =====================================================
   ESTILOS COMPACTOS GLOBALES - Para ver bien al 100%
   ===================================================== */

/* Títulos más pequeños */
h1 { font-size: 1.5rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9rem; }
h6 { font-size: 0.85rem; }

/* Cards compactas */
.card {
    margin-bottom: 0.75rem;
}

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

.card-body {
    padding: 0.75rem;
}

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

.card-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Formularios compactos */
.form-control,
.form-select {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    height: auto;
}

.form-control-sm,
.form-select-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
}

.form-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.input-group-text {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
}

/* Botones compactos */
.btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.btn-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.btn-lg {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
}

/* Badges compactos */
.badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Alertas compactas */
.alert {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

/* Modales compactos */
.modal-header {
    padding: 0.5rem 0.75rem;
}

.modal-body {
    padding: 0.75rem;
}

.modal-footer {
    padding: 0.5rem 0.75rem;
}

.modal-title {
    font-size: 1rem;
}

/* Nav tabs compactos */
.nav-tabs .nav-link,
.nav-pills .nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

/* Breadcrumb compacto */
.breadcrumb {
    font-size: 0.75rem;
    padding: 0.3rem 0;
    margin-bottom: 0.5rem;
}

/* Paginación compacta */
.pagination {
    font-size: 0.75rem;
}

.page-link {
    padding: 0.25rem 0.5rem;
}

/* Dropdown compacto */
.dropdown-menu {
    font-size: 0.8rem;
}

.dropdown-item {
    padding: 0.3rem 0.75rem;
}

/* List group compacto */
.list-group-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

/* Spacing utilities más pequeños */
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.m-3 { margin: 0.75rem !important; }
.m-4 { margin: 1rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

/* Progress bar compacto */
.progress {
    height: 0.5rem;
}

/* Main content padding reducido */
.main-content {
    padding: 0.75rem !important;
}

/* Sidebar - Tema Oscuro con Verde - Diseño Profesional */
aside.sidebar,
#sidebar.sidebar,
.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 200px !important;
    height: 100vh !important;
    background: #1a1d29 !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3) !important;
    z-index: 1000 !important;
    overflow: hidden !important;
    transition: width 0.3s ease, transform 0.3s ease;
    font-size: 0.9rem;
    display: flex !important;
    flex-direction: column !important;
}

/* Sidebar colapsado */
aside.sidebar.collapsed,
#sidebar.sidebar.collapsed,
.sidebar.collapsed {
    width: 60px !important;
    overflow: visible !important;
}

.sidebar.collapsed .sidebar-body {
    overflow: visible !important;
}

.sidebar.collapsed .sidebar-nav {
    overflow: visible !important;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .usage-indicator,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .user-info {
    display: none !important;
}

/* Submenús colapsados - ocultos por defecto pero pueden mostrarse con hover/click */
.sidebar.collapsed .has-submenu > .submenu {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 1.5rem 0.5rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-header-actions {
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    margin: 0;
}

.sidebar.collapsed .sidebar-brand i {
    margin-right: 0;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem 0.5rem;
    margin: 0 0.25rem;
}

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

.sidebar.collapsed .nav-link i {
    margin: 0;
}

.sidebar.collapsed .nav-link .ms-auto,
.sidebar.collapsed .nav-link .fa-chevron-down {
    display: none !important;
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

/* =====================================================
   SUBMENÚ EN SIDEBAR COLAPSADO - POPUP A LA DERECHA
   ===================================================== */

.sidebar.collapsed .has-submenu {
    position: relative !important;
}

.sidebar.collapsed .has-submenu > .nav-link {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Submenú popup en sidebar colapsado */
.sidebar.collapsed .submenu {
    display: none;
    position: absolute !important;
    left: 60px !important;
    top: 0 !important;
    width: 200px !important;
    min-width: 200px !important;
    background: #1a1d29 !important;
    border: 1px solid #3d4156 !important;
    border-radius: 8px !important;
    box-shadow: 4px 4px 20px rgba(0,0,0,0.5) !important;
    z-index: 999999 !important;
    padding: 0.5rem 0 !important;
    margin: 0 !important;
}

/* Mostrar submenú cuando tiene clase .show */
.sidebar.collapsed .submenu.show {
    display: block !important;
}

/* Links dentro del submenú popup */
.sidebar.collapsed .submenu li {
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar.collapsed .submenu a {
    padding: 0.6rem 1rem !important;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    color: #b0b8c8 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
    margin: 0.15rem 0.4rem !important;
    border-radius: 6px !important;
}

.sidebar.collapsed .submenu a:hover {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #4ade80 !important;
}

.sidebar.collapsed .submenu a i {
    margin-right: 0.6rem !important;
    width: 16px !important;
    font-size: 0.75rem !important;
    color: inherit !important;
}

/* Fallback usando variable CSS */
@supports (width: var(--sidebar-width)) {
    aside.sidebar,
    #sidebar.sidebar,
    .sidebar {
        width: var(--sidebar-width) !important;
    }
}

.sidebar-header {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #2d3142;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-shrink: 0;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-collapse-btn {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
}

.sidebar-collapse-btn:hover {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
    color: #22c55e;
}

.sidebar-collapse-btn i {
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #4ade80;
    font-weight: bold;
    font-size: 0.9rem;
}

.sidebar-brand i {
    font-size: 1.1rem;
    margin-right: 0.4rem;
    color: #4ade80;
}

.brand-text {
    font-size: 0.85rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    color: #9ca3af;
    cursor: pointer;
}

.sidebar-body {
    padding: 0.75rem 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Scrollbar elegante - Webkit (Chrome, Safari, Edge) */
    scrollbar-width: thin;
    scrollbar-color: #3d4156 transparent;
}

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

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: #3d4156;
    border-radius: 4px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
    background: #4ade80;
}

.usage-indicator {
    padding: 0.6rem 0.75rem;
    margin: 0 0.5rem 0.75rem;
    background: #252836;
    border-radius: 6px;
    border: 1px solid #2d3142;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    color: #9ca3af;
}

.usage-count {
    font-weight: 600;
    color: #fff;
    font-size: 0.65rem;
}

.usage-percentage {
    color: #9ca3af;
    font-size: 0.65rem;
    margin-top: 0.25rem;
    display: block;
}

.sidebar-nav .nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.15rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    margin: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.sidebar-nav .nav-link:hover {
    background: #252836;
    color: #4ade80;
    border-left-color: #4ade80;
}

.sidebar-nav .nav-link.active {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border-left-color: #4ade80;
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    width: 18px;
    margin-right: 0.6rem;
    color: inherit;
    font-size: 0.85rem;
}

/* Submenú normal (sidebar expandido) */
.submenu {
    background: #252836;
    padding: 0.25rem 0;
    list-style: none;
    margin: 0.25rem 0.5rem;
    border-radius: 6px;
    display: none;
}

.submenu.show {
    display: block !important;
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem 0.4rem 2.25rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.15s ease;
    border-radius: 4px;
    margin: 0.1rem 0.25rem;
}

.submenu a i {
    width: 14px;
    margin-right: 0.5rem;
    font-size: 0.7rem;
}

.submenu a:hover {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    padding-left: 2.5rem;
}

/* Animación del chevron */
.has-submenu .nav-link .fa-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid #2d3142;
    background: #1a1d29;
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.user-avatar-sidebar {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2d3142;
}

.avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border: 2px solid #1a1d29;
    border-radius: 50%;
}

.user-info {
    flex: 1;
    margin-left: 0.5rem;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.75rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.65rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header */
header.header,
.header {
    position: fixed !important;
    top: 0 !important;
    left: 200px !important;
    right: 0 !important;
    height: 50px !important;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
    transition: left 0.3s ease;
}

/* Header cuando sidebar está colapsado */
body:has(.sidebar.collapsed) header.header,
body:has(.sidebar.collapsed) .header {
    left: 60px !important;
}

/* Fallback usando variable CSS */
@supports (left: var(--sidebar-width)) {
    header.header,
    .header {
        left: var(--sidebar-width) !important;
        height: var(--header-height) !important;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 100%;
}

.header-left {
    flex: 1;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

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

.header-item {
    position: relative;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-toggle-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

/* Main Content - FORZAR layout correcto en TODAS las páginas */
main.main-content,
.main-content {
    position: relative !important;
    margin-left: 200px !important;
    margin-top: 50px !important;
    padding: 1.25rem !important;
    min-height: calc(100vh - 50px) !important;
    background: #f5f7fa !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    display: block !important;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Main Content cuando sidebar está colapsado */
.sidebar.collapsed ~ main.main-content,
body:has(.sidebar.collapsed) main.main-content {
    margin-left: 60px !important;
    width: calc(100% - 60px) !important;
    max-width: calc(100% - 60px) !important;
}

/* Fallback usando variable CSS si está disponible */
@supports (margin-left: var(--sidebar-width)) {
    main.main-content {
        margin-left: var(--sidebar-width) !important;
        margin-top: var(--header-height) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        max-width: calc(100% - var(--sidebar-width)) !important;
    }
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #fff;
    overflow: hidden;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.card-body {
    padding: 1rem;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-card .card-body {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-right: 1rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    color: #212529;
}

.stat-label {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Engagement Circle */
.engagement-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--success-color) 0% 75%, #e9ecef 75% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
}

.engagement-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fff;
}

.engagement-value {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: bold;
    color: var(--success-color);
}

.engagement-label {
    position: relative;
    z-index: 1;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    background: #fff;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive - Móviles */
@media (max-width: 768px) {
    /* Sidebar oculto por defecto en móvil */
    .sidebar,
    aside.sidebar,
    #sidebar.sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
    }
    
    /* Sidebar visible cuando tiene clase .show */
    .sidebar.show,
    aside.sidebar.show,
    #sidebar.sidebar.show {
        transform: translateX(0) !important;
    }
    
    /* Overlay para cerrar sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block !important;
    }
    
    /* Header a ancho completo */
    .header,
    header.header {
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Main content a ancho completo */
    main.main-content,
    .main-content {
        margin-left: 0 !important;
        margin-top: 60px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
    }
    
    /* Footer sin margen */
    .footer {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Botón toggle visible en móvil */
    .sidebar-toggle-mobile {
        display: block !important;
    }
    
    /* Ajustes de padding en cards para móvil */
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 1rem !important;
    }
}

/* Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }

/* ==============================================
   TABLAS MUY COMPACTAS - Para ver bien al 100% zoom
   ============================================== */

/* Tabla base MUY compacta */
.table {
    font-size: 0.72rem;
    line-height: 1.2;
}

.table th,
.table td {
    padding: 0.25rem 0.35rem;
    vertical-align: middle;
}

.table-sm th,
.table-sm td {
    padding: 0.15rem 0.25rem;
}

/* Headers de tabla MUY compactos */
.table thead th {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
    padding: 0.3rem 0.35rem;
    background: #f8f9fa;
}

/* Celdas con contenido largo */
.table td {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Botones dentro de tablas MUY pequeños */
.table .btn {
    padding: 0.12rem 0.25rem;
    font-size: 0.65rem;
}

.table .btn-sm {
    padding: 0.1rem 0.2rem;
    font-size: 0.6rem;
}

.table .btn-group .btn {
    padding: 0.1rem 0.2rem;
}

/* Badges en tablas */
.table .badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.3rem;
}

/* Checkboxes en tablas */
.table input[type="checkbox"] {
    width: 12px;
    height: 12px;
}

/* DataTables específico - MUY compacto */
table.dataTable {
    font-size: 0.72rem;
}

table.dataTable thead th,
table.dataTable thead td {
    padding: 0.3rem 0.35rem;
    font-size: 0.68rem;
}

table.dataTable tbody th,
table.dataTable tbody td {
    padding: 0.25rem 0.35rem;
}

/* Reducir ancho de columnas de acciones */
.table th:last-child,
.table td:last-child {
    width: auto;
    min-width: 80px;
}

/* Contenedor de tabla responsive con scroll */
.table-responsive {
    font-size: 0.8rem;
}

/* Cards con tablas - padding reducido */
.card-body .table-responsive {
    margin: -0.5rem;
}

.card-body .table {
    margin-bottom: 0;
}

/* Estilos para DataTables mejorados */
.dataTables_wrapper .dataTables_length select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-size: 0.8rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.5rem 0.75rem;
    margin: 0 2px;
    border-radius: 6px;
    border: 1px solid #dee2e6 !important;
    background: #fff !important;
    color: #333 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9fa !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.75rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Estilos para barra de búsqueda global */
#globalSearch {
    border-radius: 0 6px 6px 0;
}

#globalSearch:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

/* Estilos para filtros */
#filterStatus, #filterDateRange {
    border-radius: 6px;
}

#filterStatus:focus, #filterDateRange:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}

/* Botones de exportación */
.dt-buttons .btn {
    margin-right: 0.5rem;
}

/* Ocultar el buscador de DataTables por defecto (usamos el nuestro) */
.dataTables_wrapper .dataTables_filter {
    display: none;
}

/* Asegurar que la paginación sea visible */
.dataTables_wrapper .dataTables_paginate {
    display: flex !important;
    justify-content: flex-end;
    padding: 0.5rem 0;
}

.dataTables_wrapper .dataTables_length {
    display: inline-block !important;
    margin-bottom: 0.5rem;
}

.dataTables_wrapper .dataTables_info {
    display: inline-block !important;
}

/* Barra de acciones masivas de delivery */
#bulkActionsBar {
    transition: all 0.3s ease;
    border-radius: 8px;
}

#bulkActionsBar.has-selection {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border: 2px solid #2196f3 !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

#bulkActionsBar .badge {
    transition: all 0.3s ease;
}

#bulkActionsBar.has-selection .badge {
    background: #1976d2 !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Estilos para checkboxes */
.contact-checkbox, .select-all {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.contact-checkbox:checked, .select-all:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* Tabla responsive */
.table-responsive {
    overflow-x: auto;
}

/* Asegurar visibilidad de controles DataTables */
div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
    visibility: visible !important;
    opacity: 1 !important;
}

