/* FlyForms — Log in and Forgot password (authpanel.py).
   From 1024px the photo panel fills the right half of the screen, edge to edge (inside the 24px page
   padding), whatever the screen width; the form stays centred in the left half.
   Each slide has its own solid colour; the words sit straight on it (no glass box), in the display
   face, with thin progress bars in place of the dots. Works on every slide, since the slides are swapped in
   from <template>s and keep the same classes. */
.auth-page aside { --auth-pad: clamp(32px, 3.6vw, 64px); container-type: size; isolation: isolate; background: #140b2e; }
.auth-page aside > img { display: none; }   /* the old photos; each slide has its own background and picture now */

@media (min-width: 1024px) {
  .auth-page #app > div { padding: 24px !important; }   /* the site gutter (88px) would hold the photo off the edge */
  .auth-page #app > div > .grid { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .auth-page aside { border-radius: 20px; }
}

.auth-page aside > .relative { z-index: 4; padding: var(--auth-pad); }

/* The old glass card becomes plain words */
.auth-page aside > .relative > div {
  padding: 0; border: 0; border-radius: 0; background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; max-width: 620px;
}
.auth-page aside [aria-live] p:first-child {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16);
  color: rgb(255 255 255 / .9); font-size: 12px; font-weight: 500; letter-spacing: .08em;
}
.auth-page aside [aria-live] p:first-child::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a78bfa; box-shadow: 0 0 0 3px rgb(167 139 250 / .25);
}
.auth-page aside h2 {
  margin-top: 20px; max-width: 16ch; font-family: var(--wh-display); font-size: clamp(34px, 3.1vw, 54px);
  line-height: 1.04; font-weight: 500; letter-spacing: -.025em; color: #fff; text-wrap: balance;
}
.auth-page aside h2 + p {
  margin-top: 16px; max-width: 34ch; font-size: clamp(16px, 1.15vw, 19px); line-height: 1.55;
  color: rgb(255 255 255 / .74); text-wrap: balance;
}

/* Progress bars instead of dots */
.auth-page aside [aria-live] + div { margin-top: 36px; gap: 8px; }
.auth-page aside [aria-live] + div button {
  width: 44px; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .28);
}
.auth-page aside [aria-live] + div button:hover { background: rgb(255 255 255 / .55); }
.auth-page aside [aria-live] + div button[aria-current="true"] { width: 72px; background: #fff; }

/* ---------- Each slide: its own solid colour (deep enough for white words), and a picture for its heading ---------- */
.auth-bg { position: absolute; inset: 0; z-index: 0; }
.auth-bg-0 { background: #6941c6; }   /* violet: builder */
.auth-bg-1 { background: #0e7490; }   /* teal: quizzes */
.auth-bg-2 { background: #2563eb; }   /* royal blue: conversational */
.auth-bg-3 { background: #047857; }   /* emerald: payments */
.auth-bg-4 { background: #334155; }   /* slate: teams */
/* A faint grid of thin lines over the colour, strongest at the top and fading out toward the words */
.auth-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, rgb(255 255 255 / .09) 1px, transparent 1px),
                    linear-gradient(to bottom, rgb(255 255 255 / .09) 1px, transparent 1px);
  background-size: 44px 44px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgb(0 0 0 / .35) 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgb(0 0 0 / .35) 100%);
}

/* The picture: no frame, about two-thirds of the panel wide, its left edge on the words' left edge,
   the same size on every slide; on narrow panels it fills the width inside the padding. */
.auth-shot {
  position: absolute; z-index: 2; top: var(--auth-pad); left: var(--auth-pad);
  width: min(calc(100cqw - 2 * var(--auth-pad)), max(67cqw, 420px), calc((100cqh - var(--auth-pad) - 400px) * 1.6));
  animation: auth-rise .8s cubic-bezier(.2, .7, .2, 1) both;
}

/* The kicker: the slide's icon in place of the dot */
.auth-page aside [aria-live] p.auth-kick { text-transform: none; letter-spacing: .01em; gap: 7px; font-size: 12.5px; }
.auth-page aside [aria-live] p.auth-kick::before { display: none; }
.auth-kick svg { width: 14px; height: 14px; }

/* ---------- The illustrations (authslides.py). One unit (--u) is 1px when the scene is 505px wide,
   so each drawing scales with the frame. ---------- */
.auth-scene {
  position: relative; aspect-ratio: 16 / 10; container-type: inline-size;
  display: grid; align-items: center; justify-items: start;
}
.ai { --u: calc(100cqw / 505); position: relative; font-family: var(--font-sans, Inter, system-ui, sans-serif); color: #18181b; font-size: calc(12 * var(--u)); line-height: 1.35; }
.ai p { margin: 0; }
.ai svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); flex: none; }
.ai-card { background: #fff; border-radius: calc(14 * var(--u)); box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) rgb(15 10 40 / .12), 0 calc(18 * var(--u)) calc(40 * var(--u)) rgb(15 10 40 / .28); }
.ai-row { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u)); }
.ai-title { font-size: calc(13.5 * var(--u)); font-weight: 600; }
.ai-badge { font-size: calc(10 * var(--u)); color: #64748b; background: #f1f5f9; border-radius: 99px; padding: calc(2 * var(--u)) calc(8 * var(--u)); }
.ai-label { margin-top: calc(10 * var(--u)) !important; font-size: calc(11 * var(--u)); color: #3f3f46; }
.ai-input { display: flex; align-items: center; gap: calc(7 * var(--u)); height: calc(26 * var(--u)); margin-top: calc(5 * var(--u)); padding: 0 calc(9 * var(--u)); border: 1px solid #e5e7eb; border-radius: calc(8 * var(--u)); font-size: calc(11 * var(--u)); color: #3f3f46; }
.ai-btn { display: flex; align-items: center; justify-content: center; gap: calc(6 * var(--u)); height: calc(28 * var(--u)); margin-top: calc(12 * var(--u)); border-radius: calc(8 * var(--u)); background: #111827; color: #fff; font-size: calc(12 * var(--u)); font-weight: 500; }
.ai-btn svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }
.ai-muted { color: #94a3b8; }
.ai-ico { display: inline-flex; align-items: center; gap: calc(4 * var(--u)); font-size: calc(10.5 * var(--u)); }
.ai-ico svg { width: calc(11 * var(--u)); height: calc(11 * var(--u)); }
.ai-cap { font-size: calc(9 * var(--u)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; }
.ai-question { margin-top: calc(6 * var(--u)) !important; font-size: calc(13.5 * var(--u)); font-weight: 600; line-height: 1.3; }
.ai-opt { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u)); height: calc(30 * var(--u)); margin-top: calc(7 * var(--u)) !important; padding: 0 calc(11 * var(--u)); border: 1px solid #e5e7eb; border-radius: calc(9 * var(--u)); font-size: calc(12 * var(--u)); color: #334155; }

/* 1 Builder */
.ai-build { display: flex; align-items: flex-start; gap: calc(10 * var(--u)); }
.ai-fields { width: calc(118 * var(--u)); margin-top: calc(36 * var(--u)); padding: calc(11 * var(--u)) calc(12 * var(--u)) calc(6 * var(--u)); }
.ai-field { display: flex; align-items: center; gap: calc(7 * var(--u)); padding: calc(5 * var(--u)) 0; font-size: calc(11.5 * var(--u)); color: #3f3f46; }
.ai-field svg { color: #94a3b8; }
.ai-form { width: calc(250 * var(--u)); padding: calc(15 * var(--u)) calc(16 * var(--u)); }
.ai-drop { position: relative; display: flex; align-items: center; height: calc(44 * var(--u)); margin-top: calc(11 * var(--u)); padding: 0 calc(12 * var(--u)); border: 1.5px dashed #a78bfa; border-radius: calc(9 * var(--u)); background: #f5f3ff; color: #6d4fe0; font-size: calc(11 * var(--u)); }
.ai-chip { position: absolute; right: calc(8 * var(--u)); top: calc(4 * var(--u)); display: flex; align-items: center; gap: calc(6 * var(--u)); padding: calc(5 * var(--u)) calc(10 * var(--u)); border-radius: calc(8 * var(--u)); background: #fff; color: #18181b; font-size: calc(11 * var(--u)); box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) rgb(30 20 80 / .2); rotate: 3deg; }
.ai-chip svg { color: #6d4fe0; }
.ai-cursor { position: absolute; right: calc(2 * var(--u)); bottom: calc(-4 * var(--u)); width: calc(15 * var(--u)) !important; height: calc(15 * var(--u)) !important; }

/* 2 Quiz */
.ai-q { width: calc(270 * var(--u)); padding: calc(16 * var(--u)) calc(16 * var(--u)) calc(14 * var(--u)); }
.ai-orange { color: #d97706; font-size: calc(11.5 * var(--u)); }
.ai-small { margin-top: calc(8 * var(--u)) !important; font-size: calc(10 * var(--u)); color: #94a3b8; }
.ai-opt-ok { border-color: #6ee7b7; background: #ecfdf5; color: #065f46; font-weight: 500; }
.ai-opt-ok span { display: inline-flex; align-items: center; gap: calc(4 * var(--u)); font-size: calc(10.5 * var(--u)); font-weight: 600; color: #059669; }
.ai-score { position: absolute; right: calc(-44 * var(--u)); bottom: calc(-26 * var(--u)); display: flex; align-items: center; gap: calc(9 * var(--u)); padding: calc(10 * var(--u)) calc(14 * var(--u)) calc(10 * var(--u)) calc(10 * var(--u)); border-radius: calc(12 * var(--u)); }
.ai-ring { width: calc(36 * var(--u)) !important; height: calc(36 * var(--u)) !important; }
.ai-score b, .ai-toast b { display: block; font-size: calc(15 * var(--u)); font-weight: 600; }
.ai-score span { font-size: calc(10.5 * var(--u)); color: #059669; }

/* 3 Conversational */
.ai-c { width: calc(270 * var(--u)); padding: calc(16 * var(--u)) calc(18 * var(--u)); }
.ai-progress { display: block; height: calc(3 * var(--u)); border-radius: 9px; background: #eef0f4; }
.ai-progress i { display: block; width: 40%; height: 100%; border-radius: inherit; background: #7147eb; }
.ai-step { margin-top: calc(12 * var(--u)) !important; font-size: calc(10.5 * var(--u)); font-weight: 600; color: #7147eb; }
.ai-key { justify-content: flex-start; }
.ai-key kbd { display: grid; place-items: center; width: calc(16 * var(--u)); height: calc(16 * var(--u)); margin-right: calc(8 * var(--u)); border: 1px solid #d4d4d8; border-radius: calc(4 * var(--u)); font: 600 calc(8.5 * var(--u)) / 1 var(--font-sans, Inter, sans-serif); color: #52525b; }
.ai-opt-pick { border-color: #7147eb; background: #f5f3ff; color: #18181b; font-weight: 500; }
.ai-opt-pick kbd { background: #7147eb; border-color: #7147eb; color: #fff; }
.ai-opt-pick svg { margin-left: auto; color: #7147eb; }
.ai-ok { justify-content: flex-start; gap: calc(10 * var(--u)); margin-top: calc(12 * var(--u)) !important; }
.ai-okbtn { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); height: calc(26 * var(--u)); padding: 0 calc(11 * var(--u)); border-radius: calc(7 * var(--u)); background: #7147eb; color: #fff; font-size: calc(11.5 * var(--u)); font-weight: 600; }
.ai-okbtn svg { width: calc(11 * var(--u)); height: calc(11 * var(--u)); }
.ai-toast { position: absolute; display: flex; align-items: center; gap: calc(9 * var(--u)); padding: calc(9 * var(--u)) calc(14 * var(--u)) calc(9 * var(--u)) calc(9 * var(--u)); border-radius: calc(11 * var(--u)); }
.ai-toast b { font-size: calc(12 * var(--u)); }
.ai-toast span { font-size: calc(10.5 * var(--u)); color: #64748b; }
.ai-toast-br { right: calc(-40 * var(--u)); bottom: calc(-24 * var(--u)); }
.ai-toast-tr { right: calc(-46 * var(--u)); top: calc(-26 * var(--u)); }
.ai-tick { display: grid; place-items: center; width: calc(28 * var(--u)); height: calc(28 * var(--u)); border-radius: calc(8 * var(--u)); background: #d1fae5; color: #059669 !important; }

/* 4 Payment */
.ai-p { width: calc(272 * var(--u)); padding: calc(16 * var(--u)); }
.ai-prod { justify-content: flex-start; padding-bottom: calc(12 * var(--u)); border-bottom: 1px solid #f1f1f4; }
.ai-ticket { display: grid; place-items: center; width: calc(32 * var(--u)); height: calc(32 * var(--u)); border-radius: calc(9 * var(--u)); background: #fef3c7; color: #d97706; }
.ai-ticket svg { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.ai-prod-t { display: flex; flex-direction: column; }
.ai-prod-t b { font-size: calc(12.5 * var(--u)); font-weight: 600; }
.ai-prod-t span { font-size: calc(10.5 * var(--u)); color: #64748b; }
.ai-price { margin-left: auto; font-size: calc(13 * var(--u)); font-weight: 600; }
.ai-cardno svg { color: #94a3b8; }
.ai-cardno em { margin-left: auto; font-style: normal; color: #94a3b8; }

/* 5 Teams (the organisations list hangs 36 units off the card's left, so the card starts that far in) */
.ai-team { margin-left: calc(36 * var(--u)); }
.ai-t { width: calc(270 * var(--u)); padding: calc(14 * var(--u)) calc(16 * var(--u)) calc(8 * var(--u)); }
.ai-org { justify-content: flex-start; padding-bottom: calc(10 * var(--u)); border-bottom: 1px solid #f1f1f4; }
.ai-orgmark { display: grid; place-items: center; width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: calc(8 * var(--u)); background: #6366f1; color: #fff; font-weight: 600; font-size: calc(13 * var(--u)); }
.ai-invite { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); margin-left: auto; padding: calc(5 * var(--u)) calc(9 * var(--u)); border: 1px solid #e5e7eb; border-radius: calc(8 * var(--u)); font-size: calc(11 * var(--u)); }
.ai-person { display: flex; align-items: center; gap: calc(9 * var(--u)); height: calc(36 * var(--u)); border-bottom: 1px solid #f4f4f5; font-size: calc(12 * var(--u)); }
.ai-person:last-child { border-bottom: 0; }
.ai-av { display: grid; place-items: center; width: calc(24 * var(--u)); height: calc(24 * var(--u)); border-radius: 50%; font-size: calc(8.5 * var(--u)); font-weight: 700; }
.ai-rose { background: #ffe4e6; color: #be123c; } .ai-sky { background: #e0f2fe; color: #0369a1; }
.ai-amber { background: #fef3c7; color: #b45309; } .ai-mint { background: #d1fae5; color: #047857; }
.ai-role { margin-left: auto; padding: calc(2 * var(--u)) calc(8 * var(--u)); border-radius: 99px; background: #f1f5f9; font-size: calc(10 * var(--u)); color: #475569; }
.ai-orgs { position: absolute; left: calc(-36 * var(--u)); bottom: calc(-34 * var(--u)); width: calc(150 * var(--u)); padding: calc(9 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)); }
.ai-orgs .ai-cap { padding: 0 calc(6 * var(--u)) calc(4 * var(--u)); }
.ai-orgpick { display: flex; align-items: center; gap: calc(8 * var(--u)); padding: calc(5 * var(--u)) calc(6 * var(--u)); border-radius: calc(6 * var(--u)); font-size: calc(11.5 * var(--u)); color: #3f3f46; }
.ai-orgpick svg { margin-left: auto; color: #6366f1; }
.ai-on { background: #f4f4f6; color: #18181b; }
.ai-sq { width: calc(10 * var(--u)); height: calc(10 * var(--u)); border-radius: calc(3 * var(--u)); }
.ai-sq-v { background: #6366f1; } .ai-sq-r { background: #f43f5e; } .ai-sq-g { background: #10b981; }

@keyframes auth-rise { from { opacity: 0; translate: 0 18px; } }
@media (prefers-reduced-motion: reduce) { .auth-shot { animation: none; } }
