/* Login de selección docente: valores del prototipo «Selección Docente Posgrado» (variante Cartel, LV='k') */

:root {
    --lg-navy: #002E45;
    --lg-navy-2: #264763;
    --lg-orange: #FC7E00;
    --lg-o-txt: #B84A00;
    --lg-blue: #3C7AA0;
    --lg-field: #C6D0D9;
    --lg-muted: #627378;
    --lg-txt: #222223;
    --lg-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Overrides del layout de login/base.html (antes en el <style> inline) */
body { background: #EEF3F7; }
.container { max-width: 100%; padding-left: 0; padding-right: 0; }
/* ocultos por CSS y no con .hide(): en JS se esconden despues del primer paint y parpadean */
.bg-sga, .bg-sga-2, #footer, .bg-footer { display: none !important; }

.lgK { min-height: 100dvh; background: #EEF3F7; display: flex; flex-direction: column; padding-bottom: 1.25rem; font-family: var(--lg-font); font-size: 1rem; line-height: 1.55; color: var(--lg-txt); -webkit-font-smoothing: antialiased; }
.lgK p { margin: 0; }
.lgK .i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lgK-main { flex: 1; display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) 1rem max(1rem, env(safe-area-inset-left, 0px)); }

.k-card { width: 100%; max-width: 58rem; background: #fff; border-radius: 2rem; padding: .6rem; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); box-shadow: 0 24px 60px rgba(0, 46, 69, .10); }
.k-art { background: linear-gradient(170deg, #F3F8FB 0%, #DAEAF2 100%); border-radius: 1.6rem; padding: 1.75rem 1.75rem .5rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.k-logo { height: 2rem; width: auto; align-self: flex-start; margin-bottom: 1.1rem; }
.k-pre { font-weight: 600; color: #335F7F; font-size: 1rem; }
.k-big { font-size: clamp(2.1rem, 3.2vw, 2.75rem); font-weight: 700; line-height: 1; color: var(--lg-navy); letter-spacing: -.02em; max-width: 9ch; margin-top: .3rem !important; }
.k-ilus { margin-top: auto; width: 100%; max-width: 18rem; height: auto; align-self: center; }
.k-form { padding: 1.5rem 2.25rem; display: flex; flex-direction: column; gap: 1.1rem; }
.k-in { flex: 1; display: grid; align-content: center; width: 100%; }

/* Marca «Selección docente · Posgrado» */
.lg-marca { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.4rem; letter-spacing: -.01em; color: var(--lg-navy); white-space: nowrap; }
.lg-marca .mk { width: 2.3rem; height: 2.3rem; border-radius: .7rem; background: var(--lg-orange); color: #001A28; display: grid; place-items: center; flex: none; }
.lg-marca .mk .i { width: 1.25rem; height: 1.25rem; }
.lg-marca small { font-size: .8rem; font-weight: 600; color: var(--lg-muted); letter-spacing: 0; align-self: flex-end; margin-bottom: .2rem; }

/* Formulario */
.lform { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.15rem; }
.lform .lh1 { font-family: var(--lg-font); letter-spacing: normal; font-size: 2rem; font-weight: 700; color: var(--lg-txt); line-height: 1.55; margin: 0; }
.lform .lsub { font-size: 1rem; color: var(--lg-txt); }
.lfield { display: grid; gap: .25rem; align-content: start; }
.lfield > label, .lbl-row label { font-size: .9375rem; font-weight: 600; color: var(--lg-navy); margin: 0; }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.lforgot { font-size: .82rem; font-weight: 600; color: var(--lg-navy-2); text-decoration: none; }
.lforgot:hover, .lforgot:focus-visible { color: var(--lg-o-txt); text-decoration: underline; text-underline-offset: 3px; }
.lwrap { display: flex; align-items: stretch; min-height: 56px; border: 1px solid var(--lg-field); border-radius: 9px; background: #fff; }
.lwrap:focus-within { border-color: var(--lg-blue); box-shadow: 0 0 0 3px rgba(60, 122, 160, .22); }
.lwrap .lic { width: 1.15rem; height: 1.15rem; color: #71869A; margin: 0 .1rem 0 1rem; align-self: center; flex: none; }
.lwrap input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 15px 12px; font-size: 16px; color: var(--lg-navy); outline: none; font-family: inherit; }
.lpw-t { flex: 0 0 3.25rem; display: grid; place-items: center; border: 0; background: transparent; color: #71869A; cursor: pointer; border-radius: 0 9px 9px 0; }
.lpw-t:hover { color: var(--lg-blue); }

/* Botón Entrar */
.bv2 { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; border: 0; border-radius: 999px; background: var(--lg-navy); color: #fff; font-weight: 700; font-size: 1.05rem; font-family: inherit; padding: .4rem .45rem .4rem 1.4rem; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 46, 69, .25); }
.bv2:hover { background: var(--lg-navy-2); }
.bv2 > span:first-child { flex: 1; text-align: center; padding-left: 2.4rem; }
.bv2-dot { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--lg-orange); color: #001A28; display: grid; place-items: center; flex: none; transition: transform .15s; }
.bv2-dot .i { stroke-width: 2.8; }
.bv2:hover .bv2-dot { transform: translateX(2px); }
.bv2:focus-visible { outline: 3px solid var(--lg-orange); outline-offset: 3px; }
.bv2[disabled] { cursor: progress; }

.lacc { color: var(--lg-muted); font-size: .875rem; text-align: left; }
.lacc .link { display: inline-block; min-height: 24px;font-weight: 700; color: var(--lg-navy-2); text-decoration: none; }
.lacc .link:hover { text-decoration: underline; text-underline-offset: 3px; }

.k-form .h-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* El tema pisa etiquetas e inputs (peso 700, line-height 20px, radio y sombra de Bootstrap) */
.lform .lfield label { font-weight: 600; }
.lwrap input, .lwrap input:focus { line-height: 1.55; height: auto; border-radius: 0; box-shadow: none; }
.lpw-t { font: inherit; }

/* Barra superior: solo «Accesibilidad» (lgTools del prototipo) */
.lgK > .lg-tools { display: flex; gap: .25rem; align-self: flex-end; padding: .75rem max(1rem, env(safe-area-inset-right, 0px)) 0 1rem; position: relative; z-index: 1; }
.lg-wrap { position: relative; }
.lg-tbtn { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .4rem .7rem; border: 0; border-radius: .5rem; background: transparent; color: var(--lg-navy); font-weight: 600; font-size: .875rem; font-family: inherit; cursor: pointer; }
.lg-tbtn:hover { background: rgba(255, 255, 255, .25); }
.lg-pop { position: absolute; right: 0; top: calc(100% + .5rem); width: 21rem; max-width: calc(100vw - 1.5rem); background: #fff; color: var(--lg-txt); border: 1px solid #D5DCE0; border-radius: .75rem; box-shadow: 0 10px 40px rgba(0, 26, 40, .25); z-index: 50; overflow: hidden; text-align: left; }
.lg-pop h2 { font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--lg-navy); letter-spacing: normal; line-height: 1.55; margin: 0; padding: 14px 16px 10px; border-bottom: 1px solid #D5DCE0; }
.a11y { padding: 0 1rem 1rem; display: grid; gap: .6rem; font-size: .875rem; }
.a11y .sec { color: #5B6B70; font-size: .875rem; padding-top: .6rem; }
.a11y .segz { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; }
.a11y .segz button { min-height: 2.5rem; border: 1px solid #D5DCE0; background: #fff; border-radius: .5rem; font-weight: 600; font-family: inherit; cursor: pointer; color: var(--lg-navy); }
.a11y .segz button[aria-pressed="true"] { background: var(--lg-navy); color: #fff; border-color: var(--lg-navy); }
.lg-pop .a11y label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 2.5rem; border-top: 1px solid #D5DCE0; margin: 0; font-weight: 400; }
html.ul a { text-decoration: underline !important; }

.lg-foot { text-align: center; font-size: .75rem; color: #46555C; padding: 1.25rem 1rem 1.5rem; }

@media (prefers-reduced-motion: reduce) {
    .bv2-dot { transition: none; }
}

@media (max-width: 991.98px) {
    .lgK { padding-bottom: 7.5rem; }
    .k-card { max-width: 72rem; border-radius: 2.5rem; padding: .75rem; grid-template-columns: minmax(0, 1fr); }
    .k-art { padding: 1.5rem; }
    .k-ilus { display: none; }
    .k-big { font-size: 2.2rem; }
    .k-logo { height: 1.6rem; margin-bottom: 1rem; }
    .k-form { padding: 2rem 3rem; gap: 1.5rem; }
}

@media (max-width: 575.98px) {
    .lg-marca { font-size: 1.15rem; white-space: normal; line-height: 1.1; }
    .lg-marca .mk { width: 2rem; height: 2rem; }
    .lg-marca small { display: none; }
    .lg-tbtn .lbl-t { display: none; }
    .bv2 > span:first-child { padding-left: 0; }
    .k-form { padding: 1rem .75rem; }
}

/* Modal de recuperación: estilo de modal() del prototipo (.modal .m-h .m-b .m-f) */
#recuperarModal { font-family: var(--lg-font); }
#recuperarModal .modal-content { border: 0; border-radius: 16px !important; box-shadow: 0 10px 40px rgba(0, 26, 40, .25) !important; overflow: hidden; }
#recuperarModal .modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid #D5DCE0; gap: .75rem; }
#recuperarModal .modal-title { margin: 0; font-size: 1.125rem; font-weight: 600 !important; color: var(--lg-navy); line-height: 1.35; font-family: inherit; }
#recuperarModal .modal-title b { font-weight: 600; }
#recuperarModal .btn-close { width: 2.75rem; height: 2.75rem; padding: 0; margin: 0 0 0 auto; border-radius: 10px; opacity: 1; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23264763' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 1.15rem no-repeat; box-shadow: none; }
#recuperarModal .btn-close:hover { background-color: #ECF2F6; }
#recuperarModal .modal-body { padding: 1.25rem; display: grid; gap: 1rem; }
#recuperarModal .modal-body > .mb-3 { margin-bottom: 0 !important; }
#recuperarModal .form-label { font-size: .875rem; font-weight: 600 !important; color: var(--lg-txt); margin-bottom: .25rem; }
#recuperarModal .form-control { min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--lg-field); border-radius: 9px; font-size: 1rem; line-height: 1.55; color: var(--lg-txt); font-family: inherit; }
#recuperarModal .form-control:focus { border-color: var(--lg-blue); box-shadow: 0 0 0 3px rgba(60, 122, 160, .22); }
#recuperarModal .input-group { align-items: stretch; flex-wrap: nowrap; }
#recuperarModal .btn-info { min-width: 44px; min-height: 44px; border-radius: 0 9px 9px 0; background: var(--lg-navy); border-color: var(--lg-navy); color: #fff; }
#recuperarModal .btn-info:hover { background: var(--lg-navy-2); border-color: var(--lg-navy-2); }
#recuperarModal .modal-footer { padding: .875rem 1.25rem; border-top: 1px solid #D5DCE0; background: #F7F9FA; gap: .5rem; }
#recuperarModal .modal-footer .btn { min-height: 44px; padding: .6rem .7rem !important; border-radius: 10px !important; font-size: 1rem !important; font-weight: 600 !important; line-height: 1.3 !important; font-family: inherit; }
#recuperarModal .modal-footer .nd-modal-submit { padding: .6rem 1.15rem !important; }
#recuperarModal .modal-footer > * { margin: 0; }
#recuperarModal .nd-modal-submit { display: inline-flex; align-items: center; gap: .5rem; }
#recuperarModal .i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#recuperarModal .btn-cian-secondary { background: transparent !important; border: 1px solid transparent !important; color: var(--lg-navy-2) !important; }
#recuperarModal .btn-cian-secondary:hover { background: #ECF2F6 !important; }
#recuperarModal .btn-cian-secondary .fa { display: none; }
#recuperarModal .nd-modal-submit { min-height: 44px; border-radius: 10px; background: var(--lg-navy) !important; border-color: var(--lg-navy) !important; color: #fff !important; font-weight: 600; }
#recuperarModal .nd-modal-submit:hover:not(:disabled) { background: var(--lg-navy-2) !important; border-color: var(--lg-navy-2) !important; }
#recuperarModal .nd-modal-submit:disabled { opacity: .75; }

/* Registro de postulante (vRegistro del prototipo: .lg.lg-reg, banda azul y tarjeta .lcard.wide.reg) */
.lg { min-height: 100dvh; padding-bottom: 4rem; background: #F5F7FA; display: flex; flex-direction: column; font-family: var(--lg-font); font-size: 1rem; line-height: 1.55; color: var(--lg-txt); -webkit-font-smoothing: antialiased; }
.lg p, .lg h1, .lg h2 { margin: 0; }
.lg .i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg .bv2-dot .i { stroke-width: 2.8; }
.lg-band { background: linear-gradient(165deg, #002E45 0%, #0B4062 100%); color: #fff; padding-block: 1.25rem 7.5rem; padding-left: max(clamp(1rem, 4vw, 4rem), env(safe-area-inset-left, 0px)); padding-right: max(clamp(1rem, 4vw, 4rem), env(safe-area-inset-right, 0px)); }
.lg-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lg-lock { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.lg-lock img { height: 2.6rem; width: auto; max-width: 100%; }
.lg-sep { width: 1px; align-self: stretch; min-height: 2.2rem; background: rgba(255, 255, 255, .35); }
.lg-band .lg-marca { color: #fff; }
.lg-band .lg-marca small { color: #C5D8E6; }
.lg-band .lg-tools { display: flex; gap: .25rem; }
.lg-band .lg-tbtn { color: #fff; }
.lg-band .lg-tbtn:hover { background: rgba(255, 255, 255, .12); }
.lg-tit { max-width: 46rem; margin: 2.2rem auto 0; text-align: center; }
.lg-tit h1 { font-family: var(--lg-font); font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 700; line-height: 1.12; letter-spacing: normal; color: #fff; text-wrap: balance; }
.lg-tit h1 em { font-style: normal; color: var(--lg-orange); }
.lg-main { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: start; align-content: start; margin-top: -5.5rem; padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px)); position: relative; flex: 1; }
.lcard { width: 100%; max-width: 33rem; background: #fff; border: 1px solid #D5DCE0; border-radius: 1.125rem; box-shadow: 0 2px 4px rgba(0, 46, 69, .04), 0 18px 40px rgba(0, 46, 69, .10); padding: 2.5rem 2.75rem 2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.15rem; align-content: start; }
.lcard.wide { max-width: 44rem; }
.lcard h2.lh1 { font-family: var(--lg-font); font-size: 1.75rem; font-weight: 700; color: var(--lg-navy); line-height: 1.2; letter-spacing: normal; }
.lcard .lsub { color: var(--lg-muted); font-size: .95rem; margin-top: .35rem; }
.lg .lacc { text-align: center; }
.lg .lacc .link { min-height: 1.5rem; }
.reg { width: 100%; max-width: 40rem; display: grid; }  /* el gap lo da .lcard, como en el prototipo */
.reg fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; min-width: 0; }
.reg legend { float: none; width: auto; font-family: var(--lg-font); font-size: 1.125rem; font-weight: 600; line-height: 1.55; color: var(--lg-navy); padding: 0; margin-bottom: .75rem; }
.reg .form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
.reg .form.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reg .form.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reg .form .span2 { grid-column: span 2; width: auto; margin-left: 0; float: none; }  /* .span2 del tema (Bootstrap 2) le pone ancho fijo */
.reg .field { display: grid; gap: .25rem; align-content: start; min-width: 0; }
.reg .field > label { font-size: .875rem; font-weight: 600; line-height: 1.55; color: var(--lg-txt); margin: 0; }
.reg .field > label .sec { color: #5B6B70; font-weight: 600; }
.reg .field .help { font-size: .875rem; color: #5B6B70; }
/* Inputs de Django (sin clase .inp) y select2 con la medida de .inp */
.reg .field input, .reg .field input:focus { width: 100%; min-height: 2.75rem; height: auto; border: 1px solid var(--lg-field); border-radius: .5625rem; padding: .5rem .75rem; background: #fff; font-family: inherit; font-size: 1rem; line-height: 1.55; color: var(--lg-txt); box-shadow: none; }
.reg .field input:focus { outline: none; border-color: var(--lg-blue); box-shadow: 0 0 0 3px rgba(60, 122, 160, .25); }
.reg .field input::placeholder { color: #6C757D; opacity: 1; font-size: 1rem; }
.reg .field input.is-invalid { border-color: #A8323A; }
.reg .select2-container--default .select2-selection--single { height: auto; min-height: 2.75rem; display: flex; align-items: center; border: 1px solid var(--lg-field); border-radius: .5625rem; padding: .5rem .75rem; background: #fff; }
.reg .select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0 1.5rem 0 0; line-height: 1.55; font-size: 1rem; color: var(--lg-txt); }
.reg .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--lg-txt); }
.reg .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; top: 0; right: .5rem; }
.reg .select2-container--default.select2-container--focus .select2-selection--single, .reg .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--lg-blue); box-shadow: 0 0 0 3px rgba(60, 122, 160, .25); }
.reg .field .mensaje_error { display: flex; gap: .25rem; align-items: center; margin: 0; padding: 0; font-size: .875rem; line-height: 1.55; color: #9E2F3C; }
.reg .field .mensaje_error:empty { display: none; }
.reg .campo-bloqueado { background-color: #EEF0F4 !important; cursor: not-allowed; }
.lg .lg-foot { color: #627378; }

@media (min-width: 992px) {
    .lg-reg .lg-band { padding-block: 1rem 4.75rem; }
    .lg-reg .lg-tit { margin-top: .75rem; }
    .lg-reg .lg-tit h1 { font-size: 2rem; }
    .lg-reg .lg-main { margin-top: -3.5rem; }
    .lg-reg .lcard.wide { max-width: 64rem; padding: 1.75rem 2.25rem 1.5rem; gap: 1.1rem; }
    .lg-reg .reg { max-width: 64rem; }
    .lg-reg .reg fieldset { gap: .5rem; }
    .lg-reg .reg legend { font-size: 1rem; margin-bottom: .5rem; }
    .lg-reg .lcard h2.lh1 { font-size: 1.4rem; }
    .lg-reg .reg .bv2 { max-width: 22rem; justify-self: center; width: 100%; }
}
@media (max-width: 991.98px) {
    .reg .form.c4, .reg .form.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lcard { padding: 1.5rem 1.25rem; border-radius: .875rem; }
    .lg-band { padding-bottom: 4.4rem; }
    .lg-main { margin-top: -3.4rem; }
}
@media (max-width: 767.98px) {
    .reg .form.c3 { grid-template-columns: minmax(0, 1fr); }
    .reg .form .span2 { grid-column: auto; }
}
@media (max-width: 575.98px) {
    .reg .form.c4 { grid-template-columns: minmax(0, 1fr); }
    .lg-band { padding-block: .6rem 4.4rem; }
    .lg-tit { margin-top: .6rem; }
    .lg-tit h1 { font-size: 1.5rem; }
    .lg-sep { display: none; }
    .lg-lock { gap: .6rem; }
    .lg-lock img { height: 1.8rem; }
    .lcard h2.lh1 { font-size: 1.5rem; }
}
@media (max-width: 374.98px) {
    .lg-lock img { display: none; }
}
