:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #5f6f7f;
  --line: #dbe3ea;
  --panel: #ffffff;
  --soft: #eef5f2;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warm: #f7b955;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(247, 185, 85, 0.16)),
    #f8faf9;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: center;
  padding: 48px 0;
}

.intro {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.25rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.lead {
  max-width: 480px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.6;
}

.payment-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(28, 38, 48, 0.12);
  padding: 28px;
}

form,
fieldset,
label {
  display: grid;
  gap: 14px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
label span {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 750;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.amount-choice,
.primary {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.amount-choice {
  color: var(--ink);
  background: var(--soft);
  border: 1px solid transparent;
}

.amount-choice.active {
  color: #ffffff;
  background: var(--accent);
}

.custom-amount {
  margin-top: 4px;
}

.currency-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.currency-input span {
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.currency-input input {
  border: 0;
  padding: 0;
  min-height: 46px;
  outline: 0;
}

textarea {
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.primary {
  margin-top: 4px;
  color: #ffffff;
  background: var(--accent);
}

.primary:hover,
.amount-choice.active:hover {
  background: var(--accent-strong);
}

.fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.status-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.status-box {
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(28, 38, 48, 0.12);
}

.status-box h1 {
  font-size: 2.2rem;
  line-height: 1.08;
}

.status-box p {
  color: var(--muted);
  line-height: 1.6;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.admin-page {
  min-height: 100vh;
  background: #f6f8f7;
}

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

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.admin-header h1,
.admin-login h1 {
  font-size: 3rem;
  line-height: 1;
}

.admin-login {
  width: min(420px, calc(100% - 32px));
  margin: 14vh auto 0;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(28, 38, 48, 0.12);
}

.admin-login form {
  margin-top: 22px;
}

.admin-error,
.admin-notice {
  margin: 0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.admin-error {
  color: #b42318;
  background: #fff1f0;
}

.admin-notice {
  margin-bottom: 18px;
  color: #05603a;
  background: #ecfdf3;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stats div {
  min-height: 92px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-stats span,
.subtle {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.admin-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 1.55rem;
  line-height: 1.1;
}

.admin-table-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

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

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #475569;
  background: #f8faf9;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.strong {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.amount-cell {
  font-weight: 850;
  white-space: nowrap;
}

.message-cell {
  max-width: 280px;
  color: #334155;
  line-height: 1.45;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: capitalize;
}

.status-pending {
  color: #92400e;
  background: #fffbeb;
}

.status-complete {
  color: #05603a;
  background: #ecfdf3;
}

.status-cancelled,
.status-failed {
  color: #b42318;
  background: #fff1f0;
}

.secondary-button,
.danger-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button {
  color: var(--ink);
}

.danger-button {
  color: #b42318;
}

.empty-cell {
  padding: 34px 16px;
  color: var(--muted);
  text-align: center;
}

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

  .intro {
    padding-top: 20px;
  }

  .admin-header {
    align-items: start;
    flex-direction: column;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 1040px);
    padding: 28px 0;
  }

  .payment-panel {
    padding: 20px;
  }

  .amount-grid,
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }
}
