:root {
  --bg: #0f172a;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #6d28d9;
  --ok: #047857;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #f8fafc;
  color: var(--ink);
}
a { color: var(--brand); }
.wrap { max-width: 980px; margin: 0 auto; padding: 28px 16px 48px; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.brand { font-weight: 800; letter-spacing: .02em; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
h1 { margin: 0 0 6px; font-size: 1.4rem; }
.muted { color: var(--muted); margin: 0 0 14px; }
label { display: block; font-size: .78rem; font-weight: 700; margin: 10px 0 6px; }
input, select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.row { display: flex; gap: 10px; align-items: end; }
.row .field { flex: 1; }
button, .btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.ghost, .btn.ghost { background: #e2e8f0; color: #0f172a; }
.err { background: #fff7ed; color: #9a3412; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
.ok { background: #ecfdf5; color: #047857; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: .75rem; font-weight: 800; background: #fef3c7; color: #92400e; }
.pill.on { background: #d1fae5; color: #047857; }
.link { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; word-break: break-all; }
.plastic {
  background: #111827;
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  min-height: 180px;
}
.plastic.is-mc {
  background: linear-gradient(145deg, #111111, #2a2a2a);
}
.plastic.is-visa {
  background: linear-gradient(145deg, #064e3b, #059669);
}
.plastic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.logo.visa {
  font-weight: 900;
  font-style: italic;
  letter-spacing: .12em;
  font-size: 1.35rem;
  line-height: 1;
}
.logo.mc { position: relative; width: 48px; height: 30px; flex: 0 0 48px; }
.logo.mc span {
  position: absolute;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.logo.mc span:first-child { left: 0; background: #eb001b; }
.logo.mc span:last-child { right: 0; background: #f79e1b; opacity: .95; }
#billing { white-space: pre-line; }
.plastic .pan { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; letter-spacing: .08em; margin-top: 28px; }
.meta { display: flex; gap: 18px; margin-top: 16px; font-family: ui-monospace, Consolas, monospace; }
.count { font-family: ui-monospace, Consolas, monospace; font-size: 2rem; font-weight: 800; color: #0f766e; }
.brands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.brand {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.brand.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #f5f3ff; }
.tx { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
@media (max-width: 800px) { .grid, .row, .brands { grid-template-columns: 1fr; display: grid; } }
