/* ==========================================================================
   SIACS v2 - Login de Usuarios y Funcionarios
   Paleta del dashboard del administrador (dashboardv2.css):
   navy #0c2142 / #14305e / #1d4280 / #2a5aa0 - acento #4a90e2 - claro #a9c8f0
   Usado en: core/views/user/login_user y core/views/admin/login_func
   ========================================================================== */

/* Oculta banner y pie del layout publico solo en estas vistas */
#header,
#footer { display: none !important; }
html, body { background: #eef3fa !important; }
body { font-family: "Inter", "Quicksand", "Helvetica Neue", Arial, sans-serif; }

/* --------------------------------------------------------------------------
   Estructura: panel visual (izq) + panel de acceso (der)
   -------------------------------------------------------------------------- */
#contentL.lg-page {
    display: flex;
    min-height: 100vh;
    padding: 0 !important;
    margin: 0;
    width: 100%;
    background: #eef3fa;
}

/* ---------------------------- Panel visual ------------------------------- */
.lg-hero {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    flex: 0 0 58%;
    height: 100vh;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 30% 35%, rgba(74, 144, 226, .35) 0%, rgba(74, 144, 226, 0) 45%),
        linear-gradient(150deg, #0c2142 0%, #14305e 40%, #1d4280 75%, #2a5aa0 100%);
    transition: flex-basis .35s ease;
}
/* Cuadricula sutil */
.lg-hero::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    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: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
/* Arco curvo hacia el panel de acceso */
.lg-hero::after {
    content: "";
    position: absolute;
    top: -10%;
    right: -160px;
    width: 320px;
    height: 120%;
    border-radius: 50%;
    background: #eef3fa;
    box-shadow: -10px 0 0 0 #4a90e2, -22px 0 0 0 rgba(74, 144, 226, .35);
}

.lg-hero__brand {
    position: absolute;
    top: 28px;
    left: 36px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}
.lg-hero__brand img {
    height: 42px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .95);
}
.lg-hero__brand span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #a9c8f0;
}

/* Escudo central con iconos orbitando */
.lg-shield {
    position: absolute;
    top: 42%;
    left: 44%;
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    z-index: 1;
}
.lg-shield__ring {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: 50%;
    border: 2px solid rgba(169, 200, 240, .35);
}
.lg-shield__ring--2 {
    top: 34px; right: 34px; bottom: 34px; left: 34px;
    border: 2px dashed rgba(74, 144, 226, .6);
    animation: lgRotate 40s linear infinite;
}
.lg-shield__ring--3 {
    top: 70px; right: 70px; bottom: 70px; left: 70px;
    border: 0;
    background: radial-gradient(circle, rgba(74, 144, 226, .45) 0%, rgba(29, 66, 128, .2) 70%);
    box-shadow: 0 0 60px rgba(74, 144, 226, .55), inset 0 0 30px rgba(169, 200, 240, .35);
}
.lg-shield__core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    color: #fff;
    text-shadow: 0 0 24px rgba(74, 144, 226, .9);
    animation: lgFloat 4s ease-in-out infinite;
}
.lg-shield__core .fa-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    font-size: 30px;
    color: #1d4280;
    text-shadow: none;
}
.lg-orbit {
    position: absolute;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: rgba(20, 48, 94, .65);
    border: 1px solid rgba(169, 200, 240, .55);
    box-shadow: 0 0 18px rgba(74, 144, 226, .45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: lgFloat 5s ease-in-out infinite;
}
.lg-orbit--1 { top: 6%;  left: 50%; animation-delay: 0s; }
.lg-orbit--2 { top: 28%; left: 96%; animation-delay: .6s; }
.lg-orbit--3 { top: 74%; left: 94%; animation-delay: 1.2s; }
.lg-orbit--4 { top: 96%; left: 50%; animation-delay: 1.8s; }
.lg-orbit--5 { top: 74%; left: 6%;  animation-delay: 2.4s; }
.lg-orbit--6 { top: 28%; left: 4%;  animation-delay: 3s; }

.lg-hero__copy {
    position: absolute;
    left: 48px;
    right: 200px;
    bottom: 56px;
    z-index: 2;
}
.lg-hero__copy h2 {
    margin: 0 0 12px;
    font-size: 40px;
    font-weight: 300;
    line-height: 1.15;
    color: #fff;
}
.lg-hero__copy h2 strong { font-weight: 800; }
.lg-hero__copy p {
    margin: 0;
    max-width: 440px;
    font-size: 14px;
    line-height: 1.6;
    color: #a9c8f0;
}

/* --------------------------- Panel de acceso ----------------------------- */
.lg-panel {
    flex: 1 1 42%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    position: relative;
    z-index: 2;
}
#loginbox.lg-card {
    float: none;
    width: 100%;
    max-width: 440px;
    margin: 0 !important;
    padding: 36px 36px 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
    border: 1px solid #dbe5f3;
    box-shadow: 0 24px 60px rgba(12, 33, 66, .14), 0 2px 6px rgba(12, 33, 66, .06);
    animation: lgIn .5s ease-out both;
    transition: max-width .35s ease;
}
.lg-card .panel {
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.lg-card .panel-heading,
.lg-card .panel-body { padding: 0 !important; background: transparent; border: 0; }

.lg-head { text-align: center; margin-bottom: 24px; }
.lg-head__logo {
    display: block;
    height: 74px;
    max-width: 220px;
    margin: 0 auto 14px;
    object-fit: contain;
}
.lg-head__system {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #14305e;
}
.lg-head__version {
    margin: 6px 0 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #1d4280;
}
.lg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #1d4280;
    background: #e3ecf8;
}

/* Campos tipo pill */
.lg-card .lg-field {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 14px !important;
    border: 1px solid #cfdaea !important;
    border-radius: 999px !important;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.lg-card .lg-field:focus-within {
    border-color: #4a90e2 !important;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, .18);
}
/* Estados de validacion que asigna el backend por estilo en linea */
.lg-card .lg-field[style*="#009900"] { border-color: #2e9d5b !important; box-shadow: 0 0 0 3px rgba(46, 157, 91, .15); }
.lg-card .lg-field[style*="#ff3333"] { border-color: #d64545 !important; box-shadow: 0 0 0 3px rgba(214, 69, 69, .15); }
.lg-card .lg-field .input-group-addon {
    width: auto;
    padding: 0 6px 0 18px;
    border: 0;
    background: transparent;
    color: #4a6a99;
    font-size: 15px;
}
.lg-card .lg-field .input-group-addon { flex: 0 0 auto; }
.lg-card .lg-field .form-control {
    flex: 1 1 auto;
    min-width: 0;
    float: none;
    height: 46px;
    padding: 0 18px 0 8px;
    border: 0;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px;
    color: #14305e;
}
.lg-card .lg-field .form-control::placeholder { color: #8a9bb5; }
.lg-card .lg-field .form-control[disabled] { cursor: not-allowed; opacity: .6; }
.lg-toggle-pass {
    flex: 0 0 auto;
    margin-right: 8px;
    padding: 6px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #4a6a99;
    cursor: pointer;
}
.lg-toggle-pass:hover { background: #eef3fa; color: #1d4280; }

.lg-row-link {
    display: flex;
    justify-content: flex-end;
    margin: -4px 4px 18px;
    font-size: 12px;
}
.lg-card a { color: #1d4280; font-weight: 600; text-decoration: none; cursor: pointer; }
.lg-card a:hover { color: #4a90e2; text-decoration: none; }

/* Mensajes */
#estatus label,
#valPass label {
    display: block;
    margin: 0 0 8px 14px;
    font-size: 12px;
    font-weight: 600;
}
#divMessage:not(:empty) {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #f5c2c2;
    background: #fdecec;
    font-size: 12px;
    line-height: 1.45;
}

/* Botones */
.lg-card .lg-btn {
    display: block;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #fff !important;
    background: linear-gradient(90deg, #14305e 0%, #1d4280 50%, #2a5aa0 100%) !important;
    box-shadow: 0 10px 22px rgba(29, 66, 128, .3);
    text-shadow: none;
    transition: transform .15s, box-shadow .2s, filter .2s;
}
.lg-card .lg-btn:hover,
.lg-card .lg-btn:focus { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 26px rgba(29, 66, 128, .38); outline: none; }
.lg-card .lg-btn[disabled] { opacity: .55; transform: none; box-shadow: none; cursor: not-allowed; }
.lg-card .lg-btn-ghost {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 10px;
    border: 1px solid #cfdaea;
    border-radius: 999px;
    background: #fff !important;
    color: #1d4280 !important;
    font-size: 14px;
    font-weight: 600;
    text-shadow: none;
    box-shadow: none;
    transition: border-color .2s, background .2s;
}
.lg-card .lg-btn-ghost:hover { border-color: #4a90e2; background: #f3f7fd !important; }

.lg-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 6px;
    font-size: 12px;
    color: #8a9bb5;
}
.lg-divider::before,
.lg-divider::after { content: ""; flex: 1; height: 1px; background: #dbe5f3; }
.lg-register { text-align: center; font-size: 13px; color: #4a6a99; }

.lg-foot {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid #e3ebf6;
    text-align: center;
    font-size: 11px;
    color: #8a9bb5;
}

/* ----------------- Registro / Recuperar (solo usuarios) ------------------ */
/* Cuando el login se oculta (registro o recuperar), el formulario gana ancho */
.lg-page:has(#divLogin[style*="none"]) .lg-hero { flex-basis: 34%; }
.lg-page:has(#divLogin[style*="none"]) #loginbox.lg-card { max-width: 760px; }

.lg-alt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #e3ebf6 !important;
}
.lg-alt-head .panel-title { font-size: 16px; font-weight: 700; color: #14305e; }
.lg-alt-head > br { display: none; }
.lg-alt-head #regresar {
    float: none !important;
    top: 0 !important;
    font-size: 12px !important;
    padding: 6px 14px;
    border-radius: 999px;
    background: #eef3fa;
}
.lg-card .bg_title {
    width: 100%;
    margin: 6px 0 14px;
    padding: 8px 12px;
    border: 0;
    border-left: 4px solid #1d4280;
    border-radius: 8px;
    background: #eef3fa;
    color: #14305e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
}
.lg-card #divRegistro .row,
.lg-card #divRecuperar .row { margin-left: 0; margin-right: 0; }
.lg-card #divRegistro .form-group,
.lg-card #divRecuperar .form-group { margin-bottom: 4px; }
.lg-card #divRegistro .der,
.lg-card #divRecuperar .der { text-align: left; }
.lg-card #divRegistro label,
.lg-card #divRecuperar label { font-size: 12px; font-weight: 600; color: #4a6a99; }
.lg-card #divRegistro .form-control,
.lg-card #divRecuperar .form-control {
    height: 40px;
    border: 1px solid #cfdaea;
    border-radius: 10px;
    box-shadow: none;
}
.lg-card #divRegistro .form-control:focus,
.lg-card #divRecuperar .form-control:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, .18);
}
.lg-card #divRegistro .input-group-addon,
.lg-card #divRecuperar .input-group-addon {
    border: 1px solid #cfdaea;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: #f3f7fd;
    color: #4a6a99;
}
.lg-card #divRegistro .input-group .form-control { border-radius: 0 10px 10px 0; }
.lg-card #divRegistro .btn,
.lg-card #divRecuperar .btn {
    padding: 9px 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #14305e, #1d4280) !important;
    color: #fff !important;
    font-weight: 700;
    text-shadow: none;
}
.lg-card #divRegistro .btn[disabled],
.lg-card #divRecuperar .btn[disabled] { opacity: .5; }
.lg-card #divRegistro .camp_ast,
.lg-card #divRecuperar .camp_ast { color: #d64545; }
.lg-card #divRegistro a.camp_ast,
.lg-card #divRecuperar a.camp_ast { color: #1d4280; }
.lg-card #aviso2 { font-size: 12px; color: #4a6a99; }
.lg-card #aviso2 h5, .lg-card #aviso2 h6 { color: #14305e; font-weight: 700; }
.lg-page #back-top { display: none !important; }

/* ------------------------------ Animaciones ------------------------------ */
@keyframes lgRotate { to { transform: rotate(360deg); } }
@keyframes lgFloat  { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes lgIn     { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .lg-shield__ring--2, .lg-shield__core, .lg-orbit, #loginbox.lg-card { animation: none; }
}

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 1199px) {
    .lg-hero { flex-basis: 50%; }
    .lg-hero__copy h2 { font-size: 32px; }
    .lg-hero__copy { right: 150px; }
    .lg-shield { transform: scale(.85); }
}
@media (max-width: 991px) {
    #contentL.lg-page { flex-direction: column; }
    .lg-hero,
    .lg-page:has(#divLogin[style*="none"]) .lg-hero {
        position: relative;
        flex: 0 0 auto;
        height: 230px;
    }
    .lg-hero::after {
        top: auto;
        right: -10%;
        bottom: -140px;
        width: 120%;
        height: 200px;
        box-shadow: 0 -8px 0 0 #4a90e2, 0 -18px 0 0 rgba(74, 144, 226, .35);
    }
    .lg-shield { display: none; }
    .lg-hero__copy { left: 24px; right: 24px; bottom: 64px; }
    .lg-hero__copy h2 { font-size: 24px; margin: 0; }
    .lg-hero__copy p { display: none; }
    .lg-hero__brand { top: 18px; left: 24px; }
    .lg-panel { padding: 0 16px 32px; margin-top: -30px; }
}
@media (max-width: 480px) {
    #loginbox.lg-card { padding: 28px 20px 18px; border-radius: 18px; }
    .lg-head__logo { height: 60px; }
}
