:root {
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-dark: #1d4ed8;
  --secondary: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --dark: #1e293b;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-100);
  line-height: 1.5;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航 */
.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 顶部当前机构节点徽章（合作管理入口专用） */
.topbar-org-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #99f6e4;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
  transition: all 0.18s ease;
}
.topbar-org-node i { color: #0d9488; font-size: 12px; }
.topbar-org-node:hover { background: #ccfbf1; border-color: #5eead4; }
.topbar-org-node.hidden { display: none !important; }

/* 顶部机构等级徽章 */
.org-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  margin-left: 6px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.logo i {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.community-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.community-selector i {
  color: var(--secondary);
}

.community-selector select {
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  outline: none;
  font-weight: 500;
}

.global-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.global-menu-dropdown {
  position: relative;
}

.global-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.global-menu-trigger:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
}

.global-menu-trigger i {
  font-size: 12px;
  color: var(--gray-500);
  transition: transform 0.2s;
}

.global-menu-dropdown.open .global-menu-trigger i {
  transform: rotate(180deg);
}

.global-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 360px;
  display: none;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 200;
  overflow: hidden;
}

.global-menu-panel-single {
  min-width: 180px;
}

.global-menu-dropdown.open .global-menu-panel {
  display: flex;
}

.global-menu-dropdown.open .global-menu-panel-single {
  display: block;
}

.global-menu-col {
  flex: 1;
  padding: 8px 0;
}

.global-menu-col + .global-menu-col {
  border-left: 1px solid var(--gray-100);
}

.global-menu-title {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
}

.global-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.global-menu-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.global-menu-list li:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.global-menu-list li.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.global-menu-list li i {
  width: 18px;
  text-align: center;
  color: inherit;
}

.global-menu-panel-project {
  min-width: 480px;
  flex-direction: row;
  display: none;
}

.global-menu-panel-project .global-menu-col-nav {
  flex: 0 0 140px;
  background: var(--gray-50);
  padding: 8px 0;
}

.global-menu-panel-project .global-menu-col-content {
  flex: 1;
  min-width: 280px;
  padding: 8px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.global-menu-panel-project .global-menu-col-content .project-menu-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.global-menu-panel-project .global-menu-col-content .project-menu-view.hidden {
  display: none;
}

.global-menu-panel-project .global-menu-col-content .project-list {
  flex: 1;
  overflow-y: auto;
}

.project-menu-view {
  padding: 8px 0;
}

.project-menu-view.hidden {
  display: none;
}

.project-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100);
}

.project-list-header .global-menu-title {
  padding: 0;
  flex-shrink: 0;
}

.project-list-header .project-search-box {
  margin: 0;
  flex: 1;
  max-width: 180px;
  min-width: 0;
}

.project-list-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.project-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.project-back-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.coop-expand {
  margin-left: auto;
  font-size: 12px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.coop-expand:hover {
  color: var(--primary);
  background: var(--gray-100);
}

.project-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 12px;
  padding: 6px 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.project-search-box i {
  font-size: 12px;
  color: var(--gray-500);
}

.project-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--gray-700);
  outline: none;
}

.project-list {
  max-height: 260px;
  overflow-y: auto;
}

.project-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-star {
  margin-left: auto;
  padding: 4px;
  font-size: 13px;
  color: var(--gray-400);
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
}

.project-star:hover {
  color: var(--warning, #f59e0b);
  transform: scale(1.15);
}

.project-star.active {
  color: #f59e0b;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}

.topbar-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.topbar-nav a i {
  font-size: 15px;
}

.topbar-nav a:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.topbar-nav a.active {
  background: var(--primary);
  color: var(--white);
}

/* ===== 角色选择页（工作台） ===== */
.role-select-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 24px 48px;
}

.role-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.role-select-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.role-select-brand > i {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  color: #fff;
  font-size: 26px;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

.role-select-brand h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
  line-height: 1.2;
}

.role-select-brand p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.role-select-tabs {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.role-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.role-tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
}

.role-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.role-select-tip {
  font-size: 16px;
  font-weight: 500;
  color: #334155;
  margin: 0 0 20px;
}

.role-group {
  margin-bottom: 28px;
}

.role-group.hidden {
  display: none;
}

.role-group-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  padding: 6px 14px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 20px;
}

.role-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.role-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.14);
  border-color: var(--primary);
}

.role-card:active {
  transform: translateY(0);
}

.role-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 24px;
  color: #fff;
}

.role-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.role-icon.green {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.25);
}

.role-name {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

.role-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.role-card.role-card-wb {
  border-color: #f59e0b;
}

.role-card.role-card-wb:hover {
  border-color: #f59e0b;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18);
}

.role-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* ===== 驾驶舱 ===== */
.cockpit-kpi {
  margin-bottom: 24px;
}

.cockpit-section {
  margin-bottom: 28px;
}

.cockpit-sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 4px 0 16px;
}

.cockpit-sec-title i {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--info));
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.cockpit-sec-title span {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
}

.cockpit-metrics {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 22px;
}

.cp-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.cp-metric-top b {
  color: var(--gray-900);
  font-size: 15px;
}

.cp-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--gray-100);
  overflow: hidden;
}

.cp-progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.cockpit-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 22px;
}

.cp-mini {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cp-mini i {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--gray-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.cp-mini div {
  display: flex;
  flex-direction: column;
}

.cp-mini b {
  font-size: 20px;
  color: var(--gray-900);
  line-height: 1.2;
}

.cp-mini span {
  font-size: 13px;
  color: var(--gray-500);
}

.cockpit-gauge {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
}

.cp-gauge {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}

.cp-gauge canvas {
  width: 100% !important;
  height: 100% !important;
}

.cp-gauge-legend p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-600);
  margin: 0 0 10px;
}

.cp-gauge-legend b {
  color: var(--gray-900);
}

.cp-gauge-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.cp-gauge-legend .cp-tip {
  font-size: 12px;
  color: #b45309;
  background: #fef3c7;
  padding: 6px 10px;
  border-radius: var(--radius);
  margin-top: 4px;
}

.cockpit-rank {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cp-rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-700);
}

.cp-rank-row span {
  width: 72px;
  flex-shrink: 0;
}

.cp-rank-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--gray-100);
  overflow: hidden;
}

.cp-rank-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.cp-rank-row b {
  width: 44px;
  text-align: right;
  color: var(--gray-900);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  width: 280px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  width: 100%;
  color: var(--gray-700);
}

.search-box input::placeholder {
  color: var(--gray-400);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  font-size: 16px;
}

.icon-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: var(--white);
  font-size: 11px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s;
}

.user-profile:hover {
  background: var(--gray-50);
}

.user-profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-name {
  font-weight: 600;
  color: var(--gray-800);
}

.user-role {
  font-size: 12px;
  color: var(--gray-500);
}

/* 主布局 */
.main-layout {
  display: flex;
  margin-top: var(--topbar-height);
  min-height: calc(100vh - var(--topbar-height));
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  z-index: 99;
}

.sidebar.hidden {
  display: none;
}

.nav-menu {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--gray-600);
  text-decoration: none;
  margin-bottom: 4px;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-item i {
  width: 22px;
  text-align: center;
  font-size: 16px;
}

.nav-item:hover {
  background: var(--gray-50);
  color: var(--primary);
}

.nav-item.active:not(.nav-subitem) {
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-subitem.active {
  box-shadow: none;
}

/* 基础管理 - 可展开子菜单 */
.nav-group {
  margin-bottom: 4px;
}

.nav-group-header {
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.nav-group-header .nav-group-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.2s;
}

.nav-group.open > .nav-group-header .nav-group-arrow {
  transform: rotate(180deg);
}

.nav-submenu {
  display: none;
  padding: 4px 0;
}

.nav-group.open > .nav-submenu {
  display: block;
}

.nav-subitem {
  padding: 9px 14px 9px 52px;
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 2px;
}

.nav-subitem.nested-subitem {
  padding-left: 72px;
  font-size: 12px;
}

.nav-subitem:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.nav-subitem i {
  width: 16px;
  font-size: 13px;
  color: var(--gray-400);
  margin-right: 10px;
}

.nav-subitem:hover i {
  color: var(--gray-500);
}

.nav-group.active > .nav-group-header {
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-subitem.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 12px 8px;
}

/* 侧边栏折叠开关 */
.sidebar-toggle {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 56px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  font-size: 10px;
  padding: 0;
  transition: background 0.2s;
}
.sidebar-toggle:hover {
  background: var(--primary-dark);
}
.app.sidebar-collapsed .sidebar-toggle i {
  transform: rotate(180deg);
}

/* 侧边栏折叠状态 */
.app.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
}
.app.sidebar-collapsed .content {
  margin-left: var(--sidebar-collapsed-width);
}
.app.sidebar-collapsed .nav-menu {
  padding: 16px 0;
}
.app.sidebar-collapsed .nav-item {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}
.app.sidebar-collapsed .nav-item > span,
.app.sidebar-collapsed .nav-group-arrow {
  display: none;
}

/* 折叠后子菜单以浮层形式展示 */
.app.sidebar-collapsed .nav-group {
  position: relative;
}
.app.sidebar-collapsed .nav-submenu {
  display: none !important;
  position: absolute;
  left: var(--sidebar-collapsed-width);
  top: 0;
  min-width: 170px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 4px 0;
  z-index: 101;
}
.app.sidebar-collapsed .nav-group:hover > .nav-submenu,
.app.sidebar-collapsed .nav-group.open:hover > .nav-submenu {
  display: block !important;
}
/* 折叠态下：点击分组图标（toggle open）后固定展开子菜单，便于点击进入子项 */
.app.sidebar-collapsed .nav-group.open > .nav-submenu {
  display: block !important;
}
.app.sidebar-collapsed .nav-subitem {
  padding: 9px 14px;
  font-size: 13px;
}

/* 内容区 */
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px;
  min-height: calc(100vh - var(--topbar-height));
}

.page {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page.active {
  display: block;
}

/* 修复：因 HTML 未闭合标签导致 platform-* 页面被浏览器解析器挤到 body 级别
   用 fixed 定位完全脱离文档流，精确定位到 sidebar 右侧 + topbar 下方 */
body > .page[id^="platform-"] {
  position: fixed;
  top: var(--topbar-height);
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 24px;
  background: var(--gray-100);
  box-sizing: border-box;
  z-index: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 24px;
}

.page-header-card {
  background: var(--white, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* 头部卡片 + 双栏布局：左卡顶端与右内容顶端严格对齐 */
/* 机构列表页：左右两栏严格等高，左卡 background 撑满到右表格区底部 */
#orgListLayout { align-items: stretch; }
#orgListLayout .ml-side,
#orgListLayout .ml-main { align-self: stretch; }
#orgListLayout .stats-grid { margin-top: 0; }
#orgListLayout .ml-side {
  display: flex;
  flex-direction: column;
}
#orgListLayout .ml-side-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#orgListLayout .ml-side-list {
  flex: 1 1 auto;
}

/* 我的机构：统计卡片全宽铺满 + 左栏（机构范围）与列表栏（表格）等高 */
#coopMyorgLayout { align-items: stretch; }
#coopMyorgLayout .ml-side { height: auto; }
#coopMyorgLayout .ml-side-card { flex: 1 1 auto; }
#myorgInstStats { margin-top: 16px; }

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--gray-500);
  font-size: 14px;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page-actions .btn,
.page-actions .status-filter-wrap,
.page-actions-group {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

.page-actions-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 应用商城操作栏：强制一行显示，元素紧凑不截断 */
.app-store-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
}
.app-store-actions .btn {
  padding: 7px 12px;
  font-size: 13px;
  flex-shrink: 0;
}
.app-store-actions .status-filter-wrap {
  width: auto;
  max-width: 150px;
  flex-shrink: 0;
  padding: 7px 10px;
}
.app-store-actions .page-actions-group {
  flex-shrink: 0;
  gap: 8px;
}

.page-actions-filter {
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.filter-row-inline {
  justify-content: flex-end;
  width: 100%;
  gap: 8px;
}

.filter-row-inline .filter-item {
  width: 170px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border-color: var(--gray-300);
}

.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

.btn-dragon {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.btn-dragon:hover {
  background: #fde68a;
  color: #92400e;
}

.btn-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--primary);
  color: var(--white);
}

/* 卡片 */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.card-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 20px;
}

.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.select-sm {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  font-size: 13px;
  color: var(--gray-700);
  outline: none;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.pfa-tier-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.pfa-tier { flex: 1 1 150px; min-width: 130px; border: 1px solid var(--gray-200); border-radius: 12px; padding: 12px 14px; background: var(--white); }
.pfa-tier[data-active="1"] { border-color: #0d9488; background: #f0fdfa; box-shadow: 0 0 0 2px rgba(13,148,136,.12); }
.pfa-tier-name { display: block; font-weight: 800; font-size: 15px; color: #0f172a; }
.pfa-tier-cond { display: block; font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.pfa-tier-disc { display: block; font-size: 13px; font-weight: 700; color: #0d9488; margin-top: 6px; }

/* 资产流水详情：可点击行 + 详情面板 */
.pfa-flow-row { cursor: pointer; transition: background .15s; }
.pfa-flow-row:hover { background: #f0fdfa; }
.pfa-flow-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding: 14px 4px 4px; }
.pfa-page-btn { min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-700); border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; justify-content: center; }
.pfa-page-btn:hover:not(:disabled):not(.active) { border-color: #0d9488; color: #0d9488; }
.pfa-page-btn.active { background: #0d9488; border-color: #0d9488; color: #fff; font-weight: 700; cursor: default; }
.pfa-page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pfa-page-ellipsis { color: var(--gray-400); padding: 0 4px; font-size: 14px; }
.pfa-detail-list { display: flex; flex-direction: column; }
.pfa-detail-item { display: flex; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--gray-200); }
.pfa-detail-item:last-child { border-bottom: none; }
.pfa-detail-label { flex: 0 0 132px; color: var(--gray-500); font-size: 13px; padding-top: 1px; }
.pfa-detail-value { flex: 1; color: #0f172a; font-size: 14px; font-weight: 600; word-break: break-all; }
.pfa-loop-desc { font-size: 13px; line-height: 1.7; color: var(--gray-600); margin: 0; }
.pfa-loop-desc b { color: #0f172a; }
/* 项目积分卡片（v20260813q 重新排版：4 入口） */
.pfa-points-card .pfa-pc-head { display: flex; align-items: center; justify-content: space-between; }
.pfa-points-card .stat-info { width: 100%; }
.pfa-points-card .pfa-pc-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #0d9488; background: #ecfdf5; border: 1px solid #99f6e4; padding: 3px 10px; border-radius: 999px; }
.pfa-pc-badge-btn { cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all .15s ease; }
.pfa-pc-badge-btn:hover { box-shadow: 0 2px 6px rgba(13,148,136,.25); transform: translateY(-1px); }
.pfa-pc-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 4px; }
.pfa-pc-main .stat-value { margin: 0; }
.pfa-pc-main .pfa-pc-badge { margin-left: auto; }
.pfa-pc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0; padding: 10px 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; }
.pfa-pc-item { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.pfa-pc-item .ppc-label { display: inline; font-size: 12px; color: var(--gray-500); margin: 0; }
.pfa-pc-item .ppc-value { display: inline; font-size: 18px; font-weight: 400; color: #0f172a; line-height: 1.2; }
.pfa-pc-item .ppc-value.ppc-del { color: #dc2626; }

/* 资产概览 5 卡：统一纵向拉伸，底部行钉在同一条基线 —— 充值/提现 与 累计/销毁 严格同高 */
#pfaStatsGrid .stat-card { flex-direction: column; align-items: stretch; }
#pfaStatsGrid .stat-info { width: 100%; flex: 1 1 auto; min-height: 0; }
#pfaStatsGrid .pfa-pc-row { margin-top: auto; margin-bottom: 0; }

/* 项目等级卡：距下一等级进度条 */
.pfa-lv-progress { flex-direction: column; align-items: stretch; gap: 7px; }
.pfa-lv-prog-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--gray-500); }
.pfa-lv-prog-top #pfaLevelPct { font-weight: 700; color: #0f172a; font-size: 13px; }
.pfa-lv-bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.pfa-lv-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0d9488, #5eead4); transition: width .4s ease; }
.pfa-lv-hint { font-size: 12px; color: var(--gray-500); }

/* 社区活动申请：头部按钮组 + 入口 + 列表 + 历史 */
.modal-header-actions { display: flex; align-items: center; gap: 8px; }
.pfa-act-tip { font-size: 13px; color: var(--gray-600); background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.6; }
.pfa-act-entries { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.pfa-act-entry { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; transition: all .15s; width: 100%; }
.pfa-act-entry:hover { border-color: #0d9488; box-shadow: 0 4px 12px rgba(13,148,136,.12); }
.pfa-ae-ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #ecfdf5; color: #0d9488; flex-shrink: 0; }
.pfa-ae-text { display: flex; flex-direction: column; }
.pfa-ae-title { font-weight: 700; font-size: 14px; color: #0f172a; }
.pfa-ae-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.pfa-act-list { display: flex; flex-direction: column; gap: 10px; }
.pfa-act-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; }
.pfa-act-main { flex: 1; min-width: 0; }
.pfa-act-title { font-weight: 700; font-size: 14px; color: #0f172a; }
.pfa-act-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--gray-500); }
.pfa-act-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pfa-act-status.on { background: #dcfce7; color: #16a34a; }
.pfa-act-status.soon { background: #fef9c3; color: #ca8a04; }
.pfa-act-status.plan { background: #e0e7ff; color: #4f46e5; }
.pfa-hist-list { display: flex; flex-direction: column; gap: 8px; }
.pfa-hist-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #eef2f7; border-radius: 10px; }
.pfa-hist-title { font-weight: 700; font-size: 14px; color: #0f172a; }
.pfa-hist-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.pfa-hist-status { margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; color: #64748b; white-space: nowrap; }
@media (max-width: 640px) { .pfa-act-entries { grid-template-columns: 1fr; } }

/* 项目运营分红配置弹窗（三级层级配置） */
.pfa-div-section { margin-top: 16px; }
.pfa-div-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pfa-div-sec-title { font-size: 14px; font-weight: 700; color: #0f172a; }
.pfa-div-sec-title i { color: #0d9488; margin-right: 6px; }
.pfa-div-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pfa-div-badge.org { background: #ecfdf5; color: #047857; }
.pfa-div-badge.op { background: #eff6ff; color: #1d4ed8; }
.pfa-div-badge.collab { background: #f3e8ff; color: #7e22ce; }
.pfa-div-badge.pm { background: #fff7ed; color: #c2410c; }
.pfa-div-total { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #f1f5f9; color: #64748b; }
.pfa-div-total.ok { background: #ecfdf5; color: #047857; }
.pfa-div-total.warn { background: #fef2f2; color: #dc2626; }
.pfa-div-input-suffix { display: inline-flex; align-items: center; gap: 6px; }
.pfa-div-input-suffix .form-control { width: 84px; }
.pfa-div-input-suffix .suffix { font-size: 13px; color: var(--gray-500); }
/* ① 机构分配行 */
.pfa-div-inst { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 14px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; }
.pfa-div-inst-org { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #0f172a; }
.pfa-div-inst-ratio { display: flex; align-items: center; gap: 8px; }
.pfa-div-inst-ratio label { font-size: 13px; color: var(--gray-500); }
.pfa-div-pool { margin-left: auto; font-size: 13px; color: var(--gray-500); }
.pfa-div-pool b { color: #0d9488; font-size: 15px; }
.pfa-div-sub-inst { margin-top: 8px; padding: 10px 14px; }
.pfa-div-sub-inst .pfa-div-inst-org { font-weight: 500; color: #475569; }
.pfa-div-sub-inst input:disabled { background: #f1f5f9 !important; color: #94a3b8 !important; cursor: not-allowed; }
.pfa-div-sub2-inst { margin-top: 0; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px; }
.pfa-div-sub2-inst .pfa-div-inst-org { font-weight: 500; color: #475569; font-size: 13px; }
/* ② 部门配比行 */
.pfa-div-dept-ratios { display: flex; flex-direction: column; gap: 8px; }
.pfa-div-dept-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; }
.pfa-div-dept-name { font-size: 13px; font-weight: 600; color: #334155; }
.pfa-div-dept-ratio-tag { font-size: 13px; font-weight: 600; color: #0f172a; display: inline-flex; align-items: center; gap: 8px; }
.pfa-div-auto { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; }
.pfa-div-total-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pfa-div-total-note { font-size: 12px; color: var(--gray-500); }
.pfa-div-subtitle { font-size: 13px; font-weight: 700; color: #0f172a; margin: 16px 0 10px; }
.pfa-div-subtitle i { color: #0d9488; margin-right: 6px; }
/* ③ 部门内人员权重卡 */
.pfa-div-dept-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pfa-div-dm-card { padding: 12px 14px; background: #fff; border: 1px solid #eef2f7; border-radius: 12px; }
.pfa-div-dm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pfa-div-dm-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.pfa-div-dm-pool { font-size: 12px; color: #0d9488; font-weight: 600; }
.pfa-div-dm-lead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pfa-div-dm-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pfa-div-dm-tag.lead { background: #eff6ff; color: #1d4ed8; }
.pfa-div-dm-tag.member { background: #f1f5f9; color: #475569; }
.pfa-div-dm-share { font-size: 12px; color: var(--gray-500); }
.pfa-div-dm-members { padding-top: 8px; border-top: 1px dashed #eef2f7; }
.pfa-div-dm-mlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pfa-div-chip-sm { font-size: 12px; padding: 2px 8px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 999px; color: #334155; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.pfa-div-chip-sm input { width: 12px; height: 12px; cursor: pointer; accent-color: #0d9488; margin: 0; }
.pfa-div-chip-sm.pfa-div-chip-off { opacity: .4; text-decoration: line-through; background: #f1f5f9; color: #94a3b8; }
.pfa-div-empty-sm { font-size: 12px; color: var(--gray-500); }
.pfa-div-dm-row { display: flex; align-items: baseline; gap: 8px; font-size: 12px; padding: 3px 0; }
.pfa-div-dm-label { color: var(--gray-500); min-width: 52px; flex-shrink: 0; }
.pfa-div-dm-row span:last-child { color: #0f172a; font-weight: 600; }

/* 协同部门详情：可折叠容器 */
.pfa-collab-collapse { margin-top: 8px; padding: 10px 14px; background: #fff; border: 1px dashed #d1d5db; border-radius: 10px; }
.pfa-collab-collapse-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; font-size: 13.5px; color: #334155; font-weight: 600; }
.pfa-collab-collapse-head:hover { color: #0d9488; }
.pfa-collab-collapse-head i.fa-people-group { color: #0d9488; margin-right: 6px; }
.pfa-collab-collapse-toggle { font-size: 12px; color: #64748b; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.pfa-collab-collapse-toggle i { transition: transform .2s; }
.pfa-collab-collapse.open .pfa-collab-collapse-toggle i { transform: rotate(180deg); }
.pfa-collab-collapse-body { display: none; margin-top: 12px; }
.pfa-collab-collapse.open .pfa-collab-collapse-body { display: block; }

/* 协同部门：参与分配复选框 */
.pfa-collab-collapse-subtitle { display: block; font-size: 12px; color: #94a3b8; margin-top: 2px; font-weight: 400; }
.pfa-collab-collapse-stat { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 2px 8px; font-size: 12px; color: #0f172a; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 999px; font-weight: 400; white-space: nowrap; }
.pfa-collab-collapse-stat b { color: #0d9488; font-weight: 600; font-size: 13px; }
.pfa-collab-collapse-stat i { font-style: normal; color: #94a3b8; font-weight: 400; }
.pfa-div-dm-checkbox { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; cursor: pointer; user-select: none; font-size: 13px; color: #0f172a; }
.pfa-div-dm-checkbox input { width: 14px; height: 14px; cursor: pointer; accent-color: #0d9488; }
.pfa-div-dm-card .pfa-div-dm-name { display: inline-flex; align-items: center; }
.pfa-div-dm-card.pfa-div-dm-disabled { opacity: .45; pointer-events: none; background: #f8fafc !important; }
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-div-dm-pool,
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-lead-overall { color: #94a3b8 !important; }
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-lead-jointval { color: #94a3b8 !important; }
/* 反向勾选：disabled 卡片上的复选框仍可被点击，用于重新勾选回来 */
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-div-dm-checkbox,
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-div-dm-checkbox input { pointer-events: auto; opacity: 1; }
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-div-dm-checkbox { color: #0f172a; }
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-div-chip-sm input { pointer-events: auto; opacity: 1; }
/* 参与分配项目经理：中心卡片复选框 + PM 行 */
.pfa-div-mgr-dept .pfa-div-dm-head { margin-bottom: 8px; }
.pfa-div-dm-chk { margin-left: auto; margin-right: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; user-select: none; white-space: nowrap; }
.pfa-div-dm-chk input { width: 14px; height: 14px; cursor: pointer; accent-color: #0d9488; margin: 0; }
.pfa-div-dm-pmtag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #0f172a; }
.pfa-div-mgr-row { padding: 2px 0; }
.pfa-div-mgr-row .pfa-div-dm-share { color: #0d9488; font-weight: 600; }
/* 反向勾选：disabled 卡片上的参与分配复选框仍可点击 */
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-div-dm-chk,
.pfa-div-dm-card.pfa-div-dm-disabled .pfa-div-dm-chk input { pointer-events: auto; opacity: 1; }
.pfa-div-dm-skip { font-size: 12px; color: #ef4444; font-weight: 600; margin-left: 6px; }
.pfa-collab-collapse-reverse { margin-left: 10px; font-size: 12px; color: #0d9488; cursor: pointer; user-select: none; border: 1px solid #0d9488; border-radius: 6px; padding: 2px 8px; background: #f0fdfa; }
.pfa-collab-collapse-reverse:hover { background: #ccfbf1; }

/* 协同部门：主管占比可编辑 */
.pfa-lead-prio { width: 46px; text-align: center; border: 1px solid #d1d5db; border-radius: 5px; padding: 1px 4px; font-size: 12px; outline: none; background: #fff; color: #0f172a; -moz-appearance: number-field; appearance: auto; }
.pfa-lead-prio:focus { border-color: #0d9488; box-shadow: 0 0 0 2px rgba(13,148,136,.15); }
.pfa-lead-jointval { color: #0d9488; font-weight: 600; }
.pfa-lead-overall { font-weight: 600; color: #0f172a; }

/* 查看模式下可编辑区域高亮色块 */
.pfa-div-editable { transition: background-color .2s, box-shadow .2s, border-color .2s; }
.pfa-div-editable.pfa-div-readonly-mark {
  background-color: #fff7ed;
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}
.pfa-div-input-suffix.pfa-div-editable.pfa-div-readonly-mark {
  display: inline-flex;
  padding: 4px 8px;
}
.pfa-div-dm-lead.pfa-div-editable.pfa-div-readonly-mark {
  padding: 8px 10px;
}
.pfa-div-editable.pfa-div-readonly-mark .form-control,
.pfa-div-editable.pfa-div-readonly-mark .form-control:disabled {
  background-color: #fffbeb;
  border-color: #fbbf24;
  color: #92400e;
}
.pfa-div-editable.pfa-div-readonly-mark .form-control:disabled {
  opacity: 0.9;
}

/* 可配置金额横幅 */
.pfa-div-configurable {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; margin: 6px 0 10px;
  border-radius: 12px; background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1.5px solid #93c5fd;
}
.pfa-div-ca-card { display: flex; align-items: baseline; gap: 10px; }
.pfa-div-ca-label { font-size: 13px; font-weight: 700; color: #1e40af; display: inline-flex; align-items: center; gap: 6px; }
.pfa-div-ca-val { font-size: 28px; font-weight: 900; color: #2563eb; letter-spacing: .3px; }
.pfa-div-ca-val.negative { color: #dc2626; }
.pfa-div-ca-formula { font-size: 12px; color: #64748b; }
.pfa-div-ca-sub { font-size: 12.5px; color: #0369a1; font-weight: 600; margin-left: auto; }
.pfa-div-ca-sub b { color: #1d4ed8; }

/* —— 权重分配总览面板（①②③） —— */
.pfa-div-weight-summary { margin-top: 16px; background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%); border: 1px solid #e0e7ff; border-radius: 12px; padding: 14px 16px; }
.pfa-div-ws-title { font-size: 13.5px; font-weight: 700; color: #4338ca; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.pfa-div-ws-bars { display: flex; height: 32px; border-radius: 8px; overflow: hidden; gap: 2px; margin-bottom: 10px; }
.pfa-div-ws-bar { display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: #fff; min-width: 0; transition: width .3s ease; white-space: nowrap; position: relative; cursor: default; }
.pfa-div-ws-bar.inst { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.pfa-div-ws-bar.op { background: linear-gradient(135deg, #f59e0b, #d97706); }
.pfa-div-ws-bar.collab { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.pfa-div-ws-bar span { text-shadow: 0 1px 2px rgba(0,0,0,.25); z-index: 1; pointer-events: none; }
.pfa-div-ws-detail { display: flex; gap: 0; font-size: 12px; }
.pfa-div-ws-item { flex: 1; text-align: center; padding: 6px 4px; border-right: 1px solid #e0e7ff; }
.pfa-div-ws-item:last-child { border-right: none; }
.pfa-div-ws-item .ws-label { color: #64748b; font-weight: 500; display: block; margin-bottom: 2px; }
.pfa-div-ws-item .ws-pct { font-size: 15px; font-weight: 800; display: block; }
.pfa-div-ws-item .ws-amt { font-size: 11px; color: #6b7280; margin-top: 1px; }
.pfa-div-ws-item.inst .ws-pct { color: #2563eb; }
.pfa-div-ws-item.op .ws-pct { color: #d97706; }
.pfa-div-ws-item.collab .ws-pct { color: #7c3aed; }

/* —— 分红配置：文档化 + 审批流 —— */
#pfaDivDocBar { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.pfa-div-docbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #eef2f7; }
.pfa-div-docbar.pend { background: #fffbeb; border-color: #fde68a; }
.pfa-div-doc-tag { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pfa-div-doc-tag.eff { background: #ecfdf5; color: #047857; }
.pfa-div-doc-tag.new { background: #eff6ff; color: #1d4ed8; }
.pfa-div-doc-tag.pend { background: #fef3c7; color: #b45309; }
.pfa-div-doc-ver { font-size: 12px; font-weight: 700; color: #0f172a; }
.pfa-div-doc-meta { font-size: 12px; color: var(--gray-500); }
.pfa-div-doc-edit { font-size: 12px; color: #0d9488; font-weight: 600; }
/* 互审面板 */
.pfa-div-review { margin-top: 4px; padding: 10px 12px; border: 1px solid #fde68a; border-radius: 10px; background: #fffdf5; }
.pfa-div-review-title { font-size: 13px; font-weight: 700; color: #b45309; margin-bottom: 8px; }
.pfa-div-review-title i { margin-right: 6px; }
.pfa-div-review-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed #f1e7c4; }
.pfa-div-review-row:first-of-type { border-top: none; }
.pfa-div-review-name { font-size: 13px; font-weight: 600; color: #0f172a; min-width: 96px; }
.pfa-div-review-dec { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pfa-div-review-dec.pending { background: #f1f5f9; color: #64748b; }
.pfa-div-review-dec.approved { background: #ecfdf5; color: #047857; }
.pfa-div-review-dec.rejected { background: #fef2f2; color: #dc2626; }
.pfa-div-review-row .btn { margin-left: auto; }
.pfa-div-review-row .pfa-div-review-reject { margin-left: 6px; }
.pfa-div-review-actions { margin-top: 8px; }
/* 配置按钮待审核角标 */
.btn.has-pending { position: relative; }
.btn.has-pending::after { content: ''; position: absolute; top: -4px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
/* 提交审批弹窗 */
.pfa-div-submit-block { margin-bottom: 14px; }
.pfa-div-submit-block > label { display: block; font-size: 13px; font-weight: 600; color: #0f172a; margin-bottom: 6px; }
.pfa-div-submit-row { display: flex; gap: 8px; align-items: center; }
.pfa-div-submit-row .form-control { flex: 1; }
.pfa-div-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pfa-div-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; background: #eff6ff; color: #1d4ed8; border-radius: 999px; cursor: default; }
.pfa-div-chip i { cursor: pointer; opacity: .7; }
.pfa-div-chip i:hover { opacity: 1; }
.pfa-div-submit-hint { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.pfa-div-submit-hint.ok { background: #ecfdf5; color: #047857; }
.pfa-div-submit-hint.warn { background: #fffbeb; color: #b45309; }
/* 文档版本记录 */
.pfa-div-doclist { margin-top: 16px; border-top: 1px dashed #eef2f7; padding-top: 12px; }
.pfa-div-doclist-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #0d9488; background: none; border: none; cursor: pointer; padding: 4px 0; }
.pfa-div-doclist-toggle .fa-chevron-down { transition: transform .2s; }
.pfa-div-doclist-toggle.open .fa-chevron-down { transform: rotate(180deg); }
.pfa-div-doclist-body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pfa-div-doc-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; }
.pfa-div-doc-st { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pfa-div-doc-st.eff { background: #ecfdf5; color: #047857; }
.pfa-div-doc-st.pend { background: #fef3c7; color: #b45309; }
.pfa-div-doc-st.rej { background: #fef2f2; color: #dc2626; }
.pfa-div-doc-st.arch { background: #f1f5f9; color: #64748b; }

/* 分红配置文档详情（只读） */
.pfa-div-detail { display: flex; flex-direction: column; gap: 2px; }
.pfa-div-detail-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 4px; border-bottom: 1px dashed #eef2f7; }
.pfa-div-detail-row:last-child { border-bottom: none; }
.pfa-div-detail-k { font-size: 13px; color: #64748b; min-width: 104px; flex-shrink: 0; }
.pfa-div-detail-v { font-size: 13px; font-weight: 600; color: #0f172a; flex: 1; }
.pfa-div-detail-row.hi .pfa-div-detail-v { color: #0d9488; }
.pfa-div-detail-row.total { margin-top: 4px; padding-top: 10px; }
.pfa-div-detail-row.total .pfa-div-detail-k { font-size: 14px; font-weight: 700; color: #0f766e; }
.pfa-div-detail-row.total .pfa-div-detail-v { font-size: 18px; font-weight: 800; color: #0d9488; }
.pfa-div-detail-row.total .pfa-div-detail-v.neg { color: #dc2626; }
.pfa-div-detail-sep { height: 1px; background: #eef2f7; margin: 6px 0; }

/* 分红配置工单审核详情页 */
.pfa-div-wo-detail { display: flex; flex-direction: column; gap: 0; }
.pfa-div-wo-meta { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 4px 10px; margin-bottom: 12px; }
.pfa-div-wo-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 4px; border-bottom: 1px dashed #eef2f7; }
.pfa-div-wo-meta .pfa-div-wo-row { border-bottom: 1px dashed #e2e8f0; }
.pfa-div-wo-meta .pfa-div-wo-row:last-child { border-bottom: none; }
.pfa-div-wo-row > span { font-size: 13px; color: #64748b; min-width: 84px; flex-shrink: 0; }
.pfa-div-wo-row > b { font-size: 13px; font-weight: 600; color: #0f172a; flex: 1; }
.pfa-div-wo-reason { font-size: 12px; color: #dc2626; font-weight: 500; }
.pfa-div-wo-doc { margin-top: 4px; }
.pfa-div-wo-doc .pfa-order { box-shadow: none; border: 1px solid #eef2f7; }
#pfaDivWODetailModal .modal-body { max-height: 72vh; overflow-y: auto; }
/* 分红配置编辑弹窗：body 可滚动，footer 始终可见 */
#pfaDividendModal .modal { max-height: 85vh; }
#pfaDividendModal .modal-body { overflow-y: auto; flex: 1; min-height: 0; }
#pfaDividendModal .modal-footer { flex-shrink: 0; }
.pfa-div-wo-reject { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef2f7; }
.pfa-div-wo-reject-label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.pfa-div-wo-reject textarea { width: 100%; resize: vertical; }
.pfa-div-wo-reject-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

/* 分红配置单（订单模式） */
.pfa-order { font-size: 13px; color: #0f172a; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pfa-order-head { padding: 12px 14px; background: linear-gradient(135deg, #0d9488, #0f766e); color: #fff; border-radius: 12px 12px 0 0; }
.pfa-order-title { font-size: 16px; font-weight: 800; letter-spacing: 1px; }
.pfa-order-week { font-size: 12px; font-weight: 600; letter-spacing: 0; margin-left: 8px; padding: 2px 8px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; vertical-align: middle; }
.pfa-order-no { font-size: 12px; opacity: 0.9; margin-top: 2px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pfa-order-meta { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.pfa-order-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; }
.pfa-order-tbl th, .pfa-order-tbl td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; }
.pfa-order-tbl thead th { background: #f1f5f9; font-size: 12px; color: #475569; font-weight: 700; }
.pfa-order-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.pfa-order-tbl td.num { font-weight: 600; }
.pfa-od-cat { color: #0d9488; font-weight: 700; white-space: nowrap; }
.pfa-order-sub td { background: #f8fafc; color: #64748b; font-weight: 600; }
.pfa-od-member td { background: #fffdf7; color: #475569; }
.pfa-od-mname { padding-left: 18px; }
.pfa-od-role { font-size: 11px; color: #94a3b8; margin-left: 4px; }
.pfa-order-total td { background: #ecfdf5; font-weight: 800; color: #0f766e; font-size: 14px; }
/* 项目物业方内部明细：项目主体 + 协同部门（下属科室）缩进层级 */
.pfa-od-sub.pfa-od-sub1 td { background: #f8fafc; }
.pfa-od-sub.pfa-od-sub2 td { background: #f1f5f9; }
.pfa-od-sub .pfa-od-cat { color: #0891b2; font-weight: 600; }
.pfa-order-tbl tbody tr.pfa-od-sub td { border-top: 1px dashed #e2e8f0; }
.pfa-od-dept { color: #475569; font-weight: 600; }
.pfa-od-sub.pfa-od-sub3 td { background: #eef2f6; }
.pfa-od-person { color: #334155; font-weight: 500; }
.pfa-order-sent { margin-top: 10px; padding: 8px 12px; background: #eff6ff; color: #1d4ed8; border-radius: 10px; font-size: 12px; font-weight: 600; }
.pfa-div-doc-tag.sent { background: #eff6ff; color: #1d4ed8; display: inline-flex; align-items: center; gap: 4px; }
/* 审核详情：分红配置修改对比视图（每项变更特殊标记） */
.pfa-order-compare { font-size: 13px; color: #0f172a; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pfa-compare-list { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.pfa-compare-sec { border: 1px solid #fde68a; border-left: 4px solid #f59e0b; border-radius: 10px; padding: 10px 12px; background: #fffbeb; }
.pfa-compare-sec-title { font-size: 14px; font-weight: 800; color: #92400e; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pfa-compare-badge { font-size: 11px; font-weight: 700; color: #fff; background: #f59e0b; border-radius: 999px; padding: 2px 8px; letter-spacing: .5px; }
.pfa-compare-item { font-size: 13px; color: #334155; padding: 3px 0; line-height: 1.7; }
.pfa-diff-arrow { color: #f59e0b; font-weight: 800; margin: 0 2px; }
.pfa-diff-new { color: #15803d; font-weight: 800; background: #dcfce7; border-radius: 6px; padding: 1px 6px; }
.pfa-compare-none { padding: 16px 14px; color: #64748b; font-size: 13px; }
/* 审核详情：配置单 + 改动特殊标记 */
.pfa-order-marked { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pfa-change-banner { margin: 12px 14px 0; border: 1px solid #fde68a; border-left: 4px solid #f59e0b; border-radius: 10px; padding: 10px 12px; background: #fffbeb; }
.pfa-change-banner-title { font-size: 14px; font-weight: 800; color: #92400e; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pfa-change-list { display: flex; flex-direction: column; gap: 8px; }
.pfa-change-sec { font-size: 13px; color: #334155; line-height: 1.9; }
.pfa-change-sec > b { color: #0f172a; margin-right: 2px; }
.pfa-change-sec .pfa-change-text, .pfa-change-sec .pfa-change-line { display: inline-block; margin-right: 16px; }
.pfa-change-text { color: #b45309; font-weight: 600; }
.pfa-diff-old { color: #94a3b8; text-decoration: line-through; font-weight: 600; }
.pfa-diff-arrow { color: #f59e0b; font-weight: 800; margin: 0 2px; }
.pfa-diff-new { color: #15803d; font-weight: 800; background: #dcfce7; border-radius: 6px; padding: 1px 6px; }
.pfa-od-changed { background: #fffbeb; }
.pfa-od-changed td { border-color: #fcd34d; }
.pfa-cat-badge { font-size: 10px; font-weight: 700; color: #fff; background: #f59e0b; border-radius: 999px; padding: 1px 6px; letter-spacing: .5px; vertical-align: middle; margin-left: 4px; }
/* 提现管理：审批人列表 + 提现申请人 */
.pfa-wconf { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.pfa-wconf-block { margin-bottom: 12px; }
.pfa-wconf-title { font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.pfa-wconf-hint { font-weight: 400; color: #94a3b8; font-size: 12px; margin-left: 4px; }
.pfa-wconf-sub { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.pfa-wconf-sub:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.pfa-wconf-sub-title { font-size: 12.5px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.pfa-wappr-empty-inline { font-size: 12px; color: #94a3b8; }
.pfa-wconf-approvers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pfa-wappr-chip { display: inline-flex; align-items: center; gap: 6px; background: #ecfeff; border: 1px solid #a5f3fc; color: #0e7490; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; }
.pfa-wappr-role { font-style: normal; font-size: 11px; color: #0891b2; background: #cffafe; border-radius: 6px; padding: 1px 6px; }
.pfa-wappr-del { border: none; background: transparent; color: #0e7490; cursor: pointer; padding: 2px 4px; border-radius: 999px; line-height: 1; }
.pfa-wbalance-tip { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: linear-gradient(90deg,#eff6ff,#f0fdfa); border: 1px solid #bfdbfe; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.pfa-wbalance-tip span { font-size: 13px; color: #475569; }
.pfa-wbalance-tip b { font-size: 22px; font-weight: 800; color: #dc2626; letter-spacing: .3px; }
.pfa-wbalance-tip small { font-size: 12px; color: #94a3b8; }
.pfa-wappr-del:hover { background: #a5f3fc; }
.pfa-wconf-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 12px; }
.pfa-wconf-row .form-field { margin-bottom: 0; }
.pfa-wconf-actions { display: flex; align-items: center; gap: 12px; }
.pfa-wconf-saved { font-size: 12px; color: #16a34a; }
/* 提现配置 视图/编辑 切换 */
.pfa-wconf.wconf-view .wconf-edit-only { display: none !important; }
.pfa-wconf.wconf-edit .wconf-view-only { display: none !important; }
/* 审批人/申请人移除 × 在查看与编辑模式下均常显，便于直接删除人员 */
.pfa-wconf .pfa-wappr-del { display: inline-flex !important; }
.pfa-wappr-list { max-height: 320px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 10px; padding: 6px; }
.pfa-wappr-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.pfa-wappr-row:hover { background: #f1f5f9; }
.pfa-wappr-row.selected { background: #ecfeff; }
.pfa-wappr-row.disabled { opacity: .55; cursor: not-allowed; background: transparent !important; }
.pfa-wappr-check { display: inline-flex; }
.pfa-wappr-check input { width: 16px; height: 16px; accent-color: #0d9488; }
.pfa-wappr-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.pfa-wappr-name { font-size: 14px; font-weight: 600; color: #0f172a; }
.pfa-wappr-meta { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfa-wappr-tag { font-size: 11px; color: #94a3b8; background: #f1f5f9; border-radius: 6px; padding: 2px 8px; }
.pfa-wappr-tag-conflict { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }
.pfa-wappr-empty { text-align: center; padding: 28px 0; color: #94a3b8; font-size: 13px; }
.pfa-wappr-selected { font-size: 13px; color: #64748b; margin-right: auto; }
/* 打印：仅打印分红配置单内容 */
@media print {
  body * { visibility: hidden !important; }
  #pfaDivDetailBody, #pfaDivDetailBody * { visibility: visible !important; }
  #pfaDivDetailBody { position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; padding: 0 !important; }
}

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 18px; margin-top: 4px; }
.perm-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-700); cursor: pointer; }
.perm-item input { width: auto; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 4px; border-bottom: 1px solid var(--gray-100); }
.cfg-row:last-child { border-bottom: none; }
.cfg-row-main { display: flex; flex-direction: column; }
.cfg-label { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.cfg-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.cfg-input { width: 320px; flex-shrink: 0; }
@media (max-width: 768px) { .cfg-row { flex-direction: column; align-items: flex-start; } .cfg-input { width: 100%; } }

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #d1fae5; color: #10b981; }
.stat-icon.orange { background: #fef3c7; color: #f59e0b; }
.stat-icon.red { background: #fee2e2; color: #ef4444; }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}

.stat-trend {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* 5列统计卡 */
.stats-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1280px) {
  .stats-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 简洁统计卡 */
.stat-simple {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.stat-simple::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), var(--info));
}

.stat-simple:nth-child(2)::before { background: linear-gradient(180deg, #10b981, #34d399); }
.stat-simple:nth-child(3)::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.stat-simple:nth-child(4)::before { background: linear-gradient(180deg, #ef4444, #f87171); }
.stat-simple:nth-child(5)::before { background: linear-gradient(180deg, #6366f1, #818cf8); }

.stat-simple .stat-label {
  font-size: 14px;
}

.stat-simple .stat-value {
  font-size: 32px;
}

/* 应用商城统计卡片：自适应列数，避免右侧空白 */
.app-store-stats {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-simple .stat-trend {
  font-size: 12px;
}

/* 仪表盘图表 */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-grid-2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 1024px) {
  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  min-height: 340px;
}

/* 收费统计栏目 */
.chart-filters {
  display: flex;
  gap: 8px;
}

.payment-card .card-body.payment-body {
  padding-top: 8px;
}

.payment-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 16px 20px 4px;
}

.payment-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 16px;
  border-left: 1px solid var(--gray-200);
}

.payment-kpi:first-child {
  border-left: none;
  padding-left: 0;
}

.kpi-label {
  font-size: 13px;
  color: var(--gray-500);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.1;
}

.kpi-sub {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-sub.up { color: var(--success); }
.kpi-sub.down { color: var(--danger); }

@media (max-width: 1100px) {
  .payment-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 0;
  }
  .payment-kpi:nth-child(3) {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .payment-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .payment-kpi {
    border-left: none;
    padding-left: 0;
  }
}

.card-header.center {
  justify-content: center;
}

.text-muted {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 400;
}

/* 图表+图例并排 */
.chart-with-legend {
  display: flex;
  align-items: center;
  gap: 20px;
}

.chart-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}

.chart-legend-panel {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 16px;
  border-left: 1px solid var(--gray-100);
}

.occupancy-rate {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.rate-label {
  font-size: 13px;
  color: var(--gray-500);
}

.rate-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.legend-row .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.owner { background: var(--success); }
.legend-dot.rent { background: var(--primary); }
.legend-dot.sale { background: var(--secondary); }
.legend-dot.empty { background: var(--gray-300); }
.legend-dot.decoration { background: var(--info); }

.legend-text {
  color: var(--gray-600);
  flex: 1;
}

.legend-num {
  color: var(--gray-800);
  font-weight: 600;
}

/* 收费构成明细 */
.fee-row {
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--gray-100);
}

.fee-row:last-child {
  border-bottom: none;
}

.fee-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  gap: 2px;
}

.fee-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}

.fee-sub {
  font-size: 12px;
  color: var(--gray-500);
}

.fee-mom {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.fee-mom.up { color: var(--success); }
.fee-mom.down { color: var(--danger); }

.fee-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.fee-total-label {
  font-size: 13px;
  color: var(--gray-600);
}

.fee-total-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

/* 出入口气泡图 */
.access-bubble-chart {
  padding: 6px 0 10px;
  position: relative;
}

.bubble-chart-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble-gate-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bubble-gate-label {
  width: 92px;
  font-size: 13px;
  color: var(--gray-700);
  text-align: right;
  flex-shrink: 0;
  font-weight: 500;
}

.bubble-track {
  flex: 1;
  position: relative;
  height: 58px;
}

.bubble-axis-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-200);
  transform: translateY(-50%);
}

.bubble-point {
  position: absolute;
  top: 50%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  cursor: default;
  transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
  transform: translateY(-50%);
  white-space: nowrap;
}

.bubble-point:hover {
  transform: translateY(-50%) scale(1.15);
  z-index: 5;
  opacity: 1 !important;
}

.bubble-axis-row {
  margin-top: -4px;
}

.bubble-axis-track {
  height: 22px;
}

.bubble-time-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--gray-400);
}

.bubble-time-tick::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 1px;
  height: 5px;
  background: var(--gray-300);
  transform: translateX(-50%);
}

/* 气泡悬停提示 */
.bubble-tooltip {
  position: absolute;
  display: none;
  transform: translate(-50%, -100%);
  background: var(--gray-800);
  color: var(--white);
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.bubble-tooltip strong {
  color: var(--white);
  font-weight: 600;
}

/* 待办 */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}

.todo-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
}

.todo-item.urgent .todo-tag {
  background: #fee2e2;
  color: var(--danger);
}

.todo-content {
  flex: 1;
}

.todo-content p {
  color: var(--gray-800);
  font-weight: 500;
  margin-bottom: 2px;
}

.todo-content span {
  font-size: 12px;
  color: var(--gray-400);
}

/* 房屋管理 */
.house-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  margin-bottom: 20px;
  min-height: 460px;
}

.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}

.panel-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  flex-shrink: 0;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.panel-header .tree-search {
  position: relative;
  padding: 0;
  flex: 1;
  max-width: 180px;
  min-width: 0;
}

.panel-header .tree-search input {
  width: 100%;
  height: 30px;
  padding-left: 28px;
  font-size: 12px;
}

.panel-header .tree-search i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--gray-400);
  pointer-events: none;
}

.floor-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 4px;
}

.floor-tab {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.floor-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.floor-tab.active {
  background: #fa8c16;
  color: var(--white);
  border-color: #fa8c16;
}

.house-panel-header {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 10px;
  padding-bottom: 10px;
}

/* 楼栋树 */
.building-tree {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.building-item {
  margin-bottom: 4px;
}

.building-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--gray-700);
  font-weight: 500;
  transition: all 0.2s;
}
/* 节点主行：标题 + 操作按钮，占满第一行 */
.bh-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.building-header:hover {
  background: var(--gray-50);
}

.building-header.active {
  background: #fff7e6;
  color: #fa8c16;
  box-shadow: inset 3px 0 0 #fa8c16;
}

.building-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.building-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.tree-head-badge {
  font-size: 11px;
  font-weight: 400;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 6px;
  flex-shrink: 0;
}
.form-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}
.building-title i.fa-chevron-right {
  font-size: 11px;
  color: var(--gray-400);
  transition: transform 0.2s;
  min-width: 10px;
}

.building-item.open > .building-header .building-title .fa-chevron-right {
  transform: rotate(90deg);
}

.tree-folder-icon {
  font-size: 13px;
  color: var(--gray-400);
}

.building-item:not(.open) > .building-header .tree-folder-icon.fa-folder {
  color: var(--gray-500);
}

.tree-folder-icon.fa-folder-open {
  color: #d97706;
}

.tree-folder-icon.fa-circle {
  font-size: 8px;
  color: #7c3aed;
  margin-top: -2px;
}

/* 组织架构分组树 */
.org-category-tree > .building-item {
  margin-bottom: 8px;
}

.org-category-tree .building-header {
  background: transparent;
  border-radius: 0;
}

.org-category-tree .building-header:hover {
  background: #f5f5f5;
}

.org-category-tree .building-header.group-header {
  font-weight: 700;
  color: #1f2937;
}

/* 仅顶层（项目中心/运营中心）保留卡片底色，二级及以下部门去除卡片与底色 */
.org-category-tree .building-header.group-header.lv0 {
  background: #E6F4FF;
  border-radius: var(--radius-sm);
}

.org-category-tree .building-header.group-header.lv0:hover {
  background: #BAE0FF;
}

.org-category-tree .building-header.group-header .tree-folder-icon.group-icon {
  color: #1f2937;
  font-size: 14px;
}

.org-category-tree .building-header .header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.org-category-tree .building-header.group-header .group-arrow {
  font-size: 12px;
  color: #1f2937;
  transition: transform 0.2s;
}

.org-category-tree .building-header .tree-toggle {
  cursor: pointer;
  padding: 2px;
}

.org-category-tree .building-header .tree-more-btn {
  border: none;
  background: transparent;
  color: var(--gray-400);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.org-category-tree .building-header .tree-more-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--gray-600);
}

.org-category-tree .building-header.group-header .tree-more-btn {
  color: #1f2937;
}

.org-category-tree .building-header.group-header .tree-more-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.org-tree-dropdown {
  position: fixed;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 90px;
  padding: 4px 0;
  display: none;
  z-index: 2000;
}

.org-tree-dropdown.show {
  display: block;
}

.org-tree-dropdown-item {
  padding: 7px 14px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.org-tree-dropdown-item:hover {
  background: var(--gray-100);
  color: var(--primary);
}
.org-tree-dropdown-item.danger { color: #dc2626; }
.org-tree-dropdown-item.danger:hover { background: #fef2f2; color: #dc2626; }
.org-tree-dropdown-item.org-head-current { font-weight: 600; }
.org-tree-dropdown-divider { height: 1px; background: var(--gray-200); margin: 4px 0; }

/* 管理人员弹窗列表 */
.org-manager-tip { font-size: 12px; color: var(--gray-500); margin: 0 0 10px; line-height: 1.5; }
.org-manager-search { position: relative; margin-bottom: 10px; }
.org-manager-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 12px; }
.org-manager-search .form-control { padding-left: 32px; }
.org-manager-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: 8px; }
.org-manager-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  cursor: pointer; border-bottom: 1px solid var(--gray-100); transition: background 0.15s;
}
.org-manager-item:last-child { border-bottom: none; }
.org-manager-item:hover { background: var(--gray-100); }
.org-manager-item.selected { background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; }
.org-manager-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gray-300); object-fit: cover; }
.org-manager-meta { flex: 1; min-width: 0; }
.org-manager-name { font-size: 13px; font-weight: 600; color: var(--gray-800); display: flex; align-items: center; gap: 6px; }
.org-manager-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.org-manager-check { color: #2563eb; font-size: 16px; }

.org-category-tree .building-header.active {
  color: #1677FF;
  background: transparent;
  box-shadow: none;
}

.org-category-tree .building-header.active .tree-folder-icon {
  color: #1677FF;
}

.org-category-tree .building-header.group-header.lv0.active {
  background: #E6F4FF;
  box-shadow: inset 3px 0 0 #1677FF;
}

.org-category-tree .building-header.dept-item.active {
  color: #FA8C16;
  background: #FFF7E6;
  border-radius: var(--radius-sm);
}

.org-category-tree .building-header.dept-item.active .tree-folder-icon {
  color: #FA8C16;
}

.org-category-tree .building-header .building-title-text {
  font-size: 13px;
}

.org-category-tree .building-header.group-header .building-title-text {
  font-size: 14px;
}

/* 组织架构顶部快捷图标操作栏 */
.org-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.org-import-tip {
  font-size: 12.5px;
  color: var(--t2, #5B6B7A);
  background: var(--gray-50, #F7F9FB);
  border: 1px solid var(--line, #EAEEF1);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.org-import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.org-import-file {
  font-size: 12.5px;
  color: var(--t2, #5B6B7A);
  word-break: break-all;
}
.org-import-preview {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line, #EAEEF1);
  border-radius: 10px;
}
.org-import-table {
  margin: 0;
  font-size: 12.5px;
}
.org-import-table th,
.org-import-table td {
  padding: 8px 10px;
  white-space: nowrap;
}
.org-import-table tbody tr.org-import-bad {
  background: #FFF1F0;
}
.org-import-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--t3, #93A1AE);
  font-size: 13px;
}
.org-import-stat {
  margin-right: auto;
  font-size: 12.5px;
  color: var(--t2, #5B6B7A);
}

.org-quick-actions + .btn-icon,
.org-quick-actions ~ .btn {
  margin-left: 0;
}

.org-rule-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s;
}
.org-rule-badge:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

/* 统一操作规则入口徽章：浅黄底、深黄字，与组织架构页保持一致 */
.rule-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s;
}
.rule-badge:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

.org-rule-tip {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  line-height: 1.6;
}
.org-rule-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #334155;
  line-height: 1.8;
}
.org-rule-list li {
  margin-bottom: 6px;
}
.org-rule-list li b {
  color: #0f172a;
  font-weight: 600;
}

.org-tree-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-100);
}

.org-tree-add-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  background: var(--white);
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  padding: 0;
}

.org-tree-add-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.22);
}

.org-tree-reset-btn {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--gray-600);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}
.org-tree-reset-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.org-quick-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--gray-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.org-quick-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}

.org-quick-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.18s;
  pointer-events: none;
  z-index: 1000;
}

.org-quick-btn::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  border: 5px solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: all 0.18s;
  pointer-events: none;
  z-index: 1000;
}

.org-quick-btn:hover::after,
.org-quick-btn:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

.tree-actions {
  position: relative;
  display: flex;
  align-items: center;
}

.tree-more {
  border: none;
  background: transparent;
  color: var(--gray-400);
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}

.building-header:hover .tree-more,
.unit-item:hover .tree-more,
.tree-actions:hover .tree-more,
.tree-more:hover {
  color: var(--gray-600);
  background: var(--gray-100);
}

.tree-menu {
  position: absolute;
  top: 50%;
  left: calc(100% + 4px);
  transform: translateY(-50%);
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  padding: 4px;
  min-width: 88px;
  display: none;
  flex-direction: column;
  z-index: 100;
}

.tree-actions:hover .tree-menu,
.tree-menu:hover {
  display: flex;
}

.tree-menu button {
  border: none;
  background: transparent;
  color: var(--gray-700);
  font-size: 13px;
  text-align: left;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.tree-menu button:hover {
  background: #fff7e6;
  color: #fa8c16;
}

.building-children {
  padding-left: 0;
  display: none;
}

.building-item.open > .building-children {
  display: block;
}

/* 机构管理树（楼栋列表模式） */
.inst-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--gray-500);
  flex-shrink: 0;
}

.inst-badge.ok { background: #e6f7ec; color: #18a058; }
.inst-badge.wait { background: #fff7e6; color: #fa8c16; }

.institution-detail {
  padding: 18px;
  min-height: 360px;
}

.inst-info-row {
  display: flex;
  padding: 11px 0;
  border-bottom: 1px dashed var(--gray-100);
  font-size: 14px;
}

.inst-info-row .label {
  width: 90px;
  color: var(--gray-500);
  flex-shrink: 0;
}

.inst-info-row .value {
  color: var(--gray-800);
  font-weight: 500;
}

/* 项目代理方数据概览 - 我的机构卡片 */
.coop-org-card { margin-bottom: 18px; }
.coop-org-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
}
.coop-tag {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.coop-tag-blue { background: #e0f2fe; color: #0369a1; }
.coop-tag-green { background: #dcfce7; color: #15803d; }
.coop-tag-warn { background: #fef3c7; color: #b45309; }
.coop-tag-gray { background: #f1f5f9; color: #64748b; }
@media (max-width: 768px) {
  .coop-org-info-grid { grid-template-columns: 1fr; }
}
/* 推荐机构数据统计：去外框，保留 5 张 KPI 卡片 */
.coop-recommend-section {
  margin-bottom: 24px;
}
.coop-recommend-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.coop-recommend-section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}
.coop-rec-body {
  display: none;
}
.coop-rec-table-wrap { min-width: 0; }

.inst-children-list { margin-top: 14px; }

.inst-children-list .chip {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 6px 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  font-size: 13px;
  color: var(--gray-600);
}

.unit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--gray-600);
  font-size: 13px;
  margin-bottom: 2px;
  transition: all 0.2s;
}

.unit-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.unit-item:hover {
  background: #fff7e6;
  color: #fa8c16;
}

/* 合作管理 - 机构管理（表格布局） */
.coop-inst-layout {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 20px;
  align-items: stretch;
  min-height: 580px;
}

/* 资产管理子导航布局：确保主内容区不被压窄 */
#project-finance-assets .coop-inst-layout { display: flex !important; flex-direction: row !important; }
#project-finance-assets .coop-inst-tree { flex: 0 0 260px !important; width: 260px !important; min-width: 260px !important; }
#project-finance-assets .coop-inst-main { flex: 1 1 auto !important; min-width: 0 !important; width: 0 !important; }

/* 平台-机构管理：左侧组织树固定宽度防止自动收起/塌陷 */
#platform-org .coop-inst-layout { display: flex !important; flex-direction: row !important; }
#platform-org .coop-inst-tree { flex: 0 0 260px !important; width: 260px !important; min-width: 260px !important; }
#platform-org .coop-inst-main { flex: 1 1 auto !important; min-width: 0 !important; width: 0 !important; }

.coop-inst-tree {
  display: flex;
  flex-direction: column;
  min-height: 580px;
}

.coop-inst-tree .panel {
  flex: 1;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.tree-search {
  position: relative;
  padding: 10px 12px;
}

.tree-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 28px;
  font-size: 12px;
}

.tree-search i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--gray-400);
  pointer-events: none;
}

.coop-inst-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 580px;
  flex: 1;
  min-width: 0;
}

.coop-inst-main > .coop-table-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.coop-inst-main > .coop-table-card > .coop-table-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.coop-inst-main > .coop-table-card > .coop-table-body > .table-responsive {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
}

.coop-filter-card .coop-filter-body {
  padding: 10px 14px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.filter-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 220px;
  flex: 0 0 auto;
}

.filter-item label {
  font-size: 13px;
  color: var(--gray-600);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-item .form-control {
  flex: 1;
  min-width: 0;
}

.form-control {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.filter-actions {
  display: flex;
  gap: 6px;
  margin-left: 0;
}

.coop-table-card .coop-table-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* 菜单管理：左侧分块树 + 右表 */
.menu-mgr-layout { display: flex; gap: 16px; align-items: stretch; }
.menu-cat-tree { width: 244px; flex: 0 0 244px; padding: 14px; background: #f8fafc; border-right: 1px solid var(--gray-100); max-height: calc(100vh - 230px); overflow: auto; }
.menu-mgr-table { flex: 1 1 auto; min-width: 0; }
.mct-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 700; color: #334155; margin-bottom: 12px; border: 1px solid transparent; transition: .15s; }
.mct-item:hover { background: #eef2f7; }
.mct-item.active { background: #0d9488; color: #fff; border-color: #0d9488; }
.mct-block { border: 1px solid var(--gray-200); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: #fff; cursor: pointer; transition: .15s; }
.mct-block:hover { border-color: #0d9488; }
.mct-block.active { border-color: #0d9488; box-shadow: 0 0 0 2px rgba(13,148,136,.15); }
.mct-head { display: flex; align-items: center; gap: 8px; padding: 11px 12px; font-weight: 700; color: #1e293b; background: #f1f5f9; }
.mct-block.active .mct-head { background: #ecfdf5; color: #0f766e; }
.mct-count { margin-left: auto; font-size: 12px; background: #e2e8f0; color: #475569; border-radius: 999px; padding: 1px 8px; }
.mct-subs { padding: 4px 12px 10px; }
.mct-sub { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #64748b; padding: 4px 0 4px 22px; position: relative; user-select: none; cursor: pointer; }
.mct-sub:before { content: ""; position: absolute; left: 8px; top: 13px; width: 8px; height: 1px; background: #cbd5e1; }
.mct-sub:hover { color: #0f766e; }
.mct-sub.active { color: #0f766e; font-weight: 600; }
.mct-sub.active:before { background: #0d9488; }
/* 项目管理下业务类型子项（智慧小区/数字乡村） */
.mct-biz-sub { cursor: pointer; background: #fff; border-radius: 8px; margin: 3px 0; padding: 6px 2px 6px 22px; }
.mct-biz-sub:hover { background: #f1f5f9; color: #0f766e; }
.mct-biz-sub.cfg-active { color: #2563eb; font-weight: 600; background: #eff6ff; }
.mct-biz-sub.cfg-active:before { background: #93c5fd; }
.mct-ops { margin-left: auto; display: flex; align-items: center; gap: 4px; padding-right: 2px; }
.mct-op { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: none; background: transparent; color: #94a3b8; border-radius: 6px; cursor: pointer; font-size: 13px; transition: .15s; }
.mct-op:hover { background: #e2e8f0; color: #0d9488; }
.mct-op[data-op="view"]:hover { color: #2563eb; }
.mct-block.cfg-active { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.mct-block.cfg-active .mct-head { background: #eff6ff; color: #2563eb; }
/* 菜单配置模式：复选框列与配置条 */
.coop-table .mn-th-cb { display: none; }
.coop-table .mn-cb-cell { display: none; }
.coop-table.config-mode .mn-th-cb { display: table-cell; }
.coop-table.config-mode .mn-cb-cell { display: table-cell; text-align: center; vertical-align: middle; }
.coop-table.config-mode .mn-cfg-cb { width: 16px; height: 16px; cursor: pointer; }
.coop-table.config-mode .mn-cb-dir .mn-cfg-cb { accent-color: #0d9488; }   /* 目录：青绿 */
.coop-table.config-mode .mn-cb-menu .mn-cfg-cb { accent-color: #2563eb; }  /* 菜单：蓝色 */
.coop-table.config-mode .mn-cfg-cb:disabled { accent-color: #cbd5e1; cursor: not-allowed; opacity: .9; }
.mn-cfg-bar.view { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.mn-fold-icon { display: inline-block; width: 16px; margin-right: 6px; color: #94a3b8; cursor: pointer; transition: transform .15s, color .15s; font-size: 11px; vertical-align: middle; }
.mn-fold-icon:hover { color: #0d9488; }
.mn-fold-icon.fa-chevron-down { color: #64748b; }
.mn-cfg-bar.view b { color: #475569; }
.mn-cfg-bar { margin: 0 0 12px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.mn-cfg-bar .mn-cfg-actions { display: inline-flex; gap: 8px; flex-shrink: 0; }
.mn-hide-cell { white-space: nowrap; }
.mn-hide-cell .switch { width: 40px; height: 22px; vertical-align: middle; }
.mn-hide-cell .switch .slider:before { height: 16px; width: 16px; left: 3px; bottom: 3px; }
.mn-hide-cell .switch input:checked + .slider:before { transform: translateX(18px); }
.mn-hide-cell .switch input:disabled + .slider { background: #e2e8f0; cursor: not-allowed; }
.mn-hide-cell .switch-ro { opacity: .65; }
.mn-hide-state-sm { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; color: #0f766e; }
.mn-hide-state-sm.is-hidden { color: #dc2626; }
.mn-cfg-bar b { color: #0d9488; }
.mn-view-meta { padding: 2px 2px 14px; color: var(--gray-500); font-size: 13px; border-bottom: 1px solid var(--gray-100); margin-bottom: 12px; }
.mn-view-meta b { color: #0d9488; }
.mn-view-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
.mn-view-list li { padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--gray-700); }
.mn-view-list li:nth-child(odd) { background: #f8fafc; }
@media (max-width: 900px) { .menu-mgr-layout { flex-direction: column; } .menu-cat-tree { width: 100%; flex: 1 1 auto; max-height: none; border-right: none; border-bottom: 1px solid var(--gray-100); } }

.org-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}

.org-current-path {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.4;
  padding: 2px 0;
}

.coop-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 0;
  border-bottom: none;
  background: transparent;
  flex: 0 0 auto;
}

/* 项目页筛选栏+工具栏合并行 */
.proj-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
  gap: 12px;
  flex-wrap: wrap;
}

.proj-filter-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.proj-filter-inline .form-control {
  width: auto;
  min-width: 110px;
}

.proj-filter-inline input.form-control-sm {
  min-width: 150px;
  max-width: 180px;
}

.proj-filter-inline select.form-control-sm {
  height: 34px;
  font-size: 13px;
  min-width: 100px;
  max-width: 130px;
}

.proj-toolbar-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 4px;
}

.toolbar-count {
  font-size: 13px;
  color: var(--gray-500);
  white-space: nowrap;
}

.search-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
  max-width: 180px;
}

.search-input-group label {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
  line-height: 1.2;
}

.search-input-group .form-control-sm {
  min-width: 150px;
  max-width: 180px;
}

/* 资产管理规则弹窗 */
.modal-lg { max-width: 720px; }
.rule-doc { max-height: 60vh; overflow-y: auto; padding-right: 6px; }
.rule-block { margin-bottom: 18px; }
.rule-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--gray-800); margin: 0 0 8px; }
.rule-h i { color: #0d9488; }
.rule-list { margin: 0; padding-left: 20px; color: var(--gray-600); font-size: 13.5px; line-height: 1.9; }
.rule-list li { margin-bottom: 3px; }
.rule-sub { margin-top: 4px; padding-left: 18px; }
.rule-note { margin: 6px 0 0; font-size: 12.5px; color: var(--gray-500); }
.rule-flow { display: inline-block; margin: 0; padding: 8px 14px; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 10px; color: #0f766e; font-weight: 700; font-size: 14px; letter-spacing: .5px; }
.rule-table { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: 13px; }
.rule-table th, .rule-table td { border: 1px solid var(--gray-200); padding: 7px 10px; text-align: left; }
.rule-table th { background: var(--gray-50); font-weight: 700; color: var(--gray-700); }
.rule-table td:first-child { font-weight: 600; color: var(--gray-800); }

.coop-table-tabs {
  display: flex;
  gap: 8px;
}

.coop-table-tab {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.coop-table-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.coop-table-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.coop-table-ops {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.coop-tree-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.coop-tree-tab {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: all 0.2s;
}

.coop-tree-tab:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.coop-tree-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.table-responsive {
  overflow-x: auto;
}

.coop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.coop-table th,
.coop-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
}

.coop-table th {
  background: var(--gray-50);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 12px;
}

.coop-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.coop-table tbody tr:hover {
  background: var(--gray-50);
}

.coop-table tbody tr.active {
  background: #eff6ff;
}

.coop-table .col-check {
  width: 40px;
  text-align: center;
}

.coop-table .col-no {
  width: 44px;
  color: var(--gray-500);
}

.coop-table .col-ops {
  width: 150px;
  text-align: right;
  white-space: nowrap;
}

.coop-table .col-avatar {
  width: 56px;
}

.inst-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gray-200);
}

/* 机构列表-基础数据列宽 + 开关按钮 */
.coop-table .col-short       { width: 90px; }
.coop-table .col-type        { width: 100px; }
.coop-table .col-region      { width: 160px; }
.coop-table .col-legal       { width: 80px; }
.coop-table .col-legal-phone { width: 130px; }
.coop-table .col-addr { width: 210px; }
.inst-addr-input { width: 100%; padding: 6px 8px; border: 1px solid var(--border, #e2e8f0); border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.inst-detail-addr-save { margin-top: 10px; }
.coop-table .col-status      { width: 110px; text-align: center; }
.inst-status-badge { cursor: pointer; user-select: none; }
.coop-table .col-addtime     { width: 150px; }
.coop-table .col-recommend   { width: 160px; text-align: left; padding-left: 8px; color: #475569; }
.coop-table .col-updatetime  { width: 150px; }
.btn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  background: none;
}
.btn-toggle.btn-enable.on,
.btn-toggle.btn-recommend.on {
  background: #dcfce7;
  color: #16a34a;
  border-color: #bbf7d0;
}
.btn-toggle.btn-enable.off,
.btn-toggle.btn-recommend.off {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}
.btn-toggle.btn-recommend.on {
  background: #fef3c7;
  color: #d97706;
  border-color: #fde68a;
}

.org-role-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0 4px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  font-size: 13px;
  color: #475569;
}
.org-legend-title {
  font-weight: 600;
  color: #334155;
}
.org-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.org-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
/* 用工列表中标记「管理人员」 */
.role-badge.mgr {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  margin-left: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.green {
  background: #e6f7ec;
  color: #18a058;
}

.status-badge.orange {
  background: #fff7e6;
  color: #fa8c16;
}

.status-badge.yellow {
  background: #fffbe6;
  color: #d48806;
}

.status-badge.blue {
  background: #e6f4ff;
  color: #1677ff;
}

.status-badge.red {
  background: #fff1f0;
  color: #cf1322;
}

.status-badge.gray {
  background: var(--gray-100);
  color: var(--gray-500);
}

.status-badge.green.light {
  background: #e6f7ec;
  color: #18a058;
}

.status-badge.orange.light {
  background: #fff7e6;
  color: #fa8c16;
}

/* 所在节点层级色块 */
.node-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.node-badge.lv-1 { background: #e0e7ff; color: #4338ca; }
.node-badge.lv-2 { background: #cffafe; color: #0e7490; }
.node-badge.lv-3 { background: #ccfbf1; color: #0d9488; }
.node-badge.lv-4 { background: #dcfce7; color: #16a34a; }
.node-badge.lv-5 { background: #ecfccb; color: #65a30d; }
.node-badge.lv-6 { background: #ffedd5; color: #ea580c; }
.node-badge.lv-7 { background: #ede9fe; color: #7c3aed; }

.coop-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-600);
}

.coop-page-size select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
}

.coop-page-list {
  display: flex;
  gap: 6px;
}

.coop-page-item {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-700);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.coop-page-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.coop-page-item.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.coop-page-item:disabled,
.coop-page-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--gray-200);
  color: var(--gray-400);
}
.coop-page-item:not(.disabled):hover {
  border-color: var(--primary);
  color: var(--primary);
}
.coop-page-item.active:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.coop-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  color: var(--gray-400);
  font-size: 13px;
  user-select: none;
}

.resident-pagination {
  gap: 14px;
}
.resident-pagination .coop-page-goto {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-600);
  font-size: 13px;
}
.resident-pagination .coop-page-goto input {
  width: 44px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 13px;
  color: var(--gray-700);
  background: var(--white);
}
.resident-pagination .coop-page-goto input:focus {
  outline: none;
  border-color: var(--primary);
}

.coop-detail-card .coop-detail-body {
  padding: 16px 18px;
}

.coop-detail-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 12px;
}

.coop-detail-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.coop-detail-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.coop-detail-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.coop-detail-info {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.coop-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.coop-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coop-detail-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  flex: 1;
}

.coop-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coop-detail-field .label {
  font-size: 12px;
  color: var(--gray-500);
}

.coop-detail-field .value {
  font-size: 13px;
  color: var(--gray-800);
  font-weight: 500;
}

.coop-detail-logs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coop-log-item {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--gray-100);
  font-size: 13px;
}

.coop-log-time {
  color: var(--gray-400);
  width: 150px;
  flex-shrink: 0;
}

.coop-log-text {
  color: var(--gray-700);
}

@media (max-width: 1280px) {
  .coop-detail-fields {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .coop-inst-layout {
    grid-template-columns: 1fr;
  }

  .coop-inst-tree {
    max-height: 320px;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-actions {
    margin-left: 0;
  }

  .coop-detail-fields {
    grid-template-columns: repeat(2, 1fr);
  }
}

.unit-item.active {
  background: #fff7e6;
  color: #fa8c16;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #fa8c16;
}

.unit-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 房号图例 */
.room-legend {
  display: flex;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600);
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.legend-item:hover {
  background: var(--gray-100);
}
.legend-item.active {
  background: #fff7e6;
  color: #d46b08;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #ffd591;
}
.legend-managed-icon {
  color: #7c3aed;
  font-size: 9px;
}
.legend-item.active[data-managed] {
  background: #f5f3ff;
  color: #7c3aed;
  box-shadow: inset 0 0 0 1px #ddd6fe;
}
.legend-item.active[data-managed] .legend-managed-icon {
  color: #7c3aed;
}
.legend-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 4px 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--gray-600);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.legend-refresh:hover {
  color: #0ea5e9;
  border-color: #0ea5e9;
  background: #f0f9ff;
}
.legend-refresh:active {
  transform: scale(0.94);
}
.room-legend.has-filter .legend-item:not(.active) {
  opacity: 0.45;
}
.legend-filter-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 10px;
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}
.legend-filter-tip button {
  border: none;
  background: transparent;
  color: #d46b08;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
}
.legend-filter-tip button:hover { color: #ad4e00; }

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.owner { background: var(--success); }
.legend-dot.rent { background: var(--primary); }
.legend-dot.sale { background: var(--secondary); }
.legend-dot.empty { background: var(--gray-300); }
.legend-dot.decoration { background: var(--info); }

/* 房屋管理页图例颜色与卡片对齐 */
.room-legend .legend-dot.owner { background: #07c160; }
.room-legend .legend-dot.rent { background: #2563eb; }
.room-legend .legend-dot.sale { background: #faad14; }
.room-legend .legend-dot.empty { background: #d9d9d9; }
.room-legend .legend-dot.decoration { background: #13c2c2; }
.room-legend .legend-dot.warning { background: #f5222d; }

/* 房号网格：单列视图时前面带添加按钮，每行 1 个加号 + 4 户 */
.room-grid {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(5, 56px);
  gap: 8px;
  align-content: flex-start;
  justify-content: start;
}

/* 选中"全部"时整体横向排列：每层为一列，楼层横向铺开，横向滚动 */
.room-grid.horizontal {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, 56px);
  grid-auto-columns: 56px;
  overflow-y: hidden;
  overflow-x: auto;
  align-content: center;
}

/* 按图例过滤后单排横向展开 */
.room-grid.filter-horizontal {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-template-rows: 56px;
  grid-auto-columns: 56px;
  overflow-y: hidden;
  overflow-x: auto;
  align-content: flex-start;
  justify-content: start;
}

.room-card {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  font-weight: 600;
  transition: all 0.15s;
  position: relative;
}

.room-card:hover {
  transform: scale(1.08);
  filter: brightness(1.05);
}

.room-card.selected {
  box-shadow: 0 0 0 2px var(--gray-800, #1f2937), 0 6px 16px rgba(0, 0, 0, .18);
  transform: scale(1.12);
  z-index: 4;
}
.room-card.hidden {
  display: none;
}

.room-card .room-no {
  font-size: 13px;
}

/* 状态颜色（纯色，贴近参考图） */
.room-card.owner { background: #07c160; }
.room-card.rent { background: #2563eb; }
.room-card.sale { background: #faad14; }
.room-card.empty { background: #d9d9d9; color: var(--gray-700); }
.room-card.decoration { background: #13c2c2; }
.room-card.warning { background: #f5222d; }

/* 异常状态右上角白色三角标记 */
.room-card.warning::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 13px 13px 0;
  border-color: transparent rgba(255, 255, 255, 0.92) transparent transparent;
}

/* 代管房屋右上角盾牌图标标记 */
.room-card .room-managed-flag {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  color: #7c3aed;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  z-index: 5;
  border: 1px solid #ede9fe;
}

/* 添加房屋入口卡片 */
.room-card.add-room {
  background: var(--white);
  color: var(--gray-400);
  border: 1px dashed var(--gray-300);
  font-size: 18px;
}
.room-card.add-room:hover {
  color: #fa8c16;
  border-color: #fa8c16;
  background: #fff7e6;
  transform: scale(1.08);
}
/* "全部"视图中加号跨整行显示在顶部，不破坏每层分组 */
.room-grid.horizontal .add-room-top {
  grid-column: 1 / -1;
  justify-self: start;
  align-self: start;
  width: 56px;
}

/* 房屋详情 */
.house-detail {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--gray-100);
}

.detail-tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.detail-tab:hover {
  color: var(--primary);
}

.detail-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.detail-content {
  padding: 20px;
  min-height: 180px;
}

.detail-empty {
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  gap: 10px;
}

.detail-empty i {
  font-size: 32px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item label {
  font-size: 12px;
  color: var(--gray-500);
}

.detail-item span {
  font-size: 14px;
  color: var(--gray-800);
  font-weight: 500;
}

.detail-resident-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.resident-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  min-width: 220px;
}

.resident-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.resident-avatar .info p {
  font-weight: 600;
  color: var(--gray-800);
}

.resident-avatar .info span {
  font-size: 12px;
  color: var(--gray-500);
}

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.data-table th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.data-table td {
  color: var(--gray-700);
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

.data-table .user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-table .user-cell img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.badge-sm {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #cffafe; color: #0e7490; }
.badge-default { background: var(--gray-100); color: var(--gray-600); }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px dashed #cbd5e1; }

/* 6列统计卡 */
.stats-grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1400px) { .stats-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .stats-grid-6 { grid-template-columns: repeat(2, 1fr); } }

/* 待分配统计卡高亮 */
.stat-card-accent { border-color: #fcd34d; background: linear-gradient(135deg, #fffbeb, #ffffff); }
.stat-card-accent .stat-value { color: #b45309; }

/* 区域标签 */
.region-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--teal-50, #f0fdfa); color: var(--teal-700, #0f766e); font-size: 12px; font-weight: 600; }

/* 缴费管理：金额高亮 */
.res-pay-amount { font-weight: 700; color: #0f766e; }
.payment-table .res-role-tag { background: #eef2ff; color: #4338ca; font-weight: 600; }

/* 缴费管理：左侧边栏与右侧内容区等高（Flex 拉伸，避免 Grid 百分比高度循环依赖） */
#payment .coop-inst-layout { display: flex; align-items: stretch; }
#payment .coop-inst-tree { flex: 0 0 260px; height: auto; }
#payment .coop-inst-main { flex: 1; min-width: 400px; height: auto; width: 0; }
#payment .device-list-sidebar { height: 100%; }
.region-tag-lg { padding: 4px 12px; font-size: 13px; }

/* 缴费管理：缴费统计 + 状态分布 */
.pay-rank-card { margin-bottom: 24px; }
.pay-rank-card .card-body { padding: 20px; }
.pay-rank-body { display: flex; gap: 24px; align-items: stretch; }
.pay-stat-left { flex: 1; display: flex; flex-direction: column; }
.pay-stat-title { font-size: 16px; font-weight: 700; color: var(--gray-800); margin: 0 0 16px 0; }
.pay-stat-chart-wrap { position: relative; width: 200px; height: 200px; margin: 0 auto; }
.pay-stat-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.pay-stat-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.pay-stat-center-label { font-size: 12px; color: var(--gray-500); }
.pay-stat-center-value { font-size: 24px; font-weight: 700; color: #2563eb; }
.pay-rate-distribution { flex: 0 0 45%; display: flex; flex-direction: column; justify-content: center; padding-left: 24px; border-left: 1px dashed var(--gray-200); }
.pay-rate-bars { display: flex; flex-direction: column; gap: 18px; }
.pay-rate-bar-item { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--gray-700); }
.pay-rate-bar-label { width: 48px; text-align: right; font-weight: 600; }
.pay-rate-bar-track { flex: 1; height: 16px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.pay-rate-bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.pay-rate-bar-info { width: 70px; text-align: right; }
.pay-rate-bar-count { font-size: 16px; font-weight: 700; color: var(--gray-800); }
.pay-rate-bar-pct { font-size: 12px; color: var(--gray-500); }
.pay-rate-summary { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--gray-200); font-size: 13px; color: var(--gray-600); }

/* 项目名称：与项目类型/类别同色（正文色） */
.proj-name-text { color: var(--gray-800, #1f2937); font-weight: 600; cursor: default; }

/* 推荐机构列表（我的项目表格） */
.rec-agencies { font-size: 12px; color: var(--gray-600); line-height: 1.5; }
.rec-agency-item { display: block; }

/* 完整区域路径（省/市/县/区/街道/乡镇） */
.region-full-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--gray-700, #374151); line-height: 1.6; }
.region-full-path::before { content: ''; display: inline-block; width: 14px; height: 14px; background: linear-gradient(135deg,#0d9488,#14b8a6); border-radius: 3px; margin-right: 2px; vertical-align: middle; }

/* 详情面板核心指标卡片行 */
.proj-metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 16px; padding: 12px; background: var(--gray-50, #f8fafc); border-radius: 10px; border: 1px solid var(--gray-150, #f1f5f9); }
.proj-metric-card { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border-radius: 8px; border: 1px solid var(--gray-150, #f1f5f9); }
.proj-metric-card i { color: var(--teal-500, #14b8a6); font-size: 15px; width: 18px; text-align: center; }
.proj-metric-card strong { font-size: 20px; font-weight: 800; color: var(--gray-800, #1f2937); min-width: 28px; text-align: right; }
.proj-metric-card span { font-size: 11px; color: var(--gray-500, #6b7280); white-space: nowrap; }

/* 楼栋单元 Tab - 汇总栏 */
.buildings-summary { display: flex; gap: 16px; padding: 10px 14px; background: linear-gradient(135deg,#f0fdfa,#ecfeff); border-radius: 10px; margin-bottom: 12px; border: 1px solid rgba(13,148,136,.12); grid-column: 1 / -1; }
.bs-item { display: flex; align-items: center; gap: 6px; }
.bs-item i { color: var(--teal-600, #0d9488); font-size: 13px; }
.bs-item strong { font-size: 17px; font-weight: 800; color: var(--teal-700, #0f766e); }
.bs-item span { font-size: 12px; color: var(--gray-500, #6b7280); }

/* 宽字段（区域/地址） */
.inst-field-wide { grid-column: span 2 !important; }

/* ═══ 区域运营看板：地图 + 柱状图布局 ═══ */
.region-dashboard { background: #fff; border: 1px solid var(--gray-200, #eef2f7); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.region-dash-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.region-dash-title { font-size: 15px; font-weight: 700; color: var(--gray-800, #1f2937); display: flex; align-items: center; gap: 8px; }
.region-dash-title i { color: var(--teal-600, #0d9488); }
.region-dash-summary { font-size: 13px; color: var(--gray-500, #6b7280); }
.region-back-btn { font-size: 12px; padding: 4px 12px; border: 1px solid var(--teal-300, #99f6e4); border-radius: 20px; background: var(--teal-50, #f0fdfa); color: var(--teal-700, #0f766e); cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 4px; }
.region-back-btn:hover { background: var(--teal-100, #ccfbf1); border-color: var(--teal-400, #2dd4bf); }

/* 左右分栏 */
.region-dash-body { display: flex; gap: 16px; min-height: 340px; }
.region-map-area { flex: 2; min-width: 0; border: 1px solid var(--gray-150, #f1f5f9); border-radius: 12px; background: #fafbfc; overflow: hidden; position: relative; }
.region-chart-area { flex: 1; min-width: 220px; max-width: 320px; border: 1px solid var(--gray-150, #f1f5f9); border-radius: 12px; background: #fff; padding: 16px; display: flex; flex-direction: column; }

/* 中国地图 SVG */
.china-map-container, .fujian-map-container { width: 100%; height: 100%; min-height: 330px; display: flex; align-items: center; justify-content: center; padding: 8px; box-sizing: border-box; }
.china-map-svg { width: 100%; height: auto; max-height: 360px; }
.fujian-map-svg { width: 100%; height: auto; max-height: 380px; }
.china-province { transition: all .2s; }
.china-province:hover { opacity: .85; }
.province-fj { cursor: pointer !important; }
.province-fj:hover { filter: brightness(1.1) drop-shadow(0 0 8px rgba(13,148,136,.4)); }

/* 福建省城市圆点 */
.fj-city-dot { transition: all .2s; }
.fj-city-dot:hover { r: +3; filter: brightness(1.15); }
.city-active { stroke-width: 3 !important; stroke: #fff !important; filter: drop-shadow(0 0 6px rgba(13,148,136,.5)) !important; }

/* 图例 */
.map-legend { position: absolute; bottom: 10px; left: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.legend-item { font-size: 11px; color: var(--gray-500, #6b7280); display: flex; align-items: center; gap: 4px; }
.legend-item i { font-size: 9px; }

/* 横向柱状图（参考欠费楼栋排行风格） */
.region-chart-title { font-size: 14px; font-weight: 700; color: var(--gray-800, #1f2937); margin-bottom: 4px; }
.chart-subtitle { font-size: 11px; font-weight: 400; color: var(--gray-400, #9ca3af); margin-left: 4px; }
.h-bar-list { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 4px 0; }
.h-bar-row { display: flex; align-items: center; gap: 10px; }
.h-bar-label { width: 52px; font-size: 13px; font-weight: 600; color: var(--gray-700, #374151); flex-shrink: 0; text-align: right; }
.h-bar-track { flex: 1; height: 22px; background: #f1f5f9; border-radius: 11px; overflow: hidden; position: relative; }
.h-bar-fill { height: 100%; border-radius: 11px; transition: width .6s cubic-bezier(.22,1,.36,1); min-width: 2px; position: relative; }
.h-bar-fill::after { content:''; position:absolute;top:2px;left:6px;right:6px;height:6px;background:rgba(255,255,255,.25);border-radius:3px; }
.h-bar-value { width: 56px; text-align: right; flex-shrink: 0; }
.h-bar-value strong { font-size: 15px; font-weight: 800; color: var(--gray-800, #1f2937); }
.h-bar-value small { display: block; font-size: 10px; color: var(--gray-400, #9ca3af); font-weight: 500; }
.h-bar-footer { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--gray-200, #eef2f7); display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-500, #6b7280); }
.h-bar-footer strong { color: var(--gray-800, #1f2937); }
.text-secondary { color: var(--gray-500, #6b7280) !important; }
.res-bar-row { padding: 4px 8px; margin: -4px -8px; border-radius: 8px; transition: background .2s; }
.res-bar-row:hover { background: rgba(13,148,136,.06); }
.res-bar-row.active { background: rgba(13,148,136,.12); }

.region-dash-tip { margin-top: 12px; font-size: 12px; color: var(--gray-400, #9ca3af); display: flex; align-items: center; gap: 6px; }

/* 项目管理-住户管理隐藏住户分布看板（与平台管理-数据治理-住户管理不联动） */
#resident[data-view-source="project"] #resRegionDash { display: none !important; }

/* 设备布局 */
.device-layout {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.device-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 16px 0;
  box-shadow: var(--shadow);
}

.device-category-title {
  padding: 0 18px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.device-category-list {
  list-style: none;
}

.device-category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.device-category-item i {
  width: 18px;
  text-align: center;
  color: var(--gray-400);
}

.device-category-item:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

.device-category-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}

.device-category-item.active i {
  color: var(--primary);
}

.device-category-count {
  margin-left: auto;
  font-size: 12px;
  padding: 2px 8px;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: 999px;
}

.device-category-item.active .device-category-count {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}

/* 资产管理：左侧栏目导航（参考应用商城 coop-inst-layout 模式） */
.pfa-sub-layout { margin-top: 16px; min-height: 420px; }
.pfa-sub-sidebar { min-height: 360px; }
.pfa-sub-sidebar .device-category-item { font-weight: 500; }
.pfa-sub-panel { display: flex; flex-direction: column; gap: 16px; width: 100%; }

/* 分红配置概览面板 */
#pfaDivConfigOverview { width: 100%; min-width: 0; box-sizing: border-box; }
.pfa-divcfg-footer { display: flex; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--gray-200); background: var(--gray-50); border-radius: 0 0 12px 12px; }
.pfa-divcfg-status { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; margin-bottom: 14px; }
.pfa-divcfg-status-label { font-size: 13px; color: var(--gray-500); }
.pfa-divcfg-status-val { font-size: 14px; font-weight: 700; }
.pfa-divcfg-status-val.on { color: #047857; }
.pfa-divcfg-status-val.off { color: #b45309; }
.pfa-divcfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pfa-divcfg-cell { padding: 14px 16px; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; border-left: 3px solid var(--teal, #0D9488); }
.pfa-divcfg-cell-title { font-size: 13px; color: var(--gray-600); margin-bottom: 6px; }
.pfa-divcfg-cell-ratio { font-size: 20px; font-weight: 800; color: var(--gray-900); line-height: 1.1; }
.pfa-divcfg-cell-amount { font-size: 14px; font-weight: 700; color: #0f766e; margin-top: 4px; }
.pfa-divcfg-cell-sub { font-size: 11.5px; color: #0369a1; margin-top: 5px; padding-top: 4px; border-top: 1px dashed #bfdbfe; }
.pfa-divcfg-updated { margin-top: 16px; padding: 4px 2px; font-size: 12.5px; color: #64748b; text-align: left; }
.pfa-divcfg-section { margin-top: 18px; }
.pfa-divcfg-section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 10px; padding-left: 10px; border-left: 3px solid var(--teal, #0D9488); }
.pfa-divcfg-section-title > span { display: flex; align-items: center; gap: 8px; }
.pfa-divcfg-config-btn { margin-left: auto; font-size: 12px; padding: 4px 10px; }
/* 已配置后的「编辑」按钮：用琥珀色与「配置」(蓝色 btn-primary) 明确区分，避免误操作 */
.pfa-divcfg-edit-btn { margin-left: auto; font-size: 12px; padding: 4px 10px; background: #fff7ed; border-color: #f59e0b; color: #b45309; }
.pfa-divcfg-edit-btn:hover { background: #ffedd5; border-color: #ea580c; color: #9a3412; }
.pfa-divcfg-edit-btn i { color: #f59e0b; }
.pfa-divcfg-hint { margin-top: 8px; padding-left: 14px; font-size: 13px; color: var(--gray-500); line-height: 1.6; }
/* 审核通过后概览页只读展示（配置按钮下方） */
.pfa-div-readonly-block { margin-top: 12px; padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.pfa-div-sub-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 10px; padding-left: 10px; border-left: 3px solid #f59e0b; }
.pfa-div-sub-title > span { display: flex; align-items: center; gap: 8px; }
.pfa-div-ro-row { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; font-size: 13.5px; line-height: 1.6; }
.pfa-div-ro-label { flex: 0 0 76px; color: #64748b; }
.pfa-div-ro-row > span:last-child { color: #0f172a; font-weight: 600; }
/* 只读部门卡片：灰底虚线边框，明确不可编辑 */
.pfa-div-dm-card.pfa-div-dm-readonly { background: #fff; border-style: dashed; border-color: #cbd5e1; box-shadow: none; }
.pfa-div-dm-card.pfa-div-dm-readonly .pfa-div-dm-tag { opacity: .9; }
.pfa-divcfg-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; margin-bottom: 14px; }
.pfa-divcfg-status-left { display: flex; align-items: center; gap: 12px; }
.pfa-divcfg-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; }
.pfa-divcfg-role-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 16px; font-size: 12px; font-weight: 600; color: var(--gray-700); background: var(--gray-50); border: 1px solid var(--gray-200); }
.pfa-divcfg-role-tag.main { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; }
/* 运营机构/部门及权重 配置弹窗 */
.pfa-opcfg { padding: 6px 2px; }
.pfa-opcfg-block { margin-bottom: 14px; }
.pfa-opcfg-step { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: #0f172a; margin-bottom: 10px; }
.pfa-opcfg-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal, #0D9488); color: #fff; font-size: 13px; }
.pfa-opcfg-modes { display: flex; flex-direction: row; gap: 12px; }
.pfa-opcfg-radio { display: flex; flex-direction: column; gap: 4px; padding: 10px 16px; border: 1.5px solid var(--gray-200); border-radius: 10px; cursor: pointer; background: #fff; flex: 1; align-items: center; text-align: center; }
.pfa-opcfg-radio b { font-size: 14px; color: #0f172a; }
.pfa-opcfg-radio-desc { font-size: 12px; color: var(--gray-500); }
.pfa-opcfg-radio:has(input:checked) { border-color: var(--teal, #0D9488); background: #f0fdfa; }
.pfa-opcfg-sub { margin: 6px 0 4px; padding: 14px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; }
.pfa-opcfg-field { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pfa-opcfg-field:last-child { margin-bottom: 0; }
.pfa-opcfg-field > label { flex: 0 0 130px; font-size: 13px; color: var(--gray-700); font-weight: 600; }
.pfa-opcfg-field > input, .pfa-opcfg-field > select, .pfa-opcfg-field > textarea { flex: 1; }
.pfa-divcfg-role-tag.op { color: #b45309; background: #fffbeb; border-color: #fcd34d; }
.pfa-divcfg-role-tag.other { color: var(--gray-600); }
.pfa-divrecord-empty { padding: 40px; text-align: center; color: var(--gray-500); font-size: 14px; }
.pfa-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 0 4px; font-size: 13px; color: var(--gray-600); }
.pfa-pager-btn { border: 1px solid var(--gray-300, #d1d5db); background: #fff; color: var(--gray-700); border-radius: 7px; padding: 6px 14px; font-size: 13px; cursor: pointer; transition: all .15s; }
.pfa-pager-btn:hover:not([disabled]) { border-color: var(--teal, #0D9488); color: var(--teal, #0D9488); }
.pfa-pager-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pfa-pager-info { color: var(--gray-600); min-width: 90px; text-align: center; }
.pfa-div-opmode { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; padding: 0 2px; }
.pfa-div-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-700); cursor: pointer; }
.pfa-div-radio input { width: 15px; height: 15px; accent-color: var(--teal, #0D9488); cursor: pointer; }
.pfa-div-op-agency-only { display: none; }

/* 应用商城：一级栏目（分组）/ 二级栏目 */
.device-category-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.device-category-group > span {
  flex: 1;
  min-width: 0;
}

.device-category-group .group-chevron {
  width: 14px;
  font-size: 11px;
  color: var(--gray-400);
  transition: transform 0.2s;
}

.device-category-group.open .group-chevron {
  transform: rotate(90deg);
}

.device-category-group > i.fa-layer-group,
.device-category-group > i.fa-clock-rotate-left {
  width: 18px;
  text-align: center;
  color: var(--primary);
}

.device-category-group .device-category-count {
  margin-left: auto;
}

.device-category-sublist {
  list-style: none;
}

.device-category-subitem {
  padding-left: 42px;
  font-weight: 400;
  color: var(--gray-600);
}

.device-category-subitem i {
  color: var(--gray-400);
}

/* 应用商城状态搜索栏 */
.app-store-status-filter {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 160px;
}

.status-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 260px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 8px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.status-filter-wrap:hover,
.status-filter-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.status-filter-wrap i {
  color: var(--gray-400);
  font-size: 13px;
}

.status-filter-wrap select {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--gray-700);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

/* 平台设备页：左侧分类列表（替代组织树），填满 260px 列 */
.device-list-sidebar {
  width: 100%;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 16px 0;
  height: 100%;
  min-height: 580px;
}

.device-main {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 20px;
}

.device-integrated {
  padding: 0;
  overflow: hidden;
}

.device-integrated .device-sidebar {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--gray-200);
  box-shadow: none;
  background: var(--white);
  min-height: 100%;
}

.device-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.device-toolbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}

.device-toolbar-title i {
  color: var(--primary);
  font-size: 14px;
}

.device-toolbar-actions-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.device-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-table-wrap {
  overflow-x: auto;
  border-radius: 0;
  border: none;
}

.device-table {
  min-width: 1100px;
  border: none;
}

.device-table th,
.device-table td {
  border-bottom: 1px solid var(--gray-100);
}

.device-table tbody tr:last-child td {
  border-bottom: none;
}

.device-table th:first-child,
.device-table td:first-child {
  padding-left: 16px;
  text-align: center;
}

.device-table th:last-child,
.device-table td:last-child {
  padding-right: 16px;
}

.device-sn-link {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.device-sn-link:hover {
  text-decoration: underline;
}

.device-row-check,
#deviceSelectAll {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.device-search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.device-search-actions .device-search-box {
  width: 220px;
}

.device-search-actions .device-search-box input {
  font-size: 13px;
}

/* 图标按钮 */
.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.btn-icon:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

.btn-icon-success {
  background: #10b981;
  border-color: #10b981;
  color: var(--white);
}

.btn-icon-success:hover {
  background: #059669;
  border-color: #059669;
  color: var(--white);
}

.btn-icon-xs {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

/* 工具栏内带文字的主按钮，与 btn-icon 等高 */
.btn-icon-text {
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.device-table {
  min-width: 1100px;
}

.device-table th,
.device-table td {
  padding: 12px 14px;
  white-space: nowrap;
}

.device-table td {
  font-size: 13px;
}

/* 设备卡片 */
.device-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.device-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform 0.2s;
}

.device-card:hover {
  transform: translateY(-3px);
}

.app-ico {
  color: var(--primary);
  margin-right: 8px;
}

.app-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-500);
  margin: -6px 0 14px;
  min-height: 42px;
}

.device-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.device-header h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}

.device-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.device-status.online { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.device-status.offline { background: var(--gray-400); }
.device-status.warning { background: var(--warning); box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }

.device-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.device-info div {
  display: flex;
  flex-direction: column;
}

.device-info span:first-child {
  font-size: 12px;
  color: var(--gray-500);
}

.device-info span:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.device-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

/* 应用商城：左侧分类 + 横向拉长卡片（每行一个应用） */
.app-store-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.app-store-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
}
.app-store-card .app-store-ico {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.10);
}
.app-store-card .app-store-main {
  flex: 1 1 auto;
  min-width: 0;
}
.app-store-card .device-header {
  margin-bottom: 8px;
  justify-content: flex-start;
  gap: 10px;
}
.app-store-card .app-desc {
  margin: 0 0 10px;
  min-height: 0;
}
.app-store-card .device-info {
  grid-template-columns: repeat(4, auto);
  gap: 8px 36px;
  margin-bottom: 0;
}
.app-store-card .device-footer.app-store-actions {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding-top: 0;
  border-top: none;
}
.app-store-card .patrol-store-links {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 13px;
}
.app-store-card .patrol-store-links .patrol-link {
  color: var(--primary);
  cursor: pointer;
}
.app-store-card .patrol-store-links .patrol-link.patrol-demo {
  color: var(--gray-400);
}
.patrol-store-expired .app-store-ico {
  color: var(--gray-400);
  background: rgba(148, 163, 184, 0.12);
}

/* 公告 */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notice-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  display: flex;
  gap: 16px;
}

.notice-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notice-content {
  flex: 1;
}

.notice-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.notice-content p {
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.notice-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--gray-400);
}

.notice-item { align-items: flex-start; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.notice-item.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(13,148,136,.12); }
.notice-item .ntc-check { margin-top: 4px; width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.notice-content .badge-sm { margin-left: 4px; }

/* 停车 */
.parking-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.parking-card {
  padding: 24px;
  text-align: center;
}

.parking-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.parking-label {
  color: var(--gray-500);
  font-size: 14px;
}

/* 设置 */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.settings-card {
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.settings-card i {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.settings-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.settings-card p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* 系统设置：卡片网格 → 点击进入面板内容（无侧边栏） */
.settings-detail-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.settings-detail-bar h2 { font-size: 18px; font-weight: 600; color: var(--gray-800); margin: 0; }
.settings-panels { /* 面板容器 */ }
.settings-panel { display: none; }
.settings-panel.active { display: block; animation: fadeIn .2s ease; }
.settings-panel .card { margin-bottom: 18px; }

/* 表单辅助 */
.form-group { margin-bottom: 0; }
.form-group label { display: block; font-size: 13px; color: var(--gray-600); margin-bottom: 6px; font-weight: 500; }
.gen-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.gen-form-grid .form-group.full { grid-column: 1 / -1; }
.gen-form-grid .form-control { width: 100%; }
@media (max-width: 640px) { .gen-form-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }
.export-grid { display: flex; flex-wrap: wrap; gap: 10px; }

/* 个人资料 */
.profile-row { display: flex; align-items: center; gap: 14px; }
.profile-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; flex: none; }
.profile-meta { flex: 1; }
.profile-name { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.profile-role { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.settings-hint { font-style: normal; font-size: 12px; color: var(--gray-400); margin-left: 6px; }

/* 登录设备 */
.settings-device-list { margin-top: 16px; border-top: 1px dashed var(--gray-200); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.settings-device { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--gray-600); }
.settings-device i { color: var(--gray-400); width: 18px; text-align: center; }
.settings-device .settings-device-time { margin-left: auto; color: var(--gray-400); font-size: 12px; }

/* 权限配置 */
.perm-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: stretch; }
@media (max-width: 1100px) { .perm-layout { grid-template-columns: 1fr; } }
.perm-left { position: sticky; top: 18px; height: 100%; }
.perm-left .card { height: 100%; display: flex; flex-direction: column; }
.perm-left .card-body { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.perm-right { display: flex; flex-direction: column; gap: 18px; }

/* 权限配置：角色列表树 */
.perm-role-head { padding: 4px 4px 12px; border-bottom: 1px solid var(--gray-100); margin-bottom: 8px; }
.perm-role-head-text { font-size: 14px; color: var(--gray-700); margin-left: 8px; font-weight: 500; }
.perm-role-tree { font-size: 14px; }
.rt-group { }
.rt-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: var(--radius-sm); cursor: pointer; transition: background .12s; }
.rt-row:hover { background: var(--gray-50); }
.rt-group-row { font-weight: 600; color: var(--gray-800); }
.rt-caret { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--gray-400); transition: transform .18s; flex: none; }
.rt-group.open > .rt-group-row .rt-caret { transform: rotate(90deg); }
.rt-group.has-child > .rt-group-row .rt-caret { color: var(--gray-500); }
.rt-group.pt-leaf > .rt-group-row .rt-caret { visibility: hidden; }
.rt-icon { width: 18px; text-align: center; color: var(--gray-500); font-size: 14px; }
.rt-group-label { flex: 1; }
.rt-children { margin-left: 14px; padding-left: 12px; border-left: 1px dashed var(--gray-200); display: none; }
.rt-group.open > .rt-children { display: block; }
.rt-role-row.open + .rt-children { display: block; }
.rt-role-row.open > .rt-caret { transform: rotate(90deg); }
.rt-caret-placeholder { width: 16px; height: 16px; display: inline-flex; flex: none; }
.rt-role-row { position: relative; padding-left: 28px; }
.rt-role-row.active { background: var(--primary-light); }
.rt-role-row.active .rt-label { color: var(--primary); }
.rt-role-row .perm-box { margin-right: 4px; }
/* 系统用户 - 角色类型侧栏：去箭头、图标灰色区隔、选中高亮 */
.sysuser-role-tree .rt-group-row .rt-caret { display: none; }
.sysuser-role-tree .rt-icon-normal,
.sysuser-role-tree .rt-icon-admin { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; margin-right: 4px; color: var(--gray-500); }
.sysuser-role-tree .rt-icon-normal { background: #dbeafe; }
.sysuser-role-tree .rt-icon-admin { background: #ede9fe; }
.sysuser-role-tree .rt-group-row[data-roletype="普通角色"].active { background: rgba(37,99,235,.10); }
.sysuser-role-tree .rt-group-row[data-roletype="普通角色"].active .rt-label { color: #2563eb; }
.sysuser-role-tree .rt-group-row[data-roletype="管理角色"].active { background: rgba(124,58,250,.10); }
.sysuser-role-tree .rt-group-row[data-roletype="管理角色"].active .rt-label { color: #7c3aed; }
.rt-role-icon { font-size: 13px; color: var(--gray-400); }
.rt-tag { font-size: 11px; color: var(--primary); background: var(--primary-light); padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.rt-view { margin-left: auto; font-size: 13px; color: var(--primary); text-decoration: none; }
.rt-view:hover { text-decoration: underline; }
.rt-actions { display: inline-flex; gap: 3px; margin-left: 8px; align-items: center; }
.rt-act { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600); font-size: 12px; border-radius: 4px; cursor: pointer; padding: 0; }
.rt-act:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.rt-act-del:hover { border-color: var(--danger); color: var(--danger); background: rgba(229,72,77,0.08); }

/* 权限配置：快捷工具栏 */
.perm-quickbar { display: flex; gap: 8px; flex-wrap: wrap; }

/* 权限配置：菜单权限树 */
.perm-tree { font-size: 14px; }
.pt-node { }
.pt-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: background .12s; }
.pt-row:hover { background: var(--gray-50); }
.pt-caret { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--gray-400); transition: transform .18s; flex: none; }
.pt-node.open > .pt-row .pt-caret { transform: rotate(90deg); }
.pt-node.has-child > .pt-row .pt-caret { color: var(--gray-500); }
.pt-children { margin-left: 14px; padding-left: 12px; border-left: 1px dashed var(--gray-200); display: none; }
.pt-node.open > .pt-children { display: block; }
.pt-leaf > .pt-row .pt-caret { visibility: hidden; }
.pt-label { color: var(--gray-700); user-select: none; }
.pt-node.has-child > .pt-row .pt-label { font-weight: 600; }

/* 权限配置：方框打勾（自定义 checkbox） */
.perm-box { display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.perm-box input { position: absolute; opacity: 0; width: 0; height: 0; }
.perm-box .box { width: 17px; height: 17px; border: 1.5px solid var(--gray-300); border-radius: 4px; background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; position: relative; }
.perm-box .box::after { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; color: #fff; opacity: 0; transform: scale(.6); transition: all .15s; }
.perm-box input:checked + .box { background: var(--primary); border-color: var(--primary); }
.perm-box input:checked + .box::after { opacity: 1; transform: scale(1); }
.perm-box input:indeterminate + .box { background: var(--primary); border-color: var(--primary); }
.perm-box input:indeterminate + .box::after { content: ""; width: 9px; height: 2px; background: #fff; border-radius: 1px; opacity: 1; transform: none; }
.perm-box input:focus-visible + .box { box-shadow: 0 0 0 3px var(--primary-light); }
/* 系统管理：最高内置角色，选择框灰底填充且禁用 */
.perm-box.rt-check-gray { cursor: not-allowed; }
.perm-box.rt-check-gray input:checked + .box { background: #9ca3af; border-color: #9ca3af; }
.perm-box.rt-check-gray input:checked + .box::after { opacity: 1; transform: scale(1); }

/* 权限配置：操作/数据权限方框列表 */
.perm-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.perm-check-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); cursor: pointer; transition: all .12s; }
.perm-check-item:hover { border-color: var(--primary); background: var(--gray-50); }
.perm-check-item .perm-check-text { font-size: 14px; color: var(--gray-700); user-select: none; }

/* 主题配色 */
.theme-swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.theme-swatch { width: 44px; height: 44px; border-radius: 12px; cursor: pointer; position: relative; border: 2px solid transparent; transition: transform .15s; }
.theme-swatch:hover { transform: scale(1.08); }
.theme-swatch.active { border-color: var(--gray-800); }
.theme-swatch.active::after { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #fff; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.logo-preview { width: 56px; height: 56px; border-radius: 12px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 920px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Toast */
/* 添加房屋弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  width: 640px;
  max-width: 100%;
  max-height: 90vh;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.22s ease;
}
.modal-sm {
  width: 520px;
}
@keyframes popIn {
  from { transform: translateY(16px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 9px;
}
.modal-header h3 i { color: #fa8c16; }
.modal-close {
  border: none;
  background: transparent;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
}
.modal-footer .btn-primary.modal-confirm {
  background: #fa8c16;
  border-color: #fa8c16;
}
.modal-footer .btn-primary.modal-confirm:hover {
  background: #e67d0e;
  border-color: #e67d0e;
}
.modal-lg {
  width: 720px;
}
/* 修复长内容弹窗（如新增人员）在 flex 列布局下 body 被收缩为 0 高度导致“中间空白”的问题 */
.modal-lg .modal-body {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

/* 电子巡更模块状态联动（侧边栏） */
.patrol-nav-hidden { display: none !important; }
.patrol-nav-active {
  box-shadow: inset 3px 0 0 var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.patrol-nav-locked { color: var(--gray-400) !important; cursor: not-allowed; }
.patrol-nav-locked i, .patrol-nav-locked span { color: var(--gray-400) !important; }

/* 基础服务包依赖 - 缴费管理/订单管理/报修工单 未开通态 */
.nav-item.bs-locked { color: var(--gray-400) !important; cursor: pointer; }
.nav-item.bs-locked i, .nav-item.bs-locked span { color: var(--gray-400) !important; }

.nav-tag {
  margin-left: auto;
  font-size: 11px;
  line-height: 1;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-tag-on { background: rgba(37,99,235,0.12); color: var(--primary); }
.nav-tag-off { background: #fee2e2; color: #b91c1c; }

/* 应用商城 - 电子巡更卡片状态 */
.btn-locked {
  background: var(--gray-200);
  color: var(--gray-400);
  border: 1px solid var(--gray-200);
  cursor: not-allowed;
}
.btn-locked:hover { background: var(--gray-200); color: var(--gray-400); }

/* 提现/分红 排期小红点 + 悬停提示 */
.pfa-sched-btn { position: relative; }
.pfa-sched-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
  animation: pfa-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes pfa-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.85; }
}
.pfa-sched-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  display: none;
  max-width: 320px;
  text-align: center;
}
.pfa-sched-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1f2937;
}
.pfa-sched-btn:hover .pfa-sched-tip { display: block; }
.pfa-demo-toggle {
  font-size: 11.5px;
  color: #888;
  background: #f3f4f6;
  border: 1px dashed #c8c8c8;
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all 0.18s;
}
.pfa-demo-toggle:hover { background: #ede9fe; color: #6d28d9; border-color: #a78bfa; }
.pfa-demo-toggle.active { background: #ede9fe; color: #6d28d9; border-color: #a78bfa; border-style: solid; }
.pfa-demo-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #f3f4f6;
  border: 1px dashed #c8c8c8;
  border-radius: 999px;
}
.pfa-demo-seg-label { font-size: 11px; color: #999; margin-right: 2px; }
.pfa-demo-seg-btn {
  font-size: 11.5px;
  color: #777;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 2px 9px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.pfa-demo-seg-btn:hover { border-color: #a78bfa; color: #6d28d9; }
.pfa-demo-seg-btn.active { background: #ede9fe; color: #6d28d9; border-color: #a78bfa; font-weight: 600; }
.patrol-store-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.patrol-link {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}
.patrol-link:hover { text-decoration: underline; }
.patrol-demo { color: var(--gray-400); font-size: 11px; }

/* 开通/续费弹窗 */
.patrol-purchase-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.pp-left { border-right: 1px solid var(--gray-200); padding-right: 24px; }
.pp-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: rgba(37,99,235,0.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 12px;
}
.pp-name { font-size: 18px; margin: 0 0 4px; }
.pp-vendor { font-size: 12px; color: var(--gray-500); margin-bottom: 10px; }
.pp-desc { font-size: 13px; color: var(--gray-600); line-height: 1.6; margin: 0 0 14px; }
.pp-section-title { font-size: 13px; font-weight: 600; color: var(--gray-700); margin: 6px 0 10px; }
.pp-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pp-features li { font-size: 13px; color: var(--gray-700); display: flex; align-items: center; gap: 8px; }
.pp-features li i { color: var(--primary); font-size: 12px; }
.pp-price { display: flex; align-items: baseline; gap: 2px; color: #e11d48; margin-bottom: 14px; }
.pp-cur { font-size: 18px; font-weight: 700; }
.pp-num { font-size: 34px; font-weight: 800; line-height: 1; }
.pp-unit { font-size: 14px; color: var(--gray-500); margin-left: 2px; }
.pp-free-apply {
  display: inline-flex; align-items: center; gap: 4px; margin: -4px 0 14px auto;
  font-size: 13px; font-weight: 600; color: #d97706; text-decoration: none;
  cursor: pointer; width: fit-content; padding: 4px 12px;
  border: 1px dashed #d97706; border-radius: 999px; background: rgba(217, 119, 6, 0.08);
}
.pp-free-apply:hover { background: rgba(217, 119, 6, 0.16); }
.pp-period { display: flex; gap: 10px; margin-bottom: 16px; }
.pp-period-opt {
  flex: 1; border: 1px solid var(--gray-300); border-radius: var(--radius-md);
  background: var(--white); padding: 10px 6px; cursor: pointer; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--gray-700); transition: all .15s;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.pp-period-opt small { font-weight: 400; font-size: 11px; color: var(--gray-500); }
.pp-period-opt:hover { border-color: var(--primary); }
.pp-period-opt.active { border-color: var(--primary); background: rgba(37,99,235,0.08); color: var(--primary); }
.pp-period-opt.active small { color: var(--primary); }
.pp-scale-opt {
  flex: 1; border: 1px solid var(--gray-300); border-radius: var(--radius-md);
  background: var(--white); padding: 10px 6px; cursor: pointer; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--gray-700); transition: all .15s;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.pp-scale-opt small { font-weight: 400; font-size: 11px; color: var(--gray-500); }
.pp-scale-opt:hover { border-color: var(--primary); }
.pp-scale-opt.active { border-color: var(--primary); background: rgba(37,99,235,0.08); color: var(--primary); }
.pp-scale-opt.active small { color: var(--primary); }
.pp-field { margin-bottom: 14px; }
.pp-field label { display: block; font-size: 13px; color: var(--gray-600); margin-bottom: 6px; }
.pp-summary { font-size: 14px; font-weight: 600; color: var(--gray-800); margin-bottom: 14px; }
.pp-summary .pp-origin { text-decoration: line-through; color: var(--gray-400); font-weight: 400; margin-right: 4px; }
.pp-summary .pp-level-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #047857; background: #ecfdf5; margin: 0 2px; }
.pp-summary .pp-pay-amount { color: #e11d48; }
.pp-pay-extra { font-size: 12.5px; line-height: 1.6; margin: -6px 0 12px; padding: 8px 12px; border-radius: 10px; }
.pp-pay-extra-ok { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }
.pp-pay-extra-warn { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.pp-pay-extra b { font-weight: 700; }
.pp-tip { font-size: 12px; color: var(--gray-400); line-height: 1.6; margin: 10px 0 0; }
.btn-block { width: 100%; justify-content: center; }

@media (max-width: 640px) {
  .patrol-purchase-body { grid-template-columns: 1fr; }
  .pp-left { border-right: none; border-bottom: 1px solid var(--gray-200); padding-right: 0; padding-bottom: 16px; }
}
/* 设备弹窗 - 单选组 */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 6px;
}
.radio-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
}
.radio-item input[type=radio] {
  accent-color: var(--primary);
  cursor: pointer;
}
/* 设备弹窗 - 图片上传 */
.dev-img-upload {
  width: 80px;
  height: 80px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-400);
  transition: all 0.2s;
  background: var(--white);
}
.dev-img-upload:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.dev-img-upload.has-img {
  border-style: solid;
  padding: 2px;
  background-size: cover;
  background-position: center;
}
/* 设备弹窗 - 地图区域 */
.dev-map-container {
  width: 100%;
  height: 260px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #f0f2f5;
}
.dev-map-canvas {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(200,210,220,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,210,220,.3) 1px, transparent 1px);
  background-size: 40px 40px;
  position: relative;
  cursor: crosshair;
}
/* 模拟地图瓦片效果 */
.dev-map-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(13,148,136,.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(59,130,246,.06) 0%, transparent 45%),
    linear-gradient(135deg, #e8f4f3 0%, #f0f2f5 50%, #fef3e8 100%);
  z-index: 0;
}
/* 模拟道路 */
.dev-map-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 48%, #d4d8de 48%, #d4d8de 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, #d4d8de 48%, #d4d8de 52%, transparent 52%);
  background-size: 160px 120px;
  z-index: 0;
  opacity: .5;
}
.dev-map-marker {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  animation: markerBounce 0.5s ease;
}
.dev-map-marker i {
  font-size: 28px;
  color: #2563eb;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.dev-map-marker-label {
  background: var(--white);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--gray-700);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  white-space: nowrap;
  margin-top: -2px;
  border: 1px solid #e0e0e0;
}
@keyframes markerBounce {
  0% { transform: translate(-50%, -180%); }
  60% { transform: translate(-50%, -95%); }
  100% { transform: translate(-50%, -100%); }
}
.dev-map-placeholder {
  display: none;
}
/* 编辑模式 - 设备名称编辑按钮 */
.dev-name-edit-btn {
  color: var(--teal-600);
  border-color: var(--teal-200);
  background: var(--teal-50);
}
.dev-name-edit-btn:hover {
  background: var(--teal-100);
}
/* 编辑模式 - SN 操作图标行 */
#devSnActions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 4px 0;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 4px;
}
#devSnActions .btn-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
#devSnActions .btn-icon:hover {
  color: var(--teal-600);
  border-color: var(--teal-300);
  background: var(--teal-50);
}
/* 删除设备确认弹窗 */
.delete-confirm-text {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 12px;
  line-height: 1.6;
}
.delete-device-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 38vh;
  overflow-y: auto;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--gray-50);
}
.delete-device-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #fff;
  border-radius: 8px;
}
.delete-device-name {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 13px;
}
.delete-device-sn {
  color: var(--gray-400);
  font-size: 12px;
  font-family: var(--font-mono, monospace);
}
.delete-device-bound {
  margin-left: auto;
  color: #cf1322;
  font-size: 12px;
  background: #fff1f0;
  border: 1px solid #ffccc7;
  border-radius: 6px;
  padding: 1px 6px;
}
.form-row { margin-bottom: 18px; }
.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row.three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
/* 机构审核弹窗 */
.review-summary {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 14px;
}
.review-summary strong { color: var(--gray-800); }
.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
}
.review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  background: var(--gray-50);
}
.review-item-main { flex: 1; min-width: 0; }
.review-item-name {
  font-weight: 600;
  color: var(--gray-800);
  font-size: 14px;
  margin-bottom: 6px;
}
.review-item-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.review-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field > label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.6;
  padding-top: 2px;
  margin-bottom: 1px;
}
.form-row.two { align-items: flex-start; }
.form-field select,
.form-field input,
.house-row input,
.house-row select,
.house-batch-block textarea {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  height: auto;
  min-height: 38px;
  line-height: 1.4;
}
.form-field select:focus,
.form-field input:focus,
.house-row input:focus,
.house-row select:focus,
.house-batch-block textarea:focus {
  outline: none;
  border-color: #fa8c16;
  box-shadow: 0 0 0 3px rgba(250, 140, 22, 0.15);
}
.radio-group { display: flex; gap: 22px; }
.radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
}
.radio input { accent-color: #fa8c16; width: 16px; height: 16px; }
.house-info-block {
  margin-top: 6px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 14px;
  background: #fafafa;
  overflow-x: hidden;
}
.house-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.house-info-head h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}
.house-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  overflow-x: hidden;
}
.house-thead,
.house-row {
  display: grid;
  grid-template-columns: 76px 80px 108px 66px 78px 78px 30px;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.house-thead {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
}
.house-thead .col-act { text-align: center; }
.house-row input,
.house-row select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  font-size: 12px;
}
.house-row .row-del {
  border: none;
  background: #fff1f0;
  color: var(--danger);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}
.house-row .row-del:hover { background: var(--danger); color: #fff; }
.required {
  color: var(--danger);
  margin-right: 2px;
}
.range-inputs {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  gap: 8px;
  align-items: center;
}
.range-inputs input {
  text-align: center;
}
.range-sep {
  text-align: center;
  color: var(--gray-400);
  font-size: 14px;
}
.house-batch-block {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.house-batch-block label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
}
.house-batch-block select,
.house-batch-block input {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13px;
  color: var(--gray-800);
  background: var(--white);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.house-batch-block select:focus,
.house-batch-block input:focus {
  outline: none;
  border-color: #fa8c16;
  box-shadow: 0 0 0 3px rgba(250, 140, 22, 0.15);
}
.house-batch-block select {
  width: 100%;
}
.batch-example {
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
}

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 18px;
  background: var(--gray-800);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  min-width: 240px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning,
.toast.warn { background: #d97706; }
.toast.info { background: #2563eb; }

/* 响应式 */
@media (max-width: 1280px) {
  .stats-grid,
  .device-grid,
  .parking-overview {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .house-layout {
    grid-template-columns: 1fr;
  }
  .house-left {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .content {
    margin-left: 0;
  }
  .stats-grid,
  .device-grid,
  .parking-overview,
  .settings-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .device-layout {
    flex-direction: column;
  }
  .device-sidebar {
    width: 100%;
  }
  .device-toolbar {
    flex-direction: row;
    align-items: center;
  }
  .device-search-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .device-search-actions .device-search-box,
  .device-search-actions .select-sm,
  .device-search-actions .btn-sm {
    width: 100%;
  }
  .topbar-right .search-box {
    display: none;
  }
}

/* ===== 机构详情内嵌面板（合作管理 / 平台管理） ===== */
.inst-detail-panel {
  margin-top: 16px;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  width: 100%;
  flex-shrink: 0;
}
/* 平台机构管理：详情面板默认收起，点击表格行后展开 */
#platform-org #platInstDetail { display: none; }
.inst-detail-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #eef2f6;
  padding: 0 18px;
  background: #fafbfc;
  width: 100%;
}
.inst-detail-tab {
  position: relative;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.inst-detail-tab:hover { color: #0f172a; }
.inst-detail-tab.active {
  color: #0D9488;
  font-weight: 600;
}
.inst-detail-tab.active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 2px;
  border-radius: 1px;
  background: #0D9488;
}

.inst-detail-content {
  padding: 22px 24px;
  min-height: 200px;
  width: 100%;
  box-sizing: border-box;
}
.inst-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #cbd5e1;
  width: 100%;
}
.inst-detail-empty i {
  font-size: 32px;
  color: #e2e8f0;
}
.inst-detail-empty p {
  margin: 0;
  font-size: 14px;
}

/* 详情头部（机构名称 + 徽标 + 统计） */
.inst-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}
.inst-detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}
.inst-detail-meta {
  flex: 1;
  min-width: 0;
}
.inst-detail-meta h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}
.inst-detail-meta .inst-detail-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.inst-detail-stats-inline {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}
.inst-stat-mini {
  text-align: center;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 10px;
}
.inst-stat-mini .val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #0D9488;
  line-height: 1.2;
}
.inst-stat-mini .lbl {
  font-size: 11px;
  color: #94a3b8;
}

/* 分区字段 */
.inst-section {
  margin-bottom: 18px;
}
.inst-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.inst-section-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: #0D9488;
}
.inst-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.inst-field {
  min-width: 0;
}
.inst-field > label::after {
  content: '：';
}
.inst-field-label::after {
  content: '：';
}
.inst-field.full {
  grid-column: 1 / -1;
}
.inst-field-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 5px;
}
.inst-field-value {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inst-field-value .muted {
  color: #cbd5e1;
  font-weight: 400;
}

/* 报修工单：处理记录时间线 */
.rep-timeline { padding: 4px 0 0; }
.rep-timeline-item { position: relative; padding-left: 32px; padding-bottom: 18px; }
.rep-timeline-item::before {
  content: '';
  position: absolute;
  left: 11px; top: 22px; bottom: -4px;
  width: 2px;
  background: #e2e8f0;
}
.rep-timeline-item.last::before { display: none; }
.rep-timeline-ico {
  position: absolute;
  left: 0; top: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #0D9488;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.rep-timeline-title { font-size: 14px; font-weight: 600; color: var(--gray-800, #1f2937); }
.rep-timeline-time { font-size: 12px; color: var(--gray-500, #6b7280); margin: 2px 0 4px; }
.rep-timeline-desc { font-size: 13px; color: var(--gray-600, #4b5563); line-height: 1.5; }

/* 下级机构列表 */
.inst-children-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.inst-child-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
}
.inst-child-item:hover {
  border-color: #0D9488;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.08);
}
.inst-child-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.inst-child-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inst-child-lv {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

/* 操作记录表 */
.inst-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.inst-log-table th {
  text-align: left;
  padding: 10px 14px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  border-bottom: 1px solid #eef2f6;
  white-space: nowrap;
}
.inst-log-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}
.inst-log-table tr:last-child td { border-bottom: none; }

@media (max-width: 768px) {
  .inst-detail-header {
    flex-wrap: wrap;
  }
  .inst-detail-stats-inline {
    width: 100%;
    justify-content: flex-start;
  }
  .inst-fields {
    grid-template-columns: 1fr;
  }
  .inst-children-list {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   住户管理
   ═══════════════════════════════════════════════════════════ */

/* ── 表格 ── */
.resident-table {
  table-layout: fixed;
  width: 100%;
}
.resident-table th,
.resident-table td {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resident-table tbody tr { cursor: pointer; }
.resident-table tbody tr.active { background: #f0fdfa; }

/* 姓名单元格 */
.res-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.res-name-text {
  font-weight: 500;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-auth-text {
  font-size: 12px;
  font-weight: 500;
}
.res-auth-text.certified { color: #0d9488; }
.res-auth-text.uncertified { color: #94a3b8; }
.res-phone {
  font-family: Consolas, Monaco, monospace;
  color: #475569;
  letter-spacing: 0.02em;
}

/* 角色标签 */
.res-role-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.res-role-tag.admin {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

/* 房间名称 */
.res-room-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #ccfbf1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.res-room-tag.empty {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}
.res-time-text { color: #64748b; font-size: 11.5px; }
.res-time-text.expired { color: #b91c1c; font-weight: 600; }

/* ── 详情：头部概览 ── */
.res-detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.res-detail-avatar {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}
.res-detail-avatar.cat-employee { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.res-detail-avatar.cat-visitor { background: linear-gradient(135deg, #d97706, #fbbf24); }
.res-detail-avatar.cat-pk-owner { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.res-detail-avatar.cat-pk-monthly { background: linear-gradient(135deg, #6366f1, #818cf8); }
.res-detail-avatar.cat-pk-temp { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.res-detail-avatar.cat-pk-visitor { background: linear-gradient(135deg, #64748b, #94a3b8); }
.res-detail-titlebox { flex: 1; min-width: 200px; }
.res-detail-titlebox h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}
.res-detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.res-detail-quick {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.res-quick-item {
  text-align: center;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  min-width: 76px;
}
.res-quick-item .val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #0d9488;
  line-height: 1.2;
}
.res-quick-item .lbl { font-size: 11px; color: #94a3b8; }

.res-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid #eef2f6;
  background: #f8fafc;
}
.res-detail-actions .btn { font-weight: 500; }
.btn-success { background: #0d9488; color: #fff; border-color: #0d9488; }
.btn-success:hover { background: #0f766e; }
.btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: #d97706; color: #fff; border-color: #d97706; }
.btn-warning:hover { background: #b45309; }
.btn-xs { padding: 4px 10px; font-size: 12px; line-height: 1.4; }

/* ── 关联成员卡片 ── */
.res-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.res-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.res-member-card:hover {
  border-color: #0d9488;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.08);
}
.res-member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #64748b, #94a3b8);
}
.res-member-info { flex: 1; min-width: 0; }
.res-member-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.res-member-meta {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-relation-tag {
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #ccfbf1;
}

/* ── 授权通道 ── */
.res-channel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.res-channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #fff;
}
.res-channel-item.off { background: #fafbfc; opacity: 0.85; }
.res-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #0d9488;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
}
.res-channel-item.off .res-channel-icon {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.res-channel-body { flex: 1; min-width: 0; }
.res-channel-name { font-size: 13.5px; font-weight: 600; color: #1e293b; }
.res-channel-desc {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 通行记录表 ── */
.res-pass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.res-pass-table th {
  text-align: left;
  padding: 10px 14px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  border-bottom: 1px solid #eef2f6;
  white-space: nowrap;
}
.res-pass-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}
.res-pass-table tr:last-child td { border-bottom: none; }
.res-dir-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.res-dir-tag.in { background: #ecfdf5; color: #047857; }
.res-dir-tag.out { background: #eff6ff; color: #1d4ed8; }

/* ── 关联凭证 ── */
.res-cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.res-cred-card {
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.res-cred-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #0d9488;
}
.res-cred-card.inactive::before { background: #cbd5e1; }
.res-cred-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.res-cred-head i {
  font-size: 14px;
  color: #0d9488;
  width: 18px;
  text-align: center;
}
.res-cred-card.inactive .res-cred-head i { color: #94a3b8; }
.res-cred-title { font-size: 13.5px; font-weight: 700; color: #1e293b; flex: 1; }
.res-cred-value {
  font-size: 13px;
  color: #334155;
  font-family: Consolas, Monaco, monospace;
  word-break: break-all;
  margin-bottom: 6px;
}
.res-cred-meta { font-size: 11.5px; color: #94a3b8; }

/* ── 关联网证 ── */
.res-online-card {
  display: flex;
  gap: 18px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid #ccfbf1;
  background: linear-gradient(135deg, #f0fdfa, #ffffff 60%);
  flex-wrap: wrap;
}
.res-online-badge {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.22);
}
.res-online-badge i { font-size: 26px; }
.res-online-badge span { font-size: 11px; font-weight: 600; }
.res-online-badge.inactive {
  background: linear-gradient(135deg, #94a3b8, #cbd5e1);
  box-shadow: none;
}
.res-online-body { flex: 1; min-width: 240px; }
.res-online-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.res-online-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 18px;
}
.res-online-field .lbl { font-size: 11.5px; color: #94a3b8; }
.res-online-field .lbl::after { content: "："; }
.res-online-field .val {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
  word-break: break-all;
}

@media (max-width: 1280px) {
  .resident-table th,
  .resident-table td { font-size: 12px; }
}
@media (max-width: 768px) {
  .res-detail-quick { width: 100%; }
  .res-member-grid,
  .res-channel-list,
  .res-cred-grid { grid-template-columns: 1fr; }
}

/* 项目管理·财务管理 子模块 */
.pfs-actions { display: flex; gap: 12px; margin-top: 18px; }

/* 财务概况：趋势图 */
.pfo-trend-card .card-body { padding: 14px 16px 18px; }
.pfo-chart-wrap { height: 260px; position: relative; }

/* 财务设置：分区标题 / 收款渠道 */
.form-section-title { font-weight: 600; color: var(--gray-700, #374151); margin: 22px 0 12px; padding-left: 10px; border-left: 3px solid var(--primary, #2563eb); font-size: 14px; }
.form-section-title:first-of-type { margin-top: 4px; }
.pfs-channels { display: flex; flex-wrap: wrap; gap: 14px 26px; margin: 4px 0 6px; }
.pfs-channel { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--gray-700, #374151); cursor: pointer; user-select: none; }
.pfs-channel input { width: 16px; height: 16px; accent-color: var(--primary, #2563eb); cursor: pointer; }
.form-field-switch { display: flex; align-items: center; justify-content: space-between; }
.form-field-switch--spaced { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.form-field-switch--spaced:last-child { border-bottom: 0; }
.card-sub { font-size: 13px; color: var(--gray-500); margin-left: auto; font-weight: 400; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: var(--gray-300); border-radius: 26px; transition: .2s; }
.switch .slider:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.pfa-integral-status { font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 10px; }
.pfa-integral-status.on { background: #ecfdf5; color: #047857; }
.pfa-integral-status.off { background: #fef2f2; color: #dc2626; }
.pfa-earn-hint { font-size: 13px; color: #b45309; background: #fffbeb; border: 1px dashed #fcd34d; padding: 8px 12px; border-radius: 8px; margin-bottom: 4px; }
#project-finance-assets [data-earn]:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(1); }
.pfa-intg-subs { margin-top: 6px; border-top: 1px solid #eef2f7; padding-top: 12px; }
.pfa-intg-sub-title { font-size: 12px; font-weight: 700; color: var(--gray-500); letter-spacing: .04em; margin-bottom: 6px; }
.pfa-intg-sub { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eef2f7; }
.pfa-intg-sub:last-child { border-bottom: none; }
.pfa-intg-sub-label { font-size: 14px; color: #334155; font-weight: 600; }
.pfa-intg-sub .switch input:disabled + .slider { background: #e2e8f0; cursor: not-allowed; }
.pfa-intg-tag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }

/* 车辆管理：车辆 / 车位 视图切换（分段控件，高亮凸显） */
.seg-control {
  display: inline-flex;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.seg-btn {
  border: none;
  background: transparent;
  padding: 9px 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.seg-btn:hover { color: #0f172a; background: rgba(255,255,255,.65); }
.seg-btn i { font-size: 14px; }
.seg-btn.active {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(13,148,136,.35);
  transform: translateY(-1px);
}
.seg-btn.active i { color: #fff; }
.parking-space-table .res-name-text { font-weight: 600; color: #0f172a; }
.parking-space-table .col-check { width: 40px; text-align: center; }

/* 车辆/车位工具栏按钮：未勾选时禁用态 */
.btn:disabled, .btn-icon:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(.4);
}
.btn:disabled:hover, .btn-icon:disabled:hover { background: inherit; color: inherit; }

/* 车位表格行内操作按钮 */
.parking-space-table .col-action {
  white-space: nowrap;
  display: flex;
  gap: 4px;
  align-items: center;
}
.btn-text {
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #0d9488;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .15s;
  font-family: inherit;
}
.btn-text:hover { background: rgba(13,148,136,.1); }
.btn-text i { font-size: 12px; }
.btn-text-danger { color: #e11d48; }
.btn-text-danger:hover { background: rgba(225,29,72,.1); }

/* 协同部门及权重配置弹窗 */
.pfa-dcfg-tip { margin-bottom: 14px; padding: 10px 12px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; font-size: 13px; color: #9a3412; line-height: 1.6; }
.pfa-dcfg-rules { margin-bottom: 14px; padding: 10px 14px; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 10px; }
.pfa-dcfg-rules-title { font-size: 13px; font-weight: 700; color: #0f766e; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.pfa-dcfg-rules-list { margin: 0; padding-left: 20px; }
.pfa-dcfg-rules-list li { font-size: 12.5px; color: #134e4a; line-height: 1.7; margin-bottom: 2px; }
.pfa-dcfg-rules-list b { color: #0f766e; }
.pfa-dcfg-dept { padding: 12px 14px; border: 1px solid var(--gray-200, #e2e8f0); border-radius: 10px; margin-bottom: 10px; background: #fff; }
.pfa-dcfg-dept-chk { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.pfa-dcfg-dept-chk input { width: 16px; height: 16px; cursor: pointer; }
.pfa-dcfg-grp { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.pfa-dcfg-grp.ext { background: #fff7ed; color: #b45309; border-color: #fed7aa; }
.pfa-dcfg-members { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--gray-200, #e2e8f0); }
.pfa-dcfg-sub { font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.pfa-dcfg-plist { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 4px; }
.pfa-dcfg-p { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.pfa-dcfg-p input { width: 15px; height: 15px; cursor: pointer; }
.pfa-dcfg-prole { font-style: normal; font-size: 11px; color: #94a3b8; }
.pfa-dcfg-leadrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pfa-dcfg-leadrow label { font-size: 13px; color: #475569; }
.pfa-dcfg-leadsel { padding: 5px 8px; border: 1px solid var(--gray-300, #cbd5e1); border-radius: 7px; font-size: 13px; background: #fff; }
.pfa-dcfg-leadw { padding: 5px 8px; border: 1px solid var(--gray-300, #cbd5e1); border-radius: 7px; font-size: 13px; }

/* 项目主体下「参与分配项目经理」折叠区 + 配置权重按钮 */
.pfa-mgr-collapse { background: #f0f9ff !important; border-color: #bae6fd !important; }
.pfa-mgr-collapse .pfa-collab-collapse-head i.fa-user-tie { color: #0284c7; margin-right: 6px; }
.pfa-mgr-collapse-cfgbtn { display: inline-block; margin-left: 8px; padding: 3px 10px; font-size: 12px; color: #fff; background: #0284c7; border-radius: 6px; cursor: pointer; user-select: none; font-weight: 500; }
.pfa-mgr-collapse-cfgbtn:hover { background: #0369a1; }
.pfa-mgr-card { padding: 10px 12px; border: 1px solid #e0f2fe; border-radius: 10px; background: #fff; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pfa-mgr-card:last-child { margin-bottom: 0; }
.pfa-mgr-card-left { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; }
.pfa-mgr-card-name { font-size: 14px; font-weight: 700; color: #0f172a; }
.pfa-mgr-card-role { font-size: 12px; color: #64748b; margin-left: 6px; font-weight: 400; }
.pfa-mgr-card-share { font-size: 13px; color: #0284c7; font-weight: 700; }
.pfa-mgr-card-overall { color: #94a3b8; font-weight: 500; margin-left: 2px; }
.pfa-mgr-card-lead { font-size: 11px; color: #fff; background: #0284c7; padding: 2px 6px; border-radius: 999px; margin-left: 6px; }

/* 人员表格「性别」列 */
.coop-table .col-gender { width: 64px; white-space: nowrap; text-align: left; }
.coop-table .col-cert { width: 78px; white-space: nowrap; text-align: left; }

/* 删除确认弹窗内的姓名清单 */
.org-del-names {
  margin-top: 10px;
  max-height: 168px;
  overflow-y: auto;
  padding: 8px 10px;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.9;
  color: #334155;
}
.org-del-names:empty { display: none; }
.org-del-names .org-del-item { display: block; }
.org-del-names .org-del-dept { color: #94a3b8; font-size: 12px; margin-left: 6px; }

/* ===== 角色独立工作台页（web端，参考运营APP 各角色 home 模板） ===== */
.role-workbench-page { max-width: 1200px; margin: 0 auto; padding: 8px 0 24px; }
.wb-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.wb-back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; color: var(--gray-600); background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; cursor: pointer; transition: all .2s; }
.wb-back:hover { color: var(--primary); border-color: var(--primary); }
.wb-title { display: flex; align-items: center; gap: 14px; }
.wb-title h1 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin: 0; }
.wb-title p { font-size: 13px; color: var(--gray-500); margin: 2px 0 0; }
.wb-sec-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--gray-900); margin: 24px 0 14px; }
.wb-sec-title:first-of-type { margin-top: 4px; }
.wb-stats { margin-bottom: 8px; }
.wb-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.wb-mod { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px 16px; text-align: center; cursor: pointer; transition: all .2s; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); }
.wb-mod:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(13, 148, 136, 0.14); border-color: var(--primary); }
.wb-mod .mi { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 22px; color: #fff; }
.wb-mod .mi.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.wb-mod .mi.green { background: linear-gradient(135deg, #10b981, #059669); }

/* 数据概览页（首页默认） */
.overview-header { align-items: flex-start; }
.overview-kpi { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }
.overview-kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all .2s;
}
.overview-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
.overview-kpi-label { font-size: 13px; color: #64748b; margin-bottom: 6px; }
.overview-kpi-value { font-size: 26px; font-weight: 700; color: #1e293b; line-height: 1.2; }
.overview-kpi-trend { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 8px; }
.overview-kpi-trend.up { color: #10b981; }
.overview-kpi-trend.down { color: #ef4444; }
.overview-kpi-trend i { font-size: 11px; }

.overview-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.overview-chart-card .card-body { padding: 18px; }
.overview-doughnut-wrap { display: flex; align-items: center; gap: 24px; min-height: 240px; }
.overview-doughnut-canvas { position: relative; width: 180px; height: 180px; flex-shrink: 0; }
.overview-doughnut-info { flex: 1; }
.overview-rate-label { font-size: 13px; color: #64748b; margin-bottom: 2px; }
.overview-rate-value { font-size: 32px; font-weight: 700; color: #3b82f6; line-height: 1.2; }
.overview-legend { list-style: none; margin: 14px 0 0; padding: 0; }
.overview-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; margin-bottom: 8px; }
.overview-legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.overview-legend .num { font-weight: 600; color: #1e293b; margin-left: auto; }
.overview-legend .pct { color: #94a3b8; font-size: 12px; }
.overview-legend-right { margin-top: 0; }
.overview-legend-right .num { margin-left: auto; }

.overview-access-row .card-header { display: flex; align-items: center; justify-content: space-between; }
.overview-subtitle { font-size: 12px; color: #94a3b8; font-weight: 400; }
.overview-access-body { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: center; padding: 18px; }
.overview-gate-list { display: flex; flex-direction: column; gap: 18px; }
.overview-gate-item { display: flex; flex-direction: column; gap: 10px; }
.overview-gate-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.overview-gate-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.overview-gate-dot { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; }
.overview-gate-dot[data-level="1"] { background: #fee2e2; }
.overview-gate-dot[data-level="2"] { background: #fecaca; }
.overview-gate-dot[data-level="3"] { background: #fca5a5; }
.overview-gate-dot[data-level="4"] { background: #f87171; }
.overview-gate-dot[data-level="5"] { background: #ef4444; }
.overview-gate-dot[data-level="6"] { background: #dc2626; }
.overview-heatmap-canvas { height: 180px; }

/* 月度收费统计 + 收费构成 */
.overview-finance-row { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 20px; margin-bottom: 20px; }
.overview-finance-chart .card-header { display: flex; align-items: center; justify-content: space-between; }
.overview-filter-group { display: flex; gap: 8px; }
.overview-filter-group .form-select-sm { padding: 5px 24px 5px 10px; font-size: 12px; border-radius: 8px; border: 1px solid #e2e8f0; background-color: #fff; color: #475569; }
.overview-finance-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.overview-fk-item { background: #f8fafc; border-radius: 12px; padding: 14px 12px; text-align: center; }
.overview-fk-label { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.overview-fk-value { font-size: 18px; font-weight: 700; color: #1e293b; }
.overview-fk-trend { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; margin-top: 4px; }
.overview-fk-trend.up { color: #10b981; }
.overview-fk-trend.down { color: #ef4444; }
.overview-mixed-canvas { height: 220px; }
.overview-fee-struct .card-header { display: flex; align-items: center; justify-content: space-between; }
.overview-doughnut-lg { width: 160px; height: 160px; }
.overview-fee-total { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f1f5f9; font-size: 13px; color: #64748b; display: flex; align-items: center; justify-content: space-between; }
.overview-fee-total span { font-size: 18px; font-weight: 700; color: #1e293b; }

/* 房屋状态 + 欠费楼栋 + 待办 */
.overview-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.overview-house-chart .card-body { min-height: 260px; }
.overview-bar-canvas { height: 220px; }
.overview-arrears-chart .card-body { padding: 18px; }

.overview-todo-row { margin-bottom: 20px; }
.overview-todo-row .card-header { display: flex; align-items: center; justify-content: space-between; }
.overview-todo-row .link-sm { font-size: 13px; color: #3b82f6; text-decoration: none; }
.overview-todo-row .link-sm:hover { text-decoration: underline; }
.overview-todo-list { display: flex; flex-direction: column; gap: 12px; }
.overview-todo-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #f1f5f9; border-radius: 12px; background: #fff; }
.overview-todo-tag { flex-shrink: 0; font-size: 12px; padding: 3px 8px; border-radius: 6px; font-weight: 500; }
.overview-todo-item.urgent .overview-todo-tag { background: #fee2e2; color: #dc2626; }
.overview-todo-item.warn .overview-todo-tag { background: #fef3c7; color: #b45309; }
.overview-todo-item.info .overview-todo-tag { background: #dbeafe; color: #2563eb; }
.overview-todo-main { flex: 1; }
.overview-todo-title { font-size: 14px; color: #1e293b; font-weight: 500; }
.overview-todo-meta { font-size: 12px; color: #94a3b8; margin-top: 2px; }

@media (max-width: 1200px) {
  .overview-finance-row { grid-template-columns: 1fr; }
  .overview-bottom-row { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .overview-kpi { grid-template-columns: repeat(3, 1fr); }
  .overview-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .overview-kpi { grid-template-columns: repeat(2, 1fr); }
  .overview-doughnut-wrap { flex-direction: column; text-align: center; }
  .overview-legend .num, .overview-legend-right .num { margin-left: 0; }
  .overview-access-body { grid-template-columns: 1fr; }
  .overview-finance-kpi { grid-template-columns: repeat(2, 1fr); }
  .overview-todo-item { flex-direction: column; align-items: flex-start; }
}
.wb-mod .mi.orange { background: linear-gradient(135deg, #f59e0b, #f97316); }
.wb-mod .mi.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.wb-mod .mi.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.wb-mod .mi.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.wb-mod .mi.amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.wb-mod .mt { font-size: 15px; font-weight: 600; color: #1e293b; }
/* 角色用户：权限配置双模式面板 */
.seg { display: flex; gap: 6px; }
.cfg-panel { border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; background: #f8fafc; }
.cfg-row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; }
.cfg-label { width: 72px; color: #64748b; font-size: 13px; flex-shrink: 0; }
.cfg-val { color: #0f172a; font-size: 14px; }
.cfg-perm-title { margin: 12px 0 8px; font-weight: 600; font-size: 13px; color: #334155; }
.cfg-perm-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.cfg-perm-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #1e293b; cursor: pointer; }
.cfg-perm-item input[type="checkbox"] {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  cursor: inherit;
  position: relative;
  flex-shrink: 0;
}
.cfg-perm-item input[type="checkbox"]:checked {
  background: #2563eb;
  border-color: #2563eb;
}
.cfg-perm-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cfg-perm-item input[type="checkbox"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.cfg-perm-tree { display: flex; flex-direction: column; gap: 12px; }
.cfg-perm-group { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; background: #fff; }
.cfg-perm-group-title { font-weight: 600; font-size: 13px; color: #0f172a; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #f1f5f9; }
.cfg-perm-children { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; padding-left: 8px; }

/* 权限查看：菜单权限树 */
.menu-perm-tree { display: flex; flex-direction: column; gap: 2px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; background: #fff; }
.menu-perm-node { display: flex; align-items: center; gap: 4px; min-height: 32px; }
.menu-perm-arrow { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 14px; flex-shrink: 0; }
.menu-perm-arrow.empty { visibility: hidden; }
.menu-perm-children { position: relative; padding-left: 18px; }
.menu-perm-children::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 8px; border-left: 1px dashed #cbd5e1; }
.menu-perm-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #1e293b; cursor: pointer; }
.menu-perm-item input[type="checkbox"] {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  cursor: inherit;
  position: relative;
  flex-shrink: 0;
}
.menu-perm-item input[type="checkbox"]:checked {
  background: #2563eb;
  border-color: #2563eb;
}
.menu-perm-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.menu-perm-item input[type="checkbox"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 全部类型 - 加粗+图标区分 */
.type-all {
  font-weight: 700 !important;
  color: #1e40af;
}
.type-all strong {
  font-weight: 800;
}
.type-all i {
  margin-right: 4px;
  color: #2563eb;
}

/* 左上角可编辑项目名称（仅项目管理下显示） */
.proj-name-edit {
  margin-left: 12px;
  padding: 2px 8px;
  border: 1px dashed transparent;
  border-radius: 4px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: text;
  outline: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-name-edit:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.proj-name-edit:focus {
  border-color: #2563eb;
  background: #fff;
}

/* ===== 机构详情面板（顶部水平 tabs + 主体内容） ===== */
.inst-3col-panel { padding: 0; }
.inst-3col-main {
  display: block;
}
.inst-3col-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}
.inst-3col-header .inst-detail-avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.inst-3col-header .inst-detail-meta { flex: 1; min-width: 0; }
.inst-3col-header .inst-detail-meta h4 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: #0f172a; }
.inst-3col-header .inst-detail-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inst-3col-header .inst-detail-stats-inline { display: flex; gap: 14px; flex-shrink: 0; }

.inst-3col-main .inst-detail-content {
  padding: 22px 24px;
  min-height: 240px;
}

/* 字段行（左右两列） */
.inst-fields-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}
/* 企业信息 tab：字段横向铺满整行（其他 tab 不变） */
.company-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 20px;
}
.company-fields .inst-field { min-height: 34px; }
.company-fields .inst-field-label {
  flex: 0 0 96px;
  font-size: 12px;
  text-align: left;
  padding-right: 10px;
}
.inst-field {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 4px 0;
}
.inst-field.full,
.inst-fields-row .full { grid-column: 1 / -1; }
.inst-field-label {
  flex: 0 0 130px;
  font-size: 13px;
  color: #64748b;
  text-align: right;
  padding-right: 14px;
  line-height: 1.4;
}
.inst-field-value {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #0f172a;
}
.inst-field-value .readonly-val { color: #0f172a; }
.inst-addr-input,
.inst-field-value input.form-control {
  width: 100%;
  height: 34px;
  padding: 4px 10px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.inst-addr-input:focus,
.inst-field-value input.form-control:focus {
  border-color: #0D9488;
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.inst-coord-row { display: flex; gap: 10px; }
.inst-coord-input { font-family: 'SF Mono', Menlo, Consolas, monospace; }

/* 地图 */
.inst-map-wrap {
  margin-top: 16px;
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eef2f6;
  background: #f8fafc;
}
.inst-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.inst-map-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #94a3b8;
}
.inst-map-empty i { font-size: 36px; color: #cbd5e1; }
.inst-map-empty p { margin: 0; font-size: 13px; }

/* 表单分组 */
.inst-form-section {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #eef2f6;
}
.inst-form-section:last-child { border-bottom: none; }
.inst-form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inst-form-section-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: #0D9488;
  display: inline-block;
}
/* 新增机构：合作类型单选（teal 主题） */
.inst-coop-radio { flex-wrap: wrap; row-gap: 10px; }
.inst-coop-radio input { accent-color: #0D9488; }

/* 操作按钮组 */
.inst-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

/* 资质上传 */
.inst-qual-uploads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.inst-qual-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inst-qual-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-align: center;
}
.inst-qual-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  min-height: 200px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.inst-qual-card:hover {
  border-color: #0D9488;
  background: #f0fdfa;
}
.inst-qual-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  min-height: 200px;
}
.inst-qual-placeholder i { font-size: 32px; color: #cbd5e1; }
.inst-qual-preview {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #f8fafc;
}
.inst-qual-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 12px;
  color: #475569;
  background: #fafbfc;
  border-top: 1px solid #f1f5f9;
}
.inst-qual-name {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  padding: 0 8px 8px;
  word-break: break-all;
}

@media (max-width: 900px) {
  .inst-detail-tabs { overflow-x: auto; }
  .inst-detail-tab { flex-shrink: 0; }
  .inst-fields-row { grid-template-columns: 1fr; }
  .inst-qual-uploads { grid-template-columns: 1fr; }
}
/* ===== 菜单列表（platform-menu-list）两栏布局 ===== */
.ml-layout { display: flex; gap: 16px; align-items: flex-start; }
.ml-side { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.ml-side-card { background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); overflow: hidden; }
.ml-side-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--gray-800, #1f2937); border-bottom: 1px solid var(--gray-100, #f3f4f6); }
.ml-side-head i { color: #0ea5e9; }
.ml-side-head .badge { margin-left: auto; }
.ml-side-list { list-style: none; margin: 0; padding: 6px 0; }
.ml-side-item { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 22px; font-size: 13px; color: var(--gray-700, #374151); cursor: pointer; border-left: 3px solid transparent; transition: background .15s, color .15s; }
.ml-side-item:hover { background: var(--gray-50, #f9fafb); }
.ml-side-item .ml-arrow { color: #cbd5e1; font-size: 11px; line-height: 1; width: 12px; }
.ml-side-item i.fa-solid:not(.ml-arrow) { width: 16px; color: var(--gray-500, #6b7280); }
.ml-side-item.active { background: #f0fdf4; color: #047857; border-left-color: #10b981; font-weight: 500; }
.ml-side-item.active i.fa-solid:not(.ml-arrow) { color: #10b981; }
.ml-main { flex: 1; min-width: 0; }
.org-scope-title { font-size: 15px; font-weight: 600; color: #0f172a; margin: 0; }
.ml-main-hint { text-align: right; color: var(--gray-500, #6b7280); font-size: 12px; margin-bottom: 8px; }
.ml-table th { font-size: 12.5px; }
.ml-table td { font-size: 13px; vertical-align: middle; }
.ml-table code { background: var(--gray-50, #f9fafb); padding: 2px 6px; border-radius: 4px; color: var(--gray-700, #374151); font-size: 12px; }
.ml-status-on { color: #10b981; font-weight: 500; }
.ml-table .btn-sm { margin-right: 4px; padding: 3px 10px; font-size: 12px; }
@media (max-width: 900px) {
  .ml-layout { flex-direction: column; }
  .ml-side { width: 100%; }
}
.ml-main-title { font-size: 14px; font-weight: 600; color: var(--gray-800, #1f2937); margin-bottom: 4px; }
.ml-main-title .ml-crumb { color: #0ea5e9; }
.ml-main-title .ml-crumb-sep { color: var(--gray-400, #9ca3af); margin: 0 6px; font-weight: 400; }

/* 房源管理 - 房号悬浮工具菜单 */
.room-hover-menu {
  position: fixed;
  z-index: 100;
  display: flex;
  flex-direction: column;
  min-width: 100px;
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  padding: 6px;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
  pointer-events: none;
}
.room-hover-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  border-color: #0ea5e9;
}
/* 竖向居中的三角箭号，开口80°指向被选中的房屋（默认朝左） */
.room-hover-menu::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 8.4px solid transparent;
  border-bottom: 8.4px solid transparent;
  border-right: 10px solid #0ea5e9;
  transform: translateY(-50%);
  pointer-events: none;
  filter: drop-shadow(-1px 0 1px rgba(0, 0, 0, .12));
}
/* 菜单翻到房屋左侧时，箭号朝右 */
.room-hover-menu.flip::before {
  left: auto;
  right: -10px;
  border-right: 0;
  border-left: 10px solid #0ea5e9;
  filter: drop-shadow(1px 0 1px rgba(0, 0, 0, .12));
}
.room-hover-title {
  font-size: 12px;
  font-weight: 600;
  color: #0ea5e9;
  padding: 4px 10px 8px;
  margin: 0 0 2px;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  white-space: nowrap;
}
.room-hover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--gray-700, #374151);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.room-hover-item:hover {
  background: var(--gray-50, #f9fafb);
  color: #0ea5e9;
}
.room-hover-item i {
  width: 16px;
  text-align: center;
  color: var(--gray-500, #6b7280);
  font-size: 13px;
}
.room-hover-item:hover i { color: #0ea5e9; }

/* 编辑房屋弹窗 */
#roomEditModal .form-field input[readonly] {
  background: var(--gray-50);
  color: var(--gray-600);
}
#roomEditModal .input-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}
#roomEditModal .input-unit input {
  flex: 1;
  min-width: 0;
}
#roomEditModal .input-unit .unit {
  font-size: 13px;
  color: var(--gray-600);
  white-space: nowrap;
}
#roomEditModal .radio-group {
  min-height: 38px;
  align-items: center;
}
/* 项目代理方：机构名称只读展示（数据调取，不可编辑） */
.pfa-readonly {
  background: #f8fafc !important;
  color: #64748b !important;
  cursor: not-allowed !important;
  border-color: #e2e8f0 !important;
}

/* 项目运营方：委托运营 / 内部运营 入口切换 */
.pfa-div-mode-tabs {
  display: flex;
  gap: 12px;
  padding: 10px 14px 0 14px;
}
.pfa-div-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-700);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
}
.pfa-div-mode-tab input[type=radio] {
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}
.pfa-div-mode-tab:has(input[type=radio]:checked) {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
  font-weight: 600;
}
.pfa-div-mode-tab.active {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary);
  font-weight: 600;
}
.pfa-div-readonly-val {
  display: inline-block;
  min-width: 56px;
  text-align: center;
  padding: 4px 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

/* 项目运营方：内部运营模式下，分配比例下方的内部分配占比 */
.pfa-div-collab-internal-share {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 8px;
}
.pfa-div-collab-dept-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 4px;
}
.pfa-div-collab-dept-card .pfa-div-dm-head {
  margin-bottom: 10px;
}
.pfa-div-collab-dept-card .pfa-div-dm-lead {
  margin-bottom: 10px;
}
.pfa-div-collab-dept-card .pfa-div-dm-lead .form-control {
  min-width: 110px;
}
.pfa-div-collab-dept-card .pfa-div-dm-lead-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.pfa-div-collab-dept-card .pfa-div-dm-nolead-tip {
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
}
.pfa-div-collab-dept-card .pfa-div-dm-lead .pfa-div-input-suffix {
  width: 90px;
}
.pfa-div-collab-dept-card .pfa-div-dm-lead .pfa-div-input-suffix .form-control {
  min-width: 0;
}
.pfa-div-collab-dept-card .pfa-div-dm-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
  padding: 4px 0;
}
.pfa-div-collab-dept-card .pfa-div-dm-row .pfa-div-dm-name {
  font-weight: 700;
  color: #0f172a;
}
.pfa-div-collab-dept-card .pfa-div-dm-members {
  border-top: 1px dashed #eef2f7;
  padding-top: 10px;
  margin-top: 6px;
}
.pfa-div-collab-dept-card .pfa-div-dm-share {
  color: var(--gray-500);
}

/* 我的账户·角色切换器（分红配置下方），按角色过滤 5 卡片 + 提现记录 */
.pfa-role-tabs { display: inline-flex; background: #f1f5f9; border-radius: 8px; padding: 3px; gap: 2px; }
.pfa-role-tab { border: 0; background: transparent; padding: 6px 14px; font-size: 12.5px; color: #475569; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; font-family: inherit; }
.pfa-role-tab:hover { color: #1e293b; }
.pfa-role-tab.active { background: #ffffff; color: #4f46e5; font-weight: 600; box-shadow: 0 1px 2px rgba(15,23,42,.08); }

/* 我的账户 - 记录栏目（分红/提现/充值/消费 4 标签页） */
.pfa-rec-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.pfa-rec-tab { border: 1px solid #e2e8f0; background: #fff; padding: 8px 16px; font-size: 13px; color: #475569; border-radius: 8px; cursor: pointer; transition: all .15s; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.pfa-rec-tab:hover { border-color: #c7d2fe; color: #4f46e5; }
.pfa-rec-tab.active { background: #4f46e5; border-color: #4f46e5; color: #fff; font-weight: 600; }
.pfa-rec-panel { animation: pfaRecFade .2s ease; }
@keyframes pfaRecFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.pfa-rec-empty { display: none; text-align: center; padding: 22px 0; color: #94a3b8; font-size: 13px; }
#pfaMyAccountStats, #capfaMyAccountStats { gap: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
#pfaMyAccountStats .stat-card, #capfaMyAccountStats .stat-card { padding: 16px 14px; }

/* 我的账户·栏目标题 + 角色切换（固定排版：左标题、右角色） */
.pfa-myaccount-title { font-size: 16px; font-weight: 700; color: var(--gray-800); letter-spacing: .5px; }
.pfa-text-gold { color: #d4a017; font-weight: 700; letter-spacing: .5px; }
#pfaMyAccountStats .stat-label, #capfaMyAccountStats .stat-label { font-size: 13px; }

/* ===== 新增/编辑平台项目弹窗增强：四列地区 + 地图 + 富文本 ===== */
.form-row.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.form-tip { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.proj-map-wrap { border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; background: #f8fafc; }
.proj-map-search-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--gray-100); }
.proj-map-search-bar input { height: 34px; padding: 0 10px; border: 1px solid var(--gray-200); border-radius: 6px; font-size: 13px; background: #fff; }
.proj-map-search-bar input[readonly] { background: #f8fafc; color: var(--gray-500); }
.proj-map-container { height: 260px; position: relative; background: #e2e8f0; }
.proj-map-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--gray-400); gap: 10px; cursor: crosshair; }
.proj-map-placeholder i { font-size: 42px; color: var(--gray-300); }
.proj-map-placeholder p { font-size: 13px; margin: 0; }
.proj-map-marker { position: absolute; width: 24px; height: 24px; background: #ef4444; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.2); pointer-events: none; }
.rich-editor { border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; background: #fff; }
.rich-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid var(--gray-100); }
.rich-editor-toolbar button { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 6px; color: var(--gray-600); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rich-editor-toolbar button:hover { background: #e2e8f0; color: var(--gray-800); }
.rich-editor-toolbar .rich-sep { width: 1px; height: 18px; background: var(--gray-200); margin: 0 4px; }
.rich-editor-content { min-height: 140px; max-height: 220px; overflow-y: auto; padding: 12px; font-size: 14px; line-height: 1.6; color: var(--gray-800); outline: none; }
.rich-editor-content:empty:before { content: '请输入项目概况…'; color: var(--gray-300); }

.proj-id-text { color: inherit; }
.prov-tag { color: inherit; }
.expire-overdue { color: #dc2626; font-weight: 600; }
