:root {
  --bg: #f5f5f0;
  --card-bg: #ffffff;
  --text: #16181d;
  --text-muted: #6b7075;
  --border: #e4e4de;
  /* TODO: source per-partner brand color once Connect.API's provider config exists (architecture.md) */
  --brand: #2f6f4f;
  --brand-contrast: #ffffff;
  --brand-soft: #eaf3ee;
  --danger: #b3261e;
  --danger-soft: #fbeceb;
  --radius-card: 20px;
  --radius-control: 10px;
  --shadow-card: 0 1px 2px rgba(20, 20, 15, 0.04), 0 12px 32px rgba(20, 20, 15, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 36px 32px;
}

.card--wide {
  max-width: 480px;
}

.card--center {
  text-align: center;
}

.badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.badge--center {
  margin-left: auto;
  margin-right: auto;
}

.badge--brand {
  background: var(--text);
  color: #fff;
}

.badge--success {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge--error {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge svg {
  width: 26px;
  height: 26px;
}

.title {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.title--sm {
  font-size: 18px;
}

.subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.subtitle--tight {
  margin-bottom: 0;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: var(--radius-control);
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-contrast);
}

.btn-primary:hover {
  filter: brightness(0.94);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: #fafaf7;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-spacer {
  height: 10px;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 20px;
}

.footnote {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

code {
  background: #f2f2ec;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}
