/* Tema claro mejorado con transparencias y animaciones */
:root {
    --primary: #dc2626 !important;
    --primary-dark: #b91c1c !important;
    --primary-light: #fecaca !important;
    --bg: #ffffff !important;
    --bg-secondary: #f8fafc !important;
    --bg-tertiary: #f1f5f9 !important;
    --panel: rgba(255, 255, 255, 0.9) !important;
    --panel-2: rgba(248, 250, 252, 0.9) !important;
    --text: #1e293b !important;
    --text-light: #64748b !important;
    --text-muted: #94a3b8 !important;
    --border: rgba(220, 38, 38, 0.1) !important;
    --border-dark: rgba(220, 38, 38, 0.2) !important;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Aplicar tema claro a todo el sistema */
body {
    background: linear-gradient(135deg, var(--bg), var(--bg-secondary)) !important;
    color: var(--text) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    min-height: 100vh;
}

/* Contenedores principales con transparencia */
.admin-container,
.client-container,
#home,
.main-container,
.content-wrapper,
.app {
    background: transparent !important;
}

/* Cards con efecto glassmorphism */
.card,
[class*="card"],
.service-card,
.feature-card,
.testimonial-card,
.product-card,
.dashboard-card,
.auth-card,
.promo-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Efecto de borde luminoso en hover */
.card::before,
[class*="card"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(220,38,38,0.3), rgba(220,38,38,0.1), rgba(220,38,38,0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before,
[class*="card"]:hover::before {
    opacity: 1;
}

.card:hover,
[class*="card"]:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow:
        0 20px 40px rgba(220, 38, 38, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
}

/* Header con efecto glass */
.header,
.topbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Botones con gradiente y animación */
.btn,
button,
.button,
input[type=submit],
input[type=button] {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 24px !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.btn::after,
button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after,
button:hover::after {
    width: 300px;
    height: 300px;
}

.btn:hover,
button:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 15px 30px rgba(220, 38, 38, 0.4) !important;
}

/* Inputs con efecto de focus */
.input,
input,
select,
textarea {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(220, 38, 38, 0.1) !important;
    color: var(--text) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.input:focus,
input:focus,
select:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--primary) !important;
    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.05) !important;
    transform: scale(1.02) !important;
}

/* Tablas con diseño moderno */
.table {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
}

.table thead th {
    background: linear-gradient(135deg, rgba(220,38,38,0.1), rgba(220,38,38,0.05)) !important;
    color: var(--text) !important;
    border-bottom: 2px solid var(--primary) !important;
    font-weight: 700 !important;
    padding: 16px 12px !important;
}

.table tbody tr {
    transition: all 0.3s ease !important;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1) !important;
}

.table tbody tr:hover {
    background: rgba(220, 38, 38, 0.05) !important;
    transform: scale(1.01) !important;
}

/* Footer con transparencia */
.footer-v2 {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.9)) !important;
    backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(220,38,38,0.1) !important;
}

.footer-v2-main {
    background: transparent !important;
}

/* Efectos de animación globales */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out !important;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Efecto de partículas para elementos importantes */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), transparent, var(--primary));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
    opacity: 1;
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Badges modernos */
.badge, .pill {
    background: linear-gradient(135deg, var(--primary-light), rgba(220,38,38,0.1)) !important;
    color: var(--primary-dark) !important;
    border: 1px solid rgba(220,38,38,0.2) !important;
    border-radius: 20px !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    backdrop-filter: blur(10px) !important;
}

/* Modal con efecto glass */
.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(30px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* Efecto de carga mejorado */
.loading-spinner {
    border: 3px solid rgba(220,38,38,0.1) !important;
    border-top: 3px solid var(--primary) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    animation: spin 1s linear infinite !important;
    box-shadow: 0 0 20px rgba(220,38,38,0.2) !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .card,
    [class*="card"] {
        padding: 1.5rem !important;
        margin: 10px !important;
    }

    .btn,
    button {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* Utilidades de animación */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-spin {
    animation: spin 1s linear infinite;
}