/* ============ 全局变量 ============ */
:root {
  --c-bg: #f5f6f9;
  --c-card: #ffffff;
  --c-text: #1f2330;
  --c-text-2: #5a6275;
  --c-border: #e6e8ee;
  --c-primary: #d6336c;          /* 主色 红涨 */
  --c-primary-h: #b62a5b;
  --c-primary-soft: #fff0f6;
  --c-accent: #1c7ed6;
  --c-success: #2b8a3e;          /* 跌绿 / 成功 */
  --c-success-soft: #ebfbee;
  --c-warn: #d9480f;             /* 提醒橙 */
  --c-danger: #c92a2a;           /* 严重红 */
  --c-tag-bg: #eef0f4;
  --c-tag-text: #495057;
  --shadow: 0 8px 24px rgba(20,23,40,.06);
  --shadow-strong: 0 16px 40px rgba(20,23,40,.12);
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--c-text-2); font-size: 12px; }
.mb-12 { margin-bottom: 12px; } .mt-12 { margin-top: 12px; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 8px; }
.op-col { width: 160px; }

/* ============ 按钮 ============ */
.btn-primary, .btn-outline, .btn-ghost, .btn-warn, .btn-danger, .btn-block {
  font: inherit;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-h); border-color: var(--c-primary-h); }
.btn-outline { background: #fff; color: var(--c-text); border-color: var(--c-border); }
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-ghost { background: transparent; color: var(--c-text-2); border-color: transparent; }
.btn-ghost:hover { background: #eef0f4; }
.btn-warn { background: #fff4e6; color: var(--c-warn); border-color: #ffd8a8; }
.btn-warn:hover { background: #ffe8cc; }
.btn-danger { background: #fff5f5; color: var(--c-danger); border-color: #ffc9c9; }
.btn-danger:hover { background: #ffe3e3; }
.btn-block { width: 100%; }

.as-file { display: inline-flex; align-items: center; }

/* ============ 登录 ============ */
.login-layer {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #fff5f9 0%, #f6f8ff 60%, #eaf6ff 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  overflow: hidden;
}
/* 装饰光斑 */
.login-layer::before,
.login-layer::after {
  content: ''; position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .5; pointer-events: none;
  -webkit-animation: login-float 12s ease-in-out infinite;
}
.login-layer::before {
  width: 380px; height: 380px; top: -120px; left: -120px;
  background: radial-gradient(circle, rgba(214,51,108,.18) 0%, transparent 70%);
}
.login-layer::after {
  width: 460px; height: 460px; bottom: -160px; right: -160px;
  background: radial-gradient(circle, rgba(28,126,214,.18) 0%, transparent 70%);
  -webkit-animation-delay: -6s;
}
@keyframes login-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
}

.login-box {
  position: relative;
  width: 440px;
  max-width: 96vw;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow:
    0 20px 60px rgba(20, 23, 40, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  padding: 40px 36px 26px;
}

.login-brand {
  display: flex; gap: 14px; align-items: center; margin-bottom: 28px;
}
.brand-logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--c-primary), #ff6b9d);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(214,51,108,.35);
}
.login-brand h1 { margin: 0; font-size: 18px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--c-text-2); margin: 4px 0 0; }

.login-title {
  margin: 0 0 18px; font-size: 16px; font-weight: 600;
  padding-bottom: 12px; border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}

/* 登录字段(label + 输入框) */
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block; margin: 0 0 8px;
  color: var(--c-text); font-size: 13px; font-weight: 500;
}
.login-input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.login-input-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px; line-height: 1;
  pointer-events: none;
  filter: grayscale(0.3);
  opacity: .7;
}
.login-input-wrap input {
  flex: 1;
  width: 100%;
  height: 44px;
  padding: 0 44px 0 40px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 14px;
  transition: all .15s ease;
  background: #fff;
}
.login-input-wrap input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(214,51,108,.12);
}
.login-input-wrap input:focus + .login-pwd-toggle { color: var(--c-primary); }
.login-input-wrap input::placeholder { color: #b0b6c4; }

/* 密码可见切换 */
.login-pwd-toggle {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: 0;
  padding: 6px 8px; cursor: pointer;
  font-size: 16px; line-height: 1;
  color: #8a93a6;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none; appearance: none;
  transition: color .15s ease, background .15s ease;
}
.login-pwd-toggle:hover { background: #f6f7fb; }
.login-pwd-toggle:active { transform: translateY(-50%) scale(.95); }
.login-pwd-toggle.is-shown { color: var(--c-primary); }

/* 登录按钮 */
.btn-login {
  height: 46px;
  font-size: 15px; font-weight: 600; letter-spacing: 2px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary) 0%, #ff6b9d 100%);
  border: none;
  box-shadow: 0 6px 16px rgba(214,51,108,.25);
  margin-top: 20px;
  transition: all .2s ease;
  position: relative; overflow: hidden;
}
.btn-login:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(214,51,108,.32);
}
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled {
  opacity: .7; cursor: not-allowed;
  background: linear-gradient(135deg, #d99ea8, #f0b0c0);
  box-shadow: none;
}
.btn-login::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .6s ease;
}
.btn-login:hover::after { transform: translateX(100%); }

/* 错误提示 */
.login-error {
  background: #fff5f5; color: var(--c-danger);
  border: 1px solid #ffc9c9; border-radius: 8px;
  padding: 9px 12px; font-size: 13px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
  -webkit-animation: login-shake .35s ease;
}
.login-error::before {
  content: '⚠'; font-size: 14px;
}
@keyframes login-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 底部提示 */
.login-hint {
  text-align: center;
  margin: 16px 0 0;
  color: var(--c-text-2); font-size: 12px;
}
.login-hint code {
  background: var(--c-tag-bg); color: var(--c-primary);
  padding: 2px 6px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; font-weight: 600;
}

.login-foot { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--c-border); font-size: 11px; color: #97a0b3; text-align: center; }

/* 移动端登录页适配 */
@media (max-width: 500px) {
  .login-box { padding: 32px 24px 22px; border-radius: 16px; }
  .login-brand { margin-bottom: 22px; gap: 12px; }
  .brand-logo { width: 48px; height: 48px; font-size: 22px; border-radius: 14px; }
  .login-brand h1 { font-size: 16px; }
  .login-input-wrap input { height: 46px; font-size: 15px; }
  .btn-login { height: 48px; font-size: 16px; }
}

/* ============ 输入 ============ */
input, select, textarea {
  font: inherit; color: var(--c-text);
  padding: 8px 10px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(214,51,108,.12);
}
textarea { resize: vertical; }

/* ============ 顶栏 ============ */
.topbar {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; gap: 12px; align-items: center; }
.topbar-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), #ff6b9d);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.topbar-title { font-weight: 700; font-size: 15px; }
.topbar-sub { font-size: 11px; color: var(--c-text-2); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.me { display: flex; gap: 8px; align-items: center; padding: 4px 10px 4px 4px; border-radius: 24px; background: #f7f8fb; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c-primary-soft); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.me-name { font-size: 13px; font-weight: 600; }
.me-role { font-size: 11px; color: var(--c-text-2); }

/* ============ 主区域 ============ */
.main { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--c-border);
  padding: 14px 10px;
  display: flex; flex-direction: column;
  position: sticky; top: 60px; height: calc(100vh - 60px);
}
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--c-text-2); cursor: pointer; font-size: 14px;
  text-decoration: none;
}
.nav-item:hover { background: #f6f7fb; color: var(--c-text); }
.nav-item.active { background: var(--c-primary-soft); color: var(--c-primary); font-weight: 600; }
.nav-item .badge {
  margin-left: auto;
  background: var(--c-danger); color: #fff; font-size: 11px;
  padding: 1px 7px; border-radius: 10px; font-weight: 600;
}
.sidebar-foot { padding-top: 10px; border-top: 1px dashed var(--c-border); }

.content { flex: 1; padding: 22px 24px; min-width: 0; }
.view { display: block; }
.view.hidden { display: none; }
.view-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.view-header h2 { margin: 0; font-size: 20px; }
.actions { display: flex; gap: 8px; }

/* ============ 卡片 / KPI / 图表 ============ */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title { font-weight: 600; margin-bottom: 14px; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.kpi-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px;
}
.kpi-row.fin { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.kpi .label { font-size: 12px; color: var(--c-text-2); margin-bottom: 6px; }
.kpi .num { font-size: 24px; font-weight: 700; }
.kpi .num.up { color: var(--c-primary); }   /* 增长 = 红 */
.kpi .num.down { color: var(--c-success); }
.kpi .sub { font-size: 11px; color: var(--c-text-2); margin-top: 4px; }

.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row .name { width: 80px; font-size: 12px; color: var(--c-text-2); }
.bar-row .bar { flex: 1; height: 12px; background: #f0f2f6; border-radius: 6px; overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 6px; background: var(--c-primary); }
.bar-row .bar i.high { background: var(--c-primary); }
.bar-row .bar i.medium { background: #f59f00; }
.bar-row .bar i.low { background: #748196; }
.bar-row .val { width: 40px; text-align: right; font-weight: 600; }

.funnel { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.funnel-step {
  padding: 10px 14px; color: #fff; border-radius: 8px; display: flex;
  align-items: center; justify-content: space-between;
}
.funnel-step.s1 { background: #ffd8e4; color: var(--c-primary); }
.funnel-step.s2 { background: #f59f00; }
.funnel-step.s3 { background: #2b8a3e; }
.funnel-step .label { font-weight: 600; }
.funnel-step .num { font-weight: 700; }

/* trend canvas */
.card canvas { width: 100%; height: 220px; }

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-list .item {
  display: flex; gap: 12px; align-items: center; padding: 8px 12px;
  border-radius: 8px; background: #fafbfd;
}
.mini-list .item .nm { font-weight: 600; }
.mini-list .item .meta { color: var(--c-text-2); font-size: 12px; margin-left: auto; }

/* ============ 表格 ============ */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: #fff; padding: 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.filters input, .filters select { min-width: 120px; }
.filters #filterKeyword { flex: 1; min-width: 200px; }

.table-wrap {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: auto; box-shadow: var(--shadow);
}
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th, .data-table td {
  padding: 11px 12px; text-align: left;
  border-bottom: 1px solid #f0f2f6; white-space: nowrap;
}
.data-table thead th {
  background: #fafbfd; color: var(--c-text-2); font-weight: 600; font-size: 12px;
  position: sticky; top: 0; z-index: 1;
}
.data-table tbody tr:hover { background: #fafbff; }
.data-table .op { display: flex; gap: 6px; flex-wrap: wrap; }
.data-table td.money { color: var(--c-primary); font-weight: 600; font-variant-numeric: tabular-nums; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--c-tag-bg); color: var(--c-tag-text); font-size: 11px;
  margin-right: 4px;
}
.tag.intent-high { background: #fff0f6; color: var(--c-primary); }
.tag.intent-medium { background: #fff4e6; color: var(--c-warn); }
.tag.intent-low { background: #e9ecef; color: #868e96; }
.tag.status-new { background: #e3fafc; color: #0c8599; }
.tag.status-following { background: #e7f5ff; color: var(--c-accent); }
.tag.status-registered { background: var(--c-success-soft); color: var(--c-success); }
.tag.status-lost { background: #f1f3f5; color: #868e96; }
.tag.danger { background: #fff5f5; color: var(--c-danger); }

.pager {
  display: flex; gap: 8px; align-items: center; justify-content: flex-end;
  padding: 12px; color: var(--c-text-2); font-size: 12px;
}

.empty {
  padding: 60px 20px; text-align: center; color: var(--c-text-2);
}

/* ============ 时间线 ============ */
.timeline { display: flex; flex-direction: column; gap: 14px; padding: 4px; }
.tl-item {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; gap: 14px;
}
.tl-dot {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--c-primary-soft); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  flex-shrink: 0;
}
.tl-main { flex: 1; min-width: 0; }
.tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-title { font-weight: 600; }
.tl-meta { font-size: 12px; color: var(--c-text-2); margin-left: auto; }
.tl-content { margin-top: 6px; color: #2c3142; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.tl-tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tl-foot { margin-top: 6px; }

/* ============ 模态 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,23,40,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; padding: 16px;
}
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 700px; max-width: 96vw;
  box-shadow: var(--shadow-strong); display: flex; flex-direction: column;
  max-height: 92vh; overflow: hidden;
}
.modal.small { width: 420px; }
.modal.large { width: 880px; }
.modal-head {
  padding: 14px 18px; border-bottom: 1px solid var(--c-border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 15px;
}
.modal-head .x {
  background: transparent; border: none; font-size: 22px; line-height: 1;
  color: var(--c-text-2); cursor: pointer; padding: 0 6px;
}
.modal-head .x:hover { color: var(--c-danger); }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot {
  margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--c-border);
  display: flex; gap: 8px; justify-content: flex-end;
}

.tabs-modal {
  display: flex; gap: 4px; border-bottom: 1px solid var(--c-border); margin-bottom: 14px;
}
.tabs-modal .mt {
  padding: 8px 14px; background: transparent; border: none; cursor: pointer;
  color: var(--c-text-2); border-bottom: 2px solid transparent; font: inherit;
}
.tabs-modal .mt.active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }
.badge-mini { background: var(--c-primary-soft); color: var(--c-primary); padding: 1px 6px; border-radius: 8px; font-size: 11px; margin-left: 4px; }
.mt-pane { display: none; }
.mt-pane.active { display: block; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { font-size: 12px; color: var(--c-text-2); }
.form-row input, .form-row select, .form-row textarea { width: 100%; }

.follow-add {
  border: 1px dashed var(--c-primary); padding: 14px; border-radius: var(--radius);
  background: #fff8fb; margin-bottom: 14px;
}
.follow-add .form-row { margin-bottom: 8px; }
.follow-add .form-grid { gap: 8px 12px; }

.confirm-msg { padding: 6px 0 12px; line-height: 1.6; white-space: pre-wrap; }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: rgba(20,23,40,.92); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 13px;
  z-index: 999; box-shadow: var(--shadow-strong);
}

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d6d9e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aab0c0; }

/* ============ 侧边栏菜单分组线 ============ */
.nav-divider {
  height: 1px;
  background: var(--c-border);
  margin: 10px 0 6px;
}

/* ============ 移动端底部固定 Tab Bar ============ */
/* 桌面端(宽屏)始终隐藏; 由 JS 点击切换, 不依赖表单提交 */
.mobile-tabs,
.app-layer > .mobile-tabs,
.main ~ .mobile-tabs {
  display: none;
}

@media (max-width: 720px) {
  /* 桌面端侧边栏在手机端直接隐藏,改成底部 Tab 导航 */
  .sidebar {
    display: none !important;
  }
  .topbar-left { gap: 0; }
  .content { padding: 12px 12px 78px; } /* 底部 padding 给 tab bar 让位 */

  /* 底部 Tab Bar: 移出 .main 的 flex 容器, 避免被挤压错位 */
  .mobile-tabs,
  .app-layer > .mobile-tabs,
  .main ~ .mobile-tabs {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -2px 8px rgba(0,0,0,.04);
    z-index: 100;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
  }
  .mt-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8a93a6;
    text-decoration: none;
    font-size: 11px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    /* button 重置样式(微信 X5 内核 button 比 a 标签 click 可靠) */
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }
  .mt-tab span {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 3px;
  }
  .mt-tab b {
    font-weight: 500;
    font-size: 11px;
  }
  .mt-tab.active { color: var(--c-primary); }
  .mt-tab.active b { font-weight: 600; }
  .mt-tab:active { background: #f6f7fb; }

  /* 移动端: 隐藏指定列(桌面端完整显示) */
  .hide-on-mobile { display: none !important; }

  /* 移动端: 表格简化布局, 列少内容自然能完整显示 */
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 8px; }
  .data-table .col-name { font-weight: 600; min-width: 80px; }
  .data-table .col-project .tag { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
  .data-table .col-paid.money { font-size: 14px; }
  .data-table .op { gap: 4px; }
  .data-table .op .btn-ghost { padding: 6px 10px; font-size: 12px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}

/* ============ 个人信息页·管理员操作 ============ */
.profile-admin-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.pal:hover, .pal:active {
  background: #fafbfd;
  border-color: var(--c-primary);
}
.pal span { font-size: 22px; line-height: 1; }
.pal b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  flex: 1;
}
.pal small {
  font-size: 12px;
  color: var(--c-muted);
}
.pal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 0;
  border-top: 1px dashed var(--c-border);
  margin-top: 4px;
}
.pal-row label { font-size: 13px; color: var(--c-muted); }
.pal-row input {
  flex: 1;
  max-width: 100px;
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: 14px;
}

/* ============ 云端版 特有样式 ============ */
.api-status {
  background: #fff5f5;
  color: var(--c-danger);
  border-bottom: 1px solid #ffc9c9;
  padding: 10px 22px;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.busy-mask {
  position: fixed; inset: 0; background: rgba(20,23,40,.25);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.busy-box {
  background: #fff; padding: 18px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  display: flex; align-items: center; gap: 12px;
  font-size: 14px;
}
.spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid #f3d1de;
  border-top-color: var(--c-primary);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 在小屏幕，登录页账号卡单列显示 */
@media (max-width: 500px) {
  .seed-list { grid-template-columns: 1fr; }
}

/* ============ 权限说明卡片 ============ */
.my-perm-list {
  list-style: none; padding: 0; margin: 0;
}
.my-perm-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-border);
  font-size: 13px;
  color: var(--c-text);
  line-height: 1.5;
}
.my-perm-list li:last-child { border-bottom: none; }
.my-perm-list .pi {
  flex: 0 0 18px; height: 18px; line-height: 18px;
  text-align: center; font-size: 12px;
  border-radius: 50%; margin-top: 2px;
}
.my-perm-list .pi.yes { background: #d3f9d8; color: #2b8a3e; }
.my-perm-list .pi.no  { background: #ffe3e3; color: #c92a2a; }
.my-perm-list .pl-t { font-weight: 600; margin-bottom: 2px; }
.my-perm-list .pl-d { color: var(--c-text-2); font-size: 12px; }
.my-perm-list .pl-body { flex: 1; }

.perm-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.perm-table th, .perm-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-border);
  text-align: center;
}
.perm-table th { background: #f6f7fb; font-weight: 600; }
.perm-table td:first-child { text-align: left; }
.perm-table .pi { display: inline-block; }

/* 权限分配弹窗 */
.perm-intro { margin: 0 0 12px; font-size: 12px; line-height: 1.5; }
.perm-list { display: flex; flex-direction: column; gap: 8px; }
.perm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 10px;
  cursor: pointer; background: #fff; transition: background .15s;
}
.perm-row:hover { background: #f8f9fb; }
.perm-row input[type=checkbox] {
  width: 18px; height: 18px; accent-color: var(--c-primary); cursor: pointer;
  flex-shrink: 0;
}
.perm-row-body { flex: 1; }
.perm-row-body b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.perm-row-body small { color: var(--c-text-2); font-size: 12px; line-height: 1.4; }
