/* ===========================================
   LOGIN / AUTENTICAÇÃO - MetSul
   =========================================== */

.ms-auth {
    min-height: calc(100vh - var(--header-height) - var(--topbar-height));
    display: flex;
    background: #f3f6f9;
}

.ms-auth__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: inherit;
}

/* ---- Painel de branding (esquerdo) ---- */
.ms-auth__branding {
    background: linear-gradient(135deg, var(--ms-blue-dark) 0%, var(--ms-blue-nav) 100%);
    color: var(--ms-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
}

.ms-auth__branding-content {
    max-width: 400px;
}

.ms-auth__logo {
    height: 48px;
    width: auto;
    margin-bottom: 32px;
}

.ms-auth__brand-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 32px;
}

.ms-auth__brand-desc {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0 0 36px;
}

.ms-auth__brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ms-auth__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    opacity: 0.85;
}

.ms-auth__feature svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ---- Painel do formulário (direito) ---- */
.ms-auth__form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--ms-white);
}

.ms-auth__form-wrap {
    width: 100%;
    max-width: 400px;
}

.ms-auth__title {
    font-size: 26px;
    font-weight: 800;
    color: var(--ms-blue-dark);
    margin: 0 0 6px;
}

.ms-auth__subtitle {
    font-size: 14px;
    color: var(--ms-text-light);
    margin: 0 0 28px;
    line-height: 1.5;
}

/* ---- Alertas ---- */
.ms-auth__alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}

.ms-auth__alert--error {
    background: #ffeaea;
    color: #c53030;
    border: 1px solid #fbb;
}

.ms-auth__alert--success {
    background: #e8f9ed;
    color: #1b7a3d;
    border: 1px solid #b8e6c8;
}

/* ---- Formulário ---- */
.ms-auth__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ms-auth__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-auth__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ms-text-light);
    letter-spacing: 0.5px;
}

.ms-auth__input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ms-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font-main);
    color: var(--ms-text);
    background: var(--ms-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ms-auth__input:focus {
    outline: none;
    border-color: var(--ms-blue-nav);
    box-shadow: 0 0 0 3px rgba(0, 102, 191, 0.1);
}

.ms-auth__input::placeholder {
    color: #b0b8c1;
}

/* ---- Opções (lembrar + esqueceu) ---- */
.ms-auth__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ms-auth__remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ms-text-light);
    cursor: pointer;
}

.ms-auth__remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ms-blue-nav);
    cursor: pointer;
}

.ms-auth__forgot {
    font-size: 13px;
    color: var(--ms-blue-nav);
    text-decoration: none;
    font-weight: 600;
}

.ms-auth__forgot:hover {
    text-decoration: underline;
}

/* ---- Botão submit ---- */
.ms-auth__submit {
    width: 100%;
    padding: 14px;
    background: var(--ms-blue-nav);
    color: var(--ms-white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.ms-auth__submit:hover {
    background: var(--ms-blue-dark);
}

.ms-auth__submit:active {
    transform: translateY(1px);
}

/* ---- Divider ---- */
.ms-auth__divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.ms-auth__divider::before,
.ms-auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ms-border);
}

.ms-auth__divider span {
    font-size: 13px;
    color: var(--ms-text-light);
    white-space: nowrap;
}

/* ---- Botão de registro ---- */
.ms-auth__register-btn {
    display: block;
    width: 100%;
    padding: 14px;
    text-align: center;
    background: transparent;
    color: var(--ms-orange-cta);
    border: 2px solid var(--ms-orange-cta);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-main);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ms-auth__register-btn:hover {
    background: var(--ms-orange-cta);
    color: var(--ms-white);
    text-decoration: none;
}

/* ---- Links ---- */
.ms-auth__links {
    text-align: center;
    margin-top: 24px;
}

.ms-auth__links a {
    color: var(--ms-blue-nav);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.ms-auth__links a:hover {
    text-decoration: underline;
}

/* ===========================================
   RESPONSIVO
   =========================================== */
@media (max-width: 900px) {
    .ms-auth__container {
        grid-template-columns: 1fr;
    }

    .ms-auth__branding {
        display: none;
    }

    .ms-auth__form-panel {
        padding: 30px 20px;
        min-height: calc(100vh - var(--header-height) - var(--topbar-height));
    }
}

@media (max-width: 480px) {
    .ms-auth__title {
        font-size: 22px;
    }

    .ms-auth__input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .ms-auth__submit,
    .ms-auth__register-btn {
        padding: 12px;
        font-size: 14px;
    }

    .ms-auth__options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
