/* Pro-inspection-config-list-2 横屏三栏配置页 */
.pcfg2-view.view {
  padding: 0;
  max-width: none;
  min-height: 100%;
  height: 100%;
  background: #eef5fb;
}

.pcfg2-view.view.active {
  display: flex !important;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

body.pcfg2-landscape-lock {
  overflow: hidden;
}

body.pcfg2-landscape-lock .pcfg2-view.view.active,
body.pcfg2-landscape-lock .pcfg2-view.view.pcfg2-active {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  max-height: 100dvh;
  max-width: none;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
}

.pcfg2-landscape {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.pcfg2-landscape-lock .pcfg2-landscape {
  min-height: 0;
  height: 100%;
  flex: 1;
}

.pcfg2-hidden { display: none !important; }

.pcfg2-back {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.pcfg2-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2e6bd9 0%, #1f56c0 100%);
  padding: 6px 8px;
  padding-top: max(6px, env(safe-area-inset-top, 0px));
  min-height: 40px;
  box-sizing: border-box;
}

.pcfg2-scheme-btn {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.pcfg2-add-top {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.pcfg2-cat1-tabs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pcfg2-cat1-tabs::-webkit-scrollbar { display: none; }

.pcfg2-tab {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  cursor: pointer;
}

.pcfg2-tab.active {
  color: #30ee0a;
  font-weight: 700;
}

.pcfg2-order-num {
  font-size: 10px;
  font-weight: 600;
  margin-right: 3px;
  color: rgba(255, 255, 255, 0.85);
}

.pcfg2-tab.active .pcfg2-order-num { color: #30ee0a; }

.pcfg2-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 14px;
}

.pcfg2-main {
  flex: 1;
  min-height: 0;
  height: 0; /* 强制 flex 子项可滚动（Android WebView） */
  display: flex;
  overflow: hidden;
}

.pcfg2-cat2-sidebar {
  flex: 0 0 88px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: #f5f5f5;
  border-right: 1px solid #e5e5e5;
}

.pcfg2-cat2 {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  background: transparent;
  padding: 6px 8px;
  font-size: 11px;
  color: #666;
  text-align: left;
  cursor: pointer;
}

.pcfg2-cat2.active {
  background: #fff;
  color: #1a237e;
  font-weight: 600;
}

.pcfg2-cat2-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  margin-top: 4px;
}

.pcfg2-cat2.active .pcfg2-cat2-dot { background: #c31cc9; }

.pcfg2-item-list {
  flex: 0 0 120px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: #e8e8ed;
  border-right: 1px solid #e5e5e5;
}

.pcfg2-add-item-inline {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.7);
  color: #2e6bd9;
  font-size: 12px;
  font-weight: 550;
  padding: 8px 6px;
  cursor: pointer;
}

.pcfg2-item-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.pcfg2-item-row.selected {
  background: rgba(180, 210, 255, 0.6);
  border: 1px solid rgba(0, 122, 255, 0.5);
}

.pcfg2-item-content { flex: 1; min-width: 0; }

.pcfg2-item-name {
  font-size: 12px;
  font-weight: 500;
  color: #12335b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcfg2-item-mode {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  line-height: 1.25;
}

.pcfg2-mode-l1 { font-size: 10px; color: #2e6bd9; font-weight: 500; }
.pcfg2-mode-sep { font-size: 10px; color: #999; }
.pcfg2-mode-l2 { font-size: 10px; color: #333; }
.pcfg2-mode-l3 { font-size: 10px; color: #666; }

.pcfg2-item-arrow { display: none; }

.pcfg2-detail {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: #eef5fb;
  padding: 6px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

.pcfg2-detail-empty,
.pcfg2-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 120px;
  color: #7b92ab;
  font-size: 13px;
}

.pcfg2-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid #e2e8f0;
}

.pcfg2-detail-breadcrumb {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcfg2-detail-name { color: #12335b; font-weight: 600; font-size: 12px; }
.pcfg2-bc-sep { color: #cbd5e1; padding: 0 3px; }

.pcfg2-detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pcfg2-enable-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #475569;
}

.pcfg2-mode-badge {
  font-size: 10px;
  padding: 3px 8px;
  border: 1px solid #d1d9e6;
  border-radius: 4px;
  color: #334155;
  background: #fff;
}

.pcfg2-btn {
  border: none;
  background: linear-gradient(135deg, #2e6bd9 0%, #1f56c0 100%);
  color: #fff;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.pcfg2-btn-danger { background: #ff4d4f; }

.pcfg2-section {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 6px;
}

.pcfg2-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #12335b;
  margin-bottom: 6px;
}

.pcfg2-status-group { margin-bottom: 8px; }

.pcfg2-status-group-head {
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  background: #f0f0ff;
  border: 1px solid #d9d9ff;
  border-radius: 4px;
  margin-bottom: 6px;
}

.pcfg2-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pcfg2-status-tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e5e5e5;
  color: #333;
  cursor: pointer;
}

.pcfg2-status-edit {
  color: #2e6bd9;
  border-color: #2e6bd9;
  background: #edf4ff;
}

.pcfg2-empty-tip {
  text-align: center;
  padding: 10px;
  color: #7b92ab;
  font-size: 11px;
}

.pcfg2-position-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pcfg2-position-card {
  width: 72px;
  height: 72px;
  border: 2px dashed #ccc;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: transparent;
  cursor: pointer;
}

.pcfg2-pos-add { border-color: #2e6bd9; }
.pcfg2-pos-plus { font-size: 20px; color: #ccc; line-height: 1; }
.pcfg2-pos-add .pcfg2-pos-plus { color: #2e6bd9; }
.pcfg2-pos-name { font-size: 11px; color: #666; margin-top: 4px; text-align: center; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcfg2-pos-edit {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 9px;
  padding: 1px 4px;
  border: 1px solid #2e6bd9;
  border-radius: 3px;
  background: #fff;
  color: #2e6bd9;
  cursor: pointer;
}
.pcfg2-pos-del {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border: 1px solid #ff4d4f;
  border-radius: 50%;
  background: #fff;
  color: #ff4d4f;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

/* Modals */
.pcfg2-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

.pcfg2-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: min(70%, 520px);
  height: 100%;
  background: #fff;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.pcfg2-sort-modal {
  left: 35%;
  width: 65%;
  right: auto;
}

.pcfg2-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: #12335b;
}

.pcfg2-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  color: #7b92ab;
  cursor: pointer;
  padding: 0 6px;
}

.pcfg2-modal-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 10px;
}

.pcfg2-modal-foot {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.pcfg2-modal-btn {
  flex: 1;
  border: none;
  border-radius: 4px;
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
}

.pcfg2-modal-btn.cancel { background: #eef5fb; color: #12335b; }
.pcfg2-modal-btn.confirm { background: linear-gradient(135deg, #2e6bd9 0%, #1f56c0 100%); color: #fff; }

.pcfg2-tag-row,
.pcfg2-user-schemes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pcfg2-tag,
.pcfg2-user-scheme-name {
  border: 1px solid #e0e0e0;
  background: #f0f0f5;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
}

.pcfg2-user-scheme {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #f0f0f5;
}

.pcfg2-user-scheme.active {
  background: #edf4ff;
  border-color: #2e6bd9;
}

.pcfg2-user-scheme.active .pcfg2-user-scheme-name { color: #2e6bd9; }

.pcfg2-scheme-actions { display: flex; gap: 4px; }

.pcfg2-scheme-action {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #2e6bd9;
  background: #edf4ff;
  color: #2e6bd9;
  cursor: pointer;
}

.pcfg2-scheme-action.danger {
  color: #ff4d4f;
  border-color: #ff4d4f;
  background: #fff0f0;
}

.pcfg2-action-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.pcfg2-action-btn {
  flex: 1;
  text-align: center;
  padding: 8px;
  background: #f0f0f5;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  border: none;
}

.pcfg2-divider {
  height: 1px;
  background: #e5e5e5;
  margin: 10px 0;
}

.pcfg2-state-item {
  display: inline-block;
  padding: 5px 12px;
  margin: 4px;
  border-radius: 4px;
  font-size: 11px;
  border: 1px solid transparent;
  cursor: pointer;
}

.pcfg2-state-item.pending { background: #f0f0f5; color: #666; border-color: #e0e0e0; }
.pcfg2-state-item.selected { background: #edf4ff; color: #2e6bd9; border-color: #2e6bd9; }
.pcfg2-state-item.added { background: #e8fff0; color: #2e6bd9; border-color: #2e6bd9; }
.pcfg2-state-item.added.selected { background: #fff0f0; color: #ff4d4f; border-color: #ff4d4f; }

.pcfg2-form-item { margin-bottom: 10px; }
.pcfg2-form-item label { display: block; font-size: 12px; margin-bottom: 4px; color: #333; }
.pcfg2-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 13px;
}

.pcfg2-option-row { display: flex; flex-wrap: wrap; gap: 6px; }

.pcfg2-option {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  background: #f0f0f5;
  color: #666;
  border: 1px solid transparent;
  cursor: pointer;
}

.pcfg2-option.active {
  background: #edf4ff;
  color: #2e6bd9;
  border-color: #2e6bd9;
}

.pcfg2-sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  margin-bottom: 4px;
}

.pcfg2-sort-actions { display: flex; gap: 6px; }

.pcfg2-sort-btn {
  border: 1px solid #2e6bd9;
  background: #edf4ff;
  color: #2e6bd9;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.pcfg2-sort-del {
  border-color: #ff4d4f;
  background: #fff0f0;
  color: #ff4d4f;
}

.pcfg2-sort-save {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #f0f0f5;
  color: #94a3b8;
  border: none;
  cursor: pointer;
}

.pcfg2-sort-save.active {
  background: linear-gradient(135deg, #2e6bd9 0%, #1f56c0 100%);
  color: #fff;
}

@media (min-width: 900px) {
  .pcfg2-item-list { flex: 0 0 160px; }
  .pcfg2-cat2-sidebar { flex: 0 0 110px; }
}
