/* ============================================================
 * 管理后台样式
 * ============================================================ */
body { background: #f0f3f8; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }

.admin-shell { display: flex; min-height: 100vh; }

/* 侧边栏 */
.admin-sidebar {
  width: 232px; flex: none; background: #16203a; color: #aeb9d0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; gap: 10px; align-items: center; padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-badge {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
}
.sidebar-brand strong { color: #fff; font-size: 14px; display: block; }
.sidebar-brand small { color: #7c88a3; font-size: 11px; }

.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; }
.sidebar-nav .nav-item {
  display: flex; align-items: center; gap: 10px; color: #aeb9d0;
  padding: 11px 14px; border-radius: 9px; text-decoration: none;
  font-size: 14px; margin-bottom: 2px; transition: all .15s;
}
.sidebar-nav .nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav .nav-item.active { background: #2563eb; color: #fff; font-weight: 600; }
.nav-icon { width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto; background: #ef4444; color: #fff; font-size: 11px;
  min-width: 20px; height: 20px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; padding: 0 6px;
}
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot a { color: #7c88a3; font-size: 13px; text-decoration: none; }
.sidebar-foot a:hover { color: #fff; }

/* 主区域 */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  background: #fff; height: 58px; display: flex; align-items: center;
  padding: 0 22px; gap: 14px; box-shadow: 0 1px 4px rgba(20,40,90,.06);
  position: sticky; top: 0; z-index: 100;
}
.topbar-title { font-size: 17px; font-weight: 700; color: #1c2430; margin: 0; }
.admin-content { padding: 22px; flex: 1; }
.admin-footer { padding: 14px; text-align: center; color: #98a2b3; font-size: 12px; }

/* 卡片 */
.stat-card {
  background: #fff; border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(20,40,90,.05);
  display: flex; align-items: center; gap: 14px;
}
.stat-card .sc-icon {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.stat-card .sc-num { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-card .sc-label { font-size: 12px; color: #8b94a3; }

.panel {
  background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(20,40,90,.05);
  padding: 20px;
}
.panel-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* 表格 */
.table th { font-size: 13px; color: #6b7583; font-weight: 600; background: #f8fafc; }
.table td { font-size: 13.5px; vertical-align: middle; }

/* 状态徽章 */
.st { font-size: 12px; padding: 3px 10px; border-radius: 999px; display: inline-block; }
.st-on  { background: #dcfce7; color: #15803d; }
.st-off { background: #fee2e2; color: #b91c1c; }
.st-wait{ background: #fef3c7; color: #b45309; }

/* 地图标注预览（分类管理页） */
.org-marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--c, #2563eb); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.org-marker span { transform: rotate(45deg); font-size: 15px; line-height: 1; }

/* 简易富文本编辑器 */
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border: 1px solid #dee2e6; border-bottom: none; border-radius: 6px 6px 0 0; background: #f8fafc; }
.rte-toolbar button {
  border: 1px solid #d5dbe5; background: #fff; border-radius: 6px;
  min-width: 32px; height: 30px; font-size: 13px; padding: 0 8px;
}
.rte-toolbar button:hover { background: #eef3ff; }
#rteEditor {
  min-height: 300px; max-height: 520px; overflow-y: auto;
  border: 1px solid #dee2e6; border-radius: 0 0 6px 6px; padding: 14px;
  background: #fff; outline: none; line-height: 1.8;
}
#rteEditor:empty::before { content: attr(data-ph); color: #adb5bd; }
#rteEditor img { max-width: 100%; border-radius: 6px; }
#rteEditor h2 { font-size: 20px; margin: 14px 0 8px; }
#rteEditor h3 { font-size: 17px; margin: 12px 0 6px; }

/* 坐标拾取地图 */
#pickMap { height: 380px; border-radius: 10px; border: 1px solid #dee2e6; }

/* 登录页 */
.login-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #16203a 0%, #1e3a8a 50%, #2563eb 100%);
  padding: 20px;
}
.login-card {
  width: 400px; max-width: 100%; background: #fff; border-radius: 18px;
  padding: 34px 34px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo .brand-badge {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 700;
}

/* 响应式 */
@media (max-width: 991px) {
  .admin-sidebar {
    position: fixed; left: -240px; top: 0; z-index: 1000;
    transition: left .2s; height: 100vh;
  }
  .admin-sidebar.show { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .admin-content { padding: 14px; }
}
