/**
 * Noir Auth — native-app-styled signup / complete-profile flow.
 * Self-contained dark theme mirroring apps/mobile theme.ts so the web flow
 * looks and feels like the React Native app (welcome → identity → register).
 */

.noir-signup {
  /* Native app tokens — scoped so they never leak into the rest of the site */
  --ns-ink:    #1c1712;
  --ns-ink2:   #251e17;
  --ns-paper:  #f4f0e8;
  --ns-paper2: #d8cfc2;
  --ns-muted:  #8a7f72;
  --ns-orange: #cb360f;
  --ns-line:   #3a322a;
  --ns-error:  #c45c6a;
  --ns-radius-md: 14px;
  --ns-radius-lg: 20px;
  --ns-radius-pill: 999px;

  position: relative;
  min-height: 100vh;
  margin: 0;
  background: var(--ns-ink);
  color: var(--ns-paper);
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Neutralise any theme container padding/max-width that would box the dark bg */
.noir-signup * { box-sizing: border-box; }

.noir-signup__viewport {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Steps ── */
.noir-step { display: none; animation: noir-fade .28s ease; }
.noir-step.is-active { display: flex; flex-direction: column; flex: 1; }
@keyframes noir-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Brand ── */
.noir-brand-row { display: flex; align-items: flex-end; gap: 10px; }
.noir-wordmark {
  font-family: 'Roboto Slab', serif;
  font-weight: 700; font-size: 56px; letter-spacing: 8px; line-height: 1;
  color: var(--ns-paper);
}
.noir-badge {
  background: var(--ns-orange); border-radius: 8px;
  padding: 3px 6px; margin-bottom: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--ns-paper);
}
.noir-mark {
  font-family: 'Roboto Slab', serif; font-weight: 700; font-size: 34px;
  color: var(--ns-paper); line-height: 1;
}
.noir-mark .dot { color: var(--ns-orange); }

/* ── Welcome hero ── */
.noir-welcome { flex: 1; justify-content: space-between; }
.noir-welcome__top { flex: 2; justify-content: flex-end; display: flex; flex-direction: column; padding-bottom: 24px; }
.noir-welcome__platform { color: var(--ns-muted); font-size: 15px; margin-top: 10px; letter-spacing: .3px; }
.noir-welcome__mid { flex: 1; justify-content: center; display: flex; flex-direction: column; gap: 20px; }
.noir-divider { height: 1px; background: var(--ns-line); }
.noir-tagline { color: var(--ns-paper2); font-size: 22px; font-weight: 300; line-height: 34px; letter-spacing: .4px; }
.noir-welcome__bottom { flex: 1.2; justify-content: flex-end; display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }

/* ── Headings ── */
.noir-h1 { font-family: 'Roboto Slab', serif; font-weight: 700; font-size: 30px; letter-spacing: .3px; margin: 0 0 8px; color: var(--ns-paper); }
.noir-sub { color: var(--ns-muted); font-size: 14px; line-height: 20px; margin: 0; }
.noir-sub .roles { color: var(--ns-orange); font-weight: 600; text-transform: capitalize; }

/* ── Back link ── */
.noir-back { background: none; border: 0; color: var(--ns-muted); font-size: 15px; font-weight: 500; cursor: pointer; padding: 0; margin-bottom: 20px; align-self: flex-start; }
.noir-back:hover { color: var(--ns-paper2); }

/* ── Identity grid ── */
.noir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.noir-card {
  position: relative; background: var(--ns-ink2);
  border: 1.5px solid var(--ns-line); border-radius: var(--ns-radius-lg);
  padding: 16px; min-height: 148px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; transition: border-color .15s, background .15s; text-align: left;
}
.noir-card:hover { border-color: #5a4d3e; }
.noir-card.is-selected { border-color: var(--ns-orange); background: #2e1a10; }
.noir-card__check {
  position: absolute; top: 12px; right: 12px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--ns-line); background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: transparent;
}
.noir-card.is-selected .noir-card__check { background: var(--ns-orange); border-color: var(--ns-orange); color: var(--ns-paper); }
.noir-card__emoji { font-size: 32px; margin-bottom: 10px; }
.noir-card__label { font-size: 16px; font-weight: 700; color: var(--ns-paper2); margin-bottom: 4px; letter-spacing: .2px; }
.noir-card.is-selected .noir-card__label { color: var(--ns-paper); }
.noir-card__sub { font-size: 12px; line-height: 17px; color: var(--ns-muted); }
.noir-hint { color: var(--ns-muted); font-size: 12px; text-align: center; margin-top: 20px; opacity: .75; }

/* ── Fields ── */
.noir-field { margin-bottom: 20px; }
.noir-label { display: block; color: var(--ns-paper2); font-size: 13px; font-weight: 600; margin-bottom: 8px; letter-spacing: .4px; text-transform: uppercase; }
.noir-label .opt { color: var(--ns-muted); font-weight: 400; text-transform: none; }
.noir-input {
  width: 100%; background: var(--ns-ink2);
  border: 1.5px solid var(--ns-line); border-radius: var(--ns-radius-md);
  padding: 15px 16px; color: var(--ns-paper); font-size: 16px;
  transition: border-color .15s; font-family: inherit;
}
.noir-input::placeholder { color: var(--ns-muted); }
.noir-input:focus { outline: none; border-color: var(--ns-orange); }
.noir-input.has-error { border-color: var(--ns-error); }
select.noir-input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238a7f72' d='M1 1l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
textarea.noir-input { resize: vertical; min-height: 88px; line-height: 1.5; }

/* phone with +233 prefix */
.noir-input-group { display: flex; align-items: center; background: var(--ns-ink2); border: 1.5px solid var(--ns-line); border-radius: var(--ns-radius-md); padding: 0 16px; transition: border-color .15s; }
.noir-input-group:focus-within { border-color: var(--ns-orange); }
.noir-input-group.has-error { border-color: var(--ns-error); }
.noir-phone-prefix { display: flex; align-items: center; gap: 6px; padding-right: 10px; }
.noir-phone-prefix .flag { font-size: 20px; }
.noir-phone-prefix .code { color: var(--ns-paper2); font-size: 15px; font-weight: 600; }
.noir-phone-prefix .pipe { width: 1px; height: 20px; background: var(--ns-line); margin-left: 4px; }
.noir-input-bare { flex: 1; background: none; border: 0; padding: 15px 0; color: var(--ns-paper); font-size: 16px; font-family: inherit; }
.noir-input-bare:focus { outline: none; }
.noir-input-bare::placeholder { color: var(--ns-muted); }

/* password eye */
.noir-pw-wrap { position: relative; }
.noir-pw-wrap .noir-input { padding-right: 48px; }
.noir-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 18px; padding: 8px; line-height: 1; }

.noir-error-text { color: var(--ns-error); font-size: 12px; margin-top: 5px; font-weight: 500; }

/* ── Terms checkbox ── */
.noir-terms { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 24px; cursor: pointer; }
.noir-checkbox { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--ns-line); background: var(--ns-ink2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; color: transparent; font-size: 12px; font-weight: 700; }
.noir-terms.is-checked .noir-checkbox { background: var(--ns-orange); border-color: var(--ns-orange); color: var(--ns-paper); }
.noir-terms__text { color: var(--ns-muted); font-size: 14px; line-height: 20px; }
.noir-terms__text a, .noir-link-inline { color: var(--ns-paper2); text-decoration: underline; }

/* ── Buttons ── */
.noir-btn-primary { width: 100%; background: var(--ns-orange); border: 0; border-radius: var(--ns-radius-pill); padding: 17px; color: var(--ns-paper); font-size: 16px; font-weight: 700; letter-spacing: .5px; cursor: pointer; font-family: inherit; transition: opacity .15s; }
.noir-btn-primary:hover { opacity: .92; }
.noir-btn-primary:disabled { opacity: .55; cursor: default; }
.noir-btn-ghost { width: 100%; background: transparent; border: 1.5px solid var(--ns-paper); border-radius: var(--ns-radius-pill); padding: 16px; color: var(--ns-paper); font-size: 16px; font-weight: 500; cursor: pointer; font-family: inherit; }
.noir-btn-ghost:hover { background: rgba(244,240,232,.06); }
.noir-btn-text { background: none; border: 0; color: var(--ns-muted); font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; padding: 12px; }
.noir-btn-text:hover { color: var(--ns-paper2); }

.noir-legal { color: var(--ns-muted); font-size: 12px; text-align: center; margin-top: 4px; line-height: 18px; }
.noir-legal a { color: var(--ns-paper2); text-decoration: underline; }

/* ── Footer / sticky CTA ── */
.noir-cta-spacer { flex: 1; }
.noir-cta { margin-top: 24px; }
.noir-login-row { display: flex; justify-content: center; gap: 6px; margin-top: 20px; font-size: 14px; }
.noir-login-row .muted { color: var(--ns-muted); }
.noir-login-row a { color: var(--ns-orange); font-weight: 600; text-decoration: none; }

/* ── Banner (top-level error) ── */
.noir-banner { background: rgba(196,92,106,.12); border: 1px solid var(--ns-error); color: #e6a3ad; padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 18px; display: none; }
.noir-banner.is-visible { display: block; }

/* ── Multi-select chips (skills/days) ── */
.noir-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.noir-chip { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: var(--ns-radius-pill); border: 1.5px solid var(--ns-line); background: var(--ns-ink2); color: var(--ns-paper2); font-size: 13px; cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.noir-chip.is-on { border-color: var(--ns-orange); background: #2e1a10; color: var(--ns-paper); }
.noir-chip input { display: none; }

/* small spinner */
.noir-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(244,240,232,.4); border-top-color: var(--ns-paper); border-radius: 50%; animation: noir-rot .7s linear infinite; vertical-align: middle; }
@keyframes noir-rot { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  .noir-wordmark { font-size: 46px; letter-spacing: 6px; }
}
