:root {
    --red: #e1142d;
    --red-dark: #b80f22;
    --gold: #f0bf4f;
    --gold-2: #d89a1e;
    --dark-1: #07111f;
    --dark-2: #0b1930;
    --dark-3: #111827;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e5e7eb;
    --white: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body.proerd-login-body {
    min-height: 100vh;
    padding: 24px;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(225, 20, 45, .08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(240, 191, 79, .11), transparent 28%),
        #eef2f7;
}

.login-shell {
    width: min(1180px, 100%);
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    overflow: hidden;
    border-radius: 32px;
    background: var(--white);
    box-shadow: 0 25px 60px rgba(2, 8, 23, .14);
}

/* LADO ESQUERDO */
.brand-side {
    position: relative;
    min-height: 620px;
    padding: 36px 32px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        radial-gradient(circle at 4% 10%, rgba(228, 20, 45, .20), transparent 28%),
        radial-gradient(circle at 92% 72%, rgba(240, 191, 79, .15), transparent 28%),
        linear-gradient(180deg, #081426 0%, #0c1729 48%, #111b2b 72%, #09111f 100%);
}

.brand-side::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .45;
    pointer-events: none;
    background-image:
        linear-gradient(30deg, rgba(255, 255, 255, .055) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, .055) 87.5%, rgba(255, 255, 255, .055)),
        linear-gradient(150deg, rgba(255, 255, 255, .055) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, .055) 87.5%, rgba(255, 255, 255, .055)),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 2%, transparent 2.5%, transparent 97%, rgba(255, 255, 255, .035) 97.5%, rgba(255, 255, 255, .035));
    background-size: 54px 94px;
    background-position: 0 0, 0 0, 27px 47px;
}

.brand-side::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(140deg, rgba(227, 22, 48, .20), transparent 24%),
        linear-gradient(45deg, transparent 68%, rgba(240, 191, 79, .18) 88%, rgba(240, 191, 79, .28) 100%);
}

.brand-content,
.brand-footer {
    position: relative;
    z-index: 2;
}

.brand-content {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.brand-card {
    width: 100%;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
}

.brand-pmpb {
    padding: 12px 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

.brand-pmpb-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-pmpb-text strong {
    display: block;
    color: #06101d;
    font-size: 17px;
    font-weight: 900;
    line-height: .98;
    letter-spacing: .2px;
}

.brand-pmpb-text span {
    display: block;
    margin-top: 5px;
    color: #111827;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .3px;
}

.brand-dec {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(4px);
}

.brand-dec-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-dec-text strong {
    display: block;
    color: var(--gold);
    font-size: 19px;
    font-weight: 900;
    line-height: .98;
    letter-spacing: .3px;
    text-shadow: 0 3px 8px rgba(0, 0, 0, .35);
}

.brand-proerd {
    width: min(310px, 86%);
    margin: 34px auto 0;
    text-align: center;
}

.brand-proerd-logo {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 18px rgba(225, 20, 45, .22));
}

.brand-proerd-line {
    width: 80px;
    height: 2px;
    margin: 18px auto 12px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.brand-proerd-motto {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.brand-description {
    max-width: 360px;
    margin: 28px auto 0;
    color: rgba(255, 255, 255, .84);
    text-align: center;
    font-size: 14px;
    line-height: 1.45;
}

.brand-description strong {
    color: #fff;
}

.brand-footer {
    text-align: center;
    color: rgba(255, 255, 255, .48);
    font-size: 12px;
}

/* LADO DIREITO */
.form-side {
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 42px;
    background: #fff;
}

.form-wrap {
    width: 100%;
    max-width: 420px;
}

.form-wrap h1 {
    margin: 0;
    color: #0b1525;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
}

.title-underline {
    width: 52px;
    height: 3px;
    margin: 10px 0 26px;
    border-radius: 999px;
    background: var(--red);
}

.login-alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.login-alert-error {
    color: #991b1b;
    border: 1px solid #fecaca;
    background: #fee2e2;
}

.login-alert-info {
    color: #0c4a6e;
    border: 1px solid #bae6fd;
    background: #e0f2fe;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .35px;
    text-transform: uppercase;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 46px;
    padding: 0 46px 0 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    color: #111827;
    background: #f8fafc;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-wrap input:focus {
    border-color: #94a3b8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, .12);
}

.input-wrap input::placeholder {
    color: #94a3b8;
}

.field-icon,
.toggle-password {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transform: translateY(-50%);
}

.field-icon {
    left: 14px;
    pointer-events: none;
}

.field-icon svg,
.toggle-password svg {
    width: 18px;
    height: 18px;
}

.toggle-password {
    right: 14px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    height: 48px;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(90deg, #ea1028 0%, #ef5b24 55%, #f2b53d 100%);
    box-shadow: 0 12px 24px rgba(234, 16, 40, .16);
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.login-btn:hover,
.login-btn:focus {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.forgot {
    margin-top: 18px;
    text-align: center;
}

.forgot a {
    color: #e11d2e;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.forgot a:hover {
    text-decoration: underline;
}

.support {
    margin-top: 18px;
    padding: 14px 16px;
    text-align: center;
    border: 1px solid #f3d4d7;
    border-radius: 12px;
    color: #991b1b;
    background: #fff7f7;
    font-size: 14px;
}

.support a {
    color: #a61b1b;
    text-decoration: none;
}

.support a:hover {
    text-decoration: underline;
}

.quick-access {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.quick-access h2 {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .9px;
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.quick-links a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.quick-links a:hover,
.quick-links a:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, .08);
}

.quick-links img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.profile-choice-list {
    display: grid;
    gap: 12px;
}

.profile-choice-form {
    margin: 0;
}

.profile-choice-btn {
    width: 100%;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    color: var(--text);
    text-align: left;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.profile-choice-btn:hover,
.profile-choice-btn:focus {
    border-color: #e11d2e;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.profile-choice-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #e1142d, #f0bf4f);
    font-size: 20px;
}

.profile-choice-text {
    min-width: 0;
    flex: 1;
}

.profile-choice-text strong,
.profile-choice-text small {
    display: block;
}

.profile-choice-text strong {
    margin-bottom: 3px;
    color: #0b1525;
    font-size: 15px;
    font-weight: 900;
}

.profile-choice-text small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.profile-choice-arrow {
    flex: 0 0 auto;
    color: #e1142d;
    font-size: 24px;
}

.profile-logout-form {
    margin: 18px 0 0;
    text-align: center;
}

.profile-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    color: #991b1b;
    background: transparent;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.profile-logout-btn:hover,
.profile-logout-btn:focus {
    text-decoration: underline;
}

/* Responsivo */
@media (max-width: 980px) {
    body.proerd-login-body {
        padding: 16px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .brand-side,
    .form-side {
        min-height: auto;
    }

    .brand-side {
        padding: 30px 22px 20px;
    }

    .form-side {
        padding: 34px 24px 38px;
    }
}

@media (max-width: 640px) {
    body.proerd-login-body {
        padding: 10px;
    }

    .login-shell {
        border-radius: 22px;
    }

    .brand-side {
        padding: 22px 16px 18px;
    }

    .brand-card {
        gap: 12px;
        padding: 10px 12px;
    }

    .brand-pmpb-logo,
    .brand-dec-logo {
        width: 48px;
        height: 48px;
    }

    .brand-pmpb-text strong {
        font-size: 14px;
    }

    .brand-pmpb-text span {
        font-size: 7px;
    }

    .brand-dec-text strong {
        font-size: 15px;
    }

    .brand-proerd {
        width: min(260px, 88%);
        margin-top: 24px;
    }

    .brand-description {
        margin-top: 20px;
        font-size: 13px;
    }

    .form-wrap h1 {
        font-size: 22px;
    }

    .form-side {
        padding: 28px 18px 32px;
    }
}
