﻿/* =====================================================================
   Login — rediseño split-screen (AutoAzur)
   Basado en el mockup aprobado. Light-only (la app es light).
   Clases az-* para no chocar con el tema (app.css / bootstrap).
   Acento: #2f7be9. No toca la lógica de servidor.
   ===================================================================== */

body.az-login-page {
    --accent: #2f7be9;
    --accent-strong: #2266cf;
    --accent-soft: rgba(47, 123, 233, .12);
    --bg: #eef2f8;
    --surface: #ffffff;
    --surface-2: #f5f8fc;
    --border: #e2e8f2;
    --text: #16233d;
    --text-2: #55617a;
    --muted: #8a94a8;
    --brand-1: #0f2547;
    --brand-2: #1c4a92;
    --brand-3: #2f7be9;
    --on-brand: #ffffff;
    --on-brand-soft: rgba(255, 255, 255, .72);
    --on-brand-faint: rgba(255, 255, 255, .14);
    --radius: 16px;
    --shadow: 0 24px 60px -22px rgba(15, 37, 71, .28), 0 8px 20px -12px rgba(15, 37, 71, .16);

    min-height: 100vh;
    margin: 0;
    background: radial-gradient(1200px 600px at 12% -10%, #eaf1fd 0%, rgba(234, 241, 253, 0) 60%),
                radial-gradient(1000px 700px at 110% 120%, #eef3fb 0%, rgba(238, 243, 251, 0) 55%),
                linear-gradient(135deg, #f4f7fc 0%, #eef2f8 100%) !important;
    color: var(--text);
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout de página: centra el shell, neutraliza wrappers del tema */
body.az-login-page .app-content,
body.az-login-page .content-wrapper,
body.az-login-page .content-body {
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}
body.az-login-page .az-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px clamp(12px, 3vw, 40px);
}

/* ---- Shell (tarjeta de dos columnas) -------------------------------- */
body.az-login-page .az-shell {
    width: 80vw;
    max-width: 1600px;
    min-height: 560px;
    max-height: calc(100vh - 56px);
    display: grid;
    grid-template-columns: 70% 30%;
    grid-template-rows: minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ---- Panel de marca ------------------------------------------------- */
body.az-login-page .az-brand {
    position: relative;
    color: var(--on-brand);
    overflow: hidden;
    min-height: 0;
    padding: 44px 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(120% 90% at 10% 0%, rgba(47, 123, 233, .55) 0%, rgba(47, 123, 233, 0) 55%),
                radial-gradient(120% 120% at 100% 100%, rgba(74, 158, 255, .45) 0%, rgba(74, 158, 255, 0) 50%),
                linear-gradient(155deg, var(--brand-1) 0%, var(--brand-2) 60%, var(--brand-1) 100%);
}
body.az-login-page .az-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .5;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 85%);
    mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 85%);
}
body.az-login-page .az-brand > * { position: relative; z-index: 1; }

body.az-login-page .az-logo { display: flex; align-items: center; gap: 11px; }
body.az-login-page .az-logo-mark {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
}
body.az-login-page .az-logo-word {
    font-family: "Plus Jakarta Sans", "Open Sans", sans-serif;
    font-size: 21px; font-weight: 800; letter-spacing: -.01em; color: #fff;
}
body.az-login-page .az-logo-word b { color: #8fc0ff; font-weight: 800; }

/* Carrusel de imágenes (covers de LoginConfig.Covers) */
/* Flexible: absorbe el alto sobrante para que el shell no exceda la pantalla */
body.az-login-page .az-hero { margin: 28px 0; position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.az-login-page .az-slides {
    position: relative; flex: 1 1 auto; min-height: 120px; border-radius: 16px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5);
    background: rgba(255, 255, 255, .04);
}
body.az-login-page .az-slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease;
}
body.az-login-page .az-slide.active { opacity: 1; visibility: visible; }
body.az-login-page .az-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
body.az-login-page .az-dots { display: flex; gap: 9px; margin-top: 16px; justify-content: center; }
body.az-login-page .az-dots button {
    height: 5px; width: 22px; padding: 0; border: none; cursor: pointer; border-radius: 999px;
    background: rgba(255, 255, 255, .28); transition: background-color .25s, width .25s;
}
body.az-login-page .az-dots button.active { background: #fff; width: 34px; }

/* Integraciones */
body.az-login-page .az-eyebrow {
    font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
    color: var(--on-brand-soft); font-weight: 700; margin-bottom: 12px;
}
body.az-login-page .az-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
body.az-login-page .az-chip {
    width: 36px; height: 36px; padding: 6px; border-radius: 10px;
    background: #fff; border: 1px solid rgba(255, 255, 255, .55);
    display: grid; place-items: center; box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .4);
}
body.az-login-page .az-chip img { width: 100%; height: 100%; object-fit: contain; display: block; }
@keyframes azChipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.az-login-page .az-slogan {
    margin: 0; text-transform: none; letter-spacing: -.01em; line-height: 1.25;
    font-family: "Plus Jakarta Sans", "Open Sans", sans-serif;
    font-size: clamp(18px, 1.9vw, 25px); font-weight: 600; color: rgba(255, 255, 255, .9);
}
body.az-login-page .az-slogan b { color: #8fc0ff; font-weight: 800; }

/* ---- Panel de formulario -------------------------------------------- */
body.az-login-page .az-form {
    padding: clamp(18px, 2vw, 32px);
    display: flex; flex-direction: column; justify-content: flex-start;
    min-height: 0; overflow-y: auto; background: var(--surface);
}
/* margin auto centra cuando sobra espacio y colapsa para poder scrollear si falta */
body.az-login-page .az-form-inner { width: 100%; max-width: 440px; margin: auto; }

body.az-login-page .az-brandlogo { text-align: center; margin-bottom: 8px; }
body.az-login-page .az-brandlogo img { width: auto; max-height: 70px; }
/* Crece con el ancho, pero solo si hay alto suficiente (evita reintroducir scroll) */
@media (min-width: 860px) and (min-height: 780px) { body.az-login-page .az-brandlogo img { max-height: 100px; } }
@media (min-width: 900px) and (min-height: 880px) { body.az-login-page .az-brandlogo img { max-height: 130px; } }

body.az-login-page .az-greeting {
    font-family: "Plus Jakarta Sans", "Open Sans", sans-serif;
    font-weight: 700; font-size: 23px; letter-spacing: -.01em; color: var(--text);
    margin: 0 0 4px; text-align: center; text-transform: none;
}
body.az-login-page .az-subtitle {
    color: var(--text-2); font-size: 14px; margin: 0 0 16px; line-height: 1.45;
    text-align: center; text-transform: none;
}

/* Campos */
body.az-login-page .az-field { margin-bottom: 11px; }
body.az-login-page .az-label {
    display: block; font-size: 13px; font-weight: 600; color: var(--text-2);
    margin-bottom: 5px; text-transform: none;
}
body.az-login-page .az-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
body.az-login-page .az-label-row .az-label { margin: 0; }
body.az-login-page .az-link {
    color: var(--accent); font-size: 12.5px; font-weight: 600; text-decoration: none; text-transform: none;
}
body.az-login-page .az-link:hover { color: var(--accent-strong); text-decoration: underline; }

body.az-login-page .az-input-wrap { position: relative; display: flex; align-items: center; }
body.az-login-page .az-input-wrap > svg.az-lead { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
body.az-login-page .az-input,
body.az-login-page .az-input-wrap input {
    width: 100%; height: 44px; padding: 0 14px 0 42px; font-size: 14.5px;
    font-family: inherit; color: var(--text); background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 11px; outline: none; box-shadow: none;
    text-transform: none; margin: 0;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
body.az-login-page .az-input-wrap input::placeholder { color: var(--muted); text-transform: none; }
body.az-login-page .az-input-wrap input:focus {
    background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
/* input de contraseña deja espacio al ojo */
body.az-login-page .az-input-wrap.has-toggle input { padding-right: 44px; }
body.az-login-page .az-toggle-pass {
    position: absolute; right: 6px; height: 34px; width: 38px; border: none; background: transparent;
    color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 8px; padding: 0;
}
body.az-login-page .az-toggle-pass:hover { color: var(--accent); background: var(--accent-soft); }

/* Errores (validators + label de credenciales) */
body.az-login-page .az-error {
    display: inline-block; text-align: left; color: #d9534f;
    font-size: 12.5px; font-weight: 600; text-transform: none; margin-top: .3rem;
}
body.az-login-page .az-error-block { display: block; margin-top: .2rem; }

/* Botón principal */
body.az-login-page .az-btn {
    width: 100%; height: 46px; margin-top: 8px; border: none; border-radius: 11px; cursor: pointer;
    background: var(--accent); color: #fff;
    font-family: "Plus Jakarta Sans", "Open Sans", sans-serif;
    font-size: 15px; font-weight: 700; letter-spacing: .01em; text-transform: none;
    box-shadow: 0 12px 22px -10px rgba(47, 123, 233, .7);
    transition: background-color .15s, box-shadow .15s, transform .05s;
}
body.az-login-page .az-btn:hover { background: var(--accent-strong); box-shadow: 0 14px 26px -10px rgba(34, 102, 207, .8); }
body.az-login-page .az-btn:active { transform: translateY(1px); }
body.az-login-page .az-btn:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Registro / divider / redes */
body.az-login-page .az-register { text-align: center; font-size: 13.5px; color: var(--text-2); margin-top: 12px; text-transform: none; }
body.az-login-page .az-register a { color: var(--accent); font-weight: 700; text-decoration: none; text-transform: none; }
body.az-login-page .az-register a:hover { text-decoration: underline; }

body.az-login-page .az-divider { display: flex; align-items: center; gap: 14px; margin: 14px 0 12px; }
body.az-login-page .az-divider::before,
body.az-login-page .az-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
body.az-login-page .az-divider span {
    font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700;
}

body.az-login-page .az-socials { display: flex; justify-content: center; gap: 10px; }
body.az-login-page .az-socials a {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--border);
    transition: transform .15s, border-color .15s; filter: saturate(.2);
}
body.az-login-page .az-socials a:hover { transform: translateY(-3px); border-color: var(--accent); filter: saturate(1); }
body.az-login-page .az-socials svg { width: 22px; height: 22px; }

/* ---- Responsive ----------------------------------------------------- */
@media (max-width: 860px) {
    body.az-login-page .az-shell { grid-template-columns: 1fr; width: 92vw; max-width: 460px; min-height: 0; max-height: none; }
    body.az-login-page .az-brand { padding: 30px 30px 26px; }
    body.az-login-page .az-hero { margin: 22px 0 6px; flex: 0 0 auto; }
    body.az-login-page .az-slides { flex: none; height: auto; aspect-ratio: 16 / 9; min-height: 0; }
    body.az-login-page .az-eyebrow,
    body.az-login-page .az-slogan { display: none; }
    body.az-login-page .az-chips { margin-bottom: 0; }
}
/* Pantallas altas: el shell crece (el carrusel flexible aprovecha el alto),
   con tope para no desbalancear la relación carrusel/formulario. */
@media (min-height: 851px) {
    body.az-login-page .az-shell { min-height: min(820px, calc(100vh - 120px)); }
}

/* Modo compacto para pantallas de poca altura (laptops): evita el scroll
   del formulario sin apretar el diseño en pantallas grandes. */
@media (max-height: 730px) {
    body.az-login-page .az-brandlogo { margin-bottom: 4px; }
    body.az-login-page .az-brandlogo img { max-height: 56px; }
    body.az-login-page .az-greeting { font-size: 20px; margin-bottom: 2px; }
    body.az-login-page .az-subtitle { font-size: 13px; margin-bottom: 10px; }
    body.az-login-page .az-field { margin-bottom: 8px; }
    body.az-login-page .az-label { margin-bottom: 4px; }
    body.az-login-page .az-input,
    body.az-login-page .az-input-wrap input { height: 42px; }
    body.az-login-page .az-btn { height: 44px; margin-top: 6px; }
    body.az-login-page .az-divider { margin: 8px 0 6px; }
    body.az-login-page .az-register { margin-top: 6px; }
    body.az-login-page .az-socials a { width: 34px; height: 34px; }
    body.az-login-page .az-socials svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    body.az-login-page * { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Soporte de modales (Registro / Confirmar cuenta) — migrado del
   <style> inline y de login-register.css para conservar su apariencia.
   ===================================================================== */
.grecaptcha-badge { visibility: hidden; }
#email { text-transform: initial; }
input.error { border: 1px solid #cb2929; background: #fbebeb; }
.loader { display: none; height: 500px; }
.loader img { margin: 0 auto; display: block; }
.loadLogin .loader { display: block !important; }
.loadLogin .modal-body .userBox,
.loadLogin .modal-footer { display: none; }
#showPassword {
    position: absolute; top: 0; right: 0; padding: 5px 15px; margin-top: 0;
    font-size: 22px; border-left: 1px solid #bcbec3; cursor: pointer;
}
#ddlCompanyRole { margin-bottom: 7px; height: 40px; }
#termsCondition a.anchor { font-weight: 600; font-size: 13px; }
.mgl20 { margin-left: 20px; }
#confirmForm p { font-weight: bold; }
#lisenceType hr { float: right; width: 55%; margin-top: 10px; }
.ErrorMessage { text-transform: none; }
label.error { color: #cb2929; font-weight: 600; font-size: 14px; display: block; margin-left: 10px; margin-top: 5px; margin-bottom: 0; }
p.signUptext { font-size: 25px; font-weight: 500; color: #2f7be9; padding: 10px; margin: 0; }
#newSignupForm label.fntbld { font-weight: 500; }
#newSignupForm input { padding: 0.7rem 0.80rem; font-size: 15px; }
#confirmAccountModal .modal-footer { border-top: 1px solid #e9e9e9; }
#confirmAccountModal .modal-header { border-bottom: 1px solid #e9e9e9; }

/* =====================================================================
   Modal de Registro — rediseño profesional (primera vista del usuario).
   Solo apariencia; conserva todos los ids/hooks del JS.
   ===================================================================== */
/* Centrado vertical estándar de Bootstrap (funciona ahora que anulamos el
   transform que el tema dejaba sin resetear). Conserva el ancho del diálogo. */
#SignupModal .modal-dialog { max-width: 720px; width: 100%; margin: .5rem auto; transform: none !important; }
#SignupModal.modal { overflow-y: auto; width: 100%; }
#SignupModal .modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 1rem); }
#SignupModal .modal-content { width: 100%; max-height: calc(100vh - 1rem); overflow: hidden; }
#SignupModal .modal-header, #SignupModal .modal-footer { flex-shrink: 0; }
#SignupModal .modal-body { overflow-y: auto; }
#SignupModal .modal-content {
    border: none; border-radius: 18px; overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(15, 37, 71, .45);
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header con degradado de marca */
#SignupModal .az-signup-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 24px 26px 20px; border: none; color: #fff;
    background: radial-gradient(120% 130% at 100% 0%, rgba(74, 158, 255, .5) 0%, rgba(74, 158, 255, 0) 55%),
                linear-gradient(155deg, #0f2547 0%, #1c4a92 100%);
}
#SignupModal .az-signup-title {
    font-family: "Plus Jakarta Sans", "Open Sans", sans-serif;
    font-weight: 800; font-size: 21px; letter-spacing: -.01em; margin: 0 0 5px; color: #fff; text-transform: none;
}
#SignupModal .az-signup-sub { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .82); text-transform: none; line-height: 1.5; }
#SignupModal .az-signup-header .close {
    color: #fff; opacity: .85; text-shadow: none; font-size: 26px; line-height: 1; font-weight: 400; margin: -4px -4px 0 0;
}
#SignupModal .az-signup-header .close:hover { opacity: 1; }

/* Cuerpo */
#SignupModal .modal-body { padding: 22px 26px 8px; }
#SignupModal .az-signup-intro {
    font-size: 13.5px; color: #55617a; text-transform: none; margin: 0 0 12px; line-height: 1.5; text-align: center;
}
#SignupModal .az-signup-benefits {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 18px;
}
#SignupModal .az-benefit {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600; color: #16233d; text-transform: none;
    background: rgba(47, 123, 233, .08); border: 1px solid rgba(47, 123, 233, .18);
    padding: 6px 12px; border-radius: 999px;
}
#SignupModal .az-benefit i { color: #22a06b; font-size: 13px; }

/* Grid de dos columnas: Personal | Negocio */
#SignupModal .az-signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
#SignupModal .az-signup-col { position: relative; }
#SignupModal .az-signup-col + .az-signup-col { padding-left: 28px; border-left: 1px solid #eef1f6; }
#SignupModal .az-signup-legend {
    display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
    font-family: "Plus Jakarta Sans", "Open Sans", sans-serif; font-weight: 700; font-size: 12px;
    text-transform: uppercase; letter-spacing: .08em; color: #2f7be9;
}
#SignupModal .az-signup-legend i { font-size: 15px; }

#SignupModal .az-signup-field { margin-bottom: 13px; position: relative; }
#SignupModal .az-signup-label {
    display: block; font-size: 12px; font-weight: 600; color: #55617a;
    text-transform: none; margin-bottom: 5px;
}
#SignupModal .form-control {
    height: 44px; width: 100%; border: 1px solid #e2e8f2; border-radius: 10px; background: #f5f8fc;
    font-size: 14px; padding: 0 14px; box-shadow: none; text-transform: none; color: #16233d;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
#SignupModal select.form-control { height: 44px; }
#SignupModal .form-control:focus {
    border-color: #2f7be9; background: #fff; box-shadow: 0 0 0 3px rgba(47, 123, 233, .12); outline: none;
}

/* Contraseña + ojo (anclado al input, no al campo, para no romperse con el error) */
#SignupModal .az-eye-wrap { position: relative; }
#SignupModal #password { padding-right: 44px; }
#SignupModal #showPassword {
    position: absolute; border-left: none; font-size: 18px; color: #8a94a8;
    right: 4px; top: 0; bottom: auto; height: 44px; display: flex; align-items: center; padding: 0 12px;
    margin: 0; cursor: pointer;
}

/* Términos (fila completa bajo el grid) */
#SignupModal .az-signup-terms {
    display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 4px;
    padding: 14px; background: #f5f8fc; border: 1px solid #eef1f6; border-radius: 12px;
}
#SignupModal .az-signup-terms .leftDiv { margin-top: 2px !important; }
#SignupModal .az-signup-terms p { margin: 0; font-size: 12px; color: #55617a; text-transform: none; line-height: 1.5; }
#SignupModal .az-signup-terms a.anchor { color: #2f7be9; font-weight: 600; }

@media (max-width: 575px) {
    #SignupModal .az-signup-grid { grid-template-columns: 1fr; }
    #SignupModal .az-signup-col + .az-signup-col { padding-left: 0; border-left: none; border-top: 1px solid #eef1f6; padding-top: 14px; margin-top: 4px; }
}

/* Footer */
/* Estados de validación (jQuery Validate) */
#SignupModal label.az-invalid {
    display: block; color: #d9534f; font-size: 12px; font-weight: 600;
    margin-top: 4px; text-transform: none;
}
#SignupModal .form-control.az-input-error {
    border-color: #d9534f !important; box-shadow: 0 0 0 3px rgba(217, 83, 79, .12) !important;
}

#SignupModal .modal-footer { border-top: 1px solid #eef1f6; padding: 16px 26px 20px; }
#SignupModal #signupUser {
    background: #2f7be9 !important; background-image: none !important; border: none !important;
    border-radius: 10px; height: 46px; color: #fff !important;
    font-family: "Plus Jakarta Sans", "Open Sans", sans-serif; font-weight: 700; font-size: 15px;
    text-transform: none; box-shadow: 0 12px 22px -10px rgba(47, 123, 233, .6) !important;
    transition: background-color .15s, box-shadow .15s;
}
#SignupModal #signupUser:hover { background: #2266cf !important; box-shadow: 0 14px 26px -10px rgba(34, 102, 207, .7) !important; }
