/* Base Theme (Purple - Default) */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
/* Eliminado: .tab-btn.active { background-color: #7c3aed; color: white; } */
.text-primary { color: #7c3aed; }
.bg-primary { background-color: #7c3aed; }
.hover\:bg-primary-dark:hover { background-color: #6d28d9; } /* purple-700 */
.focus\:ring-primary:focus { --tw-ring-color: #7c3aed; }



/* Theme Sunset - Degradado multicolor */
.theme-sunset {
    --primary-color: #ff6b6b;
    --primary-dark: #ee5a52;
    --primary-light: #ffa8a8;
    --primary-bg: #fff5f5;
    --primary-color-rgb: 255, 107, 107;
}
.theme-sunset .gradient-bg, .theme-sunset {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 50%, #ff1493 100%);
}
.theme-sunset .text-primary { color: #ee5a52; }
.theme-sunset .bg-primary { background-color: #ee5a52; }
.theme-sunset .hover\:bg-primary-dark:hover { background-color: #dc2626; }
.theme-sunset .focus\:ring-primary:focus { --tw-ring-color: #ee5a52; }

/* Theme Ocean - Degradado azul profundo */
.theme-ocean {
    --primary-color: #0077be;
    --primary-dark: #005a8b;
    --primary-light: #4da6d9;
    --primary-bg: #f0f9ff;
    --primary-color-rgb: 0, 119, 190;
}
.theme-ocean .gradient-bg, .theme-ocean {
    background: linear-gradient(135deg, #0077be 0%, #00bcd4 50%, #004d7a 100%);
}
.theme-ocean .text-primary { color: #005a8b; }
.theme-ocean .bg-primary { background-color: #005a8b; }
.theme-ocean .hover\:bg-primary-dark:hover { background-color: #003d5c; }
.theme-ocean .focus\:ring-primary:focus { --tw-ring-color: #005a8b; }

/* Theme Forest - Degradado verde natural */
.theme-forest {
    --primary-color: #228b22;
    --primary-dark: #006400;
    --primary-light: #90ee90;
    --primary-bg: #f0fff0;
    --primary-color-rgb: 34, 139, 34;
}
.theme-forest .gradient-bg, .theme-forest {
    background: linear-gradient(135deg, #228b22 0%, #32cd32 50%, #006400 100%);
}
.theme-forest .text-primary { color: #006400; }
.theme-forest .bg-primary { background-color: #006400; }
.theme-forest .hover\:bg-primary-dark:hover { background-color: #004d00; }
.theme-forest .focus\:ring-primary:focus { --tw-ring-color: #006400; }

/* Theme Galaxy - Degradado espacial */
.theme-galaxy {
    --primary-color: #4b0082;
    --primary-dark: #2e0054;
    --primary-light: #9370db;
    --primary-bg: #f8f4ff;
    --primary-color-rgb: 75, 0, 130;
}
.theme-galaxy .gradient-bg, .theme-galaxy {
    background: linear-gradient(135deg, #4b0082 0%, #8a2be2 30%, #9400d3 70%, #2e0054 100%);
}
.theme-galaxy .text-primary { color: #2e0054; }
.theme-galaxy .bg-primary { background-color: #2e0054; }
.theme-galaxy .hover\:bg-primary-dark:hover { background-color: #1a0030; }
.theme-galaxy .focus\:ring-primary:focus { --tw-ring-color: #2e0054; }

/* Theme Fire - Degradado de fuego */
.theme-fire {
    --primary-color: #ff4500;
    --primary-dark: #dc2626;
    --primary-light: #ffa500;
    --primary-bg: #fff7ed;
    --primary-color-rgb: 255, 69, 0;
}
.theme-fire .gradient-bg, .theme-fire {
    background: linear-gradient(135deg, #ff4500 0%, #ff6347 25%, #ffa500 50%, #dc2626 100%);
}
.theme-fire .text-primary { color: #dc2626; }
.theme-fire .bg-primary { background-color: #dc2626; }
.theme-fire .hover\:bg-primary-dark:hover { background-color: #b91c1c; }
.theme-fire .focus\:ring-primary:focus { --tw-ring-color: #dc2626; }

/* Theme Aurora - Degradado aurora boreal */
.theme-aurora {
    --primary-color: #00ff7f;
    --primary-dark: #00cc66;
    --primary-light: #98fb98;
    --primary-bg: #f0fff4;
    --primary-color-rgb: 0, 255, 127;
}
.theme-aurora .gradient-bg, .theme-aurora {
    background: linear-gradient(135deg, #00ff7f 0%, #00bfff 30%, #9370db 60%, #ff69b4 100%);
}
.theme-aurora .text-primary { color: #00cc66; }
.theme-aurora .bg-primary { background-color: #00cc66; }
.theme-aurora .hover\:bg-primary-dark:hover { background-color: #009952; }
.theme-aurora .focus\:ring-primary:focus { --tw-ring-color: #00cc66; }

/* Theme Neon - Degradado neón */
.theme-neon {
    --primary-color: #00ffff;
    --primary-dark: #00cccc;
    --primary-light: #7fffd4;
    --primary-bg: #f0ffff;
    --primary-color-rgb: 0, 255, 255;
}
.theme-neon .gradient-bg, .theme-neon {
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 50%, #ffff00 100%);
}
.theme-neon .text-primary { color: #00cccc; }
.theme-neon .bg-primary { background-color: #00cccc; }
.theme-neon .hover\:bg-primary-dark:hover { background-color: #009999; }
.theme-neon .focus\:ring-primary:focus { --tw-ring-color: #00cccc; }

/* Theme Royal - Degradado real */
.theme-royal {
    --primary-color: #4169e1;
    --primary-dark: #191970;
    --primary-light: #6495ed;
    --primary-bg: #f0f8ff;
    --primary-color-rgb: 65, 105, 225;
}
.theme-royal .gradient-bg, .theme-royal {
    background: linear-gradient(135deg, #4169e1 0%, #8a2be2 50%, #191970 100%);
}
.theme-royal .text-primary { color: #191970; }
.theme-royal .bg-primary { background-color: #191970; }
.theme-royal .hover\:bg-primary-dark:hover { background-color: #0f0f47; }
.theme-royal .focus\:ring-primary:focus { --tw-ring-color: #191970; }

/* Theme Tropical - Degradado tropical */
.theme-tropical {
    --primary-color: #ff6347;
    --primary-dark: #ff4500;
    --primary-light: #ffa07a;
    --primary-bg: #fff8dc;
    --primary-color-rgb: 255, 99, 71;
}
.theme-tropical .gradient-bg, .theme-tropical {
    background: linear-gradient(135deg, #ff6347 0%, #ffa500 30%, #32cd32 70%, #00ced1 100%);
}
.theme-tropical .text-primary { color: #ff4500; }
.theme-tropical .bg-primary { background-color: #ff4500; }
.theme-tropical .hover\:bg-primary-dark:hover { background-color: #dc2626; }
.theme-tropical .focus\:ring-primary:focus { --tw-ring-color: #ff4500; }

/* Theme Midnight - Degradado medianoche */
.theme-midnight {
    --primary-color: #2c3e50;
    --primary-dark: #1a252f;
    --primary-light: #34495e;
    --primary-bg: #f8f9fa;
    --primary-color-rgb: 44, 62, 80;
}
.theme-midnight .gradient-bg, .theme-midnight {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%);
}
.theme-midnight .text-primary { color: #1a252f; }
.theme-midnight .bg-primary { background-color: #1a252f; }
.theme-midnight .hover\:bg-primary-dark:hover { background-color: #0d1117; }
.theme-midnight .focus\:ring-primary:focus { --tw-ring-color: #1a252f; }

/* Theme Cosmic - Degradado cósmico */
.theme-cosmic {
    --primary-color: #8b00ff;
    --primary-dark: #4b0082;
    --primary-light: #9932cc;
    --primary-bg: #f8f0ff;
    --primary-color-rgb: 139, 0, 255;
}
.theme-cosmic .gradient-bg, .theme-cosmic {
    background: linear-gradient(135deg, #8b00ff 0%, #ff1493 25%, #00bfff 50%, #ffd700 75%, #8b00ff 100%);
}
.theme-cosmic .text-primary { color: #4b0082; }
.theme-cosmic .bg-primary { background-color: #4b0082; }
.theme-cosmic .hover\:bg-primary-dark:hover { background-color: #2e0054; }
.theme-cosmic .focus\:ring-primary:focus { --tw-ring-color: #4b0082; }

/* Theme Volcano - Degradado volcánico */
.theme-volcano {
    --primary-color: #ff4500;
    --primary-dark: #8b0000;
    --primary-light: #ff6347;
    --primary-bg: #fff5ee;
    --primary-color-rgb: 255, 69, 0;
}
.theme-volcano .gradient-bg, .theme-volcano {
    background: linear-gradient(135deg, #8b0000 0%, #dc143c 30%, #ff4500 60%, #ffa500 90%, #ffff00 100%);
}
.theme-volcano .text-primary { color: #8b0000; }
.theme-volcano .bg-primary { background-color: #8b0000; }
.theme-volcano .hover\:bg-primary-dark:hover { background-color: #660000; }
.theme-volcano .focus\:ring-primary:focus { --tw-ring-color: #8b0000; }

/* Theme Prism - Degradado prisma */
.theme-prism {
    --primary-color: #ff0080;
    --primary-dark: #cc0066;
    --primary-light: #ff66b3;
    --primary-bg: #fff0f8;
    --primary-color-rgb: 255, 0, 128;
}
.theme-prism .gradient-bg, .theme-prism {
    background: linear-gradient(135deg, #ff0080 0%, #8000ff 20%, #0080ff 40%, #00ff80 60%, #80ff00 80%, #ff8000 100%);
}
.theme-prism .text-primary { color: #cc0066; }
.theme-prism .bg-primary { background-color: #cc0066; }
.theme-prism .hover\:bg-primary-dark:hover { background-color: #990050; }
.theme-prism .focus\:ring-primary:focus { --tw-ring-color: #cc0066; }

/* Theme Nebula - Degradado nebulosa */
.theme-nebula {
    --primary-color: #9400d3;
    --primary-dark: #4b0082;
    --primary-light: #ba55d3;
    --primary-bg: #f5f0ff;
    --primary-color-rgb: 148, 0, 211;
}
.theme-nebula .gradient-bg, .theme-nebula {
    background: linear-gradient(135deg, #000428 0%, #004e92 30%, #9400d3 60%, #ff1493 90%, #ffd700 100%);
}
.theme-nebula .text-primary { color: #4b0082; }
.theme-nebula .bg-primary { background-color: #4b0082; }
.theme-nebula .hover\:bg-primary-dark:hover { background-color: #2e0054; }
.theme-nebula .focus\:ring-primary:focus { --tw-ring-color: #4b0082; }

/* Theme Crystal - Degradado cristal */
.theme-crystal {
    --primary-color: #00ced1;
    --primary-dark: #008b8b;
    --primary-light: #48d1cc;
    --primary-bg: #f0ffff;
    --primary-color-rgb: 0, 206, 209;
}
.theme-crystal .gradient-bg, .theme-crystal {
    background: linear-gradient(135deg, #e0f6ff 0%, #87ceeb 25%, #00ced1 50%, #4682b4 75%, #191970 100%);
}
.theme-crystal .text-primary { color: #008b8b; }
.theme-crystal .bg-primary { background-color: #008b8b; }
.theme-crystal .hover\:bg-primary-dark:hover { background-color: #006666; }
.theme-crystal .focus\:ring-primary:focus { --tw-ring-color: #008b8b; }

/* Theme Phoenix - Degradado fénix */
.theme-phoenix {
    --primary-color: #ff6600;
    --primary-dark: #cc3300;
    --primary-light: #ff9933;
    --primary-bg: #fff8f0;
    --primary-color-rgb: 255, 102, 0;
}
.theme-phoenix .gradient-bg, .theme-phoenix {
    background: linear-gradient(135deg, #8b0000 0%, #dc143c 20%, #ff4500 40%, #ffa500 60%, #ffff00 80%, #ff69b4 100%);
}
.theme-phoenix .text-primary { color: #cc3300; }
.theme-phoenix .bg-primary { background-color: #cc3300; }
.theme-phoenix .hover\:bg-primary-dark:hover { background-color: #990000; }
.theme-phoenix .focus\:ring-primary:focus { --tw-ring-color: #cc3300; }

/* Theme Matrix - Degradado matrix */
.theme-matrix {
    --primary-color: #00ff41;
    --primary-dark: #00cc33;
    --primary-light: #66ff66;
    --primary-bg: #f0fff0;
    --primary-color-rgb: 0, 255, 65;
}
.theme-matrix .gradient-bg, .theme-matrix {
    background: linear-gradient(135deg, #000000 0%, #003300 30%, #00ff41 60%, #66ff66 80%, #000000 100%);
}
.theme-matrix .text-primary { color: #00cc33; }
.theme-matrix .bg-primary { background-color: #00cc33; }
.theme-matrix .hover\:bg-primary-dark:hover { background-color: #009926; }
.theme-matrix .focus\:ring-primary:focus { --tw-ring-color: #00cc33; }

/* Theme Plasma - Degradado plasma */
.theme-plasma {
    --primary-color: #ff0099;
    --primary-dark: #cc0077;
    --primary-light: #ff33aa;
    --primary-bg: #fff0f7;
    --primary-color-rgb: 255, 0, 153;
}
.theme-plasma .gradient-bg, .theme-plasma {
    background: linear-gradient(135deg, #ff0099 0%, #ff6600 25%, #ffff00 50%, #00ff99 75%, #0099ff 100%);
}
.theme-plasma .text-primary { color: #cc0077; }
.theme-plasma .bg-primary { background-color: #cc0077; }
.theme-plasma .hover\:bg-primary-dark:hover { background-color: #990055; }
.theme-plasma .focus\:ring-primary:focus { --tw-ring-color: #cc0077; }

/* Theme Hologram - Degradado holograma */
.theme-hologram {
    --primary-color: #00ffff;
    --primary-dark: #00cccc;
    --primary-light: #66ffff;
    --primary-bg: #f0ffff;
    --primary-color-rgb: 0, 255, 255;
}
.theme-hologram .gradient-bg, .theme-hologram {
    background: linear-gradient(135deg, #00ffff 0%, #ff00ff 20%, #ffff00 40%, #00ff00 60%, #0000ff 80%, #ff0000 100%);
}
.theme-hologram .text-primary { color: #00cccc; }
.theme-hologram .bg-primary { background-color: #00cccc; }
.theme-hologram .hover\:bg-primary-dark:hover { background-color: #009999; }
.theme-hologram .focus\:ring-primary:focus { --tw-ring-color: #00cccc; }

/* Theme Supernova - Degradado supernova */
.theme-supernova {
    --primary-color: #ffff00;
    --primary-dark: #cccc00;
    --primary-light: #ffff66;
    --primary-bg: #fffff0;
    --primary-color-rgb: 255, 255, 0;
}
.theme-supernova .gradient-bg, .theme-supernova {
    background: linear-gradient(135deg, #ffffff 0%, #ffff00 20%, #ff6600 40%, #ff0000 60%, #8b0000 80%, #000000 100%);
}
.theme-supernova .text-primary { color: #cccc00; }
.theme-supernova .bg-primary { background-color: #cccc00; }
.theme-supernova .hover\:bg-primary-dark:hover { background-color: #999900; }
.theme-supernova .focus\:ring-primary:focus { --tw-ring-color: #cccc00; }

/* Theme Quantum - Degradado cuántico */
.theme-quantum {
    --primary-color: #8a2be2;
    --primary-dark: #4b0082;
    --primary-light: #9370db;
    --primary-bg: #f8f0ff;
    --primary-color-rgb: 138, 43, 226;
}
.theme-quantum .gradient-bg, .theme-quantum {
    background: linear-gradient(135deg, #000080 0%, #4b0082 25%, #8a2be2 50%, #ff1493 75%, #00bfff 100%);
}
.theme-quantum .text-primary { color: #4b0082; }
.theme-quantum .bg-primary { background-color: #4b0082; }
.theme-quantum .hover\:bg-primary-dark:hover { background-color: #2e0054; }
.theme-quantum .focus\:ring-primary:focus { --tw-ring-color: #4b0082; }

/* Theme Spectrum - Degradado espectro */
.theme-spectrum {
    --primary-color: #ff4500;
    --primary-dark: #cc3300;
    --primary-light: #ff6633;
    --primary-bg: #fff5f0;
    --primary-color-rgb: 255, 69, 0;
}
.theme-spectrum .gradient-bg, .theme-spectrum {
    background: linear-gradient(135deg, #ff0000 0%, #ff8000 14%, #ffff00 28%, #80ff00 42%, #00ff00 56%, #00ff80 70%, #00ffff 84%, #0080ff 100%);
}
.theme-spectrum .text-primary { color: #cc3300; }
.theme-spectrum .bg-primary { background-color: #cc3300; }
.theme-spectrum .hover\:bg-primary-dark:hover { background-color: #990000; }
.theme-spectrum .focus\:ring-primary:focus { --tw-ring-color: #cc3300; }

/* Theme Dimension - Degradado dimensional */
.theme-dimension {
    --primary-color: #663399;
    --primary-dark: #330066;
    --primary-light: #9966cc;
    --primary-bg: #f5f0ff;
    --primary-color-rgb: 102, 51, 153;
}
.theme-dimension .gradient-bg, .theme-dimension {
    background: linear-gradient(135deg, #000000 0%, #330066 20%, #663399 40%, #9966cc 60%, #cc99ff 80%, #ffffff 100%);
}
.theme-dimension .text-primary { color: #330066; }
.theme-dimension .bg-primary { background-color: #330066; }
.theme-dimension .hover\:bg-primary-dark:hover { background-color: #1a0033; }
.theme-dimension .focus\:ring-primary:focus { --tw-ring-color: #330066; }

/* Theme Infinity - Degradado infinito */
.theme-infinity {
    --primary-color: #4169e1;
    --primary-dark: #191970;
    --primary-light: #6495ed;
    --primary-bg: #f0f8ff;
    --primary-color-rgb: 65, 105, 225;
}
.theme-infinity .gradient-bg, .theme-infinity {
    background: linear-gradient(135deg, #191970 0%, #4169e1 15%, #00bfff 30%, #00ffff 45%, #00ff7f 60%, #ffff00 75%, #ff69b4 90%, #8a2be2 100%);
}
.theme-infinity .text-primary { color: #191970; }
.theme-infinity .bg-primary { background-color: #191970; }
.theme-infinity .hover\:bg-primary-dark:hover { background-color: #0f0f47; }
.theme-infinity .focus\:ring-primary:focus { --tw-ring-color: #191970; }

/* Modern Statistics Animations */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.counter-animation {
    transition: all 0.5s ease;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animation.animate {
    animation: countUp 0.8s ease-out;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width);
    }
}

.progress-animated {
    animation: progressFill 1.5s ease-out;
}

/* Chart Container Styles */
#platformChart, #statusChart {
    position: relative;
}

#platformChart canvas, #statusChart canvas {
    max-width: 100%;
    height: auto;
}

/* Legend Styles */
#platformLegend .legend-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

#platformLegend .legend-item:hover {
    background-color: #f3f4f6;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 8px;
    flex-shrink: 0;
}

.legend-text {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.legend-value {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: auto;
}

/* Efficiency Stars */
.star {
    color: #d1d5db;
    transition: color 0.2s ease;
}

.star.filled {
    color: #fbbf24;
}

.star.half-filled {
    background: linear-gradient(90deg, #fbbf24 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Chart Loading */
.chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6b7280;
}

.chart-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* Variables globales para modo oscuro */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --input-bg: #ffffff;
}



/* Common Styles */
.card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.card-hover:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.15), 0 15px 15px -5px rgba(0, 0, 0, 0.08);
}

.card-hover:hover::before {
    left: 100%;
}

.notification {
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideIn {
    from {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.bounceIn {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.platform-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.expired {
    border-left: 4px solid #ef4444; /* red-500 */
}

.expiring-soon {
    border-left: 4px solid #f59e0b; /* yellow-500 */
}

.active {
    border-left: 4px solid #10b981; /* green-500 */
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.password-hidden {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

.password-hidden:hover {
    filter: none;
}

.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

/* Login Screen */
#loginScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Same as header */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
#loginScreen.hidden {
    display: none;
}

/* Tipografía mejorada */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Theme Toggle Styles for Login */
.theme-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-track {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-toggle.dark .theme-toggle-track {
    background: linear-gradient(135deg, #374151, #1f2937);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle.dark .theme-toggle-thumb {
    transform: translateX(30px);
    background: #1f2937;
}

.theme-icon {
    width: 14px;
    height: 14px;
    transition: all 0.3s ease;
}

.sun-icon {
    color: #f59e0b;
    opacity: 1;
}

.moon-icon {
    color: #e5e7eb;
    opacity: 0;
    position: absolute;
}

.theme-toggle.dark .sun-icon {
    opacity: 0;
}

.theme-toggle.dark .moon-icon {
    opacity: 1;
}

.theme-toggle-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.theme-toggle:hover .theme-toggle-track {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.theme-toggle:hover .theme-toggle-thumb {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Dark mode styles for login screen */
body.dark-mode #loginScreen {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

body.dark-mode #loginScreen .bg-white {
    background-color: #374151 !important;
    color: white;
}

body.dark-mode #loginScreen input {
    background-color: #4b5563;
    border-color: #6b7280;
    color: white;
}

body.dark-mode #loginScreen input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

body.dark-mode #loginScreen .text-gray-600 {
    color: #d1d5db !important;
}

body.dark-mode #loginScreen .text-purple-600 {
    color: #a78bfa !important;
}

body.dark-mode #loginScreen .hover\:text-purple-800:hover {
    color: #8b5cf6 !important;
}
    font-weight: 700;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heading-xl {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.heading-lg {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.heading-md {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Responsive adjustments for tabs */
.tab-btn {
    min-width: 0; /* Allow buttons to shrink */
    font-size: 0.75rem; /* text-xs by default */
}

/* Ensure tabs wrap on small screens */
@media (max-width: 767px) { /* Tailwind's 'md' breakpoint is 768px */
    .tab-nav-container {
        flex-wrap: wrap;
        gap: 0.125rem; /* Reduced gap between buttons */
        justify-content: space-between;
    }
    .tab-btn {
        flex: 1 1 calc(33.333% - 0.125rem); /* 3 buttons per row on mobile with smaller gap */
        margin-bottom: 0.25rem; /* Reduced space between wrapped buttons */
        min-height: 3rem; /* Increased height for better touch targets */
        max-height: 3rem; /* Prevent height expansion */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.25rem 0.125rem; /* Reduced padding */
        line-height: 1;
        overflow: hidden; /* Prevent text overflow */
    }
    .tab-btn i {
        margin-bottom: 0.125rem;
        margin-right: 0 !important;
        font-size: 0.75rem; /* Smaller icon size */
        display: block;
    }
    .tab-btn span {
        font-size: 0.5rem; /* Smaller text for mobile */
        text-align: center;
        line-height: 1;
        white-space: nowrap; /* Prevent text wrapping */
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        display: block;
    }
    
    .heading-xl {
        font-size: 2rem;
    }
    
    .heading-lg {
        font-size: 1.75rem;
    }
    
    .heading-md {
        font-size: 1.25rem;
    }
    
    .card-hover:hover {
        transform: translateY(-2px) scale(1.01);
    }
}

/* Extra small screens optimization */
@media (max-width: 480px) {
    .tab-nav-container {
        gap: 0.0625rem; /* Even smaller gap for very small screens */
    }
    .tab-btn {
        flex: 1 1 calc(33.333% - 0.0625rem);
        min-height: 2.75rem;
        max-height: 2.75rem;
        padding: 0.125rem;
    }
    .tab-btn i {
        font-size: 0.625rem; /* Even smaller icons */
        margin-bottom: 0.0625rem;
    }
    .tab-btn span {
        font-size: 0.4375rem; /* Very small text for tiny screens */
    }
}

@media (min-width: 768px) {
    .tab-btn {
        font-size: 0.875rem; /* text-sm for larger screens */
    }
}

/* Iconos mejorados */
.icon-glow {
    filter: drop-shadow(0 0 8px rgba(var(--primary-color-rgb), 0.3));
    transition: filter 0.3s ease;
}

.icon-glow:hover {
    filter: drop-shadow(0 0 12px rgba(var(--primary-color-rgb), 0.5));
}

.icon-bounce {
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(360deg);
}

/* Estados de carga */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Botones mejorados */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

/* Calendar Styles */
.calendar-container {
    max-width: 100%;
    overflow-x: auto;
}

#calendarGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
}

.calendar-day {
    min-height: 80px;
    width: calc((100% - 24px) / 7);
    border: 1px solid #e5e7eb;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: white;
    box-sizing: border-box;
}

.calendar-day:hover {
    background-color: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-day.other-month {
    background-color: #f9fafb;
    color: #9ca3af;
}

.calendar-day.today {
    background-color: #ede9fe;
    border-color: #8b5cf6;
    font-weight: bold;
}

.calendar-day.has-accounts {
    border-left: 4px solid #8b5cf6;
}

.calendar-day.has-expired {
    border-left: 4px solid #ef4444;
    background-color: #fef2f2;
}

.calendar-day.has-expiring-today {
    border-left: 4px solid #eab308;
    background-color: #fefce8;
}

.calendar-day.has-expiring-soon {
    border-left: 4px solid #f97316;
    background-color: #fff7ed;
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.calendar-accounts {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.calendar-account-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.calendar-account-dot.expired {
    background-color: #ef4444;
}

.calendar-account-dot.expiring-today {
    background-color: #eab308;
}

.calendar-account-dot.expiring-soon {
    background-color: #f97316;
}

.calendar-account-dot.active {
    background-color: #10b981;
}

.calendar-account-count {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
}

/* Notification Permission Help Styles */
.notification-permission-help {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.permission-help-content {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.permission-help-content.denied {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #f39c12;
}

.permission-help-content.unsupported {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #e74c3c;
}

.help-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.help-text {
    flex: 1;
}

.help-text h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.help-text p {
    margin: 8px 0;
    color: #34495e;
    line-height: 1.5;
}

.help-text ol, .help-text ul {
    margin: 10px 0;
    padding-left: 20px;
    color: #34495e;
}

.help-text li {
    margin: 5px 0;
    line-height: 1.4;
}

.help-text strong {
    color: #2c3e50;
    font-weight: 600;
}

.help-retry-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 5px;
}

.help-retry-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.help-retry-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

/* Calendar empty cells */
.calendar-day.empty {
    background: transparent;
    border: none;
    pointer-events: none;
}

/* Responsive calendar */
@media (max-width: 640px) {
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .calendar-account-dot {
        width: 6px;
        height: 6px;
    }
    
    .permission-help-content {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .help-text h4 {
        font-size: 15px;
    }
    
    .help-text p, .help-text li {
        font-size: 14px;
    }
    
    .help-retry-btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* Dark Mode Styles */
[data-theme="dark"] {
    background-color: #1a1a1a !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .bg-white {
    background-color: #2d2d2d !important;
    color: #e5e5e5 !important;
}

[data-theme="dark"] .bg-gray-50 {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] .bg-gray-100 {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-600 {
    color: #e5e5e5 !important;
}

[data-theme="dark"] .text-gray-500 {
    color: #a0a0a0 !important;
}

[data-theme="dark"] .border-gray-300,
[data-theme="dark"] .border-gray-200 {
    border-color: #404040 !important;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: #2d2d2d !important;
    color: #e5e5e5 !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .shadow-md,
[data-theme="dark"] .shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="dark"] .hover\:bg-gray-50:hover {
    background-color: #404040 !important;
}

[data-theme="dark"] .hover\:bg-gray-100:hover {
    background-color: #404040 !important;
}

/* Dark mode toggle styles */
[data-theme="dark"] #themeToggle {
    background-color: #7c3aed !important;
}

[data-theme="dark"] #themeToggleIndicator {
    transform: translateX(1.25rem) !important;
}

[data-theme="dark"] .bg-gray-50 {
    background-color: #2d2d2d !important;
}

/* ===== ESTILOS AVANZADOS DEL LOGIN (INSPIRADOS EN PANEL DE LICENCIAS) ===== */

/* Variables CSS para temas avanzados del login */
:root {
    --login-primary-color: #667eea;
    --login-primary-dark: #764ba2;
    --login-gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    --login-card-bg: rgba(255, 255, 255, 0.95);
    --login-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --login-border-radius: 20px;
}

/* Temas del login avanzados */
.theme-sunset {
    --login-primary-color: #ff7e5f;
    --login-primary-dark: #feb47b;
    --login-gradient-bg: linear-gradient(135deg, #ff7e5f 0%, #feb47b 25%, #ff6b6b 50%, #feca57 75%, #ff9ff3 100%);
}

.theme-ocean {
    --login-primary-color: #667eea;
    --login-primary-dark: #764ba2;
    --login-gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
}

.theme-forest {
    --login-primary-color: #11998e;
    --login-primary-dark: #38ef7d;
    --login-gradient-bg: linear-gradient(135deg, #11998e 0%, #38ef7d 25%, #2dd4bf 50%, #06d6a0 75%, #118ab2 100%);
}

.theme-galaxy {
    --login-primary-color: #8360c3;
    --login-primary-dark: #2ebf91;
    --login-gradient-bg: linear-gradient(135deg, #8360c3 0%, #2ebf91 25%, #667eea 50%, #764ba2 75%, #f093fb 100%);
}

.theme-fire {
    --login-primary-color: #ff416c;
    --login-primary-dark: #ff4b2b;
    --login-gradient-bg: linear-gradient(135deg, #ff416c 0%, #ff4b2b 25%, #ff6b35 50%, #f7931e 75%, #ffb347 100%);
}

/* Estilos del login screen mejorado */
#loginScreen {
    background: var(--login-gradient-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#loginScreen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.15"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.login-container-advanced {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.login-card-advanced {
    background: var(--login-card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--login-border-radius);
    box-shadow: var(--login-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header-advanced {
    background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-primary-dark) 100%);
    color: white;
    padding: 1.8rem 1.5rem;
    text-align: center;
    position: relative;
}

.login-header-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
}

.login-header-advanced h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
}

.login-header-advanced i {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-body-advanced {
    padding: 2.5rem 2rem;
}

.form-group-advanced {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label-advanced {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.form-control-advanced {
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    width: 100%;
}

.form-control-advanced:focus {
    outline: none;
    border-color: var(--login-primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.form-control-advanced:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.login-btn-advanced {
    background: linear-gradient(135deg, var(--login-primary-color) 0%, var(--login-primary-dark) 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn-advanced:hover::before {
    left: 100%;
}

.login-btn-advanced:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.login-btn-advanced:active {
    transform: translateY(-1px) scale(0.98);
}

.login-btn-advanced:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none !important;
}

.alert-advanced {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: none;
    backdrop-filter: blur(10px);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-danger-advanced {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

/* Formas flotantes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatShapes 15s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes floatShapes {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.6;
    }
}

/* Efectos de ripple */
.input-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.3);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.click-effect {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: clickRipple 0.6s ease-out;
    pointer-events: none;
}

@keyframes clickRipple {
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Partículas flotantes */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 5s linear infinite;
    z-index: 0;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form-group-advanced.focused .form-label-advanced {
    color: var(--login-primary-color);
    transform: scale(0.9);
}

/* Efectos de typing */
.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: rgba(255, 255, 255, 0.7); }
}

/* Responsive para login avanzado */
@media (max-width: 768px) {
    .login-container-advanced {
        padding: 1rem;
    }
    
    .login-header-advanced {
        padding: 2rem 1.5rem;
    }
    
    .login-body-advanced {
        padding: 2rem 1.5rem;
    }
    
    .login-header-advanced h2 {
        font-size: 1.5rem;
    }

    .particle {
        display: none;
    }
}

/* Estilos para manejar correos largos en las tarjetas de cuentas */
.account-email {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

/* Contenedor de información de la cuenta con flex mejorado */
.account-info-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    gap: 12px;
}

.account-details {
    flex: 1;
    min-width: 0; /* Permite que el contenido se contraiga */
    overflow: hidden;
}

.account-actions {
    flex-shrink: 0; /* Evita que los botones se contraigan */
    display: flex;
    gap: 8px;
}

/* Mejoras para el contenedor de plataforma y email */
.platform-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}

.platform-details {
    min-width: 0;
    overflow: hidden;
}

.platform-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.platform-email {
    font-size: 0.875rem;
    color: #6b7280;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 640px) {
    .account-email {
        max-width: 150px;
    }
    
    .account-info-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .account-actions {
        align-self: flex-end;
    }
}
