/* ============================================================
   Legend's Best — sign-in pages (customer and admin).

   Customer: a full-height poster on the left carrying the shop's own
   headline, with the picture or video chosen in Admin › Homepage Hero
   behind it, and the sign-in card on the right. Admin: one dark card in
   the middle of the console's navy, the same palette as the console
   itself. Loaded after styles.css, so the form pieces it shares with the
   sign-up and password pages (fields, buttons, notes) are restyled once.
   ============================================================ */

.page.auth {
  min-height: 100vh; min-height: 100dvh;
  background: #f3f6fd;
  background-image: radial-gradient(rgba(30, 75, 255, 0.10) 1px, transparent 1px);
  background-size: 22px 22px;
}
.page.auth .deco-dot { display: none; }

.auth__grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  min-height: 100vh; min-height: 100dvh;
}

/* ---- Poster ---- */
.poster {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 4vw, 56px);
  color: #fff;
  background: #071a4d;
  isolation: isolate;
}
/* ---------- The drifting lines behind the poster ----------
   Thirty-six long curves each way, drawn by js/auth-paths.js. Every line is
   measured as 1 long (pathLength), so one dash rule fits all of them: a
   short stroke travels the length of each curve at its own pace. They sit
   above the poster's picture and under its words. */
.auth-paths {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  color: #fff;
  opacity: 0.55;
}
.auth-paths__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-paths path {
  fill: none;
  stroke-dasharray: 0.28 0.72;
  animation-name: auth-path-travel;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes auth-path-travel { from { stroke-dashoffset: 1; } to { stroke-dashoffset: -1; } }

/* ---------- Coming in ----------
   Each part of the page arrives a moment after the one above it. Sixty
   milliseconds apart, the same step as the layout the owner sent: enough to
   read as one movement rather than a queue. */
.enter { animation: auth-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.enter--1 { animation-delay: 60ms; }
.enter--2 { animation-delay: 120ms; }
.enter--3 { animation-delay: 180ms; }
.enter--4 { animation-delay: 240ms; }
.enter--5 { animation-delay: 300ms; }
@keyframes auth-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Home, from the form side ----------
   The owner's example keeps a way back at the top of the form; this page
   only had one at the bottom. */
.card-wrap { position: relative; }
.auth-home {
  position: absolute;
  top: clamp(16px, 2.5vw, 28px);
  left: clamp(16px, 2.5vw, 28px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .auth-home:hover { background: rgba(3, 117, 215, 0.08); color: #0059c4; }
}
.auth-home svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .auth-paths path { animation: none; stroke-dasharray: none; }
  .enter { animation: none; }
}

.poster__brand {
  position: absolute;
  top: clamp(22px, 3vw, 40px);
  left: clamp(24px, 4vw, 56px);
  z-index: 3;
}
.poster__brand img { height: 42px; width: auto; display: block; }

/* There is no site header on these two pages, so nothing should be left
   clear for one. Without this the poster started an inch down the screen
   with a white band above it. */
body:not(.hero-header) main#main-content:has(> .page.auth) { padding-top: 0; }
/* The colour has to reach the very top and the very bottom of a phone's
   screen, under the browser's own bars and past any bounce at the ends.
   The page itself is measured in dvh, which follows those bars as they
   come and go, and html and body behind it wear the brand blue, so nothing
   pale can ever show through above or below. The owner's words: "the color
   should full the screen". */
html:has(.page.auth), body:has(.page.auth) { background: #0164ce; min-height: 100%; }
.page.auth, .auth__grid { min-height: 100vh; min-height: 100dvh; }
.page.auth .card-wrap { padding-bottom: calc(clamp(28px, 4vw, 56px) + env(safe-area-inset-bottom, 0px)); }

/* The admin's chosen media fills the poster; until one is set, a slow
   aurora of the brand blues does the job.
   inset/margin/radius are all spelled out because the shared .auth-bg in
   styles.css is a rounded panel with a gap above it, which is right where
   it is used on a page inside the site, and wrong here: this one is the
   poster itself and has to reach all four edges. */
.poster .auth-bg {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 0;
  min-height: 0;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 15% 20%, rgba(80, 115, 255, 0.55), transparent 60%),
    radial-gradient(700px 500px at 85% 15%, rgba(30, 75, 255, 0.45), transparent 60%),
    radial-gradient(600px 500px at 70% 90%, rgba(255, 213, 74, 0.22), transparent 60%),
    linear-gradient(160deg, #0b1230 0%, #071a4d 55%, #0d2a7a 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: auth-aurora 18s ease-in-out infinite alternate;
}
.poster .auth-bg .auth-bg__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .auth-bg.has-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 26, 77, 0.25) 0%, rgba(7, 26, 77, 0.55) 55%, rgba(7, 26, 77, 0.92) 100%);
}
@keyframes auth-aurora {
  0% { background-position: 0% 0%, 100% 0%, 100% 100%, 0 0; }
  100% { background-position: 60% 40%, 40% 60%, 20% 40%, 0 0; }
}

.poster__copy { position: relative; z-index: 2; max-width: 560px; }
.poster__copy h1 {
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 16px;
  color: #fff;
}
.poster__copy .lede {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 26px;
  max-width: 48ch;
}
.poster__proof {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.poster__proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.poster__proof svg { width: 16px; height: 16px; color: var(--gold); }
.poster .trust-pill { position: relative; z-index: 2; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.poster .trust-pill__text strong { color: #fff; }

/* ---- Card column ---- */
.page.auth .card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px);
}
.page.auth .card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(30, 75, 255, 0.08);
  box-shadow: 0 30px 60px -30px rgba(7, 26, 77, 0.35), 0 2px 6px rgba(7, 26, 77, 0.05);
  padding: clamp(26px, 3vw, 38px) clamp(22px, 3vw, 36px) 30px;
}
.page.auth .card__logo { width: 56px; height: 56px; margin: 0 0 18px; border-radius: 16px; }
.page.auth .card__logo .brand__logo-icon { width: 28px; height: 28px; }
.page.auth .card h2 { text-align: left; font-size: 26px; letter-spacing: -0.02em; margin-bottom: 4px; }
.page.auth .card p.subtitle { text-align: left; margin-bottom: 22px; }
.page.auth .field label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.page.auth .field input { height: 50px; border-radius: 14px; background: #f7f9fe; border-color: rgba(16, 24, 40, 0.08); }
.page.auth .field input:focus { background: #fff; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(30, 75, 255, 0.14); }
.page.auth .field .control svg.leading { color: var(--gray-600); }
.page.auth .btn-primary {
  height: 52px;
  border-radius: 14px;
  font-size: 15px;
  box-shadow: 0 14px 28px -14px rgba(30, 75, 255, 0.75);
}
.page.auth .divider { margin: 20px 0 16px; color: var(--gray-400); font-size: 12px; }
.page.auth .signup-note { margin-top: 20px; }
/* Delivery status under the code box: where the code went, or why the email
   did not arrive (bounce), so the customer knows to pick the text option. */
.page.auth .verify-note { margin-top: 18px; padding: 10px 14px; border-radius: 12px; background: var(--blue-50); color: var(--ink-700); font-size: 13.5px; line-height: 1.5; text-align: left; }
.page.auth .verify-note[data-tone="ok"] { background: #e6f6ec; color: #0f5132; }
.page.auth .verify-note[data-tone="warn"] { background: #fff4ed; color: #9a3412; }
.page.auth .verify-note + .signup-note { margin-top: 14px; }
.page.auth .page__footer { display: none; }
.card__foot {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--gray-600);
}
.card__foot a { color: var(--gray-600); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .card__foot a:hover { color: var(--blue-600); }
}

/* One entrance for the card, nothing else moves on its own. */
.page.auth .card { animation: auth-card-in 0.5s var(--ease) both; }
@keyframes auth-card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Admin: the console's own palette ---- */
/* Admin sign-in: the platform's own sky blue and white, the same brand the
   customer site wears, so it feels like your console, not someone else's. */
.page.auth--admin {
  background: #0164ce;
  background-image:
    radial-gradient(900px 560px at 15% -10%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(700px 520px at 100% 110%, rgba(3, 117, 215, 0.9), transparent 65%),
    linear-gradient(160deg, #0375d7 0%, #0164ce 45%, #0059c4 100%);
  color: #fff;
}
/* No site header on this page, so none of its clearance either. */
body:not(.hero-header) main#main-content:has(> .auth--admin) { padding-top: 0; }
html:has(.auth--admin), body:has(.auth--admin) { background-color: #0164ce; }
.page.auth--admin { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; }
.page.auth--admin .auth__center { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(clamp(24px, 4vw, 56px) + env(safe-area-inset-bottom, 0px)); }
.page.auth--admin .auth-bg--full { position: absolute; inset: 0; z-index: 0; margin: 0; border-radius: 0; background: transparent; opacity: 0.22; mix-blend-mode: luminosity; }
.page.auth--admin .auth-bg--full .auth-bg__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth__center {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px) 20px;
  min-height: 100vh; min-height: 100dvh;
}
.page.auth--admin .card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #0b1f44;
  box-shadow: 0 40px 80px -36px rgba(0, 38, 105, 0.55);
}
.card__console {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.card__console img { width: 40px; height: 40px; border-radius: 12px; background: rgba(0, 161, 255, 0.14); padding: 7px; }
.card__console strong { display: block; font-size: 14px; color: #eaf0f8; }
.card__console span { display: block; font-size: 12px; color: #8f9cab; letter-spacing: 0.06em; text-transform: uppercase; }
.page.auth--admin .card__console img { background: linear-gradient(160deg, #0375d7, #0059c4); }
.page.auth--admin .card__console strong { color: #0b1f44; }
.page.auth--admin .card__console span { color: #4b5d7a; text-transform: none; letter-spacing: 0; }
.page.auth--admin .card h2 { color: #0b1f44; }
.page.auth--admin .card p.subtitle { color: #4b5d7a; }
.page.auth--admin .field label { color: #1d2f4f; }
.page.auth--admin .field input { background: #f5f9ff; border-color: #d4e3f7; color: #0b1f44; }
.page.auth--admin .field input::placeholder { color: #8a9ab3; }
.page.auth--admin .field input:focus { border-color: #0164ce; box-shadow: 0 0 0 4px rgba(1, 100, 206, 0.16); background: #fff; }
.page.auth--admin .field .control svg.leading { color: #0164ce; }
.page.auth--admin .toggle-visibility { color: #4b5d7a; }
.page.auth--admin .checkbox { color: #1d2f4f; }
.page.auth--admin .link-forgot { color: #0164ce; }
.page.auth--admin .btn-primary { background: linear-gradient(160deg, #0375d7, #0059c4); box-shadow: 0 14px 28px -14px rgba(1, 100, 206, 0.9); }
@media (hover: hover) and (pointer: fine) {
  .page.auth--admin .btn-primary:hover { background: #0059c4; }
}
.page.auth--admin .restricted-note { background: #eef5ff; border-color: #cfe1f8; color: #1d2f4f; margin-top: 18px; }
.page.auth--admin .restricted-note svg { color: #0164ce; }
.page.auth--admin .card__foot { border-top-color: rgba(16, 24, 40, 0.08); color: #4b5d7a; }
.page.auth--admin .card__foot a { color: #4b5d7a; }
@media (hover: hover) and (pointer: fine) {
  .page.auth--admin .card__foot a:hover { color: #0164ce; }
}
.page.auth--admin .error-msg { color: #c62828; }
.page.auth--admin .auth__site-note { color: rgba(255, 255, 255, 0.85); }
.auth__site-note { position: relative; z-index: 1; text-align: center; font-size: 12.5px; color: #66738a; padding: 0 16px 22px; }
.auth__site-note a { color: #8f9cab; }

/* ---- Tablet and phone ---- */
@media (max-width: 980px) {
  .auth__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .poster { min-height: 300px; padding: 84px 20px 24px; justify-content: flex-end; }
  .poster__brand { top: 18px; left: 20px; }
  .poster__brand img { height: 34px; }
  .poster__copy h1 { font-size: clamp(28px, 7vw, 38px); margin-bottom: 8px; }
  .poster__copy .lede { margin-bottom: 14px; font-size: 14px; }
  .poster__proof { display: none; }
  .poster .trust-pill { display: none; }
  .page.auth .card-wrap { padding: 20px 16px 32px; margin-top: -22px; }
  .page.auth .card { border-radius: 20px; }
}
@media (max-width: 540px) {
  .poster { min-height: 240px; padding-top: 78px; }
  .page.auth .card { padding: 22px 18px 24px; }
  .page.auth .row-between { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  .poster .auth-bg { animation: none; }
  .page.auth .card { animation: none; }
}


/* ============================================================
   The console's sign-in, in the shape the owner sent.
   Login / Signup (Liana Pepanyan, Dali Agents, 21st.dev): a dark stage with
   specks rising through it and six hairlines drawn in as the page opens, a
   thin bar across the top, and one glass card that fades up onto the grid.

   Carried over in this site's own colour, sky blue and white, never the
   example's greys. Every id js/admin-login.js reads is untouched, and the
   fields keep the browser from filling anything in, as before.
   ============================================================ */
.page.auth--admin {
  background: linear-gradient(160deg, #0059c4 0%, #0164ce 55%, #0375d7 100%);
  color: #fff;
}
.auth-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.auth-stage__specks {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .55; mix-blend-mode: screen;
}
.auth-stage__lines { position: absolute; inset: 0; opacity: .7; }
.auth-stage__hline, .auth-stage__vline { position: absolute; background: rgba(255, 255, 255, .22); will-change: transform, opacity; }
.auth-stage__hline { left: 0; right: 0; height: 1px; transform: scaleX(0); transform-origin: 50% 50%; animation: auth-draw-x .8s cubic-bezier(.22, .61, .36, 1) forwards; }
.auth-stage__vline { top: 0; bottom: 0; width: 1px; transform: scaleY(0); transform-origin: 50% 0; animation: auth-draw-y .9s cubic-bezier(.22, .61, .36, 1) forwards; }
.auth-stage__hline:nth-child(1) { top: 18%; animation-delay: .12s; }
.auth-stage__hline:nth-child(2) { top: 50%; animation-delay: .22s; }
.auth-stage__hline:nth-child(3) { top: 82%; animation-delay: .32s; }
.auth-stage__vline:nth-child(4) { left: 22%; animation-delay: .42s; }
.auth-stage__vline:nth-child(5) { left: 50%; animation-delay: .54s; }
.auth-stage__vline:nth-child(6) { left: 78%; animation-delay: .66s; }
@keyframes auth-draw-x { 0% { transform: scaleX(0); opacity: 0; } 60% { opacity: .95; } 100% { transform: scaleX(1); opacity: .7; } }
@keyframes auth-draw-y { 0% { transform: scaleY(0); opacity: 0; } 60% { opacity: .95; } 100% { transform: scaleY(1); opacity: .7; } }

/* The bar along the top. */
.auth-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 3vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.auth-top__brand img { display: block; height: 34px; width: auto; }
.auth-top__link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .15s;
}
@media (hover: hover) and (pointer: fine) {
  .auth-top__link:hover { background: rgba(255, 255, 255, .18); }
}
.auth-top__link svg { width: 16px; height: 16px; }

/* The card: glass over the blue, arriving a beat after the lines. */
.page.auth--admin .auth__center { padding-top: 96px; }
.page.auth--admin .card {
  background: rgba(0, 38, 105, .58);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  box-shadow: 0 40px 80px -36px rgba(0, 20, 60, .8);
  animation: auth-card-up .8s cubic-bezier(.22, .61, .36, 1) .4s both;
}
@keyframes auth-card-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.page.auth--admin .card__console { margin-bottom: 8px; }
.page.auth--admin .card__console span { color: rgba(255, 255, 255, .7); font-size: 12px; letter-spacing: .14em; }
.page.auth--admin .card h2 { color: #fff; }
.page.auth--admin .card p.subtitle { color: rgba(255, 255, 255, .72); }
.page.auth--admin .field label { color: rgba(255, 255, 255, .86); }
.page.auth--admin .field input {
  background: rgba(0, 24, 70, .55); border-color: rgba(255, 255, 255, .18); color: #fff;
}
.page.auth--admin .field input::placeholder { color: rgba(255, 255, 255, .42); }
.page.auth--admin .field input:focus { border-color: rgba(255, 255, 255, .6); box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); background: rgba(0, 24, 70, .7); }
.page.auth--admin .field .control svg.leading { color: rgba(255, 255, 255, .6); }
.page.auth--admin .toggle-visibility { color: rgba(255, 255, 255, .7); }
.page.auth--admin .checkbox { color: rgba(255, 255, 255, .86); }
.page.auth--admin .link-forgot { color: #fff; }
.page.auth--admin .btn-primary { background: #fff; color: #0059c4; box-shadow: 0 14px 28px -14px rgba(0, 20, 60, .9); }
@media (hover: hover) and (pointer: fine) {
  .page.auth--admin .btn-primary:hover { background: #eef5ff; }
}
.page.auth--admin .restricted-note { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .86); }
.page.auth--admin .restricted-note svg { color: #fff; }
.page.auth--admin .card__foot { border-top-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .7); }
.page.auth--admin .card__foot a { color: rgba(255, 255, 255, .7); }
@media (hover: hover) and (pointer: fine) {
  .page.auth--admin .card__foot a:hover { color: #fff; }
}
.page.auth--admin .error-msg { color: #ffd1c9; }

@media (max-width: 560px) {
  .auth-top { padding: 12px 16px; }
  .auth-top__brand img { height: 28px; }
  .auth-top__link { padding: 0 10px; font-size: 13px; }
  .page.auth--admin .auth__center { padding-top: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-stage__hline, .auth-stage__vline { animation: none; transform: none; opacity: .7; }
  .page.auth--admin .card { animation: none; }
}

/* ---- The console sign-in on a phone (owner, 28 Oct 2026: "shaking on my
   phone ... not full screen end to end") ----
   The page used 100dvh, which grows and shrinks as Safari's address bar
   slides, so every touch resized the page and it jumped. 100svh is the
   small, steady height and never moves. The form is no longer a box with
   a margin round it: on a phone it is the screen, edge to edge, on the blue,
   and it arrives without the sliding entrance. */
@media (max-width: 560px) {
  html:has(.auth--admin), body:has(.auth--admin) { overscroll-behavior: none; }
  .page.auth--admin { min-height: 100svh; display: flex; flex-direction: column; }
  .page.auth--admin .auth__site-note { margin: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .page.auth--admin .auth__center {
    flex: 1 0 auto;
    min-height: 0;
    justify-content: flex-start;
    padding: calc(64px + env(safe-area-inset-top, 0px)) 0 8px;
  }
  .page.auth--admin .card {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 12px 20px 8px;
    animation: none;
  }
  .page.auth--admin .card h2 { font-size: 30px; margin-bottom: 6px; }
  .page.auth--admin .card .subtitle { margin-bottom: 18px; }
  .page.auth--admin .field { margin-bottom: 14px; }
  .page.auth--admin .restricted-note { margin-top: 16px; }
}

/* ---- Owner, 4 Nov 2026: "check all my logins, phone and pc" ----
   On a phone the card rises 22px over the poster, and the Home link sat
   inside the card's column, so it landed on the card's own top edge, over
   the logo tile. It now sits at the top right of the poster, level with the
   brand mark on the left, in white on the blue. */
@media (max-width: 980px) {
  .page.auth .auth__grid { position: relative; }
  .page.auth .card-wrap { position: static; }
  .page.auth .auth-home {
    top: 14px;
    left: auto;
    right: 12px;
    color: rgba(255, 255, 255, 0.92);
  }
  @media (hover: hover) and (pointer: fine) {
  .page.auth .auth-home:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
}
}

/* The Google button is drawn by Google at the width the page asks for.
   The script now asks for the card's full width, and this keeps the box it
   sits in full width, so it lines up with Sign in above it. */
.page.auth .oauth-row,
.page.auth #googleSignInButton { width: 100%; }
.page.auth #googleSignInButton { min-height: 44px; }

/* ---- Admin sign-in: messages at the top, a working button (10 Nov 2026) ---- */
.page.auth .auth-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  border: 1px solid transparent;
}
.page.auth .auth-note[hidden] { display: none; }
.page.auth .auth-note--error { background: #fdf0f0; border-color: #f4c9c9; color: #a12a2a; }
.page.auth .auth-note--info { background: var(--blue-50, #eef5fd); border-color: #cfe1f7; color: #0b4a96; }
.page.auth .auth-note--ok { background: #ecf7f0; border-color: #bfe3cc; color: #17663a; }
.page.auth .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.page.auth .btn-primary[aria-busy="true"] { cursor: progress; opacity: 0.92; }
.btn-spin {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 50%;
  /* The button's own text colour, so it shows on a white or a blue button. */
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
  animation: lb-btn-spin 0.7s linear infinite;
}
@keyframes lb-btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spin { animation-duration: 1.6s; }
}

/* Text or email for a code (owner, 10 Nov 2026). Two equal choices, the
   picked one filled in the brand blue. */
.code-way { border: 0; margin: 4px 0 14px; padding: 0; min-width: 0; }
.code-way legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ink-700, #1d2f4f); }
.code-way { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.code-way legend { grid-column: 1 / -1; float: left; width: 100%; }
.code-way__opt { position: relative; display: block; cursor: pointer; }
.code-way__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.code-way__opt span {
  display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 12px;
  border: 1px solid rgba(16, 24, 40, 0.08); border-radius: 14px; background: #f7f9fe;
  font-size: 15px; font-weight: 600; color: #1d2f4f; transition: background .15s, border-color .15s, color .15s;
}
.code-way__opt input:checked + span { background: #0164ce; border-color: #0164ce; color: #fff; }
.code-way__opt input:focus-visible + span { outline: 3px solid rgba(1, 100, 206, .35); outline-offset: 2px; }

/* ---- Console sign-in centred on a phone (owner, 18 Nov 2026: "not well
   positioned in the middle") ----
   The form sat under the bar with half the screen empty below it. It now
   sits in the middle of the space between the bar and the footer line,
   in one readable column, still edge to edge on the blue. */
@media (max-width: 560px) {
  .page.auth--admin .auth__center {
    justify-content: center;
    align-items: center;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 0 24px;
  }
  .page.auth--admin .card { max-width: 440px; margin: 0 auto; }
}
