/* Neumorphism Login Form - Complete & Self-Contained */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Responsive tweaks for login card */
@media (max-width: 768px) {
    .login-container { padding: 0 12px; }
    .login-card {
        padding: 36px 28px;
        max-width: 420px;
        border-radius: 20px;
    }
    .neu-icon { width: 64px; height: 64px; }
    .icon-inner { width: 32px; height: 32px; }
    .login-header h2 { font-size: 1.6rem; }
    .neu-input input { padding: 16px 20px; }
    .neu-button { padding: 14px 20px; }
}

@media (max-width: 480px) {
    body { background-position: center top; }
    .login-container { max-width: 360px; }
    .login-card {
        padding: 28px 18px;
        border-radius: 16px;
        box-shadow: 12px 12px 40px rgba(0,0,0,0.06), -12px -12px 40px rgba(255,255,255,0.85);
    }
    .login-header h2 { font-size: 1.4rem; }
    .login-header p { font-size: 13px; }
    .neu-input input { padding: 14px 18px; font-size: 15px; }
    .neu-button { padding: 12px 16px; font-size: 15px; }
    .neu-icon { width: 56px; height: 56px; }
    .icon-inner { width: 28px; height: 28px; }
    .forgot-link { font-size: 13px; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e0e5ec;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
}

/* Background image placed in a pseudo-element so we can blur it */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('img/fondo de loing 2.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: blur(10px) brightness(0.95) saturate(0.95);
    transform: scale(1.03);
    z-index: -2;
}

/* Slight overlay to keep UI readable on top of the blurred image */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(224,229,236,0.55);
    z-index: -1;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #0F4C5C; /* color igual a la barra */
    border-radius: 20px;
    padding: 44px 36px;
    box-shadow: 
        10px 10px 30px rgba(0,0,0,0.25),
        -6px -6px 20px rgba(255,255,255,0.02);
    position: relative;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.neu-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        6px 6px 18px rgba(0,0,0,0.25),
        -6px -6px 18px rgba(255,255,255,0.02);
    transition: all 0.3s ease;
}

.neu-icon:hover {
    box-shadow: 
        4px 4px 10px #bec3cf,
        -4px -4px 10px #ffffff,
        inset 4px 4px 10px #bec3cf,
        inset -4px -4px 10px #ffffff;
}

/* Avatar personalizado: usa la imagen 'gdr' dentro de .neu-icon */
.neu-icon.gdr {
    background-color: transparent;
    background-image: url("img/gdr.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 0;
}

.neu-icon.gdr .icon-inner {
    width: 0;
    height: 0;
    opacity: 0;
}

.icon-inner {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c7293;
}

.icon-inner svg {
    width: 100%;
    height: 100%;
}

.login-header h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    font-weight: 400;
}

/* Neumorphic Input Styles */
.form-group {
    margin-bottom: 28px;
    position: relative;
}

.neu-input {
    position: relative;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    box-shadow: 
        inset 6px 6px 12px rgba(0,0,0,0.28),
        inset -4px -4px 10px rgba(255,255,255,0.02);
    transition: all 0.3s ease;
}

.neu-input:focus-within {
    box-shadow: 
        inset 4px 4px 8px rgba(0,0,0,0.32),
        inset -3px -3px 8px rgba(255,255,255,0.02);
}

.neu-input input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 18px 20px;
    padding-left: 55px;
    color: #f4f8fb;
    font-size: 16px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.neu-input input::placeholder {
    color: transparent;
}

.neu-input label {
    position: absolute;
    left: 55px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.78);
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.3s ease;
}

.neu-input input:focus + label,
.neu-input input:not(:placeholder-shown) + label {
    top: 8px;
    font-size: 12px;
    color: #6c7293;
    transform: translateY(0);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: rgba(255,255,255,0.72);
    transition: all 0.3s ease;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.neu-input:focus-within .input-icon {
    color: #6c7293;
}

/* Password Toggle */
.password-group {
    padding-right: 50px;
}

.neu-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.06);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.72);
    box-shadow: 
        4px 4px 10px rgba(0,0,0,0.22),
        -4px -4px 10px rgba(255,255,255,0.02);
    transition: all 0.3s ease;
}

.neu-toggle:hover {
    color: #6c7293;
}

.neu-toggle:active {
    box-shadow: 
        inset 2px 2px 5px #bec3cf,
        inset -2px -2px 5px #ffffff;
}

.neu-toggle svg {
    width: 18px;
    height: 18px;
}

.eye-closed {
    display: none;
}

.neu-toggle.show-password .eye-open {
    display: none;
}

.neu-toggle.show-password .eye-closed {
    display: block;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 16px;
}

.remember-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    color: #6c7293;
    font-size: 14px;
    font-weight: 500;
}

.neu-checkbox {
    width: 22px;
    height: 22px;
    background: #e0e5ec;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        3px 3px 8px #bec3cf,
        -3px -3px 8px #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.remember-wrapper input[type="checkbox"]:checked + .checkbox-label .neu-checkbox {
    box-shadow: 
        inset 2px 2px 5px #bec3cf,
        inset -2px -2px 5px #ffffff;
}

.neu-checkbox svg {
    width: 14px;
    height: 14px;
    color: #00c896;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.remember-wrapper input[type="checkbox"]:checked + .checkbox-label .neu-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #e6f2f7;
}

/* Neumorphic Button */
.neu-button {
    width: 100%;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    color: #0F4C5C;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    margin-bottom: 30px;
    box-shadow: 
        4px 6px 16px rgba(0,0,0,0.22),
        -4px -4px 12px rgba(255,255,255,0.02);
    transition: all 0.3s ease;
    overflow: hidden;
}

.neu-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.neu-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        12px 12px 30px #bec3cf,
        -12px -12px 30px #ffffff;
}

.neu-button:hover::before {
    left: 100%;
}

.neu-button:active {
    transform: translateY(0);
    box-shadow: 
        inset 4px 4px 10px #bec3cf,
        inset -4px -4px 10px #ffffff;
}

.btn-text {
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neu-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.12);
    border-top: 3px solid #0F4C5C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.neu-button.loading .btn-text {
    opacity: 0;
}

.neu-button.loading .btn-loader {
    opacity: 1;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    gap: 16px;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #bec3cf, transparent);
}

.divider span {
    color: #9499b7;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Social Login */
.social-login {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}

.neu-social {
    width: 50px;
    height: 50px;
    background: #e0e5ec;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c7293;
    box-shadow: 
        6px 6px 15px #bec3cf,
        -6px -6px 15px #ffffff;
    transition: all 0.3s ease;
}

.neu-social:hover {
    transform: translateY(-2px);
    box-shadow: 
        8px 8px 20px #bec3cf,
        -8px -8px 20px #ffffff;
}

.neu-social:active {
    transform: translateY(0);
    box-shadow: 
        inset 3px 3px 8px #bec3cf,
        inset -3px -3px 8px #ffffff;
}

.neu-social svg {
    width: 22px;
    height: 22px;
}

/* Signup Link */
.signup-link {
    text-align: center;
}

.signup-link p {
    color: #9499b7;
    font-size: 14px;
}

.signup-link a {
    color: #6c7293;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #3d4468;
}

/* Error States */
.error-message {
    color: #ff3b5c;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    margin-left: 20px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-group.error .neu-input {
    box-shadow: 
        inset 8px 8px 16px #ffb8c4,
        inset -8px -8px 16px #ffffff,
        0 0 0 2px #ff3b5c;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 40px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.success-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.success-message .neu-icon {
    background: #e0e5ec;
    color: #00c896;
    margin-bottom: 20px;
}

.success-message h3 {
    color: #3d4468;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.success-message p {
    color: #9499b7;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .login-card {
        padding: 35px 25px;
        border-radius: 20px;
    }
    
    .login-header h2 {
        font-size: 1.75rem;
    }
    
    .neu-input input {
        padding: 18px 20px;
        padding-left: 50px;
    }
    
    .neu-input label {
        left: 50px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}