:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #26334b;
  background: #f4f6fa;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #dce3ee;
  border-radius: 7px;
  padding: 10px 15px;
  background: #fff;
  color: #425573;
}
button:hover {
  background: #eef3ff;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: #315deb;
  border-color: #315deb;
  color: white;
}
.primary:hover {
  background: #244cd1;
}
.danger {
  color: #c54454;
}
.link {
  border: 0;
  background: none;
  color: #315deb;
  padding: 5px 7px;
  white-space: nowrap;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
input,
select {
  display: block;
  width: 100%;
  border: 1px solid #dce3ee;
  border-radius: 7px;
  background: white;
  padding: 11px 12px;
  font-size: 13px;
  color: #30425f;
  min-width: 0;
}
input:focus,
select:focus {
  outline: 2px solid #b3c6ff;
  outline-offset: 1px;
}
label {
  display: block;
  font-size: 12px;
  color: #64738b;
  line-height: 1.5;
}
label input,
label select {
  margin-top: 7px;
}
form label {
  margin-bottom: 17px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
}
h2 {
  font-size: 17px;
  margin-bottom: 20px;
}
.muted {
  color: #8591a5;
  font-size: 13px;
  line-height: 1.8;
}
.hint {
  font-size: 12px;
  line-height: 1.8;
  color: #8591a5;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #7383a0;
  font-weight: 700;
  margin-bottom: 12px;
}
.tag {
  font-size: 11px;
  color: #627ba6;
  background: #edf3ff;
  padding: 6px 10px;
  border-radius: 5px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fbfcff;
}
.login-intro {
  position: relative;
  overflow: hidden;
  padding: 64px 12%;
  color: white;
  background:
    radial-gradient(ellipse at 100% 90%, #245397 0, transparent 55%), #132340;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}
.wordmark b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #3d6bff;
  border-radius: 10px;
  font-size: 21px;
  color: #fff;
}
.wordmark small {
  display: block;
  font-size: 8px;
  color: #7e91b1;
  letter-spacing: 1.4px;
  margin-top: 5px;
}
.login-intro .eyebrow {
  margin-top: 110px;
  color: #8aa5d2;
}
.login-intro h1 {
  font-size: 54px;
  line-height: 1.45;
  font-weight: 500;
}
.login-intro > p:last-of-type {
  color: #8196b6;
  line-height: 2;
  font-size: 14px;
}
.orbit {
  width: 430px;
  height: 430px;
  position: absolute;
  bottom: -280px;
  right: -130px;
  border: 1px solid #6688c24d;
  border-radius: 50%;
  box-shadow:
    0 0 0 70px #739bef0a,
    0 0 0 140px #739bef06;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: 370px;
  max-width: 85%;
}
.login-card h2 {
  font-size: 30px;
  margin: 25px 0 12px;
}
.login-card .muted {
  margin-bottom: 32px;
}
.login-card button {
  width: 100%;
  margin-top: 26px;
  padding: 13px;
}
.login-card .hint {
  margin-top: 28px;
}
.error {
  color: #ca4556;
  font-size: 13px;
  margin-top: 15px;
  min-height: 20px;
}
.workspace {
  display: flex;
  min-height: 100vh;
}
[hidden] {
  display: none !important;
}
aside {
  width: 218px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #14223a;
  color: #dbe5f8;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
aside .wordmark {
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0;
}
.nav-label {
  font-size: 10px;
  color: #627693;
  margin: 54px 0 18px;
  padding-left: 12px;
  letter-spacing: 2px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  border: 0;
  background: none;
  color: #93a4bf;
  text-align: left;
  padding: 14px;
}
nav button:hover {
  background: #243654;
}
nav button.active {
  background: #315deb;
  color: white;
  box-shadow: 0 7px 20px #0b173b33;
}
.aside-bottom {
  margin-top: auto;
  color: #6981a3;
  font-size: 10px;
  line-height: 2;
}
.aside-bottom small {
  display: block;
  color: #4c6487;
}
.main-shell {
  margin-left: 218px;
  width: calc(100% - 218px);
}
header {
  height: 72px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e8edf5;
  font-size: 12px;
  color: #8c99ab;
}
.account {
  display: flex;
  gap: 18px;
  align-items: center;
}
.account button {
  border: 0;
  font-size: 12px;
}
.account > span {
  color: #425773;
}
main {
  padding: 32px;
  max-width: 1900px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading p:last-child {
  margin-bottom: 0;
}
.card {
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 15px #25457803;
}
.padded {
  padding: 26px;
}
.metric-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.metric-row > div {
  background: linear-gradient(110deg, #fff, #f8faff);
  padding: 20px 24px;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
}
.metric-row span {
  display: block;
  font-size: 11px;
  color: #8c99ab;
}
.metric-row strong {
  display: inline-block;
  font-size: 26px;
  font-weight: 600;
  color: #314972;
  margin: 9px 10px 0 0;
}
.metric-row small {
  font-size: 11px;
  color: #8c99ab;
}
#sync-label {
  font-size: 17px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 0 18px;
  padding: 24px 24px 7px;
  border-bottom: 1px solid #edf1f7;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
th {
  padding: 15px 16px;
  font-weight: 500;
  color: #8290a5;
  background: #fafbfe;
  border-bottom: 1px solid #e8edf5;
}
td {
  padding: 18px 16px;
  border-bottom: 1px solid #eef2f7;
  color: #52637d;
}
tr:hover td {
  background: #fafcff;
}
td small {
  display: block;
  color: #9aa7ba;
  font-size: 10px;
  margin-top: 5px;
}
.empty {
  text-align: center;
  padding: 65px 20px;
  color: #9aa7ba;
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 8px;
  background: #eef2f8;
  color: #6e7f98;
  font-size: 11px;
}
.badge.good {
  background: #e9f7f0;
  color: #21976c;
}
.badge.bad {
  background: #fceef0;
  color: #c74f65;
}
.badge.wait {
  background: #fff6e8;
  color: #b2853b;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  font-size: 12px;
  color: #8b97ab;
}
.notice {
  border: 1px solid #dfe8fd;
  background: #edf3ff;
  color: #6d82a6;
  font-size: 12px;
  line-height: 1.8;
  padding: 14px 18px;
  border-radius: 9px;
  margin-bottom: 22px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.settings-grid form {
  max-width: 600px;
}
.settings-grid h2 {
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f7;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.section-heading h2 {
  margin-bottom: 10px;
}
.api-users,
.notifications {
  margin-bottom: 22px;
}
.api-users table,
.notifications table {
  margin-top: 16px;
}
summary {
  cursor: pointer;
  color: #4566a0;
  font-size: 12px;
  margin-top: 22px;
}
pre {
  background: #f5f7fb;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font:
    12px/1.7 Consolas,
    "Microsoft YaHei",
    monospace;
  max-height: 450px;
  overflow: auto;
}
footer {
  padding: 10px 32px 24px;
  font-size: 10px;
  color: #9ba7b9;
}
dialog {
  width: 780px;
  max-width: calc(100vw - 32px);
  max-height: 88vh;
  border: 0;
  border-radius: 15px;
  padding: 26px;
  box-shadow: 0 30px 100px #14264640;
  color: #334760;
}
dialog::backdrop {
  background: #13233c66;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-heading button {
  border: 0;
  font-size: 23px;
  padding: 0 8px;
}
.dialog-grid,
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}
.detail-grid span {
  display: block;
  font-size: 11px;
  color: #8d9bad;
  margin-bottom: 6px;
}
.detail-grid b {
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
}
.qr-area {
  text-align: center;
  padding: 10px;
}
.qr-area img {
  width: 260px;
  max-width: 100%;
  background: #fff;
  border: 12px solid white;
  border-radius: 8px;
}
.qr-area .hint {
  white-space: pre-line;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.stats-grid div {
  background: #f5f8fd;
  padding: 18px;
  border-radius: 9px;
}
.stats-grid small {
  display: block;
  color: #8d9bad;
}
.stats-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
}
#toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  max-width: 460px;
  z-index: 50;
  color: white;
  background: #243858;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 13px;
  box-shadow: 0 8px 30px #172b4933;
  line-height: 1.7;
}
#toast.error {
  background: #a44455;
}
.mono {
  font-family: Consolas, monospace;
  font-size: 11px;
}
@media (max-width: 1100px) {
  aside {
    width: 180px;
    padding: 25px 15px;
  }
  .main-shell {
    margin-left: 180px;
    width: calc(100% - 180px);
  }
  main {
    padding: 24px;
  }
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
  }
}
@media (max-width: 700px) {
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-intro {
    display: none;
  }
  .login-card {
    padding: 50px 0;
  }
  aside {
    position: static;
    width: 100%;
    padding: 18px;
    display: block;
  }
  aside .nav-label,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    margin-top: 18px;
  }
  nav button {
    flex: 1;
    padding: 12px 7px;
    font-size: 12px;
    text-align: center;
  }
  .workspace {
    display: block;
  }
  .main-shell {
    margin: 0;
    width: 100%;
  }
  header {
    padding: 0 20px;
    height: 56px;
  }
  main {
    padding: 20px 14px;
  }
  .page-heading {
    display: block;
  }
  .page-heading > .actions {
    margin-top: 18px;
  }
  .metric-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .filter-grid {
    padding: 18px 16px 7px;
    gap: 0 10px;
  }
  .filter-grid input,
  .filter-grid select {
    padding: 10px 7px;
  }
  .filter-actions {
    flex-wrap: wrap;
  }
  .dialog-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: flex-start;
  }
  .padded,
  dialog {
    padding: 20px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .pagination {
    padding: 14px;
  }
  h1 {
    font-size: 25px;
  }
}

/* Compact shared merchant login card. */
dialog.qr-dialog {
  width: min(390px, calc(100vw - 32px));
}
.qr-dialog .dialog-heading {
  border-bottom: 0;
  padding-bottom: 8px;
}
.login-qr {
  text-align: center;
  padding: 4px 4px 14px;
}
.qr-slot {
  width: 248px;
  height: 248px;
  max-width: 100%;
  margin: 10px auto 18px;
  display: grid;
  place-items: center;
  background: #f5f7fb;
  border-radius: 16px;
  color: #79869c;
  overflow: hidden;
}
.qr-slot img {
  width: 100%;
  height: auto;
}
.qr-state {
  margin: 8px 0;
  font-size: 17px;
}
.qr-identity {
  margin: 18px auto 12px;
  padding: 12px 8px;
  background: #f5f7fc;
  border-radius: 12px;
}
.qr-identity span,
.qr-identity small {
  display: block;
  color: #78849a;
  font-size: 12px;
  line-height: 1.7;
}
.qr-identity strong {
  display: block;
  margin: 5px 0;
  font-size: 15px;
}
button.qr-refresh {
  border: 0;
  background: transparent;
  color: #4f6ee8;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 20px;
}
button.qr-refresh:hover {
  background: #eef2ff;
}
.recovery-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at top, #e9efff, #f7f9fc 65%);
  padding: 24px 16px;
}
.recovery-card {
  width: min(390px, 100%);
  padding: 28px 26px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 70px #263b6a12;
  text-align: center;
}
.recovery-brand {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  background: #4666ec;
  color: white;
  font-size: 24px;
  font-weight: 750;
  line-height: 42px;
  border-radius: 13px;
}
.recovery-card h1 {
  font-size: 25px;
}
#recovery-result {
  color: #238665;
  line-height: 1.8;
  font-size: 14px;
}
