/* ==========================================================================
   CourierPort — Sign up page
   ========================================================================== */

:root {
  --ink: #1b2033;
  --text: #0f1115;
  --label: #3a3e4a;
  --muted: #5e6371;
  --faint: #7b808b;
  --placeholder: #9aa0aa;
  --green: #2f6b2a;
  --green-hover: #3a7b34;
  --green-dark: #17351a;
  --border: #dde0e5;
  --border-hover: #a3a7b3;
  --line: #ecedf1;
  --page: #ececec;
  --white: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

p,
h1,
h2,
ul {
  margin: 0;
}

a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* ─── Page + blurred dashboard background ──────────────────────────────── */

.signup {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.signup__bg {
    position: absolute;
    left: 50%;
    top: 0;
    width: 100%;
    max-width: none;
    height: auto;
    transform: translateX(-50%);
    border-radius: 16px;
    box-shadow: 0 30px 80px -30px rgba(27, 32, 51, 0.35);
    filter: blur(10px) saturate(1.05);
    pointer-events: none;
    user-select: none;
}

.signup__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(246, 248, 244, 0.62) 0%, rgba(246, 248, 244, 0.82) 100%);
}

.signup__inner {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 34px 64px;
  display: flex;
  flex-direction: column;
}

/* ─── Header ───────────────────────────────────────────────────────────── */

.signup__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover {
  color: var(--ink);
  text-decoration: none;
}

.logo span {
  color: var(--green);
}

.signup__signin {
  font-size: 13.5px;
  color: var(--label);
}

/* ─── Main: benefits + card ────────────────────────────────────────────── */

.signup__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 88px;
  padding: 32px 0;
}

.benefits {
  width: 400px;
  display: flex;
  flex-direction: column;
  gap: 34px;
  display: none;  
}

.benefits h2 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
  text-wrap: balance;
}

.benefits ul {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.benefit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.benefit__icon {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15, 17, 21, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.benefit__title {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}

.benefit__text {
  display: block;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.card {
  width: 480px;
  max-width: 100%;
  padding: 30px 32px;
  background: var(--white);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(15, 17, 21, 0.04),
    0 30px 60px -12px rgba(23, 48, 26, 0.22),
    0 12px 24px -12px rgba(15, 17, 21, 0.12);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ─── Form ─────────────────────────────────────────────────────────────── */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.span-2 {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--label);
}

.input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 1px 1px rgba(15, 17, 21, 0.04);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.input::placeholder {
  color: var(--placeholder);
}

.input:hover {
  border-color: var(--border-hover);
}

.input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(58, 123, 52, 0.14);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 42px;
}

select.input {
  padding-right: 34px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 11px;
  top: 11px;
  pointer-events: none;
  color: var(--muted);
}

.toggle-password {
  position: absolute;
  right: 4px;
  top: 3px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toggle-password:hover {
  background: #f6f7f9;
}

.toggle-password .icon-hide {
  display: none;
}

.toggle-password[aria-pressed='true'] .icon-show {
  display: none;
}

.toggle-password[aria-pressed='true'] .icon-hide {
  display: block;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 17, 21, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn:hover {
  background: var(--green-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form-error {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fdecea;
  color: #b42318;
  font-size: 13px;
}

.form-error.is-visible {
  display: block;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */

.signup__footer {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--faint);
}

.signup__footer a {
  color: var(--muted);
  font-weight: 500;
}

/* ─── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .signup__main {
    gap: 48px;
  }

  .benefits {
    width: 340px;
  }

  .benefits h2 {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .signup__inner {
    padding: 20px 16px;
  }

  .signup__main {
    flex-direction: column;
    gap: 28px;
    padding: 28px 0;
  }

  .benefits {
    width: 100%;
    max-width: 480px;
    gap: 20px;
  }

  .benefits h2 {
    font-size: 24px;
  }

  .benefits ul {
    display: none;
  }

  .card {
    padding: 24px 20px;
  }

  .signup__bg {
    top: 64px;
    width: 1100px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .span-2 {
    grid-column: auto;
  }

  .signup__signin {
    font-size: 12.5px;
  }
}

/* ─── Signup steps, login, services ─────────────────────────────────── */

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.flow {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.card--wide {
  width: 680px;
}

.card--status {
  min-height: 220px;
  align-items: center;
  justify-content: center;
}

.card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card__lead,
.card__note {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.card__lead strong {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.card__note {
  text-align: center;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover:not(:disabled) {
  color: var(--green-dark);
  text-decoration: underline;
}

.link-btn:disabled {
  color: var(--faint);
  cursor: default;
}

.btn.is-busy {
  cursor: progress;
}

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp__box {
  height: 52px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef5ed;
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1.5;
}

.notice strong {
  font-weight: 600;
}

.group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.group legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--label);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.swatch {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(15, 17, 21, 0.12);
  transition: transform 0.12s;
}

.swatch:hover {
  transform: scale(1.06);
}

.swatch[aria-pressed='true'],
.swatch--custom.is-selected {
  box-shadow:
    0 0 0 2px var(--white),
    0 0 0 4px var(--text);
}

.swatch--custom {
  width: auto;
  height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--label);
}

.swatch--custom:hover {
  transform: none;
}

.swatch--custom input {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.swatch--custom input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.swatch--custom input::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

.swatch--custom input::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

.logos {
  min-height: 300px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 92px;
  gap: 10px;
  transition: opacity 0.15s;
}

.logos.is-loading {
  opacity: 0.5;
}

.logo-card {
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.logo-card:hover {
  border-color: var(--border-hover);
}

.logo-card[aria-pressed='true'] {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(58, 123, 52, 0.18);
}

.logo-card img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.spinner {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tasks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--label);
}

.task.is-done {
  color: var(--text);
}

.task.is-done .spinner {
  animation: none;
  position: relative;
  border-color: var(--green);
  background: var(--green);
}

.task.is-done .spinner::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.task.is-stopped .spinner {
  animation: none;
  border-color: var(--border);
}

.brandbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.brandbar__logo {
  display: block;
  max-width: min(320px, 100%);
  max-height: 72px;
}

.services {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 14px;
  align-items: center;
  color: var(--text);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.service:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(58, 123, 52, 0.12);
  color: var(--text);
  text-decoration: none;
}

.service__name {
  font-size: 14.5px;
  font-weight: 600;
}

.service__host {
  grid-row: 2;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.service__open {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

@media (max-width: 480px) {
  .logos {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.5s;
  }
}
