:root {
  color-scheme: dark;
  --bg: #07101f;
  --bg-soft: #0b1830;
  --panel: #0d1b33;
  --panel-2: #101f3a;
  --field: #081426;
  --text: #f3f7ff;
  --muted: #8fa2c4;
  --line: #22365d;
  --line-strong: #33548a;
  --accent: #4d8dff;
  --accent-2: #72a8ff;
  --danger: #ff6680;
  --success: #7dd7aa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 0, rgba(61, 104, 180, 0.22), transparent 330px),
    linear-gradient(180deg, #081326 0%, var(--bg) 58%, #050b16 100%);
  color: var(--text);
}

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

.panel {
  background: rgba(13, 27, 51, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2f74ff, #63a5ff);
  color: #061021;
  font-weight: 900;
}

.brand-name {
  font-size: 17px;
  font-weight: 850;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

h1 {
  margin: 0 0 7px;
  font-size: 25px;
  line-height: 1.16;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
button,
.button,
.copybox {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

input {
  min-height: 44px;
  padding: 0 13px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.14);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #061225;
  border: 0;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(77, 141, 255, 0.25);
}

button.secondary,
.button.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.section {
  margin-top: 18px;
}

.plans,
.apps {
  display: grid;
  gap: 9px;
}

.plan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 13px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.plan-title {
  color: var(--text);
  font-weight: 800;
}

.plan-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.plan-price {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.plan.active {
  border-color: var(--accent);
  background: #132846;
  box-shadow: inset 0 0 0 1px rgba(77, 141, 255, 0.22);
}

.field-block {
  margin-top: 14px;
}

.mini-panel {
  margin-top: 12px;
  padding: 13px;
  background: rgba(8, 20, 38, 0.68);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mini-title {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.row {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 8px;
  align-items: end;
}

.locations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.locations li {
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.status {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  border-color: rgba(255, 102, 128, 0.75);
  color: var(--danger);
}

.status.success {
  border-color: rgba(125, 215, 170, 0.55);
  color: var(--success);
}

.copybox {
  padding: 12px;
  background: var(--field);
  color: var(--text);
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.copy-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.qr {
  width: 176px;
  height: 176px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  padding: 8px;
}

.success-grid {
  display: grid;
  gap: 16px;
}

.instruction {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.pay-total {
  margin-top: 18px;
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 430px);
    padding: 16px 0;
  }

  .panel {
    padding: 18px;
  }

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