/* StellarClose Receivables — shared styles */
:root {
  --white: #FFFFFF;
  --offwhite: #FAFBFC;
  --periwinkle: #A3A3CC;
  --periwinkle-deep: #5C5C99;
  --ink: #211F41;
  --silver: #C8CCD3;
  --tint: #E8E8F2;
  --green: #2D8A5F;
  --amber: #C7860B;
  --red: #B84840;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--offwhite);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--periwinkle-deep); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 560px; margin: 0 auto; padding: 0 24px; }

/* Header */
header.app {
  padding: 22px 0;
  border-bottom: 1px solid var(--tint);
  background: var(--white);
}
header.app .wrap { display: flex; align-items: center; justify-content: space-between; }
.wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.wordmark .stellar { color: var(--periwinkle); }
.wordmark .close   { color: var(--ink); }
.wordmark .sub {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--periwinkle-deep);
  text-transform: uppercase;
  margin-top: 2px;
}

header.app nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  margin-left: 24px;
  font-size: 15px;
}
header.app nav a:hover { color: var(--periwinkle-deep); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  font-family: inherit;
}
.btn:hover { background: var(--periwinkle-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--silver);
}
.btn-ghost:hover { background: var(--tint); border-color: var(--periwinkle); color: var(--ink); }
.btn-large { padding: 16px 28px; font-size: 17px; }
.btn-block { display: block; width: 100%; }

/* Card */
.card {
  background: var(--white);
  border: 1px solid var(--tint);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 4px 16px rgba(33, 31, 65, 0.04);
}
.card h1, .card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--ink);
}
.card h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.card h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.card p.lede { color: #555; margin-bottom: 24px; font-size: 15px; }

/* Form fields */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input[type=text],
.field input[type=email],
.field input[type=number],
.field input[type=date],
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--silver);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--periwinkle);
  box-shadow: 0 0 0 3px rgba(163,163,204,0.18);
}
.field .hint { font-size: 13px; color: #777; margin-top: 6px; }
.field .err { font-size: 13px; color: var(--red); margin-top: 6px; }

/* Wizard progress */
.progress-row {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
}
.progress-row .step-dot {
  flex: 1;
  height: 6px;
  background: var(--tint);
  border-radius: 3px;
}
.progress-row .step-dot.done { background: var(--periwinkle); }
.progress-row .step-dot.active { background: var(--periwinkle-deep); }

/* Choice cards (intake choice, tone pick) */
.choice-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}
.choice {
  display: block;
  padding: 22px 24px;
  background: var(--white);
  border: 2px solid var(--tint);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.choice:hover { border-color: var(--periwinkle); background: #fdfdff; }
.choice.selected { border-color: var(--periwinkle-deep); background: var(--tint); }
.choice .label {
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 4px;
  font-family: 'Playfair Display', serif;
}
.choice .desc { color: #555; font-size: 14px; }
.choice .icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--periwinkle);
  color: var(--white);
  text-align: center;
  line-height: 36px;
  font-weight: 700;
  margin-right: 12px;
  vertical-align: middle;
  font-size: 18px;
}

/* Forward address pill */
.forward-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 999px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 14px;
  cursor: pointer;
  user-select: all;
}
.forward-pill .copy-icon { font-size: 12px; opacity: 0.7; }

/* Confetti / done */
.celebrate {
  text-align: center;
  padding: 32px 0;
}
.celebrate .big-emoji { font-size: 64px; margin-bottom: 12px; }

/* Status pills (for dashboard) */
.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-paid { background: #DAF1E5; color: var(--green); }
.status-sent { background: var(--tint); color: var(--periwinkle-deep); }
.status-overdue { background: #FBE9E5; color: var(--red); }
.status-disputed { background: #FBF1DE; color: var(--amber); }

/* Footer */
footer.app {
  padding: 32px 0 28px;
  background: var(--ink);
  color: var(--silver);
  font-size: 13px;
  margin-top: 60px;
}
footer.app a { color: var(--silver); text-decoration: none; margin-right: 16px; }
footer.app a:hover { color: var(--periwinkle); }
footer.app .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }

/* Utilities */
.center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-12 { margin-bottom: 12px; }
.mb-24 { margin-bottom: 24px; }
.muted { color: #666; }
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-error { background: #FBE9E5; color: var(--red); border: 1px solid #F5C7C0; }
.flash-success { background: #DAF1E5; color: var(--green); border: 1px solid #B9E3CC; }

@media (max-width: 600px) {
  .card { padding: 24px 20px; }
  header.app nav a { display: none; }
  header.app nav a.btn { display: inline-block; }
}
