/* ==============================
   PHONE PLANET - INICIO DE SESIÓN
   Acceso exclusivo para el personal
   ============================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --azul: #111827;
    --azul-hover: #2563EB;
    --dorado: #38BDF8;
    --blanco: #ffffff;
    --borde: rgba(255, 255, 255, 0.55);
}

/* Fondo temático */

body {
    min-height: 100vh;
    min-height: 100dvh;

    background-image:
        linear-gradient(
            110deg,
            rgba(5, 12, 28, 0.35),
            rgba(5, 12, 28, 0.05) 55%,
            rgba(5, 12, 28, 0.25)
        ),
        url('../IMG/IDEA.png');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 20px;
    color: var(--blanco);
    position: relative;
    overflow-x: hidden;
}

/* Capa de contraste */

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(8, 15, 35, 0.30),
        transparent 45%,
        rgba(8, 15, 35, 0.12)
    );

    pointer-events: none;
    z-index: 0;
}

/* Contenedor principal */

.container {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 450px;

    padding: 30px 38px;
    border: 1.5px solid var(--borde);
    border-radius: 13px;

    background: rgba(17, 24, 39, 0.55);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);

    animation: aparecer 0.8s ease both;
}

/* Título */

.container h1 {
    text-align: center;
    margin-bottom: 30px;

    font-size: clamp(25px, 4vw, 30px);
    font-weight: 700;
    color: var(--blanco);

    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Formulario */

form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Campos de entrada */

.input-box {
    width: 100%;
    min-height: 56px;

    display: flex;
    align-items: center;

    padding: 0 19px;

    border: 2px solid rgba(255, 255, 255, 0.58);
    border-radius: 40px;

    background: rgba(255, 255, 255, 0.06);

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

/* Efecto al seleccionar un campo */

.input-box:focus-within {
    border-color: var(--dorado);
    background: rgba(255, 255, 255, 0.12);

    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

/* Texto de los campos */

.input-box input {
    width: 100%;
    min-width: 0;
    height: 100%;

    background: transparent;
    border: none;
    outline: none;

    font-size: 14px;
    color: var(--blanco);
}

.input-box input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

/* Evita el fondo blanco del autocompletado */

.input-box input:-webkit-autofill,
.input-box input:-webkit-autofill:hover,
.input-box input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    transition: background-color 9999s ease-in-out 0s;
}

/* Recordarme y recuperar contraseña */

.remember-password {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;

    font-size: 12.5px;
}

.remember-password label {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    cursor: pointer;
}

.remember-password input[type="checkbox"] {
    accent-color: var(--dorado);
    cursor: pointer;
}

/* Enlaces */

form a {
    color: #7DD3FC;
    text-decoration: none;

    transition: color 0.25s ease;
}

form a:hover {
    color: var(--dorado);
    text-decoration: underline;
}

/* Botón de ingreso */

.btn {
    width: 100%;
    min-height: 43px;

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;

    background: var(--blanco);
    color: #111827;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Efecto al pasar el cursor */

.btn:hover {
    background: var(--dorado);
    color: #0F172A;
    border-color: var(--dorado);

    transform: translateY(-2px);

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* Efecto al presionar */

.btn:active {
    transform: scale(0.98);
}

/* Botón deshabilitado */

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Texto de registro */

form p {
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
    color: var(--blanco);
}

/* Enlace de registro */

#enlaceRegistro {
    color: var(--dorado);
    font-weight: 600;
}

/* Mensajes de Supabase */

#mensajeLogin {
    margin-top: 16px;

    font-size: 13px;
    line-height: 1.6;
    text-align: center;

    overflow-wrap: anywhere;
}

/* Animación de entrada */

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adaptación para celulares */

@media (max-width: 600px) {
    body {
        background-attachment: scroll;
        background-position: 43% center;
        padding: 20px 14px;
    }

    .container {
        max-width: 410px;
        padding: 27px 23px;

        background: rgba(17, 24, 39, 0.78);
    }

    .container h1 {
        margin-bottom: 25px;
    }

    form {
        gap: 19px;
    }

    .input-box {
        min-height: 52px;
        padding: 0 16px;
    }

    .remember-password {
        font-size: 12px;
    }
}

/* Respeta las preferencias de movimiento */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Botón para volver a la página principal */

.volver-tienda {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 22px;
    padding: 9px 16px;

    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 30px;

    background: rgba(255, 255, 255, 0.08);
    color: var(--blanco);

    font-size: 13px;
    font-weight: 600;
    text-decoration: none;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.volver-tienda:hover {
    background: var(--dorado);
    border-color: var(--dorado);
    color: #0F172A;
    transform: translateX(-2px);
}

.volver-tienda:focus-visible {
    outline: 3px solid var(--dorado);
    outline-offset: 3px;
}
