/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:      #0d9488;
  --brand-dk:   #0f766e;
  --brand-lt:   #ccfbf1;
  --ink:        #1c1917;
  --ink-soft:   #78716c;
  --border:     #e7e5e4;
  --bg:         #fafaf9;
  --white:      #ffffff;
  --danger:     #dc2626;
  --radius:     12px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Utility ───────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.logo {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -1.5px;
}
.tagline {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: .2rem;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.4rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-full { width: 100%; }

.btn-primary  { background: var(--brand); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dk); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-soft); color: var(--ink); }

.btn-google {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--border);
  font-weight: 600;
}
.btn-google:hover:not(:disabled) { border-color: var(--brand); }

.btn-sm {
  padding: .4rem .9rem;
  font-size: .875rem;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: .875rem;
}
.field label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
}
.field input,
.field select {
  padding: .625rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
}
.field input:focus,
.field select:focus { border-color: var(--brand); }
.field .hint { font-size: .8rem; color: var(--ink-soft); }

.error-msg {
  font-size: .85rem;
  color: var(--danger);
  margin-top: .3rem;
  display: none;
}
.error-msg.visible { display: block; }

/* ── Colour swatches ───────────────────────────────────────────────────────── */
.swatch-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  outline: none;
  transition: transform .15s, border-color .15s;
  flex-shrink: 0;
}
.swatch:hover { transform: scale(1.2); }
.swatch.selected { border-color: var(--ink); }

/* ── Member list ───────────────────────────────────────────────────────────── */
.member-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem;
}
.member-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .875rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: .95rem;
}
.member-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
}
.member-name { font-weight: 600; flex: 1; }
.member-role { font-size: .8rem; color: var(--ink-soft); text-transform: capitalize; }
.btn-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
}
.btn-remove:hover { color: var(--danger); }

/* ── Add-member mini form ──────────────────────────────────────────────────── */
.add-member-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.add-member-box h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  margin-bottom: .75rem;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 380px) { .two-col { grid-template-columns: 1fr; } }

/* ── Progress indicator ────────────────────────────────────────────────────── */
.progress {
  display: flex;
  align-items: center;
  margin-bottom: 1.75rem;
}
.progress-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background .25s, color .25s;
}
.progress-dot.active { background: var(--brand); color: var(--white); }
.progress-dot.done   { background: var(--brand-lt); color: var(--brand-dk); }
.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 5px;
  transition: background .25s;
}
.progress-line.done { background: var(--brand-lt); }

/* ── Wizard step ───────────────────────────────────────────────────────────── */
.step h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: .2rem; }
.step .sub { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.5rem; }
.step-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
}
.step-actions .btn { flex: 1; }

/* ── Forwarding address display ────────────────────────────────────────────── */
.address-box {
  background: var(--brand-lt);
  border: 1.5px solid #99f6e4;
  border-radius: 10px;
  padding: .875rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
}
.address-text {
  font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
  font-size: .9rem;
  color: var(--brand-dk);
  font-weight: 600;
  flex: 1;
  word-break: break-all;
}
.btn-copy {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand);
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .5rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.btn-copy:hover { background: rgba(13,148,136,.12); }

/* ── Step-by-step instructions ─────────────────────────────────────────────── */
.instructions {
  list-style: none;
  margin: 1rem 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.instructions li {
  display: flex;
  gap: .875rem;
  padding: .75rem 1rem;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.instructions li:last-child { border-bottom: none; }
.step-num {
  width: 22px;
  height: 22px;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Checkboxes ────────────────────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .25rem;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  cursor: pointer;
  padding: .4rem .6rem;
  border-radius: 6px;
  transition: background .1s;
}
.checkbox-group label:hover { background: var(--bg); }
.checkbox-group input[type="checkbox"] { accent-color: var(--brand); width: 16px; height: 16px; }

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
