:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #18252d;
  background: #eef2f3;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  color: #fff;
  background: #17252b;
  border-bottom: 3px solid #1f9d68;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: #1f9d68;
  border-radius: 5px;
  font-weight: 800;
}
.brand strong { display: block; font-size: 16px; }
.muted { color: #87959c; font-size: 13px; }
.topbar .muted { display: block; margin-top: 3px; color: #afbdc2; }
.badge, .status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border-radius: 4px;
  color: #1e5368;
  background: #d6edf3;
  font-size: 12px;
  font-weight: 800;
}

main { width: min(1280px, calc(100% - 36px)); margin: 24px auto 48px; }
.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.api-key { width: min(420px, 100%); }
.api-key span { display: block; margin-bottom: 6px; color: #56656d; font-size: 12px; font-weight: 700; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .92fr); gap: 18px; }
.column { display: grid; align-content: start; gap: 18px; }
.section {
  padding: 24px;
  background: #fff;
  border: 1px solid #d7e0e1;
  box-shadow: 0 8px 22px rgb(20 43 50 / 5%);
}
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.eyebrow { color: #1c8d62; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
h1, h2, p { margin-top: 0; }
h1 { margin: 4px 0 0; font-size: 22px; }
h2 { margin: 4px 0 0; font-size: 17px; }
form, label { display: grid; gap: 7px; }
label { color: #526168; font-size: 13px; font-weight: 700; }
input, select, button { width: 100%; min-height: 42px; border-radius: 4px; font: inherit; }
input, select { padding: 0 11px; color: #17252b; background: #fff; border: 1px solid #bdcbd0; }
input:focus, select:focus { outline: 3px solid rgb(31 157 104 / 16%); border-color: #1f9d68; }
button { cursor: pointer; padding: 0 15px; color: #fff; background: #16865a; border: 1px solid #0f764d; font-weight: 750; }
button:hover { background: #0f764d; }
button:disabled { cursor: wait; opacity: .65; }
.secondary { color: #33464d; background: #fff; border-color: #b8c7ca; }
.secondary:hover { background: #f1f5f5; }
.compact { width: auto; min-width: 96px; }
.inline-form { grid-template-columns: 1.1fr 1fr auto; align-items: end; gap: 10px; }
.two-fields { grid-template-columns: 1fr auto; }
.select-label { margin-top: 16px; }
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  color: #65757b;
  background: #f5f8f8;
  border-left: 3px solid #1f9d68;
  font-size: 12px;
}
.summary div { display: grid; gap: 5px; min-width: 0; }
.summary strong { overflow-wrap: anywhere; color: #19323a; font-size: 13px; }
.plans-list { display: grid; gap: 8px; margin-bottom: 18px; }
.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  background: #f6f9f9;
  border: 1px solid #e2e9e9;
}
.plan-row div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.plan-row span { color: #718087; font-size: 12px; }
.plan-row strong { white-space: nowrap; }
.link-button { width: auto; min-height: 28px; padding: 0 7px; color: #167b56; background: transparent; border: 0; font-size: 12px; }
.link-button:hover { background: #e3f2eb; }
.plan-form { padding-top: 18px; border-top: 1px solid #e4ebeb; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check-label { display: flex; align-items: center; gap: 8px; padding-top: 27px; }
.check-label input { width: 16px; min-height: 16px; accent-color: #16865a; }
.form-actions { display: flex; gap: 9px; margin-top: 14px; }
.form-actions button { width: auto; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px; background: #edf2f2; }
.segment { color: #617177; background: transparent; border-color: transparent; }
.segment.active { color: #fff; background: #16865a; border-color: #16865a; }
.recharge-section form { gap: 16px; }
.result-section { min-height: 476px; background: #f8fbfb; }
.empty { margin: 105px auto 0; max-width: 260px; color: #77868a; text-align: center; }
.empty-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 16px; color: #16865a; background: #e3f3eb; border: 1px solid #c7e7d8; border-radius: 5px; font-size: 12px; font-weight: 900; }
.empty h2 { color: #30464d; font-size: 18px; }
.empty p { font-size: 13px; line-height: 1.6; }
.result-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.result-heading h2 { max-width: 300px; overflow-wrap: anywhere; }
.qr-code { display: block; width: 250px; max-width: 100%; aspect-ratio: 1; margin: 22px auto; background: #fff; border: 1px solid #d9e4e4; }
.details { margin: 0; border-top: 1px solid #dde7e7; }
.details div { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #dde7e7; font-size: 13px; }
dt { color: #718087; }
dd { margin: 0; overflow-wrap: anywhere; color: #263c42; font-weight: 700; text-align: right; }
.actions { display: flex; gap: 9px; margin-top: 18px; }
.message { min-height: 20px; margin: 16px 0 0; color: #ad3030; font-size: 13px; }
.message[data-error="false"] { color: #167b56; }
.status[data-status="PAID"], .status[data-status="REFUNDED"] { color: #126746; background: #d5f1e1; }
.status[data-status="CLOSED"], .status[data-status="FAILED"] { color: #923333; background: #f5dada; }

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 16px; }
  .topbar .muted { display: none; }
  main { width: min(100% - 24px, 560px); margin-top: 12px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .compact { width: 100%; }
  .section { padding: 18px; }
  .inline-form, .two-fields, .plan-grid { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .check-label { padding-top: 0; }
  .plan-row { align-items: start; flex-direction: column; }
  .plan-row div { flex-wrap: wrap; }
}
