/* Standalone user login, styled to match the public PropSpectra landing page. */
.ps-auth-page {
    --ps-auth-muted: #4d6176;
    --ps-auth-link: #143364;
    --ps-auth-hero: #eaf1f4;
    --ps-auth-ring: rgba(20, 51, 100, .09);
    --ps-auth-primary: #143364;
    --ps-auth-primary-hover: #0d2651;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--ps-bg);
    color: var(--ps-text);
    font-family: 'DM Sans', sans-serif;
}

.ps-auth-page *,
.ps-auth-page button,
.ps-auth-page input {
    font-family: 'DM Sans', sans-serif;
}

.ps-auth-navbar {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--ps-border);
    background: var(--ps-surface);
}

.ps-auth-navbar .navbar-brand,
.ps-auth-navbar .nav-link {
    color: var(--ps-text);
}

.ps-auth-navbar .nav-link:hover,
.ps-auth-navbar .nav-link:focus-visible,
.ps-auth-navbar .navbar-brand:hover {
    color: var(--ps-link, var(--ps-primary));
}

.ps-auth-navbar .navbar-toggler {
    border-color: var(--ps-border);
}

.ps-auth-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(74, 124, 255, .28);
}

.ps-auth-navbar .dropdown-menu {
    border-color: var(--ps-border);
    background: var(--ps-surface);
    box-shadow: var(--ps-shadow);
}

.ps-auth-navbar .dropdown-item {
    color: var(--ps-text);
}

.ps-auth-navbar .dropdown-item:hover,
.ps-auth-navbar .dropdown-item:focus {
    background: var(--ps-hover-bg);
    color: var(--ps-text);
}

.ps-auth-navbar .dropdown-item.active,
.ps-auth-navbar .dropdown-item:active {
    background: var(--ps-auth-primary);
    color: var(--ps-primary-contrast);
}

.ps-auth-theme-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 40px;
    margin-left: .5rem;
    padding: .45rem .8rem !important;
    border: 1px solid var(--ps-border) !important;
    border-radius: 8px;
    background: transparent !important;
    color: var(--ps-text) !important;
    font-size: .82rem;
    font-weight: 650;
    cursor: pointer;
}

.ps-auth-theme-toggle:hover,
.ps-auth-theme-toggle:focus-visible {
    border-color: var(--ps-primary) !important;
    background: var(--ps-hover-bg) !important;
    color: var(--ps-text) !important;
}

.ps-auth-main {
    position: relative;
    isolation: isolate;
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 650px;
    padding: clamp(2rem, 5vw, 4.5rem) 1rem;
    overflow: hidden;
    background: var(--ps-auth-hero);
    color: var(--ps-text);
}

.ps-auth-main::before,
.ps-auth-main::after {
    position: absolute;
    z-index: -1;
    border: 1px solid var(--ps-auth-ring);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.ps-auth-main::before {
    top: -28rem;
    right: -17rem;
    width: 58rem;
    height: 58rem;
    box-shadow: 0 0 0 3rem rgba(20, 51, 100, .025),
                0 0 0 7rem rgba(20, 51, 100, .02);
}

.ps-auth-main::after {
    bottom: -39rem;
    left: -24rem;
    width: 62rem;
    height: 62rem;
    opacity: .7;
}

.ps-auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 470px;
}

.ps-auth-card {
    width: 100%;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--ps-border);
    border-radius: 20px;
    background: var(--ps-surface);
    box-shadow: var(--ps-shadow);
    color: var(--ps-text);
}

.ps-auth-card :is(h1, h2, h3, label, strong) {
    color: var(--ps-text);
}

.ps-auth-toggle {
    display: flex;
    gap: .25rem;
    padding: .3rem;
    border: 1px solid var(--ps-border);
    border-radius: 999px;
    background: var(--ps-surface-2);
}

.ps-auth-toggle .toggle-btn {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-width: 0;
    padding: .75rem .85rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ps-auth-muted);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}

.ps-auth-toggle .toggle-btn:hover,
.ps-auth-toggle .toggle-btn:focus-visible {
    background: var(--ps-hover-bg);
    color: var(--ps-text);
}

.ps-auth-toggle .toggle-btn.active {
    background: var(--ps-auth-primary);
    color: #fff;
}

.ps-auth-login-methods {
    margin: .1rem 0 .85rem;
}

.ps-auth-google {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 1rem 0 1.15rem;
}

.ps-auth-google .g_id_signin {
    width: min(100%, 350px);
    max-width: 100%;
}

.ps-auth-google .g_id_signin iframe {
    max-width: 100% !important;
}

.ps-auth-divider {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.15rem 0;
    text-align: center;
}

.ps-auth-divider::before,
.ps-auth-divider::after {
    flex: 1 1 auto;
    border-top: 1px solid var(--ps-border);
    content: "";
}

.ps-auth-brand {
    margin: 1.7rem 0 1.8rem;
    text-align: center;
}

.ps-auth-brand h1 {
    margin: 0 0 .25rem;
    color: var(--ps-text);
    font-size: clamp(1.8rem, 5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.055em;
}

.ps-auth-brand h1 span {
    color: var(--ps-brand-blue-1);
}

.ps-auth-brand p {
    margin: 0;
    color: var(--ps-auth-muted);
    font-size: .92rem;
}

.ps-auth-card .form-label {
    display: block;
    margin-bottom: .5rem;
    color: var(--ps-text);
    font-size: .88rem;
    font-weight: 700;
}

.ps-auth-card .form-control {
    min-height: 48px;
    padding: .75rem .95rem;
    border: 1px solid var(--ps-border);
    border-radius: 9px;
    background: var(--ps-surface-2);
    color: var(--ps-text);
    font-size: .94rem;
}

.ps-auth-card .form-control::placeholder {
    color: var(--ps-auth-muted);
    opacity: 1;
}

.ps-auth-card .form-control:focus {
    border-color: var(--ps-brand-blue-1);
    background: var(--ps-surface);
    box-shadow: 0 0 0 .22rem rgba(74, 124, 255, .25);
    color: var(--ps-text);
}

.ps-auth-card .btn-submit {
    min-height: 48px;
    width: 100%;
    border: 1px solid var(--ps-auth-primary);
    border-radius: 9px;
    background: var(--ps-auth-primary);
    box-shadow: 0 7px 18px rgba(20, 51, 100, .15);
    color: #fff;
    font-size: .94rem;
    font-weight: 750;
}

.ps-auth-card .btn-submit:hover,
.ps-auth-card .btn-submit:focus-visible {
    border-color: var(--ps-auth-primary-hover);
    background: var(--ps-auth-primary-hover);
    color: #fff;
}

.ps-auth-card .text-muted {
    color: var(--ps-auth-muted) !important;
}

.ps-auth-card a.text-muted {
    color: var(--ps-auth-link) !important;
    font-weight: 650;
    text-decoration-color: currentColor;
    text-underline-offset: 3px;
}

.ps-auth-card a.text-muted:hover,
.ps-auth-card a.text-muted:focus-visible {
    color: var(--ps-brand-blue-1) !important;
}

.ps-auth-card .alert {
    border-radius: 10px;
}

.ps-auth-card .g_id_signin {
    max-width: 100%;
}

.ps-auth-footer {
    background: #143364;
    color: #fff;
}

.ps-auth-footer h5 {
    color: #fff;
    font-weight: 750;
}

.ps-auth-footer p {
    margin-bottom: .35rem;
    color: #d3dfef;
}

.ps-auth-page .ps-auth-card .text-muted {
    color: var(--ps-auth-muted) !important;
}

.ps-auth-page .ps-auth-card a.text-muted {
    color: var(--ps-auth-link) !important;
}

.ps-auth-page .ps-auth-footer p.text-muted {
    color: #d3dfef !important;
}

.ps-auth-footer a {
    color: #d3dfef !important;
}

.ps-auth-footer a:hover,
.ps-auth-footer a:focus-visible {
    color: #fff !important;
}

.ps-auth-page [data-analytics-settings] {
    color: var(--ps-auth-link);
}

.ps-auth-page :is(a, button, input):focus-visible {
    outline: 3px solid var(--ps-brand-blue-1);
    outline-offset: 3px;
}

html[data-theme="dark"] .ps-auth-page {
    --ps-auth-muted: #c0cce2;
    --ps-auth-link: #a9c5ff;
    --ps-auth-hero: #080e19;
    --ps-auth-ring: rgba(143, 179, 255, .12);
    --ps-auth-primary: #1d4ed8;
    --ps-auth-primary-hover: #1e40af;
}

/* The global theme stylesheet has auth-specific rules with higher specificity. */
html[data-theme="light"] .ps-auth-page .ps-auth-toggle .toggle-btn:not(.active),
html[data-theme="dark"] .ps-auth-page .ps-auth-toggle .toggle-btn:not(.active) {
    color: var(--ps-auth-muted) !important;
}

html[data-theme="light"] .ps-auth-page .ps-auth-toggle .toggle-btn:not(.active):hover,
html[data-theme="light"] .ps-auth-page .ps-auth-toggle .toggle-btn:not(.active):focus-visible,
html[data-theme="dark"] .ps-auth-page .ps-auth-toggle .toggle-btn:not(.active):hover,
html[data-theme="dark"] .ps-auth-page .ps-auth-toggle .toggle-btn:not(.active):focus-visible {
    color: var(--ps-text) !important;
}

html[data-theme="light"] .ps-auth-page .ps-auth-toggle .toggle-btn.active,
html[data-theme="dark"] .ps-auth-page .ps-auth-toggle .toggle-btn.active {
    background: var(--ps-auth-primary) !important;
    color: #fff !important;
}

html[data-theme="dark"] .ps-auth-page .ps-auth-card .ps-auth-toggle a.toggle-btn.active {
    color: #fff !important;
}

html[data-theme="dark"] .ps-auth-navbar .navbar-toggler-icon {
    filter: invert(1);
}

html[data-theme="dark"] .ps-auth-card .alert-danger {
    border-color: #8f3b4b;
    background: #351923;
    color: #ffd8de;
}

html[data-theme="dark"] .ps-auth-card .alert-info {
    border-color: #315c91;
    background: #122943;
    color: #d4e8ff;
}

html[data-theme="dark"] .ps-auth-footer {
    background: #0b1220;
}

html[data-theme="dark"] .ps-auth-page [data-analytics-settings] {
    color: var(--ps-auth-link);
}

@media (max-width: 991.98px) {
    .ps-auth-navbar .navbar-collapse {
        padding: .5rem 0 .8rem;
    }

    .ps-auth-navbar .navbar-nav {
        align-items: stretch;
        gap: .2rem;
    }

    .ps-auth-navbar .ps-auth-theme-toggle {
        justify-content: flex-start;
        margin: .3rem 0;
    }
}

@media (max-width: 575.98px) {
    .ps-auth-main {
        min-height: 0;
        align-items: flex-start;
        padding: 1.5rem .85rem 2rem;
    }

    .ps-auth-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .ps-auth-brand {
        margin: 1.35rem 0 1.5rem;
    }

    .ps-auth-toggle .toggle-btn {
        padding: .7rem .45rem;
        font-size: .81rem;
    }

    .ps-auth-footer .row {
        row-gap: .5rem;
    }
}
