/* ============================================================
   LOGIN ADMINSEG — Olé Design System
   Tarea: GO-0005982
   ============================================================ */

/* --- Layout split-screen --- */
.login-page {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    font-family: 'Montserrat', sans-serif;
}

.login-split-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* --- Panel izquierdo: formulario --- */
.login-panel-form {
    position: relative;
    width: 50%;
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 60px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* --- Panel derecho: imagen hero --- */
.login-panel-hero {
    width: 50%;
    min-height: 100vh;
    background-image: url('../../images/interface/login-hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* --- Selector de idioma (top-right del panel izquierdo) --- */
.login-lang-selector {
    position: absolute;
    top: 24px;
    right: 24px;
}

/* Iconos de banderas (reutiliza assets de adminseg/olelife) */
i.flag-esp-lang,
i.flag-usa-lang,
i.flag-bra {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    flex-shrink: 0;
}

i.flag-esp-lang {
    background-image: url('../adminseg/olelife/scss/assets/icons/flag-esp-lang.png');
}

i.flag-usa-lang {
    background-image: url('../adminseg/olelife/scss/assets/icons/flag-usa-lang.png');
}

i.flag-bra {
    background-image: url('../adminseg/olelife/scss/assets/icons/Banderas/br.svg');
}

/* Dropdown personalizado */
.login-lang-dropdown {
    position: relative;
    font-size: 13px;
    color: #374151;
    width: 211px;
}

.login-lang-current {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #C2CEE3;
    border-radius: 0;
    padding: 9px 14px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-size: 15px;
    width: 100%;
    height: 48px;
    box-sizing: border-box;
}

.login-lang-current span {
    flex: 1;
}

.login-lang-arrow {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 6px;
}

.login-lang-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #C2CEE3;
    min-width: 100%;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.login-lang-options.open {
    display: block;
}

.login-lang-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    font-size: 15px;
}

.login-lang-option:hover {
    background: #f9fafb;
    color: #111827;
}

/* --- Contenido central del formulario --- */
.login-content {
    width: 75%;
}

/* --- Logo Olé --- */
.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo img {
    width: 176px;
    height: 69px;
    object-fit: contain;
}

/* --- Título y subtítulo --- */
.login-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    text-align: center;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.login-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    text-align: center;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

/* --- Contenedor de errores --- */
.login-error-container {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Campos del formulario --- */
.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #374151;
    margin-bottom: 6px;
}

.login-field label .required-mark {
    color: #e53e3e;
    margin-left: 2px;
    font-weight: bold;
}

.login-field .login-input-wrapper {
    position: relative;
}

.login-input-wrapper .form-control {
    text-transform: none !important;
}

.login-field input[type="text"],
.login-field input[type="password"] {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 14px;
    border: 1px solid #C2CEE3;
    border-radius: 0;
    font-size: 14px;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}

.login-field input[type="text"]::placeholder,
.login-field input[type="password"]::placeholder {
    color: #9ca3af;
    font-size: 13px;
    text-transform: none !important;
}

.login-field input[type="text"]:focus,
.login-field input[type="password"]:focus {
    border-color: #00C389;
    box-shadow: 0 0 0 3px rgba(0, 195, 137, 0.15);
}

.login-field input[type="text"].error,
.login-field input[type="password"].error {
    border-color: #e53e3e;
}

/* Icono de toggle contraseña */
.login-input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    font-size: 16px;
    user-select: none;
}

.login-input-toggle img.login-eye-icon {
    width: 20px;
    height: 20px;
    display: block;
    filter: invert(73%) sepia(15%) saturate(441%) hue-rotate(184deg) brightness(99%) contrast(96%);
    transition: filter 0.15s;
}

.login-input-toggle:hover img.login-eye-icon {
    filter: invert(50%) sepia(20%) saturate(600%) hue-rotate(184deg) brightness(80%) contrast(100%);
}

.login-input-toggle:hover {
    color: #374151;
}

/* --- Fila Recordarme + Recuperar contraseña --- */
.login-row-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
}

.login-remember-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
}

.login-remember-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #00C389;
    cursor: pointer;
}

.login-forgot-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #00BBDD;
    text-decoration: none;
}

.login-forgot-link:hover {
    text-decoration: underline;
    color: #009db8;
}

/* --- Botón submit --- */
.login-btn-submit {
    display: block;
    width: 100%;
    height: 44px;
    background: #00D090;
    color: #fff;
    border: none;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.3px;
    margin-bottom: 28px;
}

.login-btn-submit:hover {
    background: #00b87d;
}

.login-btn-submit:active {
    background: #009f6b;
}

/* --- Powered by AdminSEG --- */
.login-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.login-powered span {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #9BACCB;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.login-powered img {
    width: 125px;
    height: 32px;
    object-fit: contain;
}

/* --- Texto footer portal --- */
.login-footer-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #5B667A;
    text-align: center;
    line-height: 1.6;
    margin: 114px 0 0 0;
    width: 75%;
    align-self: center;
}

.login-footer-text a {
    color: #6b7280;
    text-decoration: underline;
}

.login-footer-text a:hover {
    color: #374151;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Desktop viewport corto (altura <= 800px): compactar espacios para evitar scroll */
@media (min-width: 992px) and (max-height: 950px) {
    .login-panel-form {
        padding: 115px 60px 32px;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .login-logo {
        margin-bottom: 16px;
    }

    .login-subtitle {
        margin-bottom: 16px;
    }

    .login-field {
        margin-bottom: 10px;
    }

    .login-btn-submit {
        margin-bottom: 16px;
    }

    .login-powered {
        margin-bottom: 10px;
    }

    .login-footer-text {
        margin-top: auto;
    }
}

/* Tablet (< 992px): ocultar panel hero, form a ancho completo */
@media (max-width: 991px) {
    .login-panel-form {
        width: 100%;
        height: 100vh;
        min-height: unset;
        padding: 72px 24px 40px;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .login-panel-hero {
        display: none;
    }
}

/* Mobile (< 576px) */
@media (max-width: 575px) {
    .login-panel-form {
        padding: 72px 24px 32px;
        justify-content: flex-start;
    }

    .login-content {
        width: 100%;
    }

    .login-logo {
        margin-top: 16px;
        margin-bottom: 20px;
    }

    .login-logo img {
        width: 176px;
        height: 69px;
        object-fit: contain;
    }

    .login-title {
        font-size: 20px;
        font-weight: 800;
    }

    .login-subtitle {
        font-size: 14px;
        font-weight: 400;
        margin-bottom: 20px;
    }

    .login-field label {
        font-size: 14px;
        font-weight: 400;
    }

    .login-row-remember {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }

    .login-remember-label {
        font-size: 14px;
        font-weight: 400;
    }

    .login-forgot-link {
        font-size: 14px;
        font-weight: 400;
    }

    .login-powered span {
        font-size: 12px;
        font-weight: 400;
        color: #9BACCB;
    }

    .login-footer-text {
        font-size: 12px;
        font-weight: 400;
        color: #5B667A;
        margin-top: 40px;
    }
}
