/* ==========================================================================
   火蜘蛛 CRM — 组件样式（黑白极简 + 卡片化 + 高密度表格，与对标站一致）
   ========================================================================== */

/* ---------- 应用骨架 ---------- */
.app-shell { display: flex; min-height: 100vh; }

.drawer {
  width: var(--drawer-w);
  flex: 0 0 var(--drawer-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: var(--z-drawer);
}
.drawer-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-color);
  flex: 0 0 auto;
}
.drawer-brand img { height: 26px; width: auto; display: block; }
.drawer-brand .fallback {
  width: 30px; height: 30px; border-radius: var(--radius-nav); background: var(--cta);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.drawer-foot { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--border-color); font-size: 11.5px; color: var(--text-muted); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
}
.topbar h1 { font-size: 16.5px; font-weight: var(--fw-semibold); margin: 0; letter-spacing: -.015em; }
.topbar .spacer { flex: 1 1 auto; }

.container { padding: 24px 26px 60px; max-width: 1520px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .t { font-size: 20px; font-weight: var(--fw-semibold); margin: 0 0 4px; letter-spacing: -.015em; }
.page-head .d { font-size: 13px; color: var(--text-secondary); margin: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 导航 ---------- */
.nav { padding: 12px 10px 20px; }
.nav-group-label {
  font-size: 10.5px; font-weight: var(--fw-semibold); letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted); padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; font-size: 13.5px; color: var(--text-primary);
  border-radius: var(--radius-nav); cursor: pointer; user-select: none;
  text-decoration: none; margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-subtle); text-decoration: none; }
.nav-item.active { background: var(--cta-soft); color: var(--cta); font-weight: var(--fw-semibold); }
.nav-item .ico { width: 18px; text-align: center; opacity: .85; font-size: 14px; }
.nav-item.active .ico { opacity: 1; }
.nav-item .badge-dot {
  margin-left: auto; background: var(--cta); color: #fff; font-size: 10px;
  padding: 1px 7px; border-radius: var(--radius-pill); font-weight: var(--fw-semibold);
}
.nav-sub { padding-left: 8px; }
.nav-sub .nav-item { padding: 8px 12px 8px 26px; font-size: 13px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--e1);
  overflow: hidden;
}
.card + .card { margin-top: 16px; }
/* 磨砂玻璃卡片（对标站登录卡实测：85% 白 + 20px 模糊 + 大扩散阴影 + 半透白描边） */
.card.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border);
  box-shadow: var(--e-glass);
  border-radius: var(--radius-card-lg);
}
.card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border-color);
  min-height: 54px;
}
.card-header h3 { font-size: 15px; font-weight: var(--fw-semibold); margin: 0; letter-spacing: -.01em; }
.card-header .sub { font-size: 12px; color: var(--text-secondary); }
.card-header .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.card-footer { padding: 13px 18px; border-top: 1px solid var(--border-color); display: flex; gap: 10px; align-items: center; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ---------- 统计卡 ---------- */
.stat {
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-card); padding: 16px 18px;
  box-shadow: var(--e1);
}
.stat-label {
  font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px;
}
.stat-value { font-size: 24px; font-weight: var(--fw-semibold); letter-spacing: -.022em; line-height: 1.2; }
.stat-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.stat.accent { border-left: 4px solid var(--cta); }

.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: var(--fw-semibold); padding: 2px 8px; border-radius: var(--radius-pill); }
.delta.up { color: var(--q-positive-ink); background: var(--q-positive-soft); }
.delta.down { color: var(--q-negative-ink); background: var(--q-negative-soft); }
.delta.flat { color: var(--text-secondary); background: var(--bg-subtle); }

/* ---------- 按钮 ----------
   尺寸与配色对齐对标站实测：高 41px、字号 14、字重 500、圆角 16px、
   主按钮绯红 #D70D24 + 同色辉光阴影。交互反馈（抬升/按压/涟漪/状态层）
   在 motion.css 里实现，这里只管静态形态。 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 41px; padding: 0 18px; border-radius: var(--radius-btn);
  border: 1px solid transparent; background: var(--bg-subtle); color: var(--text-primary);
  font-family: inherit; font-size: 14px; font-weight: var(--fw-medium);
  letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--cta-hover); }
.btn-primary:active:not(:disabled) { background: var(--cta-active); }
.btn-outline { background: transparent; border-color: var(--border-strong); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--q-negative); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b71c1d; }
.btn-success { background: var(--q-positive); color: #fff; }
.btn-success:hover:not(:disabled) { background: #3aa041; }
.btn-fire { background: var(--accent-fire, var(--cta)); color: #fff; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; border-radius: var(--radius-btn-sm); gap: 5px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: var(--radius-btn); }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-btn-sm); }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
/* 纯文字链接式按钮（对标站"忘记密码？"同款：无底色、行动色、圆角 16px） */
.btn-link {
  background: transparent; color: var(--cta); padding: 0 4px; height: auto;
  font-weight: var(--fw-medium); border-radius: var(--radius-btn);
}
.btn-link:hover:not(:disabled) { color: var(--cta-hover); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: var(--fw-medium); margin-bottom: 7px; color: var(--text-primary); }
.field-label .req { color: var(--cta); margin-left: 3px; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--border-color); border-radius: var(--radius-field);
  background: var(--bg-field); color: var(--text-primary);
  font-family: inherit; font-size: 14px; outline: none;
  box-shadow: inset 0 1px 2px rgba(20, 25, 30, .03);
}
.textarea { height: auto; min-height: 100px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--cta);
  box-shadow: var(--shadow-focus);
  background: var(--bg-surface);
}
.input:disabled, .select:disabled { opacity: .6; cursor: not-allowed; background: var(--bg-subtle); }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input.invalid, .select.invalid { border-color: var(--q-negative); box-shadow: 0 0 0 3px rgba(206, 31, 32, .14); }
.select { appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%), linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 19px) 19px, calc(100% - 14px) 19px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
.field-error { font-size: 12px; color: var(--q-negative); margin-top: 6px; }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-color);
  border-left: 0; border-radius: 0 var(--radius-field) var(--radius-field) 0;
  background: var(--bg-subtle); font-size: 12.5px; color: var(--text-secondary); white-space: nowrap;
}
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--cta); cursor: pointer; }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 11px 14px; background: var(--bg-subtle);
  font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg-subtle); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.table .center { text-align: center; }
.table .nowrap { white-space: nowrap; }
.table .actions-cell { white-space: nowrap; text-align: right; }
.table .clickable { cursor: pointer; }
.table-dense th { padding: 8px 12px; }
.table-dense td { padding: 9px 12px; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-badge);
  font-size: 11.5px; font-weight: var(--fw-semibold); white-space: nowrap;
  background: var(--bg-subtle); color: var(--text-secondary);
}
.badge-success { background: var(--q-positive-soft); color: var(--q-positive-ink); }
.badge-danger { background: var(--q-negative-soft); color: var(--q-negative-ink); }
.badge-warn { background: var(--q-warning-soft); color: var(--q-warning-ink); }
.badge-info { background: var(--q-info-soft); color: var(--q-info-ink); }
.badge-dark { background: var(--text-primary); color: #fff; }
.badge-cta { background: var(--cta-soft); color: var(--cta); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: var(--radius-tag);
  font-size: 11px; background: var(--bg-subtle); color: var(--text-secondary);
  margin-right: 4px; margin-bottom: 3px; border: 1px solid var(--border-color);
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.ok { background: var(--q-positive); }
.dot.warn { background: var(--q-warning); }
.dot.err { background: var(--q-negative); }
.dot.idle { background: var(--q-brand-grey-4); }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-color); overflow-x: auto; }
.tab {
  padding: 11px 16px; font-size: 13.5px; font-weight: var(--fw-medium);
  color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--cta); font-weight: var(--fw-semibold); }
.tab .cnt { font-size: 11px; background: var(--bg-subtle); padding: 1px 7px; border-radius: var(--radius-pill); margin-left: 5px; }

/* ---------- 顶部横向导航（后台）---------- */
.topnav { display: flex; align-items: center; gap: 2px; height: 100%; overflow-x: auto; }
.topnav-item {
  display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 14px; position: relative;
  font-size: 13.5px; color: var(--text-primary); cursor: pointer; white-space: nowrap;
  user-select: none; background: none; border: 0; font-family: inherit;
}
.topnav-item:hover { background: var(--bg-subtle); }
.topnav-item.active { font-weight: var(--fw-semibold); }
.topnav-item::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px;
  background: var(--cta); border-radius: 2px 2px 0 0;
  transform: scaleX(0); transition: transform var(--motion-dur) var(--motion-ease-out);
}
.topnav-item.active::after { transform: scaleX(1); }
.topnav-item .cnt {
  background: var(--cta); color: #fff; font-size: 10px; padding: 0 6px;
  border-radius: var(--radius-pill); font-weight: var(--fw-semibold);
}
.topnav-panel {
  position: absolute; top: var(--topbar-h); left: 0; right: 0;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-color);
  box-shadow: var(--e3); padding: 16px 26px 20px; z-index: var(--z-dropdown);
}
.topnav-panel-grid { display: grid; gap: 20px 34px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.topnav-col-title {
  font-size: 10.5px; font-weight: var(--fw-semibold); letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.topnav-link {
  display: block; padding: 7px 9px; margin-left: -9px; border-radius: var(--radius-nav);
  font-size: 13px; color: var(--text-primary); cursor: pointer; text-decoration: none;
}
.topnav-link:hover { background: var(--bg-subtle); text-decoration: none; }
.topnav-link.active { background: var(--bg-subtle); font-weight: var(--fw-semibold); color: var(--cta); }

/* ---------- 模态框 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20, 25, 30, .42);
  display: grid; place-items: center; padding: 24px; z-index: var(--z-modal);
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--bg-surface); border-radius: var(--radius-card);
  width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-3); overflow: hidden;
}
.modal.wide { max-width: 880px; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 12px; }
.modal-header h3 { margin: 0; font-size: 15.5px; font-weight: var(--fw-semibold); }
.modal-header .close { margin-left: auto; cursor: pointer; background: none; border: 0; font-size: 20px; line-height: 1; color: var(--text-secondary); padding: 2px 6px; border-radius: 6px; }
.modal-header .close:hover { background: var(--bg-subtle); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1 1 auto; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border-color); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  background: var(--bg-surface); border: 1px solid var(--border-color); border-left: 4px solid var(--q-primary);
  border-radius: 10px; padding: 12px 15px; box-shadow: var(--shadow-3);
  font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
}
.toast.success { border-left-color: var(--q-positive); }
.toast.error { border-left-color: var(--q-negative); }
.toast.warn { border-left-color: var(--q-warning); }
.toast .msg { flex: 1 1 auto; }
.toast .x { cursor: pointer; color: var(--text-muted); background: none; border: 0; font-size: 16px; line-height: 1; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border-color); flex-wrap: wrap; }
.pager .info { font-size: 12.5px; color: var(--text-secondary); }
.pager .pages { margin-left: auto; display: flex; gap: 5px; align-items: center; }
.pager .pg {
  min-width: 34px; height: 34px; padding: 0 10px; display: grid; place-items: center;
  position: relative; overflow: hidden;   /* 承载涟漪 */
  border: 1px solid var(--border-color); border-radius: var(--radius-nav); background: var(--bg-surface);
  font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text-primary);
  transition: background-color var(--motion-dur-fast) var(--motion-ease), color var(--motion-dur-fast) var(--motion-ease), border-color var(--motion-dur-fast) var(--motion-ease), transform var(--motion-dur-fast) var(--motion-ease);
}
.pager .pg:hover:not(:disabled) { background: var(--bg-subtle); border-color: var(--border-strong); }
.pager .pg:active:not(:disabled) { transform: translateY(1px); }
.pager .pg.active { background: var(--cta); color: #fff; border-color: var(--cta); font-weight: var(--fw-semibold); box-shadow: var(--cta-glow); }
.pager .pg:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 空状态 / 加载 ---------- */
.empty { padding: 56px 20px; text-align: center; color: var(--text-secondary); }
.empty .ico { font-size: 34px; opacity: .3; margin-bottom: 12px; display: flex; justify-content: center; }
.empty .t { font-size: 15px; font-weight: var(--fw-medium); color: var(--text-primary); margin-bottom: 5px; }
.empty .d { font-size: 13px; }

/* 骨架屏与加载指示器的动画在 motion.css（流光 / 旋转） */
.skeleton { background: var(--bg-subtle); border-radius: 8px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-color); border-top-color: var(--cta); border-radius: 50%; display: inline-block; }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--text-secondary); font-size: 13.5px; }

/* ---------- 进度条 ---------- */
.progress { height: 6px; background: var(--bg-subtle); border-radius: var(--radius-pill); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--cta); border-radius: var(--radius-pill); }

/* ---------- 提示条 ---------- */
.alert { border-radius: var(--radius-field); padding: 13px 16px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; }
.alert-info { background: var(--q-info-soft); border-color: #bfe9f3; color: var(--q-info-ink); }
.alert-warn { background: var(--q-warning-soft); border-color: #f6dcbb; color: var(--q-warning-ink); }
.alert-danger { background: var(--q-negative-soft); border-color: #f6c9c9; color: var(--q-negative-ink); }
.alert-success { background: var(--q-positive-soft); border-color: #c3e6cb; color: var(--q-positive-ink); }
.alert-dark { background: var(--bg-subtle); border-color: var(--border-color); color: var(--text-primary); }

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar .input, .filter-bar .select { height: 38px; width: auto; min-width: 150px; }
.filter-bar .grow { flex: 1 1 220px; min-width: 200px; }

/* ---------- 登录页 ----------
   对齐对标站登录页的视觉语言：冷灰蓝底（#F5F8FA）+ 磨砂玻璃卡（85% 白 /
   24px 圆角 / 0 8px 40px rgba(0,0,0,.2)）+ 绯红行动色按钮（带同色辉光）。
   左侧品牌区沿用其暗色板（--q-dark #2c3235）并加入极光呼吸动效。 */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg-page); }
.auth-side {
  background: var(--q-dark); color: #fff; padding: 56px 54px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
/* 极光：两团柔光缓慢呼吸，营造"活"的背景 */
.auth-side::before,
.auth-side::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(8px);
}
.auth-side::before {
  right: -150px; bottom: -150px; width: 440px; height: 440px;
  background: radial-gradient(circle, rgba(var(--cta-rgb), .30), rgba(var(--cta-rgb), .06) 55%, transparent 72%);
  animation: hz-aurora 4.5s var(--motion-ease) infinite;
}
.auth-side::after {
  left: -120px; top: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(103,232,249,.16), transparent 68%);
  animation: hz-aurora 6.5s var(--motion-ease) infinite reverse;
}
@keyframes hz-aurora {
  0%, 100% { opacity: .5; transform: scale(1) translate(0, 0); }
  50%      { opacity: 1;  transform: scale(1.22) translate(10px, -10px); }
}
.auth-side .logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; position: relative; z-index: 1; }
.auth-side .logo-row img { height: 30px; filter: invert(1) brightness(1.7); }
.auth-side h2 { font-size: 29px; line-height: 1.32; margin: 0 0 16px; font-weight: var(--fw-semibold); letter-spacing: -.022em; position: relative; z-index: 1; }
.auth-side p { color: rgba(255,255,255,.62); font-size: 14px; margin: 0 0 34px; max-width: 420px; position: relative; z-index: 1; }
.auth-side .feats { display: flex; flex-direction: column; gap: 15px; margin-top: auto; position: relative; z-index: 1; }
.auth-side .feat { display: flex; gap: 12px; align-items: flex-start; }
.auth-side .feat .n {
  width: 27px; height: 27px; flex: 0 0 27px; border-radius: var(--radius-nav); background: rgba(255,255,255,.10);
  display: grid; place-items: center; font-size: 12px; font-family: var(--font-mono);
  border: 1px solid rgba(255,255,255,.08);
}
.auth-side .feat .x { font-size: 13.5px; }
.auth-side .feat .d { font-size: 12.5px; color: rgba(255,255,255,.5); }

.auth-form-wrap { display: grid; place-items: center; padding: 44px 24px; background: var(--bg-page); position: relative; overflow: hidden; }
/* 表单区的柔光底，衬托玻璃卡 */
.auth-form-wrap::before {
  content: ''; position: absolute; top: -180px; right: -120px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--cta-rgb), .07), transparent 70%);
  pointer-events: none;
}
/* 磨砂玻璃卡：对标站实测 rgba(255,255,255,.85) / 24px / 0 8px 40px rgba(0,0,0,.2) */
.auth-form {
  width: 100%; max-width: 430px; position: relative; z-index: 1;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card-lg);
  box-shadow: var(--e-glass);
  padding: 34px 34px 30px;
}
.auth-form .head { margin-bottom: 26px; }
.auth-form h1 { font-size: 25px; margin: 0 0 7px; font-weight: var(--fw-semibold); letter-spacing: -.022em; }
.auth-form .sub { color: var(--text-secondary); font-size: 13.5px; margin: 0; }
.auth-form .row-between { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 20px; font-size: 13px; }
.auth-form .btn-block { height: 46px; font-size: 15px; letter-spacing: -.01em; }
/* 表单里的行动色文字链接（对标站"忘记密码？"同款） */
.auth-form a { color: var(--cta); font-weight: var(--fw-medium); }
.demo-hint {
  margin-top: 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius-field);
  padding: 13px 15px; font-size: 12.5px; color: var(--text-secondary);
  background: rgba(255,255,255,.6);
}
.demo-hint b { color: var(--text-primary); }
.demo-hint code { font-family: var(--font-mono); background: var(--bg-subtle); padding: 2px 6px; border-radius: var(--radius-tag); }

/* ---------- 图表 ---------- */
.chart-box { width: 100%; height: 190px; }
.chart-box svg { width: 100%; height: 100%; display: block; overflow: visible; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }

.barlist { display: flex; flex-direction: column; gap: 10px; }
.barlist .row { display: grid; grid-template-columns: 108px 1fr 64px; gap: 10px; align-items: center; font-size: 12.5px; }
.barlist .bar { height: 18px; background: var(--bg-subtle); border-radius: var(--radius-badge); overflow: hidden; }
.barlist .bar > i { display: block; height: 100%; background: var(--q-primary); border-radius: var(--radius-badge); }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* ---------- 详情布局 ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: 116px 1fr; gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; word-break: break-word; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--q-primary); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: var(--fw-semibold); flex: 0 0 34px;
}
.avatar.lg { width: 52px; height: 52px; font-size: 18px; flex-basis: 52px; }

.user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 9px; border-radius: 9px; }
.user-chip:hover { background: var(--bg-subtle); }
.user-chip .nm { font-size: 13px; font-weight: var(--fw-medium); line-height: 1.25; }
.user-chip .rl { font-size: 11px; color: var(--text-secondary); }

.dropdown { position: absolute; right: 20px; top: calc(var(--topbar-h) - 6px); background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-card); box-shadow: var(--shadow-3); min-width: 216px; padding: 6px; z-index: var(--z-dropdown); }
.dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.dropdown-item:hover { background: var(--bg-subtle); }
.dropdown-sep { height: 1px; background: var(--border-color); margin: 5px 0; }

/* ---------- 移动端 ---------- */
.bottom-nav { display: none; }
.drawer-toggle { display: none; }

@media (max-width: 980px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form-wrap { min-height: 100vh; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  /* 窄屏：玻璃卡退化为整页铺满，避免圆角与阴影在小屏上显得局促 */
  .auth-form-wrap { padding: 0; align-items: stretch; }
  .auth-form {
    max-width: none; border-radius: 0; border: 0; box-shadow: none;
    background: var(--bg-surface); min-height: 100vh;
    padding: 40px 22px 32px; display: flex; flex-direction: column; justify-content: center;
  }
  .toast-wrap { left: 12px; right: 12px; max-width: none; }
}

@media (max-width: 860px) {
  .drawer {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow-3);
  }
  .drawer.open { transform: translateX(0); }
  .drawer-toggle { display: inline-flex; }
  .container { padding: 16px 14px 90px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--bg-surface); border-top: 1px solid var(--border-color);
    z-index: var(--z-topbar); padding: 5px 0 7px;
  }
  .bottom-nav a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; color: var(--text-secondary); text-decoration: none; padding: 4px 0;
  }
  .bottom-nav a.active { color: var(--q-primary); font-weight: var(--fw-semibold); }
  .bottom-nav a .ico { font-size: 17px; }
  .grid-4, .grid-5 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .stat-value { font-size: 19px; }
  .topnav { gap: 0; }
  .topnav-item { padding: 0 10px; font-size: 12.5px; }
}

/* ---------- 工具类 ---------- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; } .text-lg { font-size: 16px; }
.text-muted { color: var(--text-secondary); } .text-faint { color: var(--text-muted); }
.text-pos { color: var(--q-positive); } .text-neg { color: var(--q-negative); }
.text-bold { font-weight: var(--fw-semibold); }
.text-right { text-align: right; } .text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hr { height: 1px; background: var(--border-color); margin: 16px 0; border: 0; }
.mono { font-family: var(--font-mono); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
