/* ═══════════════════════════════════════════════════════════════════
   FLOW SYSTEM — shared auth/onb2 design tokens and components
   v20260422r22
═══════════════════════════════════════════════════════════════════ */
:root {
  --flow-overlay-backdrop:
    radial-gradient(circle at top, rgba(255,107,0,.12), transparent 34%),
    linear-gradient(180deg, rgba(5,8,12,.90), rgba(5,8,12,.95));
  --flow-panel-bg:
    radial-gradient(circle at top right, rgba(255,107,0,.10), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg2) 96%, white 4%), color-mix(in srgb, var(--bg) 92%, #000 8%));
  --flow-panel-border: color-mix(in srgb, var(--line) 82%, rgba(255,255,255,.08));
  --flow-panel-shadow: 0 24px 64px rgba(0,0,0,.28);
  --flow-card-bg:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)),
    radial-gradient(circle at top right, rgba(255,107,0,.08), transparent 34%),
    var(--bg2);
  --flow-card-border: color-mix(in srgb, var(--line) 82%, rgba(255,255,255,.08));
  --flow-card-shadow: 0 18px 40px rgba(0,0,0,.14);
  --flow-radius-panel: 28px;
  --flow-radius-card: 22px;
  --flow-radius-control: 16px;
  --flow-radius-pill: 999px;
  --flow-kicker-bg: rgba(255,107,0,.10);
  --flow-kicker-border: rgba(255,107,0,.20);
  --flow-kicker-color: var(--orange);
  --flow-brand-bg: rgba(255,107,0,.09);
  --flow-brand-border: rgba(255,107,0,.20);
  --flow-field-bg: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, white 4%), var(--surface));
  --flow-field-border: color-mix(in srgb, var(--line) 88%, rgba(255,255,255,.06));
  --flow-focus-ring: 0 0 0 3px rgba(255,107,0,.14);
  --flow-primary-bg: linear-gradient(180deg, color-mix(in srgb, var(--orange) 92%, white 8%), var(--orange));
  --flow-primary-shadow: 0 14px 28px rgba(255,107,0,.18);
  --flow-secondary-bg: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  --flow-secondary-border: color-mix(in srgb, var(--line) 84%, rgba(255,255,255,.08));
  --flow-chip-bg: rgba(255,107,0,.10);
  --flow-chip-border: rgba(255,107,0,.18);
  --flow-chip-color: var(--text1);
  --flow-chip-soft-bg: rgba(255,255,255,.04);
  --flow-chip-soft-border: var(--line);
  --flow-chip-soft-color: var(--text2);
}

#auth-overlay,
#onb2-overlay {
  background: var(--flow-overlay-backdrop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.flow-panel,
.auth-modal,
.onb2-modal {
  background: var(--flow-panel-bg);
  border: 1px solid var(--flow-panel-border);
  box-shadow: var(--flow-panel-shadow);
}

.auth-modal {
  border-radius: var(--flow-radius-panel);
  overflow: hidden;
}

.onb2-modal {
  border: none;
  box-shadow: none;
}

.flow-brandbar,
.auth-logo,
.onb2-headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-logo-box,
.onb2-brandbox {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.flow-brandmark,
.auth-logo-icon,
.onb2-brandmark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ui-radius-md,10px);
  background: var(--flow-brand-bg);
  border: 1px solid var(--flow-brand-border);
  box-shadow: 0 12px 24px rgba(255,107,0,.10);
}

.auth-logo-copy,
.onb2-brandcopy { min-width: 0; }

.onb2-brand-logo {
  display: block;
  width: min(100%, 220px);
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

.flow-brandtitle,
.auth-logo-name,
.onb2-brandtext {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 700;
  color: var(--text1);
}

.flow-brandsub,
.auth-logo-sub,
.onb2-brandsub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text3);
}

.flow-icon-btn,
.auth-close-btn,
.onb2-close-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: var(--ui-radius-md,10px);
  border: 1px solid var(--flow-secondary-border);
  background: rgba(255,255,255,.03);
  color: var(--text2);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.flow-icon-btn:hover,
.flow-icon-btn:focus-visible,
.auth-close-btn:hover,
.auth-close-btn:focus-visible,
.onb2-close-btn:hover,
.onb2-close-btn:focus-visible {
  border-color: rgba(255,107,0,.30);
  color: var(--orange);
  background: rgba(255,107,0,.08);
  outline: none;
}

.flow-kicker,
.auth-pill,
.onb2-modal-kicker,
.onb2-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--flow-radius-pill);
  background: var(--flow-kicker-bg);
  border: 1px solid var(--flow-kicker-border);
  color: var(--flow-kicker-color);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.auth-pill--soft,
.onb2-meta-pill--soft {
  background: var(--flow-chip-soft-bg);
  border-color: var(--flow-chip-soft-border);
  color: var(--flow-chip-soft-color);
  font-weight: 700;
}

.auth-step-meta,
.onb2-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.flow-title,
.auth-title,
.onb2-modal-title {
  margin-top: 4px;
  font-family: 'Oswald', sans-serif;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.08;
  font-weight: 700;
  color: var(--text1);
}

.flow-sub,
.auth-sub,
.onb2-modal-sub {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text2);
}

.flow-label,
.auth-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text3);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.flow-input,
.auth-input {
  width: 100%;
  background: var(--flow-field-bg);
  border: 1px solid var(--flow-field-border);
  border-radius: var(--flow-radius-control);
  padding: 13px 16px;
  font-size: 16px;
  color: var(--text1);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.flow-input:focus,
.auth-input:focus {
  border-color: rgba(255,107,0,.34);
  box-shadow: var(--flow-focus-ring);
}

.flow-btn,
.auth-btn,
.onb2-continue-btn,
.onb2-back-btn,
.auth-back-btn {
  min-height: 50px;
  border-radius: var(--ui-radius-md,10px);
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}
.flow-btn--primary,
.auth-btn,
.onb2-continue-btn {
  background: var(--flow-primary-bg);
  color: #fff;
  border: none;
  box-shadow: var(--flow-primary-shadow);
}
.flow-btn--secondary,
.onb2-back-btn,
.auth-back-btn {
  background: var(--flow-secondary-bg);
  color: var(--text2);
  border: 1px solid var(--flow-secondary-border);
}
.flow-btn--primary:hover,
.auth-btn:hover,
.onb2-continue-btn:hover,
.flow-btn--secondary:hover,
.onb2-back-btn:hover,
.auth-back-btn:hover {
  transform: translateY(-1px);
}
.flow-btn--primary:disabled,
.auth-btn:disabled,
.onb2-continue-btn:disabled,
.auth-back-btn:disabled,
.onb2-back-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.flow-card,
.onb2-role-card,
.onb2-profile-card,
.onb2-spec-card {
  border-radius: var(--flow-radius-card);
  border: 1px solid var(--flow-card-border);
  background: var(--flow-card-bg);
  box-shadow: var(--flow-card-shadow);
}

.flow-chip,
.onb2-role-feat,
.onb2-profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: var(--flow-radius-pill);
  background: var(--flow-chip-bg);
  border: 1px solid var(--flow-chip-border);
  color: var(--flow-chip-color);
  font-size: 11px;
  font-weight: 700;
}
.onb2-profile-chip--soft {
  background: var(--flow-chip-soft-bg);
  border-color: var(--flow-chip-soft-border);
  color: var(--flow-chip-soft-color);
}

.auth-shell { display: flex; flex-direction: column; gap: 24px; }
.auth-step { display: none; }
.auth-step.active { display: block; animation: fadeIn .25s var(--ease) both; }
.auth-step-head { display: flex; flex-direction: column; gap: 0; }
.auth-back-btn { margin-bottom: 18px; padding: 0 16px; }
.auth-close-btn { margin-left: auto; }
.auth-logo { margin-bottom: 0; }
.auth-btn { width: 100%; padding: 14px 16px; }
.auth-logo-sub { white-space: nowrap; }
.auth-input--phone { border-radius: var(--ui-radius-lg,18px); }
.auth-step--success .auth-step-meta { justify-content: center; }
.auth-step--success .auth-title,
.auth-step--success .auth-sub { text-align: center; }

@media (max-width: 679px) {
  .flow-brandmark,
  .auth-logo-icon,
  .onb2-brandmark {
    width: 40px;
    height: 40px;
    border-radius: var(--ui-radius-md,10px);
  }
  .flow-brandtitle,
  .auth-logo-name,
  .onb2-brandtext { font-size: 18px; }
  .flow-brandsub,
  .auth-logo-sub,
  .onb2-brandsub { font-size: 11px; }
  .flow-kicker,
  .auth-pill,
  .onb2-modal-kicker,
  .onb2-meta-pill { min-height: 28px; padding: 0 10px; font-size: 10px; }
  .flow-title,
  .auth-title,
  .onb2-modal-title { font-size: 22px; }
  .flow-sub,
  .auth-sub,
  .onb2-modal-sub { font-size: 13px; }
  .auth-logo-sub { display: none; }
  .auth-step-meta { margin-top: 12px; }
}
