/* ======================================================================
   Sign-in, sign-up and password pages (/connector/*_login.php, *_signup.php,
   forgot_password.php, reset_password.php). Markup: views/auth/*.php.
   Load after tokens.css. --role is set per page (views/auth/roles.php).
   ====================================================================== */

:root {
  --auth-bg: #f4f6fb;
  --auth-field: #ffffff;
  --auth-border: #dce1ec;
  --auth-muted: #5d6784;
  --auth-faint: #8a93ad;
  --auth-danger: #d1343a;
  --auth-ok: #12a150;
  /* Inter: the neutral UI face most modern products use; system fonts until it loads */
  --auth-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.auth {
  margin: 0;
  min-height: 100vh;
  background: var(--auth-bg);
  color: var(--ink);
  font: 400 0.9375rem/1.5 var(--auth-font);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";   /* Inter's clearer a, g, l, 1 */
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.auth a { color: var(--royal); }
.auth img, .auth svg { display: block; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cn-icon { width: 1.125em; height: 1.125em; flex-shrink: 0; }

.auth-skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: var(--r-sm); background: var(--ink); color: #fff !important; font-weight: 600; text-decoration: none; transition: top var(--t-fast); }
.auth-skip:focus { top: 16px; }

/* ---------- shell ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); min-height: 100vh; }

/* ---------- story (marketing) panel ---------- */
.auth-story { position: sticky; top: 0; height: 100vh; overflow: hidden; color: #fff; isolation: isolate; }
.auth-story__bg {
  position: absolute; inset: -4%; z-index: -2;
  background:
    linear-gradient(165deg, rgba(27, 42, 156, 0.94) 0%, rgba(14, 26, 92, 0.88) 46%, rgba(11, 19, 48, 0.62) 100%),
    url("/assets/img/home/valley-poster-m.webp") 50% 70% / cover no-repeat, #1b2a9c;
  animation: auth-drift 32s ease-in-out infinite alternate;
}
.auth-story__glow {
  position: absolute; z-index: -1; width: 520px; height: 520px; right: -180px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--role) 55%, transparent) 0%, transparent 68%);
  filter: blur(10px); animation: auth-float 14s ease-in-out infinite alternate;
}
@keyframes auth-drift { from { transform: scale(1); } to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); } }
@keyframes auth-float { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-60px, 80px, 0); } }

.auth-story__inner { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: clamp(36px, 5vw, 72px) clamp(32px, 4.6vw, 72px); overflow-y: auto; scrollbar-width: none; }
.auth-story__inner::-webkit-scrollbar { display: none; }
.auth-story__inner > * > *, .auth-rooms { animation: auth-rise 800ms var(--ease-out) both; }
.auth-story__top > :nth-child(2) { animation-delay: 80ms; }
.auth-story__top > :nth-child(3) { animation-delay: 160ms; }
.auth-story__top > :nth-child(4) { animation-delay: 240ms; }
.auth-rooms { animation-delay: 340ms; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.auth-story__brand { display: none; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 4px 12px 4px 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; backdrop-filter: blur(6px); }
.auth-eyebrow__icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--role); color: #fff; }
.auth-eyebrow__icon .cn-icon { width: 13px; height: 13px; }
.auth-story__title { margin: 0 0 16px; max-width: 15ch; font: 700 clamp(1.75rem, 2.6vw, 2.5rem)/1.12 var(--auth-font); letter-spacing: -0.03em; text-wrap: balance; }
.auth-story__title em { font-style: normal; background: linear-gradient(92deg, var(--sky), #b9f3ff 60%, var(--sun)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-story__lead { margin: 0 0 26px; max-width: 44ch; color: rgba(255, 255, 255, 0.78); font-size: 0.9375rem; line-height: 1.55; }

.auth-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-benefits li { display: flex; gap: 12px; align-items: flex-start; }
.auth-benefits__icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; transition: transform var(--t-med) var(--ease-out), background var(--t-med); }
.auth-benefits li:hover .auth-benefits__icon { transform: translateY(-2px) rotate(-4deg); background: color-mix(in srgb, var(--role) 45%, transparent); }
.auth-benefits__icon .cn-icon { width: 17px; height: 17px; }
.auth-benefits strong { display: block; font-weight: 600; font-size: 0.9375rem; }
.auth-benefits li > span:last-child { color: rgba(255, 255, 255, 0.72); font-size: 0.8125rem; line-height: 1.45; }

.auth-rooms { padding: 14px 16px; border-radius: 14px; background: rgba(8, 14, 44, 0.42); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(10px); }
.auth-rooms__label { margin: 0 0 10px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.66); }
.auth-rooms__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 12px; }
.auth-rooms__list li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.auth-rooms__icon { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: color-mix(in srgb, var(--room) 24%, transparent); color: var(--room); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--room) 50%, transparent); }
.auth-rooms__icon .cn-icon { width: 16px; height: 16px; }
.auth-rooms b { display: block; font-size: 0.8125rem; font-weight: 600; }
.auth-rooms small { display: block; color: rgba(255, 255, 255, 0.66); font-size: 0.6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- form side ---------- */
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: clamp(18px, 3vw, 36px) clamp(16px, 4vw, 56px) 20px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 4vh, 44px); }
.auth-top__logo img { width: auto; height: 30px; }
.auth-top__back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); color: var(--auth-muted) !important; font-size: 0.8125rem; font-weight: 500; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.auth-top__back:hover { background: #fff; color: var(--ink) !important; }
.auth-top__back .cn-icon { width: 15px; height: 15px; transition: transform var(--t-fast); }
.auth-top__back:hover .cn-icon { transform: translateX(-3px); }

.auth-card { width: 100%; max-width: 420px; margin: auto; padding: clamp(22px, 2.6vw, 32px); border-radius: 18px; background: var(--card); box-shadow: 0 1px 2px rgba(11, 19, 48, 0.04), var(--shadow-2); animation: auth-rise 700ms var(--ease-out) both 60ms; }
.auth-card--wide { max-width: 520px; }

/* role switcher */
.auth-roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0 0 22px; padding: 3px; border-radius: 11px; background: #eef1f8; }
.auth-roles__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 6px; border-radius: 8px; color: var(--auth-muted) !important; font-size: 0.75rem; font-weight: 500; text-decoration: none; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.auth-roles__item .cn-icon { width: 17px; height: 17px; transition: transform var(--t-med) var(--ease-out); }
.auth-roles__item:hover { color: var(--ink) !important; background: rgba(255, 255, 255, 0.6); }
.auth-roles__item:hover .cn-icon { transform: translateY(-2px); }
.auth-roles__item[aria-current="page"] { background: #fff; color: var(--tab) !important; font-weight: 600; box-shadow: 0 1px 3px rgba(11, 19, 48, 0.1); }

.auth-head { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.auth-head__icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: color-mix(in srgb, var(--role) 13%, #fff); color: var(--role); }
.auth-head__icon .cn-icon { width: 20px; height: 20px; }
.auth-head__title { margin: 0 0 2px; font: 700 1.3125rem/1.25 var(--auth-font); letter-spacing: -0.022em; }
.auth-head__sub { margin: 0; color: var(--auth-muted); font-size: 0.8125rem; line-height: 1.45; }

/* alerts */
.auth-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid; font-size: 0.8125rem; line-height: 1.45; animation: auth-rise 400ms var(--ease-out) both; }
.auth-alert p { margin: 0; }
.auth-alert .cn-icon { width: 16px; height: 16px; margin-top: 1px; }
.auth-alert--error { background: #fdeeee; border-color: #f6caca; color: #8f1d22; }
.auth-alert--success { background: #e9f8ef; border-color: #bde8cf; color: #11603a; }
.auth-alert--info { background: #eaf3fe; border-color: #c7defa; color: #134a8a; }

/* ---------- fields ---------- */
.auth-form { margin: 0; }
.af-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.af { grid-column: span 2; min-width: 0; }
.af--half { grid-column: span 1; }
.af__label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--ink); }
.af__optional { color: var(--auth-faint); font-weight: 400; font-size: 0.75rem; }
.af__control { position: relative; display: flex; align-items: center; min-height: 42px; border: 1px solid var(--auth-border); border-radius: 10px; background: var(--auth-field); transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); }
.af__control:hover { border-color: #c4cbdc; }
.af__control:focus-within { border-color: var(--azure); box-shadow: 0 0 0 3px rgba(8, 128, 216, 0.14); }
.af__icon { display: grid; place-items: center; padding-left: 12px; color: var(--auth-faint); transition: color var(--t-fast); }
.af__icon .cn-icon { width: 16px; height: 16px; }
.af__control:focus-within .af__icon { color: var(--azure); }
.af__prefix { padding-left: 8px; color: var(--ink); font-size: 0.875rem; font-weight: 500; }
.af__input { flex: 1; min-width: 0; width: 100%; padding: 9px 12px 9px 8px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 0.875rem; line-height: 1.4; border-radius: 10px; }
.af__input::placeholder { color: #a7aec2; }
.af--date .af__input { min-height: 40px; }
textarea.af__input { resize: vertical; min-height: 64px; line-height: 1.45; }
.af--textarea .af__control { align-items: flex-start; }
.af--textarea .af__icon { padding-top: 12px; }
select.af__input { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; }
.af__chevron { position: absolute; right: 11px; width: 16px; height: 16px; color: var(--auth-faint); pointer-events: none; transition: transform var(--t-fast); }
.af__control:focus-within .af__chevron { transform: rotate(180deg); color: var(--azure); }
.af__input:disabled { cursor: not-allowed; color: var(--auth-faint); }
.af__control:has(.af__input:disabled) { background: #f3f5fa; border-style: dashed; }
.af__input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; -webkit-text-fill-color: var(--ink); }

.af__reveal { display: grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; flex-shrink: 0; border: 0; border-radius: 7px; background: transparent; color: var(--auth-faint); cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.af__reveal .cn-icon { width: 16px; height: 16px; }
.af__reveal:hover { background: #f0f2f8; color: var(--ink); }
.af__reveal:focus-visible { outline: 2px solid var(--azure); outline-offset: 1px; }
.af__reveal .af__eye-off, .af__reveal[aria-pressed="true"] .af__eye { display: none; }
.af__reveal[aria-pressed="true"] .af__eye-off { display: block; }

.af__ok { display: grid; place-items: center; margin-right: 12px; color: var(--auth-ok); opacity: 0; transform: scale(0.4); transition: opacity var(--t-fast), transform var(--t-med) var(--ease-out); }
.af__ok .cn-icon { width: 15px; height: 15px; }
.af.is-valid .af__ok { opacity: 1; transform: none; }

.af__hint { margin: 5px 0 0; color: var(--auth-faint); font-size: 0.75rem; line-height: 1.4; }
.af__error { display: flex; align-items: center; gap: 6px; margin: 0; max-height: 0; overflow: hidden; color: var(--auth-danger); font-size: 0.75rem; font-weight: 500; line-height: 1.4; transition: max-height var(--t-med), margin var(--t-med); }
.af.is-invalid .af__error { max-height: 4em; margin-top: 5px; }
.af.is-invalid .af__control { border-color: var(--auth-danger); box-shadow: 0 0 0 3px rgba(209, 52, 58, 0.1); animation: auth-shake 360ms ease both; }
.af.is-invalid .af__icon { color: var(--auth-danger); }
@keyframes auth-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.af.is-loading .af__control::after { content: ""; position: absolute; right: 34px; width: 14px; height: 14px; border: 2px solid #c9d2e6; border-top-color: var(--azure); border-radius: 50%; animation: auth-spin 700ms linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.af__caps { display: flex; align-items: center; gap: 5px; margin: 5px 0 0; color: #a15c00; font-size: 0.75rem; font-weight: 500; }
.af__caps .cn-icon { width: 13px; height: 13px; }
.af__caps[hidden] { display: none; }

.af__meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.af__meter i { height: 4px; border-radius: 2px; background: #e6e9f2; transition: background var(--t-med); }
.af__meter[data-score="1"] i:nth-child(-n+1) { background: #e5484d; }
.af__meter[data-score="2"] i:nth-child(-n+2) { background: #f0a94e; }
.af__meter[data-score="3"] i:nth-child(-n+3) { background: #8bc34a; }
.af__meter[data-score="4"] i { background: var(--auth-ok); }
.af__meter-text { margin: 4px 0 0; min-height: 1.2em; color: var(--auth-faint); font-size: 0.75rem; }

/* checkbox row */
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 2px; font-size: 0.8125rem; }
.auth-check { display: inline-flex; align-items: center; gap: 8px; color: var(--auth-muted); cursor: pointer; user-select: none; }
.auth-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--royal); cursor: pointer; }
.auth-check--inline { grid-column: span 2; margin-top: -4px; font-size: 0.8125rem; }
.auth-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-link { font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

/* ---------- steps ---------- */
.auth-steps { list-style: none; display: flex; margin: 0 0 20px; padding: 0; counter-reset: s; }
.auth-steps__item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--auth-faint); font-size: 0.75rem; font-weight: 500; text-align: center; }
.auth-steps__item::before { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: #e3e7f0; z-index: 0; }
.auth-steps__item:first-child::before { display: none; }
.auth-steps__item.is-done::before, .auth-steps__item.is-current::before { background: var(--role); transition: background var(--t-slow); }
.auth-steps__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1.5px solid #dce1ec; color: var(--auth-muted); transition: all var(--t-med) var(--ease-out); }
.auth-steps__dot b { font-size: 0.75rem; font-weight: 600; }
.auth-steps__dot .cn-icon { display: none !important; width: 13px; height: 13px; stroke-width: 2.6; }
.auth-steps__item.is-current { color: var(--ink); font-weight: 600; }
.auth-steps__item.is-current .auth-steps__dot { border-color: var(--role); color: var(--role); box-shadow: 0 0 0 4px color-mix(in srgb, var(--role) 15%, transparent); }
.auth-steps__item.is-done .auth-steps__dot { background: var(--role); border-color: var(--role); color: #fff; }
.auth-steps__item.is-done .auth-steps__dot b { display: none; }
.auth-steps__item.is-done .auth-steps__dot .cn-icon { display: block !important; }
.auth-form:not(.is-stepped) .auth-steps { display: none; }

.auth-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.auth-step + .auth-step { margin-top: 22px; }
.auth-step__title { float: none; width: 100%; margin: 0 0 4px; padding: 0; font: 600 0.9375rem/1.35 var(--auth-font); letter-spacing: -0.01em; }
.auth-step__lead { margin: 0 0 14px; color: var(--auth-muted); font-size: 0.8125rem; line-height: 1.45; }
.auth-step__title + .af-grid { margin-top: 12px; }
.auth-form.is-stepped .auth-step + .auth-step { margin-top: 0; }
.auth-form.is-stepped .auth-step:not(.is-current) { display: none; }
.auth-form.is-stepped .auth-step.is-current { animation: auth-step-in 420ms var(--ease-out) both; }
.auth-form.is-stepped.is-back .auth-step.is-current { animation-name: auth-step-back; }
@keyframes auth-step-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes auth-step-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.auth-actions { display: flex; gap: 10px; margin-top: 20px; }
.auth-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px; font: 600 0.875rem/1 var(--auth-font); letter-spacing: -0.005em; text-decoration: none; cursor: pointer; transition: transform var(--t-fast), box-shadow var(--t-med), background var(--t-med), opacity var(--t-fast); }
.auth-btn .cn-icon { width: 16px; height: 16px; transition: transform var(--t-med) var(--ease-out); }
.auth-btn--primary { flex: 1; color: #fff !important; background: linear-gradient(135deg, var(--royal) 0%, var(--azure) 100%); box-shadow: 0 1px 2px rgba(11, 19, 48, 0.12), 0 6px 16px rgba(27, 42, 156, 0.22); }
.auth-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(11, 19, 48, 0.12), 0 10px 22px rgba(27, 42, 156, 0.28); }
.auth-btn--primary:hover .cn-icon { transform: translateX(3px); }
.auth-btn--primary:active { transform: translateY(1px); }
.auth-btn--ghost { color: var(--ink) !important; background: #eef1f8; }
.auth-btn--ghost:hover { background: #e3e8f3; }
.auth-btn--ghost:hover .cn-icon { transform: translateX(-3px); }
.auth-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--azure) 55%, transparent); outline-offset: 2px; }
.auth-btn__spin { display: none; width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: auth-spin 700ms linear infinite; }
.auth-btn.is-loading { pointer-events: none; opacity: 0.92; }
.auth-btn.is-loading .auth-btn__spin { display: block; }
.auth-btn.is-loading .cn-icon { display: none; }
.auth-btn .auth-btn__spin { display: none; }
.auth-btn.is-loading .auth-btn__spin { display: block; }
.auth-form.is-stepped [data-submit], .auth-form.is-stepped [data-next] { display: none; }
.auth-form.is-stepped:not(.is-last) [data-next], .auth-form.is-stepped.is-last [data-submit] { display: inline-flex; }
.auth-form.is-stepped.is-first [data-back] { display: none; }
.auth-form:not(.is-stepped) [data-back], .auth-form:not(.is-stepped) [data-next] { display: none; }

.auth-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; color: var(--auth-faint); font-size: 0.75rem; text-align: center; }
.auth-note .cn-icon { width: 14px; height: 14px; color: var(--auth-ok); }

.auth-switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--auth-muted); text-align: center; font-size: 0.8125rem; }
.auth-switch a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.auth-switch .cn-icon { width: 14px; height: 14px; transition: transform var(--t-fast); }
.auth-switch a:hover .cn-icon { transform: translateX(3px); }

.auth-foot { margin-top: 22px; text-align: center; color: var(--auth-faint); font-size: 0.75rem; }
.auth-foot p { margin: 0; }

/* ---------- success state (AJAX signups) ---------- */
.auth-done { text-align: center; outline: 0; animation: auth-rise 600ms var(--ease-out) both; }
.auth-done__badge { position: relative; display: grid; place-items: center; width: 60px; height: 60px; margin: 4px auto 16px; border-radius: 50%; background: var(--auth-ok); color: #fff; animation: auth-pop 700ms var(--ease-out) both 120ms; }
.auth-done__badge::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--auth-ok); opacity: 0; animation: auth-ring 1600ms ease-out 500ms infinite; }
.auth-done__badge .cn-icon { width: 28px; height: 28px; stroke-width: 2.6; }
@keyframes auth-pop { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: none; } }
@keyframes auth-ring { 0% { transform: scale(0.85); opacity: 0.7; } 100% { transform: scale(1.35); opacity: 0; } }
.auth-done__title { margin: 0 0 6px; font: 700 1.3125rem/1.25 var(--auth-font); letter-spacing: -0.022em; }
.auth-done__msg { margin: 0 auto 18px; max-width: 40ch; color: var(--auth-muted); font-size: 0.875rem; }
.auth-done__next { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; text-align: left; }
.auth-done__next li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: #f4f6fb; font-size: 0.8125rem; }
.auth-done__next li span { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 7px; background: color-mix(in srgb, var(--role) 14%, #fff); color: var(--role); }
.auth-done__next .cn-icon { width: 15px; height: 15px; }
.auth-done__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-done__actions .auth-btn { flex: 1 1 160px; }

/* ---------- tablet & phone ---------- */
@media (max-width: 991.98px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { position: relative; height: auto; }
  .auth-story__inner { height: auto; gap: 18px; padding: 26px 20px 64px; overflow: visible; }
  .auth-story__title { max-width: 22ch; font-size: clamp(1.375rem, 4.6vw, 1.875rem); margin-bottom: 8px; }
  .auth-story__lead { margin-bottom: 0; font-size: 0.875rem; }
  .auth-eyebrow { margin-bottom: 12px; }
  .auth-benefits { display: none; }
  .auth-rooms { padding: 0; background: none; border: 0; backdrop-filter: none; }
  .auth-rooms__label { display: none; }
  .auth-rooms__list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
  .auth-main { position: relative; z-index: 1; margin-top: -40px; padding-top: 0; }
  .auth-top { order: 2; justify-content: center; margin: 18px 0 0; }
  .auth-top__logo { display: none; }
  .auth-foot { order: 3; }
  .auth-story__brand { display: inline-flex; align-self: flex-start; padding: 7px 12px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-1); }
  .auth-story__brand img { width: auto; height: 22px; }
  .auth-card { margin: 0 auto; }
  .auth-foot { margin-top: 12px; }
}
@media (max-width: 575.98px) {
  .auth-main { padding-left: 12px; padding-right: 12px; }
  .auth-card { padding: 20px 16px 22px; border-radius: 16px; }
  .auth-story__inner { padding: 22px 16px 60px; }
  .auth-story__lead { display: none; }
  .auth-rooms__list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .auth-rooms__icon { width: 26px; height: 26px; border-radius: 7px; }
  .auth-rooms__icon .cn-icon { width: 14px; height: 14px; }
  .auth-rooms small { display: none; }
  .af--half { grid-column: span 2; }
  .auth-roles__item { font-size: 0.6875rem; }
  .af__input { font-size: 16px; }   /* below 16px, iOS zooms the page on focus */
  .auth-head { gap: 12px; }
  .auth-head__icon { width: 36px; height: 36px; border-radius: 9px; }
  .auth-head__title { font-size: 1.1875rem; }
  .auth-steps__label { display: none; }
  .auth-steps__item.is-current .auth-steps__label { display: block; }
  .auth-actions { flex-wrap: wrap-reverse; }
  .auth-actions .auth-btn--ghost { flex: 0 0 auto; padding: 0 16px; }
  .auth-btn { min-height: 44px; }
}
