/* Propease auth experience */
.auth-page-shell {
    min-height: calc(100dvh - 88px);
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    padding-block: clamp(1rem, 4vh, 2.5rem);
    padding-inline: clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: safe center;
    justify-content: center;
    background: #f8fafc;
    overflow-x: hidden;
}

.auth-layout {
    width: min(1120px, 100%);
    min-height: min(680px, calc(100dvh - 120px));
    display: grid;
    grid-template-columns: minmax(360px, 0.88fr) minmax(420px, 1.12fr);
    overflow: visible;
    border: 1px solid var(--propease-border, #e2e8f0);
    border-radius: 28px;
    background: var(--propease-card, #ffffff);
    box-shadow: var(--propease-shadow, 0 18px 45px rgba(15, 23, 42, 0.08));
}

.auth-card {
    min-width: 0;
    padding: clamp(1.6rem, 3.2vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px 0 0 28px;
}

body:has(.auth-page-shell) {
    background: #f8fafc !important;
}

body:has(.auth-page-shell) .navbar {
    margin-bottom: 0 !important;
    background: #f8fafc !important;
}

body:has(.auth-page-shell) main[role="main"] {
    padding-bottom: 0 !important;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    color: var(--propease-text, #0f172a);
    font-weight: 800;
    letter-spacing: 0;
}

.auth-brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: var(--propease-primary, #2563eb);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.auth-copy-block {
    display: grid;
    gap: 0.4rem;
    max-width: 31rem;
}

.auth-kicker {
    margin: 0;
    color: var(--propease-primary, #2563eb);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-title {
    margin: 0;
    color: var(--propease-text, #0f172a);
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}

.auth-subtitle {
    margin: 0;
    color: var(--propease-muted, #64748b);
    font-size: 0.98rem;
    line-height: 1.65;
}

.auth-mode-switch {
    width: 100%;
    max-width: 25.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--propease-border, #e2e8f0);
    border-radius: 999px;
    background: #f8fafc;
}

.auth-mode-tab {
    appearance: none;
    border: 0;
    min-height: 2.65rem;
    border-radius: 999px;
    background: transparent;
    color: var(--propease-muted, #64748b);
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.auth-mode-tab:hover,
.auth-mode-tab:focus-visible {
    color: var(--propease-text, #0f172a);
    outline: none;
}

.auth-mode-tab:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.auth-mode-tab.is-active {
    background: #ffffff;
    color: var(--propease-primary, #2563eb);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.auth-alert {
    max-width: 25.5rem;
    margin: 0;
    border-radius: 14px;
    border-color: rgba(22, 163, 74, 0.18);
    background: rgba(22, 163, 74, 0.08);
    color: #047857;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.auth-alert-danger {
    border-color: rgba(220, 38, 38, 0.18);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

.auth-form-stack {
    width: 100%;
    max-width: 25.5rem;
}

.auth-form {
    display: grid;
    gap: 0.85rem;
}

.auth-form .mb-3 {
    margin-bottom: 0 !important;
}

.auth-form .form-label,
.auth-form .form-check-label {
    color: var(--propease-text, #0f172a);
    font-size: 0.9rem;
}

.auth-input {
    min-height: 3rem;
    border: 1px solid var(--propease-border, #e2e8f0);
    border-radius: 14px;
    background-color: #ffffff;
    color: var(--propease-text, #0f172a);
    font-size: 0.96rem;
    padding: 0.72rem 0.95rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

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

.auth-input:hover {
    border-color: #cbd5e1;
}

.auth-input:focus {
    border-color: var(--propease-primary, #2563eb);
    background-color: #ffffff;
    box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.12);
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.auth-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.5rem;
    padding-left: 0;
}

.auth-form .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    border-color: #cbd5e1;
    cursor: pointer;
}

.auth-form .form-check-input:checked {
    background-color: var(--propease-primary, #2563eb);
    border-color: var(--propease-primary, #2563eb);
}

.auth-action-row {
    display: flex;
    align-items: center;
    margin-top: 0.2rem;
}

.auth-submit {
    min-height: 3rem;
    border: 0;
    border-radius: 14px;
    background: var(--propease-primary, #2563eb);
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.2);
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
    background: var(--propease-primary-hover, #1e40af);
    box-shadow: 0 16px 30px rgba(30, 64, 175, 0.24);
    transform: translateY(-1px);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-external-form {
    margin-top: 0.75rem;
}

.auth-google-button {
    width: 100%;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid var(--propease-border, #e2e8f0);
    border-radius: 14px;
    background: #ffffff;
    color: var(--propease-text, #0f172a);
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-google-button i {
    color: #ea4335;
    font-size: 1.05rem;
}

.auth-google-button:hover,
.auth-google-button:focus-visible {
    border-color: #cbd5e1;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.auth-google-button:active {
    transform: translateY(0);
}

.auth-forgot-form {
    margin-top: 0.65rem;
    text-align: center;
}

.auth-forgot-button {
    border: 0;
    background: transparent;
    color: var(--propease-primary, #2563eb);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.25rem;
}

.auth-forgot-button:hover,
.auth-forgot-button:focus-visible {
    color: var(--propease-primary-hover, #1e40af);
    text-decoration: underline;
}

.auth-inline-error,
.auth-form .invalid-feedback {
    color: var(--propease-danger, #dc2626);
    font-size: 0.84rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.auth-inline-error {
    margin: -0.15rem 0 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(220, 38, 38, 0.16);
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.06);
}

.auth-visual-panel {
    position: relative;
    min-width: 0;
    min-height: 0;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    border-radius: 0 28px 28px 0;
}

.auth-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 64, 175, 0.52)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.66));
}

.auth-visual-overlay {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: flex-end;
    padding: clamp(2rem, 4vw, 3.5rem);
}

.auth-visual-content {
    max-width: 32rem;
    color: #ffffff;
}

.auth-visual-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-visual-content h2 {
    margin: 1rem 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
}

.auth-visual-content p {
    max-width: 29rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    line-height: 1.7;
}

.auth-visual-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.auth-visual-metrics div {
    min-width: 0;
    padding: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.auth-visual-metrics strong,
.auth-visual-metrics span {
    display: block;
}

.auth-visual-metrics strong {
    font-size: 1.2rem;
    line-height: 1.1;
}

.auth-visual-metrics span {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

[data-bs-theme="dark"] .auth-page-shell {
    background: #0f172a;
}

[data-bs-theme="dark"] body:has(.auth-page-shell),
[data-bs-theme="dark"] body:has(.auth-page-shell) .navbar {
    background: #0f172a !important;
}

[data-bs-theme="dark"] .auth-layout,
[data-bs-theme="dark"] .auth-card {
    background: #111827;
    border-color: #334155;
}

[data-bs-theme="dark"] .auth-title,
[data-bs-theme="dark"] .auth-brand,
[data-bs-theme="dark"] .auth-form .form-label,
[data-bs-theme="dark"] .auth-form .form-check-label {
    color: #f8fafc;
}

[data-bs-theme="dark"] .auth-subtitle {
    color: #94a3b8;
}

[data-bs-theme="dark"] .auth-mode-switch {
    background: #0f172a;
    border-color: #334155;
}

[data-bs-theme="dark"] .auth-mode-tab.is-active {
    background: #1e293b;
    color: #60a5fa;
}

[data-bs-theme="dark"] .auth-input {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

[data-bs-theme="dark"] .auth-google-button {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

[data-bs-theme="dark"] .auth-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.22rem rgba(96, 165, 250, 0.18);
}

@media (max-width: 991.98px) {
    .auth-page-shell {
        min-height: calc(100dvh - 80px);
        align-items: safe center;
    }

    .auth-layout {
        min-height: 0;
        grid-template-columns: 1fr;
        overflow: hidden;
    }

    .auth-card {
        padding: clamp(1.4rem, 5vw, 2.25rem);
        border-radius: 22px;
    }

    .auth-visual-panel {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .auth-page-shell {
        min-height: calc(100dvh - 72px);
        padding: 0.75rem;
    }

    .auth-layout {
        border-radius: 22px;
    }

    .auth-card {
        gap: 0.95rem;
    }

    .auth-brand-mark {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 12px;
    }

    .auth-title {
        font-size: 1.75rem;
    }

    .auth-subtitle {
        font-size: 0.92rem;
    }

    .auth-mode-tab,
    .auth-input,
    .auth-submit,
    .auth-google-button {
        min-height: 2.85rem;
    }
}
