:root {
  --paper: #f7f5ef;
  --surface: #fffefb;
  --white: #ffffff;
  --ink: #19211f;
  --ink-soft: #3a4540;
  --muted: #6e7771;
  --line: #e2e2da;
  --line-soft: #eeede7;
  --blue: #315ff5;
  --blue-dark: #2448c8;
  --blue-soft: #edf1ff;
  --gold: #a47743;
  --gold-soft: #f3eadc;
  --green: #2d6a54;
  --green-soft: #e9f5ef;
  --red: #a54136;
  --red-soft: #faece8;
  --shadow-sm: 0 2px 8px rgba(25, 33, 31, 0.03);
  --shadow: 0 10px 30px rgba(28, 37, 32, 0.055);
  --radius: 18px;
  --sidebar: 244px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.prototype-strip {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: var(--ink);
  color: #f3f2ec;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-align: center;
}

.app-shell { min-height: calc(100vh - 32px); }

/* 侧边栏 */
.sidebar {
  position: fixed;
  z-index: 60;
  top: 32px;
  bottom: 0;
  left: 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 254, 251, 0.9);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 24px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 6px;
  border-radius: 10px;
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(49, 95, 245, 0.18);
}
.brand-mark i {
  display: block;
  border: 1.5px solid #fff;
  border-radius: 1px;
}
.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) { background: #fff; }
.brand strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand small {
  display: block;
  margin-top: 1px;
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
  margin: 18px 12px 6px;
  color: #8f958f;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.nav-label:first-child { margin-top: 0; }
.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
}
.nav-item:hover { background: #f2f1eb; }
.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}
.nav-item .icon { width: 18px; }
.nav-count {
  min-width: 22px;
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 8px;
  background: #e8e8e2;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}
.nav-item.active .nav-count { background: #fff; color: var(--blue); }
.invite-tag {
  margin-left: auto;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 500;
}

.sidebar-bottom { margin-top: auto; padding-top: 14px; }
.quota-card {
  width: 100%;
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.quota-head, .quota-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.quota-head { font-size: 12px; color: var(--muted); }
.quota-head strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.quota-track {
  display: block;
  height: 5px;
  margin: 10px 0 8px;
  overflow: hidden;
  border-radius: 5px;
  background: #eceee9;
}
.quota-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.quota-foot { color: var(--muted); font-size: 11.5px; }

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px;
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
}
.profile > span:nth-child(2) { min-width: 0; flex: 1; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 13px; font-weight: 600; }
.profile small { color: var(--muted); font-size: 11.5px; }
.profile > .icon { width: 15px; color: var(--muted); }

/* 主工作区与顶栏 */
.workspace {
  min-height: calc(100vh - 32px);
  margin-left: var(--sidebar);
}
.topbar {
  position: sticky;
  z-index: 45;
  top: 32px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(210, 211, 203, 0.78);
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(16px);
}
.global-search {
  height: 42px;
  max-width: 580px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
}
.global-search:focus-within {
  border-color: #aebdf4;
  box-shadow: 0 0 0 3px rgba(49, 95, 245, 0.08);
}
.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
}
.global-search kbd {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f7f3;
  color: #8f958f;
  font: 11px inherit;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.text-button {
  padding: 8px 10px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}
.text-button:hover { color: var(--blue); }
.wallet-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
}
.wallet-pill .icon { width: 16px; color: var(--blue); }
.wallet-pill strong { font-size: 13.5px; font-weight: 600; }
.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.icon-button:hover { border-color: #b7c4ee; color: var(--blue); }
.mobile-menu { display: none; }

#appView {
  max-width: 1520px;
  margin: 0 auto;
  padding: 30px 32px 60px;
  outline: 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-head h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.page-head p {
  max-width: 650px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* 按钮 */
.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn .icon { width: 16px; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(49, 95, 245, 0.16);
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary {
  border-color: #d6d9d2;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}
.btn-secondary:hover { border-color: #aebce8; }
.btn-dark { background: var(--ink); color: #fff; font-weight: 600; }
.btn-ghost {
  border-color: var(--line);
  background: #fafaf7;
  color: var(--ink-soft);
}
.btn-ghost:hover { border-color: #c3c7be; background: #fff; }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }

/* Hero 与任务匹配区 */
.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 32px;
  margin-bottom: 22px;
  padding: 32px 36px;
  border: 1px solid #e4e3dc;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-panel:after {
  content: "";
  position: absolute;
  right: -95px;
  top: -175px;
  width: 400px;
  height: 400px;
  border: 1px solid rgba(164, 119, 67, 0.16);
  border-radius: 50%;
  pointer-events: none;
}
.hero-panel h1 {
  max-width: 600px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.02em;
}
.hero-panel h1 span { color: var(--blue); }
.hero-panel .hero-copy {
  max-width: 540px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.task-box {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 22px;
  border: 1px solid #e4e3dc;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(28, 37, 32, 0.055);
}
.task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}
.task-head label {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.task-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 500;
}
.task-input { display: flex; gap: 9px; }
.task-input input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fafaf7;
  font-size: 13.5px;
}
.task-input input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 95, 245, 0.08);
}
.task-input .btn-primary {
  height: 44px;
  padding: 0 18px;
  font-size: 13.5px;
}
.quick-tasks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.quick-tasks span {
  color: var(--muted);
  font-size: 12px;
}
.quick-tasks button {
  padding: 5px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fafaf7;
  color: var(--ink-soft);
  font-size: 12px;
}
.quick-tasks button:hover {
  border-color: #b7c4ee;
  color: var(--blue);
  background: var(--blue-soft);
}

/* 统计卡片 */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.stat-card {
  padding: 18px 20px;
  border: 1px solid #e4e3dc;
  border-radius: 14px;
  background: rgba(255, 254, 251, 0.85);
  box-shadow: var(--shadow-sm);
}
.stat-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12.5px;
}
.stat-card > strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-card > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.stat-card .icon { width: 17px; color: var(--gold); }

/* 主内容布局 */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 24px;
  align-items: start;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin: 0 0 14px;
}
.section-head h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}
.section-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}
.section-link.muted { color: var(--muted); font-weight: 500; }
.section-link.muted:hover { color: var(--ink); }
.section-link .icon { width: 15px; }

.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.category-bar button {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}
.category-bar button:hover { border-color: #c5c8bf; }
.category-bar button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* 工具卡片 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tool-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid #e4e3dc;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: #c9cec5;
  box-shadow: var(--shadow);
}
.tool-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.tool-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--tool-color, var(--blue-soft));
  color: var(--tool-ink, var(--blue));
  font-size: 15px;
  font-weight: 600;
}
.tool-title { min-width: 0; flex: 1; }
.tool-title h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.tool-title p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.pin-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a5aaa4;
}
.pin-button .icon { width: 15px; }
.pin-button:hover { background: var(--blue-soft); color: var(--blue); }
.pin-button.pinned { color: var(--blue); background: var(--blue-soft); }

.tool-desc {
  min-height: 44px;
  margin: 14px 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  background: #f1f1eb;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.gold { background: var(--gold-soft); color: var(--gold); }
.tag.green { background: var(--green-soft); color: var(--green); }

.match-reason {
  margin: -4px 0 14px;
  padding: 5px 9px;
  border-radius: 7px;
  background: #f4f6ff;
  color: #2b4ec2;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}

.tool-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.tool-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.tool-price-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}
.tool-price-main strong {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.tool-price-main span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  flex: 0 0 auto;
}
.status-pill.active {
  background: var(--green-soft);
  color: var(--green);
}
.status-pill.active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.status-pill.sub {
  background: #f2f2ec;
  color: #6b736d;
}

.tool-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.tool-actions .btn {
  min-height: 38px;
  flex: 1;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
}

/* 右侧榜单与推广卡 */
.side-stack { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  padding: 20px;
  border: 1px solid #e4e3dc;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.side-card h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.side-card-head span { color: var(--muted); font-size: 12px; }

.rank-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f1ec;
}
.rank-tabs button {
  flex: 1;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.rank-tabs button.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(28, 37, 32, 0.06);
}

.rank-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  text-align: left;
}
.rank-item:hover .rank-info strong { color: var(--blue); }
.rank-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.rank-number {
  width: 22px;
  flex: 0 0 22px;
  color: #9ba09a;
  font: italic 500 14px Georgia, serif;
}
.rank-number.top { color: var(--gold); font-weight: 600; }
.rank-item .tool-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
}
.rank-info { min-width: 0; flex: 1; }
.rank-info strong, .rank-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-info strong {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.rank-info small {
  margin-top: 2px;
  color: #78817b;
  font-size: 12px;
  line-height: 1.35;
}
.rank-value {
  flex: 0 0 auto;
  color: #5c6660;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.developer-promo {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.developer-promo .eyebrow { color: #d7b78e; }
.developer-promo h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
}
.developer-promo p {
  margin: 8px 0 16px;
  color: #c3cbc5;
  font-size: 12.5px;
}
.developer-promo .btn {
  border-color: #4f5954;
  background: transparent;
  color: #fff;
  font-size: 13px;
}
.developer-promo .btn:hover { border-color: #fff; }

/* 内部员工专属：AI 精灵官方下载引流 Banner */
.ai-jingling-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-color: rgba(20, 152, 232, 0.35);
  background:
    radial-gradient(circle at 92% 14%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(135deg, #087eea 0%, #159bea 52%, #24c6dc 100%);
  color: #fff;
  box-shadow: 0 14px 32px rgba(12, 132, 222, 0.18);
  transition: transform 0.18s, box-shadow 0.18s;
  isolation: isolate;
}
.ai-jingling-banner::before {
  content: "";
  position: absolute;
  right: -76px;
  top: -78px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: -1;
}
.ai-jingling-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(12, 132, 222, 0.26);
}
.ai-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ai-banner-badge, .ai-banner-scope {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.ai-banner-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
}
.ai-banner-scope {
  background: rgba(15, 34, 62, 0.24);
  color: #e6fbff;
}
.ai-banner-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-banner-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(8, 63, 128, 0.22);
}
.ai-banner-icon img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.ai-banner-copy { min-width: 0; flex: 1; }
.ai-banner-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.ai-banner-copy h3 {
  margin-top: 2px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}
.ai-banner-desc {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}
.ai-banner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ai-banner-chips span {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}
.ai-banner-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}
.ai-banner-cta strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.ai-banner-cta small {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.86);
}
.ai-banner-cta .icon {
  width: 17px;
  height: 17px;
  color: #fff;
  transition: transform 0.15s;
}
.ai-jingling-banner:hover .ai-banner-cta .icon {
  transform: translateX(3px);
}

/* 通用面板、空状态、表格与开关 */
.empty-state {
  padding: 45px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}
.panel {
  padding: 22px;
  border: 1px solid #e4e3dc;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 18px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 17px; font-weight: 600; }
.panel-head p { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.panel-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.pin-list { display: flex; flex-direction: column; gap: 9px; }
.pin-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: #fff;
}
.pin-row .tool-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 14px; }
.pin-row-info { min-width: 0; flex: 1; }
.pin-row-info strong, .pin-row-info small { display: block; }
.pin-row-info strong { font-size: 13.5px; font-weight: 600; }
.pin-row-info small { color: var(--muted); font-size: 12px; }

.order-actions { display: flex; gap: 4px; }
.order-actions button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.order-actions .icon { width: 14px; }
.order-actions button:disabled { opacity: 0.3; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #dce3f8;
  border-radius: 11px;
  background: var(--blue-soft);
  color: #354c9c;
  font-size: 13px;
}
.notice .icon { width: 18px; margin-top: 2px; }
.notice.gold { border-color: #e8ddce; background: var(--gold-soft); color: #76542f; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13px;
}
th {
  color: var(--muted);
  background: #faf9f5;
  font-size: 12px;
  font-weight: 600;
}
tr:last-child td { border-bottom: 0; }
td strong { font-size: 13px; font-weight: 600; }
td small { display: block; color: var(--muted); font-size: 12px; }
.table-tool { display: flex; align-items: center; gap: 10px; }
.table-tool .tool-icon { width: 32px; height: 32px; border-radius: 8px; font-size: 12px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
}
.status:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.pending { background: var(--gold-soft); color: var(--gold); }
.status.off { background: #efefeb; color: var(--muted); }

.switch {
  position: relative;
  width: 36px;
  height: 20px;
  display: inline-block;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #d8dbd5;
  vertical-align: middle;
}
.switch:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s;
}
.switch.on { background: var(--blue); }
.switch.on:after { transform: translateX(16px); }

/* 钱包与明细 */
.wallet-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}
.wallet-card {
  position: relative;
  overflow: hidden;
  padding: 23px;
  border: 1px solid #e4e3dc;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.wallet-card.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.wallet-card > span { color: var(--muted); font-size: 13px; }
.wallet-card.primary > span { color: #b9c1bc; }
.wallet-card > strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.wallet-card > strong small { font-size: 14px; font-weight: 500; }
.wallet-card > small { color: var(--muted); font-size: 12px; }
.wallet-card.primary > small { color: #b9c1bc; }
.wallet-card .icon { position: absolute; right: 20px; top: 20px; color: var(--gold); }
.wallet-card.primary .icon { color: #d8ba93; }

.mini-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-tabs button {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.mini-tabs button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}
.ledger-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}
.credit-positive { color: var(--green); font-weight: 700; }
.credit-negative { color: var(--ink); font-weight: 700; }
.recharge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.recharge-option {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafaf7;
}
.recharge-option strong, .recharge-option span { display: block; }
.recharge-option strong { font-size: 17px; }
.recharge-option span { margin-top: 4px; color: var(--muted); font-size: 12px; }

/* 开发者中心 */
.developer-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  margin-bottom: 20px;
  padding: 30px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
}
.developer-hero .eyebrow { color: #d8ba93; }
.developer-hero h1 { font-size: 28px; letter-spacing: -0.02em; }
.developer-hero p { max-width: 650px; margin-top: 9px; color: #bec6c1; font-size: 13.5px; }
.developer-hero .btn { border-color: #59625e; background: transparent; color: #fff; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.step {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.step span { color: var(--gold); font: italic 14px Georgia, serif; }
.step h3 { margin: 8px 0 5px; font-size: 14px; font-weight: 600; }
.step p { color: var(--muted); font-size: 12.5px; }

.upload-zone {
  padding: 28px;
  border: 1px dashed #b9c1b8;
  border-radius: 12px;
  background: #fafaf7;
  text-align: center;
}
.upload-zone .icon { width: 28px; height: 28px; color: var(--blue); }
.upload-zone h3 { margin-top: 10px; font-size: 14px; }
.upload-zone p { margin: 5px 0 14px; color: var(--muted); font-size: 12.5px; }

/* 管理后台 */
.admin-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.admin-tabs button {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.admin-tabs button.active { background: var(--ink); color: #fff; font-weight: 600; }
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 18px;
}
.metric {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.metric span { color: var(--muted); font-size: 12.5px; }
.metric strong {
  display: block;
  margin: 7px 0 3px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.metric small { color: var(--muted); font-size: 12px; }
.metric.emphasis { border-color: #cdd7f8; background: var(--blue-soft); }
.metric.emphasis strong { color: var(--blue); }
.version-label {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font: 11.5px monospace;
}

/* 右侧详情抽屉 */
.drawer-scrim {
  position: fixed;
  z-index: 80;
  inset: 0;
  visibility: hidden;
  background: rgba(18, 26, 23, 0.28);
  opacity: 0;
  transition: 0.2s;
}
.drawer-scrim.open { visibility: visible; opacity: 1; }
.tool-drawer {
  position: fixed;
  z-index: 85;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100%);
  overflow-y: auto;
  padding: 27px;
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(24, 31, 28, 0.12);
  transform: translateX(102%);
  transition: transform 0.24s;
}
.tool-drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; right: 22px; top: 22px; }
.drawer-tool-head { display: flex; align-items: center; gap: 15px; margin: 35px 0 22px; }
.drawer-tool-head .tool-icon { width: 57px; height: 57px; border-radius: 16px; font-size: 18px; }
.drawer-tool-head h2 { font-size: 20px; line-height: 1.35; font-weight: 600; }
.drawer-tool-head p { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.drawer-description { color: var(--ink-soft); font-size: 13.5px; line-height: 1.8; }
.price-box {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #faf9f5;
}
.price-box strong { font-size: 22px; }
.price-box p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.detail-list { margin: 20px 0; }
.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.detail-list span { color: var(--muted); }
.detail-list strong { text-align: right; font-weight: 600; }
.drawer-actions { display: flex; gap: 9px; margin-top: 23px; }
.drawer-actions .btn { flex: 1; }
.drawer-note { display: flex; gap: 8px; margin-top: 17px; color: var(--muted); font-size: 12px; }
.drawer-note .icon { width: 16px; margin-top: 2px; }

/* 弹窗 */
.modal-scrim {
  position: fixed;
  z-index: 100;
  inset: 0;
  visibility: hidden;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 26, 23, 0.38);
  opacity: 0;
  transition: 0.2s;
}
.modal-scrim.open { visibility: visible; opacity: 1; }
.rules-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(20, 27, 24, 0.2);
}
.modal-close { position: absolute; top: 20px; right: 20px; }
.rules-modal h2 { font-size: 26px; letter-spacing: -0.02em; }
.modal-intro { margin-top: 8px; color: var(--muted); font-size: 13px; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 23px 0; }
.rules-grid article { padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.rules-grid article > span { color: var(--gold); font: italic 13px Georgia, serif; }
.rules-grid h3 { margin: 6px 0; font-size: 14px; }
.rules-grid p { color: var(--muted); font-size: 12.5px; }
.rule-types { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.rule-types span {
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 25px;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 35px rgba(20, 27, 24, 0.2);
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 15px);
  pointer-events: none;
  transition: 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sidebar-scrim { display: none; }

/* 表单与扩展组件 */
.member-modal { max-width: 560px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field > span { font-size: 12.5px; font-weight: 600; }
.form-field > span b { color: var(--red); }
.form-field > span small { color: var(--muted); font-weight: 400; }
.form-field input, .form-field select {
  width: 100%;
  height: 43px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.form-field input:focus, .form-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 95, 245, 0.08);
}
.form-field > small { color: var(--muted); font-size: 11.5px; }
.member-scope-hint {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #dce3f8;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #2f499c;
  font-size: 12px;
  line-height: 1.5;
}
.member-scope-hint.is-external {
  border-color: #e6d7be;
  background: var(--gold-soft);
  color: #7c5626;
}
.form-field select:disabled {
  background: #f3f3ee;
  color: var(--muted);
  cursor: not-allowed;
}
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #dce3f8;
  border-radius: 11px;
  background: var(--blue-soft);
  cursor: pointer;
}
.check-card input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.check-card strong, .check-card small { display: block; }
.check-card strong { font-size: 13px; }
.check-card small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.manual-grant { margin-top: 4px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.profile-btn { width: 100%; border: 0; background: transparent; text-align: left; border-radius: 10px; transition: background 0.15s; }
.profile-btn:hover { background: #f2f1eb; }
.login-scrim { z-index: 130; background: rgba(25, 33, 31, 0.52); backdrop-filter: blur(8px); }
.login-card { max-width: 440px; }
.pwd-modal, .import-modal, .grant-modal { max-width: 520px; }
.audit-modal { max-width: 860px; }
.usage-modal { max-width: 1080px; }
.user-name-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(49, 95, 245, 0.35);
  text-underline-offset: 3px;
}
.user-name-link:hover { color: var(--blue); text-decoration-color: var(--blue); }
.usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.usage-stat {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg);
}
.usage-stat span { display: block; font-size: 12px; color: var(--muted); }
.usage-stat strong { display: block; font-size: 18px; margin-top: 3px; color: var(--ink); }
.usage-stat small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 720px) { .usage-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.import-textarea {
  width: 100%;
  min-height: 130px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 12.5px/1.6 monospace;
  resize: vertical;
}
.import-textarea:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(49, 95, 245, 0.08); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-xs { min-height: 28px; padding: 4px 10px; border-radius: 7px; font-size: 12px; font-weight: 500; }
.btn-danger-outline { border-color: #ebc7c2; background: #fff; color: var(--red); }
.btn-danger-outline:hover { background: var(--red-soft); }
.account-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pwd-banner {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e8ddce;
  border-radius: 9px;
  background: var(--gold-soft);
  color: #76542f;
  font-size: 12.5px;
}
.form-error {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12.5px;
  display: none;
}
.form-error.show { display: block; }
.drawer-ext-box { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.drawer-ext-box .btn { flex: 1 1 160px; }

.pat-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.pat-head h3 { font-size: 15px; }
.pat-head p { margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.pat-create-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pat-create-row input {
  min-width: 0;
  flex: 1 1 180px;
  height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.pat-created-box { margin-top: 12px; padding: 11px 12px; border: 1px solid #d7e2fb; border-radius: 10px; background: var(--blue-soft); }
.pat-created-box p { margin-bottom: 7px; font-size: 12px; color: #2744a8; font-weight: 600; }
.pat-created-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pat-created-row code {
  flex: 1 1 200px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #cdd7f8;
  font-size: 12px;
  word-break: break-all;
}
.pat-list-wrap { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pat-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; text-align: center; }
.pat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
}
.pat-item-main { min-width: 0; flex: 1; }
.pat-item-main strong { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.pat-item-main code { padding: 1px 6px; border-radius: 5px; background: #f4f4ef; color: var(--muted); font-size: 11.5px; }
.pat-item-main small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; word-break: break-word; }

.dev-form-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.dev-tip-box { margin-top: 12px; padding: 11px 14px; border-radius: 10px; background: #f7f8f5; border: 1px solid var(--line-soft); font-size: 12.5px; }
.dev-tip-box strong { display: block; color: var(--ink); margin-bottom: 3px; }
.dev-tip-box p { margin: 0; color: var(--muted); line-height: 1.5; }
.dev-dropzone { margin-top: 12px; transition: border-color 0.15s, background 0.15s; }
.dev-dropzone.dragover { border-color: var(--blue); background: #eef3ff; }
.dev-dropzone.has-file { border-color: #2b6b45; background: #f2f9f5; }
.dev-action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.dev-result { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.55; }
.dev-result.ok { background: #edf7f1; border: 1px solid #b9dfc6; color: #1f5134; }
.dev-result.err { background: #fdf0ef; border: 1px solid #efb8b4; color: #8e221b; }
.dev-result strong { display: block; margin-bottom: 4px; font-size: 13.5px; }
.dev-result p { margin: 0; }
.dev-result-list { margin: 6px 0 0; padding-left: 18px; }
.dev-result-list.warn { color: #8a5a12; }
.dev-empty-auth { padding: 20px; border: 1px dashed var(--line); border-radius: 12px; background: #faf9f5; font-size: 13px; line-height: 1.6; }
.dev-empty-auth strong { display: block; margin-bottom: 6px; font-size: 14px; }
.dev-empty-auth p { margin: 0; color: var(--muted); }
.dev-history-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; max-height: 460px; overflow: auto; }
.dev-history-item { padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fff; }
.dev-history-item.active { border-color: #2b6b45; background: #f5fbf7; }
.dev-history-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dev-history-top strong { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.dev-history-item p { margin: 5px 0 3px; font-size: 12.5px; color: var(--ink); word-break: break-word; }
.dev-history-item small { display: block; color: var(--muted); font-size: 11.5px; }

/* 响应式断点 */
@media (max-width: 1280px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row, .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-panel { grid-template-columns: 1fr; }
  .task-box { max-width: 600px; }
  .wallet-grid { grid-template-columns: 1fr 1fr; }
  .wallet-card.primary { grid-column: 1 / -1; }
  .topbar-actions .text-button { display: none; }
}
@media (max-width: 1000px) {
  :root { --sidebar: 224px; }
  .content-layout { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: 1fr 1fr; }
  .side-stack .ai-jingling-banner { grid-column: 1 / -1; }
  .global-search kbd { display: none; }
  .wallet-pill span { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .prototype-strip { height: 28px; font-size: 11px; }
  .sidebar { top: 28px; transform: translateX(-102%); transition: transform 0.22s; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 55; inset: 28px 0 0; background: rgba(20, 27, 24, 0.25); }
  .sidebar-scrim.open { display: block; }
  .workspace { margin-left: 0; min-height: calc(100vh - 28px); }
  .topbar { top: 28px; height: 63px; padding: 0 16px; gap: 10px; }
  .mobile-menu { display: inline-grid; }
  .topbar-actions { gap: 6px; }
  .topbar-actions > .icon-button { display: none; }
  .wallet-pill { padding: 9px; }
  .global-search { height: 38px; }
  .global-search input { font-size: 13px; }
  #appView { padding: 23px 16px 45px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .page-head h1 { font-size: 25px; }
  .hero-panel { padding: 25px 21px; }
  .hero-panel h1 { font-size: 30px; }
  .stat-row, .admin-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card > strong { font-size: 21px; }
  .tool-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: 1fr; }
  .side-stack .ai-jingling-banner { grid-column: auto; }
  .wallet-grid { grid-template-columns: 1fr; }
  .wallet-card.primary { grid-column: auto; }
  .recharge-grid { grid-template-columns: 1fr 1fr; }
  .developer-hero { grid-template-columns: 1fr; padding: 24px; }
  .developer-hero h1 { font-size: 24px; }
  .developer-hero .btn { justify-self: start; }
  .steps { grid-template-columns: 1fr 1fr; }
  .panel { padding: 16px; }
  .pin-row { gap: 9px; }
  .pin-row .tag { display: none; }
  .rules-modal { padding: 26px 20px; }
  .rules-grid { grid-template-columns: 1fr; }
  .ledger-filter { align-items: flex-start; flex-direction: column; }
  .page-actions { display: flex; gap: 8px; width: 100%; }
  .page-actions .btn { flex: 1; }
}
@media (max-width: 720px) {
  .dev-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .member-modal { padding: 26px 20px; }
  .form-actions .btn { flex: 1; }
}
@media (max-width: 420px) {
  .stat-row, .admin-metrics { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tool-actions { flex-direction: column; }
  .quick-tasks button { font-size: 11.5px; }
  .brand { padding-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* 外部 3 档配置、三本账报表与顾问升级引导 */
.ext-tier-box {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf9f5;
}
.ext-tier-box .form-grid {
  margin-top: 0;
}
.advisor-modal {
  max-width: 680px;
}
.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.report-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.report-month-input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.tag.purple {
  background: #efeafc;
  color: #5a3ea6;
}
.tag.red {
  background: #fdecec;
  color: #b42318;
}
