/* ============================================
   地图标注采集平台 - 管理后台样式
   ============================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: #1D2129;
  background: #F5F7FA;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ============================================
   布局
   ============================================ */
.admin-layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 220px;
  background: #FAFBFC;
  color: #4E5969;
  border-right: 1px solid #E5E6EB;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #E5E6EB;
}
.logo-icon { font-size: 32px; }
.logo-title {
  font-size: 16px;
  font-weight: 600;
  color: #1D2129;
  line-height: 1.2;
}
.logo-sub {
  font-size: 11px;
  color: #86909C;
  margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #4E5969;
  font-size: 14px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  background: rgba(15, 184, 169, 0.06);
  color: #1D2129;
}
.nav-item.active {
  background: rgba(15, 184, 169, 0.10);
  color: #0FB8A9;
  border-left-color: #0FB8A9;
}
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: currentColor;
}
.nav-icon svg { display: block; }
.nav-label { flex: 1; }

.nav-group { margin-top: 8px; }
.nav-group-title {
  padding: 8px 16px 4px;
  font-size: 11px;
  color: #86909C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid #E5E6EB;
}
.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #4E5969;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.2s;
}
.logout-btn:hover { background: rgba(245, 63, 63, 0.06); color: #F53F3F; }

/* 主区域 */
.main-area {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 顶部栏 */
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #E5E6EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.toggle-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 18px;
  color: #4E5969;
  transition: all 0.2s;
}
.toggle-btn:hover { background: #F2F3F5; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #86909C; }
.breadcrumb a { color: #4E5969; }
.breadcrumb a:hover { color: #0FB8A9; }
.breadcrumb span:last-child { color: #1D2129; font-weight: 500; }

.admin-info { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-name { font-size: 14px; color: #1D2129; }

/* 内容区 */
.content { flex: 1; padding: 20px 24px; }

/* ============================================
   通用组件
   ============================================ */

/* 卡片 */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #F2F3F5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; color: #1D2129; }
.card-body { padding: 20px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary { background: #0FB8A9; color: #fff; }
.btn-primary:hover { background: #0A8C82; }
.btn-success { background: #00B42A; color: #fff; }
.btn-danger { background: #F53F3F; color: #fff; }
.btn-warning { background: #FF7D00; color: #fff; }
.btn-default { background: #fff; color: #4E5969; border: 1px solid #E5E6EB; }
.btn-default:hover { border-color: #0FB8A9; color: #0FB8A9; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* 徽章 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: rgba(0,180,42,0.1); color: #00B42A; }
.badge-warning { background: rgba(255,125,0,0.1); color: #FF7D00; }
.badge-danger  { background: rgba(245,63,63,0.1); color: #F53F3F; }
.badge-info    { background: rgba(22,93,255,0.1); color: #165DFF; }
.badge-default { background: #F2F3F5; color: #86909C; }

/* 表格 */
.table-wrapper { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #F2F3F5;
}
.table th {
  background: #FAFBFC;
  font-weight: 600;
  color: #4E5969;
  font-size: 13px;
}
.table tr:hover td { background: #FAFBFC; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #1D2129;
  font-weight: 500;
}
.form-label .required { color: #F53F3F; margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E5E6EB;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
  background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #0FB8A9;
  box-shadow: 0 0 0 3px rgba(15,184,169,0.12);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  justify-content: flex-end;
}
.pagination .page-info { color: #86909C; font-size: 13px; }
.pagination .page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #E5E6EB;
  border-radius: 6px;
  background: #fff;
  color: #4E5969;
  font-size: 13px;
}
.pagination .page-btn:hover:not([disabled]) { border-color: #0FB8A9; color: #0FB8A9; }
.pagination .page-btn.active { background: #0FB8A9; color: #fff; border-color: #0FB8A9; }
.pagination .page-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #F2F3F5;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close { font-size: 20px; color: #86909C; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #F2F3F5;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 标签页 */
.tabs {
  display: flex;
  border-bottom: 2px solid #F2F3F5;
  margin-bottom: 20px;
}
.tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  color: #4E5969;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.tab:hover { color: #0FB8A9; }
.tab.active { color: #0FB8A9; border-bottom-color: #0FB8A9; font-weight: 500; }

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #1D2129;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 13px;
  color: #86909C;
  margin-top: 4px;
}
.stat-card .stat-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 36px;
  opacity: 0.15;
}
.stat-card.stat-pending { border-top: 3px solid #FF7D00; }
.stat-card.stat-marking { border-top: 3px solid #165DFF; }
.stat-card.stat-rejected { border-top: 3px solid #F53F3F; }
.stat-card.stat-completed { border-top: 3px solid #00B42A; }
.stat-card.stat-amount { border-top: 3px solid #0FB8A9; }

/* 快捷入口 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.quick-item {
  background: #FAFBFC;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.quick-item:hover {
  background: #fff;
  border-color: #0FB8A9;
  box-shadow: 0 2px 8px rgba(15,184,169,0.12);
}
.quick-item .quick-icon { font-size: 40px; margin-bottom: 8px; }
.quick-item .quick-label { font-size: 13px; color: #4E5969; }

/* 趋势图容器 */
.chart-container {
  height: 280px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* 工具栏 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 8px; }

.search-input {
  padding: 7px 12px;
  border: 1px solid #E5E6EB;
  border-radius: 6px;
  width: 220px;
  font-size: 14px;
}
.search-input:focus { outline: none; border-color: #0FB8A9; }

/* ============================================
   平台装修
   ============================================ */
.decoration-layout {
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  gap: 16px;
  height: calc(100vh - 92px);
}

.deco-panel {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.deco-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid #F2F3F5;
  font-size: 14px;
  font-weight: 600;
  color: #1D2129;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.deco-panel-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

/* 模块库 */
.module-library { display: flex; flex-direction: column; gap: 8px; }
.module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed #E5E6EB;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: #FAFBFC;
}
.module-item:hover {
  border-color: #0FB8A9;
  background: rgba(15,184,169,0.05);
}
.module-item .m-icon { font-size: 20px; }
.module-item .m-label { font-size: 13px; color: #4E5969; }

/* 画布（预览） */
.deco-canvas {
  background: #F5F7FA;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.deco-canvas-header {
  padding: 12px 16px;
  border-bottom: 1px solid #E5E6EB;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}
.deco-canvas-title { font-size: 14px; font-weight: 600; color: #1D2129; }
.deco-canvas-body {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

/* 手机预览框 */
.phone-preview {
  width: 320px;
  background: #fff;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 8px solid #1D2129;
  flex-shrink: 0;
}
.phone-status-bar {
  height: 32px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  color: #1D2129;
}
.phone-content {
  max-height: 600px;
  overflow-y: auto;
  background: #F5F7FA;
}

/* 装修模块在画布中的样式 */
.dm-block {
  position: relative;
  padding: 8px;
  margin: 8px 0;
  border: 2px dashed transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.dm-block:hover { border-color: rgba(15,184,169,0.3); background: rgba(15,184,169,0.03); }
.dm-block.selected { border-color: #0FB8A9; background: rgba(15,184,169,0.05); }
.dm-block .dm-actions {
  position: absolute;
  top: -10px;
  right: 8px;
  display: none;
  gap: 4px;
  z-index: 10;
}
.dm-block.selected .dm-actions,
.dm-block:hover .dm-actions { display: flex; }
.dm-block .dm-btn {
  width: 24px; height: 24px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #E5E6EB;
  font-size: 12px;
  color: #4E5969;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-block .dm-btn:hover { border-color: #F53F3F; color: #F53F3F; }

/* 轮播图 */
.dm-banner {
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #0FB8A9, #3DCCBF);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}
.dm-banner h2 { font-size: 20px; margin-bottom: 8px; }
.dm-banner p { font-size: 13px; opacity: 0.9; }

/* 单图 */
.dm-single {
  border-radius: 8px;
  overflow: hidden;
  height: 140px;
  background: linear-gradient(135deg, #FF7D00, #FFB43D);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}

/* 分类导航 */
.dm-category {
  background: #fff;
  padding: 12px 8px;
  border-radius: 8px;
}
.dm-category h3 {
  font-size: 14px;
  text-align: center;
  margin-bottom: 12px;
  color: #4E5969;
}
.dm-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.dm-cat-item {
  text-align: center;
  padding: 8px 4px;
}
.dm-cat-item .cat-icon { font-size: 28px; }
.dm-cat-item .cat-name { font-size: 11px; color: #4E5969; margin-top: 4px; }

/* 标题 */
.dm-title {
  text-align: center;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #1D2129;
}
.dm-title::before, .dm-title::after {
  content: '•';
  color: #0FB8A9;
  margin: 0 8px;
}

/* 功能特性 */
.dm-features {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
}
.dm-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid #F2F3F5;
}
.dm-feature-item:last-child { border-bottom: none; }
.dm-feature-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(15,184,169,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.dm-feature-text h4 { font-size: 13px; color: #1D2129; margin-bottom: 2px; }
.dm-feature-text p { font-size: 11px; color: #86909C; }

/* CTA 按钮 */
.dm-cta {
  text-align: center;
  padding: 16px;
}
.dm-cta-btn {
  display: inline-block;
  padding: 12px 36px;
  background: linear-gradient(135deg, #0FB8A9, #3DCCBF);
  color: #fff;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(15,184,169,0.3);
}

/* 属性面板 */
.prop-group { margin-bottom: 16px; }
.prop-label {
  font-size: 12px;
  color: #86909C;
  margin-bottom: 6px;
  display: block;
}
.prop-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #E5E6EB;
  border-radius: 6px;
  font-size: 13px;
}
.prop-input:focus { outline: none; border-color: #0FB8A9; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
  .decoration-layout { grid-template-columns: 1fr; height: auto; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
