:root {
  --brand: #4f46e5;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --bad: #dc2626;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 18px 80px; }
.wide { max-width: 1100px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 9px 15px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; transition: filter .15s, background .15s;
}
.btn:hover { background: #f3f4f6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); background: var(--brand); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 20px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: default; }
label.field { display: block; font-size: 13px; font-weight: 600; color: #374151; }
label.field > span.hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px;
  font: inherit; background: #fff; color: var(--text);
}
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* pills */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.pending { background: #f3f4f6; color: var(--muted); }
.pill.done { background: var(--warn-bg); color: var(--warn); }
.pill.verified, .pill.success { background: var(--ok-bg); color: var(--ok); }
.pill.auto { background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); }

/* progress */
.progress { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--ok); border-radius: 99px; transition: width .4s; }

/* platform icons */
.pi {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.pi svg { width: 22px; height: 22px; }
.pi.sm { width: 26px; height: 26px; flex-basis: 26px; border-radius: 7px; }
.pi.sm svg { width: 15px; height: 15px; }

/* copy chip */
.copy {
  display: flex; align-items: center; gap: 10px; background: #f9fafb; border: 1px dashed #d1d5db;
  border-radius: 10px; padding: 8px 8px 8px 12px;
}
.copy .lbl { font-size: 12px; color: var(--muted); }
.copy .val { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 15px; word-break: break-all; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 50;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.alert.warn { background: var(--warn-bg); color: #92400e; border: 1px solid #fde68a; }
.alert.bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.ok { background: var(--ok-bg); color: #065f46; border: 1px solid #a7f3d0; }

.check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.check:hover { border-color: #c7cbd3; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
