/* Sign-in and sign-up pages for Colony's single-product landings (Colony Sign, Colony Booking, ...). Shared markup: Pages/Shared/_StartLoginForm.cshtml and
   _StartSignUpForm.cshtml. Each product sets only the --st-* tokens below on its own wrapper (see the [data-product] blocks at the end), so the forms stay identical and
   get fixed in one place.

   Colour (all pairs measured, and pinned by CRMAdmin.Tests/StartAuthContrastTests.cs):
     ink #0F172A on paper #F4F1EA 15.4:1 | muted #475569 on paper 6.9:1 | accent-text #B3400B on paper 4.9:1 | ink on orange fill #FF6B35 6.3:1
     white on the side panel (ink) 17.8:1 | muted-on-ink #B4BED0 on ink 9.6:1 | input edge #6B7788 on white 4.6:1 (WCAG 1.4.11 wants 3:1)
   Built to follow the accessibility button (wwwroot/js/colony-a11y.js): sizes in rem so "Text size" scales everything, logical properties so a right-to-left page mirrors,
   no motion that cannot be paused, high-contrast and forced-colors safe. */

:where(.st-auth) {
    --st-ink: #0F172A;
    --st-paper: #F4F1EA;
    --st-surface: #FFFFFF;
    --st-muted: #475569;
    --st-muted-on-ink: #B4BED0;
    --st-edge: #6B7788;
    --st-line: #D8D2C2;
    --st-accent: #FF6B35;               /* fills: buttons, the brand tag. Text on it is always ink. */
    --st-accent-hover: color-mix(in oklab, #FF6B35 82%, white);
    --st-accent-text: #B3400B;          /* the only orange allowed as text on a light ground */
    --st-ok: #146C2E;  --st-ok-soft: #E4F4E9;
    --st-err: #A5241A; --st-err-soft: #FDEEEC;
    --st-info: #1A3A8F; --st-info-soft: #EAF0FD;
    --st-warn: #6F4300; --st-warn-soft: #FFF6DC;
    --st-side: var(--st-ink);
    --st-radius: .75rem;
    --st-display: 'Archivo', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --st-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.st-auth { min-block-size: 100vh; min-block-size: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--st-paper); font-family: var(--st-body); color: var(--st-ink); line-height: 1.55; color-scheme: light; }
.st-auth *, .st-auth *::before, .st-auth *::after { box-sizing: border-box; }
.st-auth a:focus-visible { border-radius: .375rem; }
.st-vh { position: absolute !important; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---- side panel ---- */
.st-side { background: var(--st-side); color: #fff; padding-block: 2.25rem; padding-inline: clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.st-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; align-self: flex-start; }
.st-brand img { block-size: 2.1rem; inline-size: auto; display: block; }
.st-tag { font-family: var(--st-display); font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--st-ink); background: var(--st-accent); padding: .22rem .55rem; border-radius: .375rem; }
.st-eyebrow { margin: 0; font-family: var(--st-display); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--st-accent); }
.st-side h2 { font-family: var(--st-display); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin: .8rem 0 0; color: #fff; text-wrap: balance; }
.st-side h2 em { font-style: normal; color: var(--st-accent); }
.st-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .85rem; }
.st-list li { display: flex; gap: .8rem; align-items: flex-start; color: #E2E8F0; }
.st-list li i { flex: none; inline-size: 1.9rem; block-size: 1.9rem; border-radius: .55rem; background: color-mix(in oklab, var(--st-accent) 18%, transparent); color: var(--st-accent); display: flex; align-items: center; justify-content: center; }
.st-foot { margin: 0; font-size: .85rem; color: var(--st-muted-on-ink); }
.st-foot a { color: #fff; text-underline-offset: .2em; }
.st-foot a:hover { color: var(--st-accent); }

/* ---- form column ---- */
.st-main { padding-block: 2.25rem; padding-inline: clamp(1.25rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.st-card { inline-size: 100%; max-inline-size: 31rem; }
.st-back { display: inline-flex; align-items: center; gap: .45rem; color: var(--st-muted); text-decoration: none; font-weight: 600; font-size: .9rem; margin-block-end: 1.6rem; min-block-size: 2.75rem; }
.st-back:hover { color: var(--st-ink); text-decoration: underline; }
.st-card h1 { font-family: var(--st-display); font-size: clamp(1.9rem, 3.2vw, 2.4rem); font-weight: 800; letter-spacing: -.025em; color: var(--st-ink); margin: 0; line-height: 1.1; text-wrap: balance; }
.st-lede { color: var(--st-muted); margin: .6rem 0 1.6rem; text-wrap: pretty; }
.st-note { color: var(--st-muted); font-size: .85rem; margin: 0 0 1rem; }
.st-f { margin-block-end: 1.05rem; }
.st-f label { display: block; font-weight: 700; color: var(--st-ink); font-size: .9rem; margin-block-end: .35rem; }
.req-text { font-weight: 500; color: var(--st-muted); font-size: .82rem; }
.st-f input[type="text"], .st-f input[type="email"], .st-f input[type="password"] { inline-size: 100%; min-block-size: 3rem; padding: .7rem .9rem; border: 1.5px solid var(--st-edge); border-radius: var(--st-radius); background: var(--st-surface); font: inherit; color: var(--st-ink); }
.st-f input:hover { border-color: var(--st-ink); }
.st-f input[aria-invalid="true"] { border-color: var(--st-err); background: var(--st-err-soft); }
.st-hint { display: block; color: var(--st-muted); font-size: .8rem; margin-block-start: .35rem; }
.st-pw { position: relative; }
.st-pw input { padding-inline-end: 5.2rem; }
.st-pw button { position: absolute; inset-inline-end: .4rem; inset-block-start: 50%; transform: translateY(-50%); min-block-size: 2.4rem; min-inline-size: 2.75rem; padding: 0 .75rem; border: 0; border-radius: .5rem; background: var(--st-paper); color: var(--st-ink); font-weight: 700; font-size: .8rem; cursor: pointer; }
.st-pw button:hover { background: color-mix(in oklab, var(--st-paper) 88%, var(--st-ink)); }
.st-check { display: flex; gap: .7rem; align-items: flex-start; margin-block: 1.1rem; font-size: .92rem; }
.st-check input { inline-size: 1.4rem; block-size: 1.4rem; margin-block-start: .1rem; flex: none; accent-color: var(--st-ink); }
.st-check label { margin: 0; font-weight: 500; }
.st-check a, a.st-inline, .st-switch a { color: var(--st-accent-text); font-weight: 600; text-underline-offset: .2em; }
.st-check a:hover, a.st-inline:hover, .st-switch a:hover { color: var(--st-ink); }
.st-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-block: .2rem 1.1rem; }
.st-row .st-check { margin: 0; }
.st-btn { inline-size: 100%; min-block-size: 3.25rem; border: 2px solid transparent; border-radius: var(--st-radius); background: var(--st-accent); color: var(--st-ink); font-family: var(--st-display); font-weight: 800; font-size: 1.05rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; text-decoration: none; transition: background-color .15s ease; }
.st-btn:hover { background: var(--st-accent-hover); }
.st-btn:disabled { opacity: .7; cursor: default; }
.st-btn.secondary { background: var(--st-surface); border-color: var(--st-edge); color: var(--st-ink); }
.st-btn.secondary:hover { border-color: var(--st-ink); background: color-mix(in oklab, var(--st-surface) 94%, var(--st-ink)); }
.st-spin { display: none; inline-size: 1.05rem; block-size: 1.05rem; border: 2px solid color-mix(in oklab, var(--st-ink) 30%, transparent); border-block-start-color: var(--st-ink); border-radius: 50%; animation: st-spin .7s linear infinite; }
.loading > .st-spin { display: inline-block; }
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-google { display: flex; align-items: center; justify-content: center; gap: .65rem; inline-size: 100%; min-block-size: 3.1rem; background: var(--st-surface); border: 1.5px solid var(--st-edge); border-radius: var(--st-radius); color: #1F2937; font-weight: 700; font-size: .95rem; text-decoration: none; font-family: Roboto, Arial, sans-serif; }
.st-google:hover { border-color: var(--st-ink); background: color-mix(in oklab, var(--st-surface) 94%, var(--st-ink)); color: #1F2937; }
.st-or { display: flex; align-items: center; gap: .8rem; margin-block: 1.3rem; color: var(--st-muted); font-size: .85rem; }
.st-or::before, .st-or::after { content: ""; flex: 1; block-size: 1px; background: var(--st-line); }
.st-alert { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--st-radius); margin-block-end: 1.1rem; font-size: .92rem; font-weight: 600; border: 1px solid; }
.st-alert.err { background: var(--st-err-soft); border-color: color-mix(in oklab, var(--st-err) 40%, white); color: var(--st-err); }
.st-alert.info { background: var(--st-info-soft); border-color: color-mix(in oklab, var(--st-info) 35%, white); color: var(--st-info); }
.st-alert.warn { background: var(--st-warn-soft); border-color: color-mix(in oklab, var(--st-warn) 35%, white); color: var(--st-warn); }
.st-alert[hidden] { display: none; }
.st-switch { margin: 1.6rem 0 0; text-align: center; color: var(--st-muted); }
.st-legal { margin: 1.4rem 0 0; text-align: center; font-size: .85rem; color: var(--st-muted); }
.st-legal a { color: var(--st-muted); text-underline-offset: .2em; }
.st-legal a:hover { color: var(--st-ink); }
.st-strength { display: none; margin-block-start: .55rem; }
.st-strength .bars { display: flex; gap: .25rem; }
.st-strength .bars i { flex: 1; block-size: .3rem; border-radius: .2rem; background: var(--st-line); }
.st-strength .word { font-size: .8rem; font-weight: 600; margin-block-start: .3rem; }
.st-ts { font-size: .88rem; color: var(--st-muted); }
.st-ts.err { font-weight: 600; color: var(--st-err); }
.st-ts:not(:empty) { margin-block-end: .75rem; }
.st-done { text-align: center; padding-block: 1rem; }
.st-done .ok { inline-size: 4.5rem; block-size: 4.5rem; border-radius: 1.4rem; margin: 0 auto 1.1rem; background: var(--st-ok-soft); color: var(--st-ok); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.st-done h2 { font-family: var(--st-display); font-size: 1.7rem; font-weight: 800; margin: 0 0 .6rem; }
.st-done p { color: var(--st-muted); }
.st-done .actions { display: grid; gap: .7rem; max-inline-size: 22rem; margin: 1.5rem auto 0; }
.st-status { min-block-size: 1.3rem; margin-block-start: .9rem; font-size: .88rem; color: var(--st-ok); font-weight: 600; }
.st-main .colony-field-error { color: var(--st-err); font-size: .85rem; font-weight: 600; margin-block-start: .3rem; }

@media (max-width: 1020px) {
    .st-auth { grid-template-columns: 1fr; }
    .st-side { padding-block: 1.6rem; }
    .st-pitch { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .st-btn { transition: none; }
    .st-spin { animation: none; }
}
@media (forced-colors: active) {
    .st-btn, .st-google, .st-f input { border: 2px solid ButtonText; }
    .st-tag { border: 1px solid CanvasText; }
}

/* ---- per-product tokens: the only thing a product changes ---- */
.st-auth[data-product="sign"] { --st-accent: #FF6B35; }
.st-auth[data-product="tasks"] {
    --st-side: #1B2447;                 /* ink with an indigo cast: Tasks' own colour, and orange stays the one action colour */
    --st-muted-on-ink: #C3CCE4;
}
.st-auth[data-product="booking"] {
    --st-side: #12261F;                 /* ink with a green cast: "confirmed" is this product's colour, and orange stays the one action colour */
    --st-muted-on-ink: #B7C6BE;
}
