/**
 * Customer auth — login, register, forgot/reset password, logout.
 * Load after css/tokens.css and css/style.css.
 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@keyframes customerAuthOrbDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(26px, 16px) scale(1.05); }
}

@keyframes customerAuthCardEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes customerAuthAlertIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes customerLogoutFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes customerLogoutSpin {
    to { transform: rotate(360deg); }
}

@keyframes customerLogoutFillBar {
    from { width: 0%; }
    to   { width: 100%; }
}

/* ── Auth shell ── */
body.auth-gradient-page {
    font-family: "Manrope", "Segoe UI", sans-serif !important;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    overflow-x: clip;
    background:
        radial-gradient(1000px 520px at 15% -10%, rgba(139, 92, 246, 0.28), transparent 58%),
        radial-gradient(900px 520px at 85% 0%, rgba(59, 130, 246, 0.22), transparent 60%),
        var(--primary-dark, var(--tf-bg-0, #0b1120)) !important;
    color: #eaf0ff;
}

body.auth-gradient-page::before,
body.auth-gradient-page::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

body.auth-gradient-page::before {
    width: 520px;
    height: 520px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.20), transparent 70%);
    animation: customerAuthOrbDrift 16s ease-in-out infinite alternate;
}

body.auth-gradient-page::after {
    width: 420px;
    height: 420px;
    bottom: -110px;
    right: -90px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 70%);
    animation: customerAuthOrbDrift 22s ease-in-out infinite alternate-reverse;
}

body.auth-gradient-page .auth-container {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 100dvh;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(1.25rem, env(safe-area-inset-top, 0px))
        max(12px, env(safe-area-inset-right, 0px))
        max(1.75rem, env(safe-area-inset-bottom, 0px))
        max(12px, env(safe-area-inset-left, 0px));
    animation: customerAuthCardEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.auth-gradient-page .auth-card {
    width: 100%;
    max-width: min(440px, calc(100vw - 24px)) !important;
    background: rgba(30, 41, 59, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 24px !important;
    padding: 2.4rem 2.2rem 2rem !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.40), 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    position: relative;
    overflow: hidden;
}

body.auth-gradient-page .auth-card--register {
    max-width: min(460px, calc(100vw - 24px)) !important;
}

body.auth-gradient-page .auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.55), rgba(59, 130, 246, 0.40), transparent);
}

body.auth-gradient-page .auth-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 45% at 50% -8%, rgba(99, 80, 200, 0.10), transparent 65%);
}

body.auth-gradient-page .auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

body.auth-gradient-page .auth-card--register .auth-logo {
    margin-bottom: 1.6rem;
}

body.auth-gradient-page .auth-logo .gb-favicon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    border: 1.5px solid rgba(139, 92, 246, 0.42);
    background: linear-gradient(140deg, rgba(99, 60, 210, 0.50), rgba(37, 99, 235, 0.42));
    box-shadow: 0 0 0 5px rgba(99, 80, 200, 0.10), 0 8px 26px rgba(80, 50, 200, 0.26);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
}

body.auth-gradient-page .auth-card--register .auth-logo .gb-favicon-wrap {
    width: 68px;
    height: 68px;
    margin-bottom: 1rem;
}

body.auth-gradient-page .auth-logo .gb-favicon-wrap img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(160, 130, 255, 0.32));
}

body.auth-gradient-page .auth-card--register .auth-logo .gb-favicon-wrap img {
    width: 40px;
    height: 40px;
}

body.auth-gradient-page .auth-logo h1 {
    font-size: 1.78rem;
    font-weight: 800;
    letter-spacing: -0.022em;
    line-height: 1.05;
    color: #f1f5ff;
    margin-bottom: 0.3rem;
}

body.auth-gradient-page .auth-card--register .auth-logo h1 {
    font-size: 1.72rem;
    margin-bottom: 0.28rem;
}

body.auth-gradient-page .auth-logo p {
    font-size: 0.88rem;
    color: rgba(148, 163, 184, 0.88);
    font-weight: 600;
}

body.auth-gradient-page .alert {
    display: flex;
    align-items: flex-start;
    gap: 0.62rem;
    padding: 0.82rem 1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 650;
    margin-bottom: 1.25rem;
    line-height: 1.45;
    animation: customerAuthAlertIn 0.3s ease;
    transition: opacity 0.5s ease;
}

body.auth-gradient-page .alert.alert-fade-out {
    opacity: 0;
}

body.auth-gradient-page .alert i {
    font-size: 1.05rem;
    flex-shrink: 0;
}

body.auth-gradient-page .alert-success {
    background: rgba(34, 197, 94, 0.12) !important;
    border: 1px solid rgba(34, 197, 94, 0.28) !important;
    color: #4ade80 !important;
}

body.auth-gradient-page .alert-success a {
    color: #4ade80;
    text-decoration: underline;
    font-weight: 800;
}

body.auth-gradient-page .alert-danger,
body.auth-gradient-page .alert-error {
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.28) !important;
    color: #f87171 !important;
}

body.auth-gradient-page .alert ul,
body.auth-gradient-page .auth-error-list {
    margin: 0 !important;
    padding-left: 1.2rem !important;
}

body.auth-gradient-page .form-group {
    margin-bottom: 1.1rem;
    position: relative;
}

body.auth-gradient-page .auth-card--register .form-group {
    margin-bottom: 1rem;
}

body.auth-gradient-page .form-label {
    display: block;
    font-size: 0.7rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.90) !important;
    margin-bottom: 0.38rem;
}

body.auth-gradient-page .auth-card--register .form-label {
    font-size: 0.68rem !important;
    margin-bottom: 0.35rem;
}

body.auth-gradient-page .form-control {
    width: 100%;
    height: 52px;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(15, 23, 42, 0.66) !important;
    color: #f1f5ff !important;
    padding: 0 1rem !important;
    font-size: 0.96rem !important;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-shadow: none !important;
}

body.auth-gradient-page .auth-card--register .form-control,
body.auth-gradient-page .gb-pw-wrap .form-control {
    height: 50px;
    border-radius: 14px !important;
    padding: 0 2.8rem 0 1rem !important;
    font-size: 0.95rem !important;
}

body.auth-gradient-page .form-control::placeholder {
    color: rgba(100, 116, 139, 0.65);
    font-weight: 500;
}

body.auth-gradient-page .form-control:focus {
    border-color: rgba(139, 92, 246, 0.65) !important;
    background: rgba(15, 23, 42, 0.85) !important;
    box-shadow: 0 0 0 3px rgba(99, 60, 210, 0.18) !important;
}

body.auth-gradient-page .form-control.is-valid {
    border-color: rgba(34, 197, 94, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12) !important;
}

body.auth-gradient-page .form-control.is-invalid {
    border-color: rgba(239, 68, 68, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

body.auth-gradient-page .text-right {
    text-align: right;
}

body.auth-gradient-page .text-right a {
    font-size: 0.85rem !important;
    color: rgba(147, 197, 253, 0.85);
    font-weight: 750;
    text-decoration: none;
}

body.auth-gradient-page .text-right a:hover {
    color: rgba(191, 219, 254, 0.95);
}

.gb-remember {
    display: flex;
    align-items: center;
    gap: 0.52rem;
    margin: 0.75rem 0 1.1rem;
    cursor: pointer;
    user-select: none;
    width: fit-content;
}

.gb-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.66);
    accent-color: #8b5cf6;
    cursor: pointer;
    flex-shrink: 0;
}

.gb-remember span {
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.85);
    font-weight: 650;
}

.gb-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(100, 116, 139, 0.75);
    margin-top: 0.38rem;
}

.gb-hint i {
    font-size: 0.8rem;
}

.gb-pw-wrap {
    position: relative;
}

.gb-pw-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(100, 116, 139, 0.70);
    font-size: 1.1rem;
    line-height: 1;
    transition: color 0.15s;
}

.gb-pw-toggle:hover {
    color: rgba(147, 197, 253, 0.85);
}

.gb-strength-wrap {
    margin-top: 0.42rem;
    display: grid;
    gap: 0.28rem;
}

.gb-strength-bars {
    display: flex;
    gap: 4px;
}

.gb-strength-bar {
    flex: 1;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s;
}

.gb-strength-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(100, 116, 139, 0.65);
    transition: color 0.3s;
}

.gb-match-hint {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 750;
    margin-top: 0.38rem;
}

.gb-match-hint.show {
    display: flex;
}

.gb-match-hint.ok {
    color: #4ade80;
}

.gb-match-hint.no {
    color: #f87171;
}

body.auth-gradient-page .auth-inline-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.65rem;
}

body.auth-gradient-page .auth-stack-actions {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.2rem;
}

body.auth-gradient-page .auth-stack-actions__hint {
    margin: 0 0 0.1rem;
    text-align: center;
    font-size: 0.87rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.92);
}

body.auth-gradient-page .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 48px;
    padding: 0.65rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.66);
    color: #f1f5ff;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
}

body.auth-gradient-page .auth-btn--block {
    width: 100%;
}

body.auth-gradient-page .auth-btn--compact {
    min-height: 2.5rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    width: auto;
}

body.auth-gradient-page .auth-btn--secondary {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    box-shadow: 0 4px 18px rgba(99, 60, 210, 0.35);
}

body.auth-gradient-page .auth-btn:hover {
    filter: brightness(1.08);
}

body.auth-gradient-page .auth-btn:active {
    transform: scale(0.985);
}

body.auth-gradient-page .btn-primary.btn-block,
body.auth-gradient-page .btn-primary {
    width: 100%;
    height: 52px;
    border: none !important;
    border-radius: 999px !important;
    font-size: 0.97rem !important;
    font-weight: 850 !important;
    font-family: inherit;
    color: #fff !important;
    cursor: pointer;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
    box-shadow: 0 4px 18px rgba(99, 60, 210, 0.35) !important;
    transition: filter 0.18s, transform 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

body.auth-gradient-page .btn-primary.btn-block {
    margin-top: 0;
}

body.auth-gradient-page .auth-card--register .btn-primary.btn-block {
    margin-top: 0.35rem;
}

body.auth-gradient-page .btn-primary.btn-block:hover,
body.auth-gradient-page .btn-primary:hover {
    filter: brightness(1.08) !important;
}

body.auth-gradient-page .btn-primary.btn-block:active,
body.auth-gradient-page .btn-primary:active {
    transform: scale(0.985);
}

body.auth-gradient-page .auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.2rem 0;
    color: rgba(100, 116, 139, 0.55);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.auth-gradient-page .auth-divider::before,
body.auth-gradient-page .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.09);
}

body.auth-gradient-page .text-center {
    text-align: center !important;
    font-size: 0.87rem;
    color: rgba(148, 163, 184, 0.75);
    font-weight: 600;
}

body.auth-gradient-page .text-center a {
    color: rgba(147, 197, 253, 0.85);
    font-weight: 750;
    text-decoration: none;
    transition: color 0.15s;
}

body.auth-gradient-page .text-center a:hover {
    color: rgba(191, 219, 254, 0.95);
}

body.auth-gradient-page .mt-2 {
    margin-top: 0.6rem !important;
}

body.auth-gradient-page .mt-3 {
    margin-top: 0.9rem !important;
}

@media (max-width: 480px) {
    body.auth-gradient-page {
        padding: 0;
        align-items: stretch;
    }

    body.auth-gradient-page .auth-card {
        padding: 2rem 1.4rem 1.75rem !important;
        border-radius: 22px !important;
    }

    body.auth-gradient-page .auth-card--register {
        padding: 1.8rem 1.25rem 1.6rem !important;
    }

    body.auth-gradient-page .auth-logo h1 {
        font-size: 1.6rem;
    }

    body.auth-gradient-page .auth-card--register .auth-logo h1 {
        font-size: 1.5rem;
    }

    body.auth-gradient-page .form-control,
    body.auth-gradient-page .auth-card--register .form-control,
    body.auth-gradient-page .gb-pw-wrap .form-control {
        height: 48px !important;
        font-size: 16px !important;
    }

    body.auth-gradient-page .auth-card--register .form-control {
        height: 46px !important;
    }

    body.auth-gradient-page .btn-primary.btn-block,
    body.auth-gradient-page .btn-primary {
        height: 50px !important;
    }
}

/* ── Logout ── */
body.customer-logout-page {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1000px 520px at 15% -10%, rgba(139, 92, 246, 0.28), transparent 58%),
        radial-gradient(900px 520px at 85% 0%, rgba(59, 130, 246, 0.22), transparent 60%),
        var(--primary-dark, #0b1120);
    color: #eaf0ff;
}

body.customer-logout-page::before,
body.customer-logout-page::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

body.customer-logout-page::before {
    width: 520px;
    height: 520px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.20), transparent 70%);
    animation: customerAuthOrbDrift 16s ease-in-out infinite alternate;
}

body.customer-logout-page::after {
    width: 420px;
    height: 420px;
    bottom: -110px;
    right: -90px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 70%);
    animation: customerAuthOrbDrift 22s ease-in-out infinite alternate-reverse;
}

body.customer-logout-page .logout-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
    text-align: center;
    animation: customerLogoutFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.customer-logout-page .logout-icon-wrap {
    width: 88px;
    height: 88px;
    border-radius: 26px;
    border: 1.5px solid rgba(139, 92, 246, 0.42);
    background: linear-gradient(140deg, rgba(99, 60, 210, 0.50), rgba(37, 99, 235, 0.42));
    box-shadow: 0 0 0 6px rgba(99, 80, 200, 0.10), 0 10px 30px rgba(80, 50, 200, 0.26);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

body.customer-logout-page .logout-icon-wrap img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(160, 130, 255, 0.35));
}

body.customer-logout-page .logout-icon-wrap::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 30px;
    border: 2px solid transparent;
    border-top-color: rgba(139, 92, 246, 0.70);
    border-right-color: rgba(59, 130, 246, 0.45);
    animation: customerLogoutSpin 1.4s linear infinite;
}

body.customer-logout-page .logout-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f1f5ff;
}

body.customer-logout-page .logout-sub {
    font-size: 0.92rem;
    color: rgba(148, 163, 184, 0.80);
    font-weight: 600;
    margin-top: -0.9rem;
}

body.customer-logout-page .logout-bar-wrap {
    width: 220px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

body.customer-logout-page .logout-bar {
    height: 100%;
    border-radius: inherit;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    animation: customerLogoutFillBar 2s linear forwards;
}

body.customer-logout-page .logout-link {
    font-size: 0.83rem;
    color: rgba(147, 197, 253, 0.78);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s;
}

body.customer-logout-page .logout-link:hover {
    color: rgba(191, 219, 254, 0.95);
}

.become-agent-fee {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--tf-radius-md, 12px);
    background: var(--tf-surface);
    border: 1px solid var(--tf-border);
}
.become-agent-fee__label { color: var(--tf-text-muted); font-weight: 600; }
.become-agent-fee__value { color: var(--tf-gold); font-weight: 800; font-size: 1.25rem; }
.become-agent-signed-in { color: var(--tf-text-soft); margin: 0 0 12px; }
