﻿:root {
    --bg: #0f172a;
    --card: rgba(255,255,255,0.08);
    --text: white;
}

body.light {
    --bg: #f1f5f9;
    --card: rgba(255,255,255,0.7);
    --text: #0f172a;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

/* FONDO INMOBILIARIO */
.login-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1560185127-6ed189bf02f4') center/cover;
    filter: blur(6px) brightness(0.6);
    z-index: -1;
}

/* WRAPPER */
.login-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CARD */
.login-card {
    width: 360px;
    padding: 40px;
    border-radius: 18px;
    background: var(--card);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    animation: fadeIn 0.6s ease;
}

/* HEADER */
.login-header {
    text-align: center;
    margin-bottom: 25px;
}

    .login-header h1 {
        margin: 0;
    }

/* INPUTS */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

    .input-group input {
        padding: 10px;
        border-radius: 8px;
        border: none;
        background: rgba(255,255,255,0.15);
        color: var(--text);
    }

/* PASSWORD ICON */
.password-group {
    position: relative;
}

/*#togglePassword {
    position: absolute;
    right: 10px;
    top: 35px;
    cursor: pointer;
}*/
#togglePassword {
    position: absolute;
    right: 10px;
    top: 35px;
    cursor: pointer;
    z-index: 2;
}
/* BOTÓN */
.btn-login {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* LOADER */
.loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 15px;
    top: 12px;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ef4444;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s;
}

/* THEME BUTTON */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
}
/* EFECTO ESCANEO */
.scan-line {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.6), transparent);
    opacity: 0;
}

/* CUANDO ESTÁ ACTIVO */
.btn-login.scanning .scan-line {
    animation: scan 1.2s infinite;
    opacity: 1;
}

@keyframes scan {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}
/* ANIMACIONES */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes shake {
    0%,100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.login-card.error {
    animation: shake 0.3s;
}

/* Edge / Chrome */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Chrome */
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-inner-spin-button {
    display: none !important;
}