/* Estilos adicionales para la Landing Page */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    margin-top: -20px;
}

.hero-section h1 {
    color: white;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.hero-image {
    padding: 40px;
}

.hero-icon {
    font-size: 200px;
    color: rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.min-vh-50 {
    min-height: 50vh;
}

/* Módulos Section */
.modulos-section {
    padding: 80px 0;
    background: white;
}

.modulo-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.modulo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.modulo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modulo-icon .material-icons {
    font-size: 40px;
    color: white;
}

.modulo-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.modulo-description {
    color: #6c757d;
    margin-bottom: 20px;
    text-align: center;
    min-height: 60px;
}

.modulo-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modulo-features li {
    padding: 8px 0;
    color: #495057;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modulo-features .check-icon {
    font-size: 20px;
    color: #28a745;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Features Section */
.features-section {
    padding: 80px 0;
}

.feature-item {
    padding: 30px 20px;
}

.feature-icon {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 20px;
}

.feature-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-item p {
    color: #6c757d;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
}

.cta-section .btn-light {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-section .btn-light:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-icon {
        font-size: 120px;
    }
    
    .modulo-card {
        margin-bottom: 20px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

/* Ajustes para el navbar en landing */
.hero-section ~ * {
    margin-top: 0;
}

/* Mejoras de accesibilidad */
.modulo-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 4px;
}

/* Animaciones suaves */
.modulo-card,
.feature-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation para las tarjetas */
.modulo-card:nth-child(1) { animation-delay: 0.1s; }
.modulo-card:nth-child(2) { animation-delay: 0.2s; }
.modulo-card:nth-child(3) { animation-delay: 0.3s; }
.modulo-card:nth-child(4) { animation-delay: 0.4s; }
.modulo-card:nth-child(5) { animation-delay: 0.5s; }
.modulo-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================================================
   ESTILOS PARA PÁGINAS: QUIÉNES SOMOS, CONTACTO, PRECIOS
   Consistencia con landing existente - Sin CSS inline
   ============================================================================ */

/* Hero reducido para subpáginas */
.hero-section-sm {
    padding: 50px 0;
    min-height: auto;
}

.hero-section-sm .min-vh-50 {
    min-height: auto;
}

.opacity-90 {
    opacity: 0.9;
}

/* About Section - Quiénes Somos */
.about-section {
    background: white;
}

.about-content .text-primary {
    color: var(--tenant-color-primary, #667eea) !important;
}

.about-icon-wrapper {
    padding: 40px;
}

.about-main-icon {
    font-size: 180px;
    color: rgba(102, 126, 234, 0.2);
    animation: float 3s ease-in-out infinite;
}

/* Values Section - Misión, Visión, Valores */
.value-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    text-align: center;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.value-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.value-icon .material-icons {
    font-size: 36px;
    color: white;
}

.value-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.value-description {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* Team Section - Nuestro Equipo */
.team-section {
    background: white;
}

.team-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    text-align: center;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.team-avatar-wrapper {
    width: 120px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #e9ecef;
}

.team-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.team-role {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.team-bio {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

/* Contact Section */
.contact-section {
    background: white;
}

.contact-info-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    height: 100%;
}

.contact-info-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-icon {
    font-size: 28px;
    color: #667eea;
    flex-shrink: 0;
}

.contact-form-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.contact-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.contact-form .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.contact-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Pricing Section */
.pricing-section {
    background: white;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.pricing-card-featured {
    border-color: #667eea;
    border-width: 2px;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.2);
}

.pricing-card-featured:hover {
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.25);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header {
    padding: 35px 30px 25px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.pricing-price {
    margin-bottom: 15px;
}

.pricing-currency {
    font-size: 1.25rem;
    color: #6c757d;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.pricing-period {
    font-size: 1rem;
    color: #6c757d;
}

.pricing-description {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
}

.pricing-features {
    list-style: none;
    padding: 25px 30px;
    margin: 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #495057;
}

.pricing-check {
    font-size: 20px;
    color: #28a745;
    flex-shrink: 0;
}

.pricing-footer {
    padding: 0 30px 30px;
    margin-top: auto;
}

.pricing-footer .btn {
    border-radius: 8px;
}

/* Responsive para nuevas secciones */
@media (max-width: 768px) {
    .hero-section-sm {
        padding: 40px 0;
    }

    .about-main-icon {
        font-size: 120px;
    }

    .team-avatar-wrapper {
        width: 100px;
        height: 116px;
    }

    .contact-form-card {
        padding: 25px;
    }
}

/* ============================================================================
   ESTILOS PARA PÁGINA DE LOGIN - TONOS GRISES OSCUROS
   Diseño elegante, moderno y amigable - 100% Responsive
   ============================================================================ */

/* Reset completo para la página de login */
body.login-page,
body.login-page * {
    box-sizing: border-box;
}

body.login-page {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    min-height: 100vh !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    position: relative !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    width: 100% !important;
    color: #333333 !important;
}

/* Reset de Bootstrap para login page */
body.login-page .container,
body.login-page .container-fluid,
body.login-page .row,
body.login-page .col,
body.login-page .col-md,
body.login-page .col-lg {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
}

/* Ocultar elementos no deseados de Bootstrap */
body.login-page nav,
body.login-page footer,
body.login-page .navbar,
body.login-page main.container,
body.login-page header {
    display: none !important;
}

/* Forzar fondo oscuro en todos los elementos */
body.login-page > *:not(.login-container) {
    background: transparent !important;
}

/* Animación sutil del fondo */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efecto de partículas sutiles en el fondo */
body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Contenedor principal del login */
.login-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    height: 100vh !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 40px 20px !important;
    position: relative !important;
    z-index: 999 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Wrapper del login box */
.login-wrapper {
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    margin: 60px auto 0 auto !important;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Caja principal del login - Estilo de ficha elegante con marco */
.login-box {
    /* ============================================
       COLOR DE FONDO DE LA FICHA DE LOGIN
       Degradado de gris claro con más blanco - Cambiar aquí para modificar
       ============================================ */
    /*background: linear-gradient(135deg, #e0e0e0 0%, #d5d5d5 20%, #c8c8c8 50%) !important; */ /* Degradado gris muy claro (más blanco) */
    background: linear-gradient(135deg, #b8b8b8 10%, #a0a0a0 50%, #a0a0a0 100%)
    background-color: #d5d5d5 !important;  /* Color de respaldo (fallback) - gris muy claro */
    /* ============================================ */
    
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 24px !important;
    padding: 60px 50px !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 4px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border: 4px solid #1a1a1a !important;
    border-style: solid !important;
    position: relative !important;
    overflow: hidden !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    display: block !important;
    visibility: visible !important;
}

/* Efecto de brillo sutil en la ficha */
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.8s ease;
}

.login-box:hover::before {
    left: 100%;
}

.login-box:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: #2d2d2d !important;
}

/* Header del login */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 0;
    padding: 0;
    position: relative;
}

.login-logo {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 50%, #2d2d2d 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: logoFloat 3s ease-in-out infinite;
}

.login-logo:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.login-logo .material-icons {
    font-size: 52px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.login-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: -1px;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 1.05rem;
    color: #b8b8b8;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Mensajes de alerta */
.login-messages {
    margin-bottom: 28px;
}

.login-messages .alert {
    background: rgba(58, 58, 58, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    padding: 14px 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-messages .alert-error,
.login-messages .alert-danger {
    background: rgba(74, 42, 42, 0.9);
    border-color: rgba(220, 53, 69, 0.4);
    color: #ff8a8a;
}

.login-messages .alert-success {
    background: rgba(42, 74, 42, 0.9);
    border-color: rgba(40, 167, 69, 0.4);
    color: #8bff8b;
}

.login-messages .alert .material-icons {
    font-size: 22px;
    margin-right: 10px;
    flex-shrink: 0;
}

.login-messages .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.login-messages .btn-close:hover {
    opacity: 1;
}

/* Formulario de login */
.login-form {
    margin-top: 32px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center !important; /* Cambiado de stretch a center para centrar elementos */
    width: 100%;
    text-align: center !important; /* Centrar el contenido del formulario */
}

.login-form .login-button-wrapper {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.login-form .btn-login {
    width: auto !important;
    min-width: 220px !important;
    max-width: 100% !important;
}

/* Asegurar que el botón dentro de login-box esté centrado y con fondo azul oscuro suave */
.login-box .btn-login,
.login-box form .btn-login {
    margin-left: auto !important;
    margin-right: auto !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #2c5282 !important; /* Azul oscuro suave */
    background-color: #2c5282 !important;
    background-image: none !important;
}

/* Grupos de formulario */
.login-form .form-group {
    margin-bottom: 30px; /* Separación aumentada entre inputs */
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    position: relative;
    width: 100%; /* Los inputs deben ocupar el 100% del ancho */
    align-self: stretch; /* Los form-groups sí deben estirarse */
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.3s ease;
}

.login-form .form-group:focus-within .form-label {
    color: #ffffff;
}

.login-form .form-label .material-icons {
    font-size: 20px;
    color: #a0a0a0;
    transition: color 0.3s ease;
}

.login-form .form-group:focus-within .form-label .material-icons {
    color: #ffffff;
}

/* Campos de entrada - FORZAR TEXTO NEGRO SOBRE FONDO BLANCO */
.login-form .form-control,
.login-box .form-control,
.login-box .login-form .form-control,
.login-form input[type="text"],
.login-form input[type="password"] {
    background: #ffffff !important; /* Fondo blanco sólido */
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1.5px solid rgba(0, 0, 0, 0.25) !important; /* Borde oscuro */
    border-radius: 12px !important;
    color: #000000 !important; /* Texto negro */
    -webkit-text-fill-color: #000000 !important; /* Para Safari */
    padding: 16px 18px !important;
    font-size: 1rem !important;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    display: block;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.login-form .form-control:hover,
.login-box .form-control:hover,
.login-form input[type="text"]:hover,
.login-form input[type="password"]:hover {
    border-color: rgba(0, 0, 0, 0.35) !important;
    background: #ffffff !important; /* Fondo blanco sólido al hover */
    background-color: #ffffff !important;
    color: #000000 !important; /* Texto negro */
    -webkit-text-fill-color: #000000 !important;
}

.login-form .form-control:focus,
.login-box .form-control:focus,
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    background: #ffffff !important; /* Fondo blanco sólido al focus */
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.5) !important; /* Borde más oscuro al focus */
    color: #000000 !important; /* Texto negro */
    -webkit-text-fill-color: #000000 !important;
    box-shadow: 
        0 0 0 4px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.15);
    outline: none;
    transform: translateY(-1px);
    z-index: 1;
}

/* Asegurar que el input-group tenga el mismo estilo al hacer focus */
.login-form .input-group:focus-within .form-control {
    z-index: 2;
}

.login-form .input-group:focus-within .btn {
    z-index: 2;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.login-form .form-control::placeholder,
.login-box .form-control::placeholder,
.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
    color: #666666 !important; /* Placeholder gris oscuro para que se vea */
    font-weight: 400;
    opacity: 0.7 !important;
    -webkit-text-fill-color: #666666 !important;
}

/* Input group para campo de contraseña */
.login-form .input-group {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    position: relative !important;
}

.login-form .input-group .form-control {
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
    padding-right: 16px !important;
    background: rgba(255, 255, 255, 0.95) !important; /* Fondo blanco */
    color: #000000 !important; /* Texto negro */
    border-color: rgba(0, 0, 0, 0.2) !important; /* Borde oscuro */
}

.login-form .input-group .btn {
    flex-shrink: 0 !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: none !important;
    background: rgba(240, 240, 240, 0.9) !important; /* Fondo gris claro */
    border-color: rgba(0, 0, 0, 0.2) !important; /* Borde oscuro */
    color: #333333 !important; /* Color oscuro para el icono */
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
    min-width: 48px !important;
}

.login-form .input-group .btn:hover {
    background: rgba(220, 220, 220, 1) !important; /* Fondo gris más claro al hover */
    border-color: rgba(0, 0, 0, 0.3) !important;
    color: #000000 !important; /* Color negro al hover */
}

.login-form .input-group .btn:focus {
    box-shadow: none !important;
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    background: rgba(30, 30, 30, 0.85) !important;
}

.login-form .input-group .btn:active {
    background: rgba(35, 35, 35, 0.9) !important;
    transform: scale(0.98);
}

.login-form .input-group .btn .material-icons {
    font-size: 22px !important;
    line-height: 1 !important;
    transition: transform 0.2s ease !important;
}

.login-form .input-group .btn:hover .material-icons {
    transform: scale(1.1);
}

/* Opciones del login */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 12px;
}

.login-options .form-check {
    margin: 0;
    display: flex;
    align-items: center;
}

.login-options .form-check-input {
    background-color: rgba(26, 26, 26, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-top: 0;
}

.login-options .form-check-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(30, 30, 30, 0.9);
}

.login-options .form-check-input:checked {
    background-color: #4a4a4a;
    border-color: rgba(255, 255, 255, 0.4);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.login-options .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    outline: none;
}

.login-options .form-check-label {
    color: #b8b8b8;
    font-weight: 500;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

.login-options .form-check-label:hover {
    color: #ffffff;
}

.forgot-password {
    color: #b8b8b8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 6px;
}

.forgot-password:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

/* Wrapper para centrar el botón de login */
.login-button-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
}

/* Botón de login - Centrado y con fondo azul oscuro suave - MÁXIMA PRIORIDAD */
button.btn-login,
.btn-login,
.login-form .btn-login,
.login-box .btn-login,
.login-box form .btn-login,
body.login-page .btn-login,
body.login-page button.btn-login {
    width: auto !important;
    min-width: 220px !important;
    max-width: 100% !important;
    background: #2c5282 !important; /* Azul oscuro suave */
    background-color: #2c5282 !important; /* Color de respaldo azul oscuro suave */
    background-image: none !important; /* Eliminar cualquier gradiente o imagen */
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    color: #ffffff !important; /* Texto blanco */
    -webkit-text-fill-color: #ffffff !important; /* Para Safari */
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    padding: 18px 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 
        0 6px 20px rgba(44, 82, 130, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    margin: 0 !important; /* Sin margen, el wrapper se encarga del centrado */
    box-sizing: border-box;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.5;
    text-align: center !important;
}

/* Asegurar que el texto y los iconos dentro del botón sean blancos */
.btn-login *,
.btn-login span,
.btn-login .material-icons,
button.btn-login *,
button.btn-login span,
button.btn-login .material-icons {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover,
button.btn-login:hover {
    background: #3a6ba3 !important; /* Azul oscuro suave más claro al hover */
    background-color: #3a6ba3 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(44, 82, 130, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #ffffff !important; /* Texto blanco al hover */
    -webkit-text-fill-color: #ffffff !important;
}

.btn-login:hover *,
.btn-login:hover span,
.btn-login:hover .material-icons,
button.btn-login:hover *,
button.btn-login:hover span,
button.btn-login:hover .material-icons {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.btn-login:active,
button.btn-login:active {
    transform: translateY(-1px);
    background: #1e4a7a !important; /* Azul oscuro suave más oscuro al presionar */
    background-color: #1e4a7a !important;
    background-image: none !important;
    color: #ffffff !important; /* Texto blanco al presionar */
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 
        0 4px 15px rgba(44, 82, 130, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-login:active *,
.btn-login:active span,
.btn-login:active .material-icons,
button.btn-login:active *,
button.btn-login:active span,
button.btn-login:active .material-icons {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.btn-login .material-icons {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.btn-login:hover .material-icons {
    transform: translateX(2px);
}

/* Footer del login */
.login-footer {
    margin-top: 36px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
    padding-top: 28px;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer-text {
    color: #9a9a9a;
    font-size: 0.9rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    flex-wrap: wrap;
}

.login-footer-text .material-icons {
    font-size: 18px;
    opacity: 0.8;
}

.register-link {
    color: #c0c0c0;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.register-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9a9a9a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 10px;
    margin-top: 8px;
}

.back-to-home:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-4px);
}

.back-to-home .material-icons {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.back-to-home:hover .material-icons {
    transform: translateX(-2px);
}

/* Responsive para login - 100% Responsive */
@media (max-width: 768px) {
    .login-wrapper {
        max-width: 100%;
        margin-top: 40px !important;
    }
    
    .login-box {
        padding: 50px 40px !important;
        border-radius: 20px;
    }
    
    .login-title {
        font-size: 2.25rem;
    }
    
    .login-logo {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }
    
    .login-logo .material-icons {
        font-size: 46px;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .login-wrapper {
        max-width: 100%;
        margin-top: 30px !important;
    }
    
    .login-box {
        padding: 45px 30px !important;
        border-radius: 20px;
    }
    
    .login-header {
        margin-bottom: 32px;
    }
    
    .login-title {
        font-size: 2rem;
        letter-spacing: -0.8px;
    }
    
    .login-subtitle {
        font-size: 0.95rem;
    }
    
    .login-logo {
        width: 75px;
        height: 75px;
        border-radius: 18px;
        margin-bottom: 20px;
    }
    
    .login-logo .material-icons {
        font-size: 42px;
    }
    
    .login-form {
        margin-top: 28px;
    }
    
    .login-form .form-group {
        margin-bottom: 24px;
    }
    
    .login-form .form-control {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 28px;
    }
    
    .forgot-password {
        margin-top: 0;
        width: 100%;
        text-align: left;
    }
    
    .btn-login {
        padding: 16px 24px;
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .login-footer {
        margin-top: 32px;
        padding-top: 24px;
    }
    
    .login-footer-text {
        font-size: 0.85rem;
        flex-direction: column;
        gap: 6px;
    }
    
    .back-to-home {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}

@media (max-width: 400px) {
    .login-container {
        padding: 12px;
        padding-top: 32px;
    }
    
    .login-wrapper {
        margin-top: 20px !important;
    }
    
    .login-box {
        padding: 40px 25px !important;
        border-radius: 18px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
    }
    
    .login-logo .material-icons {
        font-size: 38px;
    }
    
    .btn-login {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}

/* Animación de entrada mejorada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mejoras de accesibilidad y usabilidad */
.login-form .form-control:invalid:not(:focus):not(:placeholder-shown) {
    border-color: rgba(220, 53, 69, 0.4);
}

.login-form .form-control:valid:not(:focus):not(:placeholder-shown) {
    border-color: rgba(40, 167, 69, 0.3);
}

/* Prevenir zoom en iOS al hacer focus en inputs */
@media screen and (max-width: 768px) {
    .login-form .form-control {
        font-size: 16px !important;
    }
}

/* Reset adicional para elementos Bootstrap que puedan interferir */
body.login-page .alert {
    margin-bottom: 0 !important;
}

body.login-page .form-group {
    margin-bottom: 28px !important;
}

body.login-page .form-label {
    margin-bottom: 12px !important;
}

/* Asegurar que no haya scroll horizontal */
html {
    overflow-x: hidden;
}

body.login-page {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Reset de estilos de lista */
body.login-page ul,
body.login-page ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Reset de estilos de enlaces */
body.login-page a {
    text-decoration: none;
}

body.login-page a:hover {
    text-decoration: none;
}

/* Asegurar que los elementos estén en su lugar */
body.login-page .login-container {
    flex-direction: column;
}

body.login-page .login-wrapper {
    flex-shrink: 0;
    margin-top: 90px !important; /* Más espacio superior antes de la ficha */
}

/* Reset de estilos de botones de Bootstrap - EXCEPTO btn-login */
body.login-page button:not(.btn-login),
body.login-page .btn:not(.btn-login) {
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
}

body.login-page button:not(.btn-login):focus,
body.login-page .btn:not(.btn-login):focus {
    outline: none;
    box-shadow: none;
}

/* Asegurar que btn-login mantenga sus estilos con fondo azul oscuro suave */
body.login-page .btn-login {
    background: #2c5282 !important; /* Azul oscuro suave */
    background-color: #2c5282 !important;
    background-image: none !important;
}

/* Reset de estilos de inputs de Bootstrap */
body.login-page input[type="text"],
body.login-page input[type="password"],
body.login-page input[type="email"],
body.login-page input[type="checkbox"] {
    outline: none;
}

body.login-page input[type="text"]:focus,
body.login-page input[type="password"]:focus,
body.login-page input[type="email"]:focus {
    outline: none;
}

/* Asegurar que Material Icons se muestren correctamente */
body.login-page .material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ================================
   SuperUser - Layout con Sidebar
   ================================ */
.superuser-layout {
    background: #f8f9fa;
    min-height: 100vh;
}

.su-shell {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

.su-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #dee2e6;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.su-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.su-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.su-brand-logo-placeholder {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    border-radius: 8px;
    flex-shrink: 0;
}

.su-brand-logo-placeholder .material-icons {
    font-size: 28px;
    color: #6c757d;
}

.su-brand-text {
    flex: 1;
    min-width: 0;
}

.su-brand-title {
    font-weight: 700;
    color: var(--bs-primary);
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.2;
}

.su-brand-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    margin: 0;
    line-height: 1.2;
}

.su-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding-right: 8px;
}

.su-nav::-webkit-scrollbar {
    width: 6px;
}

.su-nav::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
}

.su-nav::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}

.su-nav::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.su-nav-section-title {
    margin-top: 24px;
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.su-nav-link,
.su-nav-toggle,
.su-sub-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 6px;
    border-radius: 8px;
    color: var(--bs-body-color);
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    text-align: left;
}

.su-nav-toggle {
    font-weight: 600;
    border: none;
}

.su-nav-toggle:focus,
.su-nav-link:focus,
.su-sub-link:focus {
    outline: none;
    box-shadow: none;
}

.su-nav-link:hover,
.su-nav-toggle:hover,
.su-sub-link:hover {
    background: #f1f3f5;
    border-color: #e9ecef;
    color: var(--bs-body-color);
}

.su-nav-toggle::after {
    content: "▸";
    margin-left: auto;
    transition: transform 0.2s ease;
    color: #6c757d;
}

.su-nav-toggle[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

.su-submenu {
    padding-left: 8px;
}

.su-submenu .su-sub-link {
    font-size: 0.95rem;
}

.su-submenu-n2 {
    padding-left: 12px;
    margin-left: 8px;
    border-left: 1px dashed #dee2e6;
}

.su-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: 280px;
    padding-top: 0;
}

.su-header {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.su-header-title {
    font-weight: 600;
}

.su-header-user {
    color: #6c757d;
    font-size: 0.95rem;
}

.su-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.su-logout-btn {
    border: 1px solid #dee2e6;
    background: #ffffff;
    color: #495057;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.su-logout-btn:hover {
    background: #f1f3f5;
    border-color: #ced4da;
}

.su-content {
    padding: 24px;
    margin-top: 64px;
}

.su-page-title {
    margin-bottom: 20px;
}

.su-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.su-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 16px;
}

.su-card-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.su-card-text {
    color: #6c757d;
    margin: 0;
}

.su-alerts {
    position: fixed;
    top: 64px;
    left: 280px;
    right: 0;
    z-index: 998;
    padding: 16px 24px 0;
    max-width: 100%;
    pointer-events: none;
}

.su-alerts .alert {
    pointer-events: auto;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.su-sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    text-align: center;
}

.su-sidebar-footer-logo {
    max-width: 48px;
    height: auto;
    display: block;
    margin: 0 auto 8px;
}

.su-sidebar-footer-text {
    font-size: 0.7rem;
    color: #6c757d;
    line-height: 1.3;
    margin: 0;
    padding: 0 8px;
}

@media (max-width: 991px) {
    .su-shell {
        flex-direction: column;
    }

    .su-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        display: block;
    }

    .su-main {
        margin-left: 0;
        padding-top: 0;
    }

    .su-brand {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .su-brand-logo,
    .su-brand-logo-placeholder {
        width: 40px;
        height: 40px;
    }

    .su-brand-logo-placeholder .material-icons {
        font-size: 24px;
    }

    .su-brand-title {
        font-size: 1rem;
    }

    .su-brand-subtitle {
        font-size: 0.75rem;
    }

    .su-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 14px 16px;
        z-index: 999;
    }

    .su-alerts {
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        padding: 12px 16px 0;
        z-index: 998;
    }

    .su-content {
        margin-top: 58px;
    }

    .su-content {
        padding: 16px;
    }

    .su-sidebar-footer {
        margin-top: 16px;
        padding-top: 12px;
    }

    .su-sidebar-footer-logo {
        max-width: 40px;
    }

    .su-sidebar-footer-text {
        font-size: 0.65rem;
        padding: 0 4px;
    }
}

/* ============================================================================
   Estilos para Formulario de Creación de Empresa
   ============================================================================ */

.empresa-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.empresa-form {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.form-section-header .material-icons {
    font-size: 28px;
    color: #2c5282;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.form-label.required {
    font-weight: 600;
}

.form-label .text-danger {
    color: #dc3545;
    margin-left: 4px;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #2c5282;
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.25);
    outline: none;
}

.form-control:invalid {
    border-color: #dc3545;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 6px;
    display: block;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.input-group {
    position: relative;
}

.input-group .btn-outline-secondary {
    border-left: none;
    border-color: #ced4da;
    background: #ffffff;
    color: #6c757d;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.input-group .btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
}

.input-group .btn-outline-secondary .material-icons {
    font-size: 20px;
}

.input-group .form-control:focus + .btn-outline-secondary {
    border-color: #2c5282;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
}

.form-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-actions .btn .material-icons {
    font-size: 20px;
}

.form-actions .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.form-actions .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
    color: #ffffff;
}

.form-actions .btn-primary {
    background: #2c5282;
    border-color: #2c5282;
    color: #ffffff;
}

.form-actions .btn-primary:hover {
    background: #1e4a7a;
    border-color: #1a3f6b;
    color: #ffffff;
}

/* Responsive para formulario de empresa */
@media (max-width: 768px) {
    .empresa-form-container {
        padding: 10px;
    }
    
    .empresa-form {
        padding: 20px 15px;
    }
    
    .form-section {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .form-section-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .form-section-title {
        font-size: 1.25rem;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .empresa-form-container {
        padding: 5px;
    }
    
    .empresa-form {
        padding: 15px 10px;
        border-radius: 6px;
    }
    
    .form-section-header .material-icons {
        font-size: 24px;
    }
    
    .form-section-title {
        font-size: 1.1rem;
    }
}

/* ============================================================================
   Estilos Globales para Mensajes de Error Informativos
   Fondo azul oscuro con letras blancas en negrilla
   ============================================================================ */

/* Mensajes de error - Fondo azul oscuro con letras blancas en negrilla */
.alert-error,
.alert-danger,
.alert.alert-error,
.alert.alert-danger,
.alert-danger.alert-dismissible,
.alert-error.alert-dismissible {
    background-color: #2c5282 !important;
    background: #2c5282 !important;
    color: #ffffff !important;
    border-color: #1e4a7a !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

.alert-error *,
.alert-danger *,
.alert.alert-error *,
.alert.alert-danger *,
.alert-danger.alert-dismissible *,
.alert-error.alert-dismissible * {
    color: #ffffff !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

/* Mensajes informativos también con fondo azul oscuro */
.alert-info,
.alert.alert-info,
.alert-info.alert-dismissible {
    background-color: #2c5282 !important;
    background: #2c5282 !important;
    color: #ffffff !important;
    border-color: #1e4a7a !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

.alert-info *,
.alert.alert-info *,
.alert-info.alert-dismissible * {
    color: #ffffff !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

/* Botón de cierre en mensajes de error - debe ser blanco */
.alert-error .btn-close,
.alert-danger .btn-close,
.alert-info .btn-close,
.alert.alert-error .btn-close,
.alert.alert-danger .btn-close,
.alert.alert-info .btn-close {
    filter: brightness(0) invert(1) !important;
    opacity: 0.9 !important;
}

.alert-error .btn-close:hover,
.alert-danger .btn-close:hover,
.alert-info .btn-close:hover,
.alert.alert-error .btn-close:hover,
.alert.alert-danger .btn-close:hover,
.alert.alert-info .btn-close:hover {
    opacity: 1 !important;
}

/* Aplicar a todos los contenedores de mensajes */
.su-alerts .alert-error,
.su-alerts .alert-danger,
.su-alerts .alert-info,
.login-messages .alert-error,
.login-messages .alert-danger,
.login-messages .alert-info {
    background-color: #2c5282 !important;
    background: #2c5282 !important;
    color: #ffffff !important;
    border-color: #1e4a7a !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

.su-alerts .alert-error *,
.su-alerts .alert-danger *,
.su-alerts .alert-info *,
.login-messages .alert-error *,
.login-messages .alert-danger *,
.login-messages .alert-info * {
    color: #ffffff !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

/* Override específico para login-messages que tenía estilos previos */
.login-messages .alert-error,
.login-messages .alert-danger {
    background: #2c5282 !important;
    background-color: #2c5282 !important;
    border-color: #1e4a7a !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

.login-messages .alert-error *,
.login-messages .alert-danger * {
    color: #ffffff !important;
    font-weight: bold !important;
    font-weight: 700 !important;
}

/* ============================================================================
   Estilos para Listado de Empresas (Edición)
   ============================================================================ */

.empresas-list-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.empresas-list-header {
    margin-bottom: 32px;
}

.empresas-list-title-section {
    text-align: center;
}

.empresas-list-title {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
}

.empresas-list-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

.empresas-list-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.btn-new-empresa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2c5282;
    border-color: #2c5282;
    color: #ffffff;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-new-empresa:hover {
    background: #1e4a7a;
    border-color: #1e4a7a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(44, 82, 130, 0.3);
}

.btn-new-empresa .material-icons {
    font-size: 20px;
}

.empresas-table-wrapper {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.empresas-table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.empresas-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empresas-table thead th.text-center {
    text-align: center;
}

.empresas-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.empresas-table tbody tr:hover {
    background-color: #f8f9fa;
}

.empresas-table tbody tr:last-child {
    border-bottom: none;
}

.empresas-table tbody td {
    padding: 16px 20px;
    vertical-align: middle;
    color: #495057;
}

.empresa-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.empresa-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.empresa-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.empresa-logo-placeholder .material-icons {
    font-size: 24px;
}

.empresa-name-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.empresa-name-primary {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.empresa-name-secondary {
    font-size: 0.85rem;
    color: #6c757d;
}

.empresa-date-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 0.9rem;
}

.empresa-date-cell .material-icons {
    font-size: 18px;
    color: #6c757d;
}

.empresa-status-cell {
    display: flex;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
}

.status-badge .material-icons {
    font-size: 16px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-active .material-icons {
    color: #28a745;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-inactive .material-icons {
    color: #dc3545;
}

.status-archived {
    background: #e2e3e5;
    color: #383d41;
}

.status-archived .material-icons {
    color: #6c757d;
}

.empresa-actions-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

a.btn-action {
    text-decoration: none;
}

.btn-action .material-icons {
    font-size: 20px;
}

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

.btn-action-view:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-action-edit:hover {
    background: #fff3e0;
    color: #f57c00;
}

.btn-action.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-action-delete:hover {
    background: #ffebee;
    color: #d32f2f;
}

.btn-action-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.btn-action-stock:hover {
    background: #c8e6c9;
    color: #1b5e20;
}

.empresas-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empresas-empty-state .material-icons {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empresas-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin: 0 0 10px 0;
}

.empresas-empty-state p {
    font-size: 1rem;
    margin: 0 0 30px 0;
}

/* Estilos de paginación */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 0;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

.pagination-nav {
    display: flex;
    align-items: center;
    }
    
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
    align-items: center;
}

.page-item {
    display: flex;
    align-items: center;
}

.page-link {
    display: inline-flex;
    align-items: center;
        justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-link:hover:not(.disabled):not(.active) {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.page-item.disabled .page-link {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-link .material-icons {
    font-size: 20px;
}

/* Responsive para tabla de empresas */
@media (max-width: 992px) {
    .empresas-list-actions {
        margin-top: 16px;
    }
    
    .empresas-table-wrapper {
        overflow-x: auto;
    }
    
    .empresas-table {
        min-width: 800px;
    }
}

@media (max-width: 768px) {
    .empresas-list-container {
        padding: 16px;
    }
    
    .empresas-list-title {
        font-size: 1.5rem;
    }
    
    .empresas-list-subtitle {
        font-size: 1rem;
    }
    
    .empresas-list-actions {
        margin-top: 16px;
    }
    
    .empresas-table thead th {
        padding: 12px 15px;
        font-size: 10px;
    }
    
    .empresas-table tbody td {
        padding: 12px 15px;
    }
    
    .empresa-name-cell {
        gap: 10px;
    }
    
    .empresa-logo-small,
    .empresa-logo-placeholder {
        width: 35px;
        height: 35px;
    }
    
    .empresa-name-primary {
        font-size: 0.9rem;
    }
    
    .empresa-name-secondary {
        font-size: 0.8rem;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
    }
    
    .btn-action .material-icons {
        font-size: 18px;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-info {
        text-align: center;
        width: 100%;
    }
    
    .pagination-nav {
        justify-content: center;
        width: 100%;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .empresas-list-container {
        padding: 12px;
    }
    
    .empresas-list-title {
        font-size: 1.25rem;
    }
    
    .empresas-list-subtitle {
        font-size: 0.9rem;
    }
    
    .empresas-list-actions {
        margin-top: 12px;
    }
    
    .btn-new-empresa {
        width: 100%;
        justify-content: center;
    }
    
    .empresas-table thead th {
        padding: 10px 12px;
        font-size: 9px;
    }
    
    .empresas-table tbody td {
        padding: 10px 12px;
    }
    
    .empresa-actions-cell {
        flex-direction: column;
        gap: 4px;
    }
    
    .status-badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .pagination-info {
        font-size: 0.8rem;
    }
    
    .page-link {
        min-width: 32px;
        height: 32px;
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    .page-link .material-icons {
        font-size: 18px;
    }
    
    .pagination {
        gap: 2px;
    }
}

/* ============================================
   Estilos para Confirmación de Eliminación de Empresa
   ============================================ */

.empresa-delete-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.empresa-delete-header-actions {
    margin-bottom: 24px;
}

.empresa-delete-warning {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    color: #fff;
}

.empresa-delete-warning-icon {
    margin-bottom: 16px;
}

.empresa-delete-warning-icon .material-icons {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.9);
}

.empresa-delete-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.empresa-delete-subtitle {
    font-size: 1.1rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.empresa-delete-info {
    margin-bottom: 32px;
}

.empresa-delete-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin-bottom: 24px;
}

.empresa-delete-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.empresa-delete-card-header .material-icons {
    font-size: 24px;
    color: #667eea;
}

.empresa-delete-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

.empresa-delete-card-body {
    padding: 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.empresa-delete-logo-section {
    flex-shrink: 0;
}

.empresa-delete-logo {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #dee2e6;
}

.empresa-delete-logo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
}

.empresa-delete-logo-placeholder .material-icons {
    font-size: 48px;
    color: #adb5bd;
}

.empresa-delete-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empresa-delete-field {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.empresa-delete-field:last-child {
    border-bottom: none;
}

.empresa-delete-field-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 140px;
    font-size: 0.9rem;
}

.empresa-delete-field-value {
    color: #212529;
    font-weight: 500;
}

.empresa-delete-alert {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.empresa-delete-alert-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.empresa-delete-alert-header .material-icons {
    font-size: 28px;
    color: #ff9800;
}

.empresa-delete-alert-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #856404;
}

.empresa-delete-alert-body p {
    margin: 0 0 16px 0;
    color: #856404;
    font-weight: 500;
}

.empresa-delete-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.empresa-delete-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    color: #856404;
    font-size: 0.9rem;
}

.empresa-delete-list li .material-icons {
    font-size: 20px;
    color: #ff9800;
}

.empresa-delete-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

.empresa-delete-warning-box .material-icons {
    font-size: 24px;
    color: #dc3545;
    flex-shrink: 0;
}

.empresa-delete-warning-box p {
    margin: 0;
    font-size: 0.95rem;
}

.empresa-delete-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 24px;
    border: 1px solid #e9ecef;
}

.empresa-delete-confirm {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.empresa-delete-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
    user-select: none;
}

.empresa-delete-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #dc3545;
}

.empresa-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-delete {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.2s ease;
}

.btn-delete:hover:not(:disabled) {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-cancel {
    padding: 12px 24px;
}

/* Responsive para confirmación de eliminación */
@media (max-width: 768px) {
    .empresa-delete-container {
        padding: 16px;
    }
    
    .empresa-delete-warning {
        padding: 24px 20px;
    }
    
    .empresa-delete-title {
        font-size: 1.5rem;
    }
    
    .empresa-delete-subtitle {
        font-size: 1rem;
    }
    
    .empresa-delete-warning-icon .material-icons {
        font-size: 56px;
    }
    
    .empresa-delete-card-body {
        flex-direction: column;
        gap: 20px;
    }
    
    .empresa-delete-logo,
    .empresa-delete-logo-placeholder {
        width: 80px;
        height: 80px;
    }
    
    .empresa-delete-logo-placeholder .material-icons {
        font-size: 40px;
    }
    
    .empresa-delete-field {
        flex-direction: column;
        gap: 4px;
    }
    
    .empresa-delete-field-label {
        min-width: auto;
    }
    
    .empresa-delete-list {
        grid-template-columns: 1fr;
    }
    
    .empresa-delete-actions {
        flex-direction: column-reverse;
    }
    
    .empresa-delete-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .empresa-delete-container {
        padding: 12px;
    }
    
    .empresa-delete-warning {
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .empresa-delete-title {
        font-size: 1.25rem;
    }
    
    .empresa-delete-subtitle {
        font-size: 0.9rem;
    }
    
    .empresa-delete-warning-icon .material-icons {
        font-size: 48px;
    }
    
    .empresa-delete-card-header {
        padding: 16px 20px;
    }
    
    .empresa-delete-card-header h3 {
        font-size: 1.1rem;
    }
    
    .empresa-delete-card-body {
        padding: 20px;
    }
    
    .empresa-delete-alert {
        padding: 20px;
    }
    
    .empresa-delete-alert-header h4 {
        font-size: 1.1rem;
    }
    
    .empresa-delete-form {
        padding: 20px;
    }
    
    .empresa-delete-confirm {
        padding: 16px;
    }
    
    .empresa-delete-checkbox-label {
        font-size: 0.9rem;
    }
}

/* ============================================
   Estilos para Ficha de Detalles de Empresa
   ============================================ */

.empresa-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.empresa-detail-header-actions {
    margin-bottom: 24px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
    transform: translateX(-2px);
}

.btn-back .material-icons {
    font-size: 20px;
}

.empresa-detail-header {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    color: #fff;
}

.empresa-detail-logo-section {
    flex-shrink: 0;
}

.empresa-detail-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.empresa-detail-logo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.empresa-detail-logo-placeholder .material-icons {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.9);
}

.empresa-detail-title-section {
    flex: 1;
}

.empresa-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.empresa-detail-subtitle {
    font-size: 1.25rem;
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.empresa-detail-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.empresa-detail-status .status-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.95rem;
}

.empresa-detail-status .status-badge .material-icons {
    color: #fff;
}

.empresa-detail-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.empresa-detail-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.empresa-detail-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.empresa-detail-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.empresa-detail-card-header .material-icons {
    font-size: 24px;
    color: #667eea;
}

.empresa-detail-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

.empresa-detail-card-body {
    padding: 24px;
}

.empresa-detail-field {
    margin-bottom: 24px;
}

.empresa-detail-field:last-child {
    margin-bottom: 0;
}

.empresa-detail-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.empresa-detail-field-label .material-icons {
    font-size: 18px;
    color: #667eea;
}

.empresa-detail-field-value {
    font-size: 1.1rem;
    color: #212529;
    font-weight: 500;
    word-break: break-word;
}

.empresa-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s ease;
}

.empresa-detail-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.empresa-detail-link .material-icons {
    font-size: 18px;
}

.empresa-detail-id {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.empresa-detail-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empresa-detail-empty .material-icons {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.empresa-detail-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Responsive para ficha de empresa */
@media (max-width: 992px) {
    .empresa-detail-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .empresa-detail-header {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .empresa-detail-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .empresa-detail-container {
        padding: 16px;
    }
    
    .empresa-detail-header {
        padding: 24px 20px;
        gap: 20px;
    }
    
    .empresa-detail-logo,
    .empresa-detail-logo-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .empresa-detail-logo-placeholder .material-icons {
        font-size: 56px;
    }
    
    .empresa-detail-title {
        font-size: 1.75rem;
    }
    
    .empresa-detail-subtitle {
        font-size: 1.1rem;
    }
    
    .empresa-detail-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .empresa-detail-card-header {
        padding: 16px 20px;
    }
    
    .empresa-detail-card-header h3 {
        font-size: 1.1rem;
    }
    
    .empresa-detail-card-body {
        padding: 20px;
    }
    
    .empresa-detail-field {
        margin-bottom: 20px;
    }
    
    .empresa-detail-field-value {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .empresa-detail-container {
        padding: 12px;
    }
    
    .empresa-detail-header {
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .empresa-detail-logo,
    .empresa-detail-logo-placeholder {
        width: 80px;
        height: 80px;
    }
    
    .empresa-detail-logo-placeholder .material-icons {
        font-size: 48px;
    }
    
    .empresa-detail-title {
        font-size: 1.5rem;
    }
    
    .empresa-detail-subtitle {
        font-size: 1rem;
    }
    
    .empresa-detail-status .status-badge {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .empresa-detail-card-header {
        padding: 14px 16px;
    }
    
    .empresa-detail-card-header .material-icons {
        font-size: 20px;
    }
    
    .empresa-detail-card-header h3 {
        font-size: 1rem;
    }
    
    .empresa-detail-card-body {
        padding: 16px;
    }
    
    .empresa-detail-field-label {
        font-size: 0.8rem;
    }
    
    .empresa-detail-field-value {
        font-size: 0.95rem;
    }
    
    .btn-back {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-back .material-icons {
        font-size: 18px;
    }
}

/* ============================================
   Estilos para Gestión de Licencias
   ============================================ */

.licencias-list-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: visible;
    overflow-y: visible;
}

.licencias-list-header {
    margin-bottom: 32px;
}

.licencias-list-title-section {
    text-align: center;
}

.licencias-list-title {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
}

.licencias-list-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

.licencias-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid #e9ecef;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    position: relative;
}

.licencias-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.licencias-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.licencias-table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.licencias-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.licencias-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 1700px;
}

/* Tabla de descuentos de productos con columna de acciones (10 columnas) */
.licencias-table-descuentos {
    min-width: 1800px;
}

/* Tabla de descuentos por moneda (10 columnas con acciones) */
.licencias-table-descuentos-moneda {
    min-width: 1900px;
}

.licencias-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Anchos específicos para columnas de productos */
.licencias-table thead th:nth-child(1),
.licencias-table tbody td:nth-child(1) {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

.licencias-table thead th:nth-child(2),
.licencias-table tbody td:nth-child(2) {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
}

.licencias-table thead th:nth-child(3),
.licencias-table tbody td:nth-child(3) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.licencias-table thead th:nth-child(4),
.licencias-table tbody td:nth-child(4) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.licencias-table thead th:nth-child(5),
.licencias-table tbody td:nth-child(5) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.licencias-table thead th:nth-child(6),
.licencias-table tbody td:nth-child(6) {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.licencias-table thead th:nth-child(7),
.licencias-table tbody td:nth-child(7) {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

.licencias-table thead th:nth-child(8),
.licencias-table tbody td:nth-child(8) {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    text-align: center;
}

.licencias-table thead th:nth-child(9),
.licencias-table tbody td:nth-child(9) {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

.licencias-table thead th:nth-child(10),
.licencias-table tbody td:nth-child(10) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

/* Anchos específicos para columnas de descuentos por moneda (9 columnas) */
.licencias-table-descuentos-moneda thead th:nth-child(1),
.licencias-table-descuentos-moneda tbody td:nth-child(1) { /* Moneda */
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}

.licencias-table-descuentos-moneda thead th:nth-child(2),
.licencias-table-descuentos-moneda tbody td:nth-child(2) { /* Tipo de Descuento */
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

.licencias-table-descuentos-moneda thead th:nth-child(3),
.licencias-table-descuentos-moneda tbody td:nth-child(3) { /* Valor del Descuento */
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

.licencias-table-descuentos-moneda thead th:nth-child(4),
.licencias-table-descuentos-moneda tbody td:nth-child(4) { /* Fecha de Inicio */
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.licencias-table-descuentos-moneda thead th:nth-child(5),
.licencias-table-descuentos-moneda tbody td:nth-child(5) { /* Fecha de Fin */
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.licencias-table-descuentos-moneda thead th:nth-child(6),
.licencias-table-descuentos-moneda tbody td:nth-child(6) { /* Vigencia */
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.licencias-table-descuentos-moneda thead th:nth-child(7),
.licencias-table-descuentos-moneda tbody td:nth-child(7) { /* Monto Mínimo Factura */
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

.licencias-table-descuentos-moneda thead th:nth-child(8),
.licencias-table-descuentos-moneda tbody td:nth-child(8) { /* Estado */
    width: 140px;
    min-width: 140px;
    max-width: 140px;
}

.licencias-table-descuentos-moneda thead th:nth-child(9),
.licencias-table-descuentos-moneda tbody td:nth-child(9) { /* Fecha de Registro */
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

.licencias-table-descuentos-moneda thead th:nth-child(10),
.licencias-table-descuentos-moneda tbody td:nth-child(10) { /* Acciones */
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

.licencias-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
}

.licencias-table tbody td .licencia-empresa-name-primary,
.licencias-table tbody td .licencia-empresa-name-secondary {
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    display: block;
}

.licencias-table tbody td .licencia-date-cell,
.licencias-table tbody td .licencia-status-cell,
.licencias-table tbody td .licencia-empresa-cell {
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.licencias-table tbody tr:hover {
    background-color: #f8f9fa;
}


.licencia-empresa-logo,
.licencia-empresa-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.licencia-empresa-logo {
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.licencia-empresa-logo-placeholder {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
}

.licencia-empresa-logo-placeholder .material-icons {
    font-size: 24px;
    color: #adb5bd;
}

.licencia-empresa-info {
    flex: 1;
    min-width: 0;
}

.licencia-empresa-name-primary {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.licencia-empresa-name-secondary {
    font-size: 0.85rem;
    color: #6c757d;
}


.licencia-date-cell .material-icons {
    font-size: 18px;
    color: #6c757d;
}

.licencia-no-asignada {
    color: #adb5bd;
    font-style: italic;
    font-size: 0.9rem;
}


.licencia-dias-restantes {
    font-size: 0.8rem;
    margin-left: 4px;
    opacity: 0.8;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-pending .material-icons {
    color: #ffc107;
}

.status-no-license {
    background: #e2e3e5;
    color: #383d41;
}

.status-no-license .material-icons {
    color: #6c757d;
}

.licencia-actions-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.contacto-icon {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 4px;
    flex-shrink: 0;
}

.contacto-text {
    word-break: break-word;
    overflow-wrap: break-word;
}

.producto-stock-cell,
.producto-precio-cell {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.stock-display,
.precio-display {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.stock-display .material-icons,
.precio-display .material-icons {
    font-size: 18px;
    color: #6c757d;
    flex-shrink: 0;
}

.stock-value,
.precio-value {
    font-weight: 600;
    color: #212529;
    font-size: 0.9rem;
    white-space: nowrap;
}

.licencia-empresa-cell {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.licencia-empresa-name-primary {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.licencia-date-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 0.9rem;
    white-space: nowrap;
}

.licencia-status-cell {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Estilos para tabla de ajustar stock */
.ajustar-stock-table {
    table-layout: auto;
}

.ajustar-stock-table thead th:nth-child(1),
.ajustar-stock-table tbody td:nth-child(1) {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.ajustar-stock-table thead th:nth-child(2),
.ajustar-stock-table tbody td:nth-child(2) {
    width: 300px;
    min-width: 300px;
}

.ajustar-stock-table thead th:nth-child(3),
.ajustar-stock-table tbody td:nth-child(3) {
    width: 180px;
    min-width: 180px;
}

.ajustar-stock-table thead th:nth-child(4),
.ajustar-stock-table tbody td:nth-child(4) {
    width: 140px;
    min-width: 140px;
}

.ajustar-stock-table thead th:nth-child(5),
.ajustar-stock-table tbody td:nth-child(5) {
    width: 160px;
    min-width: 160px;
}

.input-ubicacion,
.input-stock {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-ubicacion:focus,
.input-stock:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.stock-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-input-wrapper > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-input-wrapper .input-stock {
    flex: 1;
    min-width: 0;
}

.stock-input-wrapper .unidad-medida {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.stock-disponible-info {
    margin-top: 4px;
    padding-left: 4px;
}

.stock-disponible-info small {
    font-size: 0.8rem;
    color: #6c757d;
}

.precio-costo-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 0.9rem;
}

.precio-costo-display .material-icons {
    font-size: 18px;
    color: #6c757d;
}

.form-actions-stock {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.form-actions-stock .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 500;
}

.form-actions-stock .btn .material-icons {
    font-size: 20px;
}

.btn-action-license {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action-license .material-icons {
    font-size: 20px;
}

.btn-action-license:hover {
    background: #e3f2fd;
    color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.licencias-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.licencias-empty-state .material-icons {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.licencias-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin: 0 0 10px 0;
}

.licencias-empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* Tabla procesar recepción (WMS) */
.tabla-recepcion-procesar th,
.tabla-recepcion-procesar td {
    white-space: nowrap;
}

.tabla-recepcion-procesar th:nth-child(1),
.tabla-recepcion-procesar td:nth-child(1) {
    min-width: 110px;
}

.tabla-recepcion-procesar th:nth-child(2),
.tabla-recepcion-procesar td:nth-child(2) {
    min-width: 90px;
}

.tabla-recepcion-procesar th:nth-child(3),
.tabla-recepcion-procesar td:nth-child(3),
.tabla-recepcion-procesar th:nth-child(4),
.tabla-recepcion-procesar td:nth-child(4) {
    min-width: 120px;
}

.tabla-recepcion-procesar th:nth-child(5),
.tabla-recepcion-procesar td:nth-child(5) {
    min-width: 140px;
}

.tabla-recepcion-procesar th:nth-child(8),
.tabla-recepcion-procesar td:nth-child(8),
.tabla-recepcion-procesar th:nth-child(9),
.tabla-recepcion-procesar td:nth-child(9) {
    min-width: 120px;
}

/* Estilos para formulario de asignar licencia */
.licencia-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.licencia-form-header {
    margin-bottom: 24px;
}

.licencia-empresa-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.licencia-empresa-info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #fff;
}

.licencia-empresa-info-logo,
.licencia-empresa-info-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.licencia-empresa-info-logo {
    object-fit: cover;
    background: #fff;
}

.licencia-empresa-info-logo-placeholder {
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.licencia-empresa-info-logo-placeholder .material-icons {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
}

.licencia-empresa-info-text h2 {
    margin: 0 0 4px 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.licencia-empresa-info-text p {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.licencia-form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.licencia-form-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.licencia-form-card-header .material-icons {
    font-size: 24px;
    color: #667eea;
}

.licencia-form-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

.licencia-form {
    padding: 24px;
}

.licencia-current-info {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.licencia-current-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.licencia-current-info-header .material-icons {
    font-size: 20px;
    color: #667eea;
}

.licencia-current-info-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}

.licencia-current-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.licencia-current-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 80px;
}

.licencia-current-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.licencia-dias-text {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Estilos para información de lógica de licencias */
.licencia-logic-info {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    border: 1px solid #bbdefb;
}

.licencia-logic-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.licencia-logic-info-header .material-icons {
    font-size: 24px;
    color: #1976d2;
}

.licencia-logic-info-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1976d2;
}

.licencia-logic-info-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.licencia-logic-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.licencia-logic-item:last-child {
    border-left-color: #4caf50;
}

.licencia-logic-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.licencia-logic-icon.premium {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.licencia-logic-icon .material-icons {
    color: #fff;
    font-size: 24px;
}

.licencia-logic-content {
    flex: 1;
}

.licencia-logic-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.licencia-logic-description {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
}

.licencia-logic-description strong {
    color: #1976d2;
    font-weight: 600;
}

.licencia-logic-item:last-child .licencia-logic-description strong {
    color: #4caf50;
}

/* Estilos para información del plan seleccionado */
.licencia-plan-info {
    margin-top: 24px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffc107;
}

.licencia-plan-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.licencia-plan-info-header .material-icons {
    font-size: 24px;
    color: #f57c00;
}

.licencia-plan-info-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f57c00;
}

.licencia-plan-info-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.licencia-plan-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #ffe082;
}

.licencia-plan-field:last-child {
    border-bottom: none;
}

.licencia-plan-label {
    font-weight: 600;
    color: #f57c00;
    min-width: 140px;
}

.licencia-plan-value {
    flex: 1;
    color: #212529;
}

.licencia-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

/* Responsive para gestión de licencias */
@media (max-width: 992px) {
    .licencias-table-wrapper {
        overflow-x: auto;
    }
    
    .licencias-table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .licencias-list-container {
        padding: 16px;
    }
    
    .licencias-list-title {
        font-size: 1.5rem;
    }
    
    .licencias-list-subtitle {
        font-size: 1rem;
    }
    
    .licencias-table thead th {
        padding: 12px 15px;
        font-size: 10px;
    }
    
    .licencias-table tbody td {
        padding: 12px 15px;
    }
    
    .licencia-empresa-logo,
    .licencia-empresa-logo-placeholder {
        width: 35px;
        height: 35px;
    }
    
    .licencia-empresa-name-primary {
        font-size: 0.9rem;
    }
    
    .licencia-empresa-name-secondary {
        font-size: 0.8rem;
    }
    
    .licencia-form-container {
        padding: 16px;
    }
    
    .licencia-empresa-info-card {
        padding: 20px;
    }
    
    .licencia-empresa-info-logo,
    .licencia-empresa-info-logo-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .licencia-empresa-info-text h2 {
        font-size: 1.5rem;
    }
    
    .licencia-empresa-info-text p {
        font-size: 1rem;
    }
    
    .licencia-form {
        padding: 20px;
    }
    
    .licencia-form-actions {
        flex-direction: column-reverse;
    }
    
    .licencia-form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .licencia-logic-info-body {
        gap: 12px;
    }
    
    .licencia-logic-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .licencia-logic-icon {
        width: 40px;
        height: 40px;
    }
    
    .licencia-logic-icon .material-icons {
        font-size: 20px;
    }
    
    .licencia-plan-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .licencia-plan-label {
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .licencias-list-container {
        padding: 12px;
    }
    
    .licencias-list-title {
        font-size: 1.25rem;
    }
    
    .licencias-list-subtitle {
        font-size: 0.9rem;
    }
    
    .licencias-table thead th {
        padding: 10px 12px;
        font-size: 9px;
    }
    
    .licencias-table tbody td {
        padding: 10px 12px;
    }
    
    .licencia-empresa-cell {
        gap: 8px;
    }
    
    .licencia-empresa-logo,
    .licencia-empresa-logo-placeholder {
        width: 32px;
        height: 32px;
    }
    
    .licencia-empresa-logo-placeholder .material-icons {
        font-size: 20px;
    }
    
    .licencia-empresa-name-primary {
        font-size: 0.85rem;
    }
    
    .licencia-empresa-name-secondary {
        font-size: 0.75rem;
    }
    
    .licencia-date-cell {
        font-size: 0.85rem;
    }
    
    .licencia-date-cell .material-icons {
        font-size: 16px;
    }
    
    .licencia-form-container {
        padding: 12px;
    }
    
    .licencia-empresa-info-card {
        padding: 16px;
    }
    
    .licencia-empresa-info-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .licencia-empresa-info-logo,
    .licencia-empresa-info-logo-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .licencia-empresa-info-text h2 {
        font-size: 1.25rem;
    }
    
    .licencia-empresa-info-text p {
        font-size: 0.9rem;
    }
    
    .licencia-form-card-header {
        padding: 16px 20px;
    }
    
    .licencia-form-card-header h3 {
        font-size: 1.1rem;
    }
    
    .licencia-form {
        padding: 16px;
    }
}

/* ============================================
   Estilos para Panel de Administrador de Empresa
   ============================================ */

.admin-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.admin-dashboard-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.admin-empresa-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 300px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: #fff;
}

.admin-empresa-logo,
.admin-empresa-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.admin-empresa-logo {
    object-fit: cover;
    background: #fff;
}

.admin-empresa-logo-placeholder {
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-empresa-logo-placeholder .material-icons {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
}

.admin-empresa-details {
    flex: 1;
}

.admin-empresa-name {
    margin: 0 0 4px 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-empresa-comercial {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.admin-licencia-info {
    min-width: 280px;
}

.admin-licencia-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid;
}

.admin-licencia-card.active {
    border-color: #28a745;
}

.admin-licencia-card.inactive {
    border-color: #dc3545;
}

.admin-licencia-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-licencia-card.active .admin-licencia-icon {
    background: #d4edda;
}

.admin-licencia-card.inactive .admin-licencia-icon {
    background: #f8d7da;
}

.admin-licencia-icon .material-icons {
    font-size: 32px;
}

.admin-licencia-card.active .admin-licencia-icon .material-icons {
    color: #28a745;
}

.admin-licencia-card.inactive .admin-licencia-icon .material-icons {
    color: #dc3545;
}

.admin-licencia-details {
    flex: 1;
}

.admin-licencia-status {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-licencia-card.active .admin-licencia-status {
    color: #28a745;
}

.admin-licencia-card.inactive .admin-licencia-status {
    color: #dc3545;
}

.admin-licencia-days {
    margin-bottom: 4px;
}

.admin-licencia-warning {
    color: #ff9800;
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-licencia-ok {
    color: #28a745;
    font-weight: 500;
    font-size: 0.95rem;
}

.admin-licencia-dates {
    font-size: 0.9rem;
    color: #6c757d;
}

.admin-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.admin-dashboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.admin-dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.admin-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-card-icon .material-icons {
    font-size: 32px;
    color: #fff;
}

.admin-card-content {
    flex: 1;
}

.admin-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.admin-card-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
}

.admin-card-subvalue {
    font-size: 0.85rem;
    color: #28a745;
    font-weight: 600;
    margin-top: 4px;
}

.admin-welcome-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    border: 1px solid #dee2e6;
}

.admin-welcome-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.admin-welcome-icon .material-icons {
    font-size: 48px;
    color: #fff;
}

.admin-welcome-content {
    flex: 1;
}

.admin-welcome-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 12px 0;
}

.admin-welcome-content p {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

/* Responsive para panel de admin */
@media (max-width: 992px) {
    .admin-dashboard-header {
        flex-direction: column;
    }
    
    .admin-licencia-info {
        width: 100%;
    }
    
    .admin-dashboard-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .admin-dashboard-container {
        padding: 16px;
    }
    
    .admin-empresa-info {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .admin-empresa-name {
        font-size: 1.5rem;
    }
    
    .admin-empresa-comercial {
        font-size: 1rem;
    }
    
    .admin-licencia-card {
        padding: 16px;
    }
    
    .admin-licencia-icon {
        width: 48px;
        height: 48px;
    }
    
    .admin-licencia-icon .material-icons {
        font-size: 28px;
    }
    
    .admin-dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .admin-welcome-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .admin-welcome-content h2 {
        font-size: 1.5rem;
    }
    
    .admin-welcome-content p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .admin-dashboard-container {
        padding: 12px;
    }
    
    .admin-empresa-info {
        padding: 16px;
    }
    
    .admin-empresa-logo,
    .admin-empresa-logo-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .admin-empresa-logo-placeholder .material-icons {
        font-size: 40px;
    }
    
    .admin-empresa-name {
        font-size: 1.25rem;
    }
    
    .admin-empresa-comercial {
        font-size: 0.9rem;
    }
    
    .admin-licencia-card {
        padding: 14px;
        gap: 12px;
    }
    
    .admin-licencia-icon {
        width: 40px;
        height: 40px;
    }
    
    .admin-licencia-icon .material-icons {
        font-size: 24px;
    }
    
    .admin-licencia-status {
        font-size: 1rem;
    }
    
    .admin-dashboard-card {
        padding: 20px;
        gap: 16px;
    }
    
    .admin-card-icon {
        width: 56px;
        height: 56px;
    }
    
    .admin-card-icon .material-icons {
        font-size: 28px;
    }
    
    .admin-card-value {
        font-size: 1.75rem;
    }
    
    .admin-welcome-card {
        padding: 20px;
    }
    
    .admin-welcome-icon {
        width: 64px;
        height: 64px;
    }
    
    .admin-welcome-icon .material-icons {
        font-size: 40px;
    }
    
    .admin-welcome-content h2 {
        font-size: 1.25rem;
    }
    
    .admin-welcome-content p {
        font-size: 0.95rem;
    }
}

/* Estilos para carga masiva de clientes */
.table-warning {
    background-color: #fff3cd !important;
}

.table-success {
    background-color: #d1e7dd !important;
}

.table-warning td,
.table-success td {
    border-color: rgba(0,0,0,0.1) !important;
}

/* Estilos para campos editables en preview */
.fila-preview .campo-editable {
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    width: 100%;
    box-sizing: border-box;
}

.fila-preview .campo-editable:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.fila-preview .form-select {
    font-size: 0.95rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.fila-preview .form-select-sm {
    font-size: 0.95rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.fila-preview .guardar-fila {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-width: 50px;
}

.fila-preview .guardar-fila:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.errores-fila {
    font-size: 0.9rem;
    min-width: 250px;
    max-width: 400px;
    word-wrap: break-word;
}

.errores-fila ul {
    margin: 0;
    padding-left: 20px;
}

/* Ajustar tamaño de celdas en tabla de preview */
.fila-preview td {
    padding: 0.75rem 0.5rem !important;
    vertical-align: middle;
}

.fila-preview th {
    padding: 1rem 0.5rem !important;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Asegurar que los campos tengan espacio suficiente */
.fila-preview .licencias-table {
    table-layout: auto;
    width: 100%;
}

.fila-preview .licencias-table td {
    min-width: 120px;
    white-space: nowrap;
    overflow: visible;
    word-wrap: break-word;
}

/* Anchos específicos para cada columna */
.fila-preview .licencias-table th:nth-child(1),
.fila-preview .licencias-table td:nth-child(1) {
    min-width: 60px;
    width: 60px;
    text-align: center;
}

.fila-preview .licencias-table th:nth-child(2),
.fila-preview .licencias-table td:nth-child(2) {
    min-width: 140px;
    width: 140px;
}

.fila-preview .licencias-table th:nth-child(3),
.fila-preview .licencias-table td:nth-child(3) {
    min-width: 160px;
    width: 160px;
}

.fila-preview .licencias-table th:nth-child(4),
.fila-preview .licencias-table td:nth-child(4) {
    min-width: 200px;
    width: 200px;
}

.fila-preview .licencias-table th:nth-child(5),
.fila-preview .licencias-table td:nth-child(5) {
    min-width: 200px;
    width: 200px;
}

.fila-preview .licencias-table th:nth-child(6),
.fila-preview .licencias-table td:nth-child(6) {
    min-width: 150px;
    width: 150px;
}

.fila-preview .licencias-table th:nth-child(7),
.fila-preview .licencias-table td:nth-child(7) {
    min-width: 180px;
    width: 180px;
}

.fila-preview .licencias-table th:nth-child(8),
.fila-preview .licencias-table td:nth-child(8) {
    min-width: 140px;
    width: 140px;
}

.fila-preview .licencias-table th:nth-child(9),
.fila-preview .licencias-table td:nth-child(9) {
    min-width: 250px;
    width: 250px;
}

.fila-preview .licencias-table th:nth-child(10),
.fila-preview .licencias-table td:nth-child(10) {
    min-width: 140px;
    width: 140px;
}

.fila-preview .licencias-table th:nth-child(11),
.fila-preview .licencias-table td:nth-child(11) {
    min-width: 130px;
    width: 130px;
}

.fila-preview .licencias-table th:nth-child(12),
.fila-preview .licencias-table td:nth-child(12) {
    min-width: 130px;
    width: 130px;
}

.fila-preview .licencias-table th:nth-child(13),
.fila-preview .licencias-table td:nth-child(13) {
    min-width: 120px;
    width: 120px;
}

.fila-preview .licencias-table th:nth-child(14),
.fila-preview .licencias-table td:nth-child(14) {
    min-width: 300px;
    width: 300px;
}

.fila-preview .licencias-table th:nth-child(15),
.fila-preview .licencias-table td:nth-child(15) {
    min-width: 100px;
    width: 100px;
    text-align: center;
}

/* Responsive para tabla de preview */
@media (max-width: 1200px) {
    .fila-preview .campo-editable {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
        min-width: 100px;
    }
    
    .fila-preview .form-select,
    .fila-preview .form-select-sm {
        font-size: 0.85rem;
        padding: 0.4rem 1.75rem 0.4rem 0.6rem;
        min-width: 130px;
    }
}

/* ============================================================================
   Estilos para módulos de empresa (ver y editar)
   ============================================================================ */

.modulos-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modulo-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    align-items: center;
}

.modulo-item:hover {
    background: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modulo-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modulo-item-icon .material-icons {
    color: #fff;
    font-size: 24px;
}

.modulo-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modulo-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.modulo-item-code {
    font-size: 0.9rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

.modulo-item-description {
    font-size: 0.95rem;
    color: #495057;
    margin-top: 4px;
}

.modulo-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.modulo-item-actions {
    flex-shrink: 0;
}

.modulo-eliminar-form {
    display: inline;
}

.modulo-total-badge {
    font-size: 1.1rem;
}

/* Responsive para módulos */
@media (max-width: 768px) {
    .modulo-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modulo-item-icon {
        width: 40px;
        height: 40px;
    }
    
    .modulo-item-icon .material-icons {
        font-size: 20px;
    }
    
    .modulo-item-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modulo-item-actions {
        width: 100%;
    }
    
    .modulo-item-actions .btn {
        width: 100%;
    }
}

/* Estilos para secciones de módulos en listar_modulos */
.modulos-section-wrapper {
    margin-bottom: 30px;
}

.modulos-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modulos-section-icon {
    vertical-align: middle;
    font-size: 1.5rem;
}

/* Estilos para columnas de tablas de módulos */
.licencias-table .modulo-col-codigo {
    width: 12%;
    min-width: 100px;
}

.licencias-table .modulo-col-nombre {
    width: 20%;
    min-width: 150px;
}

.licencias-table .modulo-col-app {
    width: 15%;
    min-width: 120px;
}

.licencias-table .modulo-col-version {
    width: 8%;
    min-width: 80px;
}

.licencias-table .modulo-col-empresa {
    width: 18%;
    min-width: 150px;
}

.licencias-table .modulo-col-esencial {
    width: 10%;
    min-width: 90px;
}

.licencias-table .modulo-col-estado {
    width: 10%;
    min-width: 90px;
}

.licencias-table .modulo-col-fecha {
    width: 12%;
    min-width: 110px;
}

.licencias-table .modulo-col-acciones {
    width: 8%;
    min-width: 80px;
    white-space: nowrap;
}

/* Asegurar que las celdas no se desborden */
.licencias-table td.modulo-col-codigo,
.licencias-table td.modulo-col-nombre,
.licencias-table td.modulo-col-app,
.licencias-table td.modulo-col-version,
.licencias-table td.modulo-col-empresa,
.licencias-table td.modulo-col-esencial,
.licencias-table td.modulo-col-estado,
.licencias-table td.modulo-col-fecha,
.licencias-table td.modulo-col-acciones {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

/* Responsive para tablas de módulos */
@media (max-width: 1200px) {
    .licencias-table .modulo-col-codigo {
        width: 10%;
        min-width: 90px;
    }
    
    .licencias-table .modulo-col-nombre {
        width: 18%;
        min-width: 140px;
    }
    
    .licencias-table .modulo-col-app {
        width: 14%;
        min-width: 110px;
    }
    
    .licencias-table .modulo-col-empresa {
        width: 16%;
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .licencias-table-wrapper {
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    .licencias-table {
        min-width: 1410px;
        display: table;
    }
    
    .licencias-table thead th,
    .licencias-table tbody td {
        padding: 12px 15px;
    }
    
    .licencias-table thead th {
        font-size: 10px;
    }
    
    .licencias-table .modulo-col-codigo,
    .licencias-table .modulo-col-nombre,
    .licencias-table .modulo-col-app,
    .licencias-table .modulo-col-version,
    .licencias-table .modulo-col-empresa,
    .licencias-table .modulo-col-esencial,
    .licencias-table .modulo-col-estado,
    .licencias-table .modulo-col-fecha,
    .licencias-table .modulo-col-acciones {
        min-width: auto;
    }
    
    .stock-value,
    .precio-value {
        font-size: 0.85rem;
    }
    
    .licencia-empresa-name-primary {
        font-size: 0.9rem;
    }
    
    .ajustar-stock-table {
        min-width: 900px;
    }
    
    .ajustar-stock-table thead th,
    .ajustar-stock-table tbody td {
        padding: 12px 15px;
    }
    
    .input-ubicacion,
    .input-stock {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .form-actions-stock {
        flex-direction: column;
    }
    
    .form-actions-stock .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Estilos para planes de licencia */
.plan-nombre-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-nombre-cell strong {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.plan-nombre-cell small {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.plan-precio {
    font-weight: 600;
    color: #28a745;
    font-size: 1rem;
}

.plan-limit {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.plan-limit-unlimited {
    font-weight: 600;
    color: #667eea;
    font-size: 0.95rem;
    font-style: italic;
}

.plan-orden {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive para planes de licencia */
@media (max-width: 992px) {
    .plan-nombre-cell small {
        display: none;
    }
}

@media (max-width: 768px) {
    .licencias-table th,
    .licencias-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .plan-precio,
    .plan-limit,
    .plan-limit-unlimited {
        font-size: 0.85rem;
    }
}

/* Estilos para gráfico de tasas de cambio */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

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

@media (max-width: 576px) {
    .chart-container {
        height: 250px;
    }
}

/* Estilos para tabla de facturación */
.facturacion-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

/* Contenedor específico para tabla de ítems de Facturación - Punto de Venta.
   Los estilos de .facturacion-items-table solo aplican dentro de este wrapper,
   evitando afectar otras tablas ERP del sistema. */
.facturacion-pos-items-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table thead th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px 8px;
    font-weight: 600;
    font-size: 11px;
    border-bottom: 2px solid #dee2e6;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table tbody td {
    padding: 10px 8px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 11pt;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table tbody td input {
    width: 100%;
    min-width: 0;
    font-size: 11pt;
}

/* Celda Precio: asegurar min-width en input editable para editar_borrador */
.facturacion-pos-items-table-wrapper .facturacion-items-table .facturacion-cell-precio input {
    min-width: 100px;
}

/* Celda Precio: span de visualización en facturar debe mostrar montos completos */
.facturacion-pos-items-table-wrapper .facturacion-items-table .facturacion-cell-precio .item-precio-display {
    white-space: nowrap;
    display: inline-block;
    min-width: 4em;
}

.facturacion-pos-items-table-wrapper .facturacion-col-codigo {
    width: 8%;
    min-width: 90px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-nombre {
    width: 18%;
    min-width: 140px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-descripcion {
    width: 15%;
    min-width: 120px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-cantidad {
    width: 8%;
    min-width: 75px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-precio {
    width: 14%;
    min-width: 125px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-descuento {
    width: 10%;
    min-width: 80px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-iva {
    width: 10%;
    min-width: 80px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-total {
    width: 12%;
    min-width: 105px;
}

.facturacion-pos-items-table-wrapper .facturacion-col-acciones {
    width: 6%;
    min-width: 50px;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table .licencia-empresa-cell {
    max-width: 100%;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table .licencia-empresa-name-primary {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table .licencia-empresa-name-secondary {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 10pt;
    margin-top: 4px;
}

.facturacion-pos-items-table-wrapper .facturacion-items-table .facturacion-cell-descripcion {
    font-size: 10pt;
    color: #6c757d;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive para tabla de facturación POS */
@media (max-width: 1200px) {
    .facturacion-pos-items-table-wrapper .facturacion-items-table {
        min-width: 780px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-codigo {
        width: 8%;
        min-width: 80px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-nombre {
        width: 16%;
        min-width: 120px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-descripcion {
        width: 14%;
        min-width: 100px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-cantidad {
        width: 9%;
        min-width: 65px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-precio {
        width: 12%;
        min-width: 100px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-descuento,
    .facturacion-pos-items-table-wrapper .facturacion-col-iva {
        width: 9%;
        min-width: 70px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-total {
        width: 11%;
        min-width: 85px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-acciones {
        width: 10%;
        min-width: 50px;
    }
}

@media (max-width: 768px) {
    .facturacion-pos-items-table-wrapper .facturacion-items-table {
        min-width: 680px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table thead th {
        padding: 10px 6px;
        font-size: 10.5pt;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table tbody td {
        padding: 8px 6px;
        font-size: 10.5pt;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table tbody td input {
        font-size: 10.5pt;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table .facturacion-cell-precio input {
        min-width: 90px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-codigo {
        width: 8%;
        min-width: 70px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-nombre {
        width: 15%;
        min-width: 100px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-descripcion {
        width: 13%;
        min-width: 85px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-cantidad {
        width: 10%;
        min-width: 55px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-precio {
        width: 12%;
        min-width: 90px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-descuento,
    .facturacion-pos-items-table-wrapper .facturacion-col-iva {
        width: 10%;
        min-width: 65px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-total {
        width: 12%;
        min-width: 75px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-acciones {
        width: 10%;
        min-width: 50px;
    }
}

@media (max-width: 576px) {
    .facturacion-pos-items-table-wrapper .facturacion-items-table {
        min-width: 580px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table thead th {
        padding: 8px 4px;
        font-size: 10pt;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table tbody td {
        padding: 6px 4px;
        font-size: 10pt;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table tbody td input {
        font-size: 10pt;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table .facturacion-cell-precio input {
        min-width: 80px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-codigo {
        width: 8%;
        min-width: 60px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-nombre {
        width: 14%;
        min-width: 85px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-descripcion {
        width: 12%;
        min-width: 70px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-cantidad {
        width: 11%;
        min-width: 48px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-precio {
        width: 13%;
        min-width: 80px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-descuento,
    .facturacion-pos-items-table-wrapper .facturacion-col-iva {
        width: 10%;
        min-width: 58px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-total {
        width: 12%;
        min-width: 65px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-col-acciones {
        width: 10%;
        min-width: 45px;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table .licencia-empresa-name-primary {
        font-size: 10pt;
    }
    
    .facturacion-pos-items-table-wrapper .facturacion-items-table .licencia-empresa-name-secondary {
        font-size: 9pt;
    }
}

.facturacion-icon-delete {
    font-size: 18px;
}

/* Estilos para contenedor de facturación */
.facturacion-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.facturacion-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 16px 18px;
}

.facturacion-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.facturacion-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.facturacion-panel-title .material-icons {
    font-size: 20px;
    color: #0d6efd;
}

.facturacion-busqueda-input {
    max-width: 360px;
}

.facturacion-totales {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.facturacion-totales-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.facturacion-totales-row strong {
    font-size: 1.05rem;
}

.facturacion-totales-row.monto-total {
    font-size: 1.2rem;
}

/* Estilos para totales en diferentes monedas */
.facturacion-totales-monedas {
    margin-top: 1rem;
}

.facturacion-totales-monedas .card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.facturacion-totales-monedas .card-body {
    padding: 1.25rem 1.5rem;
}

.facturacion-totales-monedas .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.facturacion-totales-monedas .card-title .material-icons {
    font-size: 1.2rem;
    color: #0d6efd;
}

.facturacion-totales-monedas-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.facturacion-totales-monedas-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.facturacion-totales-monedas-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
}

/* Ficha Tasas del día (facturación) */
.facturacion-tasas-dia .card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f7f8f9;
}

.facturacion-tasas-dia .card-body {
    padding: 1rem 1.25rem;
}

.facturacion-tasas-dia .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
}

.facturacion-tasas-dia .card-title .material-icons {
    font-size: 0.95rem;
    color: #0d6efd;
}

.facturacion-tasas-dia-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f1f3f4;
    border-radius: 6px;
}

.facturacion-tasas-dia-label {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
}

.facturacion-tasas-dia-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #212529;
}

/* Panel Tasas del Día (pestaña en facturación) */
.facturacion-tasas-dia-panel {
    margin-top: 0.5rem;
}

.facturacion-tasas-dia-panel-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
}

.facturacion-tasas-dia-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.facturacion-tasas-dia-panel-header .material-icons {
    font-size: 1.5rem;
}

.facturacion-tasas-dia-panel-body {
    padding: 1.25rem 1.5rem;
}

.facturacion-tasas-dia-panel-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.facturacion-tasas-dia-panel-item:last-child {
    margin-bottom: 0;
}

.facturacion-tasas-dia-panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.facturacion-tasas-dia-panel-icon .material-icons {
    font-size: 1.75rem;
    color: #fff;
}

.facturacion-tasas-item-ves .facturacion-tasas-dia-panel-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.4);
}

.facturacion-tasas-item-cop .facturacion-tasas-dia-panel-icon {
    background: linear-gradient(135deg, #0d6efd 0%, #6f42c1 100%);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.4);
}

.facturacion-tasas-item-copves .facturacion-tasas-dia-panel-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
}

.facturacion-tasas-dia-panel-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.facturacion-tasas-dia-panel-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.facturacion-tasas-dia-panel-value {
    font-size: 18pt;
    font-weight: 700;
    color: #212529;
}

/* Ficha de tasas de cambio - Cierre de Caja */
.cierre-tasas-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
}

.cierre-tasas-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: none;
}

.cierre-tasas-card .card-header .material-icons {
    font-size: 1.25rem;
    vertical-align: middle;
    margin-right: 6px;
}

.cierre-tasas-card .card-body {
    padding: 1rem 1.25rem;
}

.cierre-tasas-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cierre-tasas-item:last-child {
    border-bottom: none;
}

.cierre-tasas-item-label {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.cierre-tasas-item-value {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

.cierre-tasas-card .cierre-tasas-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Clase para ocultar totales con descuento por divisas */
.facturacion-totales-descuento-oculto {
    display: none !important;
}

/* Ficha subtotal restante por cobrar (pagos múltiples) */
.ficha-restante-icon {
    font-size: 1rem;
}

.ficha-restante-icon-sm {
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Responsive para totales en monedas */
@media (max-width: 768px) {
    .facturacion-totales-monedas-item {
        margin-bottom: 0.5rem;
    }
    
    .facturacion-totales-monedas-value {
        font-size: 1rem;
    }
}

.facturacion-metodos-pago .form-check {
    margin-bottom: 6px;
}

/* Contenedor para los tres campos de cliente */
.facturacion-campos-cliente-container {
    width: 100%;
}

/* Wrapper para input y sugerencias */
.facturacion-input-wrapper {
    position: relative;
    width: 100%;
}

/* Contenedor de sugerencias - posición absoluta para no afectar layout */
.facturacion-sugerencias-container {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.facturacion-sugerencias-container:not(:empty) {
    display: block;
}

.facturacion-sugerencias-list {
    margin: 0;
    padding: 0;
}

.facturacion-sugerencias-list .list-group-item {
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #f1f3f5;
}

.facturacion-sugerencias-list .list-group-item:last-child {
    border-bottom: none;
}

.facturacion-sugerencias-list .list-group-item:hover {
    background-color: #f1f3f5;
}

/* Asegurar que los campos mantengan su tamaño fijo y no se distorsionen */
.facturacion-cliente-col {
    display: flex;
    flex-direction: column;
}

.facturacion-cliente-col > label {
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.facturacion-cliente-col .form-control,
.facturacion-cliente-col .input-group {
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.facturacion-input-wrapper {
    width: 100%;
    flex-shrink: 0;
}

.facturacion-input-wrapper .input-group {
    width: 100%;
}

#clienteNombreDisplay {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
}

/* Campo de fecha con ancho reducido */
.facturacion-fecha-col {
    max-width: 100%;
}

#fechaEmisionDisplay {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    max-width: 180px;
}

.facturacion-cliente-col > .form-text {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Asegurar que el input-group tenga el botón integrado correctamente */
.facturacion-cliente-col .input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.facturacion-cliente-col .input-group .btn {
    flex-shrink: 0;
}

/* Estilos para campo de búsqueda de productos */
.facturacion-panel .row.g-2 .col-12.col-lg-6 .input-group {
    width: 100%;
    box-sizing: border-box;
}

.facturacion-panel .row.g-2 .col-12.col-lg-6 .input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.facturacion-panel .row.g-2 .col-12.col-lg-6 .input-group .btn {
    flex-shrink: 0;
}

/* Asegurar que la tabla esté correctamente posicionada */
.facturacion-panel .facturacion-table-wrapper,
.facturacion-panel .facturacion-pos-items-table-wrapper {
    margin-top: 0;
    clear: both;
}

/* Estilos para producto duplicado */
.facturacion-item-duplicado {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    animation: facturacion-resaltar 0.5s ease-in-out;
}

/* Fila con cantidad incrementada por producto repetido (rojo tenue) */
.facturacion-pos-items-table-wrapper .facturacion-items-table tbody tr.facturacion-item-cantidad-incrementada td {
    background-color: #ffebee !important;
}
.facturacion-pos-items-table-wrapper .facturacion-items-table tbody tr.facturacion-item-cantidad-incrementada {
    background-color: #ffebee !important;
}

@keyframes facturacion-resaltar {
    0% {
        background-color: #fff3cd;
    }
    50% {
        background-color: #ffc107;
    }
    100% {
        background-color: #fff3cd;
    }
}

/* Mensaje de producto duplicado */
.facturacion-mensaje-duplicado {
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    border-left: 4px solid #ffc107;
}

/* Estilos para componente de tasa USD del día */
.tasa-usd-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 16px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.tasa-usd-icon .material-icons {
    font-size: 28px;
    color: #fff;
}

.tasa-usd-info {
    flex: 1;
}

.tasa-usd-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 4px;
}

.tasa-usd-value {
    font-size: 1.25rem;
    color: #212529;
    font-weight: 600;
    margin-bottom: 4px;
}

.tasa-usd-value strong {
    color: #28a745;
    font-size: 1.5rem;
}

.tasa-usd-fecha {
    font-size: 0.85rem;
    color: #6c757d;
}

.tasa-usd-badge {
    margin-top: 8px;
}

.tasa-usd-badge .badge {
    padding: 8px 12px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tasa-usd-badge .material-icons {
    font-size: 18px;
}

/* Responsive para tasa USD */
@media (max-width: 768px) {
    .tasa-usd-icon {
        width: 48px;
        height: 48px;
        margin-right: 12px;
    }
    
    .tasa-usd-icon .material-icons {
        font-size: 24px;
    }
    
    .tasa-usd-value {
        font-size: 1.1rem;
    }
    
    .tasa-usd-value strong {
        font-size: 1.3rem;
    }
    
    .tasa-usd-badge {
        margin-top: 12px;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .tasa-usd-icon {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .tasa-usd-icon .material-icons {
        font-size: 20px;
    }
    
    .tasa-usd-label {
        font-size: 0.85rem;
    }
    
    .tasa-usd-value {
        font-size: 1rem;
    }
    
    .tasa-usd-value strong {
        font-size: 1.2rem;
    }
    
    .tasa-usd-fecha {
        font-size: 0.8rem;
    }
    
    .tasa-usd-badge .badge {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

/* Estilos para Preview Carga Masiva de Productos */
.preview-carga-wrapper {
    margin-top: 20px;
}

.preview-alert {
    margin-bottom: 20px;
}

.preview-alert-icon {
    vertical-align: middle;
}

.preview-table-responsive {
    overflow-x: auto;
    width: 100%;
}

.preview-table {
    min-width: 2200px;
}

.preview-errores-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9em;
}

.guardar-fila-icon {
    font-size: 18px;
}

.preview-pagination-wrapper {
    margin-top: 20px;
}

.preview-form-container {
    margin-top: 20px;
}

.preview-info-icon {
    font-size: 16px;
    vertical-align: middle;
}

.preview-form-actions {
    margin-top: 30px;
}

.preview-actions-text {
    font-size: 0.9em;
}

/* Estilos para Listar Borradores */
.borrador-action-icon {
    font-size: 18px;
}

/* Estilos para Previsualización de Factura */
.facturacion-preview-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
}

.facturacion-preview-header {
    margin-bottom: 30px;
}

.facturacion-preview-document {
    background: white;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.facturacion-preview-encabezado {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.facturacion-preview-empresa-nombre {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
}

.facturacion-preview-empresa-comercial {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.facturacion-preview-empresa-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.facturacion-preview-documento-titulo {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 15px;
}

.facturacion-preview-documento-info {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 5px;
}

.facturacion-preview-cliente {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.facturacion-preview-seccion-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.facturacion-preview-cliente-info {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 8px;
}

.facturacion-preview-detalle {
    margin-bottom: 30px;
}

.facturacion-preview-table {
    width: 100%;
    border-collapse: collapse;
}

.facturacion-preview-table thead {
    background: #f8f9fa;
}

.facturacion-preview-table th {
    padding: 12px 8px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9rem;
}

.facturacion-preview-table td {
    padding: 4px 8px;
    border-bottom: none;
    font-size: 0.9rem;
    line-height: 1.3;
}

.facturacion-preview-table tbody tr:hover {
    background: #f8f9fa;
}

.facturacion-preview-col-item {
    width: 4%;
}

.facturacion-preview-col-producto {
    width: 30%;
}

.facturacion-preview-col-cantidad {
    width: 9%;
}

.facturacion-preview-col-precio {
    width: 11%;
}

.facturacion-preview-col-descuento {
    width: 11%;
}

.facturacion-preview-col-iva {
    width: 7%;
}

.facturacion-preview-col-monto-iva {
    width: 10%;
}

.facturacion-preview-col-total {
    width: 18%;
}

.facturacion-preview-producto-nombre {
    font-weight: 500;
    color: #212529;
    margin-bottom: 4px;
}

.facturacion-preview-producto-codigo {
    font-size: 0.85rem;
    color: #6c757d;
}

.facturacion-preview-totales {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.facturacion-preview-observaciones {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.facturacion-preview-observaciones-texto {
    font-size: 0.9rem;
    color: #495057;
    margin: 0;
    white-space: pre-wrap;
}

.facturacion-preview-totales-box {
    background: #f8f9fa;
    padding: 24px 32px;
    border-radius: 8px;
    margin-left: auto;
    max-width: 540px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.facturacion-preview-totales-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.95rem;
    color: #495057;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.facturacion-preview-totales-total {
    border-top: 2px solid #dee2e6;
    margin-top: 6px;
    padding-top: 6px;
    font-size: 1.1rem;
    color: #212529;
}

.facturacion-preview-totales-divider {
    border-top: 1px solid #dee2e6;
    margin: 4px 0;
}

.facturacion-preview-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.facturacion-preview-footer-nota {
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ffc107;
}

/* Estilos para impresión */
@media print {
    .facturacion-preview-container {
        padding: 0;
        background: white;
    }
    
    .facturacion-preview-header {
        display: none;
    }
    
    .facturacion-preview-document {
        box-shadow: none;
        padding: 20px;
    }
    
    .facturacion-preview-table tbody tr {
        page-break-inside: avoid;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .facturacion-preview-document {
        padding: 20px;
    }
    
    .facturacion-preview-encabezado .row {
        flex-direction: column;
    }
    
    .facturacion-preview-encabezado .col-md-6.text-end {
        text-align: left !important;
        margin-top: 20px;
    }
    
    .facturacion-preview-table {
        font-size: 0.85rem;
    }
    
    .facturacion-preview-table th,
    .facturacion-preview-table td {
        padding: 8px 4px;
    }
    
    .facturacion-preview-totales-box {
        max-width: 100%;
        margin-left: 0;
    }
}

/* Estilo para texto informativo de descuentos */
.descuento-info-text {
    font-size: 0.75rem;
    margin-top: 4px;
    color: #6c757d;
    line-height: 1.2;
}

/* Estilo para header de lista completa de productos */
.facturacion-sugerencia-header-list {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cerrar-lista-btn {
    float: right;
}

.cerrar-lista-icon {
    font-size: 18px;
}

/* ========== FACTURACIÓN - TABS Y FORMULARIO NUEVO CLIENTE ========== */

.facturacion-tabs {
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.facturacion-tab-content {
    padding-top: 1rem;
}

.facturacion-form-nuevo-cliente .row.g-3 {
    margin-bottom: 0;
}

.facturacion-form-nuevo-cliente .form-control,
.facturacion-form-nuevo-cliente .form-select {
    width: 100%;
}

.facturacion-tab-nuevo-cliente-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

@media (max-width: 576px) {
    .facturacion-tabs .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .facturacion-tabs .nav-tabs .nav-link {
        white-space: nowrap;
    }

    .facturacion-form-nuevo-cliente .form-control,
    .facturacion-form-nuevo-cliente .form-select {
        padding: 0.5rem 0.75rem;
        min-height: 44px;
    }
}

/* Estilos para tabla de detalle de factura - columnas compactas */
/* Desactivar scroll horizontal para esta tabla específica */
.detalle-factura-wrapper {
    overflow-x: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Asegurar que el contenedor padre no cause desbordamiento */
.licencias-list-container .detalle-factura-wrapper {
    width: calc(100% - 0px) !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Forzar layout fijo para que los anchos porcentuales funcionen */
.detalle-factura-table {
    table-layout: fixed !important;
    width: 100% !important;
    font-size: 0.8rem !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

/* Sobrescribir min-width de licencias-table para esta tabla específica */
.detalle-factura-wrapper .detalle-factura-table,
.licencias-table-wrapper.detalle-factura-wrapper .detalle-factura-table,
.detalle-factura-wrapper .licencias-table.detalle-factura-table {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Reducir padding en celdas para hacer más compacta */
.detalle-factura-table thead th,
.detalle-factura-table tbody td {
    padding: 5px 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.75rem !important;
}

/* Permitir wrap solo en columna de producto */
.detalle-factura-table thead th:nth-child(1),
.detalle-factura-table tbody td:nth-child(1) {
    white-space: normal !important;
    word-wrap: break-word !important;
    font-size: 0.75rem !important;
}

/* Estilos para precios con descuento - más compactos */
.detalle-factura-table .text-decoration-line-through {
    font-size: 0.65rem !important;
    line-height: 1.1 !important;
}

.detalle-factura-table .text-success {
    font-size: 0.75rem !important;
    line-height: 1.1 !important;
}

/* Estilos para descuentos - más compactos */
.detalle-factura-table tbody td .small {
    font-size: 0.65rem !important;
    line-height: 1.2 !important;
}

/* Sobrescribir estilos nth-child para esta tabla específica */
.detalle-factura-table thead th:nth-child(1),
.detalle-factura-table tbody td:nth-child(1) {
    width: 33.5% !important;
    min-width: auto !important;
    max-width: none !important;
    padding-left: 12px !important;
}

.detalle-factura-table thead th:nth-child(2),
.detalle-factura-table tbody td:nth-child(2) {
    width: 7.5% !important;
    min-width: auto !important;
    max-width: none !important;
}

.detalle-factura-table thead th:nth-child(3),
.detalle-factura-table tbody td:nth-child(3) {
    width: 13.5% !important;
    min-width: auto !important;
    max-width: none !important;
}

.detalle-factura-table thead th:nth-child(4),
.detalle-factura-table tbody td:nth-child(4) {
    width: 13.5% !important;
    min-width: auto !important;
    max-width: none !important;
}

.detalle-factura-table thead th:nth-child(5),
.detalle-factura-table tbody td:nth-child(5) {
    width: 16.4% !important;
    min-width: auto !important;
    max-width: none !important;
}

.detalle-factura-table thead th:nth-child(6),
.detalle-factura-table tbody td:nth-child(6) {
    width: 15.6% !important;
    min-width: auto !important;
    max-width: none !important;
    padding-right: 12px !important;
}

/* Clases específicas como respaldo */
.detalle-factura-table .detalle-factura-col-producto {
    width: 33.5% !important;
}

.detalle-factura-table .detalle-factura-col-cantidad {
    width: 7.5% !important;
}

.detalle-factura-table .detalle-factura-col-precio {
    width: 13.5% !important;
}

.detalle-factura-table .detalle-factura-col-descuentos {
    width: 13.5% !important;
}

.detalle-factura-table .detalle-factura-col-iva {
    width: 16.4% !important;
}

.detalle-factura-table .detalle-factura-col-total {
    width: 15.6% !important;
}

/* Responsive: en pantallas pequeñas, hacer tabla scrollable verticalmente */
@media (max-width: 768px) {
    .detalle-factura-wrapper {
        overflow-x: auto !important;
    }
    
    .detalle-factura-table {
        min-width: 600px;
    }
}

/* Tabla Listar Paneles - columna dashboard URL */
.panel-dashboard-url {
    font-size: 0.85rem;
}

/* Tabla Configurar Permisos (PermisosRolEmpresaView) - sin scroll horizontal */
.permisos-rol-table-wrapper {
    overflow-x: visible;
}

.licencias-table.permisos-rol-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.permisos-rol-table .permisos-col-recurso,
.permisos-rol-table th.permisos-col-recurso,
.permisos-rol-table td:nth-child(1) {
    width: 22%;
    min-width: 0;
    max-width: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.permisos-rol-table .permisos-col-descripcion,
.permisos-rol-table th.permisos-col-descripcion,
.permisos-rol-table td:nth-child(2) {
    width: 42%;
    min-width: 0;
    max-width: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.permisos-rol-table .permisos-col-check,
.permisos-rol-table th.permisos-col-check,
.permisos-rol-table td:nth-child(3),
.permisos-rol-table td:nth-child(4) {
    width: 18%;
    min-width: 0;
    max-width: none;
}

@media (max-width: 768px) {
    .permisos-rol-table .permisos-col-recurso,
    .permisos-rol-table td:nth-child(1) {
        width: 28%;
    }

    .permisos-rol-table .permisos-col-descripcion,
    .permisos-rol-table td:nth-child(2) {
        width: 32%;
    }

    .permisos-rol-table .permisos-col-check,
    .permisos-rol-table td:nth-child(3),
    .permisos-rol-table td:nth-child(4) {
        width: 20%;
    }
}

/* Iconos en badges de permisos (PermisosUsuarioEmpresaView) */
.permisos-badge-icon {
    font-size: 1rem;
    vertical-align: middle;
}

/* ========== TABLAS ERP - ESTRUCTURA BASE (Fase 1) ========== */

/* Contenedor estándar para tablas con scroll horizontal */
/* Alias: .licencias-table-wrapper comparte estilos durante la migración */
.tabla-erp-wrapper,
.licencias-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    border: 1px solid #e9ecef;
}

/* Scrollbar personalizado para wrappers de tabla */
.tabla-erp-wrapper::-webkit-scrollbar,
.licencias-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.tabla-erp-wrapper::-webkit-scrollbar-track,
.licencias-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tabla-erp-wrapper::-webkit-scrollbar-thumb,
.licencias-table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.tabla-erp-wrapper::-webkit-scrollbar-thumb:hover,
.licencias-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Clase base para tablas ERP (estilos comunes) */
/* Alias: .licencias-table hereda estilos base durante la migración */
.tabla-erp,
.licencias-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.tabla-erp {
    table-layout: auto;
}

.tabla-erp thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabla-erp tbody td,
.licencias-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tabla-erp tbody tr:hover,
.licencias-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ========== VARIANTES DE TABLA - FASE 2 ========== */
/*
 * Estrategia de anchos (plan):
 * - Texto largo (nombre, descripción, email): min-width: 180px; max-width: 280px;
 * - Código/NIT: min-width: 100px; max-width: 140px;
 * - Numéricas: min-width: 90px; max-width: 120px; text-align: right;
 * - Fecha: min-width: 110px; max-width: 130px;
 * - Estado/badge: min-width: 100px; max-width: 140px;
 * - Acciones: min-width: 100px; max-width: 120px; text-align: center;
 *
 * min-width por variante (plan 2.3):
 * - ≤6 columnas: 700px | 7-8 columnas: 900px | 9-10 columnas: 1100px | 10+ (preview): 1400px
 */

/* --- Productos (10 columnas) --- */
.tabla-productos {
    min-width: 1100px;
}

.tabla-productos thead th:nth-child(1),
.tabla-productos tbody td:nth-child(1) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-productos thead th:nth-child(2),
.tabla-productos tbody td:nth-child(2) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-productos thead th:nth-child(3),
.tabla-productos tbody td:nth-child(3),
.tabla-productos thead th:nth-child(4),
.tabla-productos tbody td:nth-child(4) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-productos thead th:nth-child(5),
.tabla-productos tbody td:nth-child(5),
.tabla-productos thead th:nth-child(6),
.tabla-productos tbody td:nth-child(6),
.tabla-productos thead th:nth-child(7),
.tabla-productos tbody td:nth-child(7),
.tabla-productos thead th:nth-child(8),
.tabla-productos tbody td:nth-child(8),
.tabla-productos thead th:nth-child(9),
.tabla-productos tbody td:nth-child(9) {
    min-width: 90px;
    max-width: 120px;
}

.tabla-productos thead th:nth-child(5),
.tabla-productos tbody td:nth-child(5),
.tabla-productos thead th:nth-child(7),
.tabla-productos tbody td:nth-child(7),
.tabla-productos thead th:nth-child(8),
.tabla-productos tbody td:nth-child(8),
.tabla-productos thead th:nth-child(9),
.tabla-productos tbody td:nth-child(9) {
    text-align: right;
}

.tabla-productos thead th:nth-child(10),
.tabla-productos tbody td:nth-child(10) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Clientes (8 columnas) --- */
.tabla-clientes {
    min-width: 900px;
}

.tabla-clientes thead th:nth-child(1),
.tabla-clientes tbody td:nth-child(1) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-clientes thead th:nth-child(2),
.tabla-clientes tbody td:nth-child(2) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-clientes thead th:nth-child(3),
.tabla-clientes tbody td:nth-child(3),
.tabla-clientes thead th:nth-child(4),
.tabla-clientes tbody td:nth-child(4) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-clientes thead th:nth-child(5),
.tabla-clientes tbody td:nth-child(5) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-clientes thead th:nth-child(6),
.tabla-clientes tbody td:nth-child(6) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-clientes thead th:nth-child(7),
.tabla-clientes tbody td:nth-child(7) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-clientes thead th:nth-child(8),
.tabla-clientes tbody td:nth-child(8) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Usuarios (7 columnas) --- */
.tabla-usuarios {
    min-width: 900px;
}

.tabla-usuarios thead th:nth-child(1),
.tabla-usuarios tbody td:nth-child(1) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-usuarios thead th:nth-child(2),
.tabla-usuarios tbody td:nth-child(2) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-usuarios thead th:nth-child(3),
.tabla-usuarios tbody td:nth-child(3) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-usuarios thead th:nth-child(4),
.tabla-usuarios tbody td:nth-child(4),
.tabla-usuarios thead th:nth-child(5),
.tabla-usuarios tbody td:nth-child(5) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-usuarios thead th:nth-child(6),
.tabla-usuarios tbody td:nth-child(6) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-usuarios thead th:nth-child(7),
.tabla-usuarios tbody td:nth-child(7) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* Tabla Roles: columna Paneles permite wrap de badges para evitar desbordamiento */
.tabla-roles tbody td:nth-child(4) .licencia-status-cell {
    flex-wrap: wrap;
    white-space: normal;
}

/* Asignar paneles a usuarios: evitar desborde de "Paneles actuales" sobre "Acciones" */
.tabla-usuarios-paneles thead th:nth-child(4),
.tabla-usuarios-paneles tbody td:nth-child(4) {
    min-width: 220px;
    max-width: 320px;
}

.tabla-usuarios-paneles tbody td:nth-child(4) .licencia-status-cell {
    flex-wrap: wrap;
    gap: 4px;
    white-space: normal;
}

.tabla-usuarios-paneles thead th:nth-child(5),
.tabla-usuarios-paneles tbody td:nth-child(5) {
    min-width: 170px;
    max-width: 190px;
    text-align: center;
}

/* --- Almacenes (9 columnas) --- */
.tabla-almacenes {
    min-width: 1100px;
}

.tabla-almacenes thead th:nth-child(1),
.tabla-almacenes tbody td:nth-child(1) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-almacenes thead th:nth-child(2),
.tabla-almacenes tbody td:nth-child(2) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-almacenes thead th:nth-child(3),
.tabla-almacenes tbody td:nth-child(3) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-almacenes thead th:nth-child(4),
.tabla-almacenes tbody td:nth-child(4) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-almacenes thead th:nth-child(5),
.tabla-almacenes tbody td:nth-child(5),
.tabla-almacenes thead th:nth-child(6),
.tabla-almacenes tbody td:nth-child(6),
.tabla-almacenes thead th:nth-child(7),
.tabla-almacenes tbody td:nth-child(7) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-almacenes thead th:nth-child(8),
.tabla-almacenes tbody td:nth-child(8) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-almacenes thead th:nth-child(9),
.tabla-almacenes tbody td:nth-child(9) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Impuestos (6 columnas) --- */
.tabla-impuestos {
    min-width: 700px;
}

.tabla-impuestos thead th:nth-child(1),
.tabla-impuestos tbody td:nth-child(1) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-impuestos thead th:nth-child(2),
.tabla-impuestos tbody td:nth-child(2) {
    min-width: 90px;
    max-width: 120px;
    text-align: right;
}

.tabla-impuestos thead th:nth-child(3),
.tabla-impuestos tbody td:nth-child(3),
.tabla-impuestos thead th:nth-child(4),
.tabla-impuestos tbody td:nth-child(4) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-impuestos thead th:nth-child(5),
.tabla-impuestos tbody td:nth-child(5) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-impuestos thead th:nth-child(6),
.tabla-impuestos tbody td:nth-child(6) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Categorías (6 columnas) --- */
.tabla-categorias {
    min-width: 700px;
}

.tabla-categorias thead th:nth-child(1),
.tabla-categorias tbody td:nth-child(1) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-categorias thead th:nth-child(2),
.tabla-categorias tbody td:nth-child(2) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-categorias thead th:nth-child(3),
.tabla-categorias tbody td:nth-child(3) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-categorias thead th:nth-child(4),
.tabla-categorias tbody td:nth-child(4) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-categorias thead th:nth-child(5),
.tabla-categorias tbody td:nth-child(5) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-categorias thead th:nth-child(6),
.tabla-categorias tbody td:nth-child(6) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Unidades (6 columnas) --- */
.tabla-unidades {
    min-width: 700px;
}

.tabla-unidades thead th:nth-child(1),
.tabla-unidades tbody td:nth-child(1) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-unidades thead th:nth-child(2),
.tabla-unidades tbody td:nth-child(2) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-unidades thead th:nth-child(3),
.tabla-unidades tbody td:nth-child(3) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-unidades thead th:nth-child(4),
.tabla-unidades tbody td:nth-child(4) {
    min-width: 90px;
    max-width: 120px;
    text-align: right;
}

.tabla-unidades thead th:nth-child(5),
.tabla-unidades tbody td:nth-child(5) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-unidades thead th:nth-child(6),
.tabla-unidades tbody td:nth-child(6) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Tasas cambio (7 columnas) --- */
.tabla-tasas {
    min-width: 900px;
}

.tabla-tasas thead th:nth-child(1),
.tabla-tasas tbody td:nth-child(1),
.tabla-tasas thead th:nth-child(2),
.tabla-tasas tbody td:nth-child(2) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-tasas thead th:nth-child(3),
.tabla-tasas tbody td:nth-child(3) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-tasas thead th:nth-child(4),
.tabla-tasas tbody td:nth-child(4) {
    min-width: 90px;
    max-width: 120px;
    text-align: right;
}

.tabla-tasas thead th:nth-child(5),
.tabla-tasas tbody td:nth-child(5) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-tasas thead th:nth-child(6),
.tabla-tasas tbody td:nth-child(6) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-tasas thead th:nth-child(7),
.tabla-tasas tbody td:nth-child(7) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Facturas (7 columnas) --- */
.tabla-facturas {
    min-width: 900px;
}

.tabla-facturas thead th:nth-child(1),
.tabla-facturas tbody td:nth-child(1) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-facturas thead th:nth-child(2),
.tabla-facturas tbody td:nth-child(2) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-facturas thead th:nth-child(3),
.tabla-facturas tbody td:nth-child(3) {
    min-width: 110px;
    max-width: 130px;
}

.tabla-facturas thead th:nth-child(4),
.tabla-facturas tbody td:nth-child(4) {
    min-width: 90px;
    max-width: 120px;
    text-align: right;
}

.tabla-facturas thead th:nth-child(5),
.tabla-facturas tbody td:nth-child(5) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-facturas thead th:nth-child(6),
.tabla-facturas tbody td:nth-child(6) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-facturas thead th:nth-child(7),
.tabla-facturas tbody td:nth-child(7) {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

/* --- Borradores (6-7 columnas) --- */
.tabla-borradores {
    min-width: 900px;
}

/* --- Despachos (6-7 columnas) --- */
.tabla-despachos {
    min-width: 900px;
}

/* --- Módulos (6-7 columnas) --- */
.tabla-modulos {
    min-width: 900px;
}

/* --- Monedas (5-6 columnas) --- */
.tabla-monedas {
    min-width: 700px;
}

/* --- Planes (5-6 columnas) --- */
.tabla-planes {
    min-width: 700px;
}

/* --- Empresas (6-7 columnas) --- */
.tabla-empresas {
    min-width: 900px;
}

/* --- Licencias (10 columnas) --- */
.tabla-licencias {
    min-width: 1100px;
}

/* --- Descuentos producto (10 columnas) --- */
.tabla-descuentos-producto {
    min-width: 1100px;
}

/* --- Descuentos moneda (10 columnas) --- */
.tabla-descuentos-moneda {
    min-width: 1100px;
}

/* --- Ajuste stock (5 columnas) --- */
.tabla-ajuste-stock {
    min-width: 700px;
}

.tabla-ajuste-stock thead th:nth-child(1),
.tabla-ajuste-stock tbody td:nth-child(1) {
    min-width: 100px;
    max-width: 140px;
}

.tabla-ajuste-stock thead th:nth-child(2),
.tabla-ajuste-stock tbody td:nth-child(2) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-ajuste-stock thead th:nth-child(3),
.tabla-ajuste-stock tbody td:nth-child(3) {
    min-width: 180px;
    max-width: 280px;
}

.tabla-ajuste-stock thead th:nth-child(4),
.tabla-ajuste-stock tbody td:nth-child(4),
.tabla-ajuste-stock thead th:nth-child(5),
.tabla-ajuste-stock tbody td:nth-child(5) {
    min-width: 90px;
    max-width: 120px;
    text-align: right;
}

/* --- Permisos (4 columnas) --- */
.tabla-permisos {
    min-width: 700px;
}

/* --- Cuentas por cobrar (11 columnas) --- */
.tabla-cuentas-cobrar {
    min-width: 1400px;
}

.tabla-cuentas-cobrar thead th:nth-child(6),
.tabla-cuentas-cobrar tbody td:nth-child(6),
.tabla-cuentas-cobrar thead th:nth-child(7),
.tabla-cuentas-cobrar tbody td:nth-child(7),
.tabla-cuentas-cobrar thead th:nth-child(8),
.tabla-cuentas-cobrar tbody td:nth-child(8) {
    text-align: right;
}

/* --- Aplicar anticipo (5-6 columnas) --- */
.tabla-anticipo {
    min-width: 700px;
}

/* --- Detalle factura (7 columnas) --- */
.tabla-detalle-factura {
    min-width: 900px;
}

/* --- Preview carga masiva (15+ columnas) --- */
.tabla-preview-carga {
    min-width: 1400px;
}

/* ========== RESPONSIVE - TABLAS ERP (Fase 3) ========== */

@media (max-width: 992px) {
    .tabla-erp-wrapper .tabla-productos,
    .tabla-erp-wrapper .tabla-almacenes,
    .tabla-erp-wrapper .tabla-licencias,
    .tabla-erp-wrapper .tabla-descuentos-producto,
    .tabla-erp-wrapper .tabla-descuentos-moneda,
    .licencias-table-wrapper .tabla-productos,
    .licencias-table-wrapper .tabla-almacenes,
    .licencias-table-wrapper .tabla-licencias,
    .licencias-table-wrapper .tabla-descuentos-producto,
    .licencias-table-wrapper .tabla-descuentos-moneda {
        min-width: 880px;
    }

    .tabla-erp-wrapper .tabla-clientes,
    .tabla-erp-wrapper .tabla-usuarios,
    .tabla-erp-wrapper .tabla-tasas,
    .tabla-erp-wrapper .tabla-facturas,
    .tabla-erp-wrapper .tabla-borradores,
    .tabla-erp-wrapper .tabla-despachos,
    .tabla-erp-wrapper .tabla-modulos,
    .tabla-erp-wrapper .tabla-empresas,
    .tabla-erp-wrapper .tabla-detalle-factura,
    .licencias-table-wrapper .tabla-clientes,
    .licencias-table-wrapper .tabla-usuarios,
    .licencias-table-wrapper .tabla-tasas,
    .licencias-table-wrapper .tabla-facturas,
    .licencias-table-wrapper .tabla-borradores,
    .licencias-table-wrapper .tabla-despachos,
    .licencias-table-wrapper .tabla-modulos,
    .licencias-table-wrapper .tabla-empresas,
    .licencias-table-wrapper .tabla-detalle-factura {
        min-width: 720px;
    }

    .tabla-erp-wrapper .tabla-impuestos,
    .tabla-erp-wrapper .tabla-categorias,
    .tabla-erp-wrapper .tabla-unidades,
    .tabla-erp-wrapper .tabla-monedas,
    .tabla-erp-wrapper .tabla-planes,
    .tabla-erp-wrapper .tabla-ajuste-stock,
    .tabla-erp-wrapper .tabla-permisos,
    .tabla-erp-wrapper .tabla-anticipo,
    .licencias-table-wrapper .tabla-impuestos,
    .licencias-table-wrapper .tabla-categorias,
    .licencias-table-wrapper .tabla-unidades,
    .licencias-table-wrapper .tabla-monedas,
    .licencias-table-wrapper .tabla-planes,
    .licencias-table-wrapper .tabla-ajuste-stock,
    .licencias-table-wrapper .tabla-permisos,
    .licencias-table-wrapper .tabla-anticipo {
        min-width: 560px;
    }

    .tabla-erp-wrapper .tabla-cuentas-cobrar,
    .tabla-erp-wrapper .tabla-preview-carga,
    .licencias-table-wrapper .tabla-cuentas-cobrar,
    .licencias-table-wrapper .tabla-preview-carga {
        min-width: 1120px;
    }

    .tabla-erp thead th,
    .licencias-table thead th,
    .tabla-erp tbody td,
    .licencias-table tbody td {
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .tabla-erp-wrapper .tabla-productos,
    .tabla-erp-wrapper .tabla-almacenes,
    .tabla-erp-wrapper .tabla-licencias,
    .tabla-erp-wrapper .tabla-descuentos-producto,
    .tabla-erp-wrapper .tabla-descuentos-moneda,
    .licencias-table-wrapper .tabla-productos,
    .licencias-table-wrapper .tabla-almacenes,
    .licencias-table-wrapper .tabla-licencias,
    .licencias-table-wrapper .tabla-descuentos-producto,
    .licencias-table-wrapper .tabla-descuentos-moneda {
        min-width: 770px;
    }

    .tabla-erp-wrapper .tabla-clientes,
    .tabla-erp-wrapper .tabla-usuarios,
    .tabla-erp-wrapper .tabla-tasas,
    .tabla-erp-wrapper .tabla-facturas,
    .tabla-erp-wrapper .tabla-borradores,
    .tabla-erp-wrapper .tabla-despachos,
    .tabla-erp-wrapper .tabla-modulos,
    .tabla-erp-wrapper .tabla-empresas,
    .tabla-erp-wrapper .tabla-detalle-factura,
    .licencias-table-wrapper .tabla-clientes,
    .licencias-table-wrapper .tabla-usuarios,
    .licencias-table-wrapper .tabla-tasas,
    .licencias-table-wrapper .tabla-facturas,
    .licencias-table-wrapper .tabla-borradores,
    .licencias-table-wrapper .tabla-despachos,
    .licencias-table-wrapper .tabla-modulos,
    .licencias-table-wrapper .tabla-empresas,
    .licencias-table-wrapper .tabla-detalle-factura {
        min-width: 630px;
    }

    .tabla-erp-wrapper .tabla-impuestos,
    .tabla-erp-wrapper .tabla-categorias,
    .tabla-erp-wrapper .tabla-unidades,
    .tabla-erp-wrapper .tabla-monedas,
    .tabla-erp-wrapper .tabla-planes,
    .tabla-erp-wrapper .tabla-ajuste-stock,
    .tabla-erp-wrapper .tabla-permisos,
    .tabla-erp-wrapper .tabla-anticipo,
    .licencias-table-wrapper .tabla-impuestos,
    .licencias-table-wrapper .tabla-categorias,
    .licencias-table-wrapper .tabla-unidades,
    .licencias-table-wrapper .tabla-monedas,
    .licencias-table-wrapper .tabla-planes,
    .licencias-table-wrapper .tabla-ajuste-stock,
    .licencias-table-wrapper .tabla-permisos,
    .licencias-table-wrapper .tabla-anticipo {
        min-width: 490px;
    }

    .tabla-erp-wrapper .tabla-cuentas-cobrar,
    .tabla-erp-wrapper .tabla-preview-carga,
    .licencias-table-wrapper .tabla-cuentas-cobrar,
    .licencias-table-wrapper .tabla-preview-carga {
        min-width: 980px;
    }

    .tabla-erp thead th,
    .licencias-table thead th {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .tabla-erp tbody td,
    .licencias-table tbody td {
        padding: 10px 12px;
    }
}

@media (max-width: 576px) {
    .tabla-erp-wrapper .tabla-productos,
    .tabla-erp-wrapper .tabla-almacenes,
    .tabla-erp-wrapper .tabla-licencias,
    .tabla-erp-wrapper .tabla-descuentos-producto,
    .tabla-erp-wrapper .tabla-descuentos-moneda,
    .licencias-table-wrapper .tabla-productos,
    .licencias-table-wrapper .tabla-almacenes,
    .licencias-table-wrapper .tabla-licencias,
    .licencias-table-wrapper .tabla-descuentos-producto,
    .licencias-table-wrapper .tabla-descuentos-moneda {
        min-width: 660px;
    }

    .tabla-erp-wrapper .tabla-clientes,
    .tabla-erp-wrapper .tabla-usuarios,
    .tabla-erp-wrapper .tabla-tasas,
    .tabla-erp-wrapper .tabla-facturas,
    .tabla-erp-wrapper .tabla-borradores,
    .tabla-erp-wrapper .tabla-despachos,
    .tabla-erp-wrapper .tabla-modulos,
    .tabla-erp-wrapper .tabla-empresas,
    .tabla-erp-wrapper .tabla-detalle-factura,
    .licencias-table-wrapper .tabla-clientes,
    .licencias-table-wrapper .tabla-usuarios,
    .licencias-table-wrapper .tabla-tasas,
    .licencias-table-wrapper .tabla-facturas,
    .licencias-table-wrapper .tabla-borradores,
    .licencias-table-wrapper .tabla-despachos,
    .licencias-table-wrapper .tabla-modulos,
    .licencias-table-wrapper .tabla-empresas,
    .licencias-table-wrapper .tabla-detalle-factura {
        min-width: 540px;
    }

    .tabla-erp-wrapper .tabla-impuestos,
    .tabla-erp-wrapper .tabla-categorias,
    .tabla-erp-wrapper .tabla-unidades,
    .tabla-erp-wrapper .tabla-monedas,
    .tabla-erp-wrapper .tabla-planes,
    .tabla-erp-wrapper .tabla-ajuste-stock,
    .tabla-erp-wrapper .tabla-permisos,
    .tabla-erp-wrapper .tabla-anticipo,
    .licencias-table-wrapper .tabla-impuestos,
    .licencias-table-wrapper .tabla-categorias,
    .licencias-table-wrapper .tabla-unidades,
    .licencias-table-wrapper .tabla-monedas,
    .licencias-table-wrapper .tabla-planes,
    .licencias-table-wrapper .tabla-ajuste-stock,
    .licencias-table-wrapper .tabla-permisos,
    .licencias-table-wrapper .tabla-anticipo {
        min-width: 420px;
    }

    .tabla-erp-wrapper .tabla-cuentas-cobrar,
    .tabla-erp-wrapper .tabla-preview-carga,
    .licencias-table-wrapper .tabla-cuentas-cobrar,
    .licencias-table-wrapper .tabla-preview-carga {
        min-width: 840px;
    }

    .tabla-erp-wrapper,
    .licencias-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabla-erp-wrapper .btn-action,
    .licencias-table-wrapper .btn-action {
        width: 32px;
        height: 32px;
    }

    .tabla-erp-wrapper .btn-action .material-icons,
    .licencias-table-wrapper .btn-action .material-icons {
        font-size: 18px;
    }
}

/* ========== UTILIDADES - REEMPLAZO DE ESTILOS INLINE (Fase 4) ========== */

.form-inline-action {
    display: inline;
}

.js-toggle-container {
    display: none;
}

.js-toggle-container.is-visible {
    display: block;
}

.section-spacing {
    margin-top: 20px;
    margin-bottom: 20px;
}

.section-spacing-top {
    margin-top: 20px;
}

.section-spacing-top-lg {
    margin-top: 30px;
}

.section-spacing-bottom {
    margin-bottom: 20px;
}

.me-10 {
    margin-right: 10px;
}

.badge-status-pendiente {
    background-color: #ffc107;
    color: #000;
}

.badge-status-inactivo {
    background-color: #6c757d;
    color: #fff;
}

.icon-sm {
    font-size: 14px;
    vertical-align: middle;
}

.icon-md {
    font-size: 18px;
    vertical-align: middle;
}

.icon-xs {
    font-size: 16px;
    vertical-align: middle;
}

.login-button-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.btn-login {
    width: auto;
    min-width: 220px;
    margin: 0;
    background: #2c5282;
    background-color: #2c5282;
    background-image: none;
    color: #ffffff;
}

.btn-login .material-icons,
.btn-login span {
    color: #ffffff;
}

.link-volver-inicio {
    color: #2c5282;
    font-size: 1.2rem;
}

.link-cerrar-sesion {
    color: #2c5282;
    font-size: 1rem;
}

.admin-card-icon-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-card-icon-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.admin-card-icon-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.admin-card-icon-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.empresa-logo-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.empresa-logo-carga-panel {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    background: #fff;
}

.empresa-logo-carga-col {
    display: flex;
    flex-direction: column;
}

.empresa-logo-preview-col {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.empresa-logo-preview-frame--panel {
    flex: 1 1 auto;
    min-height: 180px;
}

.empresa-logo-preview-wrap {
    margin-top: 0.75rem;
}

.empresa-logo-preview-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
}

.empresa-logo-preview-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.empresa-logo-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #6c757d;
    text-align: center;
}

.empresa-logo-preview-placeholder .material-icons {
    font-size: 2.5rem;
    opacity: 0.65;
}

.empresa-logo-preview-hint {
    font-size: 0.875rem;
    max-width: 220px;
}

.empresa-logo-preview-placeholder--hidden,
.empresa-logo-preview--hidden {
    display: none !important;
}

.empresa-logo-preview-frame .empresa-logo-preview {
    margin: 0;
    max-width: 200px;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.empresa-logo-preview-new {
    max-width: 200px;
    max-height: 160px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 0.75rem;
    object-fit: contain;
}

.preview-table-responsive {
    overflow-x: auto;
    width: 100%;
}

.list-error-detail {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9em;
}

.small-muted {
    font-size: 0.8em;
    margin-top: 0.25rem;
}

.confirm-carga-box {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.toast-mensaje {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

.text-90 {
    font-size: 0.9em;
}

/* Límites de crédito - inputs compactos en tabla */
.limites-credito-input-group .limites-credito-input {
    max-width: 100px;
}

.limites-credito-input-group .dias-credito-input {
    max-width: 80px;
}

/* Ficha informativa - resumen orden de compra */
.compras-orden-resumen-card .compras-orden-resumen-label {
    margin-right: 0.5rem;
}

.compras-orden-resumen-card .compras-orden-resumen-total {
    color: #0d6efd;
}

/* ============================================================
   WMS SUPERUSUARIO — Dashboard y Configuración (SU-WMS-09)
   Prefijo: .wms-su-*
   ============================================================ */

.wms-su-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wms-su-kpi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.wms-su-kpi-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }

.wms-su-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c5282;
    line-height: 1;
    margin-bottom: .25rem;
}

.wms-su-kpi-label {
    font-size: .8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.wms-su-kpi-card.wms-activo .wms-su-kpi-value { color: #28a745; }

.wms-toggle-form { display: inline; }

.wms-toggle-btn {
    padding: .2rem .5rem;
    font-size: .75rem;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: 500;
}

.wms-toggle-btn.wms-on { background-color: #d4edda; color: #155724; }
.wms-toggle-btn.off    { background-color: #f8d7da; color: #721c24; }
.wms-toggle-btn:hover  { opacity: .85; }

.wms-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .75rem;
}

.wms-feature-item {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.wms-feature-desc {
    font-size: .75rem;
    color: #6c757d;
    margin-top: .15rem;
}

@media (max-width: 768px) {
    .wms-su-kpi-grid    { grid-template-columns: repeat(2, 1fr); }
    .wms-features-grid  { grid-template-columns: 1fr; }
}

/* ============================================================================
   SECCIÓN IA - Landing Page (ai-section, ai-feature-list, ai-capability-card)
   ============================================================================ */

/* Sección principal IA */
.ai-section {
    background: linear-gradient(160deg, #0f1535 0%, #1a2458 55%, #0f1535 100%);
    color: #e8eaf6;
    padding: 80px 0;
}

.ai-section h2 {
    color: #ffffff;
}

.ai-section .lead {
    color: rgba(232, 234, 246, 0.80);
}

/* Lista de features IA (bullet list con icono) */
.ai-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    color: rgba(232, 234, 246, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.97rem;
    line-height: 1.5;
}

.ai-feature-list li:last-child {
    border-bottom: none;
}

.ai-feature-list li .material-icons {
    color: #7c8cf8;
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Card lateral de la sección IA */
.ai-section-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(124, 140, 248, 0.30);
    border-radius: 20px;
    padding: 44px 36px;
    backdrop-filter: blur(8px);
}

.ai-section-card p {
    color: rgba(232, 234, 246, 0.78);
}

.ai-section-icon {
    font-size: 72px;
    color: #7c8cf8;
    margin-bottom: 20px;
    display: block;
}

/* Grid de capacidades IA (6 cards) */
.ai-capabilities-section {
    background: #f4f6ff;
    padding: 70px 0;
}

.ai-capabilities-section .section-title {
    color: #1a2458;
}

.ai-capabilities-section .section-lead {
    color: #5c6bc0;
}

.ai-capability-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 4px 18px rgba(100, 120, 255, 0.09);
    border: 1px solid rgba(124, 140, 248, 0.18);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    height: 100%;
    position: relative;
}

.ai-capability-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(100, 120, 255, 0.18);
}

.ai-capability-icon {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #5c6cfa 0%, #7c4dff 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.ai-capability-icon .material-icons {
    font-size: 32px;
    color: #ffffff;
}

.ai-capability-card h5 {
    color: #1a2458;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.ai-capability-card p {
    color: #5a6080;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.ai-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    background: linear-gradient(90deg, #5c6cfa, #7c4dff);
    border-radius: 30px;
    padding: 2px 9px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .ai-section {
        padding: 50px 0;
    }
    .ai-capabilities-section {
        padding: 50px 0;
    }
    .ai-section-card {
        padding: 30px 20px;
        margin-top: 30px;
    }
}

/* Panel tienda_minimal */
.ts-minimal-body {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    min-height: 100vh;
}

.ts-minimal-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 24, 39, 0.82);
    backdrop-filter: blur(6px);
    padding: 0.85rem 0;
}

.ts-minimal-title {
    color: #f8fafc;
    font-weight: 700;
}

.ts-minimal-subtitle {
    color: #9ca3af;
    font-size: 0.85rem;
}

.ts-minimal-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ts-minimal-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

.ts-minimal-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.ts-minimal-card h2 {
    color: #f8fafc;
    font-weight: 700;
}

.ts-minimal-card .text-muted {
    color: #cbd5e1 !important;
}

.ts-minimal-card-logo {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ts-minimal-card-logo-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-minimal-card-logo-placeholder .material-icons {
    font-size: 42px;
}

.ts-minimal-main {
    padding-top: 1.25rem;
}

.ts-minimal-logout-btn {
    font-weight: 600;
}

/* Superuser -> gestionar_tenant_tienda_api -> paleta */
.tp-palette-preview-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.tp-palette-dot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.2);
    display: inline-block;
}

.tp-palette-primary {
    background: #1f4e79;
}

.tp-palette-secondary {
    background: #5f6b7a;
}

.tp-palette-accent {
    background: #c89b3c;
}

.tp-palette-danger {
    background: #b63c3c;
}

.tp-palette-warning {
    background: #d9a441;
}

.tp-palette-bg {
    background: #f4f1ea;
}

.tp-palette-text {
    background: #1b2430;
}

.tp-palette-topbar-start {
    background: #f5f1e8;
}

.tp-palette-topbar-end {
    background: #e7edf6;
}

.tp-palette-ribbon-tenant-start {
    background: #e9eef7;
}

.tp-palette-ribbon-tenant-end {
    background: #fdfdfd;
}

.tp-palette-ribbon-hero-start {
    background: #f9f6ef;
}

.tp-palette-ribbon-hero-end {
    background: #e8f0fb;
}

.tp-palette-ribbon-text {
    background: #233142;
}

.tp-palette-ribbon-tenant {
    background: #1f2f46;
}

.tp-palette-ribbon-hero {
    background: #233142;
}

/* Superuser -> gestionar_tenant_tienda_api — pestañas */
.su-tienda-api-workspace {
    margin-top: 1.25rem;
    margin-bottom: 2rem;
}

.su-tienda-api-tabbed-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.su-tienda-api-nav-tabs {
    flex-wrap: wrap;
    gap: 0;
    padding: 0.5rem 0.65rem 0;
    margin-bottom: 0;
    border-bottom: none;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.su-tienda-api-nav-item {
    flex: 1 1 220px;
    min-width: 0;
}

.su-tienda-api-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.85rem 1rem 0.95rem;
    margin-bottom: 0;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0 !important;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.su-tienda-api-nav-link:hover {
    color: var(--color-primary, #667eea);
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(148, 163, 184, 0.25);
}

.su-tienda-api-nav-link.active {
    color: #1e293b;
    background: #fff;
    border-color: rgba(148, 163, 184, 0.28);
    border-bottom-color: #fff !important;
    margin-bottom: -1px;
    box-shadow: 0 -2px 14px rgba(15, 23, 42, 0.04);
}

/* Panel tienda_pedidos -> listado y detalle */
.tdp-action-btn .material-icons {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

.tdp-order-detail .tdp-kpi-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.tdp-kpi-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.tdp-kpi-value {
    font-size: 1.02rem;
    color: #1e293b;
    font-weight: 700;
    word-break: break-word;
}

.tdp-card {
    border: 1px solid #e7ebf2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.tdp-card-header {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 1px solid #e7ebf2;
}

.tdp-field-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tdp-field-row {
    display: grid;
    grid-template-columns: minmax(140px, 170px) 1fr;
    gap: 10px;
    align-items: baseline;
    border-bottom: 1px dashed #e6ebf3;
    padding-bottom: 6px;
}

.tdp-field-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tdp-field-value {
    font-size: 0.94rem;
    color: #0f172a;
    word-break: break-word;
}

.tdp-payment-card {
    border: 1px solid #e5eaf3;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.tdp-payment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tdp-extra-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
}

.tdp-extra-item {
    background: #f8fafc;
    border: 1px solid #e7ecf3;
    border-radius: 10px;
    padding: 8px 10px;
}

.tdp-proof-thumb {
    max-height: 120px;
    width: auto;
}

@media (max-width: 768px) {
    .tdp-field-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.su-tienda-api-nav-link.active::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--color-primary, #667eea);
}

.su-tienda-api-nav-item .su-tienda-api-nav-link {
    position: relative;
}

.su-tienda-api-nav-icon {
    font-size: 24px !important;
    line-height: 1;
    color: inherit;
    opacity: 0.92;
}

.su-tienda-api-nav-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.su-tienda-api-nav-title {
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.su-tienda-api-nav-sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.25;
}

.su-tienda-api-nav-link.active .su-tienda-api-nav-sub {
    color: #64748b;
}

.su-tienda-api-tab-content {
    background: #fff;
    padding: 0 1.25rem 1.35rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.su-tienda-api-tab-pane > .su-tienda-api-pane-inner + .su-tienda-api-pane-actions {
    margin-top: 0;
}

.su-tienda-api-pane-inner {
    padding: 1.15rem 0 1rem;
}

.su-tienda-api-pane-actions {
    padding: 0.25rem 0 0.35rem;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 576px) {
    .su-tienda-api-nav-link {
        border-radius: 10px !important;
        margin-bottom: 0.35rem;
    }

    .su-tienda-api-nav-tabs {
        padding: 0.5rem;
    }

    .su-tienda-api-nav-link.active {
        margin-bottom: 0.35rem;
        border-bottom-color: rgba(148, 163, 184, 0.28) !important;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    }
}

/* Vista previa reporte pedidos tienda (scroll horizontal) */
.tp-reporte-preview-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.tp-reporte-preview-table {
    min-width: 1080px;
    width: max-content;
}

.tp-reporte-preview-table th {
    white-space: nowrap;
}

.tp-reporte-comprador {
    white-space: pre-line;
    word-break: break-word;
    max-width: 22rem;
}

/* Observaciones por pago — panel tienda_pedidos */
.tdp-payment-obs textarea {
    max-height: 14rem;
}

