/* ============================================================
   MiO — Cartão de login e seletor de idioma
   Compartilhado entre a tela /login e o modal da landing page.
   ============================================================ */

/* ------------------------------------------------------------
   Cartão de login (glassmorphism)
   ------------------------------------------------------------ */
.form-signin {
    width: 100%;
    max-width: 410px;
    margin: auto;
    position: relative;
    z-index: 5
}

.login-card {
    background: rgba(255, 255, 255, 0);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.109);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
    padding: 2rem 1.75rem 1.5rem;
    animation: login-card-in .5s ease both
}

/* Fallback para navegadores sem suporte a backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .login-card {
        background: rgba(20, 26, 40, .72)
    }
}

@keyframes login-card-in {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* Logo acima do cartão */
.login-logo-wrap {
    margin-bottom: 1.25rem;
    animation: login-card-in .5s ease both
}

.login-logo {
    max-height: 84px;
    max-width: 240px;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .45))
}

.login-badge-dev {
    position: absolute;
    bottom: 2px;
    left: 80%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .7);
    color: #ffe655;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 700;
    white-space: nowrap
}

@media (prefers-reduced-motion: reduce) {

    .login-card,
    .login-logo-wrap {
        animation: none
    }
}

/* ------------------------------------------------------------
   Inputs
   ------------------------------------------------------------ */
.login-input-group {
    position: relative;
    margin-bottom: .85rem
}

.login-input-group .login-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.05rem;
    line-height: 1;
    z-index: 4;
    pointer-events: none
}

.form-signin .form-control {
    position: relative;
    box-sizing: border-box;
    height: 52px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .92);
    padding: 10px 16px 10px 44px;
    font-size: .95rem;
    color: #111827;
    transition: box-shadow .2s ease, border-color .2s ease, background .2s ease
}

.form-signin .form-control::placeholder {
    color: #6b7280
}

.form-signin .form-control:focus {
    z-index: 2;
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .35);
    outline: 0
}

.login-input-group input[type=password],
#show_hide_password .form-control {
    padding-right: 48px
}

/* Botão mostrar/ocultar senha dentro do campo */
.login-password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #6b7280 !important;
    font-size: 1.1rem;
    text-decoration: none !important;
    transition: color .15s ease, background .15s ease
}

.login-password-toggle:hover,
.login-password-toggle:focus {
    color: #111827 !important;
    background: rgba(17, 24, 39, .06)
}

/* Link "Esqueci minha senha" */
.login-forgot {
    display: -ms-flexbox;
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1rem
}

.login-forgot a {
    color: rgba(255, 255, 255, .92) !important;
    font-size: .8rem;
    text-decoration: none;
    padding: 4px 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .4)
}

.login-forgot a:hover,
.login-forgot a:focus {
    color: #fff !important;
    text-decoration: underline
}

/* ------------------------------------------------------------
   Botão Entrar
   ------------------------------------------------------------ */
#btn_entrar {
    width: 100%;
    height: 52px;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease
}

#btn_entrar:hover:not(:disabled),
#btn_entrar:focus:not(:disabled) {
    filter: brightness(1.25);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .4)
}

#btn_entrar:active:not(:disabled) {
    transform: translateY(0)
}

#btn_entrar:disabled {
    opacity: .75;
    cursor: not-allowed;
    font-size: .9rem !important
}

/* ------------------------------------------------------------
   Divisor e botões sociais
   ------------------------------------------------------------ */
.login-divider {
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.1rem 0 .85rem;
    color: rgba(255, 255, 255, .9);
    font-size: .78rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .4)
}

.login-divider::before,
.login-divider::after {
    content: "";
    -ms-flex: 1;
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .35)
}

.login-social-row {
    display: -ms-flexbox;
    display: flex;
    gap: 10px
}

.login-social-btn {
    -ms-flex: 1;
    flex: 1;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .95);
    color: #1f2937 !important;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 12px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease
}

.login-social-btn:hover,
.login-social-btn:focus {
    background: #fff;
    color: #111827 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .24)
}

.login-social-btn svg {
    -ms-flex-negative: 0;
    flex-shrink: 0
}

/* Botão "Voltar ao login padrão" */
#reset_login {
    color: rgba(255, 255, 255, .9);
    border-radius: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .4)
}

#reset_login:hover,
#reset_login:focus {
    color: #fff;
    background: rgba(255, 255, 255, .12)
}

/* ------------------------------------------------------------
   Seletor de idioma
   ------------------------------------------------------------ */
.login-lang {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
}

.login-lang.login-lang-inline {
    position: static;
    top: auto;
    right: auto;
}

.login-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.login-lang-btn:hover,
.login-lang-btn:focus {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: none;
    outline: none;
    color: #fff;
}

.login-lang-btn:active {
    background: rgba(255, 255, 255, 0.14);
}

.login-lang-flag {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.login-lang-code {
    min-width: 1.4em;
}

.login-lang-chevron {
    font-size: 0.7rem;
    opacity: 0.65;
    transition: transform 0.2s ease;
}

.login-lang .show .login-lang-chevron {
    transform: rotate(180deg);
}

.login-lang-menu {
    min-width: 210px;
    padding: 6px;
    margin-top: 6px !important;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    background: rgba(255, 255, 255, 0.97);
}

.login-lang-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
}

.login-lang-menu .dropdown-item:hover,
.login-lang-menu .dropdown-item:focus {
    background: #f3f4f6;
    color: #111827;
}

.login-lang-menu .dropdown-item.active {
    background: #eef2ff;
    color: #1e3a8a;
    font-weight: 600;
}

.login-lang-menu .dropdown-item img {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.login-lang-menu .dropdown-item .login-lang-check {
    margin-left: auto;
    font-size: 1rem;
    opacity: 0;
}

.login-lang-menu .dropdown-item.active .login-lang-check {
    opacity: 1;
}

/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .form-signin {
        max-width: 92vw
    }

    .login-card {
        padding: 1.5rem 1.25rem 1.25rem
    }

    .form-signin .form-control {
        font-size: 1.05rem;
        height: 54px
    }

    #btn_entrar {
        font-size: 1.1rem !important;
        height: 54px
    }

    .login-social-btn {
        font-size: .95rem;
        height: 48px
    }

    .login-forgot a {
        font-size: .9rem
    }

    .login-logo {
        max-height: 72px;
        max-width: 210px
    }
}
