/* Paleta de RTV Nacional SA: sale del edificio del taller, que es tambien la
   foto de fondo. Pared blanca, letras azul marino, zocalo celeste, y el cartel
   del frente con franjas celestes arriba y abajo. */
:root {
    --rtv-celeste:        #74ACDF;
    --rtv-celeste-claro:  #EAF4FC;
    /* Para texto blanco encima: el celeste de la bandera no llega a 4.5:1. */
    --rtv-celeste-fuerte: #1F7AB0;
    --rtv-celeste-hover:  #196694;
    --rtv-marino:         #1C2A48;
    --rtv-glow:           rgba(116, 172, 223, 0.25);
}

/* ── RESET ──────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    height: 100vh;
    font-family: 'Inter', system-ui, sans-serif;
    background: #ffffff;
    overflow-x: hidden;
}

/* ── LAYOUT ─────────────────────────────── */

.login-wrapper {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    min-height: 100vh;
}

/* ── HERO (LEFT): la foto del taller ──────── */

/* El edificio queda arriba y el texto abajo, sobre el camino de tierra, que
   es la zona vacia de la foto: asi el cartel propio no tapa al cartel real.
   El velo es liviano arriba, para que el taller se vea, y denso abajo, donde
   tiene que leerse el texto. */
.login-hero {
    background:
        linear-gradient(to bottom,
            rgba(28, 42, 72, 0.20) 0%,
            rgba(28, 42, 72, 0.45) 40%,
            rgba(28, 42, 72, 0.92) 78%,
            rgba(28, 42, 72, 0.96) 100%),
        url("../images/empresa/login-fondo.c012b8477292.jpg") 60% top / cover no-repeat;
    background-color: var(--rtv-marino);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(40px, 5vw, 96px);
    padding-bottom: clamp(56px, 6vw, 104px);
    overflow: hidden;
}

/* Franja celeste / blanco / celeste al pie */
.login-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 12px;
    background: linear-gradient(
        to bottom,
        var(--rtv-celeste) 0 4px,
        #ffffff 4px 8px,
        var(--rtv-celeste) 8px 12px
    );
}

.hero-inner {
    max-width: 560px;
}

/* ── CARTEL: la marca, en texto ──────────── */

/* RTV Nacional no tiene logo: el bloque imita el cartel del frente. */
.rtv-cartel {
    display: inline-block;
    align-self: flex-start;
    background: #ffffff;
    border-top: 10px solid var(--rtv-celeste);
    border-bottom: 10px solid var(--rtv-celeste);
    padding: 12px 8px 10px;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.rtv-cartel-nombre {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(2.3rem, 3vw, 3.2rem);
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--rtv-celeste-fuerte);
    white-space: nowrap;
}

.rtv-cartel-bajada {
    display: block;
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rtv-marino);
}

/* Duplicado del cartel y franja de foto para mobile, donde el hero no se
   muestra. */
.login-box .rtv-cartel,
.login-foto {
    display: none;
}

/* Tagline. No hay titular: la pared de la foto ya dice "Revision Tecnica
   Nacional". */
.hero-tagline {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    max-width: 440px;
}

/* Features */
.hero-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-features li i {
    color: var(--rtv-celeste);
    font-size: 1rem;
    width: 18px;
    flex-shrink: 0;
}

/* ── PANEL DERECHO ───────────────────────── */

.login-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 52px;
    position: relative;
}

/* Franja celeste / blanco / celeste arriba */
.login-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(
        to bottom,
        var(--rtv-celeste) 0 4px,
        #ffffff 4px 8px,
        var(--rtv-celeste) 8px 12px
    );
}

/* ── LOGIN BOX ───────────────────────────── */

.login-box {
    width: 100%;
    max-width: 360px;
    position: relative;
    z-index: 1;
}

.login-box-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rtv-celeste-fuerte);
    margin-bottom: 8px;
}

.login-box h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--rtv-marino);
    margin-bottom: 4px;
    line-height: 1.1;
}

.login-box-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 36px;
}

/* ── LABELS ──────────────────────────────── */

.field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 7px;
}

/* ── INPUT GROUP ─────────────────────────── */

.input-group {
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e5e7eb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f9fafb;
}

.input-group:focus-within {
    border-color: var(--rtv-celeste-fuerte);
    box-shadow: 0 0 0 3px var(--rtv-glow);
    background: #fff;
}

.input-group-text {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding-left: 14px;
    transition: color 0.2s;
}

.input-group:focus-within .input-group-text {
    color: var(--rtv-celeste-fuerte);
}

.form-control {
    height: 46px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--rtv-marino);
    padding-left: 8px;
}

.form-control::placeholder {
    color: #d1d5db;
}

.form-control:focus {
    box-shadow: none;
    background: transparent;
    outline: none;
}

/* Toggle password */
.password-group .btn {
    border: none;
    background: transparent;
    color: #9ca3af;
    padding-right: 12px;
    transition: color 0.2s;
}

.password-group .btn:hover {
    color: var(--rtv-celeste-fuerte);
    background: transparent;
    box-shadow: none;
}

/* ── CHECKBOX ────────────────────────────── */

.form-check {
    margin-top: 4px;
}

.form-check-input:checked {
    background-color: var(--rtv-celeste-fuerte);
    border-color: var(--rtv-celeste-fuerte);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--rtv-glow);
    border-color: var(--rtv-celeste-fuerte);
}

.form-check-label {
    font-size: 0.82rem;
    color: #6b7280;
    cursor: pointer;
}

/* ── BOTÓN INGRESAR ──────────────────────── */

.btn-login {
    background: var(--rtv-celeste-fuerte);
    color: #ffffff;
    border: none;
    height: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 8px;
}

.btn-login:hover,
.btn-login:focus-visible {
    background: var(--rtv-celeste-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 122, 176, 0.35);
}

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

/* ── CRÉDITOS ────────────────────────────── */

.login-credits {
    position: absolute;
    bottom: 18px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #9ca3af;
    z-index: 1;
}

.login-credits-text {
    opacity: 0.8;
}

.login-credits img {
    max-height: 20px;
    opacity: 0.65;
    transition: opacity 0.2s;
}

.login-credits:hover img {
    opacity: 1;
}

/* ── ALERT ERROR ─────────────────────────── */

.alert-danger {
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
}

/* ── RESPONSIVE ──────────────────────────── */

@media (max-width: 900px) {

    .login-wrapper {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .login-hero {
        display: none;
    }

    .login-panel {
        padding: 0 16px 64px;
        justify-content: flex-start;
    }

    /* Franja de la foto arriba, a todo el ancho: en el celular tambien se ve
       el taller. La franja celeste del panel queda por encima. */
    .login-foto {
        display: block;
        align-self: stretch;
        margin: 0 -16px;
        height: 170px;
        background:
            linear-gradient(to bottom, rgba(28, 42, 72, 0.15), rgba(28, 42, 72, 0.55)),
            url("../images/empresa/login-fondo.c012b8477292.jpg") 62% 40% / cover no-repeat;
        background-color: var(--rtv-marino);
    }

    .login-panel::before {
        z-index: 2;
    }

    .login-box {
        max-width: 100%;
    }

    /* El cartel se monta sobre el borde de la foto, como en el frente */
    .login-box .rtv-cartel {
        display: inline-block;
        margin: -40px 0 28px;
        box-shadow: 0 8px 24px rgba(28, 42, 72, 0.18);
    }

    .login-box .rtv-cartel-nombre {
        font-size: 1.9rem;
    }

    .login-credits {
        bottom: 18px;
        right: 16px;
    }
}
