* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: #f7f7f8;
  color: #121216;
  font-family: "DM Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #111114;
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.55fr);
  gap: 1rem;
  align-items: start;
}

.panel {
  border: 1px solid #e1e1e7;
  border-radius: 22px;
  background: #fff;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 22px 55px rgba(24, 24, 34, 0.06);
}

.hero {
  display: grid;
  gap: 0.85rem;
}

.hero h1,
.panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.muted {
  color: #676771;
}

.amount {
  display: grid;
  gap: 0.25rem;
  margin: 1rem 0;
}

.amount strong {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
}

.qr {
  display: grid;
  place-items: center;
  border: 1px solid #e1e1e7;
  border-radius: 18px;
  background: #fafafa;
  padding: 1rem;
}

.qr img {
  width: min(280px, 100%);
  height: auto;
}

.button,
button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #6f35ff;
  color: #fff;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  border-color: #e1e1e7;
  background: #fff;
  color: #121216;
}

form {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: #121216;
  font-weight: 760;
}

input,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e1e1e7;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.meta {
  display: grid;
  gap: 0.5rem;
  margin: 0;
}

.meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #eeeef3;
  padding-bottom: 0.45rem;
}

.meta dt {
  color: #676771;
}

.meta dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.badge {
  width: fit-content;
  border: 1px solid #e1e1e7;
  border-radius: 999px;
  background: #fff;
  color: #6f35ff;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.table {
  display: grid;
  gap: 0.7rem;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid #e1e1e7;
  border-radius: 16px;
  background: #fff;
  padding: 0.9rem;
}

.notice {
  border: 1px solid #e8ddff;
  border-radius: 14px;
  background: #f7f3ff;
  color: #4320a8;
  padding: 0.75rem 0.85rem;
  font-weight: 750;
}

.processing-panel {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.processing-panel .badge,
.processing-panel .actions {
  margin-inline: auto;
}

.loader {
  width: 58px;
  height: 58px;
  margin: 0 auto 0.4rem;
  border: 5px solid #eeeef3;
  border-top-color: #6f35ff;
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack h2 {
  margin: 0;
}

.steps {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-left: 1.25rem;
  color: #353541;
}

.steps code,
.notice code {
  border-radius: 8px;
  background: #f1f1f4;
  padding: 0.12rem 0.32rem;
}

.admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-head h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.stat {
  display: grid;
  gap: 0.15rem;
}

.stat strong {
  font-size: 2rem;
  line-height: 1;
}

.payment-card {
  display: grid;
  gap: 1rem;
  border: 1px solid #e1e1e7;
  border-radius: 20px;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(24, 24, 34, 0.05);
}

.payment-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.payment-main h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.payment-amount {
  font-size: 1.5rem;
  white-space: nowrap;
}

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

.pill {
  width: fit-content;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pill.neutral {
  background: #f0f0f3;
  color: #40404a;
}

.pill.warning {
  background: #fff4d7;
  color: #8a5a00;
}

.pill.success {
  background: #e7f8ed;
  color: #0c6b38;
}

.pill.danger {
  background: #feeceb;
  color: #a11f1b;
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-actions form {
  display: inline-flex;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 1rem, 520px);
    padding: 0.75rem 0 1.5rem;
  }

  .topbar {
    padding: 0.65rem 0 1rem;
  }

  .grid,
  .row,
  .stats,
  .compact {
    grid-template-columns: 1fr;
  }

  .admin-head,
  .payment-main {
    align-items: stretch;
    flex-direction: column;
  }

  .panel {
    border-radius: 18px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  button,
  .card-actions form {
    width: 100%;
  }
}
