:root {
  --ink: #172026;
  --muted: #66747c;
  --line: #d7e0e4;
  --bg: #f2f6f7;
  --brand: #0e7c66;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

button, input, select { font: inherit; }

.payment-shell {
  width: min(1040px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(300px, .75fr);
  gap: 18px;
  align-items: center;
  padding: 28px 0;
}

.hero {
  min-height: 460px;
  border-radius: 8px;
  padding: 28px;
  background: #13262b;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  max-width: 560px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  margin: 0 0 16px;
}

.hero p:not(.eyebrow) {
  max-width: 520px;
  color: #bfd1cf;
  font-size: 18px;
  line-height: 1.55;
}

.container {
  width: min(620px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow { color: #a7ddd1; }

h1, h2, p { margin-top: 0; }
h1 { font-size: 44px; margin-bottom: 18px; }
h2 { margin-bottom: 18px; }

form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.primary, .button-link {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-link.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.secondary-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.alert {
  margin-bottom: 14px;
  border-radius: 7px;
  background: #ffe8e2;
  color: #8f261d;
  padding: 12px;
}

.notice {
  margin-bottom: 14px;
  border-radius: 7px;
  background: #e6f5ef;
  color: #0e604f;
  padding: 12px;
}

.summary {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

dt { color: var(--muted); font-weight: 800; }
dd { margin: 0; text-align: right; }

.admin-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0;
}

.admin-topbar,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-topbar h1,
.panel-head h2 {
  margin-bottom: 0;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.filter-form {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.secondary {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

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

.status {
  display: inline-flex;
  border-radius: 999px;
  background: #e6f5ef;
  color: #0e604f;
  padding: 5px 10px;
  font-weight: 800;
}

.small {
  min-height: 36px;
  padding: 0 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.event-list {
  display: grid;
  gap: 12px;
}

.event-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}

.event-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

pre {
  overflow-x: auto;
  margin: 0;
  border-radius: 7px;
  background: #13262b;
  color: #eaf5f3;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
}

.receipt-page {
  width: min(720px, 50vw);
  margin: 0 auto;
  padding: 28px 0 36px;
}

.receipt {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 32px 26px;
  color: var(--ink);
}

.receipt header {
  text-align: center;
  margin-bottom: 28px;
}

.receipt header h1 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
  text-transform: uppercase;
}

.receipt header p {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 0 0 34px;
}

.receipt-meta dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.receipt-meta div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  border: 0;
  padding: 0;
}

.receipt-meta dt {
  color: var(--muted);
  font-size: 16px;
}

.receipt-meta dd {
  text-align: left;
  font-size: 16px;
  font-weight: 800;
}

.receipt hr {
  border: 0;
  border-top: 1px dashed #7e8b92;
  border-bottom: 1px dashed #7e8b92;
  height: 7px;
  margin: 28px 0 48px;
}

.receipt h2 {
  text-align: center;
  font-size: 38px;
  font-weight: 500;
  margin-bottom: 30px;
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px dashed #7e8b92;
  padding: 14px 0;
  font-size: 20px;
  font-weight: 900;
}

.receipt-total strong {
  font-size: 25px;
}

.receipt-type,
.receipt-card,
.receipt-holder,
.receipt-auth,
.receipt-note,
.receipt-copy,
.receipt-bank {
  text-align: center;
}

.receipt-type {
  margin: 38px 0 8px;
  color: var(--muted);
  font-size: 28px;
  font-weight: 900;
}

.receipt-card,
.receipt-holder {
  margin: 8px 0;
  font-size: 22px;
  font-weight: 800;
}

.receipt-auth {
  margin: 20px 0 34px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
}

.receipt-note {
  margin: 0 0 38px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
}

.receipt-copy {
  margin: 0 0 38px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
}

.receipt-bank {
  margin: 0;
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
}

.receipt-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}

@media print {
  body {
    background: #fff;
  }

  .receipt-page {
    width: 100%;
    padding: 0;
  }

  .receipt {
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .receipt-actions {
    display: none;
  }
}

@media (max-width: 820px) {
  .payment-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero {
    min-height: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar,
  .panel-head,
  .filter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .receipt-page {
    width: min(620px, calc(100% - 24px));
  }

  .receipt {
    padding: 24px 16px;
  }

  .receipt header h1 {
    font-size: 25px;
  }

  .receipt header p,
  .receipt h2 {
    font-size: 28px;
  }

  .receipt-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .receipt-actions {
    flex-direction: column;
  }
}
