* {
    box-sizing: border-box;
}

/* ── Container principal ── */
.container-form {
    background: #fff;
    border-radius: 16px;
    border-top: 3px solid #3A4E70;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .14), 0 4px 16px rgba(0, 0, 0, .07);
    position: relative;
    overflow: hidden;
    width: 780px;
    max-width: 100%;
    min-height: 660px;
}

/* ── Painéis ── */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all .55s cubic-bezier(.77, 0, .175, 1);
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
    display: flex;
    align-items: stretch;
}

.container-form.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.sign-up-container::-webkit-scrollbar       { width: 4px; }
.sign-up-container::-webkit-scrollbar-track { background: transparent; }
.sign-up-container::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.container-form.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show .55s;
}

@keyframes show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100%  { opacity: 1; z-index: 5; }
}

/* ── Form login — centralizado verticalmente ── */
.sign-in-container form {
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 44px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

/* ── Form cadastro — compacto, conteúdo centralizado verticalmente ── */
.sign-up-container form {
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 28px 44px;
    min-height: 100%;
    font-family: 'Poppins', sans-serif;
}

/* ── Marca ── */
.login-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.login-brand-icon {
    width: 32px;
    height: 32px;
    background: #3A4E70;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.login-brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12.5px;
    color: #1a202c;
    letter-spacing: -.1px;
}

/* ── Títulos ── */
.container-form h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #1a202c;
    letter-spacing: -.3px;
    margin: 0 0 3px;
}

.login-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #718096;
    margin: 0 0 20px;
    font-weight: 400;
    line-height: 1.5;
    flex-shrink: 0;
}

/* cadastro — subtítulo menor */
.sign-up-container .login-subtitle {
    margin-bottom: 12px;
}

.sign-up-container .login-brand {
    margin-bottom: 14px;
}

/* ── Labels dos campos ── */
.login-label {
    font-family: 'Poppins', sans-serif;
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #718096;
    margin-bottom: 4px;
    display: block;
}

/* ── Grupo de campo ── */
.login-field {
    width: 100%;
    margin-bottom: 12px;
    flex-shrink: 0;
}

/* cadastro — campos compactos para caber sem scroll (evita dropdown para cima) */
.sign-up-container .login-field {
    margin-bottom: 8px;
}

/* ── Wrapper com ícone ── */
.login-input-wrap {
    position: relative;
    width: 100%;
}

.login-input-wrap .login-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 13px;
    pointer-events: none;
    transition: color .15s;
    z-index: 1;
}

/* ── Inputs e selects ── */
.container-form input,
.container-form select {
    background: #f0f4f8;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 12px;
    height: 36px;
    width: 100%;
    font-size: 12.5px;
    font-family: 'Poppins', sans-serif;
    color: #1a202c;
    transition: border-color .18s, box-shadow .18s, background .18s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 1;
}

.login-input-wrap input {
    padding-left: 33px;
}

.container-form input::placeholder {
    color: #a0aec0;
    font-size: 12px;
}

.container-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 16 16'%3E%3Cpath fill='%239aa4b2' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
    cursor: pointer;
}

.container-form input:focus,
.container-form select:focus {
    border-color: #a0aec0;
    box-shadow: 0 0 0 3px rgba(113, 128, 150, .16);
    background: #fff;
}

.login-input-wrap input:focus + .login-input-icon,
.login-input-wrap input:focus ~ .login-input-icon {
    color: #718096;
}

/* ── Toggle de senha ── */
.login-eye-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 13px;
    cursor: pointer;
    transition: color .15s;
    z-index: 5;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    pointer-events: auto;
}

.login-eye-toggle:hover { color: #718096; }

/* ── Link recuperação ── */
.login-forgot {
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    color: #718096;
    text-decoration: none;
    align-self: flex-end;
    margin-top: -2px;
    margin-bottom: 18px;
    flex-shrink: 0;
    transition: color .15s;
}

.login-forgot:hover {
    color: #4a5568;
    text-decoration: underline;
}

/* ── Botão primário ── */
.container-form a.btn.entrar,
.container-form button.btn-login-primary {
    width: auto;
    align-self: center;
    flex-shrink: 0;
    height: 38px;
    background: #3A4E70;
    border: 1px solid #3A4E70;
    border-radius: 8px;
    color: #fff !important;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    transition: background .18s, box-shadow .18s, transform .1s;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(29, 37, 58, .30);
    padding: 0 24px;
}

.container-form a.btn.entrar:hover,
.container-form button.btn-login-primary:hover {
    background: #4a607f;
    border-color: #4a607f;
    box-shadow: 0 4px 16px rgba(29, 37, 58, .45);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none !important;
}

.container-form a.btn.entrar:active,
.container-form button.btn-login-primary:active {
    transform: scale(.98);
    box-shadow: none;
}

.container-form a.btn.entrar:focus,
.container-form button.btn-login-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 37, 58, .28);
}

/* ── Botão ghost (overlay) ── */
.container-form button.ghost {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .45);
    border-radius: 8px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 22px;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .1s;
    box-shadow: none;
}

.container-form button.ghost:hover {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255, 255, 255, .8);
    transform: translateY(-1px);
}

/* ── Mensagens de erro ── */
.container-form .erro,
.container-form .erro_null {
    width: 100%;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
    padding: 7px 11px;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    color: #c53030;
    display: flex;
    align-items: center;
    gap: .4em;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.container-form .erro.hidden,
.container-form .erro_null.hidden { display: none !important; }

/* ── Erro nos campos ── */
.sign-in-container form input.error {
    border-color: #e53e3e;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, .1);
}

input.erro_form  { border-color: #e53e3e !important; background: #fff5f5; }
label.erro_form,
span.erro_form   { color: #e53e3e; font-size: 11px; font-family: 'Poppins', sans-serif; }

/* ── Hint abaixo do campo ── */
.login-hint {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: #a0aec0;
    display: block;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ── Botão do formulário de cadastro ── */
.sign-up-container button.btn-login-primary {
    margin-top: 8px;
}

/* ── Helpers de campos com ícone de ajuda ── */
.form-input {
    position: relative;
    width: 100%;
    margin-bottom: 0;
}

.form-input input { padding-right: 36px; }

.popover_help {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(160, 174, 192, .18);
    color: #718096 !important;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.popover_help:hover {
    background: rgba(77, 124, 245, .14) !important;
    color: #4d7cf5 !important;
    text-decoration: none !important;
}

.disabled { opacity: .5 !important; cursor: not-allowed; }

/* ── Overlay ── */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform .55s cubic-bezier(.77, 0, .175, 1);
    z-index: 100;
}

.container-form.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay-form {
    background: #3A4E70;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform .55s cubic-bezier(.77, 0, .175, 1);
}

.container-form.right-panel-active .overlay-form {
    transform: translateX(50%);
}

/* ── Painéis do overlay ── */
.overlay-panel {
    position: absolute;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 0 42px;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform .55s cubic-bezier(.77, 0, .175, 1);
}

.overlay-left  { transform: translateX(-20%); }
.overlay-right { right: 0; transform: translateX(0); }

.container-form.right-panel-active .overlay-left  { transform: translateX(0); }
.container-form.right-panel-active .overlay-right { transform: translateX(20%); }

/* ── Ícone da marca no overlay ── */
.overlay-brand {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.overlay-panel h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: -.25px;
    margin: 0 0 7px;
    line-height: 1.25;
}

.overlay-panel p {
    font-family: 'Poppins', sans-serif;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 18px;
}

/* ── Feature list ── */
.overlay-features {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overlay-features li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .78);
    font-weight: 400;
    line-height: 1.3;
}

.overlay-features li i {
    font-size: 13px;
    color: #fbbf24;
    flex-shrink: 0;
}

/* ── Popover de ajuda — Bootstrap renderiza no body ── */
.popover {
    font-family: 'Poppins', sans-serif;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    border-top: 3px solid #4d7cf5;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .05);
    max-width: 220px;
    padding: 0;
}

.popover-header {
    background: transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    font-family: 'Poppins', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    color: #4d7cf5;
    padding: 11px 14px 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.popover-header::before {
    content: '\F431';
    font-family: 'bootstrap-icons';
    font-size: 13px;
    line-height: 1;
}

.popover-body {
    padding: 4px 14px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    color: #718096;
    line-height: 1.6;
}

/* ── Setas do popover ── */
.popover .arrow::before { border-color: transparent; }
.popover .arrow::after  { border-color: transparent; }

.bs-popover-top > .arrow::before,
.bs-popover-auto[x-placement^="top"] > .arrow::before { border-top-color: #e2e8f0; }
.bs-popover-top > .arrow::after,
.bs-popover-auto[x-placement^="top"] > .arrow::after  { border-top-color: #fff; }

.bs-popover-bottom > .arrow::before,
.bs-popover-auto[x-placement^="bottom"] > .arrow::before { border-bottom-color: #4d7cf5; }
.bs-popover-bottom > .arrow::after,
.bs-popover-auto[x-placement^="bottom"] > .arrow::after  { border-bottom-color: #fff; }

.bs-popover-right > .arrow::before,
.bs-popover-auto[x-placement^="right"] > .arrow::before { border-right-color: #e2e8f0; }
.bs-popover-right > .arrow::after,
.bs-popover-auto[x-placement^="right"] > .arrow::after  { border-right-color: #fff; }

.bs-popover-left > .arrow::before,
.bs-popover-auto[x-placement^="left"] > .arrow::before { border-left-color: #e2e8f0; }
.bs-popover-left > .arrow::after,
.bs-popover-auto[x-placement^="left"] > .arrow::after  { border-left-color: #fff; }

/* ── Responsivo ── */
@media (max-width: 576px) {
    .container-form {
        border-radius: 12px;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        min-height: 560px;
        width: 100%;
    }

    .sign-in-container form,
    .sign-up-container form { padding: 28px 24px; padding-bottom: 12%; }

    .overlay-panel { width: 50%; flex-direction: row; align-items: center; padding: 0 10px; }
    .overlay-panel h2, .overlay-panel p,
    .overlay-features, .overlay-brand { display: none; }

    .overlay-container {
        position: absolute;
        top: 90%; left: 0;
        width: 100%; height: 10%;
        overflow: hidden; z-index: 100;
        transform: translateX(0);
    }

    .overlay-left { transform: translateX(-10%); }
    .sign-in-container { left: 0; width: 100%; z-index: 2; }

    .container-form.right-panel-active .overlay-container { transform: translateX(0); }
    .container-form.right-panel-active .sign-in-container { transform: translateX(100%); }

    .sign-up-container { left: 100%; width: 100%; opacity: 0; z-index: 1; }
    .container-form.right-panel-active .sign-up-container {
        transform: translateX(-100%);
        opacity: 1; z-index: 5;
        animation: show .55s;
    }

    .container-form button.ghost { position: absolute; border-color: rgba(255, 255, 255, .3); }
}
