:root {
    --primary-orange: #ffa71a;
    --primary-orange-dark: #d98600;
    --dark-bg: #0f1923;
    --dark-card: #1a2735;
    --dark-input: #1e2d3d;
    --text-light: #e0e0e0;
    --text-muted: #a0aab4;
    --border-subtle: rgba(255, 255, 255, .07);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-light);
    background: radial-gradient(circle at top right, #233446 0, var(--dark-bg) 46%);
    font-family: "Poppins", sans-serif;
}
.auth-background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-background span {
    position: absolute;
    bottom: -20px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 167, 26, .55);
    animation: auth-particle 9s infinite ease-in;
}
.auth-background span:nth-child(1) { left: 12%; animation-delay: 0s; }
.auth-background span:nth-child(2) { left: 32%; animation-delay: 2s; width: 10px; height: 10px; }
.auth-background span:nth-child(3) { left: 55%; animation-delay: 4s; }
.auth-background span:nth-child(4) { left: 74%; animation-delay: 1s; width: 5px; height: 5px; }
.auth-background span:nth-child(5) { left: 90%; animation-delay: 6s; }
@keyframes auth-particle {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateY(-105vh); opacity: 0; }
}
.auth-page {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 30px;
}
.auth-card {
    display: grid;
    grid-template-columns: minmax(300px, 42%) 1fr;
    width: min(960px, 100%);
    min-height: 590px;
    overflow: hidden;
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}
.auth-card.register-card { width: min(1080px, 100%); }
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 45px 35px;
    text-align: center;
    background: linear-gradient(150deg, #101c28, #172a3a);
}
.auth-brand::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 167, 26, .09);
    filter: blur(20px);
}
.auth-logo {
    z-index: 1;
    width: 105px;
    height: 105px;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(255, 167, 26, .22);
}
.auth-logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.65); }
.auth-brand h1 { z-index: 1; margin: 0; color: #fff; font-size: 1.85rem; font-weight: 700; }
.auth-brand h1 span { color: var(--primary-orange); }
.auth-brand > p { z-index: 1; max-width: 320px; margin: 8px 0 0; color: var(--text-muted); font-size: .87rem; }
.auth-benefits { z-index: 1; width: 100%; max-width: 310px; margin: 34px 0 0; padding: 0; list-style: none; text-align: left; }
.auth-benefits li { display: flex; align-items: center; gap: 12px; margin: 13px 0; color: #d5dce2; font-size: .82rem; }
.auth-benefits i { width: 20px; color: var(--primary-orange); text-align: center; }

/* Login: painel escuro com os brilhos e movimentos do visual original. */
.login-card .auth-brand {
    isolation: isolate;
    border-right: 1px solid rgba(255,255,255,.05);
    background: linear-gradient(160deg, #0f1923 0%, #1a2735 48%, #101b26 100%);
}
.login-card .auth-brand::before,
.login-card .auth-brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}
.login-card .auth-brand::before {
    top: -70px;
    right: -70px;
    width: 235px;
    height: 235px;
    background: var(--primary-orange);
    opacity: .11;
    filter: blur(58px);
    animation: login-brand-glow 5s ease-in-out infinite;
}
.login-card .auth-brand::after {
    left: -55px;
    bottom: -55px;
    top: auto;
    right: auto;
    width: 195px;
    height: 195px;
    background: #f0c040;
    opacity: .07;
    filter: blur(52px);
    animation: login-brand-glow 5s ease-in-out 2.5s infinite;
}
.login-card .auth-logo {
    width: 95px;
    height: 95px;
    border-radius: 22px;
    box-shadow: 0 10px 34px rgba(255,167,26,.25);
    animation: login-logo-float 3s ease-in-out infinite;
}
.login-card .auth-benefits li {
    opacity: 0;
    animation: login-feature-in .6s ease-out forwards;
}
.login-card .auth-benefits li:nth-child(1) { animation-delay: .25s; }
.login-card .auth-benefits li:nth-child(2) { animation-delay: .45s; }
.login-card .auth-benefits li:nth-child(3) { animation-delay: .65s; }
@keyframes login-brand-glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.45); }
}
@keyframes login-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes login-feature-in {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Cadastro: preserva o painel colorido e os efeitos do template visual original. */
.register-card .auth-brand {
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(circle at 18% 88%, rgba(255,255,255,.14) 0 2px, transparent 3px),
        linear-gradient(135deg, var(--primary-orange) 0%, #ffb74d 52%, var(--primary-orange) 100%);
}
.register-card .auth-brand::before,
.register-card .auth-brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    background: rgba(255,255,255,.11);
    filter: none;
}
.register-card .auth-brand::before {
    right: -110px;
    top: -95px;
    width: 310px;
    height: 310px;
    animation: register-orbit 7s ease-in-out infinite;
}
.register-card .auth-brand::after {
    left: -85px;
    bottom: -115px;
    top: auto;
    right: auto;
    width: 245px;
    height: 245px;
    background: rgba(255,255,255,.08);
    animation: register-orbit 8s ease-in-out infinite reverse;
}
.register-card .auth-logo {
    width: 120px;
    height: 120px;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(93, 52, 0, .25);
    animation: register-logo-pulse 2.8s ease-in-out infinite;
}
.register-card .auth-brand h1 span,
.register-card .auth-benefits i { color: #fff; }
.register-card .auth-brand > p,
.register-card .auth-benefits li { color: rgba(255,255,255,.92); }
.register-card .auth-benefits {
    padding: 14px 18px;
    background: rgba(74, 38, 0, .08);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 14px;
    backdrop-filter: blur(4px);
}
@keyframes register-logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@keyframes register-orbit {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-12px, 14px, 0) scale(1.06); }
}

.auth-content { display: grid; align-items: center; padding: 44px 50px; }
.auth-form-container { width: 100%; max-width: 590px; margin: auto; }
.auth-content h2 { margin: 0; color: #fff; font-size: 1.65rem; font-weight: 600; }
.auth-subtitle { margin: 7px 0 28px; color: var(--text-muted); font-size: .88rem; }
.auth-field { position: relative; margin-bottom: 18px; }
.auth-field > label { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: .78rem; }
.auth-field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    color: #fff;
    background: var(--dark-input);
    border: 1px solid transparent;
    border-radius: 10px;
    outline: none;
    transition: .25s ease;
}
.auth-field input:focus { border-color: var(--primary-orange); box-shadow: 0 0 0 4px rgba(255, 167, 26, .08); }
.floating-field input { height: 56px; padding: 18px 46px 0; }
.floating-field .field-icon { position: absolute; top: 20px; left: 17px; color: var(--text-muted); }
.floating-field > label {
    position: absolute;
    top: 18px;
    left: 46px;
    margin: 0;
    pointer-events: none;
    transition: .2s ease;
}
.floating-field input:focus + label,
.floating-field input:not(:placeholder-shown) + label {
    top: 7px;
    color: var(--primary-orange);
    font-size: .65rem;
}
.password-toggle {
    position: absolute;
    top: 13px;
    right: 10px;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
}
.field-error { display: block; margin-top: 5px; color: #ff847a; font-size: .7rem; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 3px 0 22px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: .76rem; cursor: pointer; }
.checkbox-label input { accent-color: var(--primary-orange); }
.secure-access { color: var(--text-muted); font-size: .72rem; }
.secure-access i { color: var(--primary-orange); }
.forgot-password-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-orange);
    font-size: .76rem;
    font-weight: 600;
    text-decoration: none;
}
.forgot-password-link:hover { color: #ffbe55; }
.auth-submit {
    width: 100%;
    min-height: 48px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-orange), #ffb74d);
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    transition: .25s ease;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 9px 25px rgba(255, 167, 26, .28); }
.auth-submit .spinner-border { display: none; margin-right: 7px; }
.auth-submit.loading .spinner-border { display: inline-block; }
.auth-submit.loading { pointer-events: none; opacity: .8; }
.auth-link-button {
    text-decoration: none;
}
.auth-footer-link { margin: 22px 0 0; color: var(--text-muted); font-size: .82rem; text-align: center; }
.auth-footer-link a { color: var(--primary-orange); font-weight: 600; text-decoration: none; }
.auth-info-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    color: var(--text-light);
    background: rgba(255, 167, 26, .08);
    border: 1px solid rgba(255, 167, 26, .2);
    border-radius: 10px;
    font-size: .82rem;
    line-height: 1.5;
}
.auth-info-box i {
    color: var(--primary-orange);
    margin-top: 2px;
}
.auth-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.password-strength { display: flex; gap: 4px; margin-top: 7px; }
.password-strength span { flex: 1; height: 3px; background: rgba(255, 255, 255, .08); border-radius: 4px; }
.password-strength span.active { background: var(--primary-orange); }
.auth-field small { display: block; margin-top: 5px; color: var(--text-muted); font-size: .65rem; }
.terms-field { margin: 3px 0 20px; }
.terms-field a { color: var(--primary-orange); font-weight: 600; text-decoration: none; }
.terms-field a:hover { color: #ffbe55; text-decoration: underline; }

.terms-card {
    width: min(1120px, 100%);
    min-height: auto;
}
.terms-card .auth-content { align-items: stretch; }
.terms-card .auth-form-container { max-width: 680px; }
.privacy-document {
    max-height: min(72vh, 760px);
    overflow-y: auto;
    padding-right: 10px;
}
.privacy-header { margin-bottom: 22px; }
.privacy-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--primary-orange);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
}
.privacy-back-link:hover { color: #ffbe55; }
.privacy-document section {
    padding: 18px 0;
    border-top: 1px solid var(--border-subtle);
}
.privacy-document h3 {
    margin: 0 0 9px;
    color: #fff;
    font-size: .98rem;
    font-weight: 600;
}
.privacy-document p,
.privacy-document li {
    color: var(--text-muted);
    font-size: .82rem;
    line-height: 1.7;
}
.privacy-document p { margin: 0; }
.privacy-document ul { margin: 0; padding-left: 20px; }
.privacy-note {
    margin-top: 18px !important;
    padding: 14px 16px;
    color: #ffd180 !important;
    background: rgba(255, 167, 26, .08);
    border: 1px solid rgba(255, 167, 26, .2);
    border-radius: 10px;
}

@media (max-width: 820px) {
    .auth-page { padding: 18px; }
    .auth-card { grid-template-columns: 1fr; }
    .auth-brand { padding: 28px 24px; }
    .auth-logo { width: 72px; height: 72px; margin-bottom: 10px; border-radius: 17px; }
    .register-card .auth-logo { width: 82px; height: 82px; border-radius: 18px; }
    .auth-brand h1 { font-size: 1.35rem; }
    .auth-brand > p { font-size: .76rem; }
    .auth-benefits { display: none; }
    .auth-content { padding: 32px 24px; }
}

@media (max-width: 560px) {
    .auth-page { padding: 0; }
    .auth-card { min-height: 100vh; border: 0; border-radius: 0; }
    .auth-brand { padding: 22px; }
    .auth-content { padding: 28px 20px; }
    .auth-form-grid { grid-template-columns: 1fr; }
}

/* Premium auth experience */
:root {
    --primary-orange: #f1c36d;
    --primary-orange-dark: #704508;
    --dark-bg: #f7f6f2;
    --dark-card: #ffffff;
    --dark-input: #fbfaf7;
    --text-light: #2f2d29;
    --text-muted: #77736b;
    --border-subtle: #e5e0d6;
}

body {
    color: #2f2d29;
    background:
        radial-gradient(circle at 16% 10%, rgba(241,195,109,.20), transparent 28%),
        linear-gradient(180deg, #fbfaf7 0%, #f7f6f2 100%);
}

.auth-background {
    display: none;
}

.auth-page {
    padding: 28px;
}

.auth-card,
.auth-card.register-card,
.terms-card {
    grid-template-columns: minmax(280px, .88fr) minmax(0, 1.12fr);
    width: min(1040px, 100%);
    min-height: 620px;
    color: #2f2d29;
    background: #fff;
    border: 1px solid #e5e0d6;
    border-radius: 32px;
    box-shadow: 0 24px 80px rgba(31,27,18,.12), 0 1px 0 rgba(255,255,255,.9) inset;
}

.auth-card.register-card {
    width: min(1120px, 100%);
}

.auth-brand,
.login-card .auth-brand,
.register-card .auth-brand {
    align-items: flex-start;
    justify-content: space-between;
    padding: 34px;
    text-align: left;
    color: #fff;
    background:
        radial-gradient(circle at 82% 12%, rgba(241,195,109,.18), transparent 30%),
        linear-gradient(180deg, #1b1a17 0%, #111 100%);
    border-right: 0;
}

.auth-brand::before,
.auth-brand::after,
.login-card .auth-brand::before,
.login-card .auth-brand::after,
.register-card .auth-brand::before,
.register-card .auth-brand::after {
    display: none;
}

.auth-logo,
.login-card .auth-logo,
.register-card .auth-logo {
    width: 72px;
    height: 72px;
    margin: 0 0 28px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(0,0,0,.26);
    animation: none;
}

.auth-logo img {
    transform: scale(1.6);
}

.auth-brand h1 {
    max-width: 320px;
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 4.15rem);
    line-height: .92;
    letter-spacing: -.075em;
    font-weight: 800;
}

.auth-brand h1 span,
.register-card .auth-brand h1 span {
    color: #f1c36d;
}

.auth-brand > p,
.register-card .auth-brand > p {
    max-width: 310px;
    margin-top: 16px;
    color: #cfc7ba;
    font-size: .92rem;
    line-height: 1.65;
}

.auth-benefits,
.register-card .auth-benefits {
    max-width: none;
    margin-top: 34px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
}

.auth-benefits li,
.login-card .auth-benefits li,
.register-card .auth-benefits li {
    margin: 10px 0;
    color: #ebe6dc;
    font-size: .86rem;
    opacity: 1;
    animation: none;
}

.auth-benefits i,
.register-card .auth-benefits i {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: #151515;
    background: #f1c36d;
    border-radius: 999px;
    font-size: .78rem;
}

.auth-content {
    align-items: center;
    padding: 42px;
    background: #fff;
}

.auth-form-container {
    max-width: 620px;
}

.auth-content h2 {
    color: #151515;
    font-size: clamp(1.85rem, 3vw, 2.65rem);
    line-height: 1;
    letter-spacing: -.06em;
    font-weight: 800;
}

.auth-subtitle {
    max-width: 520px;
    margin: 10px 0 28px;
    color: #77736b;
    line-height: 1.65;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field > label,
.checkbox-label,
.secure-access,
.auth-field small,
.auth-footer-link {
    color: #77736b;
}

.auth-field > label {
    font-weight: 750;
}

.auth-field input {
    height: 50px;
    color: #151515;
    background: #fbfaf7;
    border: 1px solid #e5e0d6;
    border-radius: 15px;
}

.auth-field input::placeholder {
    color: #aaa397;
}

.auth-field input:focus {
    border-color: #151515;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(21,21,21,.07);
}

.floating-field input {
    height: 58px;
    padding: 19px 46px 0;
}

.floating-field .field-icon,
.password-toggle {
    color: #8c867a;
}

.floating-field input:focus + label,
.floating-field input:not(:placeholder-shown) + label {
    color: #704508;
}

.auth-options {
    align-items: center;
}

.forgot-password-link,
.auth-footer-link a,
.terms-field a,
.privacy-back-link {
    color: #151515;
    font-weight: 800;
}

.forgot-password-link:hover,
.auth-footer-link a:hover,
.terms-field a:hover,
.privacy-back-link:hover {
    color: #704508;
}

.auth-submit {
    min-height: 50px;
    color: #fff;
    background: #151515;
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(31,27,18,.14);
}

.auth-submit:hover {
    background: #2f2d29;
    transform: translateY(-1px);
    box-shadow: 0 18px 44px rgba(31,27,18,.18);
}

.auth-info-box,
.alert {
    color: #2f2d29;
    background: #fff8e7;
    border-color: #ead3a3;
    border-radius: 16px;
}

.field-error {
    color: #b83d3d;
}

.password-strength span {
    background: #eee8dd;
}

.password-strength span.active {
    background: #151515;
}

.terms-field {
    align-items: flex-start;
    line-height: 1.55;
}

.terms-card {
    width: min(1180px, 100%);
}

.terms-card .auth-brand {
    justify-content: flex-start;
}

.terms-card .auth-content {
    align-items: stretch;
}

.terms-card .auth-form-container {
    max-width: 760px;
}

.privacy-document {
    max-height: min(78vh, 820px);
    padding-right: 14px;
}

.privacy-document::-webkit-scrollbar {
    width: 10px;
}

.privacy-document::-webkit-scrollbar-thumb {
    background: #d8cfc0;
    border: 3px solid #fff;
    border-radius: 999px;
}

.privacy-header {
    margin-bottom: 26px;
}

.privacy-header h2 {
    margin-top: 10px;
}

.privacy-document section {
    padding: 20px 0;
    border-color: #eee8dd;
}

.privacy-document h3 {
    color: #151515;
    letter-spacing: -.025em;
}

.privacy-document p,
.privacy-document li {
    color: #5f5a52;
}

.privacy-note {
    color: #704508 !important;
    background: #fff2d2;
    border-color: #ead3a3;
    border-radius: 16px;
}

@media (max-width: 900px) {
    .auth-card,
    .auth-card.register-card,
    .terms-card {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 26px;
    }

    .auth-brand,
    .login-card .auth-brand,
    .register-card .auth-brand {
        padding: 28px;
    }

    .auth-brand h1 {
        font-size: 2.25rem;
        letter-spacing: -.055em;
    }

    .auth-brand > p {
        max-width: 560px;
    }

    .auth-benefits {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 22px;
    }

    .auth-benefits li {
        align-items: flex-start;
        margin: 0;
    }

    .auth-content {
        padding: 32px 28px;
    }
}

@media (max-width: 620px) {
    .auth-page {
        padding: 0;
    }

    .auth-card,
    .auth-card.register-card,
    .terms-card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-brand,
    .login-card .auth-brand,
    .register-card .auth-brand {
        padding: 24px 20px;
    }

    .auth-benefits {
        grid-template-columns: 1fr;
    }

    .auth-content {
        padding: 28px 20px;
    }
}

/* BEP Energia public pages refresh */
:root {
    --primary-orange: #f97316;
    --primary-orange-dark: #ea580c;
    --dark-bg: #f8fafc;
    --dark-card: #ffffff;
    --dark-input: #f1f5f9;
    --text-light: #0f172a;
    --text-muted: #64748b;
    --border-subtle: #e2e8f0;
    --auth-sidebar: #0f172a;
    --auth-success: #22c55e;
    --auth-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --auth-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .07);
    --auth-shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, .14), 0 8px 10px -6px rgba(15, 23, 42, .08);
    --auth-transition: .25s cubic-bezier(.4, 0, .2, 1);
}

html {
    min-width: 320px;
    background: var(--dark-bg);
}

body {
    overflow-x: hidden;
    color: var(--text-light);
    background: var(--dark-bg);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid rgba(249, 115, 22, .35);
    outline-offset: 2px;
}

.auth-background {
    display: none;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    padding: 28px;
    place-items: center;
}

.auth-card,
.auth-card.register-card,
.terms-card {
    display: grid;
    grid-template-columns: minmax(270px, 36%) minmax(0, 1fr);
    width: min(1040px, 100%);
    min-height: 620px;
    overflow: hidden;
    color: var(--text-light);
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--auth-shadow-lg);
}

.auth-card.register-card,
.terms-card {
    width: min(1160px, 100%);
}

.login-card,
.register-card {
    animation: bep-auth-card-glow 4s ease-in-out infinite;
}

@keyframes bep-auth-card-glow {
    0%,
    100% {
        box-shadow:
            var(--auth-shadow-lg),
            0 0 0 1px rgba(249, 115, 22, .08),
            0 0 28px rgba(249, 115, 22, .10);
    }
    50% {
        box-shadow:
            var(--auth-shadow-lg),
            0 0 0 1px rgba(249, 115, 22, .28),
            0 0 46px rgba(249, 115, 22, .24);
    }
}

.auth-brand,
.login-card .auth-brand,
.register-card .auth-brand,
.terms-card .auth-brand {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 0;
    padding: 32px;
    overflow: hidden;
    color: #fff;
    text-align: left;
    background: var(--auth-sidebar);
    border-right: 0;
}

.auth-brand::before,
.auth-brand::after,
.login-card .auth-brand::before,
.login-card .auth-brand::after,
.register-card .auth-brand::before,
.register-card .auth-brand::after {
    display: none;
}

.auth-logo,
.login-card .auth-logo,
.register-card .auth-logo {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    margin: 0 0 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(249, 115, 22, .24);
    animation: none;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.55);
}

.login-card .auth-logo,
.register-card .auth-logo {
    width: 132px;
    height: 132px;
    flex-basis: 132px;
    margin-bottom: 14px;
    border-radius: 28px;
}

.terms-card .auth-logo {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
    margin-bottom: 10px;
    border-radius: 24px;
    box-shadow:
        0 14px 32px rgba(15, 23, 42, .22),
        0 0 34px rgba(249, 115, 22, .16);
}

.terms-card .auth-brand {
    justify-content: flex-start;
    gap: 0;
}

.terms-card .auth-brand h1 {
    margin-top: 0;
}

.terms-card .auth-brand > p {
    margin-top: 8px;
}

.auth-brand h1 {
    max-width: 320px;
    margin: 0;
    color: #fff;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
}

.auth-brand h1 span,
.register-card .auth-brand h1 span {
    color: var(--primary-orange);
}

.auth-brand > p,
.register-card .auth-brand > p {
    max-width: 310px;
    margin: 10px 0 0;
    color: #cbd5e1;
    font-size: .88rem;
    line-height: 1.6;
}

.auth-benefits,
.register-card .auth-benefits {
    display: grid;
    gap: 9px;
    width: 100%;
    max-width: none;
    margin: 28px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    list-style: none;
    backdrop-filter: none;
}

.auth-benefits li,
.login-card .auth-benefits li,
.register-card .auth-benefits li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 34px;
    margin: 0;
    color: #e2e8f0;
    font-size: .84rem;
    opacity: 1;
    animation: none;
}

.auth-benefits i,
.register-card .auth-benefits i {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--primary-orange);
    background: rgba(249, 115, 22, .14);
    border: 1px solid rgba(249, 115, 22, .22);
    border-radius: 10px;
    font-size: .82rem;
}

.auth-content {
    display: grid;
    align-items: center;
    min-width: 0;
    padding: 42px;
    background: #fff;
}

.auth-form-container {
    width: 100%;
    max-width: 620px;
    margin: auto;
}

.terms-card .auth-form-container {
    max-width: 780px;
}

.auth-content h2 {
    margin: 0;
    color: var(--text-light);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.auth-subtitle {
    max-width: 540px;
    margin: 8px 0 28px;
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.6;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.auth-field {
    position: relative;
    margin-bottom: 16px;
}

.auth-field > label,
.checkbox-label,
.secure-access,
.auth-field small,
.auth-footer-link {
    color: var(--text-muted);
}

.auth-field > label {
    display: block;
    margin-bottom: 7px;
    font-size: .78rem;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    color: var(--text-light);
    background: var(--dark-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    outline: 0;
    transition: border-color var(--auth-transition), background var(--auth-transition), box-shadow var(--auth-transition);
}

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

.auth-field input:focus {
    color: var(--text-light);
    background: #fff;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .14);
}

.floating-field input {
    height: 58px;
    padding: 19px 46px 0;
}

.floating-field .field-icon {
    position: absolute;
    top: 20px;
    left: 17px;
    color: var(--text-muted);
}

.floating-field > label {
    position: absolute;
    top: 18px;
    left: 46px;
    margin: 0;
    pointer-events: none;
    transition: color var(--auth-transition), top var(--auth-transition), font-size var(--auth-transition);
}

.floating-field input:focus + label,
.floating-field input:not(:placeholder-shown) + label {
    top: 7px;
    color: var(--primary-orange);
    font-size: .65rem;
}

.password-toggle {
    position: absolute;
    top: 13px;
    right: 10px;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: 10px;
}

.password-toggle:hover {
    color: var(--primary-orange);
    background: #fff7ed;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 3px 0 22px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .78rem;
    line-height: 1.45;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    accent-color: var(--primary-orange);
}

.forgot-password-link,
.auth-footer-link a,
.terms-field a,
.privacy-back-link {
    color: var(--primary-orange);
    font-weight: 700;
    text-decoration: none;
}

.forgot-password-link:hover,
.auth-footer-link a:hover,
.terms-field a:hover,
.privacy-back-link:hover {
    color: var(--primary-orange-dark);
    text-decoration: underline;
}

.auth-submit {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--primary-orange);
    border: 1px solid var(--primary-orange);
    border-radius: 999px;
    box-shadow: var(--auth-shadow-sm);
    font-weight: 700;
    transition: background var(--auth-transition), border-color var(--auth-transition), box-shadow var(--auth-transition), transform var(--auth-transition);
}

.auth-submit:hover {
    color: #fff;
    background: var(--primary-orange-dark);
    border-color: var(--primary-orange-dark);
    box-shadow: var(--auth-shadow-md);
    transform: translateY(-1px);
}

.auth-submit .spinner-border {
    display: none;
    margin-right: 0;
}

.auth-submit.loading .spinner-border {
    display: inline-block;
}

.auth-link-button {
    text-decoration: none;
}

.auth-footer-link {
    margin: 22px 0 0;
    font-size: .84rem;
    text-align: center;
}

.alert,
.auth-info-box {
    color: var(--text-light);
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    box-shadow: var(--auth-shadow-sm);
}

.alert-danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.alert-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.field-error {
    display: block;
    margin-top: 5px;
    color: #dc2626;
    font-size: .72rem;
}

.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 7px;
}

.password-strength span {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    border-radius: 999px;
}

.password-strength span.active {
    background: var(--primary-orange);
}

.terms-field {
    align-items: flex-start;
    margin: 3px 0 20px;
}

.privacy-document {
    max-height: min(78vh, 820px);
    overflow-y: auto;
    padding-right: 14px;
    scrollbar-color: #cbd5e1 transparent;
}

.privacy-document::-webkit-scrollbar {
    width: 8px;
}

.privacy-document::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.privacy-header {
    margin-bottom: 24px;
}

.privacy-header h2 {
    margin-top: 10px;
}

.privacy-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: .82rem;
}

.privacy-document section {
    padding: 20px 0;
    border-top: 1px solid var(--border-subtle);
}

.privacy-document h3 {
    margin: 0 0 9px;
    color: var(--text-light);
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: 0;
}

.privacy-document p,
.privacy-document li {
    color: #475569;
    font-size: .84rem;
    line-height: 1.7;
}

.privacy-document p {
    margin: 0;
}

.privacy-document ul {
    margin: 0;
    padding-left: 20px;
}

.privacy-document a {
    color: var(--primary-orange-dark);
    font-weight: 700;
}

@media (max-width: 900px) {
    .auth-card,
    .auth-card.register-card,
    .terms-card {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 16px;
    }

    .auth-brand,
    .login-card .auth-brand,
    .register-card .auth-brand,
    .terms-card .auth-brand {
        display: block;
        padding: 24px;
    }

    .auth-logo,
    .login-card .auth-logo,
    .register-card .auth-logo {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .login-card .auth-logo,
    .register-card .auth-logo {
        width: 112px;
        height: 112px;
        flex-basis: 112px;
        margin-bottom: 10px;
        border-radius: 24px;
    }

    .terms-card .auth-logo {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
        margin-bottom: 10px;
        border-radius: 20px;
    }

    .auth-brand h1 {
        font-size: 1.35rem;
    }

    .auth-brand > p {
        max-width: 640px;
        margin-top: 7px;
        font-size: .82rem;
    }

    .auth-benefits,
    .register-card .auth-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 18px;
    }

    .auth-benefits li,
    .login-card .auth-benefits li,
    .register-card .auth-benefits li {
        align-items: flex-start;
        font-size: .78rem;
    }

    .auth-content {
        padding: 32px 24px;
    }
}

@media (max-width: 620px) {
    .auth-page {
        padding: 0;
    }

    .auth-card,
    .auth-card.register-card,
    .terms-card {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-brand,
    .login-card .auth-brand,
    .register-card .auth-brand,
    .terms-card .auth-brand {
        padding: 22px 20px;
    }

    .auth-benefits,
    .register-card .auth-benefits {
        display: none;
    }

    .auth-content {
        padding: 28px 20px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .auth-content h2 {
        font-size: 1.42rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .privacy-document {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .register-card {
        animation: none;
        box-shadow:
            var(--auth-shadow-lg),
            0 0 0 1px rgba(249, 115, 22, .18),
            0 0 34px rgba(249, 115, 22, .14);
    }
}

/* Auth brand layout: logo/title at the top, supporting copy at the bottom. */
.auth-brand,
.login-card .auth-brand,
.register-card .auth-brand,
.terms-card .auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand-main {
    width: 100%;
    min-width: 0;
}

.auth-brand-main .auth-logo {
    margin-bottom: 10px;
}

.auth-brand-main h1 {
    margin-top: 0;
}

.auth-brand-footer {
    width: 100%;
    margin-top: 32px;
}

.auth-brand-footer > p {
    max-width: 310px;
    margin: 0 0 18px;
    color: #cbd5e1;
    font-size: .88rem;
    line-height: 1.6;
}

.auth-brand-footer > p:empty {
    display: none;
}

.auth-brand-footer .auth-benefits,
.terms-card .auth-brand-footer .auth-benefits {
    margin-top: 0;
}

.terms-card .auth-brand-footer .auth-benefits {
    display: grid;
}

@media (max-width: 620px) {
    .auth-brand-footer {
        margin-top: 20px;
    }

    .terms-card .auth-brand-footer .auth-benefits {
        display: grid;
    }
}
