/* ============================================
   GLASSMORPHISM PREMIUM DARK LOGIN THEME
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, sans-serif;
    /* Fondo con gradiente radial orgánico y malla de color */
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.18) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.18) 0%, transparent 45%),
                linear-gradient(135deg, #090d16 0%, #020408 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

/* Efectos de luces ambientales detrás de la tarjeta de login */
body::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: #6366f1;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    top: 15%;
    left: 20%;
    z-index: 1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: #a855f7;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    bottom: 15%;
    right: 20%;
    z-index: 1;
    pointer-events: none;
}

.login-container {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(99, 102, 241, 0.1);
    width: 100%;
    max-width: 390px;
    padding: 40px 32px;
    position: relative;
    z-index: 10;
    animation: loginFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.login-header p {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

.login-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 10px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.login-icon:hover {
    transform: translateY(-4px) rotate(4deg);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.login-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.4s ease;
}

.login-icon:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.5));
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    animation: slideInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

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

.form-group label {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.form-group:focus-within label {
    color: #818cf8;
}

.form-group .input-icon {
    position: relative;
    display: block;
}

/* Línea animada inferior al hacer focus */
.form-group .input-icon::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
    z-index: 5;
}

.form-group .input-icon:focus-within::after {
    transform: scaleX(1);
}

.form-group .input-icon input.form-control-lg {
    width: 100%;
    padding: 14px 16px 14px 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(15, 23, 42, 0.4);
    color: #f8fafc;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group .input-icon input.form-control-lg:hover {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.15);
}

.form-group .input-icon input.form-control-lg:focus {
    outline: none;
    border-color: transparent;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.form-group .input-icon input.form-control-lg::placeholder {
    color: #475569;
    font-weight: 400;
    opacity: 0.8;
}

.error-message {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.error-message::before {
    content: "⚠️";
    font-size: 16px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px -6px rgba(99, 102, 241, 0.5);
    margin-top: 10px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-recovery {
    text-align: center;
    margin-top: 20px;
}

.login-recovery .emergency-link {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
    transition: all 0.2s ease;
}

.login-recovery .emergency-link:hover {
    color: #a855f7;
    transform: translateY(-1px);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.login-footer p {
    margin: 0;
    color: #475569;
    font-size: 11px;
    font-weight: 500;
}

.input-icon::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.form-group .input-icon:hover::before {
    opacity: 0.65;
    transform: translateY(-50%) scale(1.05);
}

.form-group .input-icon:focus-within::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.input-icon.user::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.input-icon.lock::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
        max-width: 100%;
    }
}
