/* ===== CSS Variables & Reset ===== */
:root {
  --sidebar-width: 220px;
  --topbar-height: 60px;
  --bg: #f0f2f5;
  --white: #ffffff;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --sidebar-bg: #001529;
  --sidebar-hover: #002140;
  --sidebar-active: #1677ff;
  --text-primary: #1a1a2e;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --radius: 10px;
  --transition: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ================================================================
   登录页面
   ================================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 背景装饰 */
.login-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #001529 0%, #003472 40%, #1677ff 100%);
  z-index: 0;
}
.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: .08;
  background: #fff;
}
.shape1 { width: 500px; height: 500px; top: -180px; right: -120px; }
.shape2 { width: 300px; height: 300px; bottom: -80px; left: -60px; }
.shape3 { width: 200px; height: 200px; top: 40%; left: 60%; }

/* 登录卡片 */
.login-card {
  position: relative;
  z-index: 1;
  width: 400px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 44px 40px 36px;
  animation: cardSlideUp .5s ease;
}
@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo {
  font-size: 44px;
  margin-bottom: 10px;
}
.login-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
}
.login-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,119,255,.12);
}
.input-icon {
  padding: 0 12px;
  font-size: 16px;
  background: #fafafa;
  align-self: stretch;
  display: flex;
  align-items: center;
  border-right: 1px solid #d9d9d9;
}
.input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
}
.input-wrap input::placeholder { color: #bfbfbf; }

.form-error {
  font-size: 13px;
  color: #ff4d4f;
  min-height: 20px;
  margin-bottom: 6px;
  text-align: center;
}

/* 登录按钮 */
.login-btn {
  width: 100%;
  padding: 13px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 4px;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(22,119,255,.35);
}
.login-btn:hover {
  box-shadow: 0 6px 20px rgba(22,119,255,.45);
  transform: translateY(-1px);
}
.login-btn:active { transform: translateY(0); }

/* 登录页响应式 */
@media (max-width: 480px) {
  .login-card {
    width: 90vw;
    padding: 32px 24px 28px;
  }
}

/* ================================================================
   管理后台布局
   ================================================================ */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ---- 侧边栏 ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}
.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.logo-icon { font-size: 28px; }
.sidebar-logo h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-footer {
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
}
.nav-item:hover {
  color: #fff;
  background: var(--sidebar-hover);
}
.nav-item.active {
  color: #fff;
  background: var(--sidebar-active);
  border-left-color: #fff;
}
.nav-icon { font-size: 18px; }

/* ---- 主内容区 ---- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

/* 顶部栏 */
.topbar {
  height: var(--topbar-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; }
.topbar-left h1 { font-size: 18px; font-weight: 600; }
.subtitle { font-size: 13px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-time { font-size: 13px; color: var(--text-secondary); }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.user-name { font-size: 14px; }

/* 统计卡片 */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 24px 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}
.stat-card.card-blue::after  { background: #1677ff; }
.stat-card.card-green::after { background: #52c41a; }
.stat-card.card-orange::after { background: #fa8c16; }
.stat-card.card-purple::after { background: #722ed1; }

.stat-icon { font-size: 36px; }
.stat-info { display: flex; flex-direction: column; flex: 1; margin-left: 14px; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-value { font-size: 32px; font-weight: 700; color: var(--text-primary); }
.stat-trend {
  width: 100%;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.stat-trend.up  { color: #52c41a; }
.stat-trend.down { color: #ff4d4f; }
.stat-trend.warn { color: #fa8c16; }
.stat-trend.good { color: #722ed1; }

/* 内容网格 */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 28px 28px;
}
.panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-header h3 { font-size: 15px; font-weight: 600; }
.more-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}
.more-link:hover { text-decoration: underline; }
.panel-body { padding: 20px; }
.chart-container { width: 100%; height: 340px; }

/* 投诉列表 */
.complaint-list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
}
.complaint-list::-webkit-scrollbar { width: 5px; }
.complaint-list::-webkit-scrollbar-thumb {
  background: #d9d9d9; border-radius: 10px;
}
.complaint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background var(--transition);
  cursor: pointer;
}
.complaint-item:last-child { border-bottom: none; }
.complaint-item:hover { background: #fafafa; }

.cp-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  color: #fff;
}
.tag-bus      { background: #1677ff; }
.tag-post     { background: #52c41a; }
.tag-repair   { background: #fa8c16; }
.tag-danger   { background: #ff4d4f; }
.tag-taxi     { background: #722ed1; }
.tag-other    { background: #666; }

.cp-name {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}
.cp-status {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.status-pending    { background: #fff7e6; color: #fa8c16; }
.status-reminded   { background: #e6f7ff; color: #1677ff; }
.status-processing  { background: #f6ffed; color: #52c41a; }
.status-done       { background: #f6ffed; color: #52c41a; }

/* ---- 页面切换 ---- */
.page-section { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- 空白占位页 ---- */
.empty-page {
  display: flex; align-items: center; justify-content: center;
  height: 300px; font-size: 18px; color: var(--text-muted);
  background: var(--white); border-radius: var(--radius);
  margin: 24px 28px; box-shadow: var(--shadow);
}

/* ================================================================
   投诉管理 - 筛选栏
   ================================================================ */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 28px;
  background: var(--white);
  margin: 0 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-item label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.filter-item select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--transition);
  min-width: 130px;
}
.filter-item select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}
#btnQuery {
  padding: 8px 24px;
  font-size: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
#btnQuery:hover { background: #4096ff; }
#btnReset {
  padding: 8px 24px;
  font-size: 13px;
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
#btnReset:hover { border-color: var(--primary); color: var(--primary); }

/* ================================================================
   投诉管理 - 数据表格
   ================================================================ */
.table-panel {
  margin: 20px 28px 28px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead {
  background: #fafafa;
}
.data-table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--text-primary);
}
.data-table tbody tr {
  transition: background var(--transition);
}
.data-table tbody tr:hover {
  background: #fafafa;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 表格内状态标签 */
.status-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.status-tag.pending   { background: #fff7e6; color: #fa8c16; }
.status-tag.processing { background: #e6f7ff; color: #1677ff; }
.status-tag.done      { background: #f6ffed; color: #52c41a; }
.status-tag.reminded  { background: #f9f0ff; color: #722ed1; }

/* 领域标签（表格版） */
.industry-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
}
.industry-bus    { background: #1677ff; }
.industry-post   { background: #52c41a; }
.industry-repair { background: #fa8c16; }
.industry-danger { background: #ff4d4f; }
.industry-logistics { background: #722ed1; }
.industry-taxi   { background: #13c2c2; }

/* 查看按钮 */
.btn-view {
  padding: 4px 14px;
  font-size: 12px;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-view:hover {
  background: var(--primary);
  color: #fff;
}

/* 表格底部（分页） */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.table-info {
  font-size: 13px;
  color: var(--text-muted);
}
.table-info b { color: var(--text-primary); }
.pagination {
  display: flex;
  gap: 6px;
}
.page-btn {
  min-width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0 8px;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.page-btn:disabled {
  color: #d9d9d9;
  cursor: not-allowed;
  border-color: #d9d9d9;
}

/* ================================================================
   投诉详情页
   ================================================================ */
.detail-page {
  padding: 24px 28px 28px;
  animation: fadeIn .25s ease;
}
.breadcrumb {
  margin-bottom: 16px;
}
.breadcrumb-link {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb-link:hover { text-decoration: underline; }

.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.detail-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* 信息网格 */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.info-label {
  font-size: 13px;
  color: var(--text-muted);
}
.info-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* 投诉内容文本 */
.detail-content-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-indent: 2em;
}

/* 图片附件 */
.detail-images {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.image-placeholder {
  width: 140px;
  height: 140px;
  border: 2px dashed #d9d9d9;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  background: #fafafa;
}
.image-placeholder:hover {
  border-color: var(--primary);
  background: #e6f4ff;
}
/* 真实图片缩略图 */
.image-placeholder.real-image {
  border: 1px solid #e8e8e8;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
}
.image-placeholder.real-image:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(22,119,255,.2);
  transform: scale(1.03);
}
.image-placeholder-icon {
  font-size: 36px;
  margin-bottom: 4px;
}
.image-placeholder-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.image-placeholder-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.no-images {
  font-size: 14px;
  color: var(--text-muted);
  padding: 16px 0;
}

/* 办理操作区 */
.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  padding: 8px 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  background: #fff;
  transition: all .2s;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: #4096ff; border-color: #4096ff; }
.btn-success {
  background: #52c41a;
  color: #fff;
  border-color: #52c41a;
}
.btn-success:hover { background: #73d13d; border-color: #73d13d; }
.btn-warning {
  background: #fa8c16;
  color: #fff;
  border-color: #fa8c16;
}
.btn-warning:hover { background: #ffa940; border-color: #ffa940; }
.btn-default:hover { border-color: var(--primary); color: var(--primary); }
.done-msg {
  font-size: 15px;
  color: #52c41a;
  font-weight: 500;
  padding: 8px 0;
}

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-item select { width: 100%; }
  .data-table { font-size: 12px; }
  .data-table th,
  .data-table td { padding: 10px 8px; }
  .detail-info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .sidebar-logo h2,
  .nav-item span:last-child,
  .sidebar-footer .nav-item span:last-child { display: none; }
  .sidebar-logo { justify-content: center; padding: 0; }
  .nav-item { justify-content: center; padding: 13px 0; }
  .main-content { margin-left: 64px; }
  .stats-cards { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: 1fr; }
  .detail-page { padding: 16px; }
  .detail-card { padding: 16px; }
}

/* ================================================================
   系统设置页
   ================================================================ */
.settings-page {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-card-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.settings-card-info p {
  font-size: 13px;
  color: var(--text-muted);
}

/* 弹窗内编辑列表 */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.settings-row:last-child { border-bottom: none; }
.settings-row input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.settings-row input[type="text"]:focus {
  border-color: var(--primary);
}
.settings-row input[type="number"] {
  width: 60px;
  padding: 8px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  text-align: center;
}
.settings-row input[type="number"]:focus {
  border-color: var(--primary);
}
.settings-row .toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.settings-row .toggle-switch input {
  opacity: 0; width: 0; height: 0;
}
.settings-row .toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: .2s;
}
.settings-row .toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.settings-row input:checked + .toggle-slider {
  background: var(--primary);
}
.settings-row input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.settings-row .row-delete {
  width: 28px; height: 28px;
  border: none; background: transparent;
  color: #ff4d4f; font-size: 18px; cursor: pointer;
  border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.settings-row .row-delete:hover { background: #fff1f0; }

/* 宽弹窗 */
.modal-wide { max-width: 700px; }

/* 状态编辑行 */
.status-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.status-edit-row:last-child { border-bottom: none; }
.status-edit-row .status-color-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-edit-row input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.status-edit-row input[type="text"]:focus {
  border-color: var(--primary);
}

/* Modal overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  justify-content: center;
  align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--white);
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-size: 16px; }
.modal-close {
  width: 32px; height: 32px;
  border: none; background: transparent;
  cursor: pointer; font-size: 20px; color: #999;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #f5f5f5; color: #333; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* 统计分析页 */
.stats-page {
  padding: 0 28px 28px;
}
/* 覆盖投诉管理筛选栏的边距，使统计分析页左对齐 */
.stats-filter-bar {
  margin: 20px 0 !important;
}
.stats-growth-cards {
  padding: 0 0 24px 0 !important;
}
.stats-content-grid {
  padding: 0 !important;
}
.stats-growth-panel {
  margin-top: 20px;
}
.filter-date {
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  color: var(--text-primary);
}
.filter-date:focus {
  border-color: var(--primary);
}

/* 增长率表格 */
.growth-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.growth-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 8px;
}
.growth-row .gr-category {
  font-weight: 600;
  min-width: 100px;
  font-size: 14px;
}
.growth-row .gr-numbers {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}
.growth-row .gr-numbers span {
  white-space: nowrap;
}
.growth-row .gr-rate {
  font-size: 16px;
  font-weight: 700;
  min-width: 70px;
  text-align: right;
}
.growth-row .gr-rate.up { color: #52c41a; }
.growth-row .gr-rate.down { color: #ff4d4f; }
.growth-row .gr-rate.flat { color: #999; }
