/* ================================================================
   SafaCar — Login Page CSS
   Archivo: static/css/login.css
   ================================================================ */

/* Google Fonts ya cargadas desde base.html (Inter) */

/* ── Fondo degradado suave ── */
.login-page-bg {
    min-height: 100vh;
    background: #f0f4ff;
    display: flex;
    align-items: center;
}

/* ── Tarjeta contenedora ── */
.login-card {
    background: #ffffff;
    border-radius: 28px;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 24px 48px rgba(26, 115, 232, 0.10);
    overflow: hidden;
    border: none;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* ── Cabecera con gradiente azul ── */
.login-header {
    background: linear-gradient(145deg, #1a73e8 0%, #0b5ecc 100%);
    padding: 2.8rem 2rem 2.2rem;
    text-align: center;
}

.login-header .brand-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
    font-size: 1.8rem;
    color: #fff;
}

.login-header .brand-name {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.login-header .brand-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 400;
    margin: 0;
}

/* ── Cuerpo del formulario ── */
.login-body {
    padding: 2.2rem 2.2rem 1.6rem;
}

.login-body .form-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 0.3rem;
}

.login-body .form-sub {
    font-size: 0.83rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 1.8rem;
}

/* ── Grupo de input con icono ── */
.input-group-modern {
    position: relative;
    margin-bottom: 1rem;
}

.input-group-modern .field-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.input-group-modern input:focus ~ .field-icon,
.input-group-modern input:not(:placeholder-shown) ~ .field-icon {
    color: #1a73e8;
}

.login-input {
    width: 100%;
    background: #f8faff;
    border: 1.8px solid #e2e8f0;
    border-radius: 50px !important;
    padding: 0.8rem 1.2rem 0.8rem 2.8rem !important;
    font-size: 0.95rem;
    color: #0f172a;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.login-input:focus {
    background: #ffffff;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
}

.login-input::placeholder {
    color: #b0bec5;
}

/* ── toggle contraseña ── */
.toggle-pass {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    transition: color 0.2s;
    z-index: 2;
}

.toggle-pass:hover { color: #1a73e8; }

/* ── Fila recordar + olvidé ── */
.login-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.8rem 0 1.8rem;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #1a73e8;
    cursor: pointer;
    border-radius: 4px;
}

.remember-check label {
    font-size: 0.88rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.forgot-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover { color: #0b5ecc; text-decoration: underline; }

/* ── Botón principal ── */
.btn-login-main {
    width: 100%;
    background: #1a73e8;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: background 0.22s, transform 0.18s, box-shadow 0.22s;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
    font-family: 'Inter', sans-serif;
}

.btn-login-main:hover {
    background: #0b5ecc;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(26, 115, 232, 0.42);
}

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

/* ── Error messages ── */
.field-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    padding-left: 1rem;
}

.alert-login {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 14px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ── Footer del card ── */
.login-footer {
    background: #f8faff;
    border-top: 1px solid #e8f0fe;
    padding: 1.1rem 2.2rem;
    text-align: center;
}

.login-footer p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

.login-footer a {
    color: #1a73e8;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover { color: #0b5ecc; text-decoration: underline; }
