/* Pantallas de acceso (login y cambio de contraseña obligatorio). */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    background: #080808 url('../img/bg-login.png') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wrapper posicionador */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* justify-content: center     → centrado  */
    /* justify-content: flex-end   → derecha   */
    /* justify-content: flex-start → izquierda */
    justify-content: center;
    padding: 2rem;
}

/* Card glassmorphism oscuro — toma los tonos de la imagen */
.login-card {
    width: 100%;
    max-width: 430px;
    background: rgba(8, 8, 10, 0.72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 2.5rem 2.25rem;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 32px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(80, 160, 255, 0.06);   /* resplandor suave del LED */
}

/* Marca */
.login-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.3px;
    margin-bottom: 1.75rem;
}

.login-brand i {
    font-size: 1.2rem;
    color: #7ec8f8;   /* azul frío del LED del auto */
}

/* Título */
.login-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

/* Subtítulo */
.login-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1.9rem;
}

/* Etiquetas */
.field-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.4rem;
    letter-spacing: 0.2px;
}

/* Input con ícono */
.input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

.input-wrap .ico {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: rgba(255,255,255,0.25);
    font-size: 1rem;
    flex-shrink: 0;
}

.input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 0.25rem;
    font-size: 0.88rem;
    color: #ffffff;
    font-family: inherit;
    outline: none;
    box-shadow: none;
}

.input-wrap input::placeholder {
    color: rgba(255,255,255,0.22);
}

/* Anular el fondo blanco del autocompletado del navegador */
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 20, 25, 0.95) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    transition: background-color 9999s ease-in-out 0s;
}

/* Botón ojo — posición absoluta para que nada lo tape */
.pass-wrap { position: relative; }
.pass-wrap .input-wrap input { padding-right: 3rem; }
.btn-eye {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 3rem;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
    z-index: 2;
}
.btn-eye:hover, .btn-eye:active { color: #7ec8f8; }

/* Link olvidé contraseña */
.forgot-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7ec8f8;
    text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

/* Botón iniciar sesión — blanco puro, contrasta con el fondo oscuro */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    background: #ffffff;
    color: #0d1117;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 24px rgba(255,255,255,0.12);
}

.btn-login:hover:not(:disabled) {
    background: #f0f4f8;
    transform: translateY(-1px);
    box-shadow: 0 6px 32px rgba(255,255,255,0.18);
}

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

/* Spinner */
.btn-login .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #0d1117;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error-box {
    display: none;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: #fca5a5;
    font-size: 0.83rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Separador */
.divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin: 1.5rem 0 1.2rem;
}

/* Footer */
.login-footer {
    text-align: center;
    font-size: 0.74rem;
    color: rgba(255,255,255,0.25);
    line-height: 1.7;
}

.login-footer a {
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    color: #7ec8f8;
}

/* Responsivo */
@media (max-width: 480px) {
    .login-card { padding: 2rem 1.5rem; }
    .login-title { font-size: 1.45rem; }
}
