@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Inter:wght@400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --dark-bg:         #1a1108;
  --dark-hero:       #1c1208;
  --dark-card:       #221508;
  --dark-border:     rgba(255,255,255,0.08);
  --dark-border-h:   rgba(255,255,255,0.16);

  --light-bg:        #f5f2ee;
  --light-card:      #ffffff;
  --light-border:    #e8e2d9;
  --light-text:      #1a1108;
  --light-muted:     #7a7060;
  --light-input-bg:  #faf8f5;

  --orange:          #e85c00;
  --orange-dark:     #c44e00;
  --orange-light:    rgba(232,92,0,0.10);
  --orange-glow:     rgba(232,92,0,0.20);
  --orange-border:   rgba(232,92,0,0.35);

  --text:            #f5ede0;
  --text-muted:      #9a8a76;
  --text-dim:        #5a4e40;

  --success:         #22c55e;
  --success-bg:      rgba(34,197,94,0.08);
  --success-border:  rgba(34,197,94,0.25);

  --danger:          #ef4444;

  --font-display:    'Syne', system-ui, sans-serif;
  --font-body:       'Inter', system-ui, sans-serif;

  --radius-s:   6px;
  --radius-m:   10px;
  --radius-l:   16px;
  --radius-xl:  22px;
  --radius-full: 9999px;

  --transition:      0.18s ease;
  --shadow-orange:   0 6px 24px rgba(232,92,0,0.35);
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; }
body  {
  background: var(--dark-bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a      { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── Nav ────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--dark-bg);
  border-bottom: 1px solid var(--dark-border);
  height: 58px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1rem;
  color: var(--text); letter-spacing: -0.01em;
}
.nav-logo__icon { width: 20px; height: 20px; color: var(--orange); flex-shrink: 0; }

.nav-login { font-size: 0.82rem; color: var(--text-muted); transition: color var(--transition); }
.nav-login span { color: var(--orange); font-weight: 600; }
.nav-login:hover { color: var(--text); }

/* ── Page layout ────────────────────────────────────── */
.page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 58px);
}

/* ── Left panel ─────────────────────────────────────── */
.panel--left {
  position: relative;
  overflow: hidden;
  background: var(--dark-hero);
  border-right: 1px solid var(--dark-border);
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel__glow {
  position: absolute;
  bottom: -120px; right: -80px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 65%);
  pointer-events: none;
}

.panel__content { position: relative; z-index: 1; max-width: 420px; }

.panel__badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.75rem; font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--dark-border-h);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.04);
  margin-bottom: 2rem;
}
.panel__badge svg { color: var(--orange); }

.panel__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}
.panel__title em { color: var(--orange); font-style: italic; }

.panel__sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.panel__perks { display: flex; flex-direction: column; gap: 1.25rem; }

.perk { display: flex; align-items: flex-start; gap: 0.9rem; }

.perk__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
  width: 38px; height: 38px;
  background: var(--orange-light);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-m);
  display: flex; align-items: center; justify-content: center;
}

.perk strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.perk p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ── Right panel ────────────────────────────────────── */
.panel--right {
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.form-wrap { width: 100%; max-width: 440px; }

.form-header { margin-bottom: 1.75rem; }

.form-header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--light-text);
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.form-header__sub { font-size: 0.875rem; color: var(--light-muted); }

/* ── Progress steps ─────────────────────────────────── */
.progress-steps {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.progress-step__dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--light-border);
  background: var(--light-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
  color: var(--light-muted);
  transition: all 0.25s ease;
}

.progress-step.is-active .progress-step__dot {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(232,92,0,0.15);
}

.progress-step.is-done .progress-step__dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  font-size: 0;
}

.progress-step.is-done .progress-step__dot::after {
  content: '✓';
  font-size: 0.75rem;
}

.progress-step__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--light-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-step.is-active .progress-step__label { color: var(--orange); }
.progress-step.is-done   .progress-step__label { color: var(--success); }

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--light-border);
  margin: 0 6px;
  margin-bottom: 18px;
  border-radius: 2px;
  transition: background 0.3s;
}

.progress-line.is-done { background: var(--success); }

/* ── Form steps ─────────────────────────────────────── */
.form-step { display: none; animation: stepIn 0.3s ease both; }
.form-step.is-active { display: block; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--light-muted);
  margin-bottom: 1rem;
}

/* ── Role cards ─────────────────────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.role-card { display: block; cursor: pointer; }
.role-card input[type="radio"] { display: none; }

.role-card__inner {
  position: relative;
  background: var(--light-card);
  border: 2px solid var(--light-border);
  border-radius: var(--radius-l);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.role-card__inner:hover {
  border-color: var(--orange);
  background: #fffaf6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,92,0,0.1);
}

.role-card input:checked + .role-card__inner {
  border-color: var(--orange);
  background: #fff8f3;
  box-shadow: 0 0 0 4px rgba(232,92,0,0.1), 0 6px 20px rgba(232,92,0,0.12);
}

.role-card__check {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--light-border);
  color: transparent;
  font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  transition: all 0.2s;
}

.role-card input:checked + .role-card__inner .role-card__check {
  background: var(--orange);
  color: #fff;
}

.role-card__icon  { font-size: 2rem; margin-bottom: 0.6rem; display: block; }
.role-card__title { display: block; font-size: 0.875rem; font-weight: 600; color: var(--light-text); margin-bottom: 0.2rem; }
.role-card__sub   { font-size: 0.72rem; color: var(--light-muted); line-height: 1.4; }

/* ── Wallet notice ──────────────────────────────────── */
.wallet-notice {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 12px 14px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-m);
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.5;
  animation: stepIn 0.25s ease both;
}
.wallet-notice.is-visible { display: flex; }
.wallet-notice__icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.wallet-notice strong { display: block; color: var(--success); font-weight: 600; font-size: 0.8rem; margin-bottom: 2px; }
.wallet-notice p { color: var(--light-muted); }

/* ── Fields ─────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 14px; margin-bottom: 1.5rem; }
.field       { display: flex; flex-direction: column; gap: 5px; }

.field__label { font-size: 0.8rem; font-weight: 600; color: var(--light-text); }

.field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field__icon {
  position: absolute; left: 12px;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

.field__input {
  width: 100%;
  background: var(--light-input-bg);
  border: 1.5px solid var(--light-border);
  color: var(--light-text);
  border-radius: var(--radius-m);
  padding: 0.72rem 1rem 0.72rem 2.6rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.field__input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,92,0,0.1);
}

.field__input::placeholder { color: #c0b9b0; }
.field__input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,0.08); }
.field__input.is-valid  { border-color: var(--success); }

/* Select */
.field__wrap--select { position: relative; }
.field__input--select { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.field__chevron { position: absolute; right: 12px; pointer-events: none; color: var(--light-muted); font-size: 0.75rem; }

/* Toggle show/hide password */
.field__toggle {
  position: absolute; right: 12px;
  background: none; border: none;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition);
  padding: 4px;
  line-height: 1;
}
.field__toggle:hover { opacity: 0.9; }

/* Error text */
.field__error { font-size: 0.72rem; color: var(--danger); min-height: 16px; padding-left: 2px; }

/* Trade field — hidden until worker selected */
.trade-field { display: none; }
.trade-field.is-visible { display: flex; flex-direction: column; gap: 5px; }

/* ── Password strength ──────────────────────────────── */
.pw-strength { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.pw-strength__bars { display: flex; gap: 4px; flex: 1; }

.pw-bar {
  flex: 1; height: 3px;
  border-radius: 2px;
  background: var(--light-border);
  transition: background 0.3s ease;
}

.pw-bar.is-weak   { background: var(--danger); }
.pw-bar.is-fair   { background: var(--orange); }
.pw-bar.is-good   { background: #f59e0b; }
.pw-bar.is-strong { background: var(--success); }

.pw-strength__label { font-size: 0.7rem; color: var(--light-muted); white-space: nowrap; min-width: 60px; }

/* ── Summary card ───────────────────────────────────── */
.summary-card {
  background: #faf8f5;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  margin-bottom: 1.5rem;
}

.summary-card__label {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--light-muted);
  margin-bottom: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--light-border);
  font-size: 0.8rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-key { color: var(--light-muted); }
.summary-val {
  font-weight: 600;
  color: var(--light-text);
  text-align: right;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-m);
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn--orange       { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn--orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-1px); box-shadow: var(--shadow-orange); }
.btn--orange:active{ transform: none; }

.btn--ghost        { background: transparent; color: var(--light-muted); border-color: var(--light-border); }
.btn--ghost:hover  { color: var(--light-text); border-color: #ccc9c1; }

.btn--full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.step-btns { display: flex; gap: 10px; }
.step-btns .btn--orange { flex: 1; }

/* ── Spinner ────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Form footer ────────────────────────────────────── */
.form-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--light-muted);
  margin-top: 1.25rem;
}

.form-footer a { color: var(--orange); font-weight: 600; }
.form-footer a:hover { text-decoration: underline; }

/* Forgot password link — softer style, separate from login link */
.form-footer__forgot {
  color: var(--light-muted) !important;
  font-weight: 400 !important;
  font-size: 0.82rem;
  transition: color var(--transition);
}
.form-footer__forgot:hover {
  color: var(--orange) !important;
  text-decoration: underline;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; }

  .panel--left {
    padding: 3rem 2rem 2.5rem;
    border-right: none;
    border-bottom: 1px solid var(--dark-border);
    min-height: auto;
  }

  .panel__title  { font-size: 2rem; }
  .panel__perks  { display: none; }
  .panel--right  { padding: 2.5rem 1.25rem 3rem; }
}

@media (max-width: 480px) {
  .nav       { padding: 0 1rem; }
  .role-grid { grid-template-columns: 1fr; }
  .panel--left { padding: 2rem 1.25rem; }
}

/* ── Page load animations ───────────────────────────── */
@keyframes fadein-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-wrap      { animation: fadein-up 0.45s 0.1s ease both; }
.panel__content { animation: fadein-up 0.45s 0.05s ease both; }