/* Afripay Studio — auth surfaces (signup / BOS onboarding) */
:root {
  --sa-accent: #6b46fe;
  --sa-accent-2: #8c68ff;
  --sa-ink: #0f172a;
  --sa-muted: #64748b;
  --sa-line: #e2e8f0;
  --sa-page: #0b1220;
  --sa-card: #ffffff;
  --sa-soft: #f8fafc;
  --sa-ok: #059669;
  --sa-danger: #dc2626;
  --sa-radius: 16px;
  --sa-shadow: 0 24px 64px rgba(2, 8, 23, 0.35);
}

body.studio-auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--sa-ink);
  background: var(--sa-page);
  -webkit-font-smoothing: antialiased;
}

.studio-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
}

.studio-auth__brand {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f8fafc;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(107, 70, 254, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 90%, rgba(140, 104, 255, 0.28), transparent 50%),
    linear-gradient(165deg, #0b1220 0%, #151b33 48%, #1a1040 100%);
}

.studio-auth__brand::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 55%;
  background: radial-gradient(circle, rgba(107, 70, 254, 0.22), transparent 70%);
  pointer-events: none;
}

.studio-auth__brand-top,
.studio-auth__brand-mid,
.studio-auth__brand-foot {
  position: relative;
  z-index: 1;
}

.studio-auth__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.studio-auth__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(145deg, var(--sa-accent), var(--sa-accent-2));
  box-shadow: 0 8px 24px rgba(107, 70, 254, 0.45);
}

.studio-auth__wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.studio-auth__wordmark strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.studio-auth__wordmark span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.62);
}

.studio-auth__eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.studio-auth__headline {
  margin: 0 0 14px;
  max-width: 18ch;
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.studio-auth__lede {
  margin: 0 0 28px;
  max-width: 36ch;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.78);
}

.studio-auth__benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.studio-auth__benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13.5px;
  line-height: 1.4;
  color: rgba(248, 250, 252, 0.9);
}

.studio-auth__benefits li::before {
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 0;
  border-radius: 999px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10' fill='%236b46fe'/%3E%3Cpath d='M5.8 10.2l2.6 2.6 5.8-5.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.studio-auth__brand-foot {
  margin-top: 36px;
  font-size: 12px;
  color: rgba(248, 250, 252, 0.55);
}

.studio-auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 40px);
  background:
    linear-gradient(180deg, #f4f6fb 0%, #eef1f8 100%);
}

.studio-auth__card {
  width: min(440px, 100%);
  background: var(--sa-card);
  border-radius: var(--sa-radius);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--sa-shadow);
  padding: clamp(22px, 4vw, 32px);
}

.studio-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sa-muted);
  text-decoration: none;
}

.studio-auth__back:hover {
  color: var(--sa-accent);
}

.studio-auth__card h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--sa-ink);
}

.studio-auth__card-sub {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sa-muted);
}

.studio-auth__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f0ff;
  color: #4c1d95;
  font-size: 12px;
  font-weight: 700;
}

.studio-auth__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sa-accent);
  box-shadow: 0 0 0 3px rgba(107, 70, 254, 0.18);
}

.studio-auth__alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
}

.studio-auth__alert--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.studio-auth__alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.studio-auth__alert--info {
  background: #f5f3ff;
  color: #4c1d95;
  border: 1px solid #ddd6fe;
}

.studio-auth__field {
  margin-bottom: 14px;
}

.studio-auth__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
}

.studio-auth__field input[type="text"],
.studio-auth__field input[type="email"],
.studio-auth__field input[type="tel"],
.studio-auth__field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--sa-line);
  border-radius: 12px;
  background: #fff;
  color: var(--sa-ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.studio-auth__field input:focus {
  border-color: var(--sa-accent);
  box-shadow: 0 0 0 4px rgba(107, 70, 254, 0.14);
}

.studio-auth__field input[readonly] {
  background: var(--sa-soft);
  color: #475569;
}

.studio-auth__phone {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
}

.studio-auth__phone-cc {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1.5px solid var(--sa-line);
  border-radius: 12px;
  background: var(--sa-soft);
  font-size: 14px;
  font-weight: 650;
  color: #334155;
}

.studio-auth__password {
  position: relative;
}

.studio-auth__password input {
  padding-right: 46px;
}

.studio-auth__toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-auth__toggle:hover {
  background: var(--sa-soft);
  color: var(--sa-ink);
}

.studio-auth__toggle svg {
  width: 18px;
  height: 18px;
}

.studio-auth__hint {
  margin: -6px 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sa-ok);
}

.studio-auth__terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--sa-muted);
}

.studio-auth__terms input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--sa-accent);
  flex-shrink: 0;
}

.studio-auth__terms a {
  color: var(--sa-accent);
  font-weight: 650;
  text-decoration: none;
}

.studio-auth__terms a:hover {
  text-decoration: underline;
}

.studio-auth__submit {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 750;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--sa-accent), var(--sa-accent-2));
  box-shadow: 0 10px 24px rgba(107, 70, 254, 0.32);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.studio-auth__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(107, 70, 254, 0.38);
}

.studio-auth__submit:active {
  transform: translateY(0);
}

.studio-auth__login {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--sa-muted);
}

.studio-auth__login a {
  color: var(--sa-accent);
  font-weight: 700;
  text-decoration: none;
}

.studio-auth__login a:hover {
  text-decoration: underline;
}

.studio-auth__legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--sa-line);
  font-size: 12px;
  color: #94a3b8;
}

.studio-auth__legal a {
  color: #64748b;
  text-decoration: none;
}

.studio-auth__legal a:hover {
  color: var(--sa-accent);
}

.studio-auth__trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  font-size: 11.5px;
  font-weight: 650;
  color: #94a3b8;
}

.studio-auth__legal-btn {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--sa-accent);
  cursor: pointer;
  text-decoration: none;
}

.studio-auth__legal-btn:hover {
  text-decoration: underline;
}

.studio-auth__terms .studio-auth__legal-btn {
  font-weight: 650;
}

.studio-legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(4px);
}

.studio-legal-overlay[hidden] {
  display: none !important;
}

.studio-legal-dialog {
  width: min(860px, 100%);
  height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(2, 8, 23, 0.45);
}

.studio-legal-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sa-line);
  background: #fff;
}

.studio-legal-dialog__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sa-ink);
}

.studio-legal-dialog__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.studio-legal-dialog__close:hover {
  background: #e2e8f0;
}

.studio-legal-dialog__frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #f8fafc;
}

.studio-legal-dialog__foot {
  padding: 12px 16px;
  border-top: 1px solid var(--sa-line);
  background: #fff;
  text-align: center;
}

.studio-legal-dialog__foot a {
  font-size: 13px;
  font-weight: 700;
  color: var(--sa-accent);
  text-decoration: none;
}

.studio-legal-dialog__foot a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .studio-auth {
    grid-template-columns: 1fr;
  }

  .studio-auth__brand {
    min-height: auto;
    padding: 22px 20px 28px;
  }

  .studio-auth__headline {
    max-width: none;
    font-size: 1.7rem;
  }

  .studio-auth__lede {
    max-width: none;
    margin-bottom: 18px;
  }

  .studio-auth__benefits {
    grid-template-columns: 1fr;
  }

  .studio-auth__brand-foot {
    margin-top: 18px;
  }

  .studio-auth__panel {
    padding: 0 16px 28px;
    background: transparent;
  }

  .studio-auth__card {
    margin-top: -8px;
    box-shadow: 0 18px 40px rgba(2, 8, 23, 0.28);
  }
}

@media (max-width: 480px) {
  .studio-auth__benefits li {
    font-size: 13px;
  }

  .studio-auth__phone {
    grid-template-columns: 84px 1fr;
  }
}
