/* ==========================================================================
   CONTEXTPACK (REPO2TXT + DEEPMAP AEGIS v3.18)
   GitHub-Ji Monochromatic Anti-Glare Surfaces + Material UI 3 Simplicity
   ========================================================================== */

.cp-split {
  grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
  contain: layout;
}

.cp-surface-card {
  background: #121212;
  border: 2px solid #151515;
  border-radius: 15px;
  padding: 10px;
  gap: 8px;
}

.cp-explorer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.cp-repo-pill {
  background: #000000;
  border: 1px solid #262626;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.12s ease;
}

.cp-repo-pill:hover {
  border-color: #ffffff;
}

.cp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.cp-repo-tabs-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cp-repo-tabs-strip::-webkit-scrollbar {
  display: none;
}

/* M3 Filter & Assist Chips */
.cp-m3-chip {
  height: 25px;
  padding: 0 8px;
  border-radius: 2px;
  background: transparent;
  border: none;
  color: #888888;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.cp-m3-chip:hover {
  background: #111111;
  color: #ffffff;
}

.cp-m3-chip.active {
  background: #222222;
  color: #ffffff;
  font-weight: 600;
}

.cp-m3-chip.partial {
  background: #1a1a1a;
  color: #a3a3a3;
}

.cp-m3-chip.cp-chip-rule.is-ignored {
  background: transparent;
  color: #555555;
}

.cp-m3-chip.cp-chip-rule.is-ignored {
  background: transparent;
  color: var(--text-dim);
}

.cp-chip-check {
  font-size: 9px;
  font-weight: 700;
}

.cp-chip-count {
  font-style: normal;
  font-size: 9px;
  opacity: 0.65;
}

.cp-chip-close {
  margin-left: 3px;
  opacity: 0.6;
  font-size: 9px;
}

.cp-chip-close:hover {
  opacity: 1;
  color: var(--status-red-text);
}

/* Search & Inline Docks */
.cp-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: #0e0e0e;
  border: 1.5px solid #181818;
  border-radius: 10px;
  padding: 0 4px 0 9px;
  height: 32px;
  transition: border-color 0.12s ease;
}

.cp-search-box:focus-within {
  border-color: #2e2e2e;
}

.cp-search-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.cp-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0 6px;
  min-width: 0;
}

.cp-search-clear {
  background: transparent;
  border: none;
  color: #666666;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 6px;
  height: 100%;
}

.cp-search-clear:hover {
  color: #ffffff;
}

.cp-toolbar-icon-btn {
  background: transparent;
  border: none;
  color: #888888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 2px;
  transition: all 0.12s ease;
}

.cp-toolbar-icon-btn:hover {
  background: #222222;
  color: #ffffff;
}

.cp-search-divider {
  width: 1px;
  height: 16px;
  background: #222222;
  margin: 0 2px;
  flex-shrink: 0;
}

.cp-rank-toggle-btn,
.cp-search-box .titanium-lens-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px !important;
  margin: 0 !important;
  border-radius: 4px !important;
  color: #777777 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.cp-rank-toggle-btn:hover,
.cp-search-box .titanium-lens-btn:hover {
  background: #1c1c1c !important;
  color: #ffffff !important;
}

.cp-rank-toggle-btn.is-fixing,
.cp-search-box .titanium-lens-btn.is-fixing {
  background: transparent !important;
  color: var(--status-green-text) !important;
}

.cp-rank-toggle-btn.is-fixing:hover,
.cp-search-box .titanium-lens-btn.is-fixing:hover {
  background: #162416 !important;
  color: var(--status-green-text) !important;
}

.cp-rank-icon,
.cp-search-box .lens-star-icon {
  width: 16px !important;
  height: 16px !important;
}

.cp-rank-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--status-green-text);
  padding: 0 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.cp-rank-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  margin: 4px 0 6px 0;
  background: #0e0e0e;
  border: 1px solid #2a2a2a;
  border-left: 2px solid var(--status-green-text);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--status-green-text);
  align-self: flex-start;
}

.cp-rank-chip .cp-rank-clear {
  cursor: pointer;
  opacity: 0.7;
  font-size: 11px;
  padding: 0 2px;
}

.cp-rank-chip .cp-rank-clear:hover { opacity: 1; color: #ffffff; }

.cp-staged-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--status-green-text);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cp-search-box .titanium-lens-btn .lens-specular-ring {
  display: none !important;
}

.cp-search-box .titanium-lens-btn .lens-aperture-core {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: inherit !important;
}

.cp-paths-trigger {
  height: 32px;
  padding: 0 10px;
  gap: 5px;
}

.cp-inline-dock {
  background: #050505;
  border: 1px solid #222222;
  border-left: 2px solid #ffffff;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.cp-dock-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-dock-header,
.cp-dock-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-paths-textarea {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

.cp-paths-textarea:focus {
  border-color: #333333;
}

/* Horizontal Chip Rail */
.cp-chip-rail-wrap {
  position: relative;
  min-width: 0;
}

.cp-chip-rail {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
}

.cp-chip-rail::-webkit-scrollbar {
  display: none;
}

.cp-chip-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cp-select-split {
  display: inline-flex;
  align-items: center;
  height: 25px;
  background: #111111;
  border: 1px solid #222222;
  border-radius: 2px;
  padding: 0 4px 0 6px;
  gap: 3px;
  flex-shrink: 0;
}

.cp-select-split:hover {
  border-color: #333333;
}

.cp-master-chk {
  margin: 0 !important;
  cursor: pointer;
}

.cp-select-caret {
  background: transparent;
  border: none;
  color: #888888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 2px;
  border-radius: 2px;
}

.cp-select-caret:hover {
  color: #ffffff;
}

#cpExtMorePopover {
  min-width: 140px;
  max-height: 220px;
  overflow-y: auto;
}

/* Virtual Tree Overrides */
.cp-tree-canvas {
  padding: 6px;
  border-radius: 11px;
  border: 1.5px solid #161616;
}

.cp-tree-canvas .ghost-tree-node {
  content-visibility: auto;
  contain-intrinsic-size: auto 28px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cp-tree-canvas .ghost-node-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-tree-canvas .ghost-tree-node.is-folder .expand-chevron {
  transition: transform 0.2s ease;
}

.cp-tree-canvas .ghost-tree-node.is-folder.open .expand-chevron {
  transform: rotate(90deg);
}

.cp-node-ineligible {
  opacity: 0.42;
}

.cp-node-active {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border-left: 2px solid #ffffff;
}

.cp-tree-cursor {
  outline: 1px dashed #3f3f3f;
}

.cp-staged-pip {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
}

.cp-staged-pip.mod {
  color: #ffffff;
  background: #222222;
  border: none;
  border-radius: 2px;
  padding: 1px 4px;
}

.cp-staged-pip.add {
  color: #000000;
  background: #e5e5e5;
  border: none;
  border-radius: 2px;
  padding: 1px 4px;
}

.cp-slice-pip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #000000;
  background: #e5e5e5;
  border: none;
  padding: 1px 5px;
  border-radius: 2px;
}

.cp-dep-pip {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}

.cp-tok-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 4px;
}

.cp-explorer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 0 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.cp-footer-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

/* Right Surface Header & Segmented Controls */
.cp-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.cp-tabs-segmented {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  gap: 4px;
}

.cp-mode-pill-bar {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  gap: 8px;
}

.cp-tab-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: #777777;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.cp-tab-btn:hover {
  color: #e5e5e5;
  background: #161616;
}

.cp-tab-btn.active {
  background: #222222;
  color: #ffffff;
  font-weight: 600;
}

.cp-mode-btn {
  height: 24px;
  padding: 0 6px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: #737373;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.cp-mode-btn:hover {
  color: #e5e5e5;
  background: transparent;
}

.cp-mode-btn.active {
  background: transparent;
  border: none;
  color: #ffffff;
  font-weight: 600;
  box-shadow: none;
}

.cp-stale-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #121212;
  border: 1px solid #262626;
  border-left: 2px solid #ffffff;
  color: #e5e5e5;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.cp-stale-pixel {
  width: 4px;
  height: 4px;
  background: #ffffff;
  display: inline-block;
  flex-shrink: 0;
}

.cp-compiled-textarea.is-stale {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.cp-btn-deepmap-copy.is-stale-alert {
  border-color: #ffffff !important;
  color: #ffffff !important;
  background: #181818 !important;
  box-shadow: none !important;
}

.cp-output-empty-hud {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 24px 16px;
  text-align: center;
}

.cp-tab-btn[data-cptab="deepmap"].active {
  box-shadow: none;
}

.cp-tab-pip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  background: #141414;
  color: #777777;
  padding: 1px 6px;
  border-radius: 10px;
  transition: all 0.12s ease;
}

.cp-tab-btn.active .cp-tab-pip {
  color: #e5e5e5;
  background: #2c2c2c;
}

.cp-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

/* Compact Inline Header Token Budget Pill */
.cp-budget-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0e0e0e;
  border: 1.5px solid #181818;
  border-radius: 6px;
  padding: 0 6px 0 10px;
  height: 28px;
  min-width: 170px;
}

.cp-m3-linear-progress {
  flex: 1;
  height: 3px;
  background: #1c1c1c;
  border-radius: 2px;
  overflow: hidden;
}

.cp-m3-linear-fill {
  height: 100%;
  background: #ffffff;
  transition: width 0.18s ease, background 0.18s ease;
}

.cp-m3-linear-fill.is-warn {
  background: #888888;
}

.cp-m3-linear-fill.is-over {
  background: #ff4d4d;
}

.cp-budget-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cp-fit-pill {
  background: #111111;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
}

.cp-fit-pill:hover {
  background: #222222;
}

/* Tab Panes */
.cp-tab-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.cp-tab-pane.active {
  display: flex;
}

.cp-deepmap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0 6px 0;
  flex-shrink: 0;
}

.cp-deepmap-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cp-filter-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-taint-select {
  background: #111111;
  border: 1px solid #242424;
  border-radius: 20px;
  color: #e5e5e5;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 10px;
  height: 26px;
  outline: none;
  cursor: pointer;
}

.cp-deepmap-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.cp-scc-banner {
  background: #111111;
  border: 1px solid #202020;
  color: #a3a3a3;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  flex-shrink: 0;
}

.cp-scc-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #777777;
  flex-shrink: 0;
}

.cp-scc-summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-scc-summary::-webkit-details-marker {
  display: none;
}

.cp-scc-rings-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.cp-scc-ring-pill {
  font-size: 9px;
  font-weight: 600;
  background: #181818;
  border: 1px solid #262626;
  color: #cccccc;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.cp-scc-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #202020;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #ffffff;
  font-size: 10px;
  line-height: 1.45;
}

.cp-scc-cycle-card {
  background: #0d0d0d;
  border: 1px solid #1c1c1c;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cp-scc-cycle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}

.cp-scc-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.cp-chain-arrow {
  color: #555555;
  font-size: 9px;
}

/* Stratum Accordion Cards */
.cp-stratum-accordion {
  background: #0f0f0f;
  border: 1px solid #202020;
  border-radius: 8px;
  overflow: visible;
  flex-shrink: 0;
}

.cp-stratum-summary {
  padding: 8px 10px;
  background: #151515;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #202020;
  border-radius: 8px 8px 0 0;
}

.cp-acc-chevron {
  color: var(--text-dim);
  transition: transform 0.2s ease;
}
.cp-stratum-accordion[open] .cp-acc-chevron {
  transform: rotate(90deg);
}

.cp-stratum-accordion:not([open]) .cp-stratum-summary {
  border-bottom: none;
  border-radius: 8px;
}

.cp-stratum-summary::-webkit-details-marker {
  display: none;
}

.cp-stratum-badge {
  background: #202020;
  border: 1px solid #303030;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.cp-stratum-title {
  font-size: 11px;
  font-weight: 700;
  color: #e5e5e5;
  letter-spacing: 0.03em;
}

.cp-stratum-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-file-card {
  background: #121212;
  border: 1px solid #1c1c1c;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  contain: layout style;
  content-visibility: auto;
  contain-intrinsic-size: auto 140px;
}

.cp-file-card:hover {
  border-color: #282828;
}

.cp-file-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-file-card-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-file-card-path:hover {
  color: var(--status-green-text);
  text-decoration: underline;
}

.cp-role-tag,
.cp-domain-tag,
.cp-taint-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 2px;
  background: #111111;
  border: none;
  color: #888888;
}

.cp-taint-tag {
  color: #ffffff;
  background: #1a1a1a;
}

.cp-file-card-provides {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.cp-field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  flex-shrink: 0;
  padding-top: 2px;
}

.cp-provides-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* 1-Click Surgical Slice M3 Assist Chips */
.cp-slice-assist-chip {
  height: 22px;
  padding: 0 7px;
  border-radius: 2px;
  background: #000000;
  border: 1px solid #262626;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.cp-slice-assist-chip:hover {
  border-color: #ffffff;
}

.cp-slice-assist-chip.is-selected {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  font-weight: 600;
}

.cp-file-card-edges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.cp-edge-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cp-edge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.cp-edge-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #d4d4d4;
  cursor: pointer;
}

.cp-edge-pill:hover {
  color: var(--status-green-text);
  text-decoration: underline;
}

.cp-edge-pill i {
  font-style: normal;
  color: var(--text-dim);
}

.cp-raw-map-pre,
.cp-compiled-textarea,
.cp-preview-code-pre {
  flex: 1;
  min-height: 0;
  width: 100%;
  background: #0e0e0e;
  border: 1.5px solid #161616;
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  overflow: auto;
  outline: none;
  resize: none;
  white-space: pre-wrap;
}

.cp-output-banner {
  background: #0e0e0e;
  border: 1px solid #181818;
  border-radius: 9px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-preview-slices-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  background: #0e0e0e;
  border: 1px solid #181818;
  border-radius: 8px;
  max-height: 76px;
  overflow-y: auto;
}

.cp-bottom-actuator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #1a1a1a;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.cp-actuator-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cp-actuator-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}

.cp-actuator-right > button {
  flex-shrink: 0;
}

.cp-actuator-right > #cpBtnCopyDeepMap {
  flex-shrink: 1;
  min-width: 0;
}

.cp-split-btn-group {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.cp-split-btn-main {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: none !important;
}

.cp-split-btn-caret {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  padding: 0 7px !important;
  min-width: 24px;
}

.cp-btn-deepmap-copy {
  border-color: #242424;
}

.cp-hero-btn {
  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 0 14px !important;
  font-weight: 600 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, background-color;
  contain: layout style;
}
.cp-hero-btn:hover:not(:disabled) {
  background: #e5e5e5 !important;
  color: #000000 !important;
}
.cp-hero-btn:active:not(:disabled) {
  background: #cccccc !important;
  color: #000000 !important;
}
.cp-hero-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Popover Cards */
.cp-popover-card {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 950;
  background: #0a0a0a;
  border: 1px solid #262626;
  border-radius: 4px;
  padding: 8px;
  min-width: 220px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cp-tune-popover {
  left: auto;
  right: 0;
  width: min(320px, calc(100vw - 32px));
  max-height: 78vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.cp-download-popover {
  top: auto;
  bottom: calc(100% + 6px);
  left: auto;
  right: 0;
  min-width: 220px;
}

.cp-pop-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 3px 6px;
}

.cp-pop-item {
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.cp-pop-item:hover {
  background: #1c1c1c;
  color: #ffffff;
}

.cp-pop-sep {
  height: 1px;
  background: #1f1f1f;
  margin: 4px 0;
}

.cp-tune-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 4px 6px;
}

.cp-tune-grid .input-field-sm {
  width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
}

.cp-tune-switches .hardware-toggle-label input:checked + .toggle-slider {
  background: #444444 !important;
}
.cp-tune-switches .hardware-toggle-label .toggle-slider:before {
  background: #ffffff !important;
}

.cp-tune-switches {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
}

.cp-dim-mono {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.cp-ell-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-clickable-files-label {
  cursor: pointer;
  user-select: none;
  border-bottom: 1px dotted #444444;
  transition: all 0.12s ease;
}

.cp-clickable-files-label:hover {
  color: #ffffff !important;
  border-bottom-color: #ffffff;
}

.cp-selected-files-popover {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  width: min(320px, calc(100vw - 32px));
  max-height: 260px;
}

.cp-selected-files-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
}

.cp-selected-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 3px;
  background: #111111;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.cp-selected-file-row:hover {
  background: #1a1a1a;
}

.cp-selected-file-name {
  color: #cccccc;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.cp-selected-file-name:hover {
  color: #ffffff;
  text-decoration: underline;
}

.cp-selected-file-del {
  background: transparent;
  border: none;
  color: #666666;
  cursor: pointer;
  padding: 0 3px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cp-selected-file-del:hover {
  color: #ff5555;
}

.cp-needs-modal-card {
  width: min(740px, calc(100vw - 32px));
  max-height: 82vh;
  background: #121212;
  border: 1.5px solid #242424;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}

.cp-needs-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: #151515;
  border-bottom: 1px solid #202020;
  flex-shrink: 0;
}

.cp-needs-modal-body {
  flex: 1;
  min-height: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.cp-needs-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #141414;
  border-top: 1px solid #202020;
  flex-shrink: 0;
}

.cp-needs-input-card {
  background: #0e0e0e;
  border: 1.5px solid #161616;
  border-radius: 11px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.cp-needs-foot,
.cp-needs-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cp-needs-list-head {
  padding: 2px 2px 0 2px;
  flex-shrink: 0;
}

.cp-needs-textarea {
  width: 100%;
  min-height: 98px;
  max-height: 170px;
  background: #090909;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

.cp-needs-textarea:focus {
  border-color: #2e2e2e;
}

.cp-needs-progress {
  background: #0e0e0e;
  border: 1px solid #181818;
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.cp-needs-list-viewport {
  flex: 1;
  min-height: 160px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}

.cp-needs-card {
  flex-shrink: 0;
}

.cp-needs-card-warn {
  border-color: #2a2414;
}

.cp-needs-card-miss {
  border-color: #2a1818;
}

.cp-needs-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.cp-needs-tag.ok {
  color: var(--status-green-text);
  background: #132216;
}

.cp-needs-tag.idle {
  color: #a3a3a3;
  background: #1b1b1b;
}

.cp-needs-tag.warn {
  color: var(--status-yellow-text);
  background: #241e0d;
}

.cp-needs-tag.miss {
  color: var(--status-red-text);
  background: #241212;
}

.cp-needs-fetching-pill {
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: #d4d4d4;
}

.cp-needs-skeleton-card {
  gap: 8px;
}

.cp-needs-more-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #0e0e0e;
  border: 1px solid #181818;
  border-radius: 8px;
  flex-shrink: 0;
}
