/**
 * Shared premium iProply auth pages.
 */

:root {
  --auth-primary: #041427;
  --auth-primary-light: #16345c;
  --auth-text: #0f2747;
  --auth-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-error: #dc2626;
  --auth-error-bg: #fef2f2;
  --auth-success-bg: #ecfdf5;
  --auth-success-text: #0f766e;
  --auth-radius: 12px;
  --auth-shadow: 0 10px 40px rgba(15, 39, 71, 0.12);
  --auth-accent: rgba(200, 166, 99, 0.35);
  --auth-accent-strong: #facc15;
}

* {
  box-sizing: border-box;
}

.auth-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.9), rgba(15, 39, 71, 0.76)),
    url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?w=2200&auto=format&fit=crop&q=82") center/cover fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-shell {
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
}

.auth-shell--wide {
  max-width: 1280px;
  grid-template-columns: minmax(0, 0.75fr) minmax(520px, 0.95fr);
}

.auth-brand-panel,
.auth-card {
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(4, 20, 39, 0.16), rgba(4, 20, 39, 0.8)),
    url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1600&auto=format&fit=crop&q=82") center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 16%, rgba(250, 204, 21, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  pointer-events: none;
}

.auth-brand-panel > * {
  position: relative;
  z-index: 1;
}

.auth-logo img {
  width: 160px;
  max-height: 70px;
  object-fit: contain;
}

.auth-brand-copy {
  max-width: 600px;
}

.auth-brand-copy span {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--auth-accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-brand-copy span::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.auth-brand-copy h2 {
  margin: 1rem 0;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.auth-brand-copy h2 em {
  color: var(--auth-accent-strong);
  font-style: normal;
}

.auth-brand-copy p {
  max-width: 540px;
  color: rgba(255,255,255,0.76);
  font-size: 1.05rem;
  line-height: 1.8;
}

.auth-brand-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.auth-brand-stats div {
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  background: rgba(255,255,255,0.1);
}

.auth-brand-stats strong {
  display: block;
  color: var(--auth-accent-strong);
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
}

.auth-brand-stats small {
  color: rgba(255,255,255,0.68);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-card {
  align-self: center;
  background: rgba(255, 255, 255, 0.9);
  padding: clamp(1.5rem, 3vw, 2.35rem);
}

.auth-card-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card-head h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 0.35rem;
}

.auth-card-head p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-muted);
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  color: var(--auth-muted);
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--auth-primary);
  background: #f8fafc;
}

.form-group input:hover {
  border-color: #cbd5e1;
}

.form-group input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(30, 59, 90, 0.15);
}

.btn-auth-primary {
  width: 100%;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
  color: #041427;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-auth-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 12px 30px rgba(202, 138, 4, 0.25);
  transform: translateY(-1px);
}

.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.auth-social button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  color: var(--auth-text);
  background: rgba(255,255,255,0.72);
  font-weight: 700;
  cursor: pointer;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0;
  color: var(--auth-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.btn-auth-primary:active {
  transform: translateY(1px);
}

.alert-auth {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.alert-auth-error {
  background: var(--auth-error-bg);
  color: var(--auth-error);
  border: 1px solid #fecaca;
}

.alert-auth-success {
  background: var(--auth-success-bg);
  color: var(--auth-success-text);
  border: 1px solid #6ee7b7;
}

.auth-footer {
  text-align: center;
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--auth-border);
  font-size: 0.875rem;
}

.auth-footer a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
  font-size: 0.8125rem;
}

.terms-row {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.6rem;
}

.terms-row a {
  color: var(--auth-primary);
  font-weight: 700;
}

.remember-row label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--auth-muted);
  cursor: pointer;
}

.remember-row a {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 500;
}

.remember-row a:hover {
  text-decoration: underline;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--auth-text);
}

.form-section-wrap {
  margin-bottom: 1.35rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--auth-border);
}

.form-section-wrap:last-of-type {
  border-bottom: none;
}

@media (max-width: 768px) {
  .auth-body {
    align-items: flex-start;
    padding: 1rem;
  }

  .auth-shell,
  .auth-shell--wide {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 420px;
  }

  .auth-brand-stats {
    grid-template-columns: 1fr;
  }

  .auth-shell--wide .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Workspace picker --- */

.ws-fieldset {
  border: 0;
  margin: 0 0 1.35rem;
  padding: 0;
}

.ws-legend {
  float: left;
  width: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 0.35rem;
  padding: 0;
}

.ws-required-mark {
  color: var(--auth-error);
}

.ws-hint {
  clear: both;
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--auth-muted);
  line-height: 1.5;
}

.ws-single-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(200, 166, 99, 0.35);
  background: linear-gradient(135deg, #fffdf9 0%, #faf8f5 100%);
}

.ws-single-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 59, 90, 0.08);
  color: var(--auth-primary);
  flex-shrink: 0;
}

.ws-single-name {
  font-weight: 700;
  color: var(--auth-text);
  font-size: 0.9375rem;
}

.ws-single-desc {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

.ws-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ws-card {
  display: block;
  cursor: pointer;
  border-radius: 10px;
  margin: 0;
}

.ws-card-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ws-card-body {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.65rem 0.85rem;
  align-items: start;
  padding: 1rem 0.95rem;
  border: 2px solid var(--auth-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.ws-card:hover .ws-card-body {
  border-color: rgba(200, 166, 99, 0.65);
  box-shadow: 0 10px 24px rgba(15, 39, 71, 0.06);
}

.ws-card:focus-within .ws-card-body {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(30, 59, 90, 0.12);
}

.ws-card:has(.ws-card-input:checked) .ws-card-body {
  border-color: var(--auth-accent-strong);
  background: linear-gradient(135deg, #fffefb 0%, #fffdfa 100%);
  box-shadow: 0 0 0 1px rgba(200, 166, 99, 0.25), 0 12px 32px rgba(15, 39, 71, 0.08);
}

.ws-card-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  margin-top: 0.25rem;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.ws-card:has(.ws-card-input:checked) .ws-card-radio {
  border-color: var(--auth-accent-strong);
  background: var(--auth-accent-strong);
}

.ws-card:has(.ws-card-input:checked) .ws-card-radio::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

.ws-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 59, 90, 0.06);
  color: var(--auth-primary);
  flex-shrink: 0;
}

.ws-card-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--auth-text);
}

.ws-card-desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive polish */
.auth-shell,
.auth-card,
.form-row,
.ws-card-body {
  min-width: 0;
}

.auth-body {
  overflow-x: clip;
}

@supports not (overflow-x: clip) {
  .auth-body {
    overflow-x: hidden;
  }
}

@media (max-width: 520px) {
  .auth-body {
    align-items: flex-start;
    padding: 1rem;
  }

  .auth-logo {
    margin: 0.5rem 0 1rem;
  }

  .auth-logo a {
    font-size: 1.45rem;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .remember-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .form-row,
  .auth-shell--wide .form-row {
    grid-template-columns: 1fr;
  }

  .ws-card-body {
    grid-template-columns: auto 1fr;
  }

  .ws-card-icon {
    display: none;
  }
}

/* Rectangular dropdown/select refresh */
.auth-card select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding-right: 2.75rem !important;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: var(--auth-text);
  border-radius: 8px;
}

.auth-card select:not([multiple]):focus {
  border-color: var(--auth-accent-strong);
  box-shadow: 0 0 0 3px var(--auth-accent);
  outline: none;
}

/* --- Premium compact no-scroll auth system --- */

.auth-body {
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
}

.auth-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  height: 100vh;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  gap: 0;
  padding: clamp(16px, 2vw, 26px);
}

.auth-shell--wide {
  max-width: none;
  grid-template-columns: minmax(340px, 0.82fr) minmax(520px, 1.18fr);
}

.auth-brand-panel {
  min-height: 0;
  height: calc(100vh - clamp(32px, 4vw, 52px));
  border-radius: 28px 0 0 28px;
  padding: clamp(22px, 3vw, 40px);
  justify-content: space-between;
}

.auth-card {
  align-self: stretch;
  justify-self: stretch;
  max-height: calc(100vh - clamp(32px, 4vw, 52px));
  border-radius: 0 28px 28px 0;
  padding: clamp(20px, 2.4vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.auth-card-scroll {
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(250, 204, 21, 0.72) transparent;
}

.auth-logo img {
  width: clamp(126px, 10vw, 156px);
  max-height: 50px;
}

.auth-brand-copy h2 {
  font-size: clamp(2.15rem, 4.6vw, 4.4rem);
  max-width: 620px;
}

.auth-brand-copy p {
  font-size: 0.98rem;
  line-height: 1.65;
}

.auth-brand-stats div {
  padding: 0.8rem;
  backdrop-filter: blur(14px);
}

.auth-card-head {
  margin-bottom: 1rem;
}

.auth-card-head h1 {
  font-size: clamp(1.65rem, 2.5vw, 2.1rem);
}

.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: 0.82rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  min-height: 44px;
  padding: 0.68rem 0.85rem;
}

.form-group textarea {
  min-height: 82px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--auth-accent-strong);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.18);
}

.auth-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.auth-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.64rem;
  border-radius: 999px;
  background: rgba(4, 20, 39, 0.06);
  color: var(--auth-text);
  font-size: 0.76rem;
  font-weight: 700;
}

.auth-wizard-card .auth-card-head {
  text-align: left;
}

.auth-steps {
  margin-bottom: 1rem;
}

.auth-step-line {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(15, 39, 71, 0.1);
  overflow: hidden;
  margin-bottom: 0.7rem;
}

.auth-step-line span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #facc15, #ca8a04);
  transition: width 0.18s ease;
}

.auth-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.auth-step {
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(15, 39, 71, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--auth-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-step.is-active {
  color: var(--auth-primary);
  border-color: rgba(250, 204, 21, 0.62);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.16);
}

.auth-step.is-complete {
  color: #72540b;
  background: rgba(250, 204, 21, 0.18);
}

.auth-step-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.55rem;
  color: var(--auth-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-step-panel {
  display: none;
  animation: authStepIn 0.18s ease both;
}

.auth-step-panel.is-active {
  display: block;
}

@keyframes authStepIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-auth-secondary {
  padding: 0.78rem 1rem;
  min-height: 46px;
  border: 1px solid rgba(15, 39, 71, 0.14);
  border-radius: 10px;
  color: var(--auth-text);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  cursor: pointer;
}

.btn-auth-secondary:hover {
  border-color: var(--auth-primary);
}

.auth-field-hint {
  margin: 0.35rem 0 0;
  color: var(--auth-muted);
  font-size: 0.76rem;
}

.auth-field-error {
  min-height: 1rem;
  margin: 0.28rem 0 0;
  color: var(--auth-error);
  font-size: 0.75rem;
  font-weight: 700;
}

.has-error input,
.has-error textarea,
.has-error select {
  border-color: #ef4444;
}

.password-strength {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 39, 71, 0.1);
  margin-top: 0.45rem;
}

.password-strength span {
  display: block;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, #f97316, #facc15);
}

.profile-uploader {
  display: grid;
  justify-items: center;
  gap: 0.42rem;
  margin-bottom: 0.85rem;
}

.profile-uploader-label {
  color: var(--auth-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.profile-uploader-target {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 2px dashed rgba(250, 204, 21, 0.68);
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(250,248,245,0.95));
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.profile-uploader-target:hover,
.profile-uploader.is-dragover .profile-uploader-target {
  transform: translateY(-1px);
  border-color: var(--auth-accent-strong);
  box-shadow: 0 14px 34px rgba(202, 138, 4, 0.2);
}

.profile-uploader-preview,
.profile-uploader-preview img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.profile-uploader-preview {
  display: grid;
  place-items: center;
  color: var(--auth-primary);
  font-size: 1.6rem;
}

.profile-uploader-preview img {
  object-fit: cover;
}

.profile-uploader-overlay {
  position: absolute;
  inset: auto 8px 8px;
  padding: 0.34rem 0.45rem;
  border-radius: 999px;
  color: #041427;
  background: rgba(250, 204, 21, 0.94);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.profile-uploader-target:hover .profile-uploader-overlay,
.profile-uploader.has-preview .profile-uploader-overlay {
  opacity: 1;
  transform: translateY(0);
}

.profile-uploader input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-uploader-actions {
  display: flex;
  gap: 0.7rem;
}

.auth-link-button {
  border: 0;
  background: transparent;
  color: var(--auth-primary);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.profile-uploader-progress {
  width: 118px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 39, 71, 0.1);
}

.profile-uploader-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #facc15, #ca8a04);
  transition: width 0.24s ease;
}

.auth-review {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.auth-review-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(15, 39, 71, 0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.56);
  color: var(--auth-muted);
  font-size: 0.82rem;
}

.auth-review-row strong {
  color: var(--auth-text);
}

@media (max-height: 760px) and (min-width: 901px) {
  .auth-brand-copy h2 {
    font-size: clamp(1.9rem, 4vw, 3.3rem);
    margin: 0.7rem 0;
  }

  .auth-brand-copy p,
  .auth-card-head p {
    font-size: 0.82rem;
  }

  .auth-brand-stats strong {
    font-size: 1.15rem;
  }

  .auth-card {
    padding: 18px 24px;
  }

  .form-group {
    margin-bottom: 0.62rem;
  }

  .auth-footer {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }
}

@media (max-width: 900px) {
  .auth-body {
    overflow: auto;
  }

  .auth-shell,
  .auth-shell--wide {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .auth-brand-panel {
    min-height: 240px;
    height: auto;
    border-radius: 24px 24px 0 0;
  }

  .auth-card {
    max-height: none;
    border-radius: 0 0 24px 24px;
  }

  .auth-brand-copy h2 {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }
}

@media (max-width: 560px) {
  .auth-shell,
  .auth-shell--wide {
    padding: 0;
  }

  .auth-brand-panel {
    border-radius: 0;
    min-height: 190px;
  }

  .auth-brand-stats {
    display: none;
  }

  .auth-card {
    border-radius: 20px 20px 0 0;
    margin-top: -18px;
  }

  .auth-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-wizard-actions {
    flex-direction: column-reverse;
  }

  .auth-wizard-actions .btn-auth-primary,
  .auth-wizard-actions .btn-auth-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Agent registration v2 */
.auth-shell--register .auth-card-scroll {
  max-height: min(100vh - 2rem, 920px);
  overflow-y: auto;
}

.auth-step-list--six {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-step-list--six .auth-step {
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
}

.form-group--full {
  grid-column: 1 / -1;
}

.auth-otp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.auth-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.8rem;
  font-weight: 600;
}

.otp-boxes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.otp-box {
  width: 2.75rem;
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
}

.auth-otp-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.signature-pad-wrap {
  border: 1px dashed rgba(15, 23, 42, 0.2);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
}

.signature-pad {
  width: 100%;
  max-width: 100%;
  height: 140px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.btn-signature-clear {
  margin-top: 0.5rem;
}

.consent-block .consent-text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #475569;
}

.consent-block .consent-text a {
  color: var(--auth-primary, #0b3d91);
}

.auth-review--dense .auth-review-row {
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.auth-draft-restore {
  border: 1px solid rgba(250, 204, 21, 0.38);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  color: var(--auth-primary, #0b3d91);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.34rem 0.62rem;
  text-decoration: none;
}

.auth-draft-state {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  color: #80620f;
}

.auth-draft-state::before {
  content: "";
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: #facc15;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.14);
}

/* Premium agent registration workspace selection */
.auth-shell--register {
  --auth-gold-ring: rgba(250, 204, 21, 0.48);
}

.auth-shell--register .auth-brand-copy span {
  color: #fde68a;
}

.auth-shell--register .auth-card-head {
  position: relative;
  padding-bottom: 0.82rem;
  border-bottom: 1px solid rgba(15, 39, 71, 0.08);
}

.auth-shell--register .auth-card-head p {
  max-width: 580px;
}

.auth-shell--register .auth-card-scroll::-webkit-scrollbar {
  width: 8px;
}

.auth-shell--register .auth-card-scroll::-webkit-scrollbar-track {
  background: rgba(15, 39, 71, 0.06);
  border-radius: 999px;
}

.auth-shell--register .auth-card-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #facc15, #a16207);
  border-radius: 999px;
}

.auth-shell--register .auth-steps {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 1.1rem;
  padding: 0.72rem 0 0.78rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.86));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-shell--register .auth-step-line {
  height: 6px;
  background: rgba(15, 39, 71, 0.08);
  box-shadow: inset 0 1px 2px rgba(15, 39, 71, 0.08);
}

.auth-shell--register .auth-step-line span {
  background: linear-gradient(90deg, #facc15 0%, #d6a832 48%, #041427 100%);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.38);
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-step-list--six .auth-step {
  position: relative;
  min-height: 36px;
  padding: 0.54rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 39, 71, 0.08);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 18px rgba(15, 39, 71, 0.04);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-step-list--six .auth-step.is-active {
  color: var(--auth-primary);
  border-color: var(--auth-gold-ring);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(255, 255, 255, 0.84));
  transform: translateY(-1px);
}

.auth-step-list--six .auth-step.is-complete {
  color: #533f07;
  border-color: rgba(250, 204, 21, 0.28);
  background: rgba(250, 204, 21, 0.16);
}

.auth-step-list--six .auth-step.is-complete::before {
  content: "\f00c";
  margin-right: 0.32rem;
  font: var(--fa-font-solid);
  color: #a16207;
}

.ws-fieldset--premium {
  margin-bottom: 1.15rem;
}

.ws-fieldset--premium .ws-legend {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  line-height: 1.12;
  color: var(--auth-text);
  letter-spacing: 0;
}

.ws-intro {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  clear: both;
  margin-bottom: 0.95rem;
}

.ws-fieldset--premium .ws-hint {
  margin: 0;
  max-width: 780px;
  color: #526277;
  font-size: 0.86rem;
}

.ws-help {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.36);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  color: #8a6408;
  cursor: help;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ws-help:hover,
.ws-help:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(250, 204, 21, 0.74);
  box-shadow: 0 10px 24px rgba(202, 138, 4, 0.16);
}

.ws-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 10;
  width: min(280px, calc(100vw - 2rem));
  padding: 0.7rem 0.82rem;
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 12px;
  background: rgba(4, 20, 39, 0.94);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.76rem;
  line-height: 1.45;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.ws-help:hover + .ws-tooltip,
.ws-help:focus-visible + .ws-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ws-stack--premium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.82rem;
}

.ws-card--premium {
  position: relative;
  min-width: 0;
  border-radius: 18px;
  isolation: isolate;
}

.ws-card--premium .ws-card-body {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.82rem;
  padding: 1rem;
  border: 1px solid rgba(15, 39, 71, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.86), rgba(248,250,252,0.66)),
    radial-gradient(circle at 92% 0%, rgba(250, 204, 21, 0.16), transparent 36%);
  box-shadow: 0 14px 38px rgba(15, 39, 71, 0.08);
  overflow: hidden;
  transform: translateY(0) scale(1);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ws-card--premium .ws-card-body::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.2), transparent 32%),
    linear-gradient(315deg, rgba(4, 20, 39, 0.12), transparent 42%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.ws-card--premium:hover .ws-card-body,
.ws-card--premium:focus-within .ws-card-body {
  border-color: rgba(250, 204, 21, 0.56);
  box-shadow: 0 20px 46px rgba(15, 39, 71, 0.12), 0 0 0 4px rgba(250, 204, 21, 0.1);
  transform: translateY(-3px);
}

.ws-card--premium:hover .ws-card-body::before,
.ws-card--premium:focus-within .ws-card-body::before,
.ws-card--premium.is-selected .ws-card-body::before,
.ws-card--premium:has(.ws-card-input:checked) .ws-card-body::before {
  opacity: 1;
}

.ws-card--premium.is-selected .ws-card-body,
.ws-card--premium:has(.ws-card-input:checked) .ws-card-body {
  border-color: rgba(250, 204, 21, 0.82);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.94), rgba(255, 251, 235, 0.8)),
    radial-gradient(circle at 92% 0%, rgba(250, 204, 21, 0.22), transparent 38%);
  box-shadow: 0 24px 56px rgba(15, 39, 71, 0.14), 0 0 0 1px rgba(250, 204, 21, 0.36), 0 0 28px rgba(250, 204, 21, 0.18);
  transform: translateY(-2px) scale(1.012);
}

.ws-card--premium .ws-card-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.58rem;
}

.ws-card--premium .ws-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, #041427, #16345c);
  color: #facc15;
  box-shadow: 0 14px 28px rgba(4, 20, 39, 0.18);
}

.ws-card--premium .ws-card-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 0.28rem 0.54rem;
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  color: #6f5108;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: wsBadgeFloat 3.4s ease-in-out infinite;
}

.ws-card--premium:nth-child(2) .ws-card-badge {
  animation-delay: 0.35s;
}

.ws-card--premium:nth-child(3) .ws-card-badge {
  animation-delay: 0.7s;
}

@keyframes wsBadgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.ws-card--premium .ws-card-radio {
  width: 30px;
  height: 30px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 39, 71, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: transparent;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.86);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ws-card--premium.is-selected .ws-card-radio,
.ws-card--premium:has(.ws-card-input:checked) .ws-card-radio {
  border-color: #facc15;
  background: #facc15;
  color: #041427;
  transform: rotate(360deg) scale(1.04);
}

.ws-card--premium .ws-card-radio::after {
  display: none;
}

.ws-card--premium .ws-card-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ws-card-eyebrow {
  margin-bottom: 0.28rem;
  color: #8a6408;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ws-card--premium .ws-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.04rem, 1.6vw, 1.22rem);
  line-height: 1.12;
  color: #071a31;
}

.ws-card--premium .ws-card-desc {
  margin-top: 0.48rem;
  min-height: 5.4em;
  color: #526277;
  font-size: 0.8rem;
  line-height: 1.5;
}

.ws-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.78rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(15, 39, 71, 0.08);
}

.ws-card-features span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 27px;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(15, 39, 71, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #223650;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.2;
}

.ws-card-features span::before {
  content: "";
  width: 0.34rem;
  height: 0.34rem;
  margin-right: 0.34rem;
  border-radius: 999px;
  background: #d6a832;
  flex: 0 0 auto;
}

.ws-single-card--premium {
  align-items: center;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255, 251, 235, 0.76)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.2), transparent 38%);
  box-shadow: 0 18px 42px rgba(15, 39, 71, 0.1);
}

.ws-single-card--premium .ws-card-badge {
  display: inline-flex;
  margin-bottom: 0.3rem;
  padding: 0.26rem 0.54rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  color: #6f5108;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .auth-form--register .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

@media (max-width: 1180px) {
  .ws-stack--premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .auth-step-list--six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .otp-box {
    width: 2.25rem;
    height: 2.65rem;
  }

  .auth-shell--register .auth-steps {
    position: static;
  }

  .auth-step-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.42rem;
  }

  .ws-stack--premium {
    grid-template-columns: 1fr;
  }

  .ws-card--premium .ws-card-body {
    padding: 0.95rem;
  }

  .ws-card--premium .ws-card-desc {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .ws-intro {
    align-items: center;
  }

  .ws-tooltip {
    right: auto;
    left: 0;
  }

  .ws-card--premium .ws-card-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .ws-card--premium .ws-card-icon {
    display: grid;
    width: 42px;
    height: 42px;
  }

  .ws-card--premium .ws-card-badge {
    font-size: 0.62rem;
  }

  .ws-card-features span {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-card--premium .ws-card-body,
  .ws-card--premium .ws-card-body::before,
  .ws-card--premium .ws-card-radio,
  .auth-shell--register .auth-step-line span,
  .auth-step-panel,
  .ws-card--premium .ws-card-badge {
    animation: none;
    transition: none;
  }
}

/* Auth database setup screen */
.auth-setup-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.auth-setup-card {
  width: min(560px, 100%);
  padding: 2.25rem 2rem;
  border-radius: 22px;
  border: 1px solid rgba(250, 204, 21, 0.22);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: 0 28px 64px rgba(4, 20, 39, 0.28);
  backdrop-filter: blur(18px);
}

.auth-setup-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-light));
  color: var(--auth-accent-strong);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.auth-setup-kicker {
  margin: 0 0 0.35rem;
  color: var(--auth-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-setup-card h1 {
  margin: 0 0 0.65rem;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  color: var(--auth-text);
  line-height: 1.15;
}

.auth-setup-lead {
  margin: 0 0 1.25rem;
  color: var(--auth-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.auth-setup-progress {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.auth-setup-progress__bar {
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, #facc15, #ca8a04);
}

.auth-setup-progress__bar.is-active {
  animation: authSetupPulse 1.4s ease-in-out infinite;
}

.auth-setup-progress__bar.is-complete {
  width: 100%;
  animation: none;
}

@keyframes authSetupPulse {
  0% { width: 18%; opacity: 0.65; }
  50% { width: 82%; opacity: 1; }
  100% { width: 18%; opacity: 0.65; }
}

.auth-setup-steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.auth-setup-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(15, 39, 71, 0.04);
  border: 1px solid rgba(15, 39, 71, 0.06);
}

.auth-setup-step--success .auth-setup-step__icon { color: #059669; }
.auth-setup-step--error .auth-setup-step__icon { color: var(--auth-error); }
.auth-setup-step--pending .auth-setup-step__icon { color: var(--auth-primary-light); }

.auth-setup-step__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.88rem;
}

.auth-setup-step__body strong { color: var(--auth-text); }
.auth-setup-step__body small { color: var(--auth-muted); }

.auth-setup-tables h2 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--auth-muted);
}

.auth-setup-tables ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

.auth-setup-tables li.is-ok { color: #059669; }
.auth-setup-tables li.is-missing { color: var(--auth-muted); }

.auth-setup-actions {
  display: grid;
  gap: 0.75rem;
}

.auth-setup-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--auth-muted);
  text-align: center;
}
