/* =========================================================
   Pantallas de acceso de Ventas Telecable
   (Views/Shared/_LayoutLogin.cshtml + Views/Login/Login.cshtml y
    Views/Shared/_LayoutGenerico.cshtml -> Reestablecer contraseña)
   Mismo estilo que el login de Cobros CR. Solo estilos: los ids, names,
   formularios y scripts de las vistas no cambian.
   Colores de marca: rojo #ff0044, morado #843298 (Telecable_background.png)
   ========================================================= */

:root {
    --lg-red: #ff0044;
    --lg-red-dark: #d60039;
    --lg-purple: #843298;
    --lg-text: #1f2235;
    --lg-muted: #6b7088;
    --lg-border: #dfe3ec;
    --lg-bg: #f4f5f9;
    --lg-radius: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.lg-body {
    height: 100%;
    margin: 0;
}

.lg-body {
    font-family: 'Quicksand', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--lg-text);
    background: var(--lg-bg);
    -webkit-font-smoothing: antialiased;
}

.lg-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- Panel de marca ---------- */
.lg-hero {
    position: relative;
    flex: 1 1 55%;
    display: flex;
    align-items: flex-end;
    background: #111 url('../assets/img/TLc.png') center / cover no-repeat;
    overflow: hidden;
}

.lg-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(255, 0, 68, .55) 0%, rgba(132, 50, 152, .55) 55%, rgba(20, 10, 30, .85) 100%);
}

.lg-hero-content {
    position: relative;
    padding: 56px;
    color: #fff;
    max-width: 560px;
}

.lg-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 13px;
    font-weight: 600;
}

.lg-hero-title {
    margin: 18px 0 8px;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.lg-hero-text {
    margin: 0;
    font-size: 17px;
    opacity: .9;
}

/* ---------- Panel del formulario ---------- */
.lg-panel {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: #fff;
    border-top: 6px solid var(--lg-red);
}

.lg-card {
    width: 100%;
    max-width: 380px;
}

/* Variante ancha para pantallas con más contenido (Reestablecer contraseña) */
.lg-card--wide {
    max-width: 560px;
}

.lg-header {
    text-align: center;
    margin-bottom: 28px;
}

.lg-logo {
    width: 190px;
    max-width: 70%;
    height: auto;
}

.lg-title {
    margin: 18px 0 4px;
    font-size: 26px;
    font-weight: 700;
    color: var(--lg-text);
}

.lg-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--lg-muted);
}

/* ---------- Campos ---------- */
.lg-field {
    margin-bottom: 18px;
}

.lg-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lg-text);
}

.lg-input {
    position: relative;
}

.lg-input > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--lg-muted);
    pointer-events: none;
}

.lg-input input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    font: inherit;
    font-size: 16px; /* 16px evita el zoom automático en iOS */
    font-weight: 600;
    color: var(--lg-text);
    background: #fff;
    border: 1.5px solid var(--lg-border);
    border-radius: 10px;
    outline: none;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.lg-input input::placeholder {
    color: #a7abbd;
    font-weight: 500;
}

.lg-input input:focus {
    border-color: var(--lg-red);
    box-shadow: 0 0 0 4px rgba(255, 0, 68, .12);
}

.lg-input:focus-within > svg {
    color: var(--lg-red);
}

/* Autorrelleno de Chrome/Edge: mantiene el fondo blanco */
.lg-input input:-webkit-autofill,
.lg-input input:-webkit-autofill:hover,
.lg-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--lg-text);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 9999s ease-out 0s;
}

/* ---------- Botón ---------- */
.lg-submit {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, var(--lg-red) 0%, #e8005f 100%);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 0, 68, .25);
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.lg-submit:hover {
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 0, 68, .32);
}

.lg-submit:active {
    transform: translateY(1px);
}

.lg-submit:focus-visible {
    outline: 3px solid rgba(132, 50, 152, .45);
    outline-offset: 2px;
}

/* Enlace secundario (Reestablecer contraseña) */
.lg-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--lg-red);
    text-decoration: none;
}

.lg-link:hover {
    color: var(--lg-red-dark);
    text-decoration: underline;
}

/* ---------- Pie ---------- */
.lg-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 12px;
    color: var(--lg-muted);
}

.lg-footer a {
    color: var(--lg-red);
    font-weight: 700;
    text-decoration: none;
}

.lg-footer a:hover {
    text-decoration: underline;
}

/* =========================================================
   Contenido genérico dentro de la tarjeta (_LayoutGenerico:
   Reestablecer contraseña usa clases del tema CORK / Bootstrap)
   ========================================================= */
.lg-card .layout-top-spacing,
.lg-card .layout-spacing {
    margin: 0;
    padding: 0;
}

.lg-card .widget-content-area {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.lg-card h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--lg-text);
}

.lg-card hr {
    margin: 14px 0 18px;
    border: 0 !important;
    border-top: 1px solid var(--lg-border) !important;
}

.lg-card > .row br,
.lg-card .widget-content-area > br {
    display: none;
}

.lg-card label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--lg-text);
}

/* Campos genéricos del tema (pantalla de restablecer contraseña). Se excluyen los del login
   (.lg-input), que llevan ícono a la izquierda y su propio espaciado */
.lg-card :not(.lg-input) > .form-control {
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--lg-text);
    border: 1.5px solid var(--lg-border);
    border-radius: 10px;
    box-shadow: none;
}

.lg-card :not(.lg-input) > .form-control:focus {
    border-color: var(--lg-red);
    box-shadow: 0 0 0 4px rgba(255, 0, 68, .12);
}

.lg-card .btn-primary,
.lg-card .btn-primary.form-control {
    height: 46px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, var(--lg-red) 0%, #e8005f 100%);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(255, 0, 68, .22);
}

.lg-card .btn-primary:hover,
.lg-card .btn-primary:focus {
    color: #fff;
    background: linear-gradient(90deg, var(--lg-red-dark) 0%, #d10055 100%);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .lg-hero-content {
        padding: 40px;
    }

    .lg-hero-title {
        font-size: 34px;
    }
}

@media (max-width: 767.98px) {
    .lg-hero {
        display: none;
    }

    .lg-panel {
        background:
            radial-gradient(120% 60% at 50% 0%, rgba(255, 0, 68, .08) 0%, rgba(255, 255, 255, 0) 60%),
            #fff;
        align-items: flex-start;
        padding-top: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lg-submit,
    .lg-input input {
        transition: none;
    }
}
