/* ============ 电脑版布局 ============ */
.app { display: flex; height: 100vh; overflow: hidden; }

/* 侧边栏 */
.sidebar {
  width: 210px; background: #24443a; color: #cfe0d8; flex-shrink: 0;
  display: flex; flex-direction: column;
}
.side-logo {
  padding: 20px 18px; font-size: 16px; font-weight: bold; color: #fff;
  letter-spacing: 2px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.side-logo small { display: block; font-size: 10px; font-weight: normal; opacity: .6; letter-spacing: 3px; margin-top: 3px; }
.side-menu { flex: 1; padding: 12px 0; overflow-y: auto; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  font-size: 14px; cursor: pointer; transition: background .15s;
}
.menu-item:hover { background: rgba(255,255,255,.08); }
.menu-item.active { background: var(--primary); color: #fff; }
.menu-item .mi-icon { font-size: 16px; width: 20px; text-align: center; }
.side-foot { padding: 14px 18px; font-size: 11px; opacity: .5; border-top: 1px solid rgba(255,255,255,.1); }

/* 主区域 */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0;
}
.topbar .tb-title { font-size: 16px; font-weight: bold; }
.tb-user { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.tb-user .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary-light);
  color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: bold;
}
.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card); border-radius: 10px; padding: 18px 20px; border: 1px solid var(--border); }
.stat-card .sc-label { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.stat-card .sc-value { font-size: 26px; font-weight: bold; }
.stat-card .sc-extra { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.sc-green { color: var(--primary); }
.sc-red { color: var(--accent); }
.sc-blue { color: #2b6cb0; }
.sc-orange { color: var(--warn); }

.panel { background: var(--card); border-radius: 10px; border: 1px solid var(--border); margin-bottom: 20px; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: bold; font-size: 14px;
}
.panel-body { padding: 16px 18px; }

/* 工具条 & 表格 */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select, .toolbar input {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
}
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.data-table td.wrap { white-space: normal; min-width: 220px; }
.data-table thead th {
  background: #e3efe7; color: #1f4635; font-weight: bold; border-bottom: 2px solid #cfe0d8;
}
.data-table tbody tr:hover { background: #f6faf7; }
.data-table tfoot td { font-weight: bold; background: #f0f6f2; color: var(--accent); }
.empty-tip { text-align: center; color: var(--text-light); padding: 34px 0 !important; }

/* 登录页 */
.login-mask {
  position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(150deg, #24573f 0%, #2f6f4f 60%, #3e8a63 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-box {
  width: 380px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 36px 34px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-box h2 { text-align: center; font-size: 22px; margin-bottom: 4px; color: #24443a; }
.login-box .login-sub { text-align: center; font-size: 12px; color: var(--text-light); margin-bottom: 26px; letter-spacing: 1px; }
.login-error { color: var(--danger); font-size: 12px; text-align: center; min-height: 18px; margin-bottom: 6px; }
.login-box .btn-primary { width: 100%; justify-content: center; padding: 10px; font-size: 15px; }

/* 统计图表 */
.bar-chart { display: flex; align-items: flex-end; gap: 22px; height: 220px; padding: 10px 6px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-col .bar { width: 44px; background: linear-gradient(180deg, #4b9a72, var(--primary)); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; }
.bar-col .bar-val { font-size: 12px; color: var(--text-light); }
.bar-col .bar-label { font-size: 12px; color: var(--text-light); }
.rank-list .rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.rank-item .rk-no { width: 22px; height: 22px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.rank-item .rk-name { flex: 1; }
.rank-item .rk-val { font-weight: bold; color: var(--accent); }

/* 分页 */
.pager { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0 2px; font-size: 13px; }
.pager button { padding: 5px 12px; border: 1px solid var(--border); background: #fff; border-radius: 5px; }
.pager button.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:disabled { opacity: .4; cursor: default; }
