/* Supersei sign-in (login.html, login/complete/). A focused page: no marketing
   nav or footer, form on canvas, one dark band panel on desktop.
   Keeps the hooks the inline login script reads: #login-msg + .dash-msg-err/ok,
   .dash-tab.is-active, #step-identify / #step-verify / #password-field. */
html, body { min-height: 100%; }
body { font-size: 17px; line-height: 28px; }
a { color: inherit; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: var(--z-toast); padding: 10px 16px; border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-float); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.auth__band :focus-visible { outline-color: var(--focus-band); }

.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth--solo { grid-template-columns: 1fr; }

/* ---------- Form pane ---------- */
.auth__main { display: flex; flex-direction: column; min-width: 0; padding: 24px clamp(16px, 4vw, 48px); }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth__logo { display: inline-flex; }
.auth__logo img { height: 32px; width: auto; display: block; }
.auth__top-actions { display: flex; align-items: center; gap: 16px; }
.auth__home { font-size: 14px; }
.auth__home .ss-icon { transition: transform var(--dur-fast) var(--ease-out); }
.auth__home:hover .ss-icon { transform: translateX(-3px); }
[dir="rtl"] .auth__home .ss-icon { transform: scaleX(-1); }

.auth__body { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-8) 0; }
.auth__card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 20px; }
.auth__card > * { margin: 0; }
.auth__eyebrow { color: var(--brand-text); margin-bottom: -8px; }
.auth__title { color: var(--text-primary); text-wrap: balance; }
.auth__sub { color: var(--text-secondary); margin-top: -8px; }

.auth__seg { display: flex; width: 100%; }
.auth__seg .ss-seg__opt { flex: 1; justify-content: center; }
.auth__seg .dash-tab.is-active { background: var(--surface); color: var(--text-primary); box-shadow: var(--shadow-raised); }

/* the method tabs only matter before a code is sent */
.auth__card:has(#step-verify:not([style*="none"])) #login-tabs { display: none; }
.auth__step { display: flex; flex-direction: column; gap: 16px; }
/* the script shows/hides with inline display:block|none; keep the flex layout when shown */
.auth__step:not([style*="none"]), #password-field:not([style*="none"]) { display: flex !important; }
.auth__code { font: 500 22px/1 var(--font-mono); letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.auth__hint { color: var(--text-secondary); padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface-sunk); }
.auth__help { color: var(--text-tertiary); text-align: center; }
#verify-back { color: var(--text-secondary); }

/* status line written by the login script */
.dash-msg { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 15px; line-height: 22px; }
.dash-msg::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; background: currentColor; -webkit-mask: var(--msg-icon) center / contain no-repeat; mask: var(--msg-icon) center / contain no-repeat; }
.dash-msg-err { --msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E"); color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.dash-msg-ok { --msg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); color: var(--ok); background: var(--brand-tint); }
.dash-msg:not([style*="none"]) { display: flex !important; }

.auth__alt { display: flex; flex-direction: column; gap: 16px; }
.auth__or { display: flex; align-items: center; gap: 12px; color: var(--text-tertiary); }
.auth__or::before, .auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth__google { gap: 10px; }
.auth__foot { color: var(--text-secondary); text-align: center; }
.auth__foot + .auth__foot { margin-top: -12px; }
.auth__foot .ss-link { font-size: inherit; }
#crm-link-hint a { color: var(--brand-text); }

.ss-btn:disabled { opacity: .55; cursor: progress; }

.auth__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; color: var(--text-tertiary); }
.auth__legal a { text-decoration: none; }
.auth__legal a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Band panel (the one dark band on this page) ---------- */
.auth__band { position: relative; overflow: hidden; margin: 12px; border-radius: var(--radius-xl); background: var(--band); color: var(--on-band-muted); display: flex; align-items: flex-end; }
.auth__field { position: absolute; inset: 0; pointer-events: none; color: #94A3B8; opacity: .3; }
.auth__field svg { position: absolute; inset-inline-end: -60px; top: -40px; width: min(640px, 110%); height: auto; }
.auth__band-inner { position: relative; display: flex; flex-direction: column; gap: 24px; padding: clamp(32px, 5vw, 64px); max-width: 560px; }
.auth__band-inner > * { margin: 0; }
.auth__band-eyebrow { color: var(--focus-band); }
.auth__band-title { color: var(--on-band); text-wrap: balance; }
.auth__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.auth__list li { display: flex; gap: 14px; }
.auth__list .ss-icon { color: var(--focus-band); margin-top: 3px; }
.auth__list strong { display: block; color: var(--on-band); font-weight: 600; }
.auth__list span { font-size: 15px; line-height: 24px; }
.auth__band-note { padding-top: 20px; border-top: 1px solid var(--line-band); }
.auth__band-note a { color: var(--on-band); }

@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth__band { display: none; }
}
@media (max-width: 560px) {
  .auth__main { padding: 16px; }
  .auth__body { align-items: flex-start; padding: var(--space-7) 0; }
  .auth__home span, .auth__home { font-size: 13px; }
}

/* ---------- OAuth completion screen (login/complete/) ---------- */
.auth__status { align-items: center; text-align: center; }
.auth__spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth__spinner { animation-duration: 2.4s; } }
