/* Dashboard - 全局样式 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; font-size: 13px; color: #333; background: #e9eaec; }
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }

/* ===== 侧边栏 ===== */
.dm-sidebar { position: fixed; top: 0; left: 0; width: 220px; height: 100vh; background: #2f4050; color: #a7b1c2; overflow-y: auto; z-index: 100; }
.dm-sidebar .dm-brand { height: 60px; line-height: 60px; padding: 0 20px; font-size: 18px; font-weight: 600; color: #fff; border-bottom: 1px solid #1f2d3d; background: #243443; }
.dm-sidebar ul { list-style: none; margin: 0; padding: 0; }
.dm-sidebar .dm-nav-item { display: block; padding: 12px 24px; color: #a7b1c2; cursor: pointer; border-left: 3px solid transparent; transition: all .2s; }
.dm-sidebar .dm-nav-item:hover { background: #293846; color: #fff; }
.dm-sidebar .dm-nav-item.active { background: #293846; color: #fff; border-left-color: #1ab394; }
.dm-sidebar .dm-nav-item .fa { width: 18px; margin-right: 8px; }
.dm-sidebar .dm-nav-sub { background: #25333f; }
.dm-sidebar .dm-nav-sub .dm-nav-item { padding-left: 48px; font-size: 12px; }

/* ===== 主区 ===== */
.dm-main { margin-left: 220px; min-height: 100vh; padding: 0; }
.dm-header { background: #fff; height: 60px; line-height: 60px; padding: 0 24px; border-bottom: 1px solid #e7eaec; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.dm-header .dm-title { font-size: 18px; font-weight: 600; color: #333; }
.dm-header .dm-user { color: #999; font-size: 13px; }

/* ===== 顶栏筛选 ===== */
.dm-filterbar { background: #fff; padding: 12px 24px; border-bottom: 1px solid #e7eaec; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dm-filterbar .dm-title-inline { font-size: 16px; font-weight: 600; color: #333; margin-right: 8px; }
.dm-filterbar .dm-tab-group { display: inline-flex; }
.dm-filterbar .dm-tab-group .btn { border-radius: 0; padding: 6px 14px; }
.dm-filterbar .dm-tab-group .btn:first-child { border-radius: 4px 0 0 4px; }
.dm-filterbar .dm-tab-group .btn:last-child { border-radius: 0 4px 4px 0; }
.dm-filterbar .dm-tab-group .btn.active { background: #1ab394; color: #fff; border-color: #1ab394; }
.dm-filterbar .dm-date-label { color: #999; }
.dm-filterbar .form-control { width: 150px; display: inline-block; }

/* ===== 内容区 ===== */
.dm-content { padding: 16px 24px 24px; }
.dm-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.dm-col { flex: 1; min-width: 0; }
.dm-col-1 { flex: 1; }
.dm-col-2 { flex: 2; }
.dm-col-3 { flex: 3; }

/* ===== 统计卡片 ===== */
.dm-stat-card { background: #fff; padding: 22px 24px; border-radius: 4px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04); border: 1px solid #e7eaec; }
.dm-stat-card .num { font-size: 32px; font-weight: 600; color: #1ab394; line-height: 1; margin-bottom: 8px; }
.dm-stat-card .label { color: #999; font-size: 13px; }

/* ===== 卡片容器 ===== */
.dm-panel { background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.04); border: 1px solid #e7eaec; margin-bottom: 16px; }
.dm-panel-head { padding: 12px 20px; border-bottom: 1px solid #e7eaec; display: flex; align-items: center; justify-content: space-between; }
.dm-panel-head .title { font-size: 15px; font-weight: 600; color: #333; }
.dm-panel-head .title::before { content: ''; display: inline-block; width: 3px; height: 14px; background: #1ab394; margin-right: 8px; vertical-align: -2px; border-radius: 2px; }
.dm-panel-body { padding: 16px 20px; }

/* ===== 子 tab 切换 ===== */
.dm-subtabs { padding: 0 20px 12px; border-bottom: 1px solid #f0f0f0; }
.dm-subtabs .nav-tabs { border-bottom: none; }
.dm-subtabs .nav-tabs > li > a { color: #666; padding: 6px 16px; border: none; border-bottom: 2px solid transparent; border-radius: 0; }
.dm-subtabs .nav-tabs > li.active > a, .dm-subtabs .nav-tabs > li > a:hover { background: transparent; color: #1ab394; border: none; border-bottom: 2px solid #1ab394; }

/* ===== 图表 ===== */
.dm-chart { width: 100%; height: 360px; }
.dm-chart-pie { height: 360px; }
.dm-chart-line { height: 320px; }

/* ===== 帮助中心 ===== */
.dm-help { padding: 0; }
.dm-help .dm-help-head { padding: 10px 20px; background: #1ab394; color: #fff; font-weight: 600; border-radius: 4px 4px 0 0; }
.dm-help .dm-help-body { padding: 16px 20px; }
.dm-help .announcement { background: #fffbe8; border: 1px solid #f7e8a3; padding: 8px 12px; border-radius: 3px; color: #d39e00; margin-bottom: 12px; font-size: 12px; }
.dm-help ul.dm-help-list { list-style: none; margin: 0; padding: 0; }
.dm-help ul.dm-help-list li { padding: 10px 0; border-bottom: 1px dashed #eee; color: #333; cursor: pointer; }
.dm-help ul.dm-help-list li::before { content: '·'; color: #1ab394; font-weight: bold; margin-right: 6px; }
.dm-help ul.dm-help-list li:hover { color: #1ab394; }

/* ===== 浮按钮 ===== */
.dm-fab-back { position: fixed; right: 0; top: 50%; transform: translateY(-50%); background: #1ab394; color: #fff; padding: 12px 8px; border-radius: 4px 0 0 4px; cursor: pointer; writing-mode: vertical-rl; font-size: 13px; z-index: 50; box-shadow: -2px 2px 6px rgba(0,0,0,.1); }

/* ===== 表格 ===== */
.dm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.dm-table th { background: #f5f7fa; color: #333; padding: 10px; text-align: left; border-bottom: 1px solid #e7eaec; font-weight: 600; }
.dm-table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
.dm-table tbody tr:hover { background: #f9fafb; }

/* ===== 个人信息页 ===== */
.dm-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; padding: 24px; }
.dm-info-grid .item { display: flex; }
.dm-info-grid .item .label { width: 110px; color: #999; }
.dm-info-grid .item .value { color: #333; flex: 1; }

/* ===== 水印 ===== */
.dm-watermark { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.dm-watermark .dm-wm-text { position: absolute; color: rgba(0,0,0,0.06); font-size: 16px; font-weight: 500; transform: rotate(-30deg); white-space: nowrap; user-select: none; }

/* ===== 子页面顶部条 ===== */
.dm-subnav { background: #fff; padding: 0 24px; border-bottom: 1px solid #e7eaec; }
.dm-subnav .nav-tabs { border-bottom: none; }
.dm-subnav .nav-tabs > li > a { color: #666; padding: 14px 20px; border: none; border-bottom: 2px solid transparent; border-radius: 0; }
.dm-subnav .nav-tabs > li.active > a, .dm-subnav .nav-tabs > li > a:hover { background: transparent; color: #1ab394; border: none; border-bottom: 2px solid #1ab394; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .dm-sidebar { transform: translateX(-100%); }
  .dm-main { margin-left: 0; }
  .dm-row { flex-direction: column; }
  .dm-info-grid { grid-template-columns: 1fr; }
}
