/* PRISM Auth MVP — login & register (load after bootstrap + prism-responsive) */

html,
body.prism-auth-page {
    height: 100%;
}

body.prism-auth-page {
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #0b1020;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.prism-auth-page .landing {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100vw;
}

body.prism-auth-page .landing-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

body.prism-auth-page .landing-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(11, 16, 32, 0.12) 0%, rgba(11, 16, 32, 0.55) 55%, rgba(11, 16, 32, 0.78) 100%);
    z-index: 1;
}

body.prism-auth-page .landing-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 1.5rem);
    padding-top: 4.5rem;
}

body.prism-auth-page.prism-auth-page--register .landing-content {
    align-items: flex-start;
    padding-top: 4.75rem;
    padding-bottom: 2rem;
    overflow-y: auto;
}

body.prism-auth-page.prism-auth-page--register .landing-card.landing-card--register {
    flex-shrink: 0;
    margin: auto 0;
}

body.prism-auth-page .landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

body.prism-auth-page .landing-brand img {
    height: 34px;
    width: auto;
}

body.prism-auth-page .landing-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* --- Shell --- */
body.prism-auth-page .landing-topbar {
    padding: 1rem 1.25rem;
}

body.prism-auth-page .landing-brand span {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.auth-topbar-link {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-topbar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

/* --- Card --- */
body.prism-auth-page .landing-card {
    width: min(980px, 95vw);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    padding: 0;
    overflow: hidden;
    color: #fff;
}

body.prism-auth-page .landing-card--register {
    width: min(720px, 94vw);
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
}

body.prism-auth-page .landing-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: stretch;
}

/* Two columns only when login has the logo pane — register stays one full-width column */
@media (min-width: 992px) {
    body.prism-auth-page .landing-card-grid:has(.auth-pane-right) {
        grid-template-columns: 1fr 1fr;
    }
}

body.prism-auth-page--register .landing-card-copy {
    width: 100%;
    max-width: 100%;
}

body.prism-auth-page--register .auth-subtitle {
    max-width: none;
}

@media (min-width: 768px) {
    body.prism-auth-page--register .landing-card--register {
        width: min(840px, 94vw);
    }
}

body.prism-auth-page .auth-pane-right {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

@media (min-width: 992px) {
    body.prism-auth-page .auth-pane-right {
        display: flex;
    }
}

/* --- Header --- */
.auth-header {
    margin-bottom: 1.5rem;
}

.auth-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(250, 204, 21, 0.95);
}

.auth-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.auth-subtitle {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    max-width: 36rem;
}

/* --- Split login layout --- */
body.prism-auth-page .landing-card-grid {
    align-items: stretch;
}

body.prism-auth-page .auth-pane {
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
}

body.prism-auth-page .auth-pane-right {
    min-height: 0;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.06);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
}

body.prism-auth-page .auth-logo {
    width: min(320px, 85%);
}

/* --- Fields --- */
.auth-form .auth-field {
    margin-bottom: 1rem;
}

.auth-label,
body.prism-auth-page .landing-card-copy p[for] {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem !important;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.3;
}

body.prism-auth-page .landing-card .form-control,
body.prism-auth-page .landing-card .form-select {
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background-color: rgba(8, 12, 24, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

body.prism-auth-page .landing-card .form-control:hover:not(:disabled):not([readonly]),
body.prism-auth-page .landing-card .form-select:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.32);
    background-color: rgba(8, 12, 24, 0.45);
}

body.prism-auth-page .landing-card .form-control:focus,
body.prism-auth-page .landing-card .form-select:focus {
    border-color: rgba(158, 181, 220, 0.75);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
    background-color: rgba(8, 12, 24, 0.5);
    color: #fff;
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
}

body.prism-auth-page .landing-card select.form-control {
    padding-right: 2.35rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath stroke='%23cbd5e1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3.5 5.25 7 8.75l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
}

body.prism-auth-page .landing-card select.form-control:focus {
    background-color: rgba(8, 12, 24, 0.5);
}

body.prism-auth-page .landing-card input[type="date"].form-control {
    color-scheme: dark;
}

body.prism-auth-page .landing-card .form-control:disabled,
body.prism-auth-page .landing-card .form-control[readonly] {
    background-color: rgba(8, 12, 24, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.78) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.78) !important;
    opacity: 1 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.prism-auth-page .landing-card .form-control[type="password"],
body.prism-auth-page .landing-card .form-control[type="password"]:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

body.prism-auth-page .landing-card .form-control:-webkit-autofill,
body.prism-auth-page .landing-card .form-control:-webkit-autofill:hover,
body.prism-auth-page .landing-card .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 0 0 1000px rgba(8, 12, 24, 0.35) inset !important;
}

body.prism-auth-page .landing-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

body.prism-auth-page .landing-card .form-check-input {
    border-color: rgba(255, 255, 255, 0.24);
    background-color: rgba(6, 10, 22, 0.45);
}

body.prism-auth-page .landing-card .form-check-label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8125rem;
}

body.prism-auth-page .landing-card .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

body.prism-auth-page .landing-card .input-group .btn {
    min-height: 48px;
    border-radius: 0 12px 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: none;
    background-color: rgba(8, 12, 24, 0.35);
}

body.prism-auth-page .landing-card .input-group .form-control {
    border-right: none;
}

body.prism-auth-page .landing-card .input-group:focus-within .form-control,
body.prism-auth-page .landing-card .input-group:focus-within .btn {
    border-color: rgba(96, 165, 250, 0.9);
}

body.prism-auth-page .landing-card-copy .row.g-3 > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

body.prism-auth-page .landing-card-copy .row.g-3 label.auth-label {
    margin-bottom: 0.35rem;
}

.auth-remember-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin: 1rem 0 1.25rem;
}

.auth-link {
    color: #93c5fd;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

body.prism-auth-page .landing-card-copy .auth-link {
    color: #93c5fd !important;
    text-decoration: none !important;
}

body.prism-auth-page .landing-card-copy .auth-link:hover {
    text-decoration: underline !important;
}

/* --- Buttons --- */
.btn-auth,
body.prism-auth-page .landing-card .btn-primary.btn-auth,
body.prism-auth-page .landing-card #createAccountBtn {
    min-height: 48px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: 0.03em;
    border: none;
    box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.55);
}

.btn-auth:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

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

.auth-btn-secondary {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.28) !important;
}

.auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.72);
}

.auth-footer .auth-link {
    display: inline-block;
    margin-left: 0.25rem;
}

.landing-error {
    display: none;
    border-radius: 12px;
    font-size: 0.875rem;
}

.landing-error.show {
    display: block;
}

/* --- Register stepper (MVP) --- */
body.prism-auth-page .reg-stepper {
    margin: 0 0 1.25rem;
    padding: 0 0.25rem;
}

body.prism-auth-page .reg-step__dot {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
    border-width: 2px;
    box-shadow: none;
}

body.prism-auth-page .reg-step__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

body.prism-auth-page .reg-stepper::before,
body.prism-auth-page .reg-stepper__bar {
    top: 20px;
    height: 3px;
}

body.prism-auth-page .review-card {
    border-radius: 16px;
    background: rgba(8, 12, 24, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.prism-auth-page .landing-card .d-flex.flex-wrap.gap-2 .btn-primary {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 700;
}

body.prism-auth-page .landing-card .d-flex.flex-wrap.gap-2 .btn-outline-light {
    border-radius: 12px;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    body.prism-auth-page .reg-step__label {
        font-size: 0.625rem;
        white-space: normal;
        line-height: 1.2;
        max-width: 4.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    body.prism-auth-page .reg-step__dot {
        width: 36px;
        height: 36px;
    }

    body.prism-auth-page .reg-stepper::before,
    body.prism-auth-page .reg-stepper__bar {
        top: 18px;
    }
}

@keyframes prism-auth-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.prism-auth-page .landing-card {
    animation: prism-auth-in 0.45s ease backwards;
}

@media (prefers-reduced-motion: reduce) {
    body.prism-auth-page .landing-card {
        animation: none;
    }
}
