/* 共用样式与后台布局：表单、弹窗、导航、后台商家列表。 */
:root {
  --blue: #2463ed;
  --ink: #17243d;
  --muted: #7c899d;
  --line: #e9edf4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f9fc;
  color: var(--ink);
  font:
    14px "DM Sans",
    "Noto Sans SC",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
header {
  height: 86px;
  background: white;
  display: flex;
  align-items: center;
  padding: 0 5%;
  gap: 55px;
  border-bottom: 1px solid var(--line);
}
.brand {
  text-decoration: none;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  position: relative;
  white-space: nowrap;
}
.brand i {
  background: var(--blue);
  color: white;
  font-style: normal;
  border-radius: 10px;
  padding: 3px 9px;
  margin-right: 6px;
}
.brand span {
  display: block;
  letter-spacing: 2.8px;
  font-size: 8px;
  margin: 4px 0 0 48px;
  color: var(--muted);
}
/* 首页品牌区已不再放图标（logo 单独放在 header 里），副标题不需要 48px 缩进 */
.directory-page .brand span {
  margin-left: 0;
}
.brand img,
header > img {
  display: block;
  /* 觉得大小不合适就改下面这两个值，保持一致即可 */
  height: 50px;
  width: 50px;
  flex: none;
  object-fit: contain;
  border-radius: 8px;
}
nav {
  display: flex;
  align-self: stretch;
  gap: 30px;
}
nav button {
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}
nav button.active {
  color: var(--blue);
  border-color: var(--blue);
}
.tools {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
}
.demo {
  font-size: 10px;
  letter-spacing: 1px;
  color: #5680bc;
  background: #eef4ff;
  padding: 5px 8px;
  border-radius: 4px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 32px 5% 60px;
}
.hero {
  position: relative;
  overflow: hidden;
  background: #eaf2ff;
  border: 1px solid #dce8fd;
  border-radius: 18px;
  padding: 40px 42px;
  min-height: 268px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--blue);
  font-weight: 700;
}
h1 {
  font-size: 36px;
  margin: 12px 0;
  letter-spacing: -1px;
}
p {
  line-height: 1.8;
  color: var(--muted);
}
.hero p {
  color: #667e9e;
  margin: 0;
}
.benefits {
  display: flex;
  gap: 26px;
  margin-top: 30px;
  color: #47648a;
  font-size: 12px;
}
.benefits span::first-letter {
  color: var(--blue);
}
.art {
  position: absolute;
  right: 5%;
  top: 15px;
  width: 300px;
  height: 240px;
  background: radial-gradient(ellipse at center, #d1e2ff, transparent 68%);
}
.shield {
  position: absolute;
  left: 100px;
  top: 25px;
  width: 120px;
  height: 145px;
  background: linear-gradient(135deg, #65b2ff, #1c5be6);
  clip-path: polygon(50% 0, 95% 16%, 90% 64%, 75% 84%, 50% 100%, 25% 84%, 10% 64%, 5% 16%);
  display: grid;
  place-items: center;
  font-size: 58px;
  color: #e5f6ff;
  transform: rotate(9deg);
  filter: drop-shadow(10px 20px 20px #699beb);
}
.coin {
  position: absolute;
  border-radius: 50%;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
  box-shadow:
    inset 0 0 0 5px #ffffff40,
    0 12px 20px #799bd236;
}
.coin.t {
  background: #29ba9e;
  color: white;
  left: 27px;
  top: 95px;
  transform: rotate(-15deg);
}
.coin.b {
  background: #ffb960;
  color: white;
  right: 0;
  top: 14px;
  transform: rotate(18deg);
}
.coin.e {
  background: #a6a1f6;
  color: white;
  right: 12px;
  bottom: 16px;
}
.stats {
  display: flex;
  gap: 40px;
  padding: 22px 6px;
  margin-bottom: 7px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.stat b {
  font-size: 21px;
  color: var(--ink);
}
.stat em {
  font-style: normal;
  color: #10b58a;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 18px;
}
h2 {
  font-size: 20px;
  margin: 0;
}
.sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.filters {
  display: flex;
  gap: 12px;
  background: white;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
  align-items: end;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
label {
  font-size: 12px;
  color: #66758a;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #e1e7f0;
  border-radius: 7px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--blue);
}
.search {
  flex: 1.6;
}
.primary {
  background: var(--blue);
  color: white;
  border-radius: 7px;
  padding: 11px 19px;
  font-weight: 600;
}
.secondary {
  border: 1px solid #dce3ef;
  border-radius: 7px;
  padding: 10px 16px;
  background: white;
}
.table {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.row {
  display: grid;
  grid-template-columns: 1.45fr 1.3fr 1.25fr 0.9fr 1fr 0.65fr 0.85fr;
  gap: 16px;
  align-items: center;
  padding: 25px 24px;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.thead {
  background: #f1f5fa;
  font-size: 11px;
  color: #8190a4;
  padding: 14px 24px;
}
.merchant {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 21px;
  font-weight: 600;
  background: linear-gradient(140deg, var(--av), #172a43);
}
.name {
  font-size: 14px;
  font-weight: 700;
}
.verified {
  font-size: 11px;
  color: #387beb;
  margin-left: 4px;
}
.tagline {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.contactline {
  display: block;
  font-size: 11px;
  margin: 7px 0;
  color: #53657e;
}
.contactline i {
  font-style: normal;
  margin-right: 6px;
  color: #28a7db;
}
.inventory {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0;
  color: #79869a;
}
.inventory b {
  font-variant-numeric: tabular-nums;
  color: #33445f;
  font-weight: 600;
}
.icons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.token {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--c);
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.pay {
  font-size: 11px;
  color: #65758e;
  line-height: 2;
}
.status {
  font-size: 11px;
  white-space: nowrap;
  color: #24a780;
}
.status.off {
  color: #8d98a9;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}
.contactbtn {
  color: var(--blue);
  background: #eef4ff;
  border: 1px solid #dce8ff;
  border-radius: 6px;
  padding: 10px 11px;
  white-space: nowrap;
  font-size: 11px;
}
.listbottom {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 2px;
}
.page {
  background: var(--blue);
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
}
.notice {
  display: flex;
  gap: 12px;
  border: 1px solid #e3e9f3;
  background: #f0f4fa;
  padding: 15px 20px;
  border-radius: 8px;
  color: #8290a4;
  font-size: 11px;
  margin-top: 16px;
  line-height: 1.7;
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px 5%;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  gap: 20px;
}
footer b {
  color: #52657f;
}
dialog {
  border: 0;
  border-radius: 16px;
  padding: 30px;
  max-width: 650px;
  width: calc(100% - 30px);
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 100px #0d234940;
}
dialog::backdrop {
  background: #17243d66;
  backdrop-filter: blur(4px);
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modalhead button {
  font-size: 24px;
  color: var(--muted);
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.full {
  grid-column: 1/-1;
}
.checks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.checks label {
  display: flex;
  gap: 5px;
  align-items: center;
}
.checks input {
  width: auto;
}
.stockinput {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
  align-items: center;
}
.stockinput label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stockinput label input {
  width: auto;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.adminrow {
  grid-template-columns: 1.4fr 1.4fr 1fr 1fr 1.2fr;
}
.badge {
  font-size: 11px;
  color: #17a07b;
  background: #e7f8f1;
  padding: 5px 9px;
  border-radius: 5px;
}
.badge.gray {
  background: #f0f2f6;
  color: #8d98a9;
}
.edit {
  color: var(--blue);
  font-size: 12px;
}
.del {
  color: #dd5660;
  font-size: 12px;
  margin-left: 10px;
}
.empty {
  text-align: center;
  padding: 60px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: #17243d;
  color: white;
  border-radius: 8px;
  display: none;
  z-index: 9;
}
.aboutblocks h3 {
  font-size: 14px;
  margin-top: 24px;
}
.aboutblocks p {
  font-size: 13px;
}
.channel {
  display: flex;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
  text-decoration: none;
  color: var(--blue);
}
@media (min-width: 1500px) {
  main {
    padding-left: 0;
    padding-right: 0;
  }
}
@media (max-width: 1100px) {
  header {
    gap: 25px;
  }
  .row {
    gap: 10px;
    padding: 22px 16px;
    grid-template-columns: 1.35fr 1.2fr 1.25fr 0.65fr 0.8fr 0.6fr 0.8fr;
  }
  .art {
    right: 1%;
    opacity: 0.8;
  }
  .hero {
    padding: 32px;
  }
  .contactbtn {
    padding: 9px 6px;
  }
}
@media (max-width: 800px) {
  header {
    height: auto;
    min-height: 80px;
    padding: 16px 5%;
    flex-wrap: wrap;
    gap: 16px;
  }
  .brand {
    font-size: 20px;
  }
  .tools {
    gap: 10px;
  }
  .tools button {
    font-size: 11px;
  }
  nav {
    order: 3;
    width: 100%;
    height: 36px;
    gap: 25px;
  }
  .hero {
    padding: 27px;
    min-height: 250px;
  }
  h1 {
    font-size: 28px;
  }
  .art {
    opacity: 0.25;
    right: -65px;
    top: 30px;
  }
  .hero > *:not(.art) {
    position: relative;
    z-index: 1;
  }
  .benefits {
    gap: 14px;
    flex-wrap: wrap;
    max-width: 280px;
    line-height: 1.8;
  }
  .stats {
    gap: 22px;
    flex-wrap: wrap;
  }
  .stat {
    font-size: 10px;
  }
  .stat b {
    font-size: 18px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .field {
    flex: 1 1 40%;
  }
  .search {
    flex-basis: 65%;
  }
  .thead {
    display: none;
  }
  .table {
    background: transparent;
    border: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    overflow: visible;
  }
  .row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    gap: 12px;
  }
  .merchant {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }
  .row > div:nth-child(2) {
    margin-top: 0;
  }
  .inventory {
    font-size: 12px;
  }
  .row .icons {
    display: inline-flex;
  }
  .pay {
    font-size: 12px;
  }
  .contactbtn {
    width: 100%;
    font-size: 12px;
  }
  .row .status {
    align-self: flex-start;
  }
  .adminrow {
    gap: 16px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  footer {
    flex-wrap: wrap;
  }
  .notice {
    font-size: 10px;
  }
}
@media (max-width: 520px) {
  .table {
    grid-template-columns: 1fr;
  }
  .brand span {
    display: none;
  }
  .demo {
    display: none;
  }
  .tools {
    margin-left: auto;
  }
  main {
    padding-top: 20px;
  }
  .hero {
    padding: 25px 22px;
  }
  h1 {
    font-size: 26px;
  }
  .hero p {
    font-size: 12px;
  }
  .stats {
    gap: 16px;
    justify-content: space-between;
  }
  .stat {
    display: block;
  }
  .stat b {
    display: block;
    margin-bottom: 3px;
  }
  .filters {
    padding: 14px;
  }
  .sectionhead {
    gap: 12px;
  }
  .sectionhead h2 {
    font-size: 18px;
  }
  .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
  }
  .merchant {
    grid-column: 1/-1;
  }
  .row > div:nth-child(3) {
    grid-column: 2;
    grid-row: 2/4;
  }
  .row > div:last-child {
    grid-column: 2;
  }
  .row .pay {
    grid-column: 1;
  }
  .row .status {
    align-self: center;
  }
  .adminrow {
    display: flex;
  }
  .row .contactline {
    font-size: 10px;
  }
  footer span:last-child {
    width: 100%;
  }
}
@media (max-width: 800px) {
  .row.thead {
    display: none;
  }
}
/* Refined directory and independent console */
:root {
  --blue: #315be8;
  --ink: #1d2a43;
  --muted: #8490a5;
  --line: #e7ecf5;
}
body {
  background: #f5f7fc;
}
header {
  height: 90px;
  box-shadow: 0 3px 20px #22385903;
}
.brand i {
  box-shadow: 0 5px 12px #315be82b;
}
main {
  max-width: 1480px;
  padding-top: 38px;
}
.hero {
  border-radius: 22px;
  min-height: 310px;
  padding: 48px;
  background:
    radial-gradient(ellipse at 85% 15%, #d0e2ff 0, transparent 52%),
    linear-gradient(115deg, #edf3ff, #eaf0ff 55%, #e2ecff);
  border: 1px solid #dfe8fc;
}
.hero h1 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 65%;
  margin: 19px 0 15px;
}
.hero p {
  max-width: 65%;
  font-size: 14px;
}
.eyebrow {
  letter-spacing: 2.3px;
  font-size: 10px;
}
.benefits {
  margin-top: 36px;
  gap: 10px;
}
.benefits span {
  background: #ffffff90;
  border: 1px solid #ffffff;
  border-radius: 30px;
  padding: 8px 13px;
  font-size: 11px;
}
.art {
  right: 7%;
  top: 22px;
  width: 290px;
  height: 270px;
  border-radius: 50%;
  border: 1px solid #aac7fa66;
  background: radial-gradient(ellipse, #bed5ff88, transparent 68%);
  transform: rotate(-8deg);
}
.art:before,
.art:after {
  content: "";
  position: absolute;
  inset: 25px;
  border-radius: 50%;
  border: 1px dashed #9dbdf077;
  transform: rotate(30deg);
}
.art:after {
  inset: 55px;
  border-style: solid;
}
.shield {
  left: 83px;
  top: 63px;
  width: 125px;
  height: 145px;
  background: linear-gradient(145deg, #91cbff 0, #468efa 45%, #2d59de 100%);
  z-index: 2;
  transform: rotate(8deg);
  font-size: 55px;
}
.coin {
  z-index: 3;
}
.coin.t {
  left: 7px;
  top: 108px;
}
.coin.b {
  right: 1px;
  top: 30px;
}
.coin.e {
  right: 0;
  bottom: 21px;
}
.stats {
  margin: 20px 0 26px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 4px 15px #293d661f;
  font-size: 12px;
  gap: 16px;
}
.stat b {
  font-size: 25px;
}
.sectionhead {
  margin-top: 32px;
}
.filters {
  padding: 20px;
  box-shadow: 0 4px 16px #253e6905;
}
.row {
  padding-top: 25px;
  padding-bottom: 25px;
  grid-template-columns: 1.35fr 1.1fr 1.35fr 1.05fr 0.85fr 0.55fr 0.8fr;
}
.thead {
  padding-top: 15px;
  padding-bottom: 15px;
  background: #eef2f9;
  color: #6e7e96;
  letter-spacing: 0.3px;
}
.row:not(.thead):hover {
  background: #fbfcff;
}
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 4px 12px #2536581a;
  border: 3px solid #fff;
}
.contactbtn {
  background: #315be8;
  color: white;
  border-color: #315be8;
  box-shadow: 0 4px 10px #315be81b;
  padding: 11px 13px;
  border-radius: 7px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.contactbtn:hover {
  background: #2249cd;
  transform: translateY(-1px);
}
.primary:hover {
  background: #2449d0;
}
.assetlabel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.assetlabel strong {
  font-size: 11px;
  font-weight: 600;
  color: #52647d;
}
.assetlabel small {
  font-size: 9px;
  color: #8c9aaf;
}
.inventory {
  align-items: center;
  margin: 9px 0;
}
.icons {
  flex-direction: column;
  gap: 7px;
}
.networkchip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: #73819a;
  white-space: nowrap;
}
.networkchip .token {
  width: 19px;
  height: 19px;
  font-size: 11px;
}
.pay {
  color: #7c8aa0;
}
.table {
  box-shadow: 0 6px 25px #33496505;
}
.status {
  background: #ebf9f3;
  border-radius: 20px;
  padding: 6px 9px;
  font-size: 10px;
}
.status.off {
  background: #f1f3f7;
}
.contactline {
  line-height: 1.65;
}
.paymentrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.paymentrow > div {
  flex: 1;
}
.paymentrow small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.paymenticon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #edf2ff;
  color: var(--blue);
  font-size: 18px;
}
.paychoice {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fafbfe;
}
.paychoice input {
  width: auto;
}
.assetgroup {
  font-size: 12px;
  color: #3856b3;
  margin: 20px 0 9px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.stockinput {
  grid-template-columns: 1.6fr 1fr;
}
.stockinput label {
  font-size: 11px;
}
.adminrow {
  grid-template-columns: 1.4fr 0.7fr 0.85fr 1.15fr 0.8fr;
}
body[data-page="admin"] {
  background: #f3f5fb;
}
body[data-page="admin"] header {
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: 232px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 35px 22px;
  gap: 40px;
  border-right: 1px solid var(--line);
  z-index: 3;
}
body[data-page="admin"] .brand {
  font-size: 22px;
}
body[data-page="admin"] .brand span {
  font-size: 7px;
  letter-spacing: 2px;
}
body[data-page="admin"] nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
}
body[data-page="admin"] nav button {
  text-align: left;
  border: 0;
  padding: 14px 16px;
  border-radius: 9px;
}
body[data-page="admin"] nav button.active {
  background: #edf2ff;
  color: #315be8;
}
body[data-page="admin"] .tools {
  margin: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 10px;
}
body[data-page="admin"] main {
  margin-left: 232px;
  padding: 40px 36px 70px;
  max-width: none;
}
body[data-page="admin"] footer {
  margin-left: 232px;
  padding: 25px 36px;
}
body[data-page="admin"] h1 {
  font-size: 32px;
  margin-top: 14px;
}
body[data-page="admin"] .sectionhead {
  margin-top: 0;
}
body[data-page="admin"] .notice {
  background: #eaf0fc;
  border: 1px solid #dce6fa;
  color: #7a8cad;
  padding: 18px;
}
body[data-page="admin"] .filters {
  border-radius: 12px;
}
.badge {
  cursor: pointer;
}
.badge:hover {
  filter: brightness(0.97);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #93b3ff;
  outline-offset: 3px;
}
@media (max-width: 1200px) {
  .row {
    gap: 11px;
  }
  .hero h1 {
    font-size: 35px;
  }
  .hero {
    padding: 38px;
  }
  .art {
    right: 3%;
    width: 260px;
  }
  .adminrow {
    grid-template-columns: 1.3fr 0.6fr 0.9fr 1.1fr 0.9fr;
  }
  body[data-page="admin"] header {
    width: 205px;
  }
  body[data-page="admin"] main,
  body[data-page="admin"] footer {
    margin-left: 205px;
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 800px) {
  header {
    height: auto;
    min-height: 80px;
  }
  .hero {
    min-height: 280px;
    padding: 30px;
  }
  .hero h1 {
    font-size: 30px;
    max-width: 90%;
  }
  .hero p {
    max-width: 80%;
    font-size: 12px;
  }
  .art {
    right: -70px;
    opacity: 0.3;
  }
  .benefits {
    gap: 7px;
    margin-top: 25px;
    max-width: none;
  }
  .benefits span {
    padding: 5px 8px;
    font-size: 10px;
  }
  .stats {
    gap: 12px;
    margin: 18px 0 28px;
  }
  .stat {
    padding: 16px;
    display: block;
    box-shadow: none;
  }
  .stat b {
    display: block;
    margin-bottom: 6px;
    font-size: 22px;
  }
  .row {
    display: flex;
  }
  .row.thead {
    display: none;
  }
  .icons {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .table {
    box-shadow: none;
  }
  .networkchip {
    background: #f1f4fa;
    padding: 4px 7px;
    border-radius: 5px;
  }
  .row .status {
    align-self: start;
  }
  .row .inventory {
    font-size: 13px;
  }
  .assetlabel small {
    font-size: 10px;
  }
  body[data-page="admin"] header {
    position: static;
    height: auto;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }
  body[data-page="admin"] nav {
    flex-direction: row;
    order: 3;
    width: 100%;
    gap: 10px;
  }
  body[data-page="admin"] nav button {
    padding: 10px 14px;
  }
  body[data-page="admin"] .tools {
    margin: 0 0 0 auto;
    padding: 0;
  }
  body[data-page="admin"] main,
  body[data-page="admin"] footer {
    margin-left: 0;
    padding-left: 5%;
    padding-right: 5%;
  }
  body[data-page="admin"] .sectionhead {
    align-items: start;
  }
  body[data-page="admin"] h1 {
    font-size: 27px;
  }
  body[data-page="admin"] .sectionhead p {
    font-size: 12px;
  }
  .adminrow {
    display: flex;
  }
  .paymentrow {
    gap: 9px;
    font-size: 12px;
  }
}
@media (max-width: 520px) {
  main {
    padding-top: 20px;
  }
  .hero {
    padding: 26px 22px;
    min-height: 290px;
  }
  .hero h1 {
    font-size: 29px;
    max-width: 100%;
  }
  .hero p {
    max-width: 90%;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    font-size: 10px;
    padding: 14px 10px;
  }
  .stat b {
    font-size: 21px;
  }
  .row {
    display: flex;
    padding: 21px;
  }
  .row > div:nth-child(3) {
    padding: 8px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .row .icons {
    padding: 2px 0;
  }
  .contactline {
    font-size: 12px;
  }
  .row .contactline {
    font-size: 12px;
  }
  .row > div:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
  }
  .inventory {
    margin: 7px 0;
  }
  .row .pay {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .row > div:last-child {
    margin-top: 4px;
  }
  .contactbtn {
    padding: 12px;
  }
  .stockinput {
    grid-template-columns: 1.7fr 1fr;
  }
  .stockinput .token {
    display: none;
  }
  .stats .stat {
    display: block;
  }
  .paymentrow .badge {
    font-size: 9px;
    padding: 5px;
  }
  .paymenticon {
    width: 31px;
    height: 31px;
    flex-shrink: 0;
  }
  .paymentrow small {
    font-size: 10px;
  }
  body[data-page="admin"] .sectionhead {
    display: block;
  }
  body[data-page="admin"] #add {
    margin-bottom: 15px;
  }
  body[data-page="admin"] .tools {
    gap: 8px;
    font-size: 10px;
  }
}
.hero-visual {
  position: absolute;
  right: 0;
  top: 50%;
  width: 40%;
  height: 100%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.hero h1 {
  max-width: 65%;
}
@media (max-width: 1100px) {
  .hero-visual {
    width: 36%;
    right: 0;
  }
  .hero h1 {
    max-width: 68%;
    font-size: 32px;
  }
}
@media (max-width: 800px) {
  .hero .hero-visual {
    position: absolute;
    z-index: 0;
    width: 38%;
    right: -5%;
    opacity: 0.6;
  }
  .hero h1 {
    max-width: 90%;
    font-size: 30px;
  }
  .hero p {
    max-width: 78%;
  }
}
@media (max-width: 520px) {
  .hero .hero-visual {
    display: none;
  }
  .hero h1,
  .hero p {
    max-width: 100%;
  }
  .hero {
    min-height: 260px;
  }
}
/* Merchant contact directory and configuration */
.contact-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #e7edf7;
  background: #f7f9fd;
  padding: 18px;
  border-radius: 12px;
  margin-top: 8px;
}
.contact-profile > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.contact-profile strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.contact-profile p {
  font-size: 12px;
  color: #8492a8;
  margin: 5px 0 0;
  line-height: 1.6;
}
.contact-profile .avatar {
  border: 0;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 20px;
}
.contact-intro {
  font-size: 13px;
  color: #7e8ea7;
  margin: 19px 0;
}
.contact-details {
  display: grid;
  gap: 12px;
}
.contact-detail {
  padding: 17px;
  border: 1px solid #e2e9f5;
  border-radius: 11px;
  background: #fff;
}
.contact-detail-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.contact-detail-heading strong {
  font-size: 13px;
  font-weight: 600;
}
.contact-channel-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #edf2ff;
  color: #5271cb;
  font-size: 14px;
}
.contact-channel-icon.telegram {
  color: #26a8d9;
  background: #edf8fd;
}
.contact-channel-icon.whatsapp {
  color: #1fac7e;
  background: #eaf8f2;
}
.contact-detail input {
  font-size: 14px;
  color: #334d70;
  background: #f7f9fd;
  border: 1px solid #edf1f7;
  border-radius: 6px;
  padding: 12px;
  cursor: text;
  width: 100%;
  min-width: 0;
}
.contact-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.contact-copy {
  background: white;
  border: 1px solid #dce5f3;
  border-radius: 6px;
  padding: 9px 16px;
  min-height: 38px;
  color: #637c9f;
  font-size: 12px;
}
.contact-copy.copied {
  background: #eaf8f2;
  border-color: #b9e5d4;
  color: #169773;
}
.contact-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  background: #315be8;
  color: #fff;
  border-radius: 6px;
  padding: 10px 16px;
  min-height: 38px;
  font-size: 12px;
  margin-left: auto;
}
.contact-open:hover {
  background: #254bd0;
}
.contact-copy-only {
  margin-left: auto;
  color: #9ba9bd;
  font-size: 11px;
}
.contact-footer-note {
  font-size: 11px;
  color: #93a1b5;
  line-height: 1.8;
  margin: 18px 0 0;
}
#contactFeedback {
  font-size: 12px;
  line-height: 1.7;
  color: #258f72;
  margin-top: 12px;
}
.contact-empty {
  text-align: center;
  padding: 28px 12px;
  border: 1px dashed #dce4f1;
  border-radius: 10px;
  color: #8c9bb0;
  font-size: 13px;
}
.contact-config {
  border: 1px solid #e4eaf4;
  padding: 18px;
  border-radius: 10px;
  background: #f8faff;
}
.config-heading h3 {
  margin: 0 0 7px;
  font-size: 14px;
}
.config-heading p {
  font-size: 11px;
  margin: 0 0 17px;
  line-height: 1.8;
}
.contact-field {
  padding: 15px;
  background: #fff;
  border: 1px solid #e0e7f2;
  border-radius: 9px;
  margin: 12px 0;
  display: grid;
  gap: 12px;
}
.contact-field label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: #7a8ca5;
}
.contact-field input,
.contact-field select {
  font-size: 12px;
  padding: 10px;
  min-height: 38px;
}
.contact-field-top {
  display: flex;
  gap: 15px;
  align-items: end;
}
.contact-field-top label {
  flex: 1;
}
.remove-contact {
  font-size: 11px;
  color: #cf6771;
  border: 1px solid #f1dce0;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 0;
}
.contact-custom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.contact-custom[hidden] {
  display: none;
}
.contact-auto-hint {
  font-size: 10px;
  line-height: 1.7;
  color: #98a5b8;
}
.contact-hint {
  font-size: 11px;
  line-height: 1.8;
  color: #8799b3;
  margin: 15px 0 0;
}
.contact-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}
.contact-config-actions .secondary {
  font-size: 11px;
}
.contact-preview-dialog {
  max-width: 600px;
}
.contact-preview-dialog::backdrop {
  background: #142a4c70;
}
#formError:not(:empty) {
  background: #fff2f3;
  padding: 12px;
  border-radius: 7px;
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
}
@media (max-width: 600px) {
  .contact-profile {
    padding: 14px;
    gap: 10px;
  }
  .contact-profile strong {
    font-size: 16px;
  }
  .contact-profile .status {
    font-size: 10px;
  }
  .contact-profile p {
    font-size: 11px;
  }
  .contact-config {
    padding: 13px;
  }
  .contact-field {
    padding: 12px;
  }
  .contact-custom {
    grid-template-columns: 1fr;
  }
  .contact-field input,
  .contact-field select {
    font-size: 16px;
    min-height: 44px;
  }
  .contact-detail input {
    font-size: 16px;
    min-height: 44px;
  }
  .contact-config-actions {
    flex-wrap: wrap;
  }
  .contact-open,
  .contact-copy {
    min-height: 44px;
    font-size: 12px;
  }
  .contact-detail {
    padding: 14px;
  }
  .contact-profile .avatar {
    width: 36px;
    height: 36px;
    font-size: 17px;
  }
  .contact-copy-only {
    font-size: 10px;
  }
  .contact-intro {
    font-size: 12px;
  }
}
