:root {
  --ink: #1b1b1b;
  --muted: #5b616b;
  --line: #d6d7d9;
  --teal: #0a7b9e;
  --teal-dark: #075d78;
  --header-bg: #2e2e2e;
  --paid: #1a7f37;
  --unpaid: #b42318;
  --page: #ffffff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--header-bg);
  color: #fff;
  border-bottom: 3px solid var(--teal);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: #fff;
  color: var(--header-bg);
  padding: 4px 12px;
  border-radius: 3px;
  width: max-content;
}
.brand-sub {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #cfd2d6;
  margin-top: 6px;
}
.brand-logo-img {
  max-height: 46px;
  max-width: 220px;
  object-fit: contain;
  display: block;
  background: #fff;
  padding: 4px 8px;
  border-radius: 3px;
}
.top-nav a { color: #e9eaec; margin-left: 20px; font-size: 14px; }

/* Subnav */
.subnav { background: #f0f0f0; border-bottom: 1px solid var(--line); }
.subnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.subnav-inner a { color: var(--teal); font-weight: 600; }
.divider { width: 1px; height: 18px; background: var(--line); }

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 20px 60px; }
.loading { color: var(--muted); }

.pay-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pay-head h1 { font-size: 30px; margin: 0; font-weight: 700; }

.status-badge {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--unpaid);
  text-transform: uppercase;
}
.status-badge.paid { background: var(--paid); }

.amount {
  font-size: 34px;
  font-weight: 700;
  margin: 18px 0 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

/* Transaction */
.section-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  color: var(--ink);
  margin: 24px 0 14px;
}
.txn-grid { margin: 0 0 24px; }
.txn-grid > div { display: flex; gap: 8px; padding: 3px 0; }
.txn-grid dt { font-weight: 700; margin: 0; min-width: 160px; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; }
.txn-grid dd { margin: 0; color: var(--ink); }

/* Fee table */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  font-size: 14px;
}
.fee-table th {
  text-align: left;
  background: #f0f0f0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.fee-table td { padding: 14px 12px; border-top: 1px solid var(--line); }
.fee-table .num { text-align: right; }

/* Payment details */
.pay-details h2 {
  font-size: 24px;
  margin: 36px 0 8px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--teal);
  display: inline-block;
}
.pay-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  margin-top: 16px;
  background: #fafafa;
}
.pay-note {
  background: #e6f4ea;
  border: 1px solid #aedcbb;
  color: var(--paid);
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 600;
}
.pay-btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 8px;
}
.pay-btn:hover { background: var(--teal-dark); text-decoration: none; }
.pay-fallback { color: var(--unpaid); font-weight: 600; margin-top: 10px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #f7f7f7;
  color: var(--muted);
  font-size: 13px;
}
.site-footer p { max-width: 1100px; margin: 0 auto; padding: 18px 20px; }

@media (max-width: 640px) {
  .txn-grid dt { min-width: 120px; }
  .fee-table { display: block; overflow-x: auto; }
}
