/* Auth pages (sign-up + login) — premium white, TWKLausanne. Shared by register.ejs + login.ejs
   (both layout:false), linked as a static stylesheet so the served HTML source stays clean (no
   inline <style> blob). Page-specific bits are gated by the body class (auth-register / auth-login). */

@font-face { font-family: "TWKLausanne"; src: url("/fonts/TWKLausanne-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TWKLausanne"; src: url("/fonts/TWKLausanne-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "TWKLausanne"; src: url("/fonts/TWKLausanne-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "TWKLausanne"; src: url("/fonts/TWKLausanne-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

.auth-page * { margin: 0; padding: 0; box-sizing: border-box; }
.auth-page {
  --ink: #0b0b0c; --muted: rgba(0, 0, 0, 0.58); --faint: rgba(0, 0, 0, 0.4);
  --line: rgba(0,0,0,0.10); --line-strong: rgba(0,0,0,0.16);
  --field: #fbfbfc; --accent: #0b0b0c;
  --font: "TWKLausanne", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* border-box + margin:0 keep min-height:100vh from overflowing by its own padding / the default
     body margin (which caused a phantom scrollbar). touch-action: manipulation kills double-tap zoom
     (pinch is also disabled via the viewport meta). */
  box-sizing: border-box; margin: 0; overflow-x: hidden; touch-action: manipulation;
  font-family: var(--font); background: #ffffff; color: var(--ink); min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center; padding: 56px 20px 40px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Login centres its column vertically; the register WIZARD now centres too (each step is short).
   Extra bottom padding leaves room for the fixed progress dots. */
.auth-login { flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-register { align-items: center; padding: 40px 20px 84px; }
/* Centred headings + subtext for the wizard (fields/labels stay left for legibility). Balanced
   rhythm: more air under the heading, a slightly larger subhead in a tidy centred column, and a
   clear gap before the step content. */
.auth-register .wiz-step h1 { text-align: center; margin-bottom: 14px; }
.auth-register .wiz-step .sub {
  text-align: center; font-size: 15px; line-height: 1.6; color: var(--muted);
  max-width: 380px; margin: 0 auto 34px;
}

.card { position: relative; width: 100%; max-width: 440px; }
.auth-login .card { max-width: 400px; }
h1 { font-size: 27px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 9px; }
.sub { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-bottom: 26px; }
.auth-login .sub { margin-bottom: 28px; }

label.lbl { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 16px 0 6px; }
.opt { color: var(--faint); font-weight: 400; }
.field, select.field {
  width: 100%; background: var(--field); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 13px 15px; color: var(--ink); font-family: var(--font); font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none; appearance: none;
}
select.field { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b9ba1' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(11,11,12,0.07); }

/* Account-type segmented control (register) */
.seg { display: flex; gap: 10px; margin-bottom: 4px; }
.seg button { flex: 1; background: #fff; border: 1px solid var(--line-strong); color: var(--muted);
  border-radius: 12px; padding: 13px 10px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; align-items: center; transition: all .15s ease; }
.seg button .sm { font-size: 11.5px; font-weight: 400; color: var(--faint); }
.seg button.on { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(11,11,12,0.18); }
.seg button.on .sm { color: rgba(255,255,255,0.6); }

.btn { border: none; border-radius: 12px; font-family: var(--font); font-size: 15px; font-weight: 600; padding: 16px 18px;
  cursor: pointer; transition: transform .12s ease, opacity .15s ease, box-shadow .15s ease; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(11,11,12,0.20); }
.auth-register .btn-primary { margin-top: 24px; }
.auth-login .btn-primary { margin-top: 26px; }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(11,11,12,0.28); }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Acceptance block (register) */
.accept { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.chk { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 14px; font-size: 13px; line-height: 1.55;
  color: var(--muted); cursor: pointer; }
.chk input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--ink); cursor: pointer; }
.chk a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.chk.marketing { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--faint); }

.under18 { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.under18 a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.block-msg { display: none; margin-top: 14px; padding: 13px 15px; border-radius: 12px;
  background: #fff5f5; border: 1px solid rgba(214,69,69,0.28); color: #b23b3b; font-size: 13px; line-height: 1.55; }

/* Login-only: remember row + split page footer */
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.remember { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.remember input { width: 17px; height: 17px; accent-color: var(--ink); cursor: pointer; }
.row a { color: var(--muted); font-size: 13.5px; text-decoration: underline; text-underline-offset: 2px; }
.row a:hover { color: var(--ink); }
.pagefoot { margin-top: 40px; width: 100%; max-width: 400px; color: var(--faint); font-size: 12.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pagefoot-links { display: flex; gap: 16px; }
.pagefoot a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pagefoot a:hover { color: var(--muted); }

.error { color: #c0392b; font-size: 13.5px; min-height: 18px; margin-top: 14px; }
.auth-login .error { margin: 0 0 22px; min-height: 0; padding: 13px 15px; border-radius: 12px;
  background: #fff5f5; border: 1px solid rgba(214,69,69,0.28); color: #b23b3b; line-height: 1.5; }
.foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 26px; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.hidden { display: none !important; }

/* Legal modal — the frosted pop-up the fan pages use, loading the doc at smaller text (embed). */
.legal-scrim {
  position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box; background: rgba(0,0,0,0.62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.legal-scrim.open { display: flex; }
.legal-card {
  position: relative; width: min(720px, 96vw); height: min(86vh, 900px);
  background: rgba(20,20,20,0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  overflow: hidden; display: flex; flex-direction: column;
}
.legal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08); }
.legal-tabs { display: flex; gap: 8px; flex: 1; }
.legal-tab { appearance: none; border: none; cursor: pointer; padding: 7px 15px; border-radius: 999px;
  font-family: var(--font); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); transition: background .15s ease, color .15s ease; }
.legal-tab.on { background: rgba(255,255,255,0.92); color: #111; }
.legal-open { color: rgba(255,255,255,0.55); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.legal-open:hover { color: #fff; }
.legal-close { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease, color .15s ease; }
.legal-close:hover { background: rgba(0,0,0,0.6); color: #fff; }
.legal-frame { flex: 1; min-height: 0; width: 100%; border: none; background: transparent; display: block; }

/* ── Multi-step sign-up wizard (auth-register) ─────────────────────────────── */
/* Both the back button and the dots position themselves (fixed), so the top slot reserves no space. */
.wiz-top { min-height: 0; margin: 0; }
/* Back — pinned to the top-left of the page (a persistent nav affordance; swipe-right also goes back). */
.wiz-back { position: fixed; top: 22px; left: 22px; z-index: 6;
  display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--font); font-size: 13.5px; font-weight: 500; padding: 6px 8px 6px 4px; }
.wiz-back:hover { color: var(--ink); }
.wiz-back[hidden] { display: none; }
/* Dots pinned to the bottom-centre of the viewport (out of the card flow). The active step is an
   elongated pill — echoing the app's two-dot loader ("loudlink slider language"): as you advance,
   the previous pill contracts to a dot while the next grows, so the marker reads as travelling.
   Same easing as the loader (cubic-bezier(0.5,0,0.3,1)). */
.wiz-progress { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; z-index: 5; }
.wiz-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--line-strong);
  transition: width .4s cubic-bezier(0.5,0,0.3,1), background-color .4s cubic-bezier(0.5,0,0.3,1); }
.wiz-dot.done { background: rgba(11,11,12,0.4); }
.wiz-dot.on { width: 26px; background: var(--ink); }

/* Step panels — only the active one shows; a soft rise-in for momentum. */
.wiz-step { display: none; }
.wiz-step.is-active { display: block; animation: wizIn .32s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes wizIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.wiz-step > .btn-primary, .wiz-step .accept + .btn-primary { width: 100%; margin-top: 26px; }
.wiz-step .btn.wiz-next { width: 100%; margin-top: 26px; }

/* Step 1 — big tappable choice cards */
.choice { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.choice-card { display: flex; align-items: center; gap: 15px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 16px; padding: 17px 18px; cursor: pointer;
  font-family: var(--font); transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease; }
.choice-card:hover { border-color: var(--ink); box-shadow: 0 8px 26px rgba(11,11,12,0.10); transform: translateY(-1px); }
.choice-card:active { transform: scale(.995); }
.choice-card.is-picked { border-color: var(--ink); }
.choice-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; background: #f3f3f4; color: var(--ink); }
.choice-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.choice-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.choice-sub { font-size: 13px; color: var(--faint); }
.choice-go { flex: 0 0 auto; color: var(--faint); font-size: 18px; transition: transform .15s ease, color .15s ease; }
.choice-card:hover .choice-go { transform: translateX(3px); color: var(--ink); }

/* Optional-field reveal link (company number / trading name) */
.link-add { background: none; border: none; cursor: pointer; font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--muted); text-decoration: underline; text-underline-offset: 2px; padding: 14px 0 2px; display: inline-block; }
.link-add:hover { color: var(--ink); }
.link-add.hidden { display: none !important; }

/* "Already registered" soft notice (org name step) */
.wiz-note { margin-top: 11px; font-size: 12.5px; line-height: 1.5; color: var(--muted);
  background: #f6f6f7; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.wiz-note a { color: var(--ink); }

/* Demo-artist picker — three rounded cards (circular artwork + name) */
.artist-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.artist-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 16px; padding: 12px 16px; cursor: pointer;
  font-family: var(--font); transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease; }
.artist-card:hover { border-color: var(--ink); box-shadow: 0 8px 26px rgba(11,11,12,0.10); transform: translateY(-1px); }
.artist-card.is-picked { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.artist-card-img { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: #ececed;
  background-size: cover; background-position: center; }
.artist-card-name { font-size: 15.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-skip { text-align: center; display: block; margin: 20px auto 0; }

/* Live password-match feedback */
.pw-match { margin-top: 10px; font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.pw-match.is-ok { color: #1a7f37; }
.pw-match.is-bad { color: #c0392b; }

/* Search dropdown (artist search / label search on the entity step) */
.ac-wrap { position: relative; }
.ac-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden;
  box-shadow: 0 12px 34px rgba(11,11,12,0.14); max-height: 288px; overflow-y: auto; }
.ac-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff;
  border: none; border-bottom: 1px solid var(--line); padding: 10px 14px; cursor: pointer; font-family: var(--font); }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: #f5f5f6; }
.ac-img { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #ececed;
  background-size: cover; background-position: center; }
.ac-name { font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-meta { margin-left: auto; padding-left: 12px; font-size: 12px; color: var(--faint); white-space: nowrap; flex: 0 0 auto; }
.ac-hint { margin-top: 8px; font-size: 12px; color: var(--faint); }
.ac-skip { background: none; border: none; cursor: pointer; font-family: var(--font); font-size: 12px; font-weight: 500;
  color: var(--muted); text-decoration: underline; text-underline-offset: 2px; padding: 0 0 0 4px; }
.ac-skip:hover { color: var(--ink); }

/* Selected-artist confirmation avatar, right-aligned inside the field */
.ac-avatar { position: absolute; top: 50%; right: 9px; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: #ececed;
  background-size: cover; background-position: center; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.field.has-avatar { padding-right: 50px; }

/* In-field "passwords match" green check */
.pw-check { position: absolute; top: 50%; right: 13px; transform: translateY(-50%);
  color: #1a7f37; display: inline-flex; align-items: center; pointer-events: none; }
.field.has-check { padding-right: 42px; }

/* Company favicon (management/label search results) — favicon on a white circle, globe fallback */
.ac-fav { background-color: #fff; background-size: 20px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.ac-globe { background: #ececed no-repeat center/18px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.6'><circle cx='12' cy='12' r='9'/><path d='M3 12h18M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18'/></svg>"); }
