/* ============================================================
   Login — TechFlow SystemManager
   Paleta base: #17106A (+ tons complementares)
   ============================================================ */
:root {
    --brand: #17106A;
    --brand-2: #2A1F9E; /* indigo mais claro */
    --brand-3: #4A3AD1; /* violeta/azul de realce */
    --brand-dark: #0C0940; /* fundo do degradê */
    --brand-accent: #6E5CF0; /* highlight */

    /* ----- Dark mode ----- */
    --page-bg: #07060f;      /* fundo da página */
    --surface: #14122a;      /* cartão externo */
    --surface-2: #1e1b3c;    /* cartões internos (brand card) */
    --field-bg: #262247;     /* pílulas de input */
    --field-border: rgba(255, 255, 255, .08);
    --text-light: #ece9f7;
    --text-muted: #9b95c4;
    --icon-accent: #9b8cf5;
}

.login-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #1b1533 0%, #17106A 55%, #0C0940 100%);
    padding: 24px;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

/* Cartão externo dividido em dois blocos */
.login-shell {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 580px;
    background: var(--surface);
    border-radius: 22px;
    box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

/* ---------- Lado esquerdo (formulário) ---------- */
.login-left {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    gap: 16px;
    z-index: 2;
}

.login-brandcard {
    width: 100%;
    max-width: 380px;
    background: var(--surface-2);
    border: 1px solid var(--field-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.login-brandcard .system-logo {
    width: 42px;
    height: 42px;
    color: var(--brand);
    flex: 0 0 auto;
}

.login-brandcard .brand-text {
    line-height: 1.15;
}

.login-brandcard .brand-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-light);
}

.login-brandcard .brand-sub {
    font-size: .78rem;
    color: var(--text-muted);
}

/* Bloco central com degradê (de cima para baixo) */
.login-formcard {
    width: 100%;
    max-width: 380px;
    border-radius: 18px;
    padding: 34px 30px 38px;
    background: linear-gradient(180deg, var(--brand-3) 0%, var(--brand-2) 45%, var(--brand) 100%);
    box-shadow: 0 18px 40px -18px rgba(23, 16, 106, 0.55);
}

.login-forgot {
    font-size: .82rem;
    color: var(--icon-accent);
    text-decoration: underline;
    cursor: pointer;
}

/* Inputs em pílula branca */
.login-field.mud-input-control {
    margin-bottom: 18px;
}

.login-field .mud-input {
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 999px;
    padding: 11px 18px;
    box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .6);
    margin-top: 0;
}

/* Campo de senha: espaço à direita para o botão do olho */
.login-pwd {
    position: relative;
}

.login-field--pwd.mud-input-control {
    margin-bottom: 18px;
}

.login-field--pwd .mud-input input {
    padding-right: 38px;
}

.pwd-eye {
    position: absolute;
    top: 24px;
    right: 12px;
    transform: translateY(-50%);
    z-index: 3;
    color: var(--icon-accent) !important;
}

.pwd-eye .mud-icon-root {
    font-size: 1.25rem;
    color: var(--icon-accent);
}

/* remove a linha inferior do variant Text */
.login-field .mud-input.mud-input-underline::before,
.login-field .mud-input.mud-input-underline::after {
    display: none !important;
}

.login-field .mud-input-slot,
.login-field input {
    color: var(--text-light);
    caret-color: var(--text-light);
}

.login-field .mud-input-adornment .mud-icon-root {
    color: var(--icon-accent);
    font-size: 1.2rem;
}

.login-field input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* Botão Login */
.login-btn {
    border-radius: 999px !important;
    background: var(--brand-dark) !important;
    color: #fff !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: .3px;
    height: 50px;
    box-shadow: 0 10px 24px -10px rgba(12, 9, 64, .8) !important;
    transition: transform .12s ease, box-shadow .12s ease;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(12, 9, 64, .9) !important;
}

/* Botão "Entrar com a Microsoft" (identidade visual da Microsoft) */
.ms-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 46px;
    margin-top: 14px;
    background: #ffffff;
    border: 1px solid #8c8c8c;
    border-radius: 999px;
    color: #5e5e5e;
    font-family: "Segoe UI", Segoe, Tahoma, Helvetica, Arial, sans-serif;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease, box-shadow .12s ease, transform .12s ease;
}

.ms-login-btn:hover {
    background: #f3f3f3;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .5);
}

.ms-login-logo {
    flex: 0 0 auto;
    display: block;
}

/* ---------- Lado direito (boas-vindas) ---------- */
.login-right {
    position: relative;
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 40px;
    color: #fff;
    background: linear-gradient(180deg, var(--brand-3) 0%, var(--brand-2) 40%, var(--brand) 78%, var(--brand-dark) 100%);
}

/* Onda que separa os dois lados */
.login-wave {
    position: absolute;
    left: -1px;
    top: 0;
    height: 100%;
    width: 90px;
    fill: var(--surface);
    z-index: 3;
}

.system-logo {
    display: block;
    object-fit: contain;
}

/* Bloco de marca: logo no topo, nome embaixo (empilhado) */
.login-right .right-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.login-right .right-logo {
    width: 400px;
    height: 200px;
    /* arte preta -> branca, preservando a transparência */
    filter: brightness(0) invert(1);
}

.login-right .right-brand .brand-title {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .5px;
}

.login-welcome {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.login-welcome-sub {
    font-size: .95rem;
    font-weight: 300;
    max-width: 260px;
    opacity: .9;
    line-height: 1.5;
}

/* Bolhas decorativas */
.login-right .bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.login-right .bubble.b1 { width: 180px; height: 180px; right: -50px; bottom: -60px; }
.login-right .bubble.b2 { width: 90px; height: 90px; right: 60px; bottom: 40px; background: rgba(255,255,255,.06); }

/* ---------- Responsivo ---------- */
@media (max-width: 780px) {
    .login-right { display: none; }
    .login-shell { max-width: 420px; }
}

/* ============================================================
   Recuperação de senha (/forget)
   ============================================================ */
.forget-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #1b1533 0%, #17106A 55%, #0C0940 100%);
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.forget-card {
    width: 100%;
    max-width: 380px;
    padding: 34px 28px 28px;
    background: #16142a !important;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .7);
}

.forget-logo {
    width: 54px;
    height: 54px;
    filter: brightness(0) invert(1);
    margin-bottom: 8px;
}

.forget-brand {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    line-height: 1;
}

.forget-brand-sub {
    font-size: .85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c9c5e6;
    margin-top: 4px;
}

.forget-subtitle {
    font-size: .85rem;
    color: #9b95c4;
    margin: 8px 0 18px;
    line-height: 1.5;
}

.forget-field { width: 100%; margin-bottom: 12px; }

.forget-codigo input {
    text-align: center;
    letter-spacing: .5rem;
    font-size: 1.15rem;
}

.forget-btn {
    border-radius: 999px !important;
    background: #4A3AD1 !important;
    color: #fff !important;
    text-transform: none !important;
    font-weight: 600 !important;
    height: 44px;
    margin-top: 4px;
}

.forget-btn-sec {
    border-radius: 999px !important;
    text-transform: none !important;
    color: #c9c5e6 !important;
    border-color: rgba(255, 255, 255, .2) !important;
    height: 42px;
}

.forget-voltar { color: #9b8cf5; font-size: .82rem; }
