/* server/public/admin.css 管理后台样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #F2F4F7;
  color: #1F2329;
  font-size: 14px;
}

/* 登录 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00C485, #009A66);
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px 32px;
  width: 360px;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.login-logo { font-size: 52px; text-align: center; }
.login-logo img { margin: 0 auto; }
.login-card h1 { font-size: 22px; margin: 12px 0 4px; }
.login-sub { color: #8A8F99; margin-bottom: 28px; font-size: 13px; }
.login-card input {
  width: 100%;
  height: 44px;
  border: 1px solid #E3E6EB;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
}
.login-card input:focus { border-color: #00B578; }
.login-tip { margin-top: 16px; color: #B8BEC9; font-size: 12px; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: #1F2A3A;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
}
.side-logo { padding: 24px 20px; font-size: 20px; font-weight: 700; }
.nav { flex: 1; padding: 8px 12px; }
.nav-item {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-bottom: 4px;
  font-size: 14px;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-item.active { background: #00B578; color: #fff; font-weight: 600; }
.side-foot { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.conn { display: block; font-size: 12px; margin-bottom: 10px; }
.conn-ok { color: #4ADE80; }
.conn-bad { color: #F87171; }

.main {
  flex: 1;
  margin-left: 220px;
  padding: 32px;
  max-width: 1280px;
}
.view-title { font-size: 22px; margin-bottom: 20px; }
.view-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.view-head .view-title { margin-bottom: 0; }

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(31, 35, 41, 0.05);
}
.stat-num { font-size: 32px; font-weight: 700; }
.stat-label { color: #8A8F99; margin-top: 6px; font-size: 13px; }
.stat-card.green .stat-num { color: #00B578; }
.stat-card.orange .stat-num { color: #FF8F1F; }
.stat-card.blue .stat-num { color: #3B6FE0; }
.stat-card.gray .stat-num { color: #8A8F99; }
.stat-card.purple .stat-num { color: #8B5CF6; }

/* 面板 */
.panel {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(31, 35, 41, 0.05);
}
.panel h3 { font-size: 16px; margin-bottom: 16px; }
.panel-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.foot-tip { color: #B8BEC9; font-size: 12px; }

/* 品类分布 */
.dist-chart { display: flex; flex-direction: column; gap: 10px; }
.dist-row { display: flex; align-items: center; gap: 12px; }
.dist-name { width: 100px; color: #5A6070; font-size: 13px; }
.dist-bar-wrap { flex: 1; background: #F2F4F7; border-radius: 6px; height: 22px; overflow: hidden; }
.dist-bar { height: 100%; background: linear-gradient(90deg, #00C485, #00A268); border-radius: 6px; min-width: 2px; }
.dist-num { width: 48px; text-align: right; color: #1F2329; font-weight: 600; }

/* 筛选 */
.filter-bar { display: flex; gap: 8px; }
.chip {
  border: 1px solid #E3E6EB;
  background: #fff;
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #5A6070;
}
.chip.active { background: #00B578; border-color: #00B578; color: #fff; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 12px 10px;
  border-bottom: 1px solid #F2F4F7;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}
.table th { color: #8A8F99; font-weight: 500; background: #FAFBFC; }
.table td.addr { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  background: #E6F7F1;
  color: #00B578;
}
.badge.gray { background: #F2F3F5; color: #8A8F99; }
.badge.orange { background: #FFF3E0; color: #FF8F1F; }
.badge.red { background: #FDE8E8; color: #FA5151; }
.money { color: #FF8F1F; font-weight: 600; }

/* 按钮 */
.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.btn-primary { background: #00B578; color: #fff; }
.btn-primary:hover { background: #009A66; }
.btn-ghost { background: transparent; border: 1px solid #D8DCE3; color: #5A6070; }
.btn-ghost:hover { border-color: #00B578; color: #00B578; }
.btn-danger { background: #fff; border: 1px solid #F5C6C6; color: #FA5151; }
.btn-danger:hover { background: #FDE8E8; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; height: 44px; font-size: 15px; }
.btn-mini { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.op-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.op-bar .btn { white-space: nowrap; }

/* 输入 */
.input {
  width: 100%;
  height: 42px;
  border: 1px solid #E3E6EB;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  margin-bottom: 14px;
}
.input:focus { border-color: #00B578; }
.textarea { height: auto; padding: 12px 14px; resize: vertical; }
.price-input { width: 120px; height: 34px; }

/* 公告列表 */
.notice-item {
  padding: 14px 0;
  border-bottom: 1px solid #F2F4F7;
}
.notice-item:last-child { border-bottom: none; }
.notice-title { font-weight: 600; }
.notice-time { color: #B8BEC9; font-size: 12px; margin-left: 10px; }
.notice-content { color: #5A6070; margin-top: 6px; line-height: 1.6; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: #fff; border-radius: 14px;
  padding: 28px; width: 360px;
}
.modal h3 { margin-bottom: 6px; }
.modal-sub { color: #8A8F99; font-size: 13px; margin-bottom: 16px; }
.modal label { display: block; font-size: 13px; color: #5A6070; margin-bottom: 6px; }
.modal .input { margin-bottom: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* toast */
.toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%);
  background: #1F2A3A; color: #fff;
  padding: 10px 22px; border-radius: 8px;
  font-size: 13px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.empty-tip { text-align: center; color: #B8BEC9; padding: 40px 0; }

@media (max-width: 900px) {
  .sidebar { width: 68px; }
  .side-logo { font-size: 14px; padding: 20px 10px; text-align: center; }
  .nav-item { font-size: 0; text-align: center; padding: 12px 0; }
  .nav-item::first-letter { font-size: 18px; }
  .main { margin-left: 68px; padding: 16px; }
}

/* ---------- 服务人员管理 ---------- */
.form-grid { display: flex; gap: 12px; margin-bottom: 14px; }
.form-grid .input { flex: 1; }
.form-label { font-size: 13px; color: #4E5969; margin: 10px 0 6px; }
.chk-group { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #1F2329; cursor: pointer; }
.chk input { accent-color: #00B578; }
.assign-select { margin-top: 6px; width: 100%; padding: 4px 6px; font-size: 12px; border: 1px solid #D9DDE3; border-radius: 6px; background: #fff; color: #1F2329; }

/* ---------- 新增：品类/代理/品牌/规则 ---------- */
.input-sm { width: 160px; flex: none; }
.select { appearance: auto; background: #fff; }
.badge.blue { background: #E8F0FE; color: #3B6FE0; }
.up-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.up-preview {
  width: 96px; height: 96px; object-fit: cover;
  border: 1px dashed #D8DCE3; border-radius: 10px;
  background: #FAFBFC; display: none;
}
.up-row input[type="file"] { font-size: 13px; color: #5A6070; }

