/* Signup (SPA) - Clean Professional UI */
:root {
  --su-blue: #1165EF;
  --su-blue-hover: #0F59D6;
  --su-bg: #F8F9FA;
  --su-card: #FFFFFF;
  --su-text: #1a1a1a;
  --su-muted: #6B7280;
  --su-border: #E5E7EB;
  --su-input-bg: #FAFAFA;
  --su-error: #DC2626;
  --su-success: #10B981;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: #000; /* right image edge fill */
}

.su-container { display: flex; height: 100vh; overflow: hidden; }
.su-form-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--su-bg);
  padding: 40px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 32px;
}
.su-image-section { flex: 1; position: relative; overflow: hidden; height: 100%; }
.su-image-section img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: opacity .3s ease; }

.su-card {
  width: 100%;
  max-width: 456px;
  background: var(--su-card);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}

/* Progress at top edge - Single continuous bar */
.su-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #E5E7EB;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.su-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  background: var(--su-blue);
  transition: width 0.3s ease;
}
.su-progress.step-2::before {
  width: 100%;
}

.su-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.su-brand .brand-mark {
  width: 48px;
  height: 48px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08));
}

.su-title { font-size: 32px; font-weight: 700; color: var(--su-text); margin: 8px 0 8px; letter-spacing: -0.8px; line-height: 1.2; }
.su-subtitle { font-size: 14px; color: var(--su-muted); margin-bottom: 20px; font-weight: 500; }

/* Role segmented control */
.su-role-toggle { display: flex; border: 1px solid var(--su-border); border-radius: 10px; overflow: hidden; margin-bottom: 20px; background: #fff; }
.su-role-tab { flex: 1; padding: 10px 16px; background: transparent; border: none; font-size: 15px; font-weight: 600; color: #6B7280; cursor: pointer; transition: background .2s, color .2s; }
.su-role-tab + .su-role-tab { border-left: 1px solid var(--su-border); }
.su-role-tab:hover:not(.is-active) { background: #F7FAFF; color: #4B5563; }
.su-role-tab.is-active { background: #EEF4FF; color: var(--su-blue); }
.su-role-tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(17,101,239,.35); }

.su-group { margin-bottom: 14px; }
.su-label { display: block; font-size: 13px; font-weight: 500; color: var(--su-text); margin-bottom: 6px; }
.su-input { width: 100%; padding: 11px 14px; font-size: 15px; border: 1.5px solid var(--su-border); border-radius: 8px; background: var(--su-input-bg); transition: all .2s ease; color: var(--su-text); }
.su-input:focus { outline: none; border-color: var(--su-blue); background: #fff; box-shadow: 0 0 0 3px rgba(17,101,239,.1); }
.su-input::placeholder { color: #9CA3AF; }
.su-input:disabled { background: #F3F4F6; cursor: not-allowed; }

.su-checkbox { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 6px; }
.su-checkbox input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; accent-color: var(--su-blue); }
.su-checkbox label { font-size: 14px; color: var(--su-muted); line-height: 1.5; cursor: pointer; }
.su-checkbox a { color: var(--su-blue); text-decoration: none; }
.su-checkbox a:hover { text-decoration: underline; }

.su-error { color: var(--su-error); font-size: 13px; margin-top: 6px; display: none; background: #FEF2F2; padding: 8px 12px; border-radius: 6px; border-left: 3px solid var(--su-error); }
.su-error ul { margin: 0; padding: 0; list-style: none; }
.su-error li { line-height: 1.5; }

.su-btn { width: 100%; padding: 13px 24px; font-size: 15px; font-weight: 600; color: #fff; background: var(--su-blue); border: 0; border-radius: 8px; cursor: pointer; transition: transform .12s ease, background .2s ease, box-shadow .2s ease; margin-top: 8px; position: relative; }
.su-btn:hover:not(:disabled) { background: var(--su-blue-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(17,101,239,.35); }
.su-btn:active:not(:disabled) { transform: translateY(0); box-shadow: 0 2px 8px rgba(17,101,239,.25); }
.su-btn:disabled { background: #D1D5DB; cursor: not-allowed; box-shadow: none; opacity: 0.7; }

.su-btn-label { transition: opacity .2s ease; }
.su-btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.6);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: middle;
  animation: su-spin .7s linear infinite;
  margin-left: 8px;
}

.su-btn-secondary { width: 100%; padding: 13px 24px; font-size: 15px; font-weight: 600; color: #4B5563; background: #FFFFFF; border: 1.5px solid var(--su-border); border-radius: 8px; cursor: pointer; transition: transform .12s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease; }
.su-btn-secondary:hover:not(:disabled) { background: #F9FAFB; border-color: #D1D5DB; transform: translateY(-1px); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.su-btn-secondary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.su-footer { text-align: center; margin-top: 16px; font-size: 13px; color: var(--su-muted); }
.su-footer a { color: var(--su-blue); font-weight: 600; text-decoration: none; }
.su-footer a:hover { text-decoration: underline; }

/* Avatar (Step 2) */
.su-avatar-upload { display: flex; flex-direction: column; align-items: center; margin: 12px 0 24px; }
.su-avatar-circle { width: 120px; height: 120px; border-radius: 50%; background: #E5E5E5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.su-avatar-circle svg { width: 56px; height: 56px; fill: #999999; }

.su-actions { display: flex; gap: 12px; }
.su-actions .su-btn, .su-actions .su-btn-secondary { width: auto; flex: 1; }

/* Steps */
.su-step { position: relative; }
.su-step[hidden] { display: none !important; }

/* Transitions */
.su-fade { opacity: 0; transition: opacity .25s ease; }
.su-fade.is-in { opacity: 1; }

/* Spinner animation */
@keyframes su-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .su-container { flex-direction: column; }
  .su-image-section { display: none; }
  .su-form-section { min-height: 100vh; }
  .su-actions { flex-direction: column; }
  .su-actions .su-btn, .su-actions .su-btn-secondary { width: 100%; flex: none; }
}
