/* SONARA — Registration prototype styles */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font-family: inherit; }

/* ---- App shell ---- */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  background: var(--background);
}
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
}

/* ---- Brand panel (left) ---- */
.brand {
  position: relative;
  background:
    radial-gradient(ellipse 60% 40% at 30% 0%, rgba(123,85,208,0.18), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 100%, rgba(65,34,142,0.15), transparent 60%),
    var(--card);
  border-right: 1px solid var(--border);
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 100vh;
  position: sticky;
  top: 0;
}
@media (max-width: 880px) {
  .brand {
    min-height: auto;
    position: static;
    padding: 20px 20px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .brand-bottom { display: none; }
  .brand-stepper { display: none; }
}

.brand-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.brand-logo .mark {
  width: 32px; height: 32px;
  background: var(--violet);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: var(--shadow-violet-sm);
}
.brand-logo .mark svg { width: 18px; height: 18px; }

.brand-stepper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 56px 0;
}
.brand-step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted-foreground);
  font-size: 14px;
  transition: all 200ms var(--ease-out);
}
.brand-step .num {
  width: 28px; height: 28px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  background: var(--muted);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: all 200ms var(--ease-out);
}
.brand-step.active {
  background: rgba(123,85,208,0.10);
  color: var(--foreground);
}
.brand-step.active .num {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}
.brand-step.done .num {
  background: rgba(123,85,208,0.18);
  color: var(--violet-bright, #7b55d0);
  border-color: rgba(123,85,208,0.4);
}
.brand-step.done .num svg { width: 14px; height: 14px; }

.brand-bottom {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.brand-bottom strong { color: var(--foreground); font-weight: 500; }

/* ---- Form panel (right) ---- */
.panel {
  padding: 32px 40px 56px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
@media (max-width: 880px) {
  .panel { padding: 24px 20px 48px; min-height: auto; }
}

.panel-progress {
  height: 3px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.panel-progress > span {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--violet) 0%, #7b55d0 100%);
  border-radius: 999px;
  transition: width 400ms var(--ease-out);
}
.panel-progress-meta {
  display: flex; justify-content: space-between;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.panel-progress-meta .dim { opacity: 0.7; }

.panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 56px;
}
@media (max-width: 880px) {
  .panel-content { padding-top: 32px; }
}

.panel-inner {
  width: 100%;
  max-width: 460px;
}
.panel-inner.wide { max-width: 720px; }

.eyebrow-step {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--violet-bright, #7b55d0);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow-step::before {
  content: '';
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(123,85,208,0.15);
}

h1.step-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--foreground);
  margin: 0 0 12px;
}
@media (max-width: 880px) {
  h1.step-title { font-size: 26px; }
}
.step-subtitle {
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin: 0 0 32px;
}

/* ---- Inputs ---- */
.field { margin-bottom: 18px; }
.field-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 8px;
}
.field-label .opt {
  color: var(--muted-foreground);
  font-weight: 400;
  font-size: 12px;
}
.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-size: 15px;
  outline: none;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.input::placeholder { color: var(--muted-foreground); opacity: 0.7; }
.input:focus {
  border-color: var(--violet-bright, #7b55d0);
  box-shadow: 0 0 0 3px rgba(123,85,208,0.18);
}
textarea.input {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.field-hint {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 150ms var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--violet);
  color: white;
  border-color: rgba(255,255,255,0.08);
  box-shadow: var(--cta-shadow-rest);
}
.btn-primary:hover {
  background: var(--violet-light);
  box-shadow: var(--cta-shadow-hover);
}
.btn-primary:disabled {
  opacity: 0.45; cursor: not-allowed; box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--muted);
}

.btn-oauth {
  width: 100%;
  height: 52px;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 15px;
  border-radius: 12px;
  gap: 12px;
}
.btn-oauth:hover {
  background: var(--muted);
  border-color: var(--muted-foreground);
}

.btn-block { width: 100%; }

/* ---- Nav row ---- */
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}
.nav-row .right { display: flex; gap: 12px; }
@media (max-width: 540px) {
  .nav-row { flex-direction: column-reverse; }
  .nav-row .btn { width: 100%; }
  .nav-row .right { width: 100%; flex-direction: column-reverse; }
}

/* ---- Divider with text ---- */
.divider-or {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0;
  color: var(--muted-foreground);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.divider-or::before, .divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Checkbox ---- */
.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-row a { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }
.checkbox-box {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  transition: all 150ms var(--ease-out);
  background: var(--card);
}
.checkbox-row.checked .checkbox-box {
  background: var(--violet);
  border-color: var(--violet);
  color: white;
}
.checkbox-row.checked .checkbox-box svg { width: 12px; height: 12px; }

/* ---- Trust micro-copy ---- */
.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 18px;
  justify-content: center;
}
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .dot {
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--border);
}
.trust svg { color: var(--success); }

/* ---- Role cards ---- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}
@media (max-width: 720px) {
  .role-grid { grid-template-columns: 1fr; }
}

.role-card {
  position: relative;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  text-align: left;
  transition: all 200ms var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  min-height: 220px;
}
.role-card:hover {
  border-color: rgba(123,85,208,0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(65,34,142,0.25);
}
.role-card.compact { min-height: auto; padding: 20px; }
.role-card.selected {
  border-color: var(--violet);
  background:
    linear-gradient(180deg, rgba(123,85,208,0.10), rgba(123,85,208,0.02)),
    var(--card);
  box-shadow: 0 0 0 3px rgba(123,85,208,0.18), 0 8px 24px -8px rgba(65,34,142,0.3);
}
.role-card .role-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(123,85,208,0.12);
  border: 1px solid rgba(123,85,208,0.3);
  color: var(--violet-bright, #7b55d0);
  display: inline-flex; align-items: center; justify-content: center;
}
.role-card.selected .role-icon {
  background: var(--violet);
  color: white;
  border-color: var(--violet);
}
.role-card .role-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.role-card .role-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.55;
  flex: 1;
}
.role-card .role-check {
  position: absolute; top: 16px; right: 16px;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all 150ms var(--ease-out);
}
.role-card.selected .role-check {
  background: var(--violet);
  border-color: var(--violet);
  color: white;
}
.role-card.selected .role-check svg { width: 12px; height: 12px; }

/* ---- Chip / multi-select ---- */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms var(--ease-out);
}
.chip:hover {
  border-color: var(--muted-foreground);
  color: var(--foreground);
}
.chip.selected {
  background: rgba(123,85,208,0.12);
  border-color: var(--violet);
  color: var(--foreground);
}

/* ---- Radio cards (smaller) ---- */
.radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.radio-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all 150ms var(--ease-out);
  display: flex;
  align-items: center;
  gap: 12px;
}
.radio-card:hover { border-color: var(--muted-foreground); }
.radio-card.selected {
  border-color: var(--violet);
  background: rgba(123,85,208,0.08);
}
.radio-card .dot {
  width: 18px; height: 18px; border-radius: 999px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.radio-card.selected .dot {
  border-color: var(--violet);
}
.radio-card.selected .dot::after {
  content: '';
  position: absolute; inset: 3px;
  background: var(--violet);
  border-radius: 999px;
}
.radio-card .label-block .t { font-size: 14px; font-weight: 500; color: var(--foreground); }
.radio-card .label-block .s { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }

/* ---- Sub-step strip ---- */
.substep-strip {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.substep-strip > div {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--muted);
  transition: background 200ms var(--ease-out);
}
.substep-strip > div.active { background: var(--violet); }
.substep-strip > div.done { background: rgba(123,85,208,0.5); }

/* ---- Avatar uploader ---- */
.avatar-up {
  display: flex; align-items: center; gap: 16px;
}
.avatar-bubble {
  width: 80px; height: 80px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(123,85,208,0.2), rgba(65,34,142,0.1));
  border: 1px dashed var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
  font-family: var(--font-display); font-size: 28px; font-weight: 600;
  flex-shrink: 0;
}
.avatar-up .meta { font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }
.avatar-up .meta strong { color: var(--foreground); font-weight: 500; }

/* ---- Password strength ---- */
.pw-strength {
  display: flex; gap: 4px; margin-top: 8px;
}
.pw-strength > span {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--muted);
  transition: background 200ms var(--ease-out);
}
.pw-strength.weak > span:nth-child(-n+1) { background: #f59e0b; }
.pw-strength.medium > span:nth-child(-n+2) { background: #f59e0b; }
.pw-strength.strong > span { background: var(--success); }
.pw-strength-label {
  font-size: 11px; margin-top: 6px;
  color: var(--muted-foreground);
}

/* ---- Email-verify state ---- */
.verify-card {
  text-align: center;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.verify-icon-ring {
  width: 96px; height: 96px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(123,85,208,0.15), transparent 70%);
  border: 1px solid rgba(123,85,208,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--violet-bright, #7b55d0);
  margin: 0 auto 24px;
  position: relative;
  flex-shrink: 0;
}
.verify-icon-ring::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(123,85,208,0.15);
  animation: verify-pulse 2.4s ease-out infinite;
}
@keyframes verify-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

.email-pill {
  display: inline-flex;
  align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--muted);
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: var(--font-mono);
  margin: 0 4px;
}

/* ---- Welcome ---- */
.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 720px) { .welcome-grid { grid-template-columns: 1fr; } }
.welcome-card {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
  text-align: left;
  min-height: 180px;
}
.welcome-card:hover {
  border-color: rgba(123,85,208,0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px rgba(65,34,142,0.25);
}
.welcome-card .ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(123,85,208,0.12);
  border: 1px solid rgba(123,85,208,0.3);
  color: var(--violet-bright, #7b55d0);
  display: inline-flex; align-items: center; justify-content: center;
}
.welcome-card .t { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--foreground); }
.welcome-card .s { font-size: 13px; color: var(--muted-foreground); line-height: 1.55; flex: 1; }
.welcome-card .more { font-size: 13px; color: var(--violet-bright, #7b55d0); display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }

.gift-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(123,85,208,0.12), rgba(65,34,142,0.04));
  border: 1px solid rgba(123,85,208,0.3);
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
}
.gift-card .badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--violet);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-violet-sm);
}
.gift-card .gift-t { font-size: 14px; font-weight: 500; color: var(--foreground); }
.gift-card .gift-s { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }

/* ---- Step entrance ---- */
.step-enter {
  animation: step-enter 350ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
@keyframes step-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tweaks panel offset so it doesn't collide with brand panel on small screens */
.tweaks-panel-host { z-index: 200; }

/* Light-theme adjustments to stay sober */
:root:not(.dark) .role-card.selected {
  background:
    linear-gradient(180deg, rgba(65,34,142,0.06), rgba(65,34,142,0.01)),
    var(--card);
}
:root:not(.dark) .brand {
  background:
    radial-gradient(ellipse 60% 40% at 30% 0%, rgba(65,34,142,0.10), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 100%, rgba(65,34,142,0.06), transparent 60%),
    var(--card);
}
