/* Busly design system (tokens/base/components/layout/app). Portal-specific styles live in portal.css. */
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/inter-latin-ext-wght-normal-DO1Apj_S.woff2) format('woff2-variations');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/inter-latin-wght-normal-Dx4kXJAl.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/*
 * 设计变量：Linear 风格。中性灰阶 + 一个品牌强调色（YeahRouter 橙），细描边、低阴影、紧凑排版。
 * 主题由 <html data-theme="light|dark"> 决定，页面 <head> 里的内联脚本在首帧前写好，避免闪烁。
 */

:root {
  --font-sans: 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur: 140ms;

  --sidebar-w: 232px;
  --topbar-h: 52px;

  /* 浅色 */
  --bg: #fbfbfb;
  --bg-subtle: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-hover: #f1f1f3;
  --surface-active: #ebebee;
  --border: #e7e7ea;
  --border-strong: #d6d6db;
  --text: #17171a;
  --text-2: #5f6168;
  --text-3: #8b8d94;
  --text-inverse: #ffffff;

  --accent: #d97757;
  --accent-hover: #c8684a;
  --accent-text: #b4532f;
  --accent-soft: rgba(217, 119, 87, 0.1);
  --accent-ring: rgba(217, 119, 87, 0.35);

  --primary: #17171a;
  --primary-hover: #2b2b30;
  --primary-text: #ffffff;

  --success: #1a7f4b;
  --success-soft: rgba(26, 127, 75, 0.1);
  --warning: #a76100;
  --warning-soft: rgba(214, 140, 0, 0.12);
  --danger: #c4372f;
  --danger-soft: rgba(196, 55, 47, 0.1);
  --info: #3f63d8;
  --info-soft: rgba(63, 99, 216, 0.1);

  --shadow-sm: 0 1px 2px rgba(16, 16, 20, 0.04);
  --shadow: 0 1px 2px rgba(16, 16, 20, 0.04), 0 4px 12px rgba(16, 16, 20, 0.04);
  --shadow-lg: 0 8px 28px rgba(16, 16, 20, 0.12), 0 2px 6px rgba(16, 16, 20, 0.06);
  --overlay: rgba(14, 14, 18, 0.36);
  --grid-line: rgba(16, 16, 20, 0.045);
  /* 首屏动效：颜色取 logo 橙 #D97757 */
  --grid-accent: rgba(217, 119, 87, 0.42);
  --hero-orb-1: rgba(217, 119, 87, 0.26);
  --hero-orb-2: rgba(236, 150, 116, 0.22);
  --hero-orb-3: rgba(217, 119, 87, 0.12);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(217, 119, 87, 0.12), transparent 70%);

  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #08090a;
  --bg-subtle: #0d0e10;
  --surface: #101113;
  --surface-2: #141517;
  --surface-hover: #1a1b1e;
  --surface-active: #222327;
  --border: #212226;
  --border-strong: #2e2f34;
  --text: #f4f4f5;
  --text-2: #a1a3aa;
  --text-3: #6e7078;
  --text-inverse: #0b0b0c;

  --accent: #e2876a;
  --accent-hover: #ea9a80;
  --accent-text: #ef9d82;
  --accent-soft: rgba(226, 135, 106, 0.12);
  --accent-ring: rgba(226, 135, 106, 0.4);

  --primary: #f4f4f5;
  --primary-hover: #ffffff;
  --primary-text: #0b0b0c;

  --success: #4cc38a;
  --success-soft: rgba(76, 195, 138, 0.12);
  --warning: #f0b45a;
  --warning-soft: rgba(240, 180, 90, 0.12);
  --danger: #f2706a;
  --danger-soft: rgba(242, 112, 106, 0.12);
  --info: #7d9cff;
  --info-soft: rgba(125, 156, 255, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  --overlay: rgba(0, 0, 0, 0.6);
  --grid-line: rgba(255, 255, 255, 0.04);
  --grid-accent: rgba(226, 135, 106, 0.38);
  --hero-orb-1: rgba(217, 119, 87, 0.24);
  --hero-orb-2: rgba(236, 150, 116, 0.16);
  --hero-orb-3: rgba(217, 119, 87, 0.1);
  --glow: radial-gradient(60% 50% at 50% 0%, rgba(226, 135, 106, 0.16), transparent 70%);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: 'cv11', 'ss01', 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
img,
svg {
  display: block;
}
code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.num {
  font-variant-numeric: tabular-nums;
}
::selection {
  background: var(--accent-soft);
}
:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--text-2);
}
.faint {
  color: var(--text-3);
}
.link {
  color: var(--accent-text);
  font-weight: 500;
}
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm {
  width: 14px;
  height: 14px;
}
.icon-lg {
  width: 18px;
  height: 18px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), opacity var(--dur) var(--ease);
  user-select: none;
}
.btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
.btn:active {
  background: var(--surface-active);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: transparent;
  color: var(--text);
}
.btn-danger {
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-soft);
  border-color: transparent;
}
.btn-danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger-solid:hover {
  filter: brightness(1.06);
  background: var(--danger);
}
.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}
.btn-lg {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  border-radius: var(--radius);
}
.btn-icon {
  width: 32px;
  padding: 0;
}
.btn-icon.btn-sm {
  width: 28px;
}
.btn-block {
  width: 100%;
}
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.75px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 表单 ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field + .field {
  margin-top: 14px;
}
.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.hint {
  font-size: 12px;
  color: var(--text-3);
}
.error-text {
  font-size: 12px;
  color: var(--danger);
}
.input,
.select,
.textarea {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.textarea {
  height: auto;
  min-height: 80px;
  padding: 8px 10px;
  resize: vertical;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input-lg {
  height: 40px;
  font-size: 14px;
  padding: 0 12px;
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group > .icon {
  position: absolute;
  left: 10px;
  color: var(--text-3);
  pointer-events: none;
}
.input-group > .input {
  padding-left: 32px;
}
.input-group > .input-suffix {
  position: absolute;
  right: 4px;
}
.select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8d94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}
.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.checkbox input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}

/* 开关 */
.switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
  border-radius: 999px;
  border: none;
  background: var(--border-strong);
  transition: background var(--dur) var(--ease);
  padding: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur) var(--ease);
}
.switch[aria-checked='true'] {
  background: var(--accent);
}
.switch[aria-checked='true']::after {
  transform: translateX(14px);
}
.switch:disabled {
  opacity: 0.5;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: 20px;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
}
.card-head + .card-body {
  padding-top: 0;
}
.card-body {
  padding: 16px 20px 20px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title h2,
.card-title h3 {
  font-size: 14px;
  font-weight: 600;
}
.card-title p {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 1px;
}
.card-divider {
  height: 1px;
  background: var(--border);
}
.tile-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}
.tile-icon.accent {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: transparent;
}

/* ---------- 徽标 ---------- */
.badge.tier-badge {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: transparent;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-success {
  color: var(--success);
  background: var(--success-soft);
  border-color: transparent;
}
.badge-warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: transparent;
}
.badge-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: transparent;
}
.badge-info {
  color: var(--info);
  background: var(--info-soft);
  border-color: transparent;
}
.badge-accent {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: transparent;
}

/* ---------- 分段控件 ---------- */
.segmented {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.segmented button {
  height: 26px;
  padding: 0 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.segmented button:hover {
  color: var(--text);
}
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

/* ---------- 表格 ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-3);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface-2);
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover td {
  background: var(--surface-hover);
}
.table .right {
  text-align: right;
}
.table-card {
  overflow: hidden;
}

/* ---------- 空状态 / 骨架 ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.empty .icon {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
}
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2), var(--surface-hover), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------- 提示条 ---------- */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--text-2);
}
.callout .icon {
  margin-top: 2px;
}
.callout-warning {
  background: var(--warning-soft);
  border-color: transparent;
  color: var(--text);
}
.callout-warning > .icon {
  color: var(--warning);
}
.callout-danger {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--text);
}
.callout-danger > .icon {
  color: var(--danger);
}
.callout-success {
  background: var(--success-soft);
  border-color: transparent;
  color: var(--text);
}
.callout-success > .icon {
  color: var(--success);
}
.callout-info {
  background: var(--info-soft);
  border-color: transparent;
  color: var(--text);
}
.callout-info > .icon {
  color: var(--info);
}

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--overlay);
  backdrop-filter: blur(2px);
  animation: fade-in 120ms var(--ease);
}
.modal {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop-in 160ms var(--ease);
}
.modal-wide {
  max-width: 560px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}
.modal-head h2 {
  font-size: 15px;
}
.modal-body {
  padding: 14px 20px 20px;
}
.modal-desc {
  color: var(--text-2);
  font-size: 13px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
}

/* ---------- 下拉菜单 ---------- */
.menu-anchor {
  position: relative;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 200px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: pop-in 120ms var(--ease);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}
.menu-item:hover {
  background: var(--surface-hover);
}
.menu-item .icon {
  color: var(--text-2);
}
.menu-sep {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}
.menu-label {
  padding: 6px 8px 4px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  z-index: 200;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(92vw, 420px);
  padding: 9px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: pop-in 160ms var(--ease);
  pointer-events: auto;
}
.toast-success .icon {
  color: var(--success);
}
.toast-error .icon {
  color: var(--danger);
}

/* ---------- 复制块 ---------- */
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
  text-align: left;
  width: 100%;
}
.copy-row:hover {
  border-color: var(--border-strong);
}
.copy-row .mono {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-3);
}
.pager-btns {
  display: flex;
  gap: 6px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--text-3);
}

/* ---------- 站内通知（components/Notifications.tsx） ---------- */
.notify-anchor {
  position: relative;
  display: inline-flex;
}
.notify-btn {
  position: relative;
}
.notify-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
  pointer-events: none;
}
.notify-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  width: min(400px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop-in 120ms var(--ease);
  overflow: hidden;
}
@media (max-width: 640px) {
  .notify-pop {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 60px;
    width: auto;
  }
}
.notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.notify-tab-count {
  margin-left: 5px;
  color: var(--text-3);
  font-size: 11px;
}
.notify-body {
  max-height: min(60vh, 460px);
  overflow-y: auto;
  padding: 14px 16px;
}
.notify-empty {
  padding: 28px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.notice-popup-body {
  max-height: min(60vh, 520px);
  overflow-y: auto;
}
.notice-md {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: anywhere;
}
.notice-md > :first-child {
  margin-top: 0;
}
.notice-md > :last-child {
  margin-bottom: 0;
}
.notice-md p,
.notice-md ul,
.notice-md ol,
.notice-md blockquote {
  margin: 0 0 8px;
}
.notice-md ul,
.notice-md ol {
  padding-left: 20px;
}
.notice-md h1,
.notice-md h2,
.notice-md h3,
.notice-md h4 {
  margin: 12px 0 6px;
  font-size: 14.5px;
  font-weight: 600;
}
.notice-md a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.notice-md code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.notice-md img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.notice-md blockquote {
  padding-left: 10px;
  border-left: 3px solid var(--border);
  color: var(--text-2);
}
.notice-md hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}
.ann-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ann-item {
  --ann-c: var(--text-3);
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ann-item:first-child {
  padding-top: 0;
}
.ann-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.ann-ongoing {
  --ann-c: var(--info);
}
.ann-success {
  --ann-c: var(--success);
}
.ann-warning {
  --ann-c: var(--warning);
}
.ann-error {
  --ann-c: var(--danger);
}
.ann-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--ann-c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ann-c) 18%, transparent);
}
.ann-main {
  min-width: 0;
  flex: 1;
}
.ann-extra {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-2);
}
.ann-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.ann-tag {
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 500;
  color: var(--ann-c);
  background: color-mix(in srgb, var(--ann-c) 12%, transparent);
}
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}
.hide-sm {
}
.show-sm {
  display: none !important;
}
@media (max-width: 760px) {
  .hide-sm {
    display: none !important;
  }
  .show-sm {
    display: inline-flex !important;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo img {
  border-radius: 6px;
}
.sep-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* ---------- 公开页顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
}
.site-header-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav {
  display: flex;
  gap: 2px;
}
.site-nav a {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.site-nav a.is-active {
  color: var(--text);
}
.site-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-mobile-nav {
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.site-mobile-nav a {
  padding: 10px 0;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.site-mobile-nav a:last-child {
  border-bottom: none;
}
@media (max-width: 760px) {
  .site-nav {
    display: none;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 13px;
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-top: 44px;
  padding-bottom: 32px;
  flex-wrap: wrap;
}
.site-footer-brand {
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-footer-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.site-footer-cols div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-footer-cols h4 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 4px;
}
.site-footer-cols a {
  color: var(--text-2);
}
.site-footer-cols a:hover {
  color: var(--text);
}
.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 12px;
  flex-wrap: wrap;
}
.site-footer-bottom a {
  color: var(--text-2);
}
.site-footer-bottom a:hover {
  color: var(--text);
}

/* ---------- 控制台外壳 ---------- */
.app {
  min-height: 100vh;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 0 20px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-left {
  gap: 10px;
}
.topbar-nav {
  display: flex;
  gap: 2px;
  margin-right: 6px;
}
.topbar-nav a {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.topbar-nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.balance-chip:hover {
  border-color: var(--border-strong);
}
.balance-chip .icon {
  color: var(--text-3);
}
.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #b65d8e);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border: none;
  padding: 0;
}
.app-body {
  display: flex;
}
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  width: var(--sidebar-w);
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.side-group + .side-group {
  margin-top: 14px;
}
.side-label {
  padding: 0 10px 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.side-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.side-link.is-active {
  background: var(--surface-active);
  color: var(--text);
}
.side-link.is-active .icon {
  color: var(--accent-text);
}
.side-link .side-ext {
  margin-left: auto;
  width: 12px;
  height: 12px;
  opacity: 0.5;
}
.main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 64px;
}
.main-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-size: 20px;
}
.page-head p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 13px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wrap {
  flex-wrap: wrap;
}

.mobile-drawer-backdrop {
  display: none;
}
@media (max-width: 960px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    z-index: 45;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 180ms var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open {
    transform: none;
  }
  .mobile-drawer-backdrop.is-open {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    z-index: 44;
    background: var(--overlay);
  }
  .main {
    padding: 20px 16px 48px;
  }
  .topbar-nav {
    display: none;
  }
}

/* ---------- 登录页 ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: var(--glow);
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.auth-center {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 16px 64px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
}
.auth-card h1 {
  font-size: 22px;
  text-align: center;
}
.auth-card .auth-sub {
  margin-top: 6px;
  text-align: center;
  color: var(--text-2);
  font-size: 13.5px;
}
.auth-form {
  margin-top: 24px;
  padding: 24px;
}
.auth-alt {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
}
.or-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-3);
  font-size: 12px;
}
.or-sep::before,
.or-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.turnstile {
  min-height: 65px;
  margin-top: 14px;
}
.turnstile:empty {
  min-height: 0;
}
.lang-btn {
  gap: 4px;
  padding: 0 8px;
  font-size: 12px;
}
.lang-btn span {
  min-width: 14px;
}
.nowrap {
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ---------- 概览 ---------- */
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}
@media (max-width: 960px) {
  .overview {
    grid-template-columns: minmax(0, 1fr);
  }
}
.overview-stats {
  padding: 18px 20px 20px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}
.stat-label .icon {
  color: var(--text-3);
}
.stat-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-sub {
  font-size: 12px;
  color: var(--text-3);
}
.overview-balance {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px 20px;
}
.balance-value {
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.balance-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.balance-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.balance-meta span {
  font-size: 11.5px;
  color: var(--text-3);
}
.balance-meta strong {
  font-size: 13px;
  font-weight: 600;
}
.overview-balance .btn-block {
  margin-top: auto;
}

/* ---------- 图表 ---------- */
.chart-body {
  padding-top: 4px;
}
.chart-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .chart-split {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bar-chart {
  display: flex;
  flex-direction: column;
}
.bar-chart-plot {
  position: relative;
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.bar-chart-grid {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed var(--border);
}
.bar-col {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar {
  width: min(60%, 40px);
  border-radius: 4px 4px 1px 1px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
  transition: background var(--dur) var(--ease);
}
.bar-col.is-hover .bar {
  background: var(--accent);
}
.bar-tip {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.bar-chart-x {
  display: flex;
  padding-top: 6px;
}
.bar-chart-x span {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-3);
}
.top-models {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.top-model {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.meter {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-active);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.steps li {
  display: flex;
  gap: 12px;
}
.steps strong {
  font-weight: 600;
  font-size: 13.5px;
}
.steps p {
  margin-top: 1px;
  color: var(--text-2);
  font-size: 12.5px;
}
.step-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.toolbar .input,
.toolbar .select {
  height: 30px;
  font-size: 13px;
}
.toolbar-spacer {
  flex: 1;
}
.summary-strip {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.summary-strip div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.summary-strip span {
  font-size: 11.5px;
  color: var(--text-3);
}
.summary-strip strong {
  font-size: 15px;
  font-weight: 600;
}

/* ---------- 密钥 ---------- */
.key-cell {
  display: flex;
  align-items: center;
  gap: 2px;
}
.key-cell .mono {
  font-size: 12.5px;
  color: var(--text-2);
}
.key-name {
  font-weight: 500;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}
.secret-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
}
.secret-box span {
  flex: 1;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .field + .field {
  margin-top: 0;
}
.form-grid .span-2 {
  grid-column: span 2;
}
@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: auto;
  }
}
.chip-select {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-family: var(--font-mono);
}
.chip[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ---------- 日志详情 ---------- */
.log-detail {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}
.log-detail dt {
  color: var(--text-3);
}
.log-detail dd {
  margin: 0;
  word-break: break-all;
}

/* ---------- 钱包 ---------- */
.wallet-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}
@media (max-width: 960px) {
  .wallet-top {
    grid-template-columns: minmax(0, 1fr);
  }
}
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 560px) {
  .amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.amount-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.amount-opt:hover {
  border-color: var(--border-strong);
}
.amount-opt[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.amount-opt strong {
  font-size: 17px;
  font-weight: 600;
}
.amount-opt span {
  font-size: 11.5px;
  color: var(--text-3);
}
.pay-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}
.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}
.pay-method:hover {
  border-color: var(--border-strong);
}
.pay-method[aria-pressed='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.pay-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.pay-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.plan h3 {
  font-size: 15px;
}
.plan-price {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.plan-price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-3);
}
.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}
.plan li {
  display: flex;
  gap: 6px;
}
.plan li .icon {
  color: var(--success);
  margin-top: 2px;
}
.plan .btn {
  margin-top: auto;
}

/* ---------- 个人设置 ---------- */
.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 16px;
  font-size: 13.5px;
}
.kv dt {
  color: var(--text-3);
}
.kv dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.setting-row:first-child {
  padding-top: 0;
}
.setting-row h3 {
  font-size: 13.5px;
  font-weight: 500;
}
.setting-row p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-3);
}
.session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.session-item:last-child {
  border-bottom: none;
}
.session-item .tile-icon {
  width: 34px;
  height: 34px;
}
.session-meta {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-3);
}
.session-meta strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.backup-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
}
.qr-box {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  width: fit-content;
  margin: 0 auto;
}

/* 钱包：邀请返利 */
.aff-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.aff-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.aff-stats span {
  font-size: 12px;
  color: var(--text-2);
}
.aff-stats strong {
  font-size: 18px;
  font-weight: 600;
}

/* 任务记录：结果预览 */
.task-artifacts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.task-artifact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.task-artifact video,
.task-artifact img {
  width: 100%;
  max-height: 60vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
  object-fit: contain;
}
.task-artifact audio {
  width: 100%;
}

/* 通知设置（/notifications） */
.notify-matrix-row {
  display: grid;
  grid-template-columns: 1fr 88px 88px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.notify-matrix-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.notify-matrix-row > :not(:first-child) {
  justify-self: center;
}
.notify-matrix-head {
  padding-top: 0;
  font-size: 12px;
  color: var(--text-3);
}
.notify-matrix-row h3 {
  font-size: 13.5px;
  font-weight: 500;
}
.notify-matrix-row p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-3);
}
.notify-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.notify-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}
.notify-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent, currentColor);
}
.notify-check.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (max-width: 560px) {
  .notify-matrix-row {
    grid-template-columns: 1fr 64px 72px;
    gap: 8px;
  }
}

/* 出口代理：检测结果显示在该行按钮下方 */
.pcheck-result{margin-top:6px;font-size:12.5px;text-align:right;line-height:1.5;min-height:0}
.pcheck-result:empty{display:none}
.pcheck-result.is-busy{color:var(--text-3)}
.pcheck-result.is-ok{color:var(--success)}
.pcheck-result.is-error{color:var(--danger)}
.pcheck-result .icon{vertical-align:-2px}
