:root {
  --bg: #0b0d10;
  --panel: #14171c;
  --border: #262b33;
  --text: #e8eaed;
  --muted: #8a919c;
  --accent: #6ee7b7;
  --accent-dark: #0f2e22;
  --danger: #f87171;
  --danger-dark: #3a1414;
  --warn: #fbbf24;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 18px;
  margin: 0;
}

header h1 a {
  color: inherit;
  text-decoration: none;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  margin-top: 16px;
}

label:first-child { margin-top: 0; }

input, textarea {
  width: 100%;
  background: #0e1013;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
}

textarea { resize: vertical; min-height: 60px; }

button {
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 10px 16px;
  cursor: pointer;
  background: #1c2027;
  color: var(--text);
}

button.primary {
  background: var(--accent);
  color: #06251b;
  border-color: var(--accent);
}

button.danger {
  background: var(--danger);
  color: #2a0a0a;
  border-color: var(--danger);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button + button { margin-left: 8px; }

.actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }

.hidden { display: none !important; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-created { background: #2a2f38; color: var(--muted); }
.badge-funded { background: #1e2f4d; color: #93c5fd; }
.badge-delivered { background: #3a2f14; color: var(--warn); }
.badge-released { background: var(--accent-dark); color: var(--accent); }

.status-steps {
  display: flex;
  gap: 6px;
  margin: 20px 0;
}

.status-steps .step {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: 6px;
  font-size: 11px;
  background: #1a1d23;
  color: var(--muted);
  border: 1px solid var(--border);
}

.status-steps .step.done {
  background: var(--accent-dark);
  color: var(--accent);
  border-color: var(--accent);
}

.status-steps .step.current {
  background: #1e2f4d;
  color: #93c5fd;
  border-color: #3b5c8f;
}

.row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 14px; }
.row .k { color: var(--muted); }
.row .v { text-align: right; word-break: break-all; }

.tx-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.tx-step:first-child { border-top: none; }

.tx-step .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.tx-step.done .dot { background: var(--accent); }
.tx-step.active .dot { background: var(--warn); }
.tx-step.error .dot { background: var(--danger); }

.tx-step .label { flex: 1; font-size: 13px; }
.tx-step .label small { display: block; color: var(--muted); }

.error-banner {
  background: var(--danger-dark);
  border: 1px solid var(--danger);
  color: #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 16px;
  white-space: pre-wrap;
}

.info-banner {
  background: #14212f;
  border: 1px solid #2c4a6b;
  color: #bfdbfe;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 16px;
}

.share-box {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.share-box input { flex: 1; font-size: 13px; }

.muted { color: var(--muted); font-size: 13px; }

.wallet-pill {
  font-size: 13px;
  background: #1a1d23;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.role-pill {
  font-size: 12px;
  background: #1a1d23;
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  margin-left: 8px;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--warn);
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: -2px;
}

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