:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dfe4ea;
  --line-strong: #cbd3dc;
  --ink: #18202b;
  --muted: #687384;
  --faint: #929ba8;
  --blue: #2858c7;
  --blue-dark: #1f47a4;
  --blue-soft: #eaf0ff;
  --green: #148563;
  --green-soft: #e5f6ef;
  --amber: #b56c0b;
  --amber-soft: #fff2d8;
  --red: #c53a45;
  --red-soft: #fdebed;
  --charcoal: #1c252d;
  --sidebar: #17232a;
  --sidebar-muted: #9cabb3;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(25, 35, 48, 0.07);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
}

.app-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 240px;
  flex-direction: column;
  padding: 22px 16px 18px;
  color: #fff;
  background: var(--sidebar);
  border-right: 1px solid #2a3942;
}

.brand,
.auth-logo,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand {
  height: 46px;
  padding: 0 8px;
  margin-bottom: 30px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 7px;
  background: #f1f5ff;
}

.brand-mark img {
  width: 20px;
  height: 20px;
  filter: invert(31%) sepia(66%) saturate(1617%) hue-rotate(204deg) brightness(88%);
}

.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--sidebar-muted);
  font-size: 9px;
  font-weight: 700;
}

.nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: #b9c5cb;
  border-radius: 6px;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}

.nav-item:hover {
  color: #fff;
  background: #22323b;
}

.nav-item.active {
  color: #fff;
  background: #2858c7;
}

.nav-item img {
  width: 19px;
  height: 19px;
  opacity: .82;
  filter: invert(1);
}

.nav-item.active img {
  opacity: 1;
}

.nav-label {
  padding: 22px 12px 7px;
  color: #72828b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 14px 8px 0;
  border-top: 1px solid #304049;
}

.avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.avatar {
  width: 36px;
  height: 36px;
}

.account-copy {
  min-width: 0;
}

.account-copy strong,
.account-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: 13px;
}

.account-copy span {
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar-account form,
.row-actions form,
td form {
  margin: 0;
}

.sidebar .icon-button {
  border-color: transparent;
  background: transparent;
}

.sidebar .icon-button:hover {
  background: #2a3a43;
}

.sidebar .icon-button img {
  filter: invert(1);
}

.main-column {
  min-width: 0;
  margin-left: 240px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-title {
  font-size: 14px;
  font-weight: 700;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.site-link img {
  width: 15px;
  height: 15px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20a978;
  box-shadow: 0 0 0 3px #ddf7ed;
}

.menu-button {
  display: none !important;
}

.main-content {
  width: min(1240px, 100%);
  min-height: calc(100vh - 64px);
  padding: 34px 32px 64px;
  margin: 0 auto;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-heading.compact {
  align-items: center;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 4px 0 4px;
  font-size: 27px;
  line-height: 1.2;
}

.page-heading p,
.section-heading p,
.panel-title p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.button,
.icon-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}

.button {
  min-height: 40px;
  gap: 8px;
  padding: 0 16px;
  white-space: nowrap;
}

.button img {
  width: 17px;
  height: 17px;
}

.button-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button-primary img {
  filter: invert(1);
}

.button-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.button-secondary {
  color: #344052;
  background: #fff;
  border-color: var(--line-strong);
}

.button-secondary:hover {
  color: var(--blue);
  border-color: #9fb3e2;
  background: #f8faff;
}

.button-ghost {
  color: var(--muted);
  background: transparent;
}

.button-ghost:hover {
  color: var(--ink);
  background: #eef1f5;
}

.button-block {
  width: 100%;
}

.button-small {
  min-height: 31px;
  padding: 0 11px;
  font-size: 12px;
}

.button-danger-soft {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f5c8cd;
}

.button-success-soft {
  color: var(--green);
  background: var(--green-soft);
  border-color: #bce5d5;
}

.button.disabled {
  pointer-events: none;
  opacity: .45;
}

.button.is-loading {
  cursor: wait;
  opacity: .68;
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
}

.icon-button:hover {
  background: #f1f4f8;
  border-color: var(--line-strong);
}

.icon-button img {
  width: 17px;
  height: 17px;
}

.generator-panel {
  padding: 24px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.panel-title h2,
.section-heading h2 {
  margin: 0 0 2px;
  font-size: 17px;
}

.panel-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
}

.panel-icon img {
  width: 20px;
  height: 20px;
  filter: invert(32%) sepia(76%) saturate(1592%) hue-rotate(208deg) brightness(80%);
}

.generator-form {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(180px, .6fr);
  align-items: end;
  gap: 12px;
}

[hidden] {
  display: none !important;
}

.netlify-source-picker {
  grid-column: 1 / -1;
}

.mode-picker {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  border: 0;
}

.mode-picker legend {
  width: 100%;
  padding: 0 0 7px;
  color: #4b5666;
  font-size: 12px;
  font-weight: 700;
}

.mode-picker label {
  flex: 1 1 150px;
  cursor: pointer;
}

.mode-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mode-picker span {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line-strong);
}

.mode-picker label:first-of-type span {
  border-radius: 6px 0 0 6px;
}

.mode-picker label:last-of-type span {
  margin-left: -1px;
  border-radius: 0 6px 6px 0;
}

.mode-picker img {
  width: 17px;
  height: 17px;
}

.mode-picker input:checked + span {
  position: relative;
  z-index: 1;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #7191d9;
}

.mode-picker input:focus-visible + span {
  box-shadow: 0 0 0 3px #e8efff;
}

.mode-picker input:disabled + span {
  color: #8a929e;
  background: #f4f5f7;
  cursor: not-allowed;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span:first-child {
  color: #4b5666;
  font-size: 12px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.input-wrap:focus-within {
  border-color: #7191d9;
  box-shadow: 0 0 0 3px #e8efff;
}

.line-picker {
  min-width: 0;
  grid-column: 1 / -1;
  padding: 0;
  margin: 4px 0 0;
  border: 0;
}

.line-picker legend {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 8px;
}

.line-picker legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4b5666;
  font-size: 12px;
  font-weight: 800;
}

.line-picker legend img {
  width: 17px;
  height: 17px;
}

.line-picker legend small {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.line-options {
  display: grid;
  max-height: 230px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 2px 6px 2px 2px;
  overflow-y: auto;
}

.line-option {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.line-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.line-option > span {
  display: grid;
  min-height: 50px;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.line-option:hover > span {
  border-color: #9fb3e2;
  background: #f8faff;
}

.line-option input:focus-visible + span {
  box-shadow: 0 0 0 3px #e8efff;
}

.line-option input:checked + span {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #7191d9;
}

.line-option.locked {
  cursor: not-allowed;
}

.line-option.locked > span {
  color: #7d8794;
  background: #f5f6f8;
  border-color: #e3e6ea;
}

.line-option.locked i {
  position: relative;
  border-color: #c6ccd4;
}

.line-option.locked i::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: url('/icons/lock-keyhole.svg') center / contain no-repeat;
}

.line-option i {
  width: 14px;
  height: 14px;
  border: 2px solid #a7b0bc;
  border-radius: 50%;
}

.line-option input:checked + span i {
  border: 4px solid var(--blue);
  background: #fff;
}

.line-option b {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-option em {
  padding: 2px 5px;
  color: #5d6878;
  background: #eef1f5;
  border-radius: 4px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.inline-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  margin: -8px 0 16px;
  color: #8c343b;
  background: var(--red-soft);
  border: 1px solid #f0c4c9;
  border-radius: 6px;
  font-size: 12px;
}

.inline-warning img {
  width: 17px;
  height: 17px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.input-wrap img {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: .55;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.input-wrap input::placeholder {
  color: #a0a8b3;
}

.file-input-wrap input[type="file"] {
  height: auto;
  color: var(--muted);
  font-size: 11px;
}

.file-input-wrap input[type="file"]::file-selector-button {
  padding: 5px 8px;
  margin-right: 9px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.generator-submit {
  grid-column: 1 / -1;
  justify-self: end;
  height: 42px;
}

.generator-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.generator-actions .generator-submit {
  grid-column: auto;
}

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

.stat-card {
  display: flex;
  min-height: 118px;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 7px;
}

.stat-icon img {
  width: 21px;
  height: 21px;
}

.stat-icon.blue {
  background: var(--blue-soft);
}

.stat-icon.blue img {
  filter: invert(31%) sepia(69%) saturate(1690%) hue-rotate(210deg) brightness(80%);
}

.stat-icon.green {
  background: var(--green-soft);
}

.stat-icon.green img {
  filter: invert(43%) sepia(71%) saturate(524%) hue-rotate(112deg) brightness(80%);
}

.stat-icon.amber {
  background: var(--amber-soft);
}

.stat-icon.amber img {
  filter: invert(43%) sepia(92%) saturate(751%) hue-rotate(357deg) brightness(78%);
}

.stat-card span,
.stat-card small,
.metric-row span {
  display: block;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin: 2px 0 1px;
  font-size: 25px;
  line-height: 1.25;
}

.stat-card small {
  font-size: 11px;
}

.section-block {
  margin-top: 34px;
}

.section-block.no-top {
  margin-top: 0;
}

.section-heading {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.text-link img {
  width: 15px;
}

.table-wrap {
  contain: layout inline-size;
  max-width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e8ebef;
}

th {
  color: #5d6878;
  background: #f7f9fb;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  font-size: 13px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fbfcfe;
}

.link-cell {
  display: grid;
  min-width: 230px;
  max-width: 460px;
  gap: 2px;
}

.link-cell > a,
.link-cell > strong {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-cell > a:hover {
  color: var(--blue);
}

.destination {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-link {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 0;
  overflow: hidden;
  color: var(--blue);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-link img {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.copy-link.copied {
  color: var(--green);
}

.source-label {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #4d5867;
  background: #eef1f5;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-active {
  color: #096746;
  background: var(--green-soft);
}

.badge-disabled {
  color: #8c343b;
  background: var(--red-soft);
}

.badge-pending {
  color: #8a5708;
  background: var(--amber-soft);
}

.badge-paid {
  color: #096746;
  background: var(--green-soft);
}

.badge-cancelled {
  color: #6d7580;
  background: #edf0f3;
}

.number-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 6px;
}

.empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  padding: 40px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state > span,
.error-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--blue-soft);
}

.empty-state img,
.error-icon img {
  width: 25px;
  height: 25px;
}

.empty-state h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
}

.notice {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  margin-bottom: 18px;
  border: 1px solid;
  border-radius: 6px;
}

.notice img {
  width: 18px;
  height: 18px;
}

.notice-success {
  color: #075d42;
  background: var(--green-soft);
  border-color: #bce5d5;
}

.notice-error {
  color: #8b2d36;
  background: var(--red-soft);
  border-color: #f0c4c9;
}

.notice-info {
  color: #244a9b;
  background: var(--blue-soft);
  border-color: #cbd9fb;
}

.toolbar-band {
  padding: 14px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-link-form {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) minmax(180px, .7fr) auto;
  align-items: end;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search-form .input-wrap {
  width: min(520px, 100%);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.pagination span {
  color: var(--muted);
  font-size: 12px;
}

.detail-heading {
  align-items: flex-end !important;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.back-link img {
  width: 15px;
}

.heading-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 16px;
}

.detail-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-actions form {
  display: flex;
}

.qr-dialog {
  width: min(420px, calc(100% - 30px));
  max-width: none;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.qr-dialog::backdrop {
  background: rgba(13, 20, 25, .62);
}

.qr-dialog-shell {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(13, 20, 25, .24);
}

.qr-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.qr-dialog-head h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.qr-dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 16px;
}

.qr-dialog-body > img {
  width: 240px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.qr-dialog-body a {
  max-width: 100%;
  overflow: hidden;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px 20px;
}

.detail-main,
.qr-panel,
.account-summary,
.settings-form {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-box {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.result-box > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.result-box > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-box a {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.result-box .long-url {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.metric-row > div {
  min-width: 0;
}

.metric-row strong {
  display: block;
  margin-top: 3px;
  font-size: 24px;
}

.metric-row .metric-text {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}

.qr-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-panel > img {
  width: min(220px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.qr-panel > div {
  margin: 7px 0 16px;
}

.qr-panel strong,
.qr-panel span {
  display: block;
}

.qr-panel span {
  color: var(--muted);
  font-size: 11px;
}

.bar-chart {
  display: grid;
  height: 220px;
  grid-template-columns: repeat(7, minmax(30px, 1fr));
  gap: 12px;
  padding: 20px 24px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bar-item {
  display: grid;
  min-width: 0;
  grid-template-rows: 20px 1fr 22px;
  align-items: end;
  text-align: center;
}

.bar-item > span,
.bar-item small {
  color: var(--muted);
  font-size: 10px;
}

.bar-item > div {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #eef1f5;
  border-radius: 4px 4px 0 0;
}

.bar-item i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  background: var(--blue);
  border-radius: 4px 4px 0 0;
}

.mini-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.truncate-cell {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

code {
  color: #40516a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 16px;
}

.account-summary {
  text-align: center;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  margin: 0 auto 12px;
  font-size: 25px;
}

.account-summary h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.account-summary dl {
  margin: 25px 0 0;
  text-align: left;
}

.account-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.account-summary dt {
  color: var(--muted);
}

.account-summary dd {
  margin: 0;
  font-size: 12px;
  text-align: right;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stack-form.narrow {
  max-width: 500px;
}

.stack-form > .button:not(.button-block) {
  justify-self: start;
}

.service-state {
  display: inline-flex;
  max-width: 360px;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.service-state.compact-state {
  flex-shrink: 0;
  white-space: nowrap;
}

.service-state i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.service-state.online {
  color: #096746;
  background: var(--green-soft);
  border-color: #bce5d5;
}

.service-state.online i {
  background: var(--green);
}

.service-state.offline {
  color: #8c343b;
  background: var(--red-soft);
  border-color: #f0c4c9;
}

.service-state.offline i {
  background: var(--red);
}

.user-cell {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 9px;
}

.user-cell > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 800;
}

.user-cell strong,
.user-cell small {
  display: block;
}

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

.product-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-item.owned {
  border-color: #acdcca;
  background: #fbfffd;
}

.product-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
}

.product-icon img {
  width: 19px;
  height: 19px;
}

.product-copy {
  min-width: 0;
}

.product-type {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.product-copy h2 {
  margin: 2px 0 7px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
}

.product-price small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.product-action {
  min-width: 100px;
  text-align: right;
}

.payment-order-list {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.payment-order {
  overflow: hidden;
  background: #fff;
  border: 1px solid #b9d9cf;
  border-radius: var(--radius);
}

.payment-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.payment-order-head h2 {
  margin: 3px 0;
  font-size: 19px;
}

.payment-order-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.payment-order-body {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
}

.payment-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.payment-qr img {
  width: 180px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.payment-qr span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.payment-details {
  display: grid;
  align-content: center;
  gap: 13px;
  min-width: 0;
}

.payment-amount span,
.payment-amount strong,
.payment-amount small,
.payment-field > span,
.payment-field > strong {
  display: block;
}

.payment-amount span,
.payment-field > span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.payment-amount strong {
  color: #087a5a;
  font-family: ui-monospace, monospace;
  font-size: 28px;
}

.payment-amount small {
  margin-top: 3px;
  color: #9a6818;
  font-size: 10px;
}

.payment-field > strong {
  font-size: 13px;
}

.payment-address {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  color: var(--ink);
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.payment-address code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-address img {
  width: 15px;
  flex: 0 0 15px;
}

.payment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--muted);
  font-size: 10px;
}

.payment-meta b {
  color: var(--ink);
}

.payment-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 22px;
  color: #76531d;
  background: #fff9eb;
  border-top: 1px solid #f0dfb6;
  font-size: 11px;
}

.payment-notice img {
  width: 15px;
  flex: 0 0 15px;
}

.txid {
  display: block;
  width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loading-controls {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.loading-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-column {
  width: 48px;
}

.check-control {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  cursor: pointer;
}

.check-control input {
  position: absolute;
  opacity: 0;
}

.check-control span {
  width: 17px;
  height: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

.check-control input:checked + span {
  background: var(--blue) url('/icons/check.svg') center / 12px no-repeat;
  border-color: var(--blue);
}

.admin-tabs {
  position: sticky;
  top: 72px;
  z-index: 10;
  display: flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 18px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.admin-tabs a {
  min-height: 34px;
  padding: 7px 13px;
  color: var(--muted);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-tabs a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.anchor-section {
  scroll-margin-top: 125px;
}

.inline-admin-form {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.inline-admin-form .field {
  width: 130px;
}

.inline-admin-form .grow {
  width: auto;
  flex: 1;
}

.payment-settings-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.provider-settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.provider-auth-picker {
  grid-column: 1 / -1;
}

.provider-settings-footer {
  display: flex;
  min-height: 42px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 10px 3px 0;
  color: var(--muted);
  font-size: 10px;
}

.provider-settings-footer b {
  color: var(--ink);
}

.provider-settings-footer form {
  margin-left: auto;
}

.provider-account-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.provider-account-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.provider-account-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
}

.provider-account-icon img {
  width: 18px;
  height: 18px;
}

.provider-account-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.provider-account-copy > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.provider-account-copy strong,
.provider-account-copy span,
.provider-account-copy code,
.provider-account-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.provider-account-copy span,
.provider-account-copy code {
  color: var(--muted);
  font-size: 10px;
}

.provider-account-copy small {
  color: var(--red);
  font-size: 10px;
}

.payment-settings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 10px 3px 0;
  color: var(--muted);
  font-size: 10px;
}

.payment-settings-meta b {
  color: var(--ink);
}

.invite-code {
  font-size: 13px;
}

.product-admin-list,
.access-list {
  display: grid;
  gap: 8px;
}

.product-admin-row,
.access-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr) 155px 34px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.product-admin-domain,
.access-row > div:nth-child(2) {
  min-width: 0;
}

.product-admin-domain strong,
.product-admin-domain span,
.access-row strong,
.access-row span {
  display: block;
}

.product-admin-domain strong,
.access-row strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.product-admin-domain span,
.access-row > div:nth-child(2) span {
  color: var(--muted);
  font-size: 10px;
}

.price-input {
  display: flex;
  height: 36px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  overflow: hidden;
}

.price-input span {
  padding-left: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.price-input input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px 0 4px;
  border: 0;
  outline: 0;
}

.access-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.access-row > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-body {
  background: #fff;
}

.site-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  height: 72px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.site-nav {
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
}

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

.site-brand strong,
.site-brand small {
  display: block;
}

.site-brand strong {
  font-size: 17px;
}

.site-brand small {
  font-size: 8px;
  opacity: .65;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 700;
}

.site-nav nav > a:not(.button):hover {
  color: #b9f0db;
}

.site-hero {
  position: relative;
  display: flex;
  min-height: min(78vh, 690px);
  align-items: center;
  color: #fff;
  background: #17232a url('/assets/hero-network.jpg') center / cover no-repeat;
}

.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 25, .64);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 82px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.hero-kicker i,
.route-status {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #31d19c;
  box-shadow: 0 0 0 4px rgba(49, 209, 156, .18);
}

.site-hero h1 {
  margin: 18px 0 8px;
  font-size: 62px;
  line-height: 1.08;
}

.site-hero p {
  max-width: 590px;
  margin: 0;
  color: #d2dddd;
  font-size: 19px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.hero-secondary {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .4);
}

.hero-secondary img {
  filter: invert(1);
}

.hero-metrics {
  display: flex;
  gap: 40px;
  margin-top: 54px;
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-size: 18px;
}

.hero-metrics span {
  color: #aebfbe;
  font-size: 10px;
}

.site-band {
  padding: 76px 0;
}

.workflow-grid {
  display: grid;
  grid-template-columns: .8fr 1.4fr;
  gap: 70px;
}

.site-section-heading h2 {
  margin: 5px 0 7px;
  font-size: 28px;
}

.site-section-heading p {
  margin: 0;
  color: var(--muted);
}

.site-section-heading.horizontal {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.workflow-list {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.workflow-list li:first-child {
  padding-top: 0;
}

.workflow-list li > span {
  color: var(--blue);
  font-family: ui-monospace, monospace;
  font-weight: 800;
}

.workflow-list strong {
  display: block;
  margin-bottom: 3px;
}

.workflow-list p {
  margin: 0;
  color: var(--muted);
}

.routes-band {
  background: #f4f7f6;
}

.site-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 34px 0 0;
}

.site-cta h2 {
  margin: 0 0 3px;
  font-size: 20px;
}

.site-cta p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  padding: 25px 0;
  color: #c4ced2;
  background: var(--sidebar);
}

.site-footer .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer .site-brand .brand-mark {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.site-footer > div > span,
.site-footer > div > div {
  font-size: 11px;
}

.site-footer > div > div {
  display: flex;
  gap: 18px;
}

.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.user-cell small {
  color: var(--muted);
  font-size: 10px;
}

.auth-body {
  min-height: 100vh;
  background: #fff;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, .85fr) minmax(440px, 1.15fr);
}

.auth-brand {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #173b36;
}

.auth-brand-inner {
  width: min(440px, calc(100% - 64px));
}

.auth-logo strong,
.mobile-brand strong {
  font-size: 18px;
}

.auth-visual {
  position: relative;
  width: min(360px, 90%);
  margin: 75px auto 60px;
  aspect-ratio: 1.35;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: var(--radius);
  background-color: #1e4a44;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

.visual-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .22);
  transform: translate(-50%, -50%);
}

.visual-core img {
  width: 30px;
  filter: invert(42%) sepia(38%) saturate(715%) hue-rotate(113deg) brightness(78%);
}

.node {
  position: absolute;
  z-index: 2;
  width: 15px;
  height: 15px;
  border: 3px solid #bfe7dc;
  border-radius: 50%;
  background: #1e4a44;
}

.node-a { top: 20%; left: 14%; }
.node-b { top: 16%; right: 16%; }
.node-c { right: 12%; bottom: 15%; }

.route {
  position: absolute;
  height: 1px;
  background: #83c9b7;
  transform-origin: left center;
}

.route-a { top: 37%; left: 18%; width: 34%; transform: rotate(15deg); }
.route-b { top: 52%; left: 55%; width: 32%; transform: rotate(-31deg); }

.auth-brand-copy h1 {
  margin: 0 0 7px;
  font-size: 30px;
}

.auth-brand-copy p {
  margin: 0;
  color: #b8d2cc;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 50px 32px;
}

.auth-form-wrap {
  width: min(400px, 100%);
}

.mobile-brand {
  display: none;
  margin-bottom: 40px;
}

.auth-heading {
  margin-bottom: 25px;
}

.auth-heading h2 {
  margin: 5px 0 5px;
  font-size: 27px;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
}

.auth-form-wrap .button-primary {
  height: 44px;
  margin-top: 3px;
}

.auth-switch {
  margin: 23px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: var(--blue);
  font-weight: 700;
}

.error-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.error-page {
  width: min(480px, 100%);
  padding: 50px 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.error-icon {
  margin-right: auto;
  margin-left: auto;
  background: var(--red-soft);
}

.muted-icon {
  background: #eef1f5;
}

.error-page h1 {
  margin: 6px 0;
  font-size: 25px;
}

.error-page p {
  margin: 0 0 22px;
  color: var(--muted);
}

.sidebar-overlay {
  display: none;
}

.copy-fallback {
  position: fixed;
  top: -1000px;
  left: -1000px;
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .main-column {
    margin-left: 0;
  }

  .menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(13, 20, 25, .45);
  }

  .menu-open .sidebar-overlay {
    display: block;
  }

  .menu-button {
    display: inline-flex !important;
  }

  .topbar {
    padding: 0 22px;
  }

  .topbar-title {
    margin-right: auto;
    margin-left: 12px;
  }

  .main-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .generator-form {
    grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr);
  }

  .edit-link-form {
    grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr);
  }

  .edit-link-form .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .generator-submit {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .auth-layout {
    grid-template-columns: minmax(300px, .75fr) minmax(400px, 1.25fr);
  }

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

  .site-nav nav {
    gap: 14px;
  }

  .workflow-grid {
    gap: 35px;
  }
}

@media (max-width: 760px) {
  .generator-form > .mode-picker label {
    flex-basis: 50%;
  }

  .generator-form > .mode-picker label:first-of-type span {
    border-radius: 6px 0 0;
  }

  .generator-form > .mode-picker label:nth-of-type(2) span {
    margin-left: -1px;
    border-radius: 0 6px 0 0;
  }

  .generator-form > .mode-picker label:last-of-type {
    flex-basis: 100%;
  }

  .generator-form > .mode-picker label:last-of-type span {
    margin-top: -1px;
    margin-left: 0;
    border-radius: 0 0 6px 6px;
  }

  .topbar {
    height: 58px;
    padding: 0 15px;
  }

  .topbar-user {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-content {
    min-height: calc(100vh - 58px);
    padding: 23px 15px 45px;
  }

  .page-heading,
  .page-heading.compact,
  .detail-heading {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 14px;
  }

  .detail-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .detail-actions .button {
    flex: 1;
  }

  .page-heading h1 {
    font-size: 23px;
  }

  .generator-panel {
    padding: 18px;
  }

  .generator-form {
    grid-template-columns: 1fr;
  }

  .line-options {
    max-height: 330px;
    grid-template-columns: 1fr;
  }

  .edit-link-form {
    grid-template-columns: 1fr;
  }

  .edit-link-form .button {
    grid-column: auto;
    width: 100%;
  }

  .generator-submit {
    grid-column: auto;
    width: 100%;
  }

  .stats-grid,
  .admin-stats {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .stat-card {
    min-height: 95px;
  }

  .section-block {
    margin-top: 28px;
  }

  th,
  td {
    padding: 12px;
  }

  .search-form {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-form .input-wrap {
    width: 100%;
  }

  .pagination {
    gap: 9px;
  }

  .pagination .button {
    padding: 0 10px;
  }

  .detail-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .qr-panel {
    grid-row: 1;
  }

  .heading-meta {
    align-items: flex-start;
    flex-wrap: wrap;
  }

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

  .bar-chart {
    gap: 6px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .service-state {
    max-width: 100%;
  }

  .auth-layout {
    display: block;
  }

  .auth-brand {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 34px 22px;
  }

  .mobile-brand {
    display: flex;
  }

  .product-grid,
  .loading-fields {
    grid-template-columns: 1fr;
  }

  .product-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .payment-order-body {
    grid-template-columns: 1fr;
  }

  .payment-qr {
    width: min(230px, 100%);
    justify-self: center;
  }

  .product-action {
    grid-column: 1 / -1;
    text-align: left;
  }

  .product-action .button {
    width: 100%;
  }

  .inline-admin-form {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-admin-form .field,
  .inline-admin-form .grow {
    width: 100%;
  }

  .payment-settings-form {
    grid-template-columns: 1fr;
  }

  .provider-settings-form {
    grid-template-columns: 1fr;
  }

  .provider-auth-picker {
    grid-column: 1;
  }

  .payment-settings-form .button {
    width: 100%;
  }

  .provider-settings-form > .button {
    width: 100%;
  }

  .provider-settings-footer form {
    width: 100%;
    margin-left: 0;
  }

  .product-admin-row {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
  }

  .product-admin-row .price-input {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .access-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .access-row > div:last-child {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .generator-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .generator-actions .button {
    width: 100%;
  }

  .site-container {
    width: min(100% - 30px, 1180px);
  }

  .site-header,
  .site-nav {
    height: 64px;
  }

  .site-nav nav > a:not(.button) {
    display: none;
  }

  .site-nav nav .button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 11px;
  }

  .site-hero {
    min-height: 70vh;
    background-position: 56% center;
  }

  .hero-content {
    padding-top: 70px;
  }

  .site-hero h1 {
    font-size: 44px;
  }

  .site-hero p {
    max-width: 420px;
    font-size: 16px;
  }

  .hero-metrics {
    gap: 24px;
    margin-top: 38px;
  }

  .site-band {
    padding: 55px 0;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .site-section-heading.horizontal,
  .site-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-cta .button {
    width: 100%;
  }

  .site-footer .site-container {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .payment-order-head,
  .payment-order-body {
    padding: 16px;
  }

  .payment-notice {
    padding: 11px 16px;
  }

  .payment-amount strong {
    font-size: 23px;
  }

  .topbar-title {
    display: none;
  }

  .topbar-user {
    margin-left: auto;
  }

  .panel-title {
    align-items: flex-start;
  }

  .section-heading {
    align-items: flex-start;
  }

  .result-box > div {
    align-items: flex-start;
  }

  .detail-main,
  .qr-panel,
  .account-summary,
  .settings-form {
    padding: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
