/* ===== VARIABLES Y RESET ===== */
:root {
    --primary-green: #00ff8c;
    --dark-green: #00cc6f;
    --black: #0a0a0a;
    --dark-gray: #1a1a1a;
    --medium-gray: #2a2a2a;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    
    /* Colores de estado */
    --success-color: #00ff8c;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #007bff;
    --secondary-color: #6c757d;
    
    /* Breakpoints reutilizables */
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--black);
    color: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
    width: 100%;
}

/* ===== SISTEMA DE GRID REUTILIZABLE ===== */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex: 1 0 0%;
    padding: 0 15px;
}

/* Sistema de columnas - Mobile First */
.col-xs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-xs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-xs-3 { flex: 0 0 25%; max-width: 25%; }
.col-xs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-xs-6 { flex: 0 0 50%; max-width: 50%; }
.col-xs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-xs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-xs-9 { flex: 0 0 75%; max-width: 75%; }
.col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-xs-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 576px) {
    .container { max-width: 540px; }
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 992px) {
    .container { max-width: 960px; }
    .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1200px) {
    .container { max-width: 1140px; }
    .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* ===== UTILIDADES ===== */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }

/* ===== CLASES UTILITARIAS PARA COLORES ===== */
/* Fondos con opacidad */
.bg-success-light { background: rgba(0, 255, 140, 0.2) !important; }
.bg-warning-light { background: rgba(255, 193, 7, 0.2) !important; }
.bg-danger-light { background: rgba(220, 53, 69, 0.2) !important; }
.bg-info-light { background: rgba(0, 123, 255, 0.2) !important; }
.bg-secondary-light { background: rgba(108, 117, 125, 0.2) !important; }

/* Bordes con opacidad */
.border-success-light { border: 1px solid rgba(0, 255, 140, 0.3) !important; }
.border-warning-light { border: 1px solid rgba(255, 193, 7, 0.3) !important; }
.border-danger-light { border: 1px solid rgba(220, 53, 69, 0.3) !important; }
.border-info-light { border: 1px solid rgba(0, 123, 255, 0.3) !important; }
.border-secondary-light { border: 1px solid rgba(108, 117, 125, 0.3) !important; }

/* Colores de texto */
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-white { color: var(--white) !important; }
.text-light { color: var(--light-gray) !important; }
.text-dark { color: var(--black) !important; }

/* Combinaciones completas para badges */
.badge-success {
    background: rgba(0, 255, 140, 0.2) !important;
    color: var(--success-color) !important;
    border: 1px solid rgba(0, 255, 140, 0.3) !important;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.2) !important;
    color: var(--warning-color) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.2) !important;
    color: var(--danger-color) !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
}

.badge-info {
    background: rgba(0, 123, 255, 0.2) !important;
    color: var(--info-color) !important;
    border: 1px solid rgba(0, 123, 255, 0.3) !important;
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.2) !important;
    color: var(--secondary-color) !important;
    border: 1px solid rgba(108, 117, 125, 0.3) !important;
}

/* ===== COMPONENTES REUTILIZABLES ===== */

/* Botones */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-green);
    color: var(--black);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 140, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn i {
    margin-left: 8px;
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--primary-green);
    color: var(--black);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 140, 0.3);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.btn-delete {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-edit:hover {
    background: rgba(0, 123, 255, 0.3);
}

.btn-delete:hover {
    background: rgba(220, 53, 69, 0.3);
}

.btn-pdf {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn-pdf:hover {
    background: rgba(220, 53, 69, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Badges de estado */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid transparent;
}

/* 🔴 PENDIENTE - Color de alerta/espera */
.status-Pendiente {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-color: #dc3545;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* 🟡 PROGRAMADO - Color de preparación */
.status-Programado {
    background: linear-gradient(135deg, #ffd166, #ffb347);
    color: #8a6d3b;
    border-color: #e6a23c;
    box-shadow: 0 2px 6px rgba(230, 162, 60, 0.3);
}

/* 🔵 EN PROGRESO - Color de acción/actividad */
.status-En-Progreso {
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
    color: white;
    border-color: #3a56e4;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.4);
}

/* 🟢 COMPLETADO - Color de éxito (verde intermedio) */
.status-Completado {
    background: linear-gradient(135deg, #38b000, #2d7d46);
    color: white;
    border-color: #2e7d32;
    box-shadow: 0 2px 8px rgba(56, 176, 0, 0.4);
}

/* 💚 ENTREGADO - Color de éxito final (verde más intenso) */
.status-Entregado {
    background: linear-gradient(135deg, #00b894, #008f6b);
    color: white;
    border-color: #007553;
    box-shadow: 0 2px 10px rgba(0, 184, 148, 0.5);
    font-weight: 600;
}

.status-Cancelado {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* ===== HEADER Y NAVEGACIÓN PRINCIPAL ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 255, 140, 0.1);
}

header.scrolled {
    padding: 0.7rem 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 60px;
    z-index: 1003;
}

.logo img {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

header.scrolled .logo img {
    height: 50px;
    max-width: 180px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 1rem;
    padding: 0.5rem 0;
    white-space: nowrap;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-green);
}

nav ul li a:hover:after {
    width: 100%;
}

/* Indicador de navegación */
.service-nav {
    background: rgba(10, 10, 10, 0.98) !important;
    border-bottom: 2px solid var(--primary-green);
}

.service-nav .logo img {
    height: 50px;
}

.service-nav nav ul li a.active {
    color: var(--primary-green);
}

.service-nav nav ul li a.active:after {
    width: 100%;
}

.nav-indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: var(--primary-green);
    transition: all 0.3s ease;
}

/* ===== MENÚ MÓVIL PRINCIPAL ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1003;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--dark-gray);
    z-index: 1002;
    transition: right 0.4s ease;
    padding: 6rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu ul li a:hover {
    background-color: var(--primary-green);
    color: var(--black);
    transform: translateX(5px);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== SECCIONES GENERALES ===== */
section {
    width: 100%;
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 15px;
}

.section-title h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.section-title p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--light-gray);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
    width: 100%;
}

#canvas-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 0 5%;
    max-width: 900px;
    width: 100%;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-green), var(--white));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
    line-height: 1.6;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

/* ===== SERVICIOS ===== */
.services {
    padding: 5rem 5%;
    background-color: var(--dark-gray);
    position: relative;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 15px;
}

.service-card {
    background: linear-gradient(145deg, var(--black), var(--medium-gray));
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 255, 140, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
}

.service-card:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    background: linear-gradient(45deg, var(--primary-green), transparent, var(--primary-green));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 255, 140, 0.1);
    border-color: var(--primary-green);
}

.service-card:hover:before {
    opacity: 1;
    animation: borderLight 2s linear infinite;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    text-align: center;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
    text-align: center;
}

.service-card p {
    text-align: center;
    color: var(--light-gray);
}

/* ===== NOSOTROS ===== */
.about {
    padding: 5rem 5%;
    background-color: var(--black);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding: 0 15px;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-green);
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--light-gray);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--dark-gray);
    border-radius: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-green);
    display: block;
}

.stat-label {
    color: var(--light-gray);
    font-size: 0.9rem;
}

.about-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== UBICACIÓN ===== */
.location {
    padding: 5rem 5%;
    background-color: var(--dark-gray);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding: 0 15px;
}

.location-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-green);
}

.location-details {
    margin-bottom: 2rem;
}

.location-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    color: var(--light-gray);
}

.location-details i {
    margin-right: 10px;
    color: var(--primary-green);
    font-size: 1.2rem;
    width: 20px;
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    height: 300px;
    width: 100%;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 300px;
}

/* ===== VENTAJAS ===== */
.features {
    padding: 5rem 5%;
    background-color: var(--black);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 15px;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--dark-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 140, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 1rem;
    color: var(--white);
}

/* ===== CONTACTO ===== */
.contact {
    padding: 5rem 5%;
    background-color: var(--dark-gray);
}

.form-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 2rem;
    padding: 0 15px;
}

.contact-info {
    color: var(--light-gray);
}

.contact-info h3 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-details i {
    margin-right: 10px;
    color: var(--primary-green);
    font-size: 1.2rem;
    width: 20px;
}

.contact-form {
    background-color: var(--medium-gray);
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light-gray);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group select option {
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 10px;
}

.form-group select option:hover {
    background-color: #f0f0f0 !important;
    color: #000000 !important;
}

.form-group select option:checked {
    background-color: #007bff !important;
    color: #ffffff !important;
}

.form-group select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: var(--primary-green);
}

.form-group select {
    color: var(--white) !important;
}

.form-group select:focus option {
    color: #000000 !important;
    background-color: #ffffff !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(0, 255, 140, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== BOTONES FLOTANTES ===== */
.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 999;
    gap: 10px;
}

.back-to-top {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-green);
    transform: translateY(-5px);
}

.whatsapp-button {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* ===== SISTEMA DE MODALES REUTILIZABLE UNIFICADO ===== */
.modal-system,
.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.modal-system.active,
.service-modal.active {
    display: flex;
    opacity: 1;
}

.modal-system .modal-content,
.modal-content {
    background: linear-gradient(145deg, var(--dark-gray), var(--black));
    width: 100%;
    max-width: 900px;
    border-radius: 15px;
    padding: 1.5rem;
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
    border: 1px solid var(--primary-green);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 140, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-system.active .modal-content,
.service-modal.active .modal-content {
    transform: translateY(0);
}

.modal-system .modal-header,
.modal-header {
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 255, 140, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 255, 140, 0.05);
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.modal-system .modal-title,
.modal-header h3 {
    color: var(--primary-green);
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    flex: 1;
}

.modal-system .close-modal,
.close-modal {
    background: none;
    border: none;
    color: var(--light-gray);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    flex-shrink: 0;
}

.modal-system .close-modal:hover,
.close-modal:hover {
    color: var(--primary-green);
    background: rgba(0, 255, 140, 0.1);
}

.modal-system .modal-body,
.modal-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    width: 100%;
}

.modal-system .modal-body > *,
.modal-body > * {
    width: 100%;
    min-width: 0;
}

.modal-media {
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--black);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-media iframe,
.modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    color: var(--light-gray);
}

.modal-info ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-info li {
    margin-bottom: 0.5rem;
}

/* ===== ESTILOS PARA SECCIÓN DE PAGO ===== */
.payment-section {
    background: rgba(0, 255, 140, 0.05);
    border: 1px solid rgba(0, 255, 140, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.payment-section h4 {
    color: var(--primary-green);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 255, 140, 0.2);
    padding-bottom: 0.5rem;
}

/* Campos de solo lectura */
.form-control[readonly] {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
}

/* Transición suave para mostrar/ocultar */
#paymentFields {
    transition: all 0.3s ease;
}

#paymentFields.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CARRUSEL EN MODALES ===== */
.modal-carousel {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--black);
    height: 250px;
    min-height: 250px;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
}

.carousel-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--primary-green);
    color: var(--black);
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: var(--primary-green);
    transform: scale(1.2);
}

/* ===== BOTONES DE ACCIÓN EN MODALES ===== */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions .btn,
.modal-actions .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.btn-featured {
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite;
}

/* ===== MEJORAS PARA LA INFORMACIÓN DEL MODAL ===== */
.modal-highlights {
    margin: 1.5rem 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.highlight-icon {
    width: 30px;
    height: 30px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--black);
    font-size: 0.9rem;
}

/* ===== MENSAJES DE FEEDBACK PARA EL FORMULARIO ===== */
.form-feedback {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

.form-feedback.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.form-feedback.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.form-feedback.warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.form-feedback.info {
    background-color: #d1ecf1;
    border-color: #b8daff;
    color: #0c5460;
}

.form-feedback i {
    font-size: 1.2rem;
}

.form-feedback.hiding {
    animation: slideUp 0.3s ease forwards;
}

/* ===== ESTADOS DEL BOTÓN DE ENVIAR ===== */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

/* ===== MEJORAS PARA EL FORMULARIO ===== */
.contact-form {
    position: relative;
}

.form-group {
    transition: all 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary-green);
    transform: translateY(-2px);
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 140, 0.1);
}

/* ===== FOOTER ===== */
footer {
    padding: 3rem 5%;
    text-align: center;
    background-color: var(--black);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    display: flex;
    margin: 1.5rem 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--dark-gray);
    color: var(--white);
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-green);
    color: var(--black);
    transform: translateY(-3px);
}

/* ===== LAYOUT ERP - MÓDULOS CORREGIDO ===== */

/* Contenedor principal */
.erp-module-container {
    position: relative;
    min-height: 100vh;
    display: flex;
}

/* Sidebar de módulos - CORREGIDO */
.module-sidebar {
 width: 280px;
    background: var(--dark-gray);
    border-right: 1px solid rgba(0, 255, 140, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    /* SOLO overflow-y hidden, permitir overflow-x */
    overflow-x: visible !important;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.module-sidebar.collapsed {
    width: 70px;
    overflow-x: visible !important;
}

/* Header del sidebar */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 255, 140, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 80px;
    flex-shrink: 0;
    background: var(--dark-gray);
    z-index: 1001;
    /* Fijar el header del sidebar */
    position: sticky;
    top: 0;
}

/* Logos del sidebar */
.sidebar-logo {
    height: 35px;
    opacity: 1;
    transition: all 0.3s ease;
    object-fit: contain;
}

.sidebar-logo-small {
    height: 30px;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    display: none;
}

.module-sidebar.collapsed .sidebar-logo {
    opacity: 0;
    transform: translateX(-20px);
}

.module-sidebar.collapsed .sidebar-logo-small {
    opacity: 1;
    display: block;
}

/* Botón toggle sidebar - CORREGIDO */
.toggle-sidebar {
    position: fixed;
    top: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-green);
    border: 2px solid var(--primary-green);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 
        left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        background 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    z-index: 1002;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    left: 268px;
}

.module-sidebar.collapsed ~ .toggle-sidebar {
    left: 58px;
}

.toggle-sidebar i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.module-sidebar.collapsed ~ .toggle-sidebar i {
    transform: rotate(180deg);
}

/* Hover con efectos visuales pero sin movimiento */
.toggle-sidebar:hover {
    background: var(--dark-green);
    border-color: var(--dark-green);
    box-shadow: 
        0 4px 15px rgba(0, 255, 140, 0.5),
        0 0 0 3px rgba(0, 255, 140, 0.2);
}

/* Menú del sidebar con scroll interno */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
    max-height: calc(100vh - 80px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) rgba(0, 255, 140, 0.1);
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(0, 255, 140, 0.05);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    border-radius: 3px;
}

.module-sidebar.collapsed .sidebar-menu::-webkit-scrollbar {
    width: 0px;
}

/* Estilos del menú */
.menu-section {
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.menu-title {
    padding: 0.5rem 1.5rem;
    color: var(--primary-green);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.module-sidebar.collapsed .menu-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--light-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.menu-item:hover {
    background: rgba(0, 255, 140, 0.1);
    color: var(--primary-green);
}

.menu-item.active {
    background: rgba(0, 255, 140, 0.15);
    color: var(--primary-green);
    border-left-color: var(--primary-green);
}

.menu-icon {
    width: 20px;
    margin-right: 1rem;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.module-sidebar.collapsed .menu-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

.menu-text {
    opacity: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.module-sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
}

/* Tooltips para estado contraído */
.menu-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--dark-gray);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 140, 0.2);
    z-index: 1002;
    pointer-events: none;
}

.module-sidebar.collapsed .menu-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(5px);
}

/* ===== CONTENIDO PRINCIPAL - CORREGIDO ===== */
.module-content {
    margin-left: 280px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 100vh;
    background: var(--black);
    width: calc(100% - 280px);
    position: relative;
    /* Scroll independiente del sidebar */
    overflow-y: auto;
    height: 100vh;
}

.module-sidebar.collapsed ~ .module-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* Header del módulo - CORREGIDO */
.module-header {
    background: var(--dark-gray);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0, 255, 140, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999; /* Menor que el botón toggle */
    width: 100%;
    min-height: 80px;
}

.module-title {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.module-title i {
    font-size: 1.3rem;
}

/* ===== USER ACTIONS - ESTILOS CORREGIDOS ===== */
.user-actions-container {
    display: flex;
    align-items: center;
    position: relative;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1001;
}

.user-actions span {
    color: var(--light-gray);
    font-size: 0.9rem;
    white-space: nowrap;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), #00cc6f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 255, 140, 0.3);
    box-shadow: 0 4px 12px rgba(0, 255, 140, 0.2);
    position: relative;
    z-index: 1002;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 255, 140, 0.4);
}

/* ===== USER DROPDOWN - ESTILOS OPTIMIZADOS ===== */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--dark-gray);
    border: 1px solid rgba(0, 255, 140, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1003;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: var(--dark-gray);
    border-left: 1px solid rgba(0, 255, 140, 0.2);
    border-top: 1px solid rgba(0, 255, 140, 0.2);
    transform: rotate(45deg);
}

/* Contenido del dropdown */
.dropdown-header {
    padding: 1rem;
    background: rgba(0, 255, 140, 0.05);
    border-bottom: 1px solid rgba(0, 255, 140, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    font-size: 0.9rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--light-gray);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--light-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(0, 255, 140, 0.1);
    color: var(--primary-green);
    padding-left: 1.2rem;
}

.dropdown-item i {
    width: 20px;
    margin-right: 0.8rem;
    font-size: 1rem;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 255, 140, 0.1);
    margin: 0.5rem 0;
}

.notification-count {
    margin-left: auto;
    background: #ff4757;
    color: white;
    border-radius: 10px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    min-width: 20px;
    text-align: center;
}

logout-item {
    display: flex !important;
    align-items: center !important;
    padding: 0.8rem 1rem !important;
    color: #ff4757 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border-left: 3px solid transparent !important;
    font-size: 0.9rem !important;
    background: none !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    font-family: inherit !important;
}

.logout-item:hover {
    background: rgba(255, 71, 87, 0.1) !important;
    color: #ff4757 !important;
    padding-left: 1.2rem !important;
    border-left-color: #ff4757 !important;
}


.logout-item i {
    width: 20px !important;
    margin-right: 0.8rem !important;
    font-size: 1rem !important;
    text-align: center !important;
}

/* Asegurar que el botón tenga el mismo comportamiento que los enlaces */
.logout-item:focus {
    outline: none !important;
    background: rgba(255, 71, 87, 0.15) !important;
}

/* Cuerpo del módulo */
.module-body {
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* ===== COMPONENTES MÓVILES ERP ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-green);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 100;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 255, 140, 0.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999; /* Debajo del sidebar (1000) */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== OVERLAY PARA USER DROPDOWN ===== */
.user-dropdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1003;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-dropdown-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== CLASE PARA BLOQUEAR SCROLL ===== */
body.sidebar-open,
body.dropdown-open {
    overflow: auto !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Asegurar que los elementos importantes mantengan su visibilidad */
.module-sidebar.mobile-open,
.user-dropdown.active {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

@keyframes borderLight {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 140, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 140, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 140, 0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVIDAD COMPLETA ===== */

/* Tablets y móviles grandes */
@media (min-width: 768px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .location-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .form-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .modal-body {
        grid-template-columns: 1fr 1fr;
    }
    
    .modal-carousel {
        height: 300px;
    }
    
    .modal-actions {
        flex-direction: row;
    }
    
    .modal-actions .btn,
    .modal-actions .btn-secondary {
        width: auto;
        flex: 1;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none;
    }
    
    nav ul {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .services-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* ===== MÓVILES (768px y menos) - CORREGIDO ===== */
@media (max-width: 768px) {
    /* Navegación principal */
    nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Header general */
    header {
        padding: 0.8rem 5%;
    }
    
    .logo img {
        max-width: 140px;
    }
    
    .hero {
        margin-top: 70px;
        height: 90vh;
        min-height: 600px;
    }
    
    .service-card {
        min-height: 250px;
        padding: 1.5rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .floating-buttons {
        bottom: 15px;
        right: 15px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }

    /* Layout ERP */
    .module-sidebar {
        width: 280px;
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .module-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .module-content {
        margin-left: 0 !important;
        width: 100% !important;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .module-header {
        padding: 1rem;
        min-height: 70px;
    }
    
    .module-title {
        font-size: 1.2rem;
    }

    /* User Actions en móviles - CORREGIDO */
    .user-actions-container {
        position: static;
    }
    
    .user-actions span {
        display: none;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        z-index: 1004 !important; /* Más alto que el dropdown */
    }

    /* User Dropdown en móviles - CORREGIDO Y OPTIMIZADO */
    .user-dropdown {
        position: fixed !important;
        top: 5% !important;
        left: 5% !important;
        right: 5% !important;
        bottom: auto !important;
        transform: none !important;
        min-width: auto !important;
        max-width: none !important;
        width: 90% !important;
        max-height: 90vh !important;
        min-height: auto !important;
        height: auto !important;
        overflow-y: auto !important;
        z-index: 1004 !important;
        border: 2px solid var(--primary-green) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9) !important;
        border-radius: 10px !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }
    
    .user-dropdown.active {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .user-dropdown::before {
        display: none !important;
    }
    
    .module-body {
        padding: 1rem;
    }
    
    /* Ocultar tooltips y toggle en móvil */
    .menu-item::after {
        display: none;
    }
    
    .toggle-sidebar {
        display: none !important;
    }
    /* En móviles, el sidebar se comporta diferente */
    body.sidebar-open .module-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        overflow-y: auto;
    }
    
    .logout-item {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    .logout-item:hover {
        padding-left: 1.2rem !important;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .logo img {
        max-width: 120px;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .services-container {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        min-height: 220px;
        padding: 1rem;
    }

     .user-dropdown {
        position: fixed !important;
        top: 5% !important;
        left: 5% !important;
        right: 5% !important;
        bottom: auto !important;
        transform: none !important;
        min-width: auto !important;
        max-width: none !important;
        width: 90% !important;
        max-height: 90vh !important;
        min-height: auto !important;
        height: auto !important;
        overflow-y: auto !important;
        z-index: 1004 !important;
        border: 2px solid var(--primary-green) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9) !important;
        border-radius: 10px !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }
    
    .user-dropdown.active {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .user-dropdown::before {
        display: none !important;
    }
}

/* Tablets específicos para ERP */
@media (min-width: 769px) and (max-width: 1024px) {
    .module-sidebar {
        width: 240px;
    }
    
    .module-sidebar.collapsed {
        width: 70px;
    }
    
    .module-content {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
    
    .module-sidebar.collapsed ~ .module-content {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
    
    .toggle-sidebar {
        right: -16px;
        width: 30px;
        height: 30px;
    }
}

/* ===== CORRECCIONES ESPECÍFICAS PARA MÓVIL ===== */

/* Bloquear scroll del body cuando sidebar está abierto */
body.sidebar-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Mejorar el overlay para móviles */
.sidebar-overlay {
    backdrop-filter: blur(5px);
}

/* Prevenir scroll en el overlay */
.sidebar-overlay.active {
    touch-action: none;
    -webkit-overflow-scrolling: none;
    overflow: hidden;
}

/* ===== PREVENIR SCROLL HORIZONTAL GLOBAL ===== */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.erp-module-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Force hardware acceleration for smoother animations */
.erp-module-container {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

.module-content {
    max-width: 100%;
    overflow-x: hidden;
}

/* Asegurar que todos los elementos dentro del contenido no causen overflow */
.module-body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevenir repaints innecesarios durante la transición */
.module-body {
    transform: translateZ(0);
}

/* Asegurar que ningún elemento cause overflow */
.module-body > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Tablas responsivas */
.table-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.table-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Gráficas y tarjetas */
.chart-card,
.service-stat-card,
.services-table {
    max-width: 100%;
    overflow: hidden;
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
/* Estilo base del scroll */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

/* ===== MANTENER SCROLLBAR SIEMPRE VISIBLE ===== */
body.dropdown-open {
    overflow: auto !important;
}

/* Para index */
body.dropdown-open .erp-main-page {
    overflow: auto;
    height: 100vh;
}

/* Para módulos */
body.dropdown-open .erp-module-container {
    overflow: auto;
    height: 100vh;
}

/* ===== SISTEMA DE FORMULARIOS REUTILIZABLE ===== */
.form-system {
    width: 100%;
}

.form-system .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-system .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-system .form-group.full-width {
    grid-column: 1 / -1;
}

.form-system .form-label {
    color: var(--light-gray);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.form-system .form-control {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-system .form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 140, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-system .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-system .form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-system textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.form-system select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2300ff8c' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-system .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 255, 140, 0.1);
}

/* ===== BOTONES MEJORADOS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary-green);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 140, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background: var(--primary-green);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 140, 0.3);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Estados de loading en botones */
.btn-loading {
    display: none;
}

.btn:disabled .btn-loading {
    display: block;
}

.btn:disabled .btn-text {
    display: none;
}

/* ===== RESPONSIVE PARA MODALES Y FORMULARIOS ===== */
@media (max-width: 768px) {
    .modal-system {
        padding: 0.5rem;
        align-items: flex-start;
    }
    
    .modal-system .modal-content {
        max-height: 95vh;
        margin: 0;
        margin-top: 2rem;
    }
    
    .modal-system .modal-header {
        padding: 1rem 1.5rem;
        position: relative;
        padding-top: 3rem; /* Espacio para la X */
    }
    
    .modal-system .modal-body {
        padding: 1.5rem;
    }
    
    .modal-system .close-modal {
        position: absolute;
        top: 10px;
        right: 10px;
        margin-top: 0 !important;
        align-self: auto !important;
        z-index: 10;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
    }
    
    .form-system .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-system .form-actions {
        flex-direction: column;
    }
    
    .form-system .form-actions .btn,
    .form-system .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-system .modal-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        padding-top: 3.5rem; /* Más espacio para la X */
    }

    .modal-system .close-modal {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.8);
    }
}

/* ===== CORRECCIÓN ESPECÍFICA PARA PAGINACIÓN DATATABLES ===== */
.dataTables_wrapper .row {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    width: 100% !important;
}

.dataTables_wrapper .row .col-md-6 {
    flex: 1 !important;
    max-width: 50% !important;
    padding: 0 15px !important;
}

/* Contenedor de length */
.dataTables_wrapper .dataTables_length {
    text-align: left !important;
    margin: 0 !important;
    padding: 0.5rem 0 !important;
}

.dataTables_wrapper .dataTables_length label {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
}

/* Contenedor de paginación */
.dataTables_wrapper .dataTables_paginate {
    text-align: right !important;
    margin: 0 !important;
    padding: 0.5rem 0 !important;
}

/* Paginación específica */
.dataTables_wrapper .dataTables_paginate .pagination {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 0.25rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    justify-content: flex-end !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item {
    display: inline-block !important;
    margin: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--light-gray) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-link:hover {
    background: rgba(0, 255, 140, 0.1) !important;
    color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    transform: translateY(-1px) !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link {
    background: var(--primary-green) !important;
    color: var(--black) !important;
    border-color: var(--primary-green) !important;
    font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_paginate .pagination .page-item.disabled .page-link {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--light-gray) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    transform: none !important;
}

.dataTables_scroll {
    position: relative;
}

.dataTables_scrollHead {
    background: var(--dark-gray);
}

.dataTables_scrollHead thead th {
    position: relative;
    background: var(--dark-gray) !important;
    border-bottom: 2px solid var(--primary-green) !important;
}

.dataTables_scrollBody {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Asegurar que los headers tengan el mismo ancho que el cuerpo */
.dataTables_scrollHeadInner {
    width: 100% !important;
}

.dataTables_scrollHeadInner table {
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Forzar el mismo ancho en headers y body */
table.dataTable {
    width: 100% !important;
}

/* Corrección específica para cuando hay scroll horizontal */
.DTFC_ScrollWrapper {
    overflow: hidden !important;
}

.DTFC_LeftBodyLiner,
.DTFC_RightBodyLiner {
    top: 0 !important;
}

/* Responsive para paginación */
@media (max-width: 768px) {
    .dataTables_wrapper .row {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .dataTables_wrapper .row .col-md-6 {
        max-width: 100% !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .dataTables_wrapper .dataTables_length {
        text-align: center !important;
    }
    
    .dataTables_wrapper .dataTables_length label {
        justify-content: center !important;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        text-align: center !important;
    }
    
    .dataTables_wrapper .dataTables_paginate .pagination {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .dataTables_wrapper .dataTables_paginate .pagination .page-link {
        min-width: 36px !important;
        height: 36px !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .dataTables_wrapper .dataTables_paginate .pagination .page-link {
        min-width: 32px !important;
        height: 32px !important;
        padding: 0.3rem 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    .dataTables_wrapper .dataTables_length label {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }
}


/* Estilos para estados del formulario */
.form-control.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.form-control.success {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 2px rgba(0, 255, 140, 0.2) !important;
}

/* Animación de loading mejorada */
.btn-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Mensajes de error específicos por campo */
.field-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* ===== CORRECCIÓN SCROLL HORIZONTAL DATATABLES MÓVIL ===== */
@media (max-width: 575px) {
    .table-container {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    .dataTables_wrapper {
        min-width: 800px; /* Forzar un ancho mínimo mayor */
    }
    
    .dataTables_scroll {
        min-width: 800px;
        overflow-x: auto !important;
    }
    
    .dataTables_scrollBody {
        min-width: 800px;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    #requestsTable {
        min-width: 800px !important;
        width: auto !important;
    }
    
    /* Headers también deben scroll */
    .dataTables_scrollHead {
        min-width: 800px;
        overflow-x: hidden !important;
    }
    
    .dataTables_scrollHeadInner {
        min-width: 800px !important;
        width: auto !important;
    }
    
    .dataTables_scrollHeadInner table {
        min-width: 800px !important;
        width: auto !important;
    }
    
    /* Indicador visual para scroll horizontal */
    .table-container::before {
        content: "← Desliza horizontalmente →";
        position: sticky;
        left: 0;
        bottom: 10px;
        background: var(--primary-green);
        color: var(--black);
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        z-index: 10;
        margin: 10px auto;
        display: block;
        text-align: center;
        width: fit-content;
        animation: pulse-indicator 2s infinite;
    }
}

/* Animación para el indicador */
@keyframes pulse-indicator {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ===== Datalist  ===== */
/* Estilos para inputs con botón de limpiar */
.datalist-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.clear-selection {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    z-index: 10;
    display: none;
    transition: color 0.2s ease;
}

.clear-selection:hover {
    color: #666;
    background-color: rgba(0,0,0,0.05);
    border-radius: 50%;
}

.clear-selection.visible {
    display: block;
}

/* Ajustar padding del input para el botón */
.datalist-container .form-control {
    padding-right: 35px !important;
}

/* ===== SWITCH REUTILIZABLE ===== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-green);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ===== SECCIÓN CREACIÓN DE USUARIO - REUTILIZABLE ===== */
.usuario-section {
    border-top: 2px solid var(--primary-green);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.usuario-section .section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.usuario-section h4 {
    color: var(--primary-green);
    margin: 0;
    font-size: 1.1rem;
}

.campos-usuario {
    display: none;
    background: rgba(0, 255, 140, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 140, 0.2);
}

/* Estilos para campos de usuario en modo edición */
input[readonly] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.user-info-text {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #ffc107;
}

.user-info-text i {
    margin-right: 5px;
}

/* Estilos para modo edición con usuario existente */
.usuario-section.edicion-con-usuario .switch {
    display: none !important;
}

.usuario-section.edicion-con-usuario .campos-usuario {
    display: block !important;
    margin-top: 1rem;
}

/* ===== SISTEMA DE SUBIDA DE IMÁGENES GLOBAL ===== */
.image-upload-section {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.image-upload-section:hover {
    border-color: var(--primary-green);
}

.drop-zone {
    text-align: center;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.drop-zone:hover {
    background-color: rgba(0, 255, 140, 0.05);
}

.drop-zone.dragover {
    background-color: rgba(0, 255, 140, 0.1);
    border-color: var(--primary-green);
}

.drop-zone i {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--light-gray);
    margin-bottom: 1rem;
}

.image-preview, .existing-images {
    margin-top: 1.5rem;
}

.image-preview h4, .existing-images h4 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.preview-grid, .images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-item, .existing-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.preview-item:hover, .existing-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 140, 0.2);
}

.preview-item img, .existing-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.remove-btn, .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.remove-btn:hover, .delete-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* Photo Preview Global */
.photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px dashed var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 255, 140, 0.05);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-preview .placeholder {
    color: var(--primary-green);
    font-size: 2rem;
}

.photo-preview.has-image .placeholder {
    display: none;
}

.photo-preview.has-image img {
    display: block;
}

/* ===== COMPONENTES UI REUTILIZABLES ===== */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    color: var(--primary-green);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Botones de acción */
.action-buttons {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.btn-view { @extend .bg-info-light, .border-info-light, .text-info; }
.btn-edit { @extend .bg-success-light, .border-success-light, .text-success; }
.btn-delete { @extend .bg-danger-light, .border-danger-light, .text-danger; }
.btn-history { @extend .bg-warning-light, .border-warning-light, .text-warning; }
.btn-assign { @extend .bg-warning-light, .border-warning-light, .text-warning; }

.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Badges de estado unificados */
.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-active, .status-Activo { @extend .badge-success; }
.status-inactive, .status-Baja { @extend .badge-secondary; }
.status-pending { @extend .badge-warning; }
.status-in-progress { @extend .badge-info; }
.status-completed { @extend .badge-success; }
.status-cancelled { @extend .badge-danger; }
.status-scheduled { @extend .badge-secondary; }

/* Badges de prioridad */
.priority-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high { @extend .badge-danger; }
.priority-medium { @extend .badge-warning; }
.priority-low { @extend .badge-info; }

/* Badges de tipo */
.type-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.type-corporate { @extend .badge-info; }
.type-business { 
    background: rgba(111, 66, 193, 0.2) !important;
    color: #6f42c1 !important;
    border: 1px solid rgba(111, 66, 193, 0.3) !important;
}
.type-individual { @extend .badge-success; }

/* Avatares */
.client-avatar, .colaborador-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 140, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-size: 1rem;
    font-weight: 600;
}

.colaborador-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 255, 140, 0.3);
}

/* Información de contacto */
.contact-info {
    font-size: 0.8rem;
    color: var(--light-gray);
}

.contact-info .email {
    color: var(--primary-green);
}

/* ===== ESTILOS BASE DATATABLES - UNIFICADOS ===== */
.dataTables_wrapper {
    background: var(--dark-gray);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 140, 0.1);
    overflow: hidden;
    padding: 1rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--light-gray) !important;
    padding: 0.5rem 0;
}

.dataTables_wrapper .dataTables_filter input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
    color: var(--white) !important;
    padding: 0.5rem 1rem !important;
    margin-left: 0.5rem !important;
}

.dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
    color: var(--white) !important;
    padding: 0.3rem 0.5rem !important;
    margin: 0 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--light-gray) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
    margin: 0 2px !important;
    padding: 0.5rem 0.75rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-green) !important;
    color: var(--black) !important;
    border-color: var(--primary-green) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(0, 255, 140, 0.1) !important;
    color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
}

.dataTables_wrapper table.dataTable {
    border-collapse: collapse !important;
    margin: 1rem 0 !important;
    border: 1px solid rgba(0, 255, 140, 0.1) !important;
}

.dataTables_wrapper table.dataTable thead th {
    background: rgba(0, 255, 140, 0.05) !important;
    color: var(--primary-green) !important;
    border-bottom: 2px solid rgba(0, 255, 140, 0.1) !important;
    padding: 1rem !important;
    font-weight: 600;
}

.dataTables_wrapper table.dataTable tbody td {
    background: transparent !important;
    color: var(--light-gray) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1rem !important;
}

.dataTables_wrapper table.dataTable tbody tr:hover td {
    background: rgba(0, 255, 140, 0.02) !important;
}

/* ===== RESPONSIVE UNIFICADO ===== */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: left !important;
        margin-bottom: 1rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-icon {
        width: 100%;
        justify-content: flex-start;
        padding: 0.5rem 0.75rem;
    }
    
    /* Scroll horizontal forzado para tablas en móvil */
    .table-container {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    .dataTables_wrapper {
        min-width: 800px;
    }
    
    .dataTables_scroll {
        min-width: 800px;
        overflow-x: auto !important;
    }
}

/* ===== VISOR DE IMÁGENES - IMAGE MANAGER ===== */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-viewer-overlay.active {
    display: flex;
    opacity: 1;
}

.image-viewer-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--dark-gray);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-green);
}

.image-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.image-viewer-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.image-viewer-close {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.image-viewer-close:hover {
    background: var(--primary-green);
    color: var(--black);
    transform: scale(1.1);
}

.image-viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 1rem;
}

.image-viewer-slide {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.image-viewer-slide.active {
    display: flex;
}

.image-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    transform-origin: center center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Estado de zoom activo */
.image-viewer-content.zooming {
    cursor: move;
}

/* Prevenir selección de texto durante zoom */
.image-viewer-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Botón de reset zoom */
#imageViewerResetZoom {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    margin-left: 1rem;
}

#imageViewerResetZoom:hover {
    background: var(--primary-green);
    color: var(--black);
    transform: scale(1.1);
}

/* Indicador visual de zoom */
.image-viewer-image.zoomed {
    cursor: grab;
}

.image-viewer-image.zoomed:active {
    cursor: grabbing;
}

.image-viewer-controls {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 10;
}

.image-viewer-nav {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

.image-viewer-nav:hover {
    background: var(--primary-green);
    color: var(--black);
    transform: scale(1.1);
}

.image-viewer-counter {
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.image-viewer-thumbnails {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.image-viewer-thumbnails::-webkit-scrollbar {
    display: none;
}

.image-viewer-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.image-viewer-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.image-viewer-thumbnail.active {
    opacity: 1;
    border-color: var(--primary-green);
    transform: scale(1.1);
}

.image-viewer-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animaciones para el visor */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-viewer-slide[data-direction="next"] {
    animation: slideInFromRight 0.3s ease;
}

.image-viewer-slide[data-direction="prev"] {
    animation: slideInFromLeft 0.3s ease;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .image-viewer-container {
        width: 95%;
        height: 95%;
        border-radius: 10px;
    }
    
    .image-viewer-header {
        padding: 0.8rem 1rem;
    }
    
    .image-viewer-title {
        font-size: 1rem;
    }
    
    .image-viewer-close {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .image-viewer-nav {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .image-viewer-controls {
        bottom: 1.5rem;
        gap: 1rem;
    }
    
    .image-viewer-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .image-viewer-content {
        padding: 3.5rem 0.5rem 0.5rem;
    }
    
    .image-viewer-image {
        -webkit-user-drag: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    #imageViewerResetZoom {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .image-viewer-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
    
    .image-viewer-thumbnails {
        bottom: 0.5rem;
    }
    
    .image-viewer-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .image-viewer-controls {
        bottom: 1rem;
    }
    
    .image-viewer-nav {
        width: 40px;
        height: 40px;
    }
    
    #imageViewerResetZoom {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-left: 0.5rem;
    }
}

/* ===== SISTEMA DE FILTROS REUTILIZABLE ===== */
.filtros-section {
    background: var(--dark-gray);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 140, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.filtros-container {
    padding: 1.5rem;
}

.filtros-container h3 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.filtros-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filtro-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filtro-group label {
    color: var(--light-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.filtro-group input,
.filtro-group select {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.filtro-group input:focus,
.filtro-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 140, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.filtro-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Botones de filtros */
.filtros-form .btn {
    margin-top: 1.5rem;
}

/* Responsive para filtros */
@media (max-width: 768px) {
    .filtros-form {
        grid-template-columns: 1fr;
    }
    
    .filtros-container {
        padding: 1rem;
    }
    
    .filtros-container h3 {
        font-size: 1.1rem;
    }
}