body.mg-login-page {
  --mg-paper: #fff7ec;
  --mg-paper-deep: #fff0dc;
  --mg-text: #12100e;
  --mg-muted: #5f5750;
  --mg-soft: #8a7a6e;
  --mg-line: rgba(225, 175, 118, 0.28);
  --mg-card: rgba(255, 255, 255, 0.68);
  --mg-card-solid: #fffdf8;
  --mg-orange: #e96d2f;
  --mg-orange-strong: #ea5d20;
  --mg-brown: #7a4a23;
  --mg-shadow: 0 22px 60px rgba(158, 100, 44, 0.13);
  min-width: 320px;
  color: var(--mg-text);
  color-scheme: light;
  background:
    radial-gradient(circle at 78% 18%, rgba(238, 156, 70, 0.28), transparent 25%),
    radial-gradient(circle at 20% 8%, rgba(255, 236, 196, 0.92), transparent 28%),
    linear-gradient(135deg, #fffaf1 0%, #fff4e5 48%, #fff8ee 100%) !important;
}

body.mg-login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(122, 74, 35, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(122, 74, 35, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 70%);
}

.mg-login-badge {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: var(--mg-text);
  font: 800 18px Inter, "Noto Sans SC", system-ui, sans-serif;
  white-space: nowrap;
}

.mg-login-badge-mark {
  color: var(--mg-orange-strong);
  letter-spacing: -0.14em;
  font-size: 28px;
}

.mg-lang-switcher {
  position: fixed;
  top: 28px;
  right: 34px;
  z-index: 80;
  color: var(--mg-text);
  font: 700 13px Inter, "Noto Sans SC", system-ui, sans-serif;
}

.mg-native-locale-hidden {
  display: none !important;
}

.mg-lang-switcher.mg-lang-inline {
  position: relative;
  top: auto;
  right: auto;
  z-index: 40;
  color: inherit;
}

.mg-lang-switcher.mg-lang-dashboard-fixed {
  position: fixed;
  top: var(--mg-lang-fixed-top, 14px);
  left: var(--mg-lang-fixed-left, auto);
  right: auto;
  z-index: 1000;
  color: var(--mg-text);
}

.mg-lang-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  color: inherit !important;
  border: 1px solid rgba(225, 175, 118, 0.34) !important;
  border-radius: 10px !important;
  background: rgba(255, 253, 248, 0.78) !important;
  box-shadow: 0 12px 28px rgba(158, 100, 44, 0.08) !important;
  backdrop-filter: blur(16px);
  cursor: pointer;
}

.mg-lang-inline .mg-lang-button {
  height: 36px;
  padding: 0 10px;
  border-color: transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}

.mg-lang-dashboard-fixed .mg-lang-button {
  height: 36px;
  padding: 0 10px;
  color: var(--mg-text) !important;
  border-color: rgba(225, 175, 118, 0.34) !important;
  border-radius: 8px !important;
  background: rgba(255, 253, 248, 0.96) !important;
  box-shadow: 0 10px 24px rgba(158, 100, 44, 0.1) !important;
  backdrop-filter: blur(14px);
}

.mg-lang-dashboard-fixed .mg-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  z-index: 1001;
  min-width: 178px;
}

.mg-lang-inline .mg-lang-button:hover {
  background: rgba(122, 74, 35, 0.08) !important;
}

.mg-lang-inline .mg-lang-globe {
  font-size: 15px;
}

.mg-lang-select {
  display: none;
  height: 36px;
  max-width: 132px;
  padding: 0 30px 0 10px;
  color: inherit;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.mg-lang-details {
  display: none;
  position: relative;
  font: inherit;
}

.mg-lang-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.mg-lang-summary::-webkit-details-marker {
  display: none;
}

.mg-lang-summary:hover {
  background: rgba(122, 74, 35, 0.08);
}

.mg-lang-details-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  display: grid;
  min-width: 178px;
  padding: 8px;
  border: 1px solid rgba(225, 175, 118, 0.3);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--mg-shadow);
}

.mg-lang-details-menu button {
  height: 34px;
  padding: 0 10px;
  color: var(--mg-text);
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.mg-lang-details-menu button:hover,
.mg-lang-details-menu button.active {
  color: var(--mg-orange-strong);
  background: rgba(233, 109, 47, 0.12);
}

.mg-lang-inline .mg-lang-button,
.mg-lang-inline .mg-lang-menu,
.mg-lang-inline .mg-lang-select {
  display: none !important;
}

.mg-lang-inline .mg-lang-details {
  display: block;
}

.mg-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  min-width: 150px;
  padding: 8px;
  border: 1px solid rgba(225, 175, 118, 0.3);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--mg-shadow);
}

.mg-lang-inline .mg-lang-menu {
  position: fixed;
  top: var(--mg-lang-menu-top, 56px);
  left: var(--mg-lang-menu-left, auto);
  right: auto;
  z-index: 1000;
  min-width: 178px;
  max-height: min(420px, calc(100vh - 72px));
  overflow-y: auto;
}

.mg-lang-switcher.open .mg-lang-menu {
  display: grid;
}

.mg-lang-menu button {
  height: 34px;
  padding: 0 10px;
  color: var(--mg-text) !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  text-align: left;
  cursor: pointer;
}

.mg-lang-menu button:hover {
  background: rgba(233, 109, 47, 0.1) !important;
}

.mg-lang-menu button.active {
  color: var(--mg-orange-strong) !important;
  background: rgba(233, 109, 47, 0.12) !important;
}

body.mg-auth-page #app > [class*="min-h-screen"] {
  justify-content: flex-end !important;
  padding: 20px clamp(28px, 6vw, 88px) 54px 52vw !important;
}

.mg-auth-hero {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 12;
  display: grid;
  align-content: center;
  width: 52vw;
  max-width: 760px;
  min-width: 540px;
  padding: 96px 44px 64px;
  pointer-events: none;
}

.mg-auth-copy {
  width: min(520px, 80%);
  margin-left: 18px;
}

.mg-auth-copy h1 {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--mg-text);
  font-size: clamp(44px, 4.3vw, 62px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.mg-auth-copy h1 span:last-child {
  color: var(--mg-orange-strong);
}

.mg-auth-copy p {
  max-width: 430px;
  margin: 24px 0 0;
  color: var(--mg-muted);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 600;
}

.mg-home-orbit {
  position: relative;
  width: min(500px, 78%);
  aspect-ratio: 1;
  margin: 52px auto 0;
}

.mg-home-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(218, 151, 80, 0.28);
}

.mg-home-ring-two {
  inset: 58px;
}

.mg-home-ring-three {
  inset: 112px;
}

.mg-home-line {
  position: absolute;
  left: 50%;
  top: 9%;
  width: 1px;
  height: 82%;
  background: linear-gradient(180deg, transparent, rgba(218, 151, 80, 0.22), transparent);
  transform-origin: center;
}

.mg-home-line.line-one {
  transform: rotate(38deg);
}

.mg-home-line.line-two {
  transform: rotate(-42deg);
}

.mg-home-ring::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(232, 122, 44, 0.48);
}

.mg-home-ring-one::before {
  top: 38px;
  left: 55%;
}

.mg-home-ring-two::before {
  top: 22%;
  right: 9%;
}

.mg-home-ring-three::before {
  right: 9%;
  bottom: 26%;
}

.mg-home-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  transform: translate(-50%, -50%);
  border-radius: 28px;
  border: 1px dashed rgba(233, 109, 47, 0.32);
  background: linear-gradient(180deg, rgba(255, 242, 222, 0.94), rgba(248, 177, 93, 0.72));
  box-shadow:
    0 22px 55px rgba(218, 113, 32, 0.18),
    inset 0 0 24px rgba(255, 255, 255, 0.52);
}

.mg-home-core span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: #7b512d;
  border: 1px solid rgba(132, 77, 28, 0.13);
  border-radius: 22px;
  background: rgba(132, 77, 28, 0.1);
  box-shadow: inset 0 0 18px rgba(140, 84, 33, 0.12);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.14em;
}

.mg-home-node {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 6px;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(234, 191, 140, 0.45);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 0 18px 38px rgba(162, 97, 32, 0.1);
  backdrop-filter: blur(12px);
}

.mg-home-node img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.mg-home-node small {
  color: var(--mg-text);
  font-size: 11px;
  font-weight: 800;
}

.mg-home-node.node-claude { top: -18px; left: 50%; transform: translateX(-50%); }
.mg-home-node.node-gpt { top: 58px; right: 5px; }
.mg-home-node.node-qwen { right: -18px; top: 58%; }
.mg-home-node.node-deepseek { right: 58px; bottom: 3px; }
.mg-home-node.node-llama { left: 36%; bottom: -22px; }
.mg-home-node.node-grok { left: -18px; top: 56%; }
.mg-home-node.node-gemini { left: 42px; top: 18%; }

.mg-orbit {
  display: none;
}

.chip-ai { left: 8%; bottom: 10%; }
.chip-star { left: 13%; top: 28%; }
.chip-gpt { right: 13%; bottom: 16%; }
.chip-route { right: 18%; top: 18%; }

body.mg-login-page input,
body.mg-login-page textarea,
body.mg-login-page select {
  color: var(--mg-text) !important;
  border-color: rgba(225, 175, 118, 0.36) !important;
  border-radius: 10px !important;
  background: rgba(255, 253, 248, 0.9) !important;
}

body.mg-login-page button,
body.mg-login-page [role="button"] {
  border-radius: 9px !important;
}

body.mg-login-page button[type="submit"],
body.mg-login-page .ant-btn-primary,
body.mg-login-page .n-button--primary-type {
  color: #fff !important;
  background: #11100f !important;
  border-color: #11100f !important;
  box-shadow: 0 14px 30px rgba(20, 14, 8, 0.16) !important;
}

body.mg-login-page button:not([type="submit"]),
body.mg-login-page [role="button"] {
  border-color: rgba(225, 175, 118, 0.3) !important;
}

body.mg-login-page .ant-card,
body.mg-login-page .n-card,
body.mg-login-page form {
  border-color: rgba(234, 191, 140, 0.26) !important;
  border-radius: 16px !important;
  box-shadow: 0 22px 60px rgba(158, 100, 44, 0.11) !important;
}

body.mg-login-page a {
  color: var(--mg-orange-strong) !important;
}

body.mg-login-page [class*="bg-gradient-to-br"] {
  background:
    radial-gradient(circle at 78% 18%, rgba(238, 156, 70, 0.26), transparent 25%),
    radial-gradient(circle at 20% 8%, rgba(255, 236, 196, 0.92), transparent 28%),
    linear-gradient(135deg, #fffaf1 0%, #fff4e5 48%, #fff8ee 100%) !important;
}

body.mg-login-page [class*="bg-primary-"],
body.mg-login-page [class*="from-primary-"],
body.mg-login-page [class*="via-primary-"],
body.mg-login-page [class*="to-primary-"] {
  --tw-gradient-from: rgba(233, 109, 47, 0.2) !important;
  --tw-gradient-to: rgba(255, 247, 236, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
  background-color: rgba(233, 109, 47, 0.12) !important;
}

body.mg-login-page .text-gradient,
body.mg-login-page [class*="text-gradient"] {
  color: var(--mg-text) !important;
  background: none !important;
  -webkit-text-fill-color: var(--mg-text) !important;
}

body.mg-login-page .card-glass,
body.mg-login-page [class*="card-glass"] {
  border: 1px solid rgba(234, 191, 140, 0.28) !important;
  background: rgba(255, 255, 255, 0.66) !important;
  box-shadow: 0 22px 60px rgba(158, 100, 44, 0.13) !important;
  backdrop-filter: blur(18px) !important;
}

body.mg-login-page [class*="shadow-primary"] {
  box-shadow: 0 16px 34px rgba(158, 100, 44, 0.16) !important;
}

body.mg-login-page [class*="text-primary"] {
  color: var(--mg-orange-strong) !important;
}

body.mg-login-page [class*="text-gray-"],
body.mg-login-page [class*="text-dark-"] {
  color: var(--mg-muted) !important;
}

body.mg-login-page [class*="ring-primary"],
body.mg-login-page input:focus,
body.mg-login-page textarea:focus {
  --tw-ring-color: rgba(233, 109, 47, 0.35) !important;
  border-color: rgba(233, 109, 47, 0.55) !important;
}

html.dark body.mg-login-page {
  --mg-paper: #16120f;
  --mg-paper-deep: #211812;
  --mg-text: #fff7ec;
  --mg-muted: #cdb9a5;
  --mg-soft: #a58f7a;
  --mg-line: rgba(235, 178, 112, 0.24);
  --mg-card: rgba(35, 25, 18, 0.74);
  --mg-card-solid: #211812;
  --mg-orange: #f08a45;
  --mg-orange-strong: #ff9c5c;
  --mg-brown: #d8a66e;
  --mg-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
  background:
    radial-gradient(circle at 76% 18%, rgba(240, 138, 69, 0.22), transparent 27%),
    radial-gradient(circle at 20% 8%, rgba(126, 74, 36, 0.34), transparent 30%),
    radial-gradient(circle at 50% 58%, rgba(255, 188, 108, 0.08), transparent 36%),
    linear-gradient(135deg, #120f0d 0%, #1b130f 48%, #18120f 100%) !important;
}

html.dark body.mg-login-page::before {
  background:
    linear-gradient(90deg, rgba(255, 203, 141, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 203, 141, 0.04) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 76%);
}

html.dark body.mg-login-page [class*="bg-gradient-to-br"] {
  background:
    radial-gradient(circle at 76% 18%, rgba(240, 138, 69, 0.22), transparent 27%),
    radial-gradient(circle at 20% 8%, rgba(126, 74, 36, 0.34), transparent 30%),
    linear-gradient(135deg, #120f0d 0%, #1b130f 48%, #18120f 100%) !important;
}

html.dark body.mg-login-page [class*="bg-primary-"],
html.dark body.mg-login-page [class*="from-primary-"],
html.dark body.mg-login-page [class*="via-primary-"],
html.dark body.mg-login-page [class*="to-primary-"] {
  --tw-gradient-from: rgba(240, 138, 69, 0.18) !important;
  --tw-gradient-to: rgba(18, 15, 13, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
  background-color: rgba(240, 138, 69, 0.12) !important;
}

html.dark body.mg-login-page .card-glass,
html.dark body.mg-login-page [class*="card-glass"],
html.dark body.mg-login-page .ant-card,
html.dark body.mg-login-page .n-card,
html.dark body.mg-login-page form {
  border-color: rgba(235, 178, 112, 0.24) !important;
  background: rgba(35, 25, 18, 0.76) !important;
  box-shadow: var(--mg-shadow) !important;
  backdrop-filter: blur(20px) !important;
}

html.dark body.mg-login-page input,
html.dark body.mg-login-page textarea,
html.dark body.mg-login-page select {
  color: var(--mg-text) !important;
  border-color: rgba(235, 178, 112, 0.28) !important;
  background: rgba(22, 18, 15, 0.92) !important;
}

html.dark body.mg-login-page input::placeholder,
html.dark body.mg-login-page textarea::placeholder {
  color: rgba(205, 185, 165, 0.72) !important;
}

html.dark body.mg-login-page button[type="submit"],
html.dark body.mg-login-page .ant-btn-primary,
html.dark body.mg-login-page .n-button--primary-type {
  color: #170f0a !important;
  background: linear-gradient(180deg, #ffb978, #f08a45) !important;
  border-color: rgba(255, 185, 120, 0.78) !important;
  box-shadow: 0 18px 38px rgba(240, 138, 69, 0.24) !important;
}

html.dark body.mg-login-page [class*="text-gray-"],
html.dark body.mg-login-page [class*="text-dark-"] {
  color: var(--mg-muted) !important;
}

html.dark body.mg-login-page .text-gradient,
html.dark body.mg-login-page [class*="text-gradient"] {
  color: var(--mg-text) !important;
  background: none !important;
  -webkit-text-fill-color: var(--mg-text) !important;
}

html.dark body.mg-login-page [class*="shadow-primary"] {
  box-shadow: 0 18px 42px rgba(240, 138, 69, 0.18) !important;
}

html.dark .mg-lang-button,
html.dark .mg-lang-menu {
  border-color: rgba(235, 178, 112, 0.22) !important;
  background: rgba(24, 18, 14, 0.88) !important;
}

html.dark .mg-home-core {
  color: #ffd6a6;
  border-color: rgba(255, 185, 120, 0.72);
  background: linear-gradient(180deg, rgba(62, 39, 25, 0.95), rgba(240, 138, 69, 0.42));
  box-shadow: 0 28px 70px rgba(240, 138, 69, 0.2), inset 0 0 22px rgba(255, 205, 150, 0.18);
}

html.dark .mg-home-core span {
  color: #ffd6a6;
  border-color: rgba(255, 185, 120, 0.24);
  background: rgba(255, 185, 120, 0.1);
}

html.dark .mg-home-node {
  color: #ffd6a6;
  border-color: rgba(235, 178, 112, 0.28);
  background: rgba(35, 25, 18, 0.88);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

html.dark .mg-home-ring {
  border-color: rgba(235, 178, 112, 0.24);
}

html.dark .mg-home-line {
  background: linear-gradient(180deg, transparent, rgba(235, 178, 112, 0.18), transparent);
}

body.mg-login-page aside h1,
body.mg-login-page aside [class*="font-bold"],
body.mg-login-page nav h1,
body.mg-login-page nav [class*="font-bold"] {
  max-width: 118px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

body.mg-login-page aside [class*="gap-"],
body.mg-login-page nav [class*="gap-"] {
  min-width: 0 !important;
}

.mg-balance-card {
  display: grid !important;
  gap: 8px !important;
  padding: 18px !important;
  border: 1px solid rgba(225, 175, 118, 0.25) !important;
  border-radius: 13px !important;
  background: rgba(255, 250, 242, 0.72) !important;
  box-shadow: 0 12px 28px rgba(158, 100, 44, 0.08) !important;
}

.mg-redeem-page .mg-redeem-balance-card {
  display: none !important;
}

.mg-redeem-page header {
  display: none !important;
}

.mg-redeem-floating-balance {
  position: fixed;
  top: 132px;
  right: 28px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 12px 14px;
  color: var(--mg-text);
  border: 1px solid rgba(225, 175, 118, 0.32);
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: 0 18px 46px rgba(158, 100, 44, 0.16);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.mg-redeem-floating-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff8a3d, #ee6426);
  font-weight: 900;
}

.mg-redeem-floating-copy {
  display: grid;
  gap: 1px;
}

.mg-redeem-floating-label {
  color: var(--mg-soft);
  font-size: 11px;
  font-weight: 800;
}

.mg-redeem-floating-copy strong {
  color: var(--mg-text);
  font-size: 18px;
  line-height: 1.15;
}

.mg-redeem-floating-copy small {
  color: var(--mg-orange-strong);
  font-size: 11px;
  font-weight: 800;
}

.mg-balance-card * {
  color: var(--mg-text) !important;
}

.mg-balance-card .mg-recharge-button,
.mg-balance-card button,
.mg-balance-card a {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 38px !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #ff8a3d, #ee6426) !important;
  box-shadow: 0 12px 24px rgba(233, 109, 47, 0.2) !important;
  font-weight: 800 !important;
}

html.dark .mg-balance-card {
  border-color: rgba(235, 178, 112, 0.22) !important;
  background: rgba(35, 25, 18, 0.74) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3) !important;
}

html.dark .mg-redeem-floating-balance {
  border-color: rgba(235, 178, 112, 0.24);
  background: rgba(35, 25, 18, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

html.dark .mg-balance-card .mg-recharge-button,
html.dark .mg-balance-card button,
html.dark .mg-balance-card a {
  color: #170f0a !important;
  background: linear-gradient(180deg, #ffb978, #f08a45) !important;
}

@media (max-width: 980px) {
  body.mg-auth-page #app > [class*="min-h-screen"] {
    justify-content: center !important;
    padding: 94px 20px 40px !important;
  }

  .mg-redeem-floating-balance {
    position: static;
    width: 100%;
    margin: 0 0 16px;
  }

  .mg-auth-hero {
    display: none;
  }

  .mg-login-badge {
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
  }

  .mg-lang-switcher {
    right: 18px;
  }
}

/* ── Simple slider CAPTCHA ── */
.mg-captcha-widget {
  margin: 16px 0 0;
  padding: 0;
}
.mg-slider-track {
  position: relative;
  height: 44px;
  border-radius: 22px;
  background: rgba(234, 191, 140, 0.15);
  border: 1px solid rgba(234, 191, 140, 0.28);
  overflow: hidden;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}
.mg-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  border-radius: 22px;
  background: linear-gradient(90deg, #e96d2f, #f5a623);
  transition: width 0.1s ease;
  pointer-events: none;
}
.mg-slider-thumb {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #8a7a6e;
  cursor: grab;
  z-index: 2;
  transition: transform 0.05s ease, background 0.3s ease;
  touch-action: none;
}
.mg-slider-thumb:active {
  cursor: grabbing;
}
.mg-slider-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #8a7a6e;
  pointer-events: none;
  z-index: 1;
}
.mg-captcha-status {
  margin-top: 8px;
  font-size: 13px;
  color: #8a7a6e;
}
.mg-captcha-verified .mg-slider-track {
  border-color: rgba(39, 174, 96, 0.4);
}

/* 2026-05-15: WeChat Pay stale QR guidance */
.mg-wxpay-qr-warning {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
}
.mg-wxpay-qr-warning-title {
  margin: 0;
  color: #dc2626;
  font-weight: 600;
}
.mg-wxpay-qr-warning-inline {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #6b7280;
}
.mg-wxpay-qr-warning-inline .mg-wxpay-qr-reopen {
  margin: 0 !important;
}

/* 2026-05-17: sync auth surface with the blue homepage visual system */
body.mg-login-page {
  --mg-paper: #F8FAFC;
  --mg-paper-deep: #EEF3F8;
  --mg-text: #101828;
  --mg-muted: #667085;
  --mg-soft: #6B7280;
  --mg-line: rgba(148, 163, 184, 0.28);
  --mg-card: rgba(255, 255, 255, 0.88);
  --mg-card-solid: #FFFFFF;
  --mg-orange: #2563EB;
  --mg-orange-strong: #1D4ED8;
  --mg-brown: #1E3A5F;
  --mg-accent: #2563EB;
  --mg-accent-strong: #1D4ED8;
  --mg-cyan: #0EA5E9;
  --mg-shadow: 0 18px 52px rgba(15, 23, 42, 0.12);
  background:
    linear-gradient(180deg, #F0F4FA 0%, #F8FAFC 30%, #FEFEFE 100%) !important;
}

body.mg-login-page::before {
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.mg-login-badge-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--mg-accent), var(--mg-cyan));
  border-radius: 9px;
  font-size: 20px;
  letter-spacing: -0.08em;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mg-lang-button,
.mg-lang-dashboard-fixed .mg-lang-button {
  border-color: rgba(148, 163, 184, 0.3) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
}

.mg-lang-summary:hover,
.mg-lang-inline .mg-lang-button:hover {
  background: rgba(37, 99, 235, 0.06) !important;
}

.mg-lang-details-menu,
.mg-lang-menu {
  border-color: rgba(148, 163, 184, 0.25) !important;
  background: rgba(255, 255, 255, 0.98) !important;
}

.mg-lang-details-menu button:hover,
.mg-lang-details-menu button.active,
.mg-lang-menu button:hover,
.mg-lang-menu button.active {
  color: var(--mg-accent-strong) !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

.mg-auth-copy h1 span:last-child {
  color: transparent;
  background: linear-gradient(135deg, var(--mg-accent), var(--mg-cyan));
  -webkit-background-clip: text;
  background-clip: text;
}

.mg-home-ring {
  border-color: rgba(37, 99, 235, 0.18);
}

.mg-home-line {
  background: linear-gradient(180deg, transparent, rgba(37, 99, 235, 0.18), transparent);
}

.mg-home-ring::before {
  background: rgba(37, 99, 235, 0.45);
}

.mg-home-core {
  border-color: rgba(37, 99, 235, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(219, 234, 254, 0.72));
  box-shadow:
    0 22px 55px rgba(37, 99, 235, 0.16),
    inset 0 0 24px rgba(255, 255, 255, 0.62);
}

.mg-home-core span {
  color: #fff;
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(135deg, var(--mg-accent), var(--mg-cyan));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.mg-home-node {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
}

body.mg-login-page input,
body.mg-login-page textarea,
body.mg-login-page select {
  border-color: rgba(148, 163, 184, 0.36) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

body.mg-login-page button[type="submit"],
body.mg-login-page .ant-btn-primary,
body.mg-login-page .n-button--primary-type {
  background: #111827 !important;
  border-color: #111827 !important;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.16) !important;
}

body.mg-login-page button:not([type="submit"]),
body.mg-login-page [role="button"] {
  border-color: rgba(148, 163, 184, 0.3) !important;
}

body.mg-login-page .ant-card,
body.mg-login-page .n-card,
body.mg-login-page form {
  border-color: rgba(148, 163, 184, 0.26) !important;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1) !important;
}

body.mg-login-page a,
body.mg-login-page [class*="text-primary"] {
  color: var(--mg-accent-strong) !important;
}

body.mg-login-page [class*="bg-gradient-to-br"] {
  background:
    linear-gradient(180deg, #F0F4FA 0%, #F8FAFC 30%, #FEFEFE 100%) !important;
}

body.mg-login-page [class*="bg-primary-"],
body.mg-login-page [class*="from-primary-"],
body.mg-login-page [class*="via-primary-"],
body.mg-login-page [class*="to-primary-"] {
  --tw-gradient-from: rgba(37, 99, 235, 0.18) !important;
  --tw-gradient-to: rgba(255, 255, 255, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
  background-color: rgba(37, 99, 235, 0.08) !important;
}

body.mg-login-page .card-glass,
body.mg-login-page [class*="card-glass"] {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12) !important;
}

body.mg-login-page [class*="shadow-primary"] {
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14) !important;
}

body.mg-login-page [class*="ring-primary"],
body.mg-login-page input:focus,
body.mg-login-page textarea:focus {
  --tw-ring-color: rgba(37, 99, 235, 0.32) !important;
  border-color: rgba(37, 99, 235, 0.55) !important;
}

.mg-slider-track {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(37, 99, 235, 0.08);
}

.mg-slider-fill {
  background: linear-gradient(90deg, var(--mg-accent), var(--mg-cyan));
}

.mg-slider-thumb,
.mg-slider-text,
.mg-captcha-status {
  color: var(--mg-soft);
}
