/* css/login.css - Estilo AidaSys (Glassmorphism) */

:root {
    /* --- PALETA AIDASYS --- */
    --brand-cyan: #06b6d4;
    --brand-green: #10b981;
    --brand-dark: #0f172a;
    --brand-gradient: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);

    /* Colores Base */
    --bg-body: #f8fafc;
    --text-main: #1e293b;
    --text-body: #475569;
    --white: #ffffff;
    --error-bg: #fee2e2;
    --error-text: #ef4444;

    /* Efectos */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.9);
    --shadow-card: 0 20px 50px -10px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

h1,
h2,
h3,
h4,
.btn {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

/* --- FONDO ANIMADO --- */
.morph-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 15s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: rgba(6, 182, 212, 0.3);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: rgba(16, 185, 129, 0.3);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: rgba(15, 23, 42, 0.1);
    animation-delay: -8s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(40px, 60px);
    }
}

/* --- TARJETA LOGIN --- */
.login-container {
    width: 100%;
    max-width: 420px;
    z-index: 10;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Barra superior de color */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--brand-gradient);
}

.logo {
    height: 60px;
    margin-bottom: 1.5rem;
    width: auto;
}

h1 {
    font-size: 1.8rem;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

p {
    color: var(--text-body);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* --- FORMULARIO (Actualizado) --- */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
    margin-left: 5px;
}

.input-wrapper {
    position: relative;
}

/* Icono izquierdo (el normal) */
.input-wrapper .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: 0.3s;
    pointer-events: none;
    z-index: 2;
}

/* Icono derecho (la flechita del select) */
.input-wrapper .icon-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
    font-size: 0.8rem;
}

/* Estilos compartidos para INPUT y SELECT */
.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 15px 14px 45px;
    /* 45px a la izquierda para el icono */
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    color: var(--brand-dark);
    transition: all 0.3s ease;

    /* Eliminar estilo por defecto del navegador para el select */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

/* Focus para ambos */
.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
    background: #fff;
}

/* Color del icono al hacer focus */
.input-wrapper input:focus+.icon,
.input-wrapper select:focus~.icon {
    color: var(--brand-cyan);
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* Para que el click pase a través */
    color: #666;
    font-size: 0.8rem;
}

/* --- BOTÓN --- */
.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    background: var(--brand-gradient);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px -5px rgba(6, 182, 212, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(6, 182, 212, 0.5);
}

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

/* --- ERRORES --- */
.error-message {
    background-color: var(--error-bg);
    color: var(--error-text);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }
}

.has-error input {
    border-color: var(--error-text);
    background-color: #fff5f5;
}

.has-error .icon {
    color: var(--error-text);
}

/* --- FOOTER --- */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-body);
    font-size: 0.85rem;
}

.login-footer a {
    color: var(--brand-cyan);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* --- MÓVIL --- */
@media (max-width: 480px) {
    body {
        padding: 0;
        background: white;
    }

    .morph-bg {
        display: none;
    }

    /* Quitar fondo pesado en móvil */
    .login-container {
        max-width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-card {
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: white;
        padding: 20px;
    }

    .login-card::before {
        display: none;
    }
}