:root {
  --bg: #07111f;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-border: rgba(148, 163, 184, 0.16);
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --danger: #dc2626;
  --success: #059669;
  --warning: #d97706;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.2), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(251, 146, 60, 0.18), transparent 30%),
    linear-gradient(135deg, #08111d 0%, #0f172a 45%, #111827 100%);
  color: #e2e8f0;
  min-height: 100vh;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 36px;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: #38bdf8;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  color: #c4b5fd;
}

.hero-desc {
  max-width: 760px;
  margin: 16px 0 0;
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.82);
}

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.session-chip .ghost-btn {
  min-width: 108px;
  min-height: 42px;
  padding: 0 18px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
}

.session-chip .ghost-btn:hover {
  color: #fff;
  background: rgba(196, 181, 253, 0.18);
  border-color: rgba(196, 181, 253, 0.4);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.12);
  color: var(--text);
}

.login-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 34px;
  align-items: center;
  max-width: none;
  min-height: 640px;
  overflow: hidden;
  padding: 34px;
  border-color: rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 8% 16%, rgba(20, 184, 166, 0.26), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(244, 63, 94, 0.18), transparent 30%),
    radial-gradient(circle at 62% 82%, rgba(250, 204, 21, 0.12), transparent 34%),
    linear-gradient(135deg, #06131c 0%, #11182a 48%, #2a171f 100%);
  color: #f8fafc;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.36);
}

.login-panel.login-panel-has-media {
  background:
    linear-gradient(120deg, rgba(6, 19, 28, 0.82) 0%, rgba(15, 23, 42, 0.64) 48%, rgba(42, 23, 31, 0.76) 100%);
}

.login-media-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-media-poster,
.login-media-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-media-poster {
  opacity: 0.88;
  filter: saturate(0.95) brightness(0.86) contrast(1.02);
  transform: scale(1.02);
}

.login-media-video {
  opacity: 0.82;
  filter: saturate(0.9) brightness(0.68) contrast(1.08);
  transform: scale(1.03);
}

.login-media-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(56, 189, 248, 0.22), transparent 34%),
    radial-gradient(circle at 78% 26%, rgba(244, 114, 182, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(3, 7, 18, 0.5) 0%, rgba(15, 23, 42, 0.3) 48%, rgba(2, 6, 23, 0.58) 100%);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.34;
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(255, 255, 255, 0.13) 29%, transparent 30% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 58px);
}

.login-panel::after {
  content: "";
  position: absolute;
  inset: auto -8% -18% 44%;
  height: 280px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(13, 148, 136, 0.34), transparent 68%);
  filter: blur(10px);
}

.login-art-stage {
  position: relative;
  z-index: 1;
  min-height: 560px;
  display: grid;
  align-content: center;
  padding: 12px 0 18px;
}

.login-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.login-copy-kicker {
  margin: 0 0 12px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.login-copy h2 {
  margin: 0;
  max-width: 620px;
  color: #fff7ed;
  font-size: 46px;
  line-height: 1.16;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.login-lines {
  display: grid;
  gap: 10px;
  max-width: 590px;
  margin-top: 24px;
}

.login-lines p {
  margin: 0;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 3px solid rgba(251, 191, 36, 0.86);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.52), rgba(255, 255, 255, 0.06));
  color: rgba(248, 250, 252, 0.9);
  font-size: 15px;
  line-height: 1.65;
  backdrop-filter: blur(10px);
}

.manga-paper-wall {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.manga-paper {
  --paper-tilt: -4deg;
  position: absolute;
  width: 210px;
  height: 292px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px 18px 28px 20px / 18px 30px 20px 26px;
  background: #f8fafc;
  box-shadow:
    0 26px 52px rgba(2, 6, 23, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.62);
  transform: rotate(var(--paper-tilt));
  clip-path: polygon(2% 1%, 96% 0, 100% 8%, 98% 94%, 90% 100%, 4% 98%, 0 88%, 1% 10%);
  animation: paperFloat 7s ease-in-out infinite;
}

.manga-paper::before {
  content: "";
  position: absolute;
  inset: -18px;
  opacity: 0.42;
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.8), transparent 18%),
    repeating-radial-gradient(ellipse at 50% 45%, rgba(15, 23, 42, 0.14) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.22) 0 10px, rgba(15, 23, 42, 0.08) 10px 12px, transparent 12px 28px);
  mix-blend-mode: multiply;
  transform: skewY(-5deg);
}

.manga-paper::after {
  content: "";
  position: absolute;
  inset: -8% -20%;
  background:
    linear-gradient(115deg, transparent 0 26%, rgba(255, 255, 255, 0.56) 36%, transparent 46% 100%),
    repeating-linear-gradient(176deg, transparent 0 18px, rgba(255, 255, 255, 0.28) 18px 20px);
  opacity: 0.5;
  transform: translateY(-6px) rotate(-2deg);
}

.paper-heroine {
  left: 62%;
  top: 30px;
  --paper-tilt: 7deg;
  background:
    linear-gradient(180deg, rgba(254, 243, 199, 0.88), rgba(224, 242, 254, 0.82)),
    radial-gradient(circle at 74% 24%, rgba(251, 191, 36, 0.65), transparent 22%);
}

.paper-wuxia {
  left: 48%;
  top: 238px;
  --paper-tilt: -8deg;
  animation-delay: -1.6s;
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.95), rgba(254, 226, 226, 0.78)),
    radial-gradient(circle at 38% 26%, rgba(239, 68, 68, 0.46), transparent 26%);
}

.paper-portrait {
  left: 76%;
  top: 248px;
  --paper-tilt: 5deg;
  animation-delay: -3.2s;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(219, 234, 254, 0.82)),
    radial-gradient(circle at 50% 18%, rgba(56, 189, 248, 0.44), transparent 24%);
}

.paper-moon,
.paper-sun,
.paper-glow {
  position: absolute;
  z-index: 1;
  right: 24px;
  top: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fef3c7;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.42);
}

.paper-sun {
  left: 26px;
  right: auto;
  background: #fb7185;
  box-shadow: 0 0 34px rgba(244, 63, 94, 0.34);
}

.paper-glow {
  right: 82px;
  top: 30px;
  background: #7dd3fc;
  box-shadow: 0 0 36px rgba(14, 165, 233, 0.38);
}

.paper-mountain {
  position: absolute;
  left: -12px;
  right: -12px;
  bottom: 0;
  height: 112px;
  z-index: 1;
  background:
    linear-gradient(135deg, transparent 0 32%, rgba(15, 23, 42, 0.42) 33% 56%, transparent 57%),
    linear-gradient(25deg, transparent 0 24%, rgba(20, 83, 45, 0.45) 25% 52%, transparent 53%),
    linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.32));
}

.paper-figure {
  position: absolute;
  z-index: 2;
  left: 88px;
  bottom: 66px;
  width: 48px;
  height: 118px;
  border-radius: 46% 46% 28% 28%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.28);
}

.paper-figure::before {
  content: "";
  position: absolute;
  left: 12px;
  top: -30px;
  width: 30px;
  height: 34px;
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(180deg, #f8d5bd, #c08457);
  box-shadow: 0 -10px 0 rgba(15, 23, 42, 0.82);
}

.paper-figure::after {
  content: "";
  position: absolute;
  left: -22px;
  top: 34px;
  width: 96px;
  height: 56px;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.76), rgba(251, 191, 36, 0.42));
  transform: rotate(-8deg);
}

.paper-portrait .paper-figure {
  left: 76px;
  width: 60px;
  height: 128px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.66));
}

.paper-portrait .paper-figure::after {
  left: -12px;
  width: 86px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.46), rgba(99, 102, 241, 0.55));
}

.login-form-card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow:
    0 26px 60px rgba(2, 6, 23, 0.28),
    0 0 0 10px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.login-form-card .panel-header h2 {
  font-size: 28px;
}

.login-form-card .panel-header p {
  color: #475569;
}

.login-form-card .primary-btn {
  min-height: 46px;
  box-shadow: 0 14px 24px rgba(79, 70, 229, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .login-media-video {
    display: none !important;
  }
}

@keyframes paperFloat {
  0%,
  100% {
    transform: translateY(0) rotate(var(--paper-tilt)) skewY(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(var(--paper-tilt)) skewY(1.2deg);
  }
}

.panel-header h2,
.panel-header p {
  margin: 0;
}

.panel-header p {
  margin-top: 8px;
  line-height: 1.7;
  color: var(--muted);
}

.panel-header.compact {
  padding: 20px 20px 0;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.field-upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.field-upload-row .ghost-btn {
  width: fit-content;
  min-width: 0;
  padding: 8px 14px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: #fff;
}

button {
  min-height: 44px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-weight: 700;
}

.ghost-btn {
  padding: 0 16px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.26);
}

.form-helper {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

#adminPanel {
  display: flex;
  flex-direction: column;
}

#adminPanel > .stats-grid {
  order: 1;
}

#adminPanel > .admin-tabs {
  order: 2;
}

#adminOverviewPanel {
  order: 10;
}

#adminBrandingGuidePanel {
  order: 20;
}

#adminBrandingQrSection {
  order: 21;
}

#adminRegisterGuardSection {
  order: 22;
}

#adminPayoutGuidePanel {
  order: 30;
}

#adminPaymentConfigSection {
  order: 31;
}

#adminAutoPayoutConfigSection {
  order: 32;
}

#adminPayoutAccountsSection {
  order: 33;
}

#adminCommissionConfigSection {
  order: 34;
}

#adminSmsConfigSection {
  order: 35;
}

#adminOrdersGuidePanel {
  order: 40;
}

#adminSettlementSection {
  order: 41;
}

#adminOrdersSection {
  order: 42;
}

#adminAgentCommissionsSection {
  order: 43;
}

#adminUserCommissionsSection {
  order: 44;
}

#adminBillingPlansSection {
  order: 45;
}

#adminUsersGuidePanel {
  order: 50;
}

#adminUserToolbarSection {
  order: 51;
}

#adminUserTableSection {
  order: 52;
}

#adminBackupSection {
  order: 60;
}

#adminOperationLogsSection {
  order: 61;
}

.admin-tabs {
  position: sticky;
  top: 12px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
}

.admin-tab-btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.84);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.admin-tab-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(191, 219, 254, 0.26);
}

.admin-tab-btn.active {
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #c4b5fd);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(196, 181, 253, 0.28);
}

.admin-tab-panel {
  margin-bottom: 16px;
}

.overview-panel {
  padding: 0 0 20px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 0;
}

.overview-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 220px;
  padding: 20px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    radial-gradient(circle at top right, rgba(196, 181, 253, 0.16), transparent 52%);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.overview-card-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #38bdf8;
}

.overview-card strong {
  font-size: 34px;
  line-height: 1;
  color: #0f172a;
}

#overviewLatestPayoutBatch {
  font-size: 18px;
  line-height: 1.5;
}

.overview-card h3 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}

.overview-card p {
  margin: 0;
  line-height: 1.75;
  color: #64748b;
}

.overview-card .ghost-btn {
  width: fit-content;
  margin-top: auto;
}

.overview-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px 0;
}

.overview-shortcut-btn {
  appearance: none;
  border: 1px dashed rgba(99, 102, 241, 0.28);
  border-radius: 16px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.06);
  color: #4338ca;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.overview-shortcut-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.42);
  background: rgba(99, 102, 241, 0.1);
}

.tab-guide-panel {
  padding: 0 0 20px;
}

.tab-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 18px 20px 0;
}

.tab-guide-chip {
  appearance: none;
  display: grid;
  gap: 8px;
  text-align: left;
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 58%);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tab-guide-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.26);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.tab-guide-chip strong {
  color: #0f172a;
  font-size: 16px;
}

.tab-guide-chip span {
  line-height: 1.7;
  color: #64748b;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 22px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-card strong {
  font-size: 32px;
}

.stat-total { background: linear-gradient(135deg, #0f172a, #1e293b); }
.stat-active { background: linear-gradient(135deg, #047857, #10b981); }
.stat-disabled { background: linear-gradient(135deg, #b45309, #f59e0b); }
.stat-admin { background: linear-gradient(135deg, #7c2d12, #ea580c); }
.stat-agent { background: linear-gradient(135deg, #1d4ed8, #38bdf8); }

.toolbar-panel {
  padding: 16px;
  margin-bottom: 16px;
}

.qr-panel {
  padding: 0 0 20px;
  margin-bottom: 16px;
}

.qr-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.qr-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qr-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px 20px 0;
}

.qr-preview-box {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px dashed rgba(99, 102, 241, 0.35);
  overflow: hidden;
}

.qr-preview-box img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.qr-meta {
  display: grid;
  gap: 10px;
}

.qr-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
}

.qr-meta strong {
  color: #0f172a;
}

.guard-panel {
  padding: 0 0 20px;
  margin-bottom: 16px;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 20px 0;
}

.integration-grid-single {
  grid-template-columns: 1fr;
}

.integration-card {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
  padding: 18px;
}

.integration-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.integration-card-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.payout-preflight-block {
  margin-top: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 16px;
}

.payout-preflight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.payout-preflight-head strong {
  color: var(--text);
  font-size: 15px;
}

.payout-preflight-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.payout-preflight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.payout-preflight-item.is-ok {
  border-color: rgba(16, 185, 129, 0.22);
  background: rgba(236, 253, 245, 0.9);
}

.payout-preflight-item.is-missing {
  border-color: rgba(245, 158, 11, 0.26);
  background: rgba(255, 251, 235, 0.92);
}

.payout-preflight-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.payout-preflight-pill.is-ok,
.status-ready {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.payout-preflight-pill.is-missing,
.status-fail {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.payout-preflight-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.payout-preflight-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.payout-preflight-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.payout-preflight-empty {
  margin: 0;
  padding: 4px 0;
}

.integration-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 0 20px;
}

.integration-test-actions {
  display: flex;
  align-items: flex-end;
}

.integration-textarea {
  min-height: 150px;
  padding: 12px 14px;
  resize: vertical;
  font-family: "Cascadia Code", Consolas, monospace;
  line-height: 1.6;
}

.billing-panel {
  padding: 0 0 20px;
  margin-bottom: 16px;
}

.payment-panel {
  padding: 0 0 20px;
  margin-bottom: 16px;
}

.agent-commission-panel {
  padding: 0 0 20px;
  margin-bottom: 16px;
}

.settlement-panel {
  padding: 0 0 20px;
  margin-bottom: 16px;
}

.guard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.billing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.payment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.payment-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-action-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 8px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.section-action-bar-solo {
  justify-content: flex-end;
}

.section-action-bar .ghost-btn,
.section-action-bar .primary-btn {
  min-height: 40px;
  border-radius: 14px;
}

.section-action-bar .primary-btn {
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.18);
}

.guard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 0;
}

.switch-row {
  min-height: 92px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
}

.switch-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.switch-row strong,
.switch-row small {
  display: block;
}

.switch-row small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.guard-note {
  margin: 14px 20px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.guard-brand-field {
  display: grid;
  align-content: start;
}

.guard-brand-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 20px 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.72));
}

.guard-brand-preview-media {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.guard-brand-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guard-brand-preview-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.guard-brand-preview-copy {
  display: grid;
  gap: 8px;
}

.guard-brand-preview-copy strong {
  font-size: 22px;
}

.guard-brand-preview-copy span {
  color: var(--muted);
  line-height: 1.7;
}

.sms-test-result {
  color: var(--primary);
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 0;
}

.billing-card {
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.billing-card-top,
.billing-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.billing-card-top strong,
.billing-card-top span {
  display: block;
}

.billing-card-top strong {
  color: #0f172a;
  font-size: 18px;
}

.billing-card-top span,
.billing-card-foot small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.billing-switch {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.billing-switch input {
  width: 18px;
  min-height: 18px;
}

.billing-price-label {
  margin: 18px 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.06);
}

.billing-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted);
  text-align: center;
}

.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 0;
}

.payment-summary-card {
  min-height: 110px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.payment-summary-card span {
  font-size: 14px;
  opacity: 0.9;
}

.payment-summary-card strong {
  font-size: 28px;
  line-height: 1;
}

.payment-summary-card.success {
  background: linear-gradient(135deg, #10b981, #14b8a6);
}

.payment-summary-card.warning {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.payment-summary-card.danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.payment-summary-card.primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.payment-chart-card {
  margin: 18px 20px 0;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.payment-chart-head h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
}

.payment-chart-head p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.payment-chart-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payment-chart-row {
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.payment-chart-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.payment-chart-row-head span {
  color: #334155;
  font-weight: 600;
}

.payment-chart-row-head strong {
  color: #0f172a;
  font-size: 13px;
}

.payment-chart-bar-group {
  display: grid;
  gap: 8px;
}

.payment-chart-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(37, 99, 235, 0.08);
}

.payment-chart-track.secondary {
  background: rgba(16, 185, 129, 0.08);
}

.payment-chart-bar {
  height: 100%;
  border-radius: 999px;
}

.payment-chart-bar.orders {
  background: linear-gradient(90deg, #2563eb, #6366f1);
}

.payment-chart-bar.amount {
  background: linear-gradient(90deg, #059669, #10b981);
}

.payment-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 20px 0;
}

.payment-insight-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.payment-insight-head h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
}

.payment-insight-head p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.payment-insight-list {
  display: grid;
  gap: 12px;
}

.payment-insight-row {
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.payment-insight-row-head,
.payment-insight-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-insight-row-head {
  margin-bottom: 8px;
}

.payment-insight-row-head span {
  color: #0f172a;
  font-weight: 700;
}

.payment-insight-row-head strong {
  color: #334155;
  font-size: 13px;
}

.payment-insight-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.payment-insight-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.payment-insight-bar {
  height: 100%;
  border-radius: 999px;
}

.payment-insight-bar.channel {
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

.payment-insight-bar.plan {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.payment-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 20px 0;
}

.table-filter-bar {
  position: sticky;
  top: 86px;
  z-index: 7;
  backdrop-filter: blur(18px);
}

.payment-toolbar.table-filter-bar,
.toolbar.table-filter-bar {
  margin: 0 20px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.settlement-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 20px 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.panel-tip {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.payment-toolbar input,
.payment-toolbar select {
  min-width: 160px;
}

.payment-toolbar > input {
  flex: 1 1 260px;
}

.payment-time-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
  color: var(--muted);
  font-size: 12px;
}

.payment-time-field input {
  min-width: 0;
}

.payment-table-wrap {
  padding-top: 14px;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar input {
  flex: 1 1 280px;
}

.toolbar select {
  width: 180px;
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
  padding: 18px 20px 20px;
}

.table-pagination {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 6px 20px 20px;
  padding: 16px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.96));
  border-radius: 18px;
}

.table-pagination:empty {
  display: none;
}

.table-pagination-summary {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.table-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.table-pagination-nav,
.table-pagination-tools {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-pagination-tools {
  justify-content: flex-end;
}

.table-pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.pagination-btn {
  min-height: 38px;
}

.table-pagination .pagination-btn {
  min-width: 88px;
  padding-inline: 16px;
}

.pagination-page-btn {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination-page-btn:hover {
  border-color: rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.08);
}

.pagination-page-btn.active {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.2);
}

.pagination-btn:disabled,
.pagination-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.table-pagination-ellipsis {
  color: #94a3b8;
  font-weight: 700;
  padding: 0 2px;
}

.table-pagination-size {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
}

.table-pagination-size select {
  width: auto;
  min-width: 78px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  margin: 0;
}

.table-pagination-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
}

.table-pagination-size span,
.table-pagination-jump span {
  line-height: 1;
}

.table-pagination-jump input {
  width: 84px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  vertical-align: top;
}

thead th {
  color: #334155;
  font-size: 13px;
}

tbody td {
  color: #0f172a;
  font-size: 14px;
}

.table-empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 12px;
}

.role-badge,
.status-badge,
.window-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.role-admin { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.role-agent { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.role-user { background: rgba(100, 116, 139, 0.12); color: #475569; }
.status-neutral { background: rgba(100, 116, 139, 0.12); color: #475569; }
.status-active { background: rgba(16, 185, 129, 0.12); color: #059669; }
.status-disabled { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.window-active { background: rgba(16, 185, 129, 0.12); color: #059669; }
.window-pending { background: rgba(245, 158, 11, 0.16); color: #b45309; }

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

.backup-stat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(247, 249, 255, 0.96), rgba(239, 244, 255, 0.96));
  border: 1px solid rgba(198, 210, 234, 0.7);
  min-height: 148px;
}

.backup-stat-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #5c6f93;
}

.backup-stat-card strong {
  font-size: 22px;
  line-height: 1.35;
  color: #12213d;
  word-break: break-word;
}

.backup-stat-card small {
  font-size: 13px;
  line-height: 1.6;
  color: #61759a;
  word-break: break-word;
}

.backup-history-panel {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(247, 249, 255, 0.92);
  border: 1px solid rgba(203, 214, 236, 0.75);
}

.backup-history-head h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #10203d;
}

.backup-history-head p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #61759a;
}

.backup-history-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.backup-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(214, 223, 242, 0.78);
}

.backup-history-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.backup-history-name {
  font-size: 14px;
  font-weight: 700;
  color: #132548;
  word-break: break-all;
}

.backup-history-meta {
  font-size: 12px;
  color: #667c9f;
}
.window-expired { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.window-admin { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.window-agent { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.payment-status-paid { background: rgba(16, 185, 129, 0.12); color: #059669; }
.payment-status-pending { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.payment-status-closed { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.payment-channel-wechat { background: rgba(16, 185, 129, 0.12); color: #059669; }
.payment-channel-alipay { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.payment-channel-default { background: rgba(100, 116, 139, 0.12); color: #475569; }

.order-user-cell,
.order-plan-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-user-cell strong,
.order-plan-cell strong {
  color: #0f172a;
}

.order-user-cell span,
.order-plan-cell span {
  color: var(--muted);
  font-size: 12px;
}

.window-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.settlement-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settlement-note strong {
  color: #0f172a;
}

.settlement-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.settlement-note-error {
  color: #b91c1c !important;
  font-weight: 600;
}

.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
}

.action-btn.primary {
  color: #fff;
  border-color: rgba(79, 70, 229, 0.4);
  background: linear-gradient(135deg, #2563eb, #6366f1);
}

.action-btn.warning {
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(217, 119, 6, 0.06);
}

.action-btn.danger {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.26);
  background: rgba(220, 38, 38, 0.04);
}

.action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

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

.settlement-row-checkbox,
#settlementSelectAll {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.payout-account-row-checkbox,
#payoutAccountSelectAll {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.payout-batches-card {
  margin: 18px 20px 0;
}

.payout-batch-table-wrap {
  padding-top: 0;
}

.dialog {
  border: none;
  padding: 0;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.dialog-card {
  width: min(720px, calc(100vw - 24px));
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.2);
}

.dialog-card.small {
  width: min(420px, calc(100vw - 24px));
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dialog-head h3 {
  margin: 0;
  color: #0f172a;
}

.dialog-close {
  width: 40px;
  min-height: 40px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

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

.dialog-switch {
  grid-column: 1 / -1;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  min-width: 240px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.26);
}

.hidden {
  display: none !important;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.08);
}

@media (max-width: 920px) {
  .hero {
    flex-direction: column;
  }

  .login-panel {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 26px;
  }

  .login-art-stage {
    min-height: 470px;
  }

  .login-copy h2 {
    font-size: 38px;
  }

  .paper-heroine {
    left: auto;
    right: 12px;
  }

  .paper-wuxia {
    left: 44%;
    top: 224px;
  }

  .paper-portrait {
    left: auto;
    right: 74px;
    top: 250px;
  }

  .login-form-card {
    max-width: none;
    justify-self: stretch;
  }

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

  .admin-tabs {
    top: 10px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

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

  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .qr-head {
    flex-direction: column;
  }

  .section-action-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .guard-head {
    flex-direction: column;
  }

  .billing-head {
    flex-direction: column;
  }

  .payment-head {
    flex-direction: column;
  }

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

  .integration-grid {
    grid-template-columns: 1fr;
  }

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

  .billing-grid {
    grid-template-columns: 1fr;
  }

  .payment-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settlement-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-chart-list,
  .payment-insights-grid {
    grid-template-columns: 1fr;
  }

  .payment-toolbar {
    align-items: stretch;
  }

  .table-filter-bar {
    top: 82px;
  }

  .settlement-batch-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-toolbar > input,
  .payment-toolbar select,
  .payment-time-field {
    width: 100%;
  }

  .table-pagination {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .table-pagination-controls {
    justify-content: flex-start;
  }

  .table-pagination-nav,
  .table-pagination-tools {
    width: 100%;
  }

  .table-pagination-jump {
    width: 100%;
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .page-shell {
    padding: 18px 14px 24px;
  }

  .login-panel {
    padding: 18px;
  }

  .login-media-poster,
  .login-media-video {
    transform: none;
  }

  .login-art-stage {
    min-height: auto;
    padding: 0;
  }

  .login-copy h2 {
    font-size: 30px;
  }

  .login-lines {
    margin-top: 16px;
  }

  .login-lines p {
    padding: 9px 12px;
    font-size: 14px;
  }

  .manga-paper-wall {
    display: none;
  }

  .login-form-card {
    padding: 20px;
    border-radius: 22px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 8px;
  }

  .admin-tab-btn {
    width: 100%;
    justify-content: center;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .overview-shortcuts {
    padding-inline: 14px;
  }

  .overview-shortcut-btn {
    width: 100%;
  }

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

  .toolbar select {
    width: 100%;
  }

  .guard-grid {
    grid-template-columns: 1fr;
  }

  .integration-grid {
    padding-inline: 14px;
  }

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

  .settlement-summary-grid {
    grid-template-columns: 1fr;
  }

  .backup-grid {
    grid-template-columns: 1fr;
  }

  .backup-history-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-pagination-controls,
  .table-pagination-pages,
  .table-pagination-nav,
  .table-pagination-tools {
    width: 100%;
  }

  .table-pagination-jump input,
  .table-pagination-jump .pagination-btn {
    flex: 1 1 auto;
  }

  .pagination-btn,
  .pagination-page-btn {
    flex: 1 1 auto;
  }

  .table-filter-bar {
    position: static;
  }
}
