/* ==========================================================================
   Portal Admin · 深色主题
   ========================================================================== */

:root {
  /* 主基调 */
  --bg:           #070b16;
  --bg-grad-1:    #0b1530;
  --bg-grad-2:    #060a14;
  --panel:        #0f1830;
  --panel-2:      #0c1428;
  --panel-3:      #0a1124;
  --border:       #1c2848;
  --border-soft:  #15203c;
  --border-glow:  rgba(52, 211, 153, 0.18);

  /* 文字 */
  --text:         #e8edf7;
  --text-dim:     #94a3b8;
  --text-mute:    #64748b;
  --text-faint:   #475569;

  /* 主色（emerald 系） */
  --brand:        #34d399;
  --brand-hi:     #6ee7b7;
  --brand-deep:   #0d9488;
  --brand-glow:   rgba(52, 211, 153, 0.20);
  --brand-soft:   rgba(52, 211, 153, 0.10);

  /* 状态色 */
  --info:         #60a5fa;
  --info-glow:    rgba(96, 165, 250, 0.18);
  --warn:         #f59e0b;
  --warn-glow:    rgba(245, 158, 11, 0.18);
  --danger:       #f43f5e;
  --danger-glow:  rgba(244, 63, 94, 0.18);

  /* 阴影 */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.3);
  --shadow:       0 8px 24px -8px rgba(0,0,0,.45);
  --shadow-lg:    0 24px 60px -12px rgba(0,0,0,.55);

  /* 时长 */
  --t-fast:  120ms;
  --t-base:  200ms;
  --t-slow:  320ms;
  --ease:    cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(52,211,153,.07), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(96,165,250,.05), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--brand-hi); }
code { font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace; }
::selection { background: var(--brand-glow); color: var(--text); }

/* ============ 布局 ============ */
.layout {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(15,24,48,.85) 0%, rgba(10,17,36,.95) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-brand .logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #051018;
  font-size: 17px;
  box-shadow:
    0 0 0 1px rgba(52,211,153,.4),
    0 8px 24px -8px var(--brand-glow);
  position: relative;
}
.sidebar-brand .logo::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.3) 0%, transparent 50%);
  pointer-events: none;
}
.sidebar-brand .name { font-weight: 600; font-size: 15px; letter-spacing: .2px; }
.sidebar-brand .desc { font-size: 11px; color: var(--text-mute); margin-top: 2px; letter-spacing: .5px; }

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px;
  margin-bottom: 2px;
  color: var(--text-dim);
  font-size: 13.5px;
  border-radius: 9px;
  position: relative;
  transition: all var(--t-base) var(--ease);
}
.sidebar-nav a:hover {
  background: rgba(52,211,153,.05);
  color: var(--text);
}
.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(52,211,153,.15) 0%, rgba(52,211,153,.04) 100%);
  color: var(--brand);
  font-weight: 500;
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 7px; bottom: 7px; width: 3px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--brand);
}
.sidebar-nav a .ico {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: .8;
  transition: opacity var(--t-fast);
}
.sidebar-nav a.active .ico { opacity: 1; }

.sidebar-user {
  padding: 14px;
  border-top: 1px solid var(--border-soft);
}
.user-card {
  display: flex; align-items: center; gap: 11px;
  padding: 11px;
  border-radius: 11px;
  background: rgba(15,24,48,.6);
  border: 1px solid var(--border-soft);
  transition: all var(--t-base);
}
.user-card:hover {
  border-color: var(--brand-glow);
  background: rgba(15,24,48,.85);
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #051018;
  font-size: 14px;
  box-shadow: 0 4px 14px -4px var(--brand-glow);
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status {
  font-size: 11px;
  color: var(--brand);
  display: flex; align-items: center; gap: 5px;
}
.user-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  animation: pulse 2s ease-in-out infinite;
}
.btn-logout {
  display: block;
  margin-top: 10px;
  text-align: center;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  border-radius: 9px;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--t-base);
}
.btn-logout:hover {
  background: rgba(244,63,94,.08);
  border-color: rgba(244,63,94,.4);
  color: var(--danger);
}

/* ============ 主区 ============ */
.main {
  padding: 26px 34px 36px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.crumb {
  font-size: 12px;
  color: var(--text-mute);
  display: flex; align-items: center; gap: 6px;
}
.crumb a { color: var(--text-mute); }
.crumb a:hover { color: var(--brand); }
.page-title {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: .3px;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  line-height: 1.2;
  transition: all var(--t-base) var(--ease);
  user-select: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-brand {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #051018;
  font-weight: 600;
  box-shadow: 0 4px 14px -4px var(--brand-glow);
}
.btn-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -6px var(--brand-glow);
  filter: brightness(1.05);
}
.btn-brand:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(15,24,48,.5);
  border-color: var(--border);
  color: var(--text-dim);
  padding: 7px 13px;
  font-size: 12.5px;
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--text);
  background: rgba(52,211,153,.06);
}

.btn-edit, .btn-qr, .btn-del {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 7px;
}
.btn-edit { background: var(--info-glow); color: var(--info); border-color: rgba(96,165,250,.3); }
.btn-edit:hover { background: rgba(96,165,250,.22); border-color: var(--info); }

.btn-qr   { background: var(--brand-soft); color: var(--brand); border-color: rgba(52,211,153,.3); }
.btn-qr:hover { background: rgba(52,211,153,.22); border-color: var(--brand); }

.btn-del  { background: var(--danger-glow); color: var(--danger); border-color: rgba(244,63,94,.3); }
.btn-del:hover { background: rgba(244,63,94,.22); border-color: var(--danger); }

/* ============ 卡片 ============ */
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  transition: border-color var(--t-base);
}
.card + .card { margin-top: 18px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: .2px;
}
.card-sub {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.6;
}

/* ============ KPI 卡 ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.kpi {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all var(--t-base) var(--ease);
}
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .35;
}
.kpi::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 120px at 100% 0%, var(--brand-soft), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.kpi:hover::after { opacity: 1; }
.kpi-icon {
  position: absolute;
  top: 18px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.kpi-label {
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 10px;
  font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  padding-right: 44px;
}
.kpi-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -.5px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-desc {
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.5;
}
.kpi.accent { border-color: rgba(52,211,153,.35); }
.kpi.accent .kpi-value {
  background: linear-gradient(135deg, var(--brand-hi), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ 表格 ============ */
.table-wrap {
  overflow-x: auto;
}
table.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.tb th {
  text-align: left;
  padding: 12px 14px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--panel-3);
  position: sticky;
  top: 0;
  z-index: 1;
}
table.tb td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  vertical-align: middle;
}
table.tb tr { transition: background var(--t-fast); }
table.tb tbody tr:hover { background: rgba(52,211,153,.04); }
table.tb tr:last-child td { border-bottom: none; }

.muted { color: var(--text-mute); }
.id-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--panel-3);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  font-size: 11.5px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  color: var(--text-dim);
}
.cell-title { font-weight: 500; font-size: 13.5px; }
.cell-sub { color: var(--text-mute); font-size: 11.5px; margin-top: 3px; }
.link-mono {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--brand);
  word-break: break-all;
  transition: color var(--t-fast);
}
.link-mono:hover { color: var(--brand-hi); }
.num-accent {
  color: var(--brand);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.num-info {
  color: var(--info);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
td.actions {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2px;
  border: 1px solid transparent;
}
.tag-on { background: var(--brand-soft); color: var(--brand); border-color: rgba(52,211,153,.3); }
.tag-on::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 6px var(--brand);
}
.tag-off { background: rgba(100,116,139,.15); color: var(--text-mute); border-color: rgba(100,116,139,.25); }
.tag-warn { background: rgba(245,158,11,.12); color: var(--warn); border-color: rgba(245,158,11,.3); }
.tag-danger { background: rgba(244,63,94,.12); color: var(--danger); border-color: rgba(244,63,94,.3); }

/* ============ 表单 ============ */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 7px;
  font-weight: 500;
  letter-spacing: .2px;
}
.input, .select, .textarea {
  width: 100%;
  background: var(--panel-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: all var(--t-base) var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  background: var(--panel-2);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.input::placeholder { color: var(--text-faint); }
.input:disabled { opacity: .55; cursor: not-allowed; }
.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.helper { font-size: 11px; color: var(--text-mute); margin-top: 5px; line-height: 1.4; }

.row { display: flex; gap: 14px; }
.row > * { flex: 1; min-width: 0; }
@media (max-width: 600px) { .row { flex-direction: column; gap: 0; } }

/* 搜索框（图标内嵌） */
.search-input {
  display: flex;
  align-items: center;
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  gap: 8px;
  transition: all var(--t-base);
  width: 220px;
}
.search-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.search-input svg { color: var(--text-mute); flex-shrink: 0; }
.search-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 9px 0;
  font-size: 13px;
  font-family: inherit;
  min-width: 0;
}
.search-input input::placeholder { color: var(--text-faint); }

/* ============ 模态 ============ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 20px;
  animation: fadeIn var(--t-base) var(--ease);
}
.modal {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: slideUp var(--t-slow) var(--ease);
}
.modal-lg { max-width: 720px; }
.modal h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.modal-sub { font-size: 12.5px; color: var(--text-mute); margin-bottom: 20px; line-height: 1.55; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

/* 分隔 */
.divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-mute); font-size: 11px;
  margin: 18px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border-soft);
}

/* ============ Check 列表（带绿色对勾） ============ */
.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding: 8px 0 8px 26px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  border-bottom: 1px solid var(--border-soft);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brand-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}
.check-list code {
  background: var(--panel-3);
  padding: 1px 7px;
  border-radius: 5px;
  color: var(--brand);
  font-size: 12px;
  border: 1px solid var(--border-soft);
}

/* ============ 提示 ============ */
.alert {
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: var(--brand-soft); color: var(--brand); border-color: rgba(52,211,153,.3); }
.alert-error { background: rgba(244,63,94,.08); color: var(--danger); border-color: rgba(244,63,94,.3); }
.alert-info { background: rgba(96,165,250,.08); color: var(--info); border-color: rgba(96,165,250,.3); }

/* ============ Toast ============ */
.toasts {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(15,24,48,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 11px 18px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  min-width: 240px;
  max-width: 360px;
  pointer-events: auto;
  animation: slideInRight var(--t-base) var(--ease);
  display: flex; align-items: center; gap: 10px;
}
.toast::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.toast.ok { border-color: rgba(52,211,153,.4); color: var(--brand); }
.toast.ok::before { background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.toast.err { border-color: rgba(244,63,94,.4); color: var(--danger); }
.toast.err::before { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* ============ Footer ============ */
.footer {
  text-align: center;
  padding: 28px 0 8px;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: .3px;
}

/* ============ Tab 切换（上传方式） ============ */
.tab-switch {
  display: flex;
  background: var(--panel-3);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  margin-bottom: 18px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-mute);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--t-base) var(--ease);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #051018;
  box-shadow: 0 2px 8px -2px var(--brand-glow);
}

/* ============ 文件拖入卡片 ============ */
.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px;
  background: var(--panel-3);
  border: 1.5px dashed var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: all var(--t-base);
  color: var(--text-dim);
}
.file-drop:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}
.file-drop input[type="file"] { display: none; }
.file-drop-name { font-size: 13.5px; font-weight: 500; color: var(--text); }
.file-drop-hint { font-size: 11.5px; color: var(--text-mute); }
.file-drop:hover .file-drop-name { color: var(--brand); }

/* ============ 二维码 ============ */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 0 6px;
}
.qr-box img {
  background: white;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.35);
}
.qr-link {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  color: var(--text-dim);
  word-break: break-all;
  padding: 10px 14px;
  background: var(--panel-3);
  border-radius: 9px;
  border: 1px solid var(--border-soft);
  width: 100%;
  text-align: center;
  line-height: 1.5;
}

/* ============ 分页 ============ */
.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.pager .info {
  color: var(--text-mute);
  font-size: 12px;
  margin-right: 10px;
}

/* ============ 图表 ============ */
.chart-wrap { height: 300px; position: relative; }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #2c3a5a; }

/* ============ 动画 ============ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.85); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 200px 1fr; }
  .main { padding: 22px 24px 28px; }
}
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; }
  .sidebar-brand { padding: 8px 12px 8px 0; border-bottom: none; border-right: 1px solid var(--border-soft); margin-right: 12px; }
  .sidebar-nav { display: flex; padding: 0; flex: 1; overflow-x: auto; }
  .sidebar-nav a { white-space: nowrap; margin: 0 2px; padding: 8px 12px; }
  .sidebar-nav a.active::before { display: none; }
  .sidebar-user { display: none; }
  .main { padding: 18px; }
  .topbar { gap: 10px; }
  .page-title { font-size: 18px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .modal { padding: 20px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  td.actions { flex-direction: column; align-items: stretch; }
  td.actions .btn { width: 100%; justify-content: center; }
}
