/* ==========================================================================
   Vinaelectric · Acceso empleados
   Usa las variables corporativas ya definidas en tu proyecto:
     --corp-dark    (navy profundo)
     --corp-medium  (azul pizarra)
   Fuentes: Sora (marca/títulos) + Inter (interfaz). El <link> va en el template.
   ========================================================================== */

/* ---- Fondo de página: tu imagen, difuminada y oscurecida ----------------- */
.login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
}

.login-wrapper::before {          /* imagen de fondo (ligeramente difuminada) */
    content: "";
    position: absolute;
    inset: 0;
    background: url('https://www.vinaelectric.es/wp-content/uploads/2022/03/cabecera-contacto.jpg?id=3066')
                center / cover no-repeat;
    transform: scale(1.08);
    filter: blur(3px) brightness(0.7) saturate(1.05);
    z-index: 0;
}

.login-wrapper::after {           /* velo navy suave para contraste */
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 15% 10%, rgba(65, 78, 107, 0.35), transparent 60%),
        linear-gradient(160deg, rgba(23, 32, 57, 0.30), rgba(23, 32, 57, 0.55));
    z-index: 0;
}

/* ---- Tarjeta dividida ---------------------------------------------------- */
.login-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    width: 100%;
    max-width: 920px;
    min-height: 560px;
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow:
        0 30px 80px -24px rgba(9, 14, 28, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    animation: cardIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ---- Panel de marca (izquierda) ----------------------------------------- */
.login-brand {
    position: relative;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(23, 32, 57, 0.45) 0%, rgba(65, 78, 107, 0.28) 45%, rgba(23, 32, 57, 0.72) 100%),
        url('https://www.vinaelectric.es/wp-content/uploads/2022/03/cabecera-contacto.jpg?id=3066')
        center / cover no-repeat;
}
/* sombra sutil para que el texto se lea sobre la imagen */
.login-brand .brand-name,
.login-brand .brand-sub,
.login-brand .brand-foot { text-shadow: 0 1px 12px rgba(9, 14, 28, 0.55); }

/* barrido de luz sutil (guiño "eléctrico") */
.login-brand::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -60%;
    width: 60%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transform: rotate(18deg);
    animation: sweep 6.5s ease-in-out 1s infinite;
}

@keyframes sweep {
    0%, 65% { left: -60%; }
    100%    { left: 130%; }
}

.brand-top { position: relative; z-index: 1; }

.brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}
.brand-logo i { font-size: 26px; color: #ffffff; }

.brand-name {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 22px 0 0;
    line-height: 1.1;
}
.brand-name span { font-weight: 400; opacity: 0.7; }

.brand-sub {
    position: relative;
    z-index: 1;
    max-width: 24ch;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
}

.brand-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}
.brand-foot i { color: #ffffff; }
.brand-foot::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.55);
}

/* ---- Panel de formulario (derecha) -------------------------------------- */
.login-form-panel {
    padding: 46px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-head { margin-bottom: 26px; }
.form-head h1 {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--corp-dark);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.form-head p {
    font-size: 14px;
    color: var(--corp-medium);
    margin: 0;
}

.field { margin-bottom: 18px; }
.field > label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--corp-dark);
    margin-bottom: 7px;
}

.field-control { position: relative; }
.field-control .fi {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: var(--corp-medium);
    pointer-events: none;
    transition: color 0.18s;
}

.field-control input {
    width: 100%;
    height: 52px;
    padding: 0 46px 0 44px;
    border: 1.5px solid #e3e7f0;
    border-radius: 13px;
    background: #f7f8fc;
    font-size: 14.5px;
    color: var(--corp-dark);
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field-control input::placeholder { color: #b7bdcb; }

.field-control input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--corp-medium);
    box-shadow: 0 0 0 4px rgba(65, 78, 107, 0.14);
}
.field-control input:focus + .fi,
.field-control input:focus ~ .fi { color: var(--corp-medium); }

.toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--corp-medium);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    opacity: 0.7;
    transition: color 0.15s, background 0.15s, opacity 0.15s;
}
.toggle-pass:hover { opacity: 1; background: #eef0f6; }
.toggle-pass:focus-visible {
    outline: 2px solid var(--corp-medium);
    outline-offset: 1px;
}

/* fila opciones */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 24px;
    font-size: 13px;
}
.form-options .check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--corp-medium);
    user-select: none;
}
.form-options .check input {
    width: 16px;
    height: 16px;
    accent-color: var(--corp-medium);
    cursor: pointer;
}
.form-options .check label { cursor: pointer; }

.form-link {
    color: var(--corp-medium);
    text-decoration: none;
    font-weight: 500;
}
.form-link:hover { text-decoration: underline; }

/* botón */
.btn-login {
    width: 100%;
    height: 53px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--corp-dark), var(--corp-medium));
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 26px -10px rgba(23, 32, 57, 0.7);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}
.btn-login:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: 0 18px 32px -10px rgba(23, 32, 57, 0.75);
}
.btn-login:active { transform: translateY(0); }
.btn-login:focus-visible {
    outline: 2px solid var(--corp-medium);
    outline-offset: 3px;
}

.form-helper {
    text-align: center;
    margin: 18px 0 0;
    font-size: 12.5px;
    color: var(--corp-medium);
    opacity: 0.85;
}
.form-helper strong { color: var(--corp-medium); font-weight: 600; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 780px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 430px;
        min-height: 0;
    }
    .login-brand {
        padding: 30px 30px 26px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    .login-brand::before { animation: none; }
    .brand-name { font-size: 22px; margin: 0; }
    .brand-sub, .brand-foot { display: none; }
    .brand-logo { width: 46px; height: 46px; }
    .login-form-panel { padding: 32px 28px 34px; }
}

/* ---- Accesibilidad ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .login-card,
    .login-brand::before { animation: none; }
    .btn-login,
    .field-control input,
    .toggle-pass { transition: none; }
}