/* ============================================
   商企上门服务管理平台 - 全局样式
   ============================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-bg: #eff6ff;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #0891b2;
  --info-bg: #cffafe;
  --purple: #7c3aed;
  --purple-bg: #ede9fe;

  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --text: #1f2937;
  --text-2: #6b7280;
  --text-3: #9ca3af;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
img { max-width: 100%; }

/* ==================== 通用组件 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; transition: all .2s;
  user-select: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.97); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--border-light); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; outline: none; transition: border .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 状态徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.st-pending { background: var(--warning-bg); color: var(--warning); }
.st-progress { background: var(--primary-light); color: var(--primary); }
.st-review { background: var(--purple-bg); color: var(--purple); }
.st-done { background: var(--success-bg); color: var(--success); }
.st-reject { background: var(--danger-bg); color: var(--danger); }

.pr-high { background: var(--danger-bg); color: var(--danger); }
.pr-med { background: var(--warning-bg); color: var(--warning); }
.pr-low { background: var(--border-light); color: var(--text-2); }

/* 督办级别 */
.sup-normal { background: var(--border-light); color: var(--text-2); }
.sup-remind { background: var(--warning-bg); color: var(--warning); }
.sup-warn { background: #ffe4e6; color: #e11d48; }
.sup-critical { background: var(--danger); color: #fff; }

/* 任务类型标识 */
.task-type-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500;
}
.tt-info { background: #dbeafe; color: #2563eb; }
.tt-fault { background: #fee2e2; color: #dc2626; }
.tt-care { background: #ede9fe; color: #7c3aed; }
.tt-need { background: #dcfce7; color: #16a34a; }
.tt-comp { background: #fef3c7; color: #d97706; }

/* Toast */
.toast-container {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(92vw, 400px);
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: #fff; box-shadow: var(--shadow-lg);
  font-size: 14px; opacity: 0; transform: translateY(-10px);
  transition: all .3s; max-width: 100%;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  color: #fff; font-size: 12px; flex-shrink: 0;
}
.toast-success .toast-icon { background: var(--success); }
.toast-error .toast-icon { background: var(--danger); }
.toast-info .toast-icon { background: var(--info); }
.toast-warning .toast-icon { background: var(--warning); }

/* 空状态 */
.empty {
  text-align: center; padding: 48px 24px; color: var(--text-3);
}
.empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty .empty-text { font-size: 14px; }

/* 模态框 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .2s;
}
.modal {
  background: #fff; border-radius: var(--radius);
  width: min(560px, 100%); max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slideUp .25s;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close { font-size: 20px; color: var(--text-3); padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border-light);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ============================================
   移动端样式
   ============================================ */
.mobile-page {
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  background: var(--bg); position: relative;
  padding-bottom: 76px; /* 底部导航高度 */
}

/* 顶部栏 */
.m-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-md);
}
.m-header .m-title { font-size: 17px; font-weight: 600; }
.m-header .m-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.m-header .m-avatar { font-size: 28px; }

/* 登录页 */
.login-hero {
  background: linear-gradient(160deg, var(--primary) 0%, #3b82f6 60%, #60a5fa 100%);
  padding: 48px 24px 72px; text-align: center; color: #fff;
}
.login-hero .logo {
  width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255,255,255,.2); backdrop-filter: blur(8px);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 36px; margin-bottom: 16px;
}
.login-hero h1 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-hero p { font-size: 13px; opacity: .85; }

.login-card {
  margin: -48px 16px 24px; padding: 24px 20px;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
}
.login-tabs {
  display: flex; background: var(--border-light); border-radius: 10px;
  padding: 4px; margin-bottom: 20px;
}
.login-tabs .tab {
  flex: 1; text-align: center; padding: 8px;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--text-2); transition: all .2s;
}
.login-tabs .tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }

.demo-tip {
  margin: 0 16px 24px; padding: 12px 14px;
  background: var(--primary-bg); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text-2); line-height: 1.8;
}
.demo-tip b { color: var(--primary); }

/* 底部导航 */
.m-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; z-index: 100; padding-bottom: env(safe-area-inset-bottom);
}
.m-tabbar .tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 8px 0 6px; color: var(--text-3);
  font-size: 11px; transition: color .2s; text-decoration: none;
}
.m-tabbar .tab-item .tab-icon { font-size: 20px; line-height: 1; }
.m-tabbar .tab-item.active { color: var(--primary); font-weight: 500; }
.m-tabbar .tab-item .tab-badge {
  position: absolute; top: 2px; right: 50%; margin-right: -22px;
  background: var(--danger); color: #fff; font-size: 10px;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
/* 中央凸起Tab（主动上报） */
.m-tabbar .tab-item.tab-fab .tab-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center;
  margin-top: -18px; box-shadow: var(--shadow-md); border: 3px solid #fff;
}
.m-tabbar .tab-item.tab-fab .tab-label { font-size: 10px; }

/* 任务卡片 */
.task-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 12px; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.task-card:active { transform: scale(.98); }
.task-card .tc-top {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.task-card .tc-title { font-size: 15px; font-weight: 600; flex: 1; margin-right: 8px; }
.task-card .tc-meta {
  display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2);
}
.task-card .tc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-card .tc-footer {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.task-card.overdue .tc-deadline { color: var(--danger); font-weight: 600; }

/* 筛选标签 */
.filter-bar {
  display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  background: #fff; color: var(--text-2); white-space: nowrap;
  border: 1px solid var(--border); transition: all .2s;
}
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 统计概览（移动端首页） */
.m-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 0 16px; margin-bottom: 4px;
}
.m-stat {
  background: #fff; border-radius: var(--radius-sm); padding: 10px 4px;
  text-align: center; box-shadow: var(--shadow);
}
.m-stat .ms-num { font-size: 20px; font-weight: 700; }
.m-stat .ms-label { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.m-stat.blue .ms-num { color: var(--primary); }
.m-stat.orange .ms-num { color: var(--warning); }
.m-stat.green .ms-num { color: var(--success); }
.m-stat.purple .ms-num { color: var(--purple); }

/* 采集页面 */
.section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; margin: 16px 0 10px; padding: 0 16px;
}
.section-title::before {
  content: ''; width: 3px; height: 16px; border-radius: 2px;
  background: var(--primary); display: inline-block;
}

.loc-box {
  margin: 0 16px 16px; padding: 16px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center;
}
.loc-box .loc-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary-bg); display: inline-flex;
  align-items: center; justify-content: center; font-size: 28px;
  margin-bottom: 8px;
}
.loc-box .loc-status { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.loc-box .loc-detail { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.loc-box.locating .loc-icon { animation: pulse 1.2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.3); }
  50% { box-shadow: 0 0 0 14px rgba(37,99,235,0); }
}

.check-timeline {
  display: flex; align-items: center; margin: 16px 16px 0; padding: 16px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.ct-node { text-align: center; flex-shrink: 0; }
.ct-node .ct-dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 4px;
  background: var(--border-light); color: var(--text-3);
}
.ct-node.done .ct-dot { background: var(--success-bg); }
.ct-node .ct-label { font-size: 12px; color: var(--text-2); }
.ct-node .ct-time { font-size: 11px; color: var(--text-3); }
.ct-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px 20px; }
.ct-line.done { background: var(--success); }

/* 照片网格 */
.photo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 0 16px;
}
.photo-item { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item .photo-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.photo-add {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-3); font-size: 11px;
}
.photo-add .pa-icon { font-size: 24px; }

/* 表单卡片（移动端） */
.m-form-card {
  margin: 0 16px 16px; padding: 16px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}

.submit-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--border);
  z-index: 90;
}

/* 历史列表 */
.history-item {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin: 0 16px 12px;
}
.history-item .hi-top {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;
}
.history-item .hi-title { font-size: 14px; font-weight: 600; flex: 1; margin-right: 8px; }
.history-item .hi-meta { font-size: 12px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 10px; }
.history-item .hi-content {
  font-size: 13px; color: var(--text-2); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 个人中心 */
.profile-card {
  margin: 16px; padding: 20px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  border-radius: var(--radius); color: #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 14px;
}
.profile-card .pc-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.25); display: flex;
  align-items: center; justify-content: center; font-size: 30px;
}
.profile-card .pc-info { flex: 1; }
.profile-card .pc-name { font-size: 17px; font-weight: 600; }
.profile-card .pc-team { font-size: 12px; opacity: .85; margin-top: 2px; }

.menu-group { margin: 0 16px 16px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background .15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--border-light); }
.menu-item .mi-icon { font-size: 20px; width: 28px; text-align: center; }
.menu-item .mi-text { flex: 1; font-size: 14px; }
.menu-item .mi-arrow { color: var(--text-3); }

/* ============================================
   管理后台样式
   ============================================ */
.admin-layout {
  display: flex; min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 220px; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed;
  top: 0; bottom: 0; left: 0; z-index: 200;
}
.sidebar .sb-logo {
  padding: 20px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar .sb-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.sidebar .sb-logo .logo-text { font-size: 15px; font-weight: 700; }
.sidebar .sb-logo .logo-sub { font-size: 10px; color: var(--text-3); }

.sb-menu { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sb-menu .menu-label {
  font-size: 11px; color: var(--text-3); padding: 12px 10px 6px;
  text-transform: uppercase; letter-spacing: 1px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; cursor: pointer;
  margin-bottom: 2px; transition: all .15s; text-decoration: none;
}
.sb-item:hover { background: var(--primary-bg); color: var(--primary); }
.sb-item.active { background: var(--primary); color: #fff; font-weight: 500; }
.sb-item .sb-icon { font-size: 17px; width: 22px; text-align: center; }
.sb-item .sb-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
}

.sb-footer { padding: 14px; border-top: 1px solid var(--border-light); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; cursor: pointer; }
.sb-user:hover { background: var(--border-light); }
.sb-user .su-avatar { font-size: 26px; }
.sb-user .su-name { font-size: 13px; font-weight: 500; }
.sb-user .su-role { font-size: 11px; color: var(--text-3); }

/* 主区域 */
.admin-main {
  flex: 1; margin-left: 220px;
  display: flex; flex-direction: column; min-width: 0;
}
.admin-topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px;
  position: sticky; top: 0; z-index: 150;
}
.admin-topbar .at-title { font-size: 17px; font-weight: 600; }
.admin-topbar .at-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.admin-topbar .at-date { font-size: 13px; color: var(--text-2); }

.admin-content { padding: 24px; flex: 1; }

/* 页面标题行 */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.page-head h2 { font-size: 18px; font-weight: 600; }
.page-head .ph-actions { display: flex; gap: 10px; }

/* KPI 卡片 */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.kpi-card {
  background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi-card .kpi-icon {
  position: absolute; right: -6px; top: -6px; font-size: 72px; opacity: .07;
}
.kpi-card .kpi-label { font-size: 13px; color: var(--text-2); }
.kpi-card .kpi-value { font-size: 28px; font-weight: 700; margin: 4px 0; }
.kpi-card .kpi-trend { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.kpi-card .kpi-trend.up { color: var(--success); }
.kpi-card .kpi-trend.down { color: var(--danger); }
.kpi-card .kpi-trend.flat { color: var(--text-3); }

/* 图表卡片 */
.chart-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px;
}
.chart-card {
  background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.chart-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.chart-card .chart-body { height: 280px; position: relative; }
.chart-card.wide { grid-column: 1 / -1; }

/* 数据表格 */
.table-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.table-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
}
.table-toolbar .search-input {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  width: 220px; outline: none; transition: border .2s;
}
.table-toolbar .search-input:focus { border-color: var(--primary); }
.table-toolbar select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; outline: none;
}
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 11px 14px; background: var(--border-light);
  color: var(--text-2); font-weight: 500; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.data-table tr:hover td { background: #fafbfc; }
.data-table .td-actions { display: flex; gap: 6px; }
.table-empty { text-align: center; padding: 48px; color: var(--text-3); }

/* 分页 */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--border-light);
  font-size: 13px; color: var(--text-2);
}
.pagination .pg-btns { display: flex; gap: 6px; }
.pagination button {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: 13px;
}
.pagination button.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* 人员卡片 */
.worker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.worker-card {
  background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); text-align: center;
  transition: transform .15s;
}
.worker-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.worker-card .wc-avatar {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--primary-bg); display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.worker-card .wc-name { font-size: 15px; font-weight: 600; }
.worker-card .wc-team { font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.worker-card .wc-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding-top: 12px; border-top: 1px solid var(--border-light);
}
.worker-card .wc-stat .num { font-size: 16px; font-weight: 600; }
.worker-card .wc-stat .lbl { font-size: 11px; color: var(--text-3); }

/* 地图 */
.map-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 20px;
}
.map-card .map-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.map-card .map-header h3 { font-size: 15px; font-weight: 600; }
#adminMap, #taskMap { height: calc(100vh - 140px); min-height: 600px; width: 100%; z-index: 1; }
#miniMap { height: 220px; width: 100%; border-radius: var(--radius-sm); z-index: 1; }

.map-legend {
  position: absolute; bottom: 16px; right: 12px; z-index: 500;
  background: rgba(255,255,255,.94); border-radius: 8px;
  padding: 10px 12px; box-shadow: var(--shadow-md); font-size: 12px;
}
.map-legend .lg-item { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.map-legend .lg-dot { width: 10px; height: 10px; border-radius: 50%; }

/* 详情抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 900;
  animation: fadeIn .2s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 92vw);
  background: #fff; z-index: 901; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slideLeft .25s;
}
@keyframes slideLeft { from { transform: translateX(100%); } to { transform: none; } }
.drawer-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-header h3 { font-size: 16px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer {
  padding: 14px 20px; border-top: 1px solid var(--border-light);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* 详情字段 */
.detail-row {
  display: flex; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--border-light); font-size: 13px;
}
.detail-row .dr-label { width: 84px; color: var(--text-3); flex-shrink: 0; }
.detail-row .dr-value { flex: 1; color: var(--text); word-break: break-all; }

/* 评分星 */
.stars { color: #f59e0b; letter-spacing: 2px; }

/* 环比指示 */
.trend-tag { font-size: 12px; padding: 1px 6px; border-radius: 4px; }
.trend-tag.up { background: var(--success-bg); color: var(--success); }
.trend-tag.down { background: var(--danger-bg); color: var(--danger); }
.trend-tag.flat { background: var(--border-light); color: var(--text-2); }

/* 响应式 */
@media (max-width: 1024px) {
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .admin-content { padding: 14px; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .table-toolbar .search-input { width: 100%; }
}

/* ============================================
   V2 新增组件
   ============================================ */

/* 督办面板 */
.supervise-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  margin: 0 16px 12px; font-size: 13px;
}
.supervise-banner.warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.supervise-banner.critical { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* 任务类型选择器 */
.type-selector {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.type-selector .ts-item {
  text-align: center; padding: 12px 8px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: #fff; cursor: pointer;
  transition: all .15s;
}
.type-selector .ts-item .ts-icon { font-size: 24px; margin-bottom: 4px; }
.type-selector .ts-item .ts-name { font-size: 13px; font-weight: 500; }
.type-selector .ts-item.active { border-color: var(--primary); background: var(--primary-bg); }

/* 上报类型入口 */
.report-entry {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px;
}
.report-entry .re-card {
  border-radius: var(--radius); padding: 20px 16px; text-align: center;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  color: #fff;
}
.report-entry .re-card:active { transform: scale(.96); }
.re-card.re-need { background: linear-gradient(135deg, #16a34a, #22c55e); }
.re-card.re-comp { background: linear-gradient(135deg, #d97706, #f59e0b); }
.re-card .re-icon { font-size: 36px; margin-bottom: 8px; }
.re-card .re-title { font-size: 15px; font-weight: 600; }
.re-card .re-desc { font-size: 11px; opacity: .85; margin-top: 4px; }

/* 上报列表项 */
.report-item {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin: 0 16px 12px; cursor: pointer;
}
.report-item .ri-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.report-item .ri-title { font-size: 14px; font-weight: 600; flex: 1; margin-right: 8px; }
.report-item .ri-meta { font-size: 12px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 10px; }
.report-item .ri-content {
  font-size: 13px; color: var(--text-2); margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 竞对信息卡片 */
.competitor-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin: 0 16px 12px;
}
.competitor-card .cc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.competitor-card .cc-name { font-size: 15px; font-weight: 600; }
.competitor-card .cc-rows { font-size: 12px; color: var(--text-2); line-height: 1.9; }
.competitor-card .cc-rows .cc-label { color: var(--text-3); width: 64px; display: inline-block; }

/* 搜索结果 */
.search-result-section { margin-bottom: 20px; }
.search-result-section h4 { font-size: 13px; color: var(--text-2); margin-bottom: 8px; padding-left: 4px; }

/* 客户详情标签页 */
.customer-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-light); margin-bottom: 16px; }
.customer-tabs .ct-tab {
  padding: 10px 16px; font-size: 14px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all .15s;
}
.customer-tabs .ct-tab.active { color: var(--primary); border-color: var(--primary); font-weight: 500; }

/* 客户信息表 */
.customer-info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.customer-info-grid .ci-item {
  background: var(--border-light); border-radius: var(--radius-sm); padding: 12px;
}
.customer-info-grid .ci-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.customer-info-grid .ci-value { font-size: 14px; font-weight: 500; }

/* 信息完整度进度条 */
.completeness-bar {
  height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden;
}
.completeness-bar .cb-fill { height: 100%; background: var(--success); border-radius: 4px; transition: width .3s; }
