/* Partner Hub · Agent Ops — light theme aligned with login */
:root {
  --primary: #0047cf;
  --primary-2: #165dff;
  --primary-soft: #dce1ff;
  --primary-wash: #f1f3ff;
  --surface: #f9f9ff;
  --card: #ffffff;
  --ink: #181c23;
  --ink-2: #434656;
  --muted: #737688;
  --line: #dfe2ed;
  --line-strong: #c3c5d9;
  --ok: #006e16;
  --ok-soft: #d1fae5;
  --amber: #b45309;
  --amber-soft: #ffedd5;
  --danger: #ba1a1a;
  --danger-soft: #ffe4e6;
  --money: #0047cf;
  --side-w: 232px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 28px rgba(24, 28, 35, 0.06);
  --font: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --void: var(--surface);
  --void-2: var(--primary-wash);
  --panel: var(--card);
  --panel-solid: var(--card);
  --cyan: var(--primary);
  --cyan-2: var(--primary-2);
  --cyan-soft: rgba(0, 71, 207, 0.08);
  --display: var(--font);
  --tech: var(--mono);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
html { height: 100%; }
body {
  background:
    radial-gradient(1000px 420px at 8% -10%, rgba(0, 71, 207, 0.08), transparent 55%),
    radial-gradient(800px 360px at 100% 0%, rgba(22, 93, 255, 0.05), transparent 50%),
    var(--surface);
  min-height: 100vh;
}
body::before { display: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes softIn {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { max-width: 100%; display: block; }

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}
body.no-nav .app-shell { grid-template-columns: 1fr; min-height: 100vh; }
body.no-nav .side-nav { display: none; }
body.no-nav .main-stage { margin: 0; min-height: 100vh; background: transparent; padding: 0; }
body.no-nav {
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(0, 71, 207, 0.10), transparent 58%),
    radial-gradient(720px 420px at 92% 8%, rgba(22, 93, 255, 0.07), transparent 52%),
    #f4f6fb;
  color: #181c23;
}
body.no-nav::before { display: none; }

.side-nav {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 24px rgba(24, 28, 35, 0.03);
  flex: 0 0 var(--side-w);
  width: var(--side-w);
  max-width: var(--side-w);
  box-sizing: border-box;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 8px 10px 22px; }
.side-logo {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(0, 71, 207, 0.28);
}
.side-brand strong { display: block; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.side-brand em {
  display: inline-block; margin-top: 4px; font-style: normal;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary);
}
.side-menu { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-menu a {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  color: var(--muted); font-weight: 650; font-size: 14px;
  border: 1px solid transparent; transition: .15s ease;
}
.side-menu a:hover { color: var(--ink); background: var(--primary-wash); }
.side-menu a.on {
  color: var(--primary); background: var(--primary-wash);
  border-color: #c3c5d9;
  box-shadow: 0 0 0 2px rgba(0, 71, 207, 0.08);
}
.side-menu .ico { width: 22px; height: 22px; display: grid; place-items: center; }
.side-menu .ico svg {
  width: 18px; height: 18px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.side-foot { padding: 12px 10px 4px; border-top: 1px solid var(--line); }
.side-foot-tip { font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: .02em; }

.main-stage {
  min-width: 0; min-height: 100vh; padding: 0; background: transparent;
  width: 100%; overflow-x: hidden;
}

.page {
  padding: clamp(14px, 2vw, 24px) clamp(14px, 2.4vw, 32px) 36px;
  width: 100%; max-width: none; box-sizing: border-box;
  animation: rise .32s cubic-bezier(0.22, 1, 0.36, 1);
}
.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: clamp(14px, 2vw, 22px) clamp(14px, 2.4vw, 32px) 8px;
  width: 100%; max-width: none; box-sizing: border-box;
}
.topbar h1 {
  margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--ink);
}
.topbar .sub {
  margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 600;
}
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--primary);
}
.icon-btn:active { transform: scale(0.96); }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px;
  animation: softIn .35s ease; position: relative; overflow: hidden;
}
.panel::before { display: none; }
.panel.flat { background: var(--card); box-shadow: var(--shadow); }

.section-label {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 22px 2px 12px; font-size: 14px; font-weight: 750; color: var(--ink);
}
.section-label span { font-weight: 500; color: var(--muted); font-size: 12px; }

/* ---------- Partner Hub login ---------- */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  font-size: 20px;
  line-height: 1;
  vertical-align: middle;
}
.ph-login {
  --ph-primary: #0047cf;
  --ph-primary-2: #165dff;
  --ph-ink: #12151c;
  --ph-muted: #4b5160;
  --ph-soft: #7a8194;
  --ph-line: #e2e6f0;
  --ph-surface: transparent;
  --ph-card: #ffffff;
  --ph-green: #0a7a2f;
  --ph-green-2: #2fd15a;
  --ph-wash: #eef1ff;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  color: var(--ph-ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Inter, sans-serif;
  animation: rise .5s cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
}
.ph-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.ph-bg .orb {
  position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55;
}
.ph-bg .o1 {
  width: 420px; height: 420px; left: -120px; top: -140px;
  background: radial-gradient(circle, rgba(0, 71, 207, .28), transparent 68%);
  animation: phFloat 14s ease-in-out infinite;
}
.ph-bg .o2 {
  width: 360px; height: 360px; right: -80px; top: 12%;
  background: radial-gradient(circle, rgba(22, 93, 255, .18), transparent 70%);
  animation: phFloat 18s ease-in-out infinite reverse;
}
.ph-bg .o3 {
  width: 280px; height: 280px; left: 38%; bottom: -100px;
  background: radial-gradient(circle, rgba(47, 209, 90, .10), transparent 72%);
}
.ph-bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 71, 207, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 207, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 35% 30%, #000 20%, transparent 75%);
  opacity: .7;
}
@keyframes phFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(18px, 22px, 0); }
}
.ph-wrap {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 28px 48px;
}
.ph-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 30px;
  flex-wrap: wrap;
  animation: softIn .55s ease both;
}
.ph-brand { display: flex; align-items: center; gap: 12px; }
.ph-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(145deg, var(--ph-primary-2), var(--ph-primary));
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 22px rgba(0, 71, 207, .28);
}
.ph-logo .material-symbols-outlined { font-size: 22px; }
.ph-brand-row { display: flex; align-items: center; gap: 8px; }
.ph-brand-row strong { font-size: 19px; font-weight: 750; letter-spacing: -.03em; }
.ph-brand-row em {
  font-style: normal; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: var(--ph-wash); color: var(--ph-primary);
  letter-spacing: .02em;
}
.ph-brand-sub { display: block; margin-top: 3px; font-size: 12px; color: var(--ph-muted); }
.ph-top-links {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 13px; font-weight: 600; color: var(--ph-muted);
}
.ph-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 10px; transition: background .15s, color .15s;
}
.ph-link:hover { background: rgba(255,255,255,.72); color: var(--ph-primary); }
.ph-link .material-symbols-outlined { font-size: 18px; }
.ph-net {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.78); border: 1px solid rgba(226,230,240,.9);
}
.ph-net i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ph-green-2);
  box-shadow: 0 0 0 4px rgba(47, 209, 90, .18);
}
.ph-net code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--ph-muted); }

.ph-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, .92fr);
  gap: 40px;
  align-items: start;
}
.ph-left {
  display: grid; gap: 22px;
  animation: rise .6s .05s cubic-bezier(.22, 1, .36, 1) both;
}
.ph-hero .ph-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 8px; border-radius: 999px;
  background: var(--ph-wash); color: var(--ph-primary);
  font-size: 12px; font-weight: 700; margin-bottom: 14px;
  border: 1px solid rgba(0, 71, 207, .08);
}
.ph-hero .ph-badge .material-symbols-outlined { font-size: 16px; }
.ph-hero h1 {
  margin: 0; font-size: clamp(30px, 4.2vw, 40px); line-height: 1.18;
  font-weight: 780; letter-spacing: -.035em;
}
.ph-hero h1 span {
  background: linear-gradient(105deg, var(--ph-ink) 20%, var(--ph-primary) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ph-hero p {
  margin: 14px 0 0; max-width: 38em;
  font-size: 15px; line-height: 1.7; color: var(--ph-muted);
}
.ph-globe {
  position: relative;
  min-height: 420px;
  height: clamp(380px, 52vh, 520px);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(8, 28, 78, .92), rgba(4, 12, 36, .98) 70%),
    #040c24;
  border: 1px solid rgba(90, 130, 220, .22);
  box-shadow:
    0 18px 48px rgba(8, 28, 78, .22),
    0 0 0 1px rgba(255,255,255,.04) inset;
}
.ph-globe canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.ph-globe canvas:active { cursor: grabbing; }
.ph-globe-bar {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  z-index: 2;
}
.ph-globe-play {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: #eef3ff; font-size: 12px; font-weight: 700;
  backdrop-filter: blur(10px);
  transition: background .15s, border-color .15s;
}
.ph-globe-play:hover { background: rgba(255,255,255,.18); }
.ph-globe-play.on {
  background: rgba(22, 93, 255, .35);
  border-color: rgba(140, 180, 255, .45);
}
.ph-globe-play .material-symbols-outlined { font-size: 18px; }
.ph-globe-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 650; color: rgba(220, 230, 255, .82);
}
.ph-globe-live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3dff8a;
  box-shadow: 0 0 0 4px rgba(61, 255, 138, .18);
  animation: phPulse 1.6s ease-in-out infinite;
}
@keyframes phPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.85); }
}
.ph-globe-tip {
  margin-left: auto;
  font-size: 11px; font-weight: 600; color: rgba(190, 205, 240, .55);
}
.ph-trust {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  font-size: 12px; font-weight: 650; color: var(--ph-muted);
}
.ph-trust > span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(226,230,240,.9);
}
.ph-trust .material-symbols-outlined { font-size: 17px; color: var(--ph-green); }

.ph-right {
  display: grid; gap: 14px;
  animation: rise .65s .12s cubic-bezier(.22, 1, .36, 1) both;
}
.ph-card {
  position: relative;
  background: rgba(255,255,255,.96);
  border-radius: 22px;
  padding: 30px 26px 22px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 24px 56px rgba(18, 21, 28, .10),
    0 8px 18px rgba(0, 71, 207, .06);
  border: 1px solid rgba(226,230,240,.95);
  overflow: hidden;
}
.ph-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--ph-primary), var(--ph-primary-2) 55%, #5b8cff);
}
.ph-qr-toggle {
  position: absolute; top: 0; right: 0; width: 68px; height: 68px;
  clip-path: polygon(28% 0, 100% 0, 100% 100%);
  background: linear-gradient(135deg, #e8ecf8, #d8dff3);
  color: var(--ph-primary);
  display: flex; align-items: flex-start; justify-content: flex-end; padding: 10px 10px 0 0;
  transition: filter .15s;
}
.ph-qr-toggle:hover { filter: brightness(.96); }
.ph-qr-toggle .material-symbols-outlined { font-size: 22px; }
.ph-card-hd { margin-bottom: 18px; padding-right: 52px; }
.ph-card-hd h2 { margin: 0; font-size: 23px; font-weight: 760; letter-spacing: -.03em; }
.ph-card-hd p { margin: 7px 0 0; font-size: 12.5px; color: var(--ph-muted); line-height: 1.55; }
.ph-tabs {
  display: flex; gap: 26px; margin-bottom: 18px;
  border-bottom: 1px solid #eef0f6;
}
.ph-tabs button {
  position: relative; padding: 0 0 12px; font-size: 14px; font-weight: 680;
  color: var(--ph-soft); background: none; border: 0;
}
.ph-tabs button:hover { color: var(--ph-ink); }
.ph-tabs button.on { color: var(--ph-primary); }
.ph-tabs button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px;
  border-radius: 3px 3px 0 0; background: var(--ph-primary);
}
.ph-form { display: grid; gap: 13px; }
.ph-field { display: grid; gap: 7px; }
.ph-field .lab {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 680; color: var(--ph-ink);
}
.ph-field .lab code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; color: var(--ph-soft); font-weight: 500;
  background: #f4f6fb; padding: 2px 7px; border-radius: 6px;
}
.ph-field .lab a { color: var(--ph-primary); font-weight: 680; text-decoration: none; }
.ph-field .lab a:hover { text-decoration: underline; }
.ph-field .ctrl { position: relative; display: flex; align-items: center; }
.ph-field .ctrl > .material-symbols-outlined {
  position: absolute; left: 12px; color: var(--ph-soft); pointer-events: none; font-size: 20px;
}
.ph-field .ctrl input {
  width: 100%; height: 44px; border: 1px solid var(--ph-line); border-radius: 12px;
  padding: 0 42px; background: #fbfcfe; font-size: 14px; color: var(--ph-ink);
  outline: none; transition: border-color .15s, background .15s, box-shadow .15s;
}
.ph-field .ctrl input::placeholder { color: #9aa1b2; }
.ph-field .ctrl input:hover { border-color: #c8cfe3; }
.ph-field .ctrl input:focus {
  border-color: #8aa0ff; background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 71, 207, .10);
}
.ph-field .ctrl .eye {
  position: absolute; right: 8px; width: 32px; height: 32px;
  display: grid; place-items: center; color: var(--ph-soft); border-radius: 8px;
}
.ph-field .ctrl .eye:hover { color: var(--ph-ink); background: var(--ph-wash); }
.ph-sms-row { display: flex; gap: 10px; }
.ph-sms-row .ctrl { flex: 1; }
.ph-sms-btn {
  height: 44px; padding: 0 14px; border-radius: 12px; white-space: nowrap;
  background: var(--ph-wash); color: var(--ph-primary); font-size: 13px; font-weight: 700;
  border: 1px solid transparent;
}
.ph-sms-btn:hover { background: #e0e6ff; }
.ph-opts {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  font-size: 12px; color: var(--ph-muted);
}
.ph-opts label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.ph-opts input { accent-color: var(--ph-primary); width: 15px; height: 15px; }
.ph-submit {
  height: 46px; border-radius: 12px; border: 0; margin-top: 2px; width: 100%;
  background: linear-gradient(135deg, var(--ph-primary-2), var(--ph-primary));
  color: #fff; font-size: 15px; font-weight: 720;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 12px 24px rgba(0, 71, 207, .28);
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.ph-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 71, 207, .34);
}
.ph-submit:active { transform: translateY(0); }
.ph-submit:disabled { opacity: .72; cursor: wait; transform: none; filter: none; }
.ph-submit .spin, .ph-qr-tip .spin { animation: orbit 1s linear infinite; display: inline-block; }
.ph-sso { margin-top: 20px; padding-top: 16px; border-top: 1px solid #eef0f6; }
.ph-sso-line {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ph-soft); margin-bottom: 12px;
}
.ph-sso-line i { flex: 1; height: 1px; background: #e8ebf4; }
.ph-sso-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-sso-btn {
  height: 40px; border-radius: 12px;
  background: #f5f7fc; color: var(--ph-ink);
  border: 1px solid #e8ebf4;
  font-size: 12px; font-weight: 680;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s;
}
.ph-sso-btn:hover { background: var(--ph-wash); border-color: #d5dcf5; }
.ph-sso-btn .material-symbols-outlined { color: var(--ph-primary); font-size: 18px; }
.ph-qr {
  display: none; flex-direction: column; align-items: center; text-align: center; padding: 20px 0 8px;
}
.ph-qr strong { font-size: 18px; font-weight: 740; }
.ph-qr > p { margin: 6px 0 18px; font-size: 12px; color: var(--ph-muted); }
.ph-qr-box {
  width: 184px; height: 184px; border-radius: 18px; background: #f8fafc;
  border: 1px dashed #cfd5e6; display: grid; place-items: center; margin-bottom: 14px;
}
.ph-qr-box .material-symbols-outlined { font-size: 96px; color: var(--ph-ink); opacity: .85; }
.ph-qr-tip {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ph-primary); font-size: 12px; font-weight: 680;
}
.ph-qr-back {
  margin-top: 14px; font-size: 12px; color: var(--ph-muted); text-decoration: underline;
}
.ph-card-ft {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef0f6;
  display: grid; gap: 10px; font-size: 12px;
}
.ph-card-ft > div:first-child {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--ph-muted);
}
.ph-card-ft a {
  color: var(--ph-primary); font-weight: 700; display: inline-flex; align-items: center; gap: 2px;
}
.ph-card-ft a .material-symbols-outlined { font-size: 14px; }
.ph-hotline {
  display: flex; justify-content: space-between; align-items: center; color: var(--ph-muted);
  padding: 10px 12px; border-radius: 12px; background: #f7f8fc;
}
.ph-hotline code,
.ph-hotline .ph-mail {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px; font-weight: 720; color: var(--ph-primary); letter-spacing: .02em;
  text-decoration: none;
}
.ph-hotline .ph-mail:hover { text-decoration: underline; }
.ph-legal {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 10px; font-size: 12px; color: var(--ph-soft);
}
.ph-legal a { color: inherit; }
.ph-legal a:hover { color: var(--ph-primary); }
.ph-captcha {
  margin-top: 4px; padding: 12px; border-radius: 14px;
  background: #fff8eb; border: 1px solid #ffe2ad;
}
.ph-captcha .lab em {
  margin-left: 8px; font-style: normal; color: #b45309; font-weight: 740;
}

@media (max-width: 1100px) {
  .ph-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .ph-right { max-width: 480px; width: 100%; margin: 0 auto; }
  .ph-globe { min-height: 360px; height: 400px; }
}
@media (max-width: 720px) {
  .ph-wrap { padding: 16px 14px 32px; }
  .ph-sso-btns { grid-template-columns: 1fr; }
  .ph-top-links { display: none; }
  .ph-card { padding: 24px 18px 18px; border-radius: 18px; }
  .ph-hero h1 { font-size: 28px; }
  .ph-globe { min-height: 320px; height: 340px; }
  .ph-globe-tip { display: none; }
}


.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: 14px; background: var(--primary-wash); border: 1px solid var(--line); margin-bottom: 18px;
}
.seg button { min-height: 40px; border-radius: 11px; color: var(--muted); font-weight: 650; font-size: 14px; }
.seg button.on { background: #fff; color: var(--primary); border: 1px solid #c3c5d9; box-shadow: 0 2px 8px rgba(0,71,207,.06); }

.field { margin-bottom: 14px; }
.field label {
  display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; color: var(--ink);
}
.field input, .field select, .field textarea, .search input {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-sm); padding: 12px 14px; outline: none; color: var(--ink);
}
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus {
  border-color: #b6c4ff; background: var(--primary-wash);
  box-shadow: 0 0 0 3px rgba(0, 71, 207, 0.1);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 12px;
  background: var(--primary); color: #fff; font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 71, 207, 0.22); transition: .15s ease;
}
.btn:hover { background: var(--primary-2); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none;
}
.btn.ghost:hover { background: var(--primary-wash); color: var(--primary); }
.btn.danger { background: var(--danger); color: #fff; box-shadow: 0 8px 18px rgba(186,26,26,.2); }
.btn.warn { background: #c2410c; color: #fff; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 10px; }

.hero-status {
  position: relative; overflow: hidden; border-radius: 18px; padding: 20px 22px;
  color: var(--ink); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.hero-status::after {
  content: ""; position: absolute; right: -24px; top: -48px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,71,207,.1), transparent 65%);
}
.hero-status .row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-status .k { font-size: 12px; font-weight: 700; color: var(--muted); }
.hero-status .v { margin-top: 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.switch {
  position: relative; width: 52px; height: 30px; border-radius: 999px;
  background: #e5e8f3; border: 1px solid var(--line); transition: .2s; flex: 0 0 auto;
}
.switch.on { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,71,207,.15); }
.switch i {
  position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: .2s; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.switch.on i { left: 24px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: 4px;
}
.metric {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; min-height: 118px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow);
}
.metric.wide {
  grid-column: span 2;
  background: linear-gradient(160deg, #eff4ff 0%, #fff 60%);
  border-color: #c3c5d9;
}
.metric .k { font-size: 12px; color: var(--muted); font-weight: 650; }
.metric .n {
  font-size: 30px; font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink);
}
.metric .n.money { color: var(--money); font-size: 28px; }
.metric .hint { margin-top: 8px; font-size: 12px; color: var(--muted); }

.action-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.action-rail a {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 104px; padding: 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: .15s ease;
}
.action-rail a:hover { border-color: #b6c4ff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,71,207,.08); }
.action-rail .t { font-weight: 750; font-size: 15px; }
.action-rail .d { margin-top: 10px; font-size: 12px; color: var(--muted); }
.action-rail a:nth-child(1) { background: linear-gradient(160deg, #eff4ff, #fff); border-color: #c3c5d9; }
.action-rail a:nth-child(4) { background: linear-gradient(160deg, #fff7ed, #fff); border-color: #fed7aa; }
.action-rail a:nth-child(5) { background: linear-gradient(160deg, #ecfdf5, #fff); border-color: #a7f3d0; }

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .75fr);
  gap: clamp(12px, 1.5vw, 18px);
  align-items: stretch;
}
.earn-strip {
  padding: 22px; border-radius: 16px; background: linear-gradient(165deg, #0047cf, #165dff);
  color: #fff; border: 0; height: 100%; box-shadow: 0 16px 32px rgba(0,71,207,.25);
}
.earn-strip .k { font-size: 12px; color: rgba(255,255,255,.8); font-weight: 650; }
.earn-strip .n { margin-top: 12px; font-size: 36px; font-weight: 850; letter-spacing: -.03em; color: #fff; }
.earn-strip .d { margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.78); }
.earn-strip .btn { background: #fff; color: var(--primary); box-shadow: none; }
.earn-strip .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }

.search { display: flex; gap: 8px; margin-bottom: 12px; max-width: 520px; }
.users-page .users-search { max-width: min(640px, 100%); width: 100%; }
.users-hero {
  display: grid; grid-template-columns: 1.5fr auto auto; gap: 12px; align-items: center;
  padding: 18px 20px; margin-bottom: 12px; border-radius: 18px;
  background: linear-gradient(135deg, #eef2ff 0%, #fff 48%, #f8fafc 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.users-hero .kicker { margin: 0 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); font-weight: 800; }
.users-hero h3 { margin: 0 0 6px; font-size: 22px; font-weight: 820; color: var(--ink); }
.users-hero .hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 42em; }
.users-stat {
  min-width: 88px; text-align: center; padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
}
.users-stat b { display: block; font-size: 24px; font-weight: 820; color: var(--ink); line-height: 1.1; }
.users-stat span { font-size: 11px; color: var(--muted); font-weight: 650; }
.users-stat.soft { background: var(--primary-wash); }
.city-scope { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.city-scope em {
  font-style: normal; display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700;
}
.user-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px;
}
.user-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(24,28,35,.04); transition: transform .12s, box-shadow .12s, border-color .12s;
}
.user-card:hover {
  transform: translateY(-1px); border-color: #b6c4ff; box-shadow: 0 10px 24px rgba(0,71,207,.08);
}
.user-card-main { min-width: 0; flex: 1; }
.user-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-card-top strong { font-size: 15px; font-weight: 750; color: var(--ink); }
.user-card-sub {
  display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px;
  font-size: 12px; color: var(--muted);
}
.user-card-sub .mono { font-family: var(--mono); font-size: 11px; opacity: .9; }
.user-card-go {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--primary);
  padding: 6px 10px; border-radius: 999px; background: var(--primary-wash);
}
.city-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: #fff7ed; color: #c2410f; font-size: 11px; font-weight: 750; border: 1px solid #fed7aa;
}
.city-pill.mini { height: 18px; padding: 0 6px; font-size: 10px; vertical-align: middle; }
.cs-scope-tip {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 12px; font-weight: 650;
  color: #1e40af; background: #eff6ff; border: 1px solid #dbeafe;
}
.cs-item .meta .t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .users-hero,
  .orders-page .orders-hero { grid-template-columns: 1fr 1fr; }
  .users-hero > div:first-child,
  .orders-page .orders-hero > div:first-child { grid-column: 1 / -1; }
  .user-grid { grid-template-columns: 1fr; }
  .bill-metrics { grid-template-columns: 1fr; }
}
.list-item {
  display: flex; gap: 12px; align-items: center; padding: 14px 8px;
  border-bottom: 1px solid #eef0fc;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--primary-wash); border-radius: 10px; }
.ava {
  position: relative;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(145deg, var(--primary-soft), #e8eeff);
  border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; flex: 0 0 auto;
  font-weight: 750; color: var(--primary); box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.ava.ava-sm { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.ava.ava-lg { width: 72px; height: 72px; border-radius: 18px; font-size: 26px; }
.ava-ch {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-weight: 780; letter-spacing: .02em; user-select: none;
}
.ava img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #fff; z-index: 1;
}
.user-detail-head {
  display: flex; gap: 16px; align-items: center; max-width: 760px;
}
.user-detail-name {
  font-weight: 780; font-size: 20px; font-family: var(--display); color: var(--ink);
}
.user-detail-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.user-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.users-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.users-toolbar .users-search { margin-bottom: 0; flex: 1 1 280px; }
.orders-page .orders-hero {
  display: grid; grid-template-columns: 1.5fr auto auto; gap: 12px; align-items: center;
  padding: 18px 20px; margin-bottom: 12px; border-radius: 18px;
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 48%, #f8fafc 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.orders-page .orders-hero .kicker {
  margin: 0 0 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: #047857; font-weight: 800;
}
.orders-page .orders-hero h3 { margin: 0 0 6px; font-size: 22px; font-weight: 820; color: var(--ink); }
.orders-page .orders-hero .hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 46em; }
.orders-page .ladder-tip {
  margin: 10px 0 0; font-size: 12px; color: #0f766e; font-weight: 650; line-height: 1.45;
}
.orders-page .ladder-tip span {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-right: 4px;
  border-radius: 999px; background: #ccfbf1; color: #0f766e; font-size: 11px; font-weight: 800;
}
.orders-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  margin-bottom: 14px; padding: 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.orders-filters label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--muted); min-width: 140px;
}
.orders-filters label.grow { flex: 1 1 180px; min-width: 180px; }
.orders-filters input,
.orders-filters select {
  min-height: 38px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600;
}
.orders-filters input:focus,
.orders-filters select:focus {
  outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(0,71,207,.12);
}
.bill-list { display: grid; gap: 10px; }
.bill-card {
  padding: 14px 16px; border-radius: 14px; background: var(--card);
  border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(24,28,35,.04);
}
.bill-card-top { display: flex; gap: 12px; align-items: flex-start; }
.bill-card-main { min-width: 0; flex: 1; }
.bill-card-title {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; justify-content: space-between;
}
.bill-card-title strong { font-size: 15px; font-weight: 780; color: var(--ink); }
.bill-when { font-size: 12px; color: var(--muted); font-family: var(--mono); font-weight: 600; }
.bill-card-sub {
  display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px;
  font-size: 12px; color: var(--muted); align-items: center;
}
.bill-card-sub .mono { font-family: var(--mono); font-size: 11px; }
.bill-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.bill-metrics > div {
  min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--primary-wash);
}
.bill-metrics em {
  display: block; font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700;
}
.bill-metrics b {
  display: block; margin-top: 4px; font-size: 15px; font-weight: 820; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bill-metrics b.money { color: #0f766e; }
.bill-metrics b.rate { color: var(--primary); }
.meta { min-width: 0; flex: 1; }
.meta .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .d {
  color: var(--muted); font-size: 12px; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700;
}
.tag {
  font-size: 11px; padding: 4px 8px; border-radius: 8px;
  background: var(--primary-wash); color: var(--muted); white-space: nowrap; font-weight: 650; border: 1px solid var(--line);
}
.tag.pending { background: var(--amber-soft); color: var(--amber); border-color: #fed7aa; }
.tag.processing { background: var(--primary-soft); color: var(--primary); border-color: #b6c4ff; }
.tag.replied { background: var(--ok-soft); color: var(--ok); border-color: #a7f3d0; }
.tag.closed { background: #f1f5f9; color: var(--muted); }

.tabs {
  display: inline-flex; gap: 6px; padding: 4px; background: var(--primary-wash);
  border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; flex-wrap: wrap;
}
.tabs button {
  min-width: 88px; min-height: 34px; padding: 0 12px; border-radius: 11px;
  color: var(--muted); font-weight: 650; font-size: 13px;
}
.tabs button.on { background: #fff; color: var(--primary); border: 1px solid #c3c5d9; box-shadow: 0 2px 8px rgba(0,71,207,.06); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 480px; }
.stat {
  background: var(--card); border-radius: 14px; padding: 16px; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat .k { color: var(--muted); font-size: 12px; font-weight: 650; }
.stat .v { margin-top: 8px; font-size: 24px; font-weight: 800; }
.stat .v.money { color: var(--money); font-size: 22px; }

.row-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.money-hero { text-align: left; padding: 4px 0; width: 100%; position: relative; z-index: 1; }
.money-hero .k { color: var(--primary); font-size: 12px; font-weight: 700; }
.money-hero .v {
  margin-top: 10px; font-size: 42px; font-weight: 850; letter-spacing: -.04em; color: var(--ink);
}
.money-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; max-width: 420px; }
.money-grid .cell {
  background: var(--primary-wash); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.money-grid .cell .k { font-size: 11px; color: var(--muted); font-weight: 650; }
.money-grid .cell .v { margin-top: 6px; font-size: 20px; font-weight: 800; color: var(--money); }

/* —— 客服工作台：整页锁高，仅内部面板滚动 —— */
html.cs-desk-mode,
body.cs-desk-mode {
  height: 100%;
  overflow: hidden !important;
}
body.cs-desk-mode .app-shell {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
body.cs-desk-mode .main-stage {
  height: 100%;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.cs-desk-mode #app {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.cs-desk-mode .side-nav {
  height: 100%;
}

.cs-shell {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0; overflow: hidden;
}
.cs-page {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  padding-top: 8px; padding-bottom: 16px;
}
.cs-desk {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}
.cs-list-pane {
  min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.cs-session-list {
  flex: 1; min-height: 0; overflow: auto; margin-bottom: 0 !important;
}
.cs-item {
  width: 100%; text-align: left; cursor: pointer;
  border: 0; background: transparent;
}
.cs-item.on {
  background: var(--primary-wash);
  box-shadow: inset 3px 0 0 var(--primary);
}
.cs-preview-pane {
  min-height: 0; min-width: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.cs-preview-empty,
.cs-preview-loading {
  flex: 1; display: grid; place-items: center; min-height: 0;
  color: var(--muted); font-weight: 650;
}

.chat-embed {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.chat-embed-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 71, 207, .04), transparent 80%), #fff;
}
.chat-embed-title {
  display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em;
}
.chat-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-user-ava {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff;
  background: linear-gradient(145deg, #0047cf, #3b82f6);
  box-shadow: 0 8px 18px rgba(0, 71, 207, .22);
}
.chat-actions { display: flex; gap: 8px; flex-shrink: 0; }

.chat-embed-main {
  flex: 1; min-height: 0; overflow: hidden;
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
}

.chat-rail {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  border-right: 1px solid var(--line); background: #fff;
}
.chat-rail-head {
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--line);
}
.chat-banks { display: flex; gap: 6px; flex-wrap: wrap; }
.bank-tab {
  flex: 1 1 auto; min-width: 0; padding: 7px 8px; border-radius: 9px;
  background: var(--primary-wash); color: var(--muted);
  border: 1px solid transparent; font-size: 11px; font-weight: 700; line-height: 1.1;
}
.bank-tab.on {
  background: #fff; color: var(--primary); border-color: var(--line-strong);
  box-shadow: 0 2px 8px rgba(0, 71, 207, .08);
}
.chat-rail-tip {
  margin: 8px 2px 0; font-size: 11px; color: var(--muted); font-weight: 600;
}
.chat-phrases {
  flex: 1; min-height: 0; overflow: auto; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  overscroll-behavior: contain;
}
.cs-phrase {
  text-align: left; padding: 11px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color .15s ease, background .15s ease;
}
.cs-phrase strong { font-size: 12px; font-weight: 750; color: var(--ink); }
.cs-phrase span {
  font-size: 11px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-phrase:hover { border-color: #b8c4ef; background: var(--primary-wash); }

.chat-stage {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0; overflow: hidden; background: #f6f7fc;
}
.chat-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 16px 16px 10px;
  background:
    radial-gradient(720px 280px at 8% 0%, rgba(0, 71, 207, .05), transparent 55%),
    linear-gradient(180deg, #f7f8ff 0%, #f3f5fb 100%);
  -webkit-overflow-scrolling: touch;
}
.chat-empty {
  text-align: center; color: var(--muted); padding: 64px 16px;
}
.chat-empty strong { display: block; font-size: 15px; color: var(--ink); font-weight: 750; }
.chat-empty p { margin: 8px 0 0; font-size: 13px; font-weight: 600; }

.csb-row {
  display: flex; gap: 10px; margin-bottom: 14px; max-width: min(78%, 520px);
  animation: softIn .18s ease;
}
.csb-row.is-them { margin-right: auto; align-items: flex-start; }
.csb-row.is-me {
  margin-left: auto; flex-direction: row-reverse; text-align: right;
}
.csb-ava {
  width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #e8ecf8; color: var(--primary);
  font-size: 12px; font-weight: 800;
}
.csb-col { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.csb-row.is-me .csb-col { align-items: flex-end; }
.csb-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted); font-weight: 650;
}
.csb-row.is-me .csb-meta { flex-direction: row-reverse; }
.csb-name { color: var(--ink-2); }
.csb-bubble {
  padding: 10px 12px; border-radius: 14px;
  line-height: 1.55; font-size: 14px; word-break: break-word;
  box-shadow: 0 1px 2px rgba(24, 28, 35, .04);
}
.csb-row.is-them .csb-bubble {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  border-bottom-left-radius: 5px;
}
.csb-row.is-me .csb-bubble {
  background: var(--primary); border: 0; color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 8px 18px rgba(0, 71, 207, .16);
}
.csb-txt { white-space: pre-wrap; text-align: left; }
.bubble-img { display: block; max-width: 220px; border-radius: 10px; margin: 0; }

.chat-composer {
  flex: 0 0 auto;
  display: flex; gap: 10px; align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-composer input {
  flex: 1; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: var(--primary-wash); min-height: 44px;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.chat-composer input:focus {
  border-color: #9db0e8; box-shadow: 0 0 0 3px rgba(0, 71, 207, .1);
  background: #fff;
}
.chat-composer .send-btn {
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(0, 71, 207, .22);
}
.chat-composer .send-btn:disabled { opacity: .55; }

.toast {
  position: fixed; left: 50%; top: 12%; transform: translateX(-50%);
  background: #0f172a; border: 1px solid rgba(255,255,255,.12); color: #fff;
  padding: 12px 18px; border-radius: 12px; z-index: 99; font-size: 13px;
  max-width: 420px; text-align: center; animation: rise .2s ease;
}
.empty { text-align: center; color: var(--muted); padding: 56px 12px; font-size: 14px; font-weight: 600; }
.empty::before {
  content: ""; display: block; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%;
  border: 1px dashed var(--line-strong); background: var(--primary-wash);
}

.two-col { display: grid; grid-template-columns: 360px 1fr; gap: 14px; align-items: start; }
.table-like .list-item { padding-left: 8px; padding-right: 8px; }

/* cs-desk / preview 样式已在上方工作台区块定义 */

.dash-status-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.dash-status-pill.on { background: var(--ok-soft); color: var(--ok); }
.dash-status-pill.off { background: #f1f5f9; color: var(--muted); }

/* —— 自适应断点 —— */
@media (max-width: 1400px) {
  .dash-layout { grid-template-columns: minmax(0, 1.25fr) minmax(220px, .85fr); }
}
@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric.wide { grid-column: span 2; }
  .action-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-layout { grid-template-columns: 1fr; }
  .earn-strip { min-height: auto; }
  .two-col { grid-template-columns: 1fr; }
  .cs-desk { grid-template-columns: 1fr; }
  .chat-embed-main { grid-template-columns: 1fr; }
  .chat-rail { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 960px) {
  :root { --side-w: 76px; }
  .side-brand { justify-content: center; padding: 8px 4px 16px; }
  .side-brand > div:last-child, .side-menu .lbl, .side-foot { display: none; }
  .side-menu a { justify-content: center; padding: 0; gap: 0; min-height: 48px; }
  .side-menu .ico { width: 24px; height: 24px; }
  .csb-row { max-width: 90%; }
}
@media (max-width: 860px) {
  body.cs-desk-mode .app-shell {
    height: calc(100dvh - 68px);
  }
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    min-height: 100dvh;
  }
  .side-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto;
    width: 100%; max-width: none; flex: none;
    z-index: 40; flex-direction: row; align-items: stretch;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: 0; border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(24, 28, 35, 0.08);
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  }
  .side-brand, .side-foot { display: none !important; }
  .side-menu {
    flex-direction: row; width: 100%; gap: 2px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .side-menu::-webkit-scrollbar { display: none; }
  .side-menu a {
    flex: 1 0 auto; min-width: 64px; min-height: 56px;
    flex-direction: column; justify-content: center; gap: 2px;
    padding: 6px 8px; border-radius: 12px; font-size: 11px;
  }
  .side-menu .lbl { display: block !important; font-size: 10px; font-weight: 700; line-height: 1.1; }
  .side-menu .ico { width: 20px; height: 20px; }
  .side-menu .ico svg { width: 18px; height: 18px; }
  .main-stage {
    min-height: calc(100dvh - 68px);
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
  .page, .topbar { padding-left: 14px; padding-right: 14px; }
  .topbar h1 { font-size: 22px; }
  .csb-row { max-width: 92%; }
  .metric .n { font-size: 26px; }
  .earn-strip .n { font-size: 30px; }
  .money-hero .v { font-size: 32px; }
  .search { max-width: none; flex-wrap: wrap; }
  .search input { min-width: 0; flex: 1 1 160px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { min-height: 100px; padding: 14px; }
  .metric.wide { grid-column: span 2; }
  .action-rail { grid-template-columns: 1fr; }
  .action-rail a { min-height: 72px; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .action-rail .d { margin-top: 0; text-align: right; }
  .hero-status .v { font-size: 20px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1 1 auto; min-width: 0; }
  .money-grid { max-width: none; }
  .csb-row { max-width: 96%; }
  .chat-user h1 { font-size: 18px; max-width: 46vw; }
  .cs-list-pane .panel { max-height: none; }
}
@media (max-width: 420px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric.wide { grid-column: auto; }
  .side-menu a { min-width: 56px; padding: 6px 4px; }
}


/* anti-photo watermark */
.agent-wm {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 24px;
  padding: 40px 12px; overflow: hidden;
  transform: rotate(-18deg) scale(1.25);
  transform-origin: center;
}
.agent-wm span {
  display: block; text-align: center; white-space: nowrap;
  font-size: 13px; line-height: 1.4; font-weight: 600;
  color: rgba(24, 28, 35, 0.075); letter-spacing: 0.02em;
  user-select: none; -webkit-user-select: none;
}
body.has-wm .app-shell { position: relative; }
@media print {
  .agent-wm { display: grid !important; }
  .agent-wm span { color: rgba(0,0,0,.18) !important; }
}
