:root {
  --navy: #1f3a5f;
  --blue: #2e75b6;
  --green: #2e8b57;
  --red: #c0392b;
  --amber: #b8860b;
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e2e7ee;
  --ink: #25303b;
  --muted: #6a7682;
}

* { box-sizing: border-box; }

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

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--navy); color: #fff; padding: 0 24px; height: 58px;
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.brand .logo { color: var(--blue); }
.mode {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
  margin-left: 8px; vertical-align: middle;
}
.mode-demo { background: #b8860b; color: #fff; }
.mode-sandbox { background: var(--green); color: #fff; }
.mode-live { background: var(--red); color: #fff; }
nav a { color: #cdd9e6; text-decoration: none; margin-left: 20px; font-weight: 600; font-size: 14px; }
nav a:hover { color: #fff; }

main { max-width: 980px; margin: 28px auto; padding: 0 20px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 26px; box-shadow: 0 1px 3px rgba(20,40,70,.05); margin-bottom: 22px;
}
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }

h1 { font-size: 24px; margin: 0 0 4px; color: var(--navy); }
h2 { font-size: 17px; margin: 0 0 14px; color: var(--navy); }
.sub { color: var(--muted); margin: 0 0 20px; }

label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 5px; }
input[type=text], input[type=email], input[type=search] {
  width: 100%; padding: 11px 13px; border: 1px solid #cfd8e3; border-radius: 8px;
  font-size: 15px;
}
input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 6px; }
.plan { position: relative; }
.plan input { position: absolute; opacity: 0; }
.plan label {
  display: block; border: 2px solid var(--line); border-radius: 10px; padding: 16px 12px;
  text-align: center; cursor: pointer; margin: 0;
}
.plan input:checked + label { border-color: var(--blue); background: #eef5fc; }
.plan .price { font-size: 22px; font-weight: 700; color: var(--navy); }
.plan .per { font-size: 12px; color: var(--muted); }

.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 8px; font-size: 15px; font-weight: 600;
  text-decoration: none; margin-top: 18px;
}
.btn:hover { background: #255f96; }
.btn.green { background: var(--green); }
.btn.green:hover { background: #246b43; }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid #cfd8e3; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #e0b4ae; }
.btn.full { width: 100%; text-align: center; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: 0; }
td a { color: var(--blue); text-decoration: none; font-weight: 600; }

.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pill.active { background: #e3f3ea; color: var(--green); }
.pill.pending_mandate { background: #fbf0d8; color: var(--amber); }
.pill.cancelled { background: #f1e2e0; color: var(--red); }
.pill.submitted, .pill.paid_out, .pill.pending { background: #e6eefb; color: var(--blue); }
.pill.failed { background: #f1e2e0; color: var(--red); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.stat .n { font-size: 30px; font-weight: 800; color: var(--navy); }
.stat .l { color: var(--muted); font-size: 13px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.flash-success { background: #e3f3ea; color: var(--green); border: 1px solid #bfe3cd; }
.flash-error { background: #f1e2e0; color: var(--red); border: 1px solid #e6c3bd; }

.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.muted { color: var(--muted); }
.big-tick { font-size: 52px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; }
.kv .k { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; }

.staff-link { color: #9fb0c2 !important; font-size: 13px; font-weight: 600; }
.staff-link:hover { color: #fff !important; }

.parq-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.parq-row:last-child { border-bottom: 0; }
.parq-q { font-size: 13.5px; margin-bottom: 6px; }
.parq-ans { display: flex; gap: 18px; }
.yn { display: inline-flex; align-items: center; gap: 6px; font-weight: 600;
      font-size: 13px; margin: 0; cursor: pointer; }
.yn input { width: auto; }

.waiver-box { background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px;
              padding: 8px 18px; max-height: 200px; overflow-y: auto; }
.waiver-box ul { margin: 8px 0; padding-left: 18px; }
.waiver-box li { font-size: 13px; margin-bottom: 8px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px;
         font-weight: 500; margin-top: 14px; cursor: pointer; }
.agree input { width: auto; margin-top: 3px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.bank-box { background: #f7f9fc; border: 1px dashed #cfd8e3; border-radius: 8px; padding: 14px; font-size: 13px; }
.result { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: 0; }
.result .name { font-weight: 700; }
.status-yes { color: var(--green); font-weight: 700; }
.status-no { color: var(--red); font-weight: 700; }
