/* ============================================
   Login — Mobile-first, split-screen no desktop
   ============================================ */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #f1f5f9;
}
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ──────────────────────────────────────────────
   MOBILE (base) — Só a tela de login centralizada
   Sem lado azul, sem card, fundo claro.
   ────────────────────────────────────────────── */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: #f1f5f9;
    background:
        radial-gradient(ellipse 60% 40% at 20% 0%,  rgba(23, 104, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(23, 104, 255, 0.06) 0%, transparent 60%),
        #f1f5f9;
}

/* No mobile: o brand fica oculto */
.login-brand { display: none; }

/* Logo mobile (some no desktop) */
.login-mobile-logo {
    display: block;
    text-align: center;
    margin-bottom: 32px;
}
.login-mobile-logo img {
    height: 52px;
    width: auto;
}

/* Wrap do form ocupa o centro */
.login-main {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.login-form-wrap {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px 24px;
    box-shadow:
        0 4px 6px -2px rgba(15, 23, 42, 0.05),
        0 12px 24px -8px rgba(15, 23, 42, 0.10),
        0 0 0 1px rgba(15, 23, 42, 0.04);
    animation: fadeUp .5s ease-out;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-form-wrap__header {
    margin-bottom: 24px;
    text-align: center;
}
.login-form-wrap__title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.login-form-wrap__subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}
.login-form-wrap__footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}
.login-form-wrap__footer a {
    color: #1768FF;
    font-weight: 600;
    text-decoration: none;
}
.login-form-wrap__footer a:hover { text-decoration: underline; }

/* ─── Form ─── */
.login-form__group { margin-bottom: 16px; }

.login-form__label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 4px;
}
.login-form__label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    display: block;
    margin-bottom: 6px;
}
.login-form__label-row .login-form__label { margin-bottom: 0; }

.login-form__forgot {
    font-size: 12px;
    font-weight: 500;
    color: #1768FF;
    text-decoration: none;
    transition: color .15s;
}
.login-form__forgot:hover {
    color: #0E44B0;
    text-decoration: underline;
}

.login-form__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.login-form__input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
    display: flex;
    align-items: center;
}
.login-form__input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.login-form__input::placeholder { color: #94a3b8; }
.login-form__input:focus {
    border-color: #1768FF;
    box-shadow: 0 0 0 3px rgba(23, 104, 255, 0.12);
}
.login-form__input.is-invalid { border-color: #dc3545; }
.login-form__input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12); }

.login-form__toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.login-form__toggle-password:hover { color: #0f172a; }

.login-form__capslock {
    font-size: 11px;
    color: #d97706;
    margin-top: 4px;
    display: none;
}
.login-form__capslock.show { display: block; }

.login-form__submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1768FF 0%, #0E44B0 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .1s, box-shadow .2s, filter .2s;
    box-shadow: 0 4px 14px rgba(23, 104, 255, 0.25);
}
.login-form__submit:hover {
    box-shadow: 0 6px 20px rgba(23, 104, 255, 0.4);
    filter: brightness(1.05);
}
.login-form__submit:active { transform: translateY(1px); }
.login-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(0.3);
}

.login-form__alert {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #b91c1c;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-form__alert i { font-size: 18px; flex-shrink: 0; }
.login-form__alert .btn-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}
.login-form__alert .btn-close::before { content: '×'; }
.login-form__alert .btn-close:hover { opacity: 1; }

/* ──────────────────────────────────────────────
   DESKTOP (≥ 992px) — Split-screen
   ────────────────────────────────────────────── */
@media (min-width: 992px) {

    /* Mobile-only logo some */
    .login-mobile-logo { display: none; }

    /* Reset do mobile background pra split puro */
    .login-page {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        padding: 0;
        background: none;
        align-items: stretch;
        justify-content: stretch;
    }

    /* Brand reaparece */
    .login-brand {
        display: flex;
        position: relative;
        color: #fff;
        overflow: hidden;
        align-items: center;
        justify-content: center;
        padding: 64px;
        background: linear-gradient(135deg, #1768FF 0%, #0E44B0 60%, #082D80 100%);
    }

    /* Decorações: 2 círculos translúcidos */
    .login-brand::before,
    .login-brand::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.06);
        pointer-events: none;
    }
    .login-brand::before {
        width: 480px;
        height: 480px;
        top: -160px;
        right: -120px;
    }
    .login-brand::after {
        width: 320px;
        height: 320px;
        bottom: -80px;
        left: -100px;
    }

    .login-brand__inner {
        position: relative;
        z-index: 2;
        max-width: 480px;
        width: 100%;
        display: flex;
        flex-direction: column;
        height: 100%;
        text-align: left;
    }
    .login-brand__logo {
        display: inline-block;
        margin-bottom: auto;
    }
    .login-brand__logo img {
        height: 64px;
        width: auto;
        filter: brightness(0) invert(1);
    }
    .login-brand__pitch {
        margin-top: 64px;
        margin-bottom: 36px;
    }
    .login-brand__title {
        font-size: 38px;
        font-weight: 800;
        line-height: 1.1;
        margin: 0 0 20px;
        letter-spacing: -0.02em;
    }
    .login-brand__subtitle {
        font-size: 17px;
        line-height: 1.55;
        color: rgba(255, 255, 255, 0.85);
        margin: 0;
        font-weight: 400;
    }
    .login-brand__features {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    .login-brand__features li {
        display: flex;
        align-items: center;
        gap: 14px;
        font-size: 15px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.92);
    }
    .login-brand__features li i {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.18);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        color: #fff;
    }
    .login-brand__footer {
        margin-top: auto;
        padding-top: 48px;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.5);
    }

    /* Form (lado direito) */
    .login-main {
        max-width: none;
        padding: 64px 32px;
        background: #f1f5f9;
        align-items: center;
        justify-content: center;
    }
    .login-form-wrap {
        max-width: 440px;
        padding: 48px 40px 36px;
    }
    .login-form-wrap__title { font-size: 26px; }
}

/* Tela grande (≥ 1440px) */
@media (min-width: 1440px) {
    .login-brand        { padding: 80px 96px; }
    .login-brand__title { font-size: 44px; }
}
