/* ========================================
   HR Archetype 管理后台样式
   设计：深色侧边栏 + 浅色内容区 + 飘浮星星
   分区：变量 → 背景星空 → 布局 → 侧边栏 → 内容/面板 → KPI → 图表 → 表格 → 弹窗 → 管理员 → 响应式
   ======================================== */

/* ---- 管理后台 CSS 变量（覆盖 common 浅色变量） ---- */
:root {
  --ad-bg-dark: #0f0f1a;
  --ad-bg-dark-2: #1a1a2e;
  --ad-sidebar: rgba(16, 16, 30, 0.82);
  --ad-sidebar-solid: #14142a;
  --ad-content: rgba(247, 248, 250, 0.72);
  --ad-card: #ffffff;
  --ad-text-light: #ECECF1;
  --ad-text-light-soft: #A8A8B8;
  --ad-text-light-muted: #6E6E80;
  --ad-accent: #C9B79C;          /* 暖金强调色 */
  --ad-accent-2: #7D7867;
  --ad-danger: #E0484D;
  --ad-danger-hover: #C73E43;
  --ad-success: #2E7D32;
  --ad-border-dark: rgba(255, 255, 255, 0.08);
  --ad-border-light: #E8E8EC;
  --ad-shadow: 0 1px 3px rgba(15,15,30,0.04), 0 1px 2px rgba(15,15,30,0.06);
  --ad-shadow-hover: 0 12px 32px rgba(15,15,30,0.10), 0 4px 8px rgba(15,15,30,0.06);
  --ad-radius: 12px;
  --ad-radius-lg: 16px;
  --ad-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ad-trans: 0.35s var(--ad-ease);
}

/* ============ 背景与星空 ============ */
.admin-body {
  background: linear-gradient(135deg, var(--ad-bg-dark) 0%, var(--ad-bg-dark-2) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ad-text-light);
}

.stars-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  opacity: 0.6;
  filter: drop-shadow(0 0 8px rgba(201,183,156,0.45));
  transition: transform 0.6s var(--ad-ease);
  will-change: transform;
}
.star-1 { width: 56px; left: 22%;  top: 10%; animation: floatA 28s ease-in-out infinite; }
.star-2 { width: 36px; left: 52%;  top: 68%; animation: floatB 36s ease-in-out infinite; }
.star-3 { width: 70px; left: 76%;  top: 42%; animation: floatA 32s ease-in-out infinite reverse; }
.star-4 { width: 42px; left: 88%;  top: 85%; animation: floatB 24s ease-in-out infinite; }
.star-5 { width: 30px; left: 40%;  top: 24%; animation: floatA 40s ease-in-out infinite; opacity: 0.55; }
.star-6 { width: 48px; left: 63%;  top: 55%; animation: floatB 30s ease-in-out infinite reverse; opacity: 0.4; }
.star-7 { width: 34px; left: 90%;  top: 8%;  animation: floatA 34s ease-in-out infinite; opacity: 0.5; }
.star-8 { width: 40px; left: 33%;  top: 78%; animation: floatB 38s ease-in-out infinite; opacity: 0.4; }
.star-9 { width: 44px; left: 5%;   top: 30%; animation: floatA 33s ease-in-out infinite; opacity: 0.5; }
.star-10 { width: 32px; left: 15%; top: 60%; animation: floatB 27s ease-in-out infinite; opacity: 0.45; }

@keyframes floatA {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-26px) rotate(18deg); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(22px) rotate(-16deg); }
}

/* ============ 主布局 ============ */
.admin-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* ============ 侧边栏 ============ */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--ad-sidebar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-right: 1px solid var(--ad-border-dark);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 0 20px;
}

.sidebar-brand {
  padding: 0 24px 28px;
  border-bottom: 1px solid var(--ad-border-dark);
}
.brand-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--ad-text-light-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--ad-radius);
  color: var(--ad-text-light-soft);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--ad-trans), color var(--ad-trans), transform var(--ad-trans);
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--ad-accent);
  transition: transform var(--ad-trans);
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transform: translateX(2px);
}
.nav-item.active {
  background: rgba(201, 183, 156, 0.12);
  color: #fff;
}
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-text { letter-spacing: 0.02em; }

/* 权限不足的导航项 */
.nav-item-locked {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.nav-item-locked:hover { background: none; transform: none; }

.sidebar-footer {
  padding: 18px 16px 4px;
  border-top: 1px solid var(--ad-border-dark);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 12px;
}
.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ad-accent), var(--ad-accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.admin-info { display: flex; flex-direction: column; min-width: 0; }
.admin-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ad-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-role { font-size: 11px; color: var(--ad-text-light-muted); }

.side-link {
  font-size: 12px;
  color: var(--ad-text-light-muted);
  padding: 6px 8px;
  border-radius: var(--ad-radius);
  transition: color var(--ad-trans), background var(--ad-trans);
}
.side-link:hover { color: var(--ad-text-light); background: rgba(255,255,255,0.04); }

.logout-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--ad-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--ad-danger);
  background: rgba(224, 72, 77, 0.08);
  border: 1px solid rgba(224, 72, 77, 0.25);
  cursor: pointer;
  transition: background var(--ad-trans), border-color var(--ad-trans);
}
.logout-btn:hover {
  background: rgba(224, 72, 77, 0.18);
  border-color: rgba(224, 72, 77, 0.5);
}

/* ============ 内容区 ============ */
.content {
  flex: 1;
  min-width: 0;
  background: var(--ad-content);
  border-radius: 24px 0 0 0;
  padding: 32px 36px 48px;
  min-height: 100vh;
  color: var(--text);
  position: relative;
  z-index: 1;
}

/* TAB 面板切换动画 */
.tab-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ad-ease), transform 0.4s var(--ad-ease);
}
.tab-panel.active {
  display: block;
  animation: panelIn 0.45s var(--ad-ease) forwards;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-head { margin-bottom: 24px; }
.panel-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.panel-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============ KPI 卡片 ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.kpi-card {
  position: relative;
  background: var(--ad-card);
  border-radius: var(--ad-radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--ad-border-light);
  box-shadow: var(--ad-shadow);
  overflow: hidden;
  transition: transform var(--ad-trans), box-shadow var(--ad-trans);
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ad-shadow-hover);
}
.kpi-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.kpi-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  font-family: var(--font-serif);
}
.kpi-value.kpi-value-sm { font-size: 22px; }
.kpi-sub {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 8px;
}

/* 猫猫头装饰 */
.kpi-cat {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 56px;
  height: 56px;
  opacity: 0.5;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.06));
  transition: opacity var(--ad-trans), transform 0.6s var(--ad-ease);
}
.kpi-card:hover .kpi-cat {
  opacity: 0.85;
  animation: catWiggle 1.2s var(--ad-ease);
}
@keyframes catWiggle {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-8deg) translateY(-2px); }
  50% { transform: rotate(6deg) translateY(-3px); }
  75% { transform: rotate(-4deg) translateY(-1px); }
}

/* ============ 图表区 ============ */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.chart-card {
  background: var(--ad-card);
  border-radius: var(--ad-radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--ad-border-light);
  box-shadow: var(--ad-shadow);
}
.chart-full { grid-column: 1 / -1; }
.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.chart { width: 100%; height: 280px; }
.chart-tall { height: 340px; }

/* ============ 表格卡片 ============ */
.table-card {
  background: var(--ad-card);
  border-radius: var(--ad-radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--ad-border-light);
  box-shadow: var(--ad-shadow);
}

/* 工具栏 */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  opacity: 0.5;
  pointer-events: none;
}
.search-box input {
  padding: 9px 14px 9px 34px;
  border: 1px solid var(--ad-border-light);
  border-radius: var(--ad-radius);
  font-size: 13px;
  background: #f4f4f6;
  outline: none;
  width: 220px;
  transition: border-color var(--ad-trans), background var(--ad-trans), width var(--ad-trans);
}
.search-box input:focus { border-color: var(--text); background: #fff; width: 250px; }

.filter-select, .date-input {
  padding: 9px 12px;
  border: 1px solid var(--ad-border-light);
  border-radius: var(--ad-radius);
  font-size: 13px;
  background: #f4f4f6;
  outline: none;
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--ad-trans), background var(--ad-trans);
}
.filter-select:focus, .date-input:focus { border-color: var(--text); background: #fff; }
.date-sep { color: var(--text-muted); font-size: 13px; }

/* 工具按钮 */
.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--ad-radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--ad-border-light);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: all var(--ad-trans);
  white-space: nowrap;
}
.tool-btn:hover { border-color: var(--text); background: #f4f4f6; }
.tool-btn.primary { background: var(--text); color: #fff; border-color: var(--text); }
.tool-btn.primary:hover { background: #000; transform: translateY(-1px); }
.tool-btn.ghost { background: #f4f4f6; }
.tool-btn.ghost:hover { background: var(--ad-border-light); }
.tool-btn.danger { background: var(--ad-danger); border-color: var(--ad-danger); color: #fff; }
.tool-btn.danger:hover { background: var(--ad-danger-hover); border-color: var(--ad-danger-hover); transform: translateY(-1px); }
.tool-btn.block { width: 100%; margin-top: 6px; }

/* 表格容器 */
.table-wrap { overflow-x: auto; }
table.records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.records-table th {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 2px solid var(--ad-border-light);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.records-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--ad-border-light);
  color: var(--text-soft);
}
.record-row { cursor: pointer; transition: background var(--ad-trans); }
.records-table tr.record-row:hover td { background: #fafafa; }
.records-table tr.record-row.expanded td { background: #f6f6f8; }

.records-table th.col-check,
.records-table td.col-check { width: 40px; text-align: center; }
.records-table th.col-check input,
.records-table td.col-check input { cursor: pointer; }
.records-table td.col-id { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.records-table td.col-email { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.records-table td.col-time { white-space: nowrap; font-size: 12.5px; }
.records-table td.col-actions { white-space: nowrap; }
.records-table td.col-scores { white-space: nowrap; }

/* 类型色标 */
.type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-muted);
  color: var(--text);
}
.type-badge.type-C { background: #E8E4D9; color: #5C5446; }
.type-badge.type-B { background: #DCE4DC; color: #3E5641; }
.type-badge.type-A { background: #D9E2EC; color: #3A506B; }
.type-badge.type-P { background: #ECD9E2; color: #6B3A5A; }
.type-badge.type-E { background: #FDEBD3; color: #8A5A1A; }
.type-badge.type-I { background: #D9E8E8; color: #2E5C5C; }
.type-badge.type-N { background: #E0E0F0; color: #3F3F6B; }
.type-badge.type-S { background: #E2EDE2; color: #3A5A3A; }
.type-badge.type-T { background: #FCE4E4; color: #8A3A3A; }
.type-badge.type-F { background: #FBE6F0; color: #7A2E5A; }
.type-badge.type-J { background: #EDE5D8; color: #6B5A2E; }
.type-badge.type-X { background: var(--bg-muted); color: var(--text); }

/* 维度得分 chip */
.score-chip {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 4px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  background: #F0EDE5;
  color: #4A4636;
}
.score-chip.dim-C { background: #E8E4D9; color: #5C5446; }
.score-chip.dim-B { background: #DCE4DC; color: #3E5641; }
.score-chip.dim-A { background: #D9E2EC; color: #3A506B; }
.score-chip.dim-P { background: #ECD9E2; color: #6B3A5A; }

.subdim-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #E4DBC8;
  color: #5C5446;
  font-weight: 500;
}
.muted { color: var(--text-muted); font-size: 12.5px; }

/* 可展开详情行 */
tr.detail-row td { background: #f9f9fb; padding: 16px 24px; }
tr.detail-row:hover td { background: #f9f9fb; }
.subdim-detail { width: 100%; }
.subdim-detail-title { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.subdim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 14px;
}
.subdim-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid var(--ad-border-light);
  border-radius: 8px;
  font-size: 13px;
}
.subdim-name { color: var(--text-soft); }
.subdim-value { font-weight: 600; color: var(--text); }

/* 操作链接 */
.action-link {
  display: inline-block;
  padding: 4px 10px;
  margin-right: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--ad-trans);
  text-decoration: none;
}
.action-link:hover { color: var(--text); background: #f0f0f2; }
.action-link.danger { color: var(--ad-danger); }
.action-link.danger:hover { background: #FCE4E4; color: var(--ad-danger-hover); }
.action-link.danger:disabled { color: var(--text-muted); cursor: not-allowed; opacity: 0.5; }

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.page-btn {
  padding: 7px 16px;
  border: 1px solid var(--ad-border-light);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  transition: all var(--ad-trans);
}
.page-btn:hover:not(:disabled) { border-color: var(--text); background: #f4f4f6; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info { font-size: 12.5px; color: var(--text-muted); padding: 0 8px; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============ 管理员设置 ============ */
.admin-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  align-items: start;
}
.admin-card {
  background: var(--ad-card);
  border-radius: var(--ad-radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--ad-border-light);
  box-shadow: var(--ad-shadow);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.admin-form { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 12px; color: var(--text-soft); margin-top: 10px; margin-bottom: 4px; }
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ad-border-light);
  border-radius: 8px;
  font-size: 13px;
  background: #f4f4f6;
  outline: none;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--ad-trans), background var(--ad-trans);
}
.form-input:focus { border-color: var(--text); background: #fff; }
.form-input:disabled { background: var(--ad-border-light); color: var(--text-muted); cursor: not-allowed; }
.form-msg { font-size: 12.5px; min-height: 18px; margin-top: 8px; }
.form-msg.success { color: var(--ad-success); }

.avatar-upload { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.avatar-preview {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ad-accent), var(--ad-accent-2));
  color: #fff; font-weight: 600; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.6);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.form-msg.error { color: var(--ad-danger); }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--ad-border-light);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--ad-border-light);
  color: var(--text-soft);
}
.admin-table tr:hover td { background: #fafafa; }

.role-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.role-badge.role-super { background: #ECD9E2; color: #6B3A5A; }
.role-badge.role-admin { background: #D9E2EC; color: #3A506B; }
.self-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  background: var(--text);
  color: #fff;
  margin-left: 4px;
}

/* ============ Modal（scale + opacity 动画） ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 26, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ad-ease), visibility 0.3s var(--ad-ease);
  padding: 24px;
}
.modal-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-box {
  background: #fff;
  border-radius: var(--ad-radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(15, 15, 30, 0.24);
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  transition: transform 0.3s var(--ad-ease), opacity 0.3s var(--ad-ease);
}
.modal-overlay.active .modal-box { transform: scale(1) translateY(0); opacity: 1; }
.modal-box.modal-sm { max-width: 400px; }
.modal-box.modal-lg { max-width: 720px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--ad-border-light);
}
.modal-header h3 { font-size: 16px; font-weight: 600; color: var(--text); }
.modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--ad-trans);
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 22px 24px; }
.confirm-msg { font-size: 14px; color: var(--text-soft); line-height: 1.6; margin-bottom: 18px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ============ 登录页 ============ */
.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--ad-bg-dark) 0%, var(--ad-bg-dark-2) 100%);
  padding: 24px;
}
.login-card {
  background: #fff;
  border-radius: var(--ad-radius-lg);
  padding: 56px 44px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
}
.login-brand { font-size: 26px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.login-title { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.login-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 32px; }
.login-error { color: var(--ad-danger); font-size: 13px; margin-top: 12px; min-height: 18px; }
.login-back { display: inline-block; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.login-back:hover { color: var(--text); }
.login-hint {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--ad-border-light);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.login-hint code {
  background: #f4f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-soft);
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .admin-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
    overflow-x: auto;
  }
  .sidebar-brand { padding: 0 16px 0 0; border-right: 1px solid var(--ad-border-dark); border-bottom: none; }
  .sidebar-nav { flex-direction: row; padding: 0 12px; }
  .sidebar-footer { flex-direction: row; align-items: center; border-top: none; border-left: 1px solid var(--ad-border-dark); padding: 0 0 0 16px; }
  .admin-meta { padding: 0; }
  .admin-info { display: none; }
  .side-link { display: none; }
  .logout-btn { width: auto; padding: 8px 14px; }
  .content { border-radius: 0; padding: 24px 18px 40px; }
  .panel-title { font-size: 22px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 30px; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { flex-direction: column; align-items: stretch; }
  .search-box input { width: 100%; }
  .search-box input:focus { width: 100%; }
  .records-table { font-size: 12px; }
  .records-table th, .records-table td { padding: 8px 6px; }
  .records-table td.col-email { max-width: 120px; }
  .subdim-grid { grid-template-columns: 1fr; }
  .login-card { padding: 40px 28px; }
}
