:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #f5f5f5;
  background: #0a0a0a;
  font-synthesis: none;
  --secondary: #b5b5b5;
  --border: #3b3b3b;
  --accent: #ededed;
}

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

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 40% 0%, #202020 0, transparent 38rem),
    #0a0a0a;
}

.shell {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: clamp(28px, 7vh, 64px) 24px max(30px, env(safe-area-inset-bottom));
}

h1 {
  margin: 0 0 7px;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.intro, .limits, .notice, .invoice-card p { color: var(--secondary); }
.intro { margin: 0 0 25px; }
.notice { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.notice[data-error] {
  padding: 0 0 0 10px;
  border-left: 2px solid #b5b5b5;
  color: #ededed;
}

.amount-card, .invoice-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(150deg, #232323, #181818);
  box-shadow: 0 14px 30px #00000040;
}

label { color: #d0d0d0; font-size: 14px; font-weight: 600; }

.amount-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--secondary);
  font-size: 30px;
}

.amount-field:focus-within { border-bottom-color: var(--accent); }

input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
  font-size: clamp(34px, 8vw, 46px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

input::placeholder { color: #8c8c8c; }
.limits { margin: 10px 0 14px; font-size: 13px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets:empty { display: none; }

button, a { -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; cursor: pointer; }

.presets button {
  padding: 7px 11px;
  border: 1px solid #484848;
  border-radius: 9px;
  background: #2a2a2a;
  color: #ededed;
  font-size: 13px;
  font-weight: 600;
}

.summary { margin: 22px 0; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.summary dt { color: var(--secondary); }
.summary .total { margin-top: 13px; padding-top: 14px; border-top: 1px solid var(--border); }
.total dt, .total dd { color: #f5f5f5; font-size: 18px; font-weight: 700; }

.primary {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 0;
  border-radius: 13px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  background: #ededed;
  color: #151515;
}

.primary:disabled { cursor: default; background: #363636; color: #b5b5b5; }
.primary:focus-visible, .presets button:focus-visible {
  outline: 2px solid #ededed;
  outline-offset: 3px;
}

.invoice-card { text-align: center; }
.status-icon {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: #303030;
  color: var(--accent);
  font-size: 23px;
}
.invoice-card[data-status="paid"] .status-icon { background: #ededed; color: #151515; }
.invoice-card[data-status="canceled"] .status-icon { background: transparent; box-shadow: inset 0 0 0 1px #545454; }
.invoice-card h2 { margin: 14px 0 8px; font-size: 22px; }
.invoice-card p { margin: 0 0 22px; font-size: 14px; line-height: 1.5; }

@media (max-width: 360px) {
  .shell { padding-inline: 16px; }
  .amount-card, .invoice-card { padding-inline: 16px; }
}
