/* GM 门户独立视觉：森林墨绿 + 琥珀点缀（区别于运营端青绿） */
:root {
  --gm-ink: #13231c;
  --gm-muted: #5d7268;
  --gm-line: #d5e0da;
  --gm-paper: #f3f6f4;
  --gm-card: #ffffff;
  --gm-deep: #0d1f18;
  --gm-mid: #163528;
  --gm-accent: #c8922a;
  --gm-accent-2: #e0b45a;
  --gm-ok: #1f7a4d;
  --gm-bad: #b42318;
  --gm-font: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.gm {
  margin: 0;
  font-family: var(--gm-font);
  color: var(--gm-ink);
  background: var(--gm-paper);
}
.hidden { display: none !important; }

/* —— 登录首屏：品牌为主 —— */
.gm-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--gm-deep), var(--gm-mid) 55%, #1c4634);
  color: #f4f7f5;
}
.gm-login-visual {
  position: relative;
  min-height: 280px;
}
.gm-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
  animation: gm-drift 28s linear infinite;
}
.gm-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.gm-orb-a {
  width: 340px; height: 340px;
  left: 12%; top: 18%;
  background: radial-gradient(circle at 30% 30%, rgba(224,180,90,.55), transparent 65%);
  animation: gm-pulse 7s ease-in-out infinite;
}
.gm-orb-b {
  width: 260px; height: 260px;
  right: 8%; bottom: 12%;
  background: radial-gradient(circle at 50% 50%, rgba(80,160,120,.4), transparent 70%);
  animation: gm-pulse 9s ease-in-out infinite reverse;
}
@keyframes gm-drift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}
@keyframes gm-pulse {
  0%, 100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(1.08); opacity: 1; }
}

.gm-login-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px);
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(13,31,24,.2), rgba(13,31,24,.55));
  backdrop-filter: blur(8px);
  animation: gm-rise .55s ease both;
}
@keyframes gm-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.gm-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gm-accent-2);
  font-weight: 700;
}
.gm-kicker.light { color: rgba(224,180,90,.95); }
.gm-logo {
  margin: 0;
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.gm-brand-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 0 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.2);
  background: #fff;
}
.gm-tagline {
  margin: 14px 0 28px;
  max-width: 28ch;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(244,247,245,.78);
}
.gm-login-form label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  color: rgba(244,247,245,.7);
}
.gm-login-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  font: inherit;
  font-size: 15px;
}
.gm-login-form input:focus {
  outline: 2px solid rgba(224,180,90,.45);
  border-color: var(--gm-accent);
}
.gm-err { min-height: 1.2em; color: #ffb4a8; font-size: 13px; margin: 10px 0 0; }

.gm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.gm-btn:hover { transform: translateY(-1px); }
.gm-btn-solid {
  width: 100%;
  margin-top: 18px;
  background: linear-gradient(180deg, var(--gm-accent-2), var(--gm-accent));
  color: #1a1408;
  box-shadow: 0 12px 28px rgba(200,146,42,.28);
}
.gm-btn-quiet {
  background: transparent;
  color: var(--gm-ink);
  border: 1px solid var(--gm-line);
}
.gm-btn-outline {
  background: var(--gm-deep);
  color: #fff;
  border: 1px solid var(--gm-deep);
}

/* —— 工作台 —— */
.gm-app { min-height: 100vh; }
.gm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 40px);
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--gm-line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.gm-top-brand { display: flex; align-items: center; gap: 12px; }
.gm-top-brand strong { display: block; font-size: 15px; }
.gm-top-brand span { display: block; font-size: 12px; color: var(--gm-muted); }
.gm-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #245c44, var(--gm-deep));
  color: var(--gm-accent-2);
  font-weight: 800;
  font-size: 13px;
}
.gm-top-actions { display: flex; gap: 8px; }
.gm-top-balance {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 8px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: #eef5f1;
  border: 1px solid var(--gm-line);
}
.gm-bal-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gm-muted);
}
.gm-top-balance strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gm-ink);
  min-width: 2ch;
}
.gm-btn-compact {
  width: auto !important;
  margin: 0 !important;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
  box-shadow: none;
}

.gm-hero {
  margin: 22px clamp(16px, 4vw, 40px) 0;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 24px;
  background:
    radial-gradient(600px 200px at 90% 10%, rgba(224,180,90,.18), transparent 50%),
    linear-gradient(125deg, var(--gm-deep), #1a4030 60%, #214d39);
  color: #f4f7f5;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: end;
  box-shadow: 0 20px 50px rgba(13,31,24,.18);
  animation: gm-rise .5s ease both;
}
.gm-hero h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.gm-hero-sub { margin: 10px 0 0; color: rgba(244,247,245,.75); font-size: 14px; line-height: 1.5; }
.gm-hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.gm-bal-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 16px;
}
.gm-bal-card > span {
  display: block;
  font-size: 12px;
  color: rgba(244,247,245,.7);
  font-weight: 600;
}
.gm-bal-card > strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--gm-accent-2);
}
.gm-muted-light { margin: 0 0 10px; font-size: 12px; color: rgba(244,247,245,.65); }
.gm-quota-track {
  height: 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); overflow: hidden;
}
.gm-quota-fill {
  height: 100%; width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gm-accent), #f0d08a);
  transition: width .6s ease;
}
.gm-quota-foot { margin: 10px 0 0; font-size: 12px; color: rgba(244,247,245,.65); }
.gm-btn-renew {
  width: 100%;
  margin: 0;
}

.gm-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 18px clamp(16px, 4vw, 40px);
}
.gm-metric {
  background: var(--gm-card);
  border: 1px solid var(--gm-line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(19,35,28,.04);
}
.gm-metric .label { font-size: 12px; color: var(--gm-muted); font-weight: 600; }
.gm-metric .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gm-split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 16px;
  margin: 0 clamp(16px, 4vw, 40px) 24px;
}
.gm-panel {
  background: var(--gm-card);
  border: 1px solid var(--gm-line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(19,35,28,.04);
  min-width: 0;
}
.gm-panel-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.gm-panel-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.gm-muted { color: var(--gm-muted); font-size: 12px; }
.gm-link { color: var(--gm-accent, #2d6ec8); text-decoration: none; }
.gm-link:hover { text-decoration: underline; }

.gm-app-list { display: grid; gap: 10px; }
.gm-app-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--gm-line);
  background: #fafcfb;
}
.gm-app-item strong { display: block; font-size: 14px; }
.gm-app-item small { color: var(--gm-muted); font-size: 12px; }
.gm-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.gm-pill.on { background: #e5f5ec; color: var(--gm-ok); }
.gm-pill.off { background: #fdecea; color: var(--gm-bad); }
.gm-pill.hit { background: #f8f0de; color: #8a6418; }
.gm-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--gm-muted);
  font-size: 13px;
}

.gm-table-wrap { overflow: auto; }
.gm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gm-table th, .gm-table td {
  text-align: left; padding: 11px 8px;
  border-bottom: 1px solid var(--gm-line);
  vertical-align: top;
}
.gm-table th { color: var(--gm-muted); font-size: 12px; font-weight: 700; }

.gm-foot {
  padding: 8px clamp(16px, 4vw, 40px) 28px;
  color: var(--gm-muted);
  font-size: 12px;
}

/* —— 充值悬浮窗 —— */
body.gm-modal-open { overflow: hidden; }
.gm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}
.gm-modal.hidden { display: none !important; }
.gm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 16, .55);
  backdrop-filter: blur(4px);
  animation: gm-fade .2s ease both;
}
.gm-modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, 96vw);
  max-height: min(88vh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
  animation: gm-pop .22s ease both;
}
.gm-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--gm-line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.gm-modal-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.gm-modal-head .gm-muted { margin: 0; }
.gm-modal-head .gm-muted strong { color: var(--gm-ink); font-size: 14px; }
.gm-modal-close {
  width: 36px; height: 36px;
  border: none; border-radius: 10px;
  background: #f1f4f2;
  font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--gm-muted);
}
.gm-modal-close:hover { background: #e5ebe7; color: var(--gm-ink); }
.gm-modal-body { padding: 14px 20px 20px; }
.gm-channel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.gm-ch-btn {
  border: 1px solid var(--gm-line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--gm-ink);
}
.gm-ch-btn.on {
  border-color: var(--gm-accent);
  background: #fbf6ea;
  box-shadow: inset 0 0 0 1px var(--gm-accent);
}
.gm-ch-btn:disabled { opacity: .45; cursor: not-allowed; }
.gm-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}
.gm-plan-group { margin-bottom: 16px; }
.gm-plan-group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 14px;
}
.gm-plan-group-head .gm-muted { font-size: 12px; }
.gm-plan-card {
  border: 1px solid var(--gm-line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color .15s, transform .15s;
}
.gm-plan-card:hover { border-color: var(--gm-accent); transform: translateY(-1px); }
.gm-plan-card.is-trial { border-color: #7cb87c; background: #f4fbf4; }
.gm-plan-card.is-claimed { opacity: .55; cursor: not-allowed; transform: none; }
.gm-plan-card strong { display: block; margin-bottom: 4px; font-size: 13px; }
.gm-plan-card .price { color: var(--gm-accent); font-size: 20px; font-weight: 800; }
.gm-plan-card small { color: var(--gm-muted); display: block; margin-top: 4px; font-size: 12px; }
.gm-pay-box {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--gm-line);
  border-radius: 12px;
  background: #f7faf8;
}
.gm-pay-qr img {
  display: block;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--gm-line);
}
.gm-pay-status { font-weight: 700; margin: 8px 0 12px; }
.gm-pay-status.ok { color: var(--gm-ok); }
.gm-pay-status.wait { color: var(--gm-accent); }
.gm-order-fold {
  margin-top: 14px;
  border-top: 1px solid var(--gm-line);
  padding-top: 10px;
}
.gm-order-fold summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--gm-muted);
  user-select: none;
}
.gm-order-fold[open] summary { margin-bottom: 8px; color: var(--gm-ink); }
.gm-order-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.gm-order-st {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}
.gm-order-st.ok {
  background: rgba(27, 122, 69, .12);
  color: #1b7a45;
}
.gm-order-st.wait {
  background: rgba(200, 146, 42, .16);
  color: #9a6b10;
}
.gm-order-st.bad {
  background: rgba(180, 35, 24, .1);
  color: #b42318;
}
.gm-order-st.muted {
  background: rgba(107, 119, 138, .12);
  color: #5c6b7e;
}

@keyframes gm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes gm-pop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.gm-intro {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  font-size: 13px;
  line-height: 1.55;
  color: #d7e5dd;
}
.gm-intro ul { margin: 8px 0 0; padding-left: 18px; }
.gm-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.gm-auth-tab {
  flex: 1;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: #e8f0eb;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}
.gm-auth-tab.on {
  background: rgba(200,146,42,.25);
  border-color: var(--gm-accent);
  color: #fff;
}
.gm-code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.gm-code-row input { flex: 1; }
.gm-settings label {
  display: block;
  margin: 10px 0 4px;
  font-size: 13px;
  color: var(--gm-muted);
}
.gm-settings input[type="text"],
.gm-settings input[type="email"],
.gm-settings input[type="password"],
.gm-settings select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gm-line);
  background: #fff;
  font: inherit;
}
.gm-settings input[type="checkbox"] { margin-right: 6px; }
.gm-settings hr {
  border: 0;
  border-top: 1px solid var(--gm-line);
  margin: 18px 0;
}
.gm-settings h4 { margin: 0 0 8px; font-size: 15px; }
.gm-top-balance .gm-bal-label { margin-left: 8px; }
.gm-top-balance .gm-bal-label:first-child { margin-left: 0; }

.gm-pay-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 10px;
}
.gm-pay-tab {
  flex: 1;
  border: 1px solid var(--gm-line);
  background: #fff;
  color: var(--gm-muted);
  padding: 10px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.gm-pay-tab.on {
  border-color: var(--gm-accent);
  color: var(--gm-ink);
  background: rgba(200,146,42,.12);
}
.gm-tab-hint { margin: 0 0 12px; font-size: 12px; line-height: 1.45; }

.gm-bal-custom {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--gm-line);
  background: #fff;
}
.gm-bal-custom label {
  display: block;
  font-size: 13px;
  color: var(--gm-muted);
  margin-bottom: 6px;
}
.gm-bal-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.gm-bal-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--gm-line);
  font: inherit;
  font-size: 16px;
}
.gm-bal-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* 悬浮滑动验证 */
.cap-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 18, 28, .55);
  backdrop-filter: blur(4px);
}
.cap-overlay.hidden { display: none; }
.cap-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  padding: 18px 18px 16px;
  color: #1a2433;
}
.cap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cap-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.cap-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6b778a;
  padding: 0 4px;
}
.cap-hint { margin: 0 0 12px; font-size: 13px; color: #6b778a; }
.cap-panel {
  position: relative;
  width: 280px;
  max-width: 100%;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 10px;
  overflow: hidden;
  border: none;
  box-shadow: inset 0 0 0 1px #e4e9f0;
  user-select: none;
  background: #dbeafe;
}
.cap-bg {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}
.cap-hole {
  display: none !important;
}
.cap-piece {
  position: absolute;
  top: 6px;
  left: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.5), transparent 45%),
    linear-gradient(135deg, #60a5fa, #3b82f6 55%, #1d4ed8);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .28);
  border: 2px solid rgba(255,255,255,.7);
  box-sizing: border-box;
  z-index: 2;
}
.cap-track {
  position: relative;
  width: 280px;
  max-width: 100%;
  height: 44px;
  margin: 0 auto;
  border-radius: 22px;
  background: #eef2f7;
  border: none;
  box-shadow: inset 0 0 0 1px #d8e0ea;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.cap-track-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  background: linear-gradient(90deg, rgba(59,130,246,.2), rgba(37,99,235,.35));
  border-radius: 22px;
}
.cap-knob {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #cfd8e3;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #2563eb;
  cursor: grab;
  z-index: 2;
  box-sizing: border-box;
}
.cap-knob:active { cursor: grabbing; }
.cap-track-tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #8a94a6;
  pointer-events: none;
}
.cap-msg {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #b42318;
}
.cap-msg.ok { color: #1b7a45; }
.cap-refresh { margin-top: 10px; width: 100%; }

@media (max-width: 960px) {
  .gm-login { grid-template-columns: 1fr; }
  .gm-login-visual { min-height: 180px; }
  .gm-hero, .gm-split { grid-template-columns: 1fr; }
  .gm-top { flex-wrap: wrap; }
  .gm-top-balance { margin: 0; order: 3; width: 100%; justify-content: space-between; }
  .gm-pay-box { flex-direction: column; align-items: flex-start; }
}
