/* Log in, Sign up, Forgot password (templates/drobo/auth_v2/*): the new app design, standalone.
   Built like the app frame. Wide screens (1024px and up): the brand panel is an inset panel on the left (the dashboard
   hero's dots, particles and glow; a big headline with one word in animated gradient text; the real top sellers
   from the public leaderboard, with the border beam; on sign up the plans), the form is one compact card on the page background on
   the right. Phones and small tablets: the logo and the card.
   The form never moves: the card fades in (opacity only). Nothing translates, slides, bounces or staggers.
   Every field and button in the card is one height (--auth-h). Messages are toasts (js/drobo-auth-ui.js).
   Only --ui-* tokens and the shared radii. Loaded after css/drobo-ui.css. */

body.ui-auth {
  --auth-h: var(--ui-h-field); /* every field and button in the card: the kit's form-field height */
  --auth-card-w: 25rem;       /* the form card */
  background: var(--ui-bg);
}

/* ── Frame ───────────────────────────────────────────────────────────────── */
.ui-auth-shell { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(26rem, 1fr); min-height: 100vh; min-height: 100dvh; }

.ui-auth-logo { display: inline-flex; align-items: center; align-self: flex-start; text-decoration: none; }
/* The logo files cropped to the artwork (images/logo_svg/*_tight.svg), so the height is the logo's own. */
body.ui-auth .ui-auth-logo img { width: auto; max-width: none; height: 2rem; }

/* ── Brand panel: an inset panel, like the app's ─────────────────────────── */
.ui-auth-brand {
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; box-sizing: border-box;
  min-height: calc(100dvh - 1rem); margin: .5rem 0 .5rem .5rem; padding: 1.75rem clamp(2rem, 4.5vw, 4.5rem) 1.5rem;
  background: var(--ui-panel); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); box-shadow: var(--ui-shadow);
  overflow: hidden; overflow: clip;
}
/* The dashboard hero's colour glow (top right), and a fainter violet one low on the left. */
.ui-auth-brand::before, .ui-auth-brand::after { content: ""; position: absolute; z-index: -1; pointer-events: none; filter: blur(30px); }
.ui-auth-brand::before {
  top: -12%; right: -14%; width: 70%; height: 62%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ui-primary) var(--ui-glow, 10%), transparent), transparent 72%),
              radial-gradient(closest-side at 72% 38%, color-mix(in srgb, var(--ui-violet) var(--ui-glow, 10%), transparent), transparent 72%);
}
.ui-auth-brand::after {
  bottom: -18%; left: -16%; width: 60%; height: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ui-violet) calc(var(--ui-glow, 10%) * .7), transparent), transparent 72%);
}
.ui-auth-brand > .ui-dots { z-index: -1; }
.ui-auth-particles { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; color: rgba(24, 24, 27, .55); }
html[data-theme="dark"] .ui-auth-particles { color: rgba(255, 255, 255, .8); }

.ui-auth-brand__body { display: flex; flex: 1 1 auto; flex-direction: column; justify-content: center; width: 100%; max-width: 42rem; padding: 2.5rem 0 2rem; }
.ui-auth-offer { align-self: flex-start; margin-bottom: 1.25rem; cursor: default; }
.ui-auth-h1 {
  margin: 0; font-size: clamp(2.25rem, 1.1rem + 2.3vw, 3.5rem); font-weight: 650; line-height: 1.08; letter-spacing: -.035em;
  color: var(--ui-fg); text-wrap: balance;
}
.ui-auth-lead { max-width: 34rem; margin: .9rem 0 0; font-size: clamp(.9375rem, .85rem + .25vw, 1.0625rem); line-height: 1.55; color: var(--ui-muted); text-wrap: pretty; }

/* The real top sellers (auth_board): the leaderboard's rows, compact. Medal colours for 1–3 are the shared [data-medal]
   tokens (drobo-ui.css); each row's soft fill is its sales against #1 (--share), as on the leaderboard. */
.ui-auth-board { margin-top: 2rem; padding: 0; border-radius: var(--ui-radius); box-shadow: var(--ui-shadow-lg); }
.ui-auth-board__head { display: flex; align-items: center; gap: 1rem; padding: .875rem 1.125rem; border-bottom: 1px solid var(--ui-border); }
.ui-auth-board__title { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.ui-auth-board__title strong { font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; color: var(--ui-fg); }   /* the app's card title */
.ui-auth-board__title small { font-size: .8125rem; color: var(--ui-muted); }                                            /* and card sub */
.ui-auth-board__link { flex: 0 0 auto; font-size: .8125rem; }
.ui-auth-board__list { display: grid; gap: .375rem; margin: 0; padding: .625rem; list-style: none; }
.ui-auth-board__list li {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 1.75rem 2.25rem minmax(0, 1fr) auto; align-items: center; gap: .75rem;
  min-height: 3.25rem; padding: .5rem .875rem .5rem .5rem; box-sizing: border-box; overflow: hidden;
  background: var(--ui-subtle); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md);
}
.ui-auth-board__list li[data-medal] { border-color: color-mix(in srgb, var(--medal-lo) 28%, var(--ui-border)); }
.ui-auth-board__list li::before {   /* sales against #1, as a soft fill */
  content: ""; position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--share, 0%);
  background: linear-gradient(90deg, var(--ui-primary-soft), color-mix(in srgb, var(--ui-primary) 2%, transparent));
}
.ui-auth-board__list li[data-medal]::before { background: linear-gradient(90deg, color-mix(in srgb, var(--medal-lo) 18%, transparent), color-mix(in srgb, var(--medal-lo) 3%, transparent)); }
.ui-auth-board__place { display: grid; place-items: center; font-size: .8125rem; font-weight: 650; color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.ui-auth-medal {   /* the leaderboard's medal (.lb-medal) */
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; font-size: .75rem; font-weight: 750; line-height: 1;
  color: var(--medal-ink); background: linear-gradient(145deg, var(--medal-hi), var(--medal-lo)); border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 3px color-mix(in srgb, var(--medal-lo) 16%, transparent);
  font-variant-numeric: tabular-nums;
}
/* The leaderboard's avatar (.lb-av): the photo, or the initial on a gradient; medals get a ring in their colour. */
.ui-auth-av { position: relative; display: inline-grid; width: 2.25rem; height: 2.25rem; font-size: .875rem; font-weight: 700; line-height: 1; border-radius: 50%; }
.ui-auth-av > b, .ui-auth-av > img { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; }
.ui-auth-av > b { display: grid; place-items: center; font-weight: inherit; color: #fff; background: linear-gradient(135deg, var(--a1, #3b82f6), var(--a2, #8b5cf6)); box-shadow: 0 0 0 1px var(--ui-border); }
.ui-auth-av > img { object-fit: cover; background: #fff; box-shadow: 0 0 0 1px var(--ui-border); }
.ui-auth-av[data-medal] > b { color: var(--medal-ink); background: linear-gradient(145deg, var(--medal-hi), var(--medal-lo)); }
.ui-auth-av[data-medal] > b, .ui-auth-av[data-medal] > img { box-shadow: 0 0 0 2px var(--ui-subtle), 0 0 0 3.5px var(--medal-lo); }
.ui-auth-board__name { display: grid; min-width: 0; line-height: 1.35; }
.ui-auth-board__name strong { overflow: hidden; font-size: .875rem; font-weight: 600; color: var(--ui-fg); white-space: nowrap; text-overflow: ellipsis; }
.ui-auth-board__name small { overflow: hidden; font-size: .75rem; color: var(--ui-muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
.ui-auth-board__sales { font-size: .9375rem; font-weight: 650; letter-spacing: -.01em; color: var(--ui-fg); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Sign up: the two plans with their real prices, and the first week. */
.ui-auth-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.ui-auth-plans li {
  display: grid; grid-template-columns: 2rem minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: .75rem; row-gap: .6rem; padding: .875rem 1rem;
  background: var(--ui-card); border: 1px solid var(--ui-border); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow-sm);
}
.ui-auth-plans li[data-featured] { border-color: color-mix(in srgb, var(--ui-violet) 38%, var(--ui-border)); }
.ui-auth-plans__icon { --tone: var(--ui-primary); display: grid; place-items: center; width: 2rem; height: 2rem; font-size: 1rem; border-radius: var(--ui-radius-sm); color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.ui-auth-plans__icon[data-tone="violet"] { --tone: var(--ui-violet); }
.ui-auth-plans__text { display: grid; min-width: 0; line-height: 1.35; }
.ui-auth-plans__text strong { font-size: .875rem; font-weight: 600; color: var(--ui-fg); }
.ui-auth-plans__text small { font-size: .75rem; color: var(--ui-muted); }
.ui-auth-plans__price { grid-column: 1 / -1; align-self: end; display: flex; align-items: baseline; gap: .3rem; }
.ui-auth-plans__price b { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--ui-fg); font-variant-numeric: tabular-nums; }
.ui-auth-plans__price small { font-size: .75rem; color: var(--ui-muted); }
.ui-auth-plans__note { display: flex; align-items: center; gap: .4rem; margin: .75rem 0 0; font-size: .8125rem; color: var(--ui-muted); }
.ui-auth-plans__note .ti { font-size: .9rem; color: var(--ui-primary); }

.ui-auth-brand__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; font-size: .75rem; color: var(--ui-faint); }
.ui-auth-brand__foot span { display: inline-flex; align-items: center; gap: .4rem; }
.ui-auth-brand__foot .ti { font-size: .95rem; color: #5865f2; }

/* ── Form side ───────────────────────────────────────────────────────────── */
.ui-auth-side { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; padding: 0 clamp(1rem, 3vw, 2.5rem); box-sizing: border-box; }
.ui-auth-side__top { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; min-height: 4.25rem; }
.ui-auth-logo--phone { display: none; align-self: center; }
.ui-auth-theme { position: relative; }
html:not(.ui-js) .ui-auth-theme { visibility: hidden; }   /* the switch needs JavaScript */
.ui-auth-main { display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; padding: .5rem 0 1.5rem; }
.ui-auth-offer--phone { display: none; }

.ui-auth-card {
  width: 100%; max-width: var(--auth-card-w); box-sizing: border-box; padding: 1.75rem;
  border-radius: var(--ui-radius); box-shadow: var(--ui-shadow-lg);
  animation: ui-auth-in .3s ease-out both;
}
html[data-theme="dark"] .ui-auth-card { box-shadow: var(--ui-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .04); }
@keyframes ui-auth-in { from { opacity: 0; } }
.ui-auth-card__head { margin: 0 0 1.25rem; }
.ui-auth-card__title { margin: 0; font-size: 1.25rem; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; color: var(--ui-fg); }

.ui-auth-steps { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.ui-auth-steps li { display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; font-weight: 600; color: var(--ui-muted); }
.ui-auth-steps li + li::before { content: ""; width: 1.5rem; height: 1px; margin-right: .05rem; background: var(--ui-border-strong); }
.ui-auth-steps span { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; font-size: .6875rem; border: 1px solid var(--ui-border-strong); border-radius: 50%; }
.ui-auth-steps .is-on { color: var(--ui-fg); }
.ui-auth-steps .is-on span { color: var(--ui-primary-fg); background: var(--ui-primary); border-color: transparent; }

/* ── Fields ──────────────────────────────────────────────────────────────── */
.ui-auth-form { display: grid; gap: .875rem; }
.ui-auth-field { position: relative; display: grid; gap: .375rem; min-width: 0; }
.ui-auth-field label { font-size: .8125rem; font-weight: 550; line-height: 1.25rem; color: var(--ui-fg-2); }
.ui-auth-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.ui-auth-field__link { font-size: .8125rem; font-weight: 500; line-height: 1.25rem; color: var(--ui-primary) !important; text-decoration: none; border-radius: 4px; }
.ui-auth-field__link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* The shared .ui-input, at the auth height. Focus is the shared hairline border plus faint halo. */
body.ui-auth .ui-auth-input { height: var(--auth-h); padding: 0 var(--ui-pad-field); font-size: .875rem; }
body.ui-auth .ui-auth-input::placeholder { color: var(--ui-faint); opacity: 1; }
/* Focus keeps its hairline border while the pointer is still over the field (the shared hover grey would win). */
body.ui-auth .ui-auth-input:focus { border-color: var(--ui-focus) !important; }
/* A field the viewer left invalid (a mistyped email): a calm red edge, no message under it. */
body.ui-auth .ui-auth-input:user-invalid { border-color: color-mix(in srgb, var(--ui-bad) 55%, transparent) !important; }
body.ui-auth .ui-auth-input:user-invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-bad) 13%, transparent) !important; }
body.ui-auth .ui-auth-input:-webkit-autofill { -webkit-text-fill-color: var(--ui-fg); box-shadow: 0 0 0 40px var(--ui-card) inset !important; caret-color: var(--ui-fg); }
body.ui-auth .ui-auth-input:-webkit-autofill:focus { box-shadow: 0 0 0 40px var(--ui-card) inset, 0 0 0 3px var(--ui-ring) !important; }

.ui-auth-input-wrap { position: relative; }
body.ui-auth .ui-auth-input-wrap .ui-auth-input { padding-right: 2.75rem; }
.ui-auth-pw-toggle {
  position: absolute; top: 0; bottom: 0; right: .375rem; display: grid; place-items: center; width: 2rem; height: 2rem; margin: auto 0; padding: 0;
  font-size: 1rem; color: var(--ui-muted); background: transparent; border: 0; border-radius: var(--ui-radius-sm);
  transition: color .15s, background .15s;
}
.ui-auth-pw-toggle:hover { color: var(--ui-fg); background: var(--ui-hover); }

/* Password strength (js/drobo-auth.js sets data-score 0–4): in the gap under the field, so nothing below it moves. */
.ui-auth-strength { position: absolute; top: calc(100% + .3rem); left: 0; right: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; }
.ui-auth-strength:not([data-score]), .ui-auth-strength[data-score="0"] { display: none; }
.ui-auth-strength span { height: 3px; background: var(--ui-border); border-radius: 999px; transition: background .2s; }
.ui-auth-strength[data-score="1"] span:nth-child(-n+1) { background: var(--ui-bad); }
.ui-auth-strength[data-score="2"] span:nth-child(-n+2) { background: var(--ui-warn); }
.ui-auth-strength[data-score="3"] span:nth-child(-n+3) { background: var(--ui-ok); }
.ui-auth-strength[data-score="4"] span { background: var(--ui-ok); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.ui-auth .ui-auth-card .ui-btn { height: var(--auth-h); font-size: .875rem; font-weight: 600; border-radius: var(--ui-radius-control); }
.ui-auth-submit { margin-top: .375rem; }
/* The primary lifts off the card with a faint glow of its own colour; the hover sheen is the shared .ui-btn one. */
.ui-auth .ui-auth-card .ui-btn:not(.ui-btn--outline):not(.ui-btn--ghost) {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(16, 24, 40, .12), 0 8px 18px -10px color-mix(in srgb, var(--ui-primary) 70%, transparent);
}
.ui-auth .ui-btn:disabled::after { display: none; }
.ui-auth .auth-google { gap: .625rem; }
.ui-auth .auth-google svg { flex: 0 0 auto; width: 1.125rem; height: 1.125rem; }

.ui-auth-divider { display: flex; align-items: center; gap: .875rem; margin: .875rem 0; font-size: .75rem; line-height: 1rem; color: var(--ui-faint); }
.ui-auth-divider::before, .ui-auth-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--ui-border); }

/* Busy: js/drobo-auth-ui.js adds .auth-btn--loading on the buttons and .auth-panel--loading on the card. */
.ui-auth .auth-btn--loading { color: transparent !important; pointer-events: none; }
.ui-auth .auth-btn--loading svg { opacity: 0; }
.ui-auth .auth-btn--loading::before {
  content: ""; position: absolute; inset: 0; width: 1rem; height: 1rem; margin: auto; box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--ui-primary-fg) 35%, transparent); border-top-color: var(--ui-primary-fg); border-radius: 50%;
  animation: ui-spin .7s linear infinite;
}
.ui-auth .ui-btn--outline.auth-btn--loading::before { border-color: var(--ui-border); border-top-color: var(--ui-fg); }
.ui-auth-card.auth-panel--loading { pointer-events: none; opacity: .6; transition: opacity .2s; }
body.auth-page--busy { overflow: hidden; }
#btn-content { display: inline-flex; align-items: center; gap: .45rem; }
#btn-content svg { animation: ui-spin 1s linear infinite; }

/* ── Messages ────────────────────────────────────────────────────────────────
   Errors and successes show as toasts; these boxes are the fallback without them (and the server's own notes). */
.ui-auth-alert {
  --auth-tone: var(--ui-primary);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; margin: 0 0 1rem; padding: .6rem .75rem;
  font-size: .8125rem; line-height: 1.45; color: var(--ui-fg-2); overflow-wrap: anywhere;
  background: color-mix(in srgb, var(--auth-tone) 7%, var(--ui-card)); border: 1px solid color-mix(in srgb, var(--auth-tone) 24%, transparent); border-radius: var(--ui-radius-md);
}
.ui-auth-alert[data-tone="bad"] { --auth-tone: var(--ui-bad); }
.ui-auth-alert[data-tone="warn"] { --auth-tone: var(--ui-warn); }
.ui-auth-alert[data-tone="ok"] { --auth-tone: var(--ui-ok); }
.ui-auth-alert strong { font-weight: 600; color: var(--ui-fg); }
.ui-auth-alert code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .75rem; }
.ui-auth .hidden { display: none !important; }

/* ── Under the form ──────────────────────────────────────────────────────── */
.ui-auth-switch { margin: 1.125rem 0 0; font-size: .8125rem; line-height: 1.25rem; color: var(--ui-muted); text-align: center; }
.ui-auth-switch .ui-link { font-weight: 600; }
.ui-auth-side__foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem; margin: 0; padding: 0 0 1.25rem;
  font-size: .75rem; line-height: 1.5; color: var(--ui-faint); text-align: center; text-wrap: balance;
}
.ui-auth-side__foot a { color: var(--ui-muted); text-decoration: underline; text-decoration-color: var(--ui-border-strong); text-underline-offset: 2px; }
.ui-auth-side__foot a:hover { color: var(--ui-fg); text-decoration-color: currentColor; }
.auth-page--signup .ui-auth-side__foot { display: flex; }

/* ── Sign-up: the optional marketing box (in the form) and the agreement (under both buttons) ── */
.ui-auth-optin { margin-top: .5rem; font-size: .8125rem; line-height: 1.45; }
.ui-auth-optin:hover { color: var(--ui-fg-2); }
.ui-auth-terms { margin: 1rem 0 0; font-size: .75rem; line-height: 1.5; color: var(--ui-muted); text-align: center; text-wrap: balance; }
.ui-auth-terms a { color: var(--ui-fg-2); font-weight: 550; text-decoration: underline; text-decoration-color: var(--ui-border-strong); text-underline-offset: 2px; }
.ui-auth-terms a:hover { color: var(--ui-fg); text-decoration-color: currentColor; }
.ui-auth-terms + .ui-auth-switch, #auth-step-form:has(.ui-auth-terms) ~ .ui-auth-switch { margin-top: .75rem; }

/* ── Sign-up confirm step (unused now; kept for js/drobo-auth.js) ───────── */
.ui-auth-confirm .ui-auth-card__title { margin-bottom: .25rem; }
.ui-auth-confirm__box { display: grid; gap: .85rem; margin-top: 1rem; padding: .9rem; background: var(--ui-subtle); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); }
.ui-auth-confirm__user { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.ui-auth-confirm__avatar { display: grid; place-items: center; flex: 0 0 auto; width: 2.5rem; height: 2.5rem; overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 1px var(--ui-border); }
.ui-auth-confirm__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ui-auth-confirm__avatar--initials { font-size: .8125rem; font-weight: 600; color: var(--ui-primary); background: var(--ui-primary-soft); }
.ui-auth-confirm__meta { display: grid; gap: .35rem; min-width: 0; margin: 0; }
.ui-auth-confirm__meta div { display: grid; gap: .05rem; min-width: 0; }
.ui-auth-confirm__meta dt { font-size: .6875rem; font-weight: 600; color: var(--ui-faint); }
.ui-auth-confirm__meta dd { margin: 0; font-size: .8125rem; color: var(--ui-fg); overflow-wrap: anywhere; }
.ui-auth-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .75rem; line-height: 1.5; color: var(--ui-muted); cursor: pointer; }
body.ui-auth .ui-auth-check input { flex: 0 0 auto; width: .9375rem; height: .9375rem; margin: .1rem 0 0; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--ui-primary); }
.ui-auth-confirm__actions { display: grid; gap: .5rem; margin-top: 1rem; }

/* ── Two-step verification: the emailed code (routes/two_step.py, js/drobo-auth.js) ── */
.ui-auth-code { animation: ui-auth-in .3s ease-out both; }
.ui-auth-code[hidden] { display: none; }
.ui-auth-code__icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: 0 0 .9rem; border-radius: 50%;
  font-size: 1.25rem; color: var(--ui-primary); background: var(--ui-primary-soft); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ui-primary) 7%, transparent);
}
.ui-auth-code__lead { margin: .3rem 0 1.25rem; font-size: .8125rem; line-height: 1.5; color: var(--ui-muted); }
.ui-auth-code__lead strong { color: var(--ui-fg); font-weight: 600; overflow-wrap: anywhere; }
body.ui-auth .ui-auth-code__input { font-size: 1.25rem; font-weight: 600; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
body.ui-auth .ui-auth-code__input::placeholder { color: var(--ui-faint); letter-spacing: .5em; }
.ui-auth-code__trust { margin: .1rem 0 .15rem; font-size: .8125rem; color: var(--ui-fg-2); }
.ui-auth-code__foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin: 1.125rem 0 0; font-size: .8125rem; color: var(--ui-faint); }
.ui-auth-code__link { padding: 0; font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; }
.ui-auth-code__link:disabled { color: var(--ui-faint) !important; cursor: default; text-decoration: none; }

/* ── Loading overlay (js/drobo-auth-ui.js) ───────────────────────────────── */
.ui-auth-loading {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem;
  background: color-mix(in srgb, var(--ui-bg) 60%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ui-auth-loading__card {
  display: grid; justify-items: center; gap: .75rem; min-width: 13rem; padding: 1.25rem 1.5rem;
  background: var(--ui-card); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-lg); box-shadow: var(--ui-shadow-lg);
}
.ui-auth-loading__card p { margin: 0; font-size: .8125rem; color: var(--ui-muted); text-align: center; }
.ui-auth-loading__mark { position: relative; isolation: isolate; display: grid; place-items: center; width: 3rem; height: 3rem; }
.ui-auth-loading__mark::before {   /* the ring: a turning conic gradient, masked to 2px */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; padding: 2px;
  background: conic-gradient(from 0deg, transparent 0 35%, var(--ui-primary) 70%, var(--ui-violet) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: ui-spin .9s linear infinite;
}
.ui-auth-loading__mark::after { content: ""; position: absolute; inset: 2px; z-index: -1; border-radius: 50%; background: var(--ui-subtle); }
body.ui-auth .ui-auth-loading__mark img { width: auto; max-width: none; height: 1.35rem; }

/* ── Short wide screens (a 1024×768 laptop): the brand panel tightens so it fits without scrolling ── */
@media (min-width: 1024px) and (max-height: 860px) {
  .ui-auth-brand { padding-top: 1.5rem; padding-bottom: 1.25rem; }
  .ui-auth-brand__body { padding: 1.5rem 0 1.25rem; }
  .ui-auth-offer { margin-bottom: 1rem; }
  .ui-auth-board { margin-top: 1.5rem; }
  .ui-auth-board__list li { min-height: 2.875rem; padding-block: .375rem; }
  .ui-auth-plans li { row-gap: .4rem; padding-block: .75rem; }
  .ui-auth-plans__text small { display: none; }
  .ui-auth-plans__text { align-self: center; }
}

/* The board holds up to five sellers. Sign up also carries the plans, so there it shows the top three unless the screen
   is tall enough for all five; a very short screen shows four. The rest are one click away on the leaderboard. */
@media (min-width: 1024px) and (max-height: 999px) { .auth-page--signup .ui-auth-board__list li:nth-child(n+4) { display: none; } }
@media (min-width: 1024px) and (max-height: 780px) { .ui-auth-board__list li:nth-child(n+5) { display: none; } }

/* ── Phones and small tablets: the logo and the card ─────────────────────── */
@media (max-width: 1023px) {
  .ui-auth-shell { grid-template-columns: minmax(0, 1fr); }
  .ui-auth-brand { display: none; }
  .ui-auth-side__top { justify-content: space-between; }
  .ui-auth-logo--phone { display: inline-flex; }
  .ui-auth-main { justify-content: flex-start; padding-top: 1.5rem; }
  .ui-auth-offer--phone { display: inline-flex; align-self: center; margin-bottom: 1rem; }
}
@media (max-width: 1023px) and (min-height: 760px) {
  .ui-auth-main { justify-content: center; padding-top: .5rem; }
}
@media (max-width: 480px) {
  .ui-auth-side { padding: 0 1rem; }
  .ui-auth-side__top { min-height: 3.75rem; }
  .ui-auth-card { padding: 1.5rem 1.25rem; }
  /* 16px text in fields, so phones don't zoom in on focus. */
  body.ui-auth .ui-auth-input { font-size: 1rem; }
}

/* ── Reduced motion: no particles (js), no beam, no count-up (js); the shared rule stops the rest ── */
@media (prefers-reduced-motion: reduce) {
  .ui-auth-board.ui-beam::after { content: none; }
  .ui-auth-particles { display: none; }
  .ui-auth-loading__mark::before { background: var(--ui-primary); }
}

/* ── Inside the desktop app (?embed=desktop): compact, the card alone ────── */
body.desktop-forum-embed .ui-auth-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
body.desktop-forum-embed .ui-auth-brand,
body.desktop-forum-embed .ui-auth-side__top,
body.desktop-forum-embed .ui-auth-offer--phone,
body.desktop-forum-embed .ui-auth-side__foot { display: none; }
body.desktop-forum-embed .ui-auth-side { min-height: 0; padding: 1rem; }
body.desktop-forum-embed .ui-auth-main { justify-content: flex-start; padding: 0; }
body.desktop-forum-embed .ui-auth-card { max-width: 26.25rem; }
