:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #101827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.2) 38%, rgba(244, 247, 251, 1) 39%),
    #f4f7fb;
}

button {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 14px;
}

.panel {
  width: min(100%, 520px);
  min-height: 640px;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.16);
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #16a34a;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
}

.eyebrow,
.muted {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 1px 0 0;
  font-size: 30px;
  line-height: 1.08;
}

.lookup,
.status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 10px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.device-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  margin-bottom: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.device-strip strong {
  display: block;
  margin-top: 3px;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.35;
}

.status.online {
  background: #dcfce7;
  color: #166534;
}

.status.offline {
  background: #fee2e2;
  color: #991b1b;
}

.state {
  min-height: 500px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
}

.state p {
  margin: 0;
  color: #475569;
  font-weight: 700;
}

.state-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fee2e2;
  color: #991b1b;
  font-size: 30px;
  font-weight: 900;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #e2e8f0;
  border-top-color: #16a34a;
  animation: spin 0.8s linear infinite;
}

.content {
  padding-top: 8px;
}

.amount {
  display: grid;
  place-items: center;
  min-height: 152px;
  margin-bottom: 12px;
  padding: 20px 12px;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
}

.amount span {
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.amount strong {
  margin-top: 8px;
  font-size: 56px;
  line-height: 1;
}

.message {
  min-height: 48px;
  margin: 0 0 14px;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.actions {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.primary-button,
.ghost-button {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  background: #16a34a;
  color: #ffffff;
}

.ghost-button {
  background: #ffffff;
  color: #166534;
  border-color: #bbf7d0;
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.inline-error {
  margin: 10px 0;
  padding: 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.invoice {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.qr-box {
  display: grid;
  place-items: center;
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-box span {
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

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

.bank-button {
  min-height: 104px;
  padding: 10px 8px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  cursor: pointer;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  font-weight: 800;
}

.bank-button img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
}

.bank-button span {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
}

[hidden] {
  display: none !important;
}

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

@media (max-width: 420px) {
  .shell {
    align-items: start;
    padding: 10px;
  }

  .panel {
    min-height: calc(100vh - 20px);
    padding: 14px;
  }

  h1 {
    font-size: 26px;
  }

  .amount {
    min-height: 132px;
  }

  .amount strong {
    font-size: 46px;
  }

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