> **Draft / WIP.** Combined-billing **Mode A** (connected self-hosted). Entirely behind `stirling.billing.account-link.enabled` (default **off** → beans absent → 404). Pairs with Stirling-PDF-SaaS PR #313 (twin migration → `v3`). ## What this does A self-hosted instance links a SaaS account in the **Portal**, gets a **device credential**, and authenticates unattended metering/entitlement with it — no long-lived user JWT on the server. The Portal then surfaces the team's **billing** (free trial → metered Processor plan) driven by the live wallet. ```mermaid sequenceDiagram participant Portal as Portal (browser) participant Supa as SaaS Supabase Auth participant Local as Self-hosted backend participant SaaS as SaaS Java (app/saas) Portal->>Supa: signIn / signUp (Supabase JS, short-lived JWT) Supa-->>Portal: JWT (SDK-refreshed, stays in browser) Portal->>Local: hand JWT (same-origin) Local->>SaaS: POST /account-link/register (Bearer JWT, leader) SaaS-->>Local: { device_id, device_secret } (secret once) Note over Local: store device_secret server-side loop unattended Local->>SaaS: /api/v1/instance/** (X-Device-Id + X-Device-Secret) SaaS-->>Local: entitlement / gate decision end ``` **Auth model:** human auth = Supabase JS (ephemeral JWT, kept for attended portal features). Durable instance auth = a team-bound **device_id + secret** (SHA-256 stored, shown once), non-user `ROLE_LINKED_INSTANCE`, path-scoped to `/api/v1/instance/**`. Instance binds to a **team**, never a user. ## Billing surface (Portal · Mode A states) `Usage & billing` is state-driven by the link/subscription dimension and built to the marketing designs, sharing one component layer across states: - **Unlinked** → link-account prompt. - **Linked · Free** — the *Processor trial*: a one-time 500-PDF free grant ("Process 500 PDFs free, then $X/PDF"), the team's free-editor fleet, and a leader-only **Switch on the Processor →** (embedded Stripe Checkout). - **Linked · Subscribed** — the *Processor plan* dashboard: PDFs-processed split (API / Agents / Automation), **spend this month** vs. a **spend limit** meter with a run-rate projection and an **in-place cap editor** (preset buckets + suggested value + guardrail), Stripe **invoices** (with billed PDFs per invoice), and the default **payment method**. Card / subscription changes deep-link to Stripe's hosted portal. Manual PDF editing is always free — only Automation / AI / API is metered; a `$0` cap blocks all metered work (≠ "no cap"). **Shared, not duplicated:** the editor-fleet card, the Enterprise upsell, and the meter (`@shared/billing` `MeterBar`) render in both the free and subscribed views; money/cap math lives once in `@shared/billing`. The page header is a sticky, full-bleed bar. **New SaaS reads** (defensive — degrade to empty/"—" when the Stripe mirror lacks a table, never 500): - `GET /api/v1/payg/payment-method` — default card (brand / last4 / expiry) from `stripe.payment_methods`. - Invoice **PDFs processed** — billed line-item quantity from `stripe.invoice_line_items`. ## Progress - [x] Schema: `V22 linked_instance` (+ Supabase twin in #313) - [x] `AccountLinkController` register / list / revoke (leader-only, team from caller) - [x] Device-credential filter (path-scoped, constant-time, revocation-aware) + `SupabaseSecurityConfig` wiring (conditional) - [x] `GET /api/v1/instance/whoami` + **`/entitlement`** (reuses `EntitlementService`/`TeamBillingService`) + tests - [x] Self-hosted backend (`app/proprietary`): orchestrator + instance gate (dark + **fail-open**) + tests - [x] Portal: in-app Supabase login modal + register hand-off + `LinkContext` (unlinked default) + "Linked instances" view — all `@shared` Storybook components - [x] **Portal billing surface** — free (Processor trial) + subscribed (Processor plan) Usage views to marketing spec; link-state derived from the **live wallet**; in-place cap editor; over-cap banner - [x] **SaaS reads** — payment-method endpoint + invoice billed-units (defensive `stripe.*` mirror DAOs) + tests - [x] Orphan guard: block leaving/accepting away from a team whose departure orphans its linked instances - [ ] Metering Step 2 (lease + reconcile loop) + bounded fail-open cutoff - [ ] Proprietary hardening (SaaS base-url config, secret-at-rest, finer billable classification) + HTTP integration test - [ ] Cross-repo Stripe lifecycle certified end-to-end (subscribe → meter → cancel → 402) - [ ] Admin ⟺ SaaS-leader enforcement (separate portal-team-mgmt workstream) ## Verification — all green | Gate | Result | |---|---| | `STIRLING_FLAVOR=saas :saas:test` | BUILD SUCCESSFUL (account-link + payg, incl. `PaygPaymentMethodControllerTest`, `PaygInvoicesControllerTest`) | | `:proprietary:test` | BUILD SUCCESSFUL (account-link + entitlement cache/interceptor) | | portal | tsc 0 · eslint 0 · **vitest 55** · storybook build (all billing stories) | | frontend post-sync | typecheck shared + portal + editor (saas + desktop): 0 | ## Screenshots — billing UI _Latest Storybook renders (Portal/Billing). Drag each capture below its caption — kept out of the repo._ **Linked · Free — Processor trial** <img width="1648" height="503" alt="01-free-processor-trial" src="https://github.com/user-attachments/assets/afe6238a-d3b4-47fd-8ea2-cbaed8b0a653" /> **Linked · Subscribed — Processor plan dashboard** <img width="1648" height="930" alt="02-subscribed-processor-plan" src="https://github.com/user-attachments/assets/329e6808-a9a9-4e65-99af-5a8a5e6bf4ab" /> **Spend limit — in-place cap editor** <img width="1648" height="411" alt="03-spend-limit-editor" src="https://github.com/user-attachments/assets/acc95096-bf8e-4ab0-a32c-3c20dc94f816" /> ## Review feedback applied Reworked the portal after first-pass feedback: linking signs in via the **shared Supabase login** (SSO + email/password) — no bespoke form; the **device secret is never shown in or sent to the FE** (the local backend registers + stores it server-side); billing copy reads **PDFs**, not "units"; the wallet surface uses **`@shared` components** matching the SaaS Plan page. Re-verified including an assertion the link response carries no `deviceSecret`/`deviceId`. **Synced onto unified auth + in-app login (2026-06-23).** Merged `main` incl. **#6725 unified auth** (`frontend/shared/auth`); the link flow uses a shared `useSupabaseLogin` hook + `SupabaseLoginForm`, a portal `LinkAccountModal`, and `useAccountLink.completeLink(session)` (+ on-mount SSO redirect-return). Config: `VITE_SAAS_SUPABASE_URL` + `VITE_SAAS_SUPABASE_ANON_KEY`. The local `/account-link/link` call carries the Spring admin bearer with the SaaS JWT in the body. **SSO** needs the SaaS Supabase project to allow-list the portal redirect URL (email/password works without it). ## Assumptions / open - **Proprietary remains a scaffold** (placeholder SaaS base-url, plaintext device secret at rest, coarse billable classification). - Payment-method + invoice-quantity render only when `stripe.payment_methods` / `stripe.invoice_line_items` are in the Sync-Engine target (confirm in the Supabase/Sync-Engine config); otherwise they degrade gracefully. - A self-contained local HTML report + manual E2E runbook live in `notes/account-link-report/` (dev artifacts, outside the repo). --------- Co-authored-by: James Brunton <jbrunton96@gmail.com>
784 lines
17 KiB
CSS
784 lines
17 KiB
CSS
.auth-fields {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem; /* 8px */
|
|
margin-bottom: 0.75rem; /* 12px */
|
|
}
|
|
|
|
/* "or" divider between OAuth buttons and the email form (light-mode auth pages) */
|
|
.auth-or-divider {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem; /* 12px */
|
|
margin: 0.375rem 0 0.5rem; /* 6px 0 8px */
|
|
}
|
|
|
|
.auth-or-divider__rule {
|
|
height: 0.0625rem; /* 1px */
|
|
flex: 1 1 0%;
|
|
background-color: rgb(var(--text-divider-rule-rgb-light) / 0.4);
|
|
}
|
|
|
|
.auth-or-divider__label {
|
|
color: rgb(var(--text-divider-label-rgb-light) / 0.4);
|
|
font-size: 0.75rem; /* 12px */
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.auth-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem; /* 4px */
|
|
}
|
|
|
|
.auth-label {
|
|
font-size: 0.875rem; /* 14px */
|
|
color: var(--auth-label-text-light-only);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.auth-input {
|
|
width: 100%;
|
|
padding: 0.625rem 0.75rem; /* 10px 12px */
|
|
border: 1px solid var(--auth-input-border-light-only);
|
|
border-radius: 0.625rem; /* 10px */
|
|
font-size: 0.875rem; /* 14px */
|
|
background-color: var(--auth-input-bg-light-only);
|
|
color: var(--auth-input-text-light-only);
|
|
outline: none;
|
|
}
|
|
|
|
.auth-input:focus {
|
|
border-color: var(--auth-border-focus-light-only);
|
|
box-shadow: 0 0 0 3px var(--auth-focus-ring-light-only);
|
|
}
|
|
|
|
.auth-button {
|
|
width: 100%;
|
|
padding: 0.625rem 0.75rem; /* 10px 12px */
|
|
border: none;
|
|
border-radius: 0.625rem; /* 10px */
|
|
background-color: var(--auth-button-bg-light-only);
|
|
color: var(--auth-button-text-light-only);
|
|
font-size: 0.875rem; /* 14px */
|
|
font-weight: 600;
|
|
margin-bottom: 0.75rem; /* 12px */
|
|
cursor: pointer;
|
|
}
|
|
|
|
.auth-button:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.auth-toggle-wrapper {
|
|
text-align: center;
|
|
margin-bottom: 0.625rem; /* 10px */
|
|
}
|
|
|
|
.auth-toggle-link {
|
|
background: transparent;
|
|
border: 0;
|
|
color: var(--auth-label-text-light-only);
|
|
font-size: 0.875rem; /* 14px */
|
|
text-decoration: underline;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.auth-toggle-link:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.auth-magic-row {
|
|
display: flex;
|
|
gap: 0.5rem; /* 8px */
|
|
margin-bottom: 0.75rem; /* 12px */
|
|
}
|
|
|
|
.auth-magic-row .auth-input {
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.auth-magic-button {
|
|
padding: 0.875rem 1rem; /* 14px 16px */
|
|
border: none;
|
|
border-radius: 0.625rem; /* 10px */
|
|
background-color: var(--auth-magic-button-bg-light-only);
|
|
color: var(--auth-magic-button-text-light-only);
|
|
font-size: 0.875rem; /* 14px */
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.auth-magic-button:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.auth-terms {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem; /* 8px */
|
|
margin-bottom: 0.5rem; /* 8px */
|
|
}
|
|
|
|
.auth-checkbox {
|
|
width: 1rem; /* 16px */
|
|
height: 1rem; /* 16px */
|
|
accent-color: #af3434;
|
|
}
|
|
|
|
.auth-terms-label {
|
|
font-size: 0.75rem; /* 12px */
|
|
color: var(--auth-label-text-light-only);
|
|
}
|
|
|
|
.auth-terms-label a {
|
|
color: inherit;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.auth-confirm {
|
|
overflow: hidden;
|
|
transition:
|
|
max-height 240ms ease,
|
|
opacity 200ms ease;
|
|
}
|
|
|
|
/* OAuth Button Styles */
|
|
.oauth-container-icons {
|
|
display: flex;
|
|
margin-bottom: 0.625rem; /* 10px */
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.oauth-container-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 0.75rem; /* 12px */
|
|
margin-bottom: 0.625rem; /* 10px */
|
|
}
|
|
|
|
.oauth-container-vertical {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.875rem; /* 14px */
|
|
align-items: stretch;
|
|
}
|
|
|
|
.oauth-container-vertical.oauth-container-single {
|
|
align-items: center;
|
|
}
|
|
|
|
.oauth-button-icon {
|
|
width: 3.75rem; /* 60px */
|
|
height: 3.75rem; /* 60px */
|
|
border-radius: 0.875rem; /* 14px */
|
|
border: 1px solid var(--auth-input-border-light-only);
|
|
background: var(--auth-card-bg-light-only);
|
|
cursor: pointer;
|
|
box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.04); /* 0 2px 6px */
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.oauth-button-icon:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.oauth-button-grid {
|
|
width: 100%;
|
|
padding: 1rem; /* 16px */
|
|
border-radius: 0.875rem; /* 14px */
|
|
border: 1px solid var(--auth-input-border-light-only);
|
|
background: var(--auth-card-bg-light-only);
|
|
cursor: pointer;
|
|
box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.04); /* 0 2px 6px */
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.oauth-button-grid:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.oauth-button-vertical {
|
|
width: 100%;
|
|
min-height: 3.5rem; /* 56px */
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0.875rem 1.5rem; /* 14px 24px */
|
|
border: 1px solid var(--auth-input-border-light-only);
|
|
border-radius: 999px;
|
|
background-color: var(--auth-card-bg-light-only);
|
|
font-size: 1rem; /* 16px */
|
|
font-weight: 600;
|
|
color: var(--auth-text-primary-light-only);
|
|
cursor: pointer;
|
|
gap: 1rem; /* 16px */
|
|
font-family: inherit;
|
|
box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
|
|
transition:
|
|
background-color 0.2s ease,
|
|
box-shadow 0.2s ease,
|
|
transform 0.2s ease,
|
|
border-color 0.2s ease;
|
|
}
|
|
|
|
.oauth-button-vertical:hover:not(:disabled) {
|
|
background-color: var(--hover-bg);
|
|
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
|
|
transform: translateY(-1px);
|
|
border-color: var(--border-default);
|
|
}
|
|
|
|
.oauth-button-vertical-tinted {
|
|
background: linear-gradient(
|
|
90deg,
|
|
color-mix(in srgb, var(--oauth-accent) 65%, #0f172a) 0 6px,
|
|
#0f172a 6px 100%
|
|
);
|
|
}
|
|
|
|
.oauth-button-vertical-tinted:hover:not(:disabled) {
|
|
background: linear-gradient(
|
|
90deg,
|
|
color-mix(in srgb, var(--oauth-accent) 75%, #111827) 0 6px,
|
|
#111827 6px 100%
|
|
);
|
|
}
|
|
|
|
.oauth-button-vertical-legacy {
|
|
min-height: 0;
|
|
justify-content: flex-start;
|
|
padding: 0.75rem 1rem; /* 12px 16px */
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 0.75rem; /* 12px */
|
|
background-color: var(--auth-card-bg-light-only);
|
|
font-weight: 500;
|
|
color: var(--auth-text-primary-light-only);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.oauth-button-vertical-legacy:hover:not(:disabled) {
|
|
background-color: #f3f4f6;
|
|
color: var(--auth-text-primary-light-only);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.oauth-button-vertical-legacy .mantine-Button-inner,
|
|
.oauth-button-vertical-legacy .mantine-Button-label {
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.oauth-button-vertical-legacy .oauth-button-left {
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.oauth-button-vertical-legacy .oauth-icon-wrapper {
|
|
width: 1.25rem; /* 20px */
|
|
height: 1.25rem; /* 20px */
|
|
padding: 0;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.oauth-button-vertical-legacy .oauth-button-text {
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
.oauth-button-vertical-outline {
|
|
background: transparent;
|
|
border: 2px solid #0f172a;
|
|
color: #0f172a;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.oauth-button-vertical-outline:hover:not(:disabled) {
|
|
background: #0f172a;
|
|
color: #f8fafc;
|
|
box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.2);
|
|
}
|
|
|
|
.oauth-button-vertical-light {
|
|
background: #f8fafc;
|
|
color: #0f172a;
|
|
border: 1px solid rgba(15, 23, 42, 0.12);
|
|
box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.12);
|
|
}
|
|
|
|
.oauth-button-vertical-light:hover:not(:disabled) {
|
|
background: #eef2f7;
|
|
color: #0f172a;
|
|
box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.16);
|
|
}
|
|
|
|
.oauth-button-vertical:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
box-shadow: none;
|
|
transform: none;
|
|
}
|
|
|
|
.oauth-button-vertical:focus-visible {
|
|
outline: 3px solid rgba(59, 130, 246, 0.5);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* Fix Mantine Button internal spans to not crop content */
|
|
.oauth-button-vertical .mantine-Button-inner {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.oauth-button-vertical .mantine-Button-label {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 1rem;
|
|
overflow: visible;
|
|
}
|
|
|
|
.oauth-icon-small {
|
|
width: 1.75rem; /* 28px */
|
|
height: 1.75rem; /* 28px */
|
|
display: block;
|
|
}
|
|
|
|
.oauth-icon-medium {
|
|
width: 1.75rem; /* 28px */
|
|
height: 1.75rem; /* 28px */
|
|
display: block;
|
|
}
|
|
|
|
.oauth-icon-tiny {
|
|
width: 1.25rem; /* 20px */
|
|
height: 1.25rem; /* 20px */
|
|
display: block;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.oauth-container-vertical.oauth-container-single .oauth-button-vertical {
|
|
max-width: 26.25rem; /* 420px */
|
|
}
|
|
|
|
.oauth-button-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.875rem;
|
|
min-width: 0;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.oauth-button-text {
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: inherit;
|
|
line-height: 1.2;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding-bottom: 0.0625rem; /* 1px - prevent descender clipping */
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.oauth-icon-wrapper {
|
|
width: 2.25rem; /* 36px */
|
|
height: 2.25rem; /* 36px */
|
|
border-radius: 0.75rem; /* 12px */
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bg-muted);
|
|
border: 1px solid var(--auth-input-border-light-only);
|
|
}
|
|
|
|
.oauth-button-vertical-tinted .oauth-icon-wrapper {
|
|
background: color-mix(
|
|
in srgb,
|
|
var(--oauth-accent) 20%,
|
|
rgba(255, 255, 255, 0.08)
|
|
);
|
|
border-color: color-mix(
|
|
in srgb,
|
|
var(--oauth-accent) 35%,
|
|
rgba(255, 255, 255, 0.2)
|
|
);
|
|
}
|
|
|
|
.oauth-button-vertical-outline .oauth-icon-wrapper,
|
|
.oauth-button-vertical-light .oauth-icon-wrapper {
|
|
background: rgba(15, 23, 42, 0.06);
|
|
border-color: rgba(15, 23, 42, 0.14);
|
|
}
|
|
.oauth-button-right {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
opacity: 0.85;
|
|
flex-shrink: 0;
|
|
color: inherit;
|
|
}
|
|
|
|
.oauth-arrow-icon {
|
|
width: 1.1rem; /* 18px */
|
|
height: 1.1rem; /* 18px */
|
|
display: block;
|
|
}
|
|
|
|
.sso-demo-block {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.sso-demo-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
|
gap: 1.25rem;
|
|
}
|
|
|
|
.sso-demo-card {
|
|
border: 1px solid var(--auth-input-border-light-only);
|
|
border-radius: 1rem;
|
|
padding: 1rem;
|
|
background: var(--auth-card-bg-light-only);
|
|
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.sso-demo-title {
|
|
font-size: 0.875rem;
|
|
font-weight: 700;
|
|
color: var(--auth-text-primary-light-only);
|
|
margin-bottom: 0.75rem;
|
|
letter-spacing: 0.01em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* Login Header Styles */
|
|
.login-header {
|
|
margin-bottom: 1rem; /* 16px */
|
|
margin-top: 0.5rem; /* 8px */
|
|
}
|
|
|
|
.login-header-centered {
|
|
text-align: center;
|
|
margin-bottom: 1.5rem; /* 24px */
|
|
}
|
|
|
|
.login-header-centered .login-header-logos {
|
|
justify-content: center;
|
|
}
|
|
|
|
.login-header-centered .login-logo-text {
|
|
height: 2.5rem; /* 40px */
|
|
}
|
|
|
|
.login-header-logos {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem; /* 12px */
|
|
margin-bottom: 1.25rem; /* 20px */
|
|
}
|
|
|
|
.login-logo-icon {
|
|
width: 2.5rem; /* 40px */
|
|
height: 2.5rem; /* 40px */
|
|
border-radius: 0.5rem; /* 8px */
|
|
}
|
|
|
|
.login-logo-text {
|
|
height: 2rem; /* 32px - increased from 24px */
|
|
}
|
|
|
|
.login-title {
|
|
font-size: 2rem; /* 32px */
|
|
font-weight: 800;
|
|
color: var(--auth-text-primary-light-only);
|
|
margin: 0 0 0.375rem; /* 0 0 6px */
|
|
}
|
|
|
|
.login-subtitle {
|
|
color: var(--auth-text-secondary-light-only);
|
|
font-size: 0.875rem; /* 14px */
|
|
margin: 0;
|
|
}
|
|
|
|
/* Navigation Link Styles */
|
|
.navigation-link-container {
|
|
text-align: center;
|
|
}
|
|
|
|
.navigation-link-button {
|
|
background: none;
|
|
border: none;
|
|
color: var(--auth-label-text-light-only);
|
|
font-size: 0.875rem; /* 14px */
|
|
cursor: pointer;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.navigation-link-button:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* Message Styles */
|
|
.error-message {
|
|
padding: 1rem; /* 16px */
|
|
background-color: #fef2f2;
|
|
border: 1px solid #fecaca;
|
|
border-radius: 0.5rem; /* 8px */
|
|
margin-bottom: 1.5rem; /* 24px */
|
|
}
|
|
|
|
.error-message-text {
|
|
color: #dc2626;
|
|
font-size: 0.875rem; /* 14px */
|
|
margin: 0;
|
|
}
|
|
|
|
.success-message {
|
|
padding: 1rem; /* 16px */
|
|
background-color: #f0fdf4;
|
|
border: 1px solid #bbf7d0;
|
|
border-radius: 0.5rem; /* 8px */
|
|
margin-bottom: 1.5rem; /* 24px */
|
|
}
|
|
|
|
.success-message-text {
|
|
color: #059669;
|
|
font-size: 0.875rem; /* 14px */
|
|
margin: 0;
|
|
}
|
|
|
|
/* Field-level error styles */
|
|
.auth-field-error {
|
|
color: #dc2626;
|
|
font-size: 0.6875rem; /* 11px */
|
|
margin-top: 0.125rem; /* 2px */
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.auth-input-error {
|
|
border-color: #dc2626 !important;
|
|
}
|
|
|
|
.auth-input-error:focus {
|
|
border-color: #dc2626 !important;
|
|
box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
|
|
}
|
|
|
|
/* Shared auth styles extracted from inline */
|
|
.auth-section {
|
|
margin: 0.75rem 0;
|
|
}
|
|
|
|
.auth-section-sm {
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
.auth-bottom-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin: 0.5rem 0 0.25rem;
|
|
}
|
|
|
|
.auth-bottom-right {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.auth-link-black {
|
|
background: transparent;
|
|
border: 0;
|
|
padding: 0;
|
|
margin: 0;
|
|
text-decoration: underline;
|
|
cursor: pointer;
|
|
font-size: 0.875rem; /* 14px */
|
|
color: var(--auth-text-primary-light-only);
|
|
}
|
|
|
|
.auth-dot-black {
|
|
opacity: 0.5;
|
|
padding: 0 0.5rem;
|
|
color: var(--auth-text-primary-light-only);
|
|
}
|
|
|
|
/* Email login button - red CTA style matching SaaS version */
|
|
.auth-cta-button {
|
|
background-color: #af3434 !important;
|
|
color: white !important;
|
|
border: none !important;
|
|
font-weight: 600 !important;
|
|
}
|
|
|
|
.auth-cta-button:hover:not(:disabled) {
|
|
background-color: #9a2e2e !important;
|
|
}
|
|
|
|
.auth-cta-button:disabled {
|
|
background-color: #af3434 !important;
|
|
opacity: 0.6 !important;
|
|
}
|
|
|
|
/* ── Logo block ─────────────────────────────────────────────────────── */
|
|
.auth-logo-block {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin-bottom: 2rem;
|
|
margin-top: 0.5rem;
|
|
animation: authFadeUp 0.4s ease both;
|
|
}
|
|
|
|
.auth-logo-header {
|
|
height: 8rem;
|
|
width: auto;
|
|
}
|
|
|
|
/* Two logo variants are rendered; show the one matching the active theme. */
|
|
.auth-logo-header--dark {
|
|
display: none;
|
|
}
|
|
[data-mantine-color-scheme="dark"] .auth-logo-header--light {
|
|
display: none;
|
|
}
|
|
[data-mantine-color-scheme="dark"] .auth-logo-header--dark {
|
|
display: block;
|
|
}
|
|
|
|
/* ── Page entrance animation ────────────────────────────────────────── */
|
|
@keyframes authFadeUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(12px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* ── Expandable trigger button state ────────────────────────────────── */
|
|
.auth-expandable-trigger {
|
|
transition:
|
|
background-color 180ms ease,
|
|
box-shadow 180ms ease,
|
|
border-color 180ms ease;
|
|
}
|
|
|
|
.auth-expandable-trigger--active {
|
|
border-color: #af3434 !important;
|
|
box-shadow: 0 0 0 3px rgba(175, 52, 52, 0.12);
|
|
}
|
|
|
|
/* ── Animated expand/collapse via grid-template-rows ───────────────── */
|
|
.auth-expand-grid {
|
|
display: grid;
|
|
grid-template-rows: 0fr;
|
|
transition:
|
|
grid-template-rows 280ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
opacity 220ms ease;
|
|
opacity: 0;
|
|
}
|
|
|
|
.auth-expand-grid--open {
|
|
grid-template-rows: 1fr;
|
|
opacity: 1;
|
|
}
|
|
|
|
.auth-expand-inner {
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* ── Icon+label group — keeps icons vertically aligned across buttons ── */
|
|
.oauth-btn-group {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-width: 12.5rem;
|
|
}
|
|
|
|
.oauth-btn-label {
|
|
flex: 1;
|
|
text-align: center;
|
|
}
|
|
|
|
/* ── Icon helpers inside oauth-button-fullwidth ─────────────────────── */
|
|
.auth-at-icon {
|
|
font-size: 1.25rem;
|
|
line-height: 1;
|
|
margin-right: 0.5rem;
|
|
display: inline-block;
|
|
width: 1.75rem;
|
|
text-align: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ── Fullwidth OAuth (SaaS-screen canonical look — shared so the portal link
|
|
modal matches the SaaS editor login exactly) ──────────────────────────── */
|
|
.oauth-container-fullwidth {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.oauth-button-fullwidth {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0.75rem 1rem;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 100px;
|
|
background-color: #ffffff;
|
|
font-size: 1rem;
|
|
font-weight: 600;
|
|
color: #000000;
|
|
cursor: pointer;
|
|
gap: 0.5rem;
|
|
box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.04);
|
|
transition:
|
|
background-color 150ms ease,
|
|
box-shadow 150ms ease,
|
|
border-color 150ms ease;
|
|
}
|
|
|
|
.oauth-button-fullwidth:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.oauth-button-fullwidth:hover:not(:disabled) {
|
|
background-color: #fafafa;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
[data-mantine-color-scheme="dark"] .oauth-button-fullwidth {
|
|
background-color: var(--bg-surface);
|
|
color: var(--text-primary);
|
|
border-color: var(--border-default);
|
|
box-shadow: none;
|
|
}
|
|
|
|
[data-mantine-color-scheme="dark"]
|
|
.oauth-button-fullwidth:hover:not(:disabled) {
|
|
background-color: var(--bg-raised);
|
|
box-shadow: none;
|
|
}
|