/* ============================================================
   LOGIN - Diseno compacto y responsivo del formulario.
   El video de fondo (definido en _LayoutLogin.cshtml) no se toca.

   NOTA: Este archivo vive FUERA de las vistas .cshtml a proposito.
   Razor interpreta cualquier arroba "@" dentro de una vista como inicio
   de expresion, por lo que las reglas at-rule CSS (keyframes, media,
   font-face) escritas dentro de un bloque style en la vista fallan con
   CS0103. Al estar en un .css estatico no hay conflicto alguno.
   ============================================================ */

/* ---------- Reset de la pagina ----------
   El tema (architectui) aplica border / box-shadow / padding al body,
   lo que recorta el video de fondo. Esta vista es la unica que usa
   _LayoutLogin.cshtml, asi que el reset es seguro. */
html, body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: hidden !important;
}

/* El body se convierte en columna flex para que la tarjeta quede
   centrada y el copyright siempre pegado al pie, sin recortarse. */
body {
    display: flex;
    flex-direction: column;
}

/* ---------- Estructura vertical: tarjeta centrada + copyright al pie ---------- */
.lgn-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.lgn-stage {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

/* Velo oscuro suave para que el formulario resalte sobre el video
   (no oculta el video, solo baja el brillo de los bordes). */
.lgn-veil {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 45%, rgba(12, 24, 33, 0.10) 0%, rgba(12, 24, 33, 0.55) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Tarjeta ---------- */
.lgn-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32), 0 2px 0 rgba(255, 255, 255, 0.18) inset;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    overflow: hidden;
    animation: lgnFadeUp .4s ease-out both;
}

@keyframes lgnFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Encabezado ---------- */
.lgn-card__head {
    padding: 18px 20px 14px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.lgn-brand {
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.26);
}

.lgn-brand img {
    height: 22px;
    width: auto;
}

.lgn-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: .2px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.lgn-subtitle {
    margin: 3px 0 0;
    font-size: .75rem;
    font-weight: 400;
    line-height: 1.35;
    color: rgba(255, 255, 255, .88);
}

/* ---------- Cuerpo / campos ---------- */
.lgn-card__body {
    padding: 16px 20px 18px;
}

.lgn-label {
    display: block;
    margin: 0 0 4px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}

.lgn-group + .lgn-group {
    margin-top: 11px;
}

.lgn-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
    transition: box-shadow .18s ease, border-color .18s ease;
}

.lgn-input-wrap:focus-within {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, .35);
}

.lgn-input-wrap.is-invalid {
    border-color: #f2545b;
    box-shadow: 0 0 0 3px rgba(242, 84, 91, .30);
}

.lgn-input-wrap__icon {
    flex: 0 0 auto;
    width: 36px;
    text-align: center;
    color: #7a8a99;
    font-size: .85rem;
}

.lgn-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 10px 0 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #212529;
    font-size: .86rem;
    box-shadow: none !important;
}

.lgn-input::placeholder {
    color: #a9b4bd !important;
    opacity: 1 !important;
}

.lgn-input:focus {
    outline: none;
    background: transparent;
    box-shadow: none !important;
}

.lgn-eye {
    flex: 0 0 auto;
    width: 36px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #7a8a99;
    cursor: pointer;
    font-size: .85rem;
    line-height: 1;
}

.lgn-eye:hover {
    color: #4facfe;
}

.lgn-error {
    display: none;
    margin: 4px 0 0;
    font-size: .7rem;
    color: #ffd7d9;
}

.lgn-group.is-invalid .lgn-error {
    display: block;
}

/* ---------- Botones ---------- */
.lgn-submit {
    width: 100%;
    height: 40px;
    margin-top: 15px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #1f7ae0 0%, #22b1cf 100%);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(31, 122, 224, .40);
    transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}

.lgn-submit:hover:not(:disabled) {
    filter: brightness(1.06);
    box-shadow: 0 8px 18px rgba(31, 122, 224, .52);
}

.lgn-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.lgn-submit:disabled {
    cursor: not-allowed;
    opacity: .8;
    box-shadow: none;
}

.lgn-spinner {
    display: none;
    margin-right: 6px;
    font-size: .8rem;
    animation: lgnSpin .7s linear infinite;
    vertical-align: -1px;
}

.lgn-submit.is-loading .lgn-spinner {
    display: inline-block;
}

@keyframes lgnSpin {
    to { transform: rotate(360deg); }
}

.lgn-forgot {
    display: block;
    margin-top: 11px;
    text-align: center;
    font-size: .76rem;
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}

.lgn-forgot:hover,
.lgn-forgot:focus {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Pie de la tarjeta ---------- */
.lgn-card__foot {
    padding: 11px 20px 13px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .12);
}

.lgn-foot-title {
    margin: 0 0 3px;
    font-size: .74rem;
    font-weight: 600;
    color: #fff;
}

.lgn-foot-links {
    margin: 0;
    font-size: .72rem;
    line-height: 1.5;
}

.lgn-foot-links a {
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
}

.lgn-foot-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Copyright: siempre visible al pie ---------- */
.lgn-copyright {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin-top: 10px;
    text-align: center;
    font-size: .72rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, .88);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* ---------- Pantallas angostas ---------- */
@media (max-width: 575.98px) {
    .lgn-wrapper { padding: 10px 10px 8px; }
    .lgn-card { max-width: 340px; border-radius: 14px; }
    .lgn-card__head { padding: 15px 16px 12px; }
    .lgn-card__body { padding: 14px 16px 15px; }
    .lgn-card__foot { padding: 10px 16px 11px; }
    .lgn-brand { width: 40px; height: 40px; margin-bottom: 7px; }
    .lgn-brand img { height: 20px; }
    .lgn-title { font-size: 1rem; }
    .lgn-subtitle { font-size: .72rem; }
    .lgn-input { height: 40px; font-size: 1rem; } /* evita zoom automatico en iOS */
    .lgn-eye { height: 40px; }
    .lgn-submit { height: 42px; }
}

/* ---------- Pantallas bajas (laptops 768px de alto) ---------- */
@media (max-height: 700px) {
    .lgn-wrapper { padding: 10px 12px 6px; }
    .lgn-stage { padding: 4px 0; }
    .lgn-card__head { padding: 12px 20px 10px; }
    .lgn-brand { width: 36px; height: 36px; margin-bottom: 6px; }
    .lgn-brand img { height: 19px; }
    .lgn-title { font-size: 1rem; }
    .lgn-subtitle { display: none; }
    .lgn-card__body { padding: 13px 20px 14px; }
    .lgn-group + .lgn-group { margin-top: 9px; }
    .lgn-input { height: 36px; }
    .lgn-eye { height: 36px; }
    .lgn-submit { height: 38px; margin-top: 12px; }
    .lgn-forgot { margin-top: 9px; }
    .lgn-card__foot { padding: 9px 20px 10px; }
    .lgn-copyright { margin-top: 7px; }
}

@media (max-height: 560px) {
    .lgn-card__foot { display: none; }
}
