/* ===== LOGIN PREMIUM 2026 - PALETA EMINENCE ===== */
:root {
    --em-50: #faf7fd;
    --em-100: #f3ecfb;
    --em-200: #e9ddf7;
    --em-300: #d8c2f0;
    --em-400: #bf9be5;
    --em-500: #a675d7;
    --em-600: #8f57c6;
    --em-700: #7a44ac;
    --em-800: #673b8e;
    --em-900: #583377;
    --em-950: #381952;
    
    --shadow-sm: 0 4px 16px rgba(90, 70, 107, 0.08);
    --shadow-md: 0 8px 32px rgba(90, 70, 107, 0.12);
    --shadow-lg: 0 16px 48px rgba(90, 70, 107, 0.15);
    --shadow-xl: 0 24px 64px rgba(90, 70, 107, 0.2);
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;
    
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== PARTÍCULAS ANIMADAS ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(166, 117, 215, 0.3);
    border-radius: 50%;
    animation: floatParticle 15s ease-in-out infinite;
}

.particle:nth-child(1) { width: 80px; height: 80px; top: 10%; left: 5%; animation-delay: 0s; }
.particle:nth-child(2) { width: 120px; height: 120px; top: 70%; left: 15%; animation-delay: 2s; }
.particle:nth-child(3) { width: 60px; height: 60px; top: 30%; left: 85%; animation-delay: 4s; }
.particle:nth-child(4) { width: 100px; height: 100px; top: 80%; left: 75%; animation-delay: 6s; }
.particle:nth-child(5) { width: 40px; height: 40px; top: 50%; left: 10%; animation-delay: 1s; }
.particle:nth-child(6) { width: 90px; height: 90px; top: 20%; left: 60%; animation-delay: 3s; }
.particle:nth-child(7) { width: 70px; height: 70px; top: 60%; left: 90%; animation-delay: 5s; }
.particle:nth-child(8) { width: 50px; height: 50px; top: 15%; left: 40%; animation-delay: 7s; }
.particle:nth-child(9) { width: 110px; height: 110px; top: 85%; left: 50%; animation-delay: 2.5s; }
.particle:nth-child(10) { width: 45px; height: 45px; top: 40%; left: 25%; animation-delay: 4.5s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.3; }
    50% { transform: translateY(-50px) translateX(20px); opacity: 0.6; }
}

/* ===== CÍRCULOS DECORATIVOS ===== */
.bg-circles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--em-500) 0%, transparent 70%);
    opacity: 0.15;
    animation: floatCircle 25s ease-in-out infinite;
}

.circle-1 { width: 400px; height: 400px; top: -150px; right: -150px; animation-delay: 0s; }
.circle-2 { width: 300px; height: 300px; bottom: -100px; left: -100px; animation-delay: 3s; }
.circle-3 { width: 200px; height: 200px; top: 40%; left: 20%; animation-delay: 6s; opacity: 0.1; }
.circle-4 { width: 350px; height: 350px; bottom: 20%; right: 10%; animation-delay: 9s; }
.circle-5 { width: 150px; height: 150px; top: 70%; left: 30%; animation-delay: 2s; }
.circle-6 { width: 250px; height: 250px; top: 10%; left: 70%; animation-delay: 12s; }

@keyframes floatCircle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-40px) rotate(10deg); }
}

/* ===== BOTONES SUPERIORES ===== */
.login-actions {
    position: fixed;
    top: 25px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-btn .btn-icon {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 1.8;
}

.action-btn:hover {
    background: rgba(166, 117, 215, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(166, 117, 215, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(59, 130, 246, 0.8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== LADO IZQUIERDO ===== */
.company-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.company-content {
    text-align: center;
    color: white;
    max-width: 400px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, var(--em-500), var(--em-700));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseGlow 2s ease-in-out infinite;
}

.logo-icon svg {
    width: 45px;
    height: 45px;
    stroke: white;
    stroke-width: 1.5;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(166, 117, 215, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(166, 117, 215, 0); }
}

.company-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.company-content h1 span {
    background: linear-gradient(135deg, var(--em-400), var(--em-600), var(--em-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.company-content p {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 30px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.feature svg {
    width: 18px;
    height: 18px;
    stroke: var(--em-400);
    stroke-width: 2;
}

/* ===== LADO DERECHO ===== */
.login-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 32px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(191, 155, 229, 0.2);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--em-100), var(--em-200));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--em-700);
    stroke-width: 1.5;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--em-800), var(--em-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== INPUTS ===== */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--em-500);
    stroke-width: 1.8;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 2px solid var(--em-200);
    border-radius: 16px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition-fast);
    background: white;
    color: var(--text-dark);
}

.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a44ac' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--em-500);
    box-shadow: 0 0 0 4px rgba(166, 117, 215, 0.1);
    transform: translateY(-2px);
}

/* ===== BOTÓN LOGIN ===== */
.login-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--em-700), var(--em-600), var(--em-500));
    border: none;
    border-radius: 40px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-base);
    margin-top: 10px;
}

.login-submit .btn-icon {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(166, 117, 215, 0.3);
}

.login-submit:hover .btn-icon {
    transform: translateX(5px);
}

.login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== SPINNER ===== */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ERROR ===== */
#error-msg {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 10px;
    border-radius: 12px;
    display: none;
}

#error-msg.show {
    display: block;
    animation: fadeInUp 0.3s ease, shake 0.5s ease;
}

#error-msg.error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
}

#error-msg.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== FOOTER ===== */
.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--em-600);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.login-footer a:hover {
    color: var(--em-800);
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .login-page {
        flex-direction: column;
    }
    
    .company-side {
        min-height: 300px;
    }
    
    .login-side {
        min-height: 500px;
    }
    
    .login-actions {
        top: 15px;
        right: 15px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .action-btn .btn-icon {
        width: 20px;
        height: 20px;
    }
    
    .login-container {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .company-content h1 {
        font-size: 1.8rem;
    }
    
    .login-container {
        padding: 25px 20px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .logo-icon svg {
        width: 32px;
        height: 32px;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--em-100); }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg, var(--em-500), var(--em-600)); border-radius: 10px; }

::selection {
    background: var(--em-300);
    color: var(--em-900);
}