﻿html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

/* ================================================================
   CP Center Zone — toolbar, metrics, path block
   ================================================================ */

/* #cpZoneHead is now a universal top bar in .view-host — always visible */
/* Only #cpLinkRuleBar stays hidden until cp-workspace is active */
#cpLinkRuleBar {
  display: none;
}
#cpCenterZone.cp-workspace-active #cpLinkRuleBar {
  display: flex;
}

/* Boost CP typography (header + toolbar + metrics + path block) */
#cpZoneHead .zone-label {
  font-size: clamp(1.9rem, 2.6vw, 2.3rem);
  letter-spacing: 2px;
  font-weight: 700;
}
/* APS CONTROL PLANE title in heading row — gradient matching .aps-brand */
#cpZoneHead .cp-zone-main-title,
body.theme-light #cpZoneHead .cp-zone-main-title {
  font-size: 2.4rem !important;
  display: inline-block !important;
  color: transparent !important;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  letter-spacing: 2px !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 700 !important;
}
/* Inner span — inline display ensures background-clip: text always renders */
.cp-zone-title-gradient {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 2px;
  display: inline;
  background: linear-gradient(135deg, #00d4ff, #ff0080);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.zone--source .zone-label,
.zone--dest .zone-label {
  font-size: clamp(1.9rem, 2.6vw, 2.3rem);
  letter-spacing: 2px;
  font-weight: 700;
  color: rgba(255, 77, 148, 0.92);
}

#cpZoneHead,
.zone--source .zone__head,
.zone--dest .zone__head {
  min-height: 72px;
  padding: 12px 14px;
}

.zone--source .zone__head .glyphicon,
.zone--dest .zone__head .glyphicon {
  font-size: 1.4rem;
}

#cpZoneHead .metric {
  font-size: 1rem;
  letter-spacing: 1.2px;
  color: rgba(255, 77, 148, 0.75);
}

#cpZoneHead .metric b {
  font-size: 1.18rem;
  color: rgba(255, 77, 148, 0.95);
}

#cpLinkRuleBar .toolbar-label {
  font-size: 0.95rem;
  letter-spacing: 1.8px;
  color: rgba(255, 77, 148, 0.78);
}

#cpLinkRuleBar .btn-group .btn {
  font-size: 0.95rem;
  padding: 6px 14px;
  border-color: rgba(255, 77, 148, 0.38);
  color: rgba(255, 77, 148, 0.88);
}

#cpLinkRuleBar .btn-group .btn:hover {
  color: rgba(255, 77, 148, 1);
}

#cpLinkRuleBar .btn-group .btn.active,
#cpLinkRuleBar .btn-group .btn:active {
  background: rgba(255, 215, 0, 0.18);
  color: #ffd700;
  border-color: rgba(255, 215, 0, 0.85);
}

body.theme-light #cpLinkRuleBar .btn-group .btn.active,
body.theme-light #cpLinkRuleBar .btn-group .btn:active {
  background: rgba(8, 47, 73, 0.12);
  color: #082f49;
  border-color: rgba(8, 47, 73, 0.78);
}

body.theme-light #cpLinkRuleBar .btn-group .btn {
  border-color: rgba(255, 77, 148, 0.34);
  color: rgba(255, 77, 148, 0.86);
}

body.theme-light #cpLinkRuleBar .btn-group .btn:hover {
  color: rgba(255, 77, 148, 1);
}

#cpLinkRuleBar .it-root-input {
  font-size: 0.95rem;
  max-width: 300px;
  border-color: rgba(255, 77, 148, 0.35);
}

#cpCenterZone .link-row__path .path-current,
#cpCenterZone .link-row__path .path-dest {
  font-size: 0.9rem;
  line-height: 1.55;
}

.path-label {
  display: inline-block;
  min-width: 96px;
  font-family: 'Titillium Web', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.95;
}

.path-current .path-label {
  color: #111827;
}

.path-dest .path-label {
  color: #0a4f73;
}

@media (max-width: 1200px) {
  #cpZoneHead .zone-label {
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  }

  .zone--source .zone-label,
  .zone--dest .zone-label {
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  }

  #cpZoneHead .metric {
    font-size: 0.9rem;
  }

  #cpZoneHead .metric b {
    font-size: 1.05rem;
  }

  #cpLinkRuleBar .toolbar-label,
  #cpLinkRuleBar .btn-group .btn,
  #cpLinkRuleBar .it-root-input {
    font-size: 0.85rem;
  }
}

/* Metrics strip (lives inside zone__head) */
.zone__metrics {
  display: flex;
  align-items: center;
  gap: 18px;
}
.metric {
  font-family: 'Titillium Web', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(0, 212, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.metric b {
  color: rgba(0, 212, 255, 0.9);
  font-size: 0.78rem;
}

/* Toolbar row */
.zone__toolbar {
  flex: none;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  background-color: #d7e0ea;
  align-items: center;
  gap: 10px;
}
.toolbar-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(0, 212, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
}
.zone__toolbar .btn-group .btn {
  font-size: 0.72rem;
  padding: 2px 10px;
  border-color: rgba(0, 212, 255, 0.35);
  color: rgba(0, 212, 255, 0.7);
  background: transparent;
}
.zone__toolbar .btn-group .btn.active,
.zone__toolbar .btn-group .btn:active {
  background: rgba(0, 212, 255, 0.15);
  color: rgba(0, 212, 255, 1);
  border-color: rgba(0, 212, 255, 0.7);
  box-shadow: none;
}
.it-root-input {
  max-width: 220px;
  background: rgba(0,0,0,0.25);
  border-color: rgba(0, 212, 255, 0.35);
  color: #fff;
  font-size: 0.75rem;
}
.it-root-input::placeholder {
  color: rgba(0, 212, 255, 0.35);
}

/* Link row path block */
.link-row__path {
  margin-top: 4px;
  padding: 0 4px;
}
.path-current,
.path-dest {
  display: block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px !important;
  line-height: 1.5;
  word-break: break-all;
  white-space: normal;
  color: #1f2937;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 3px;
  padding: 1px 4px;
}

.link-row__path code.path-current,
.link-row__path code.path-dest {
  font-size: 12px !important;
}
.path-dest {
  color: #0b5f86;
}
/* unresolved destination: muted amber */
.path-dest.path-dest--unresolved {
  color: #b45309;
  font-style: italic;
}
/* Status badges for link rows */
.link-status--resolved {
  background-color: #198754;
  color: #fff;
}
.link-status--unresolved {
  background-color: #6c757d;
  color: #fff;
}

:root {
  --bg-dark: #0a0a0f;
  --accent-cyan: #00d4ff;
  --accent-magenta: #ff0080;
  --accent-gold: #ffd700;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --panel-grid-color: rgba(0, 212, 255, 0.14);
  --panel-grid-size: 40px;
}

/* .fill removed — flex app-shell handles height */

body {
  background: var(--bg-dark);
  color: #fff;
}

.theme-toggle-btn {
  padding: 8px 12px;
  border: 1px solid rgba(0, 212, 255, 0.45);
  background: rgba(0, 212, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(0, 212, 255, 0.22);
  color: #ffffff;
}

/* Light theme */
body.theme-light {
  background: #eef3f9;
  color: #0f172a;
  --panel-grid-color: rgba(15, 23, 42, 0.16);
}

body.theme-light .magenta-overlay {
  background: rgba(15, 23, 42, 0.02);
}

body.theme-light .grid-bg {
  opacity: 1;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.18) 1px, transparent 1px);
  background-size: 50px 50px;
}

body.theme-light .orb-1 {
  background: radial-gradient(circle, rgba(0, 119, 182, 0.16) 0%, transparent 70%);
}

body.theme-light .orb-2 {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
}

body.theme-light .aps-navbar {
  background: #e7edf5;
  border-bottom-color: rgba(0, 119, 182, 0.7);
}

body.theme-light .aps-nav-links a,
body.theme-light .aps-nav-links span {
  color: #1e293b;
}

body.theme-light .aps-nav-links a:hover {
  color: #0369a1;
}

body.theme-light .theme-toggle-btn {
  border-color: rgba(3, 105, 161, 0.45);
  background: rgba(3, 105, 161, 0.1);
  color: #0f172a;
}

body.theme-light .cp-left-nav {
  background-color: rgba(255, 255, 255, 0.92);
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.11) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: 0 0;
  border-right-color: rgba(0, 119, 182, 0.28);
}

body.theme-light .cp-left-nav-header {
  background: rgba(15, 23, 42, 0.06);
  border-bottom-color: rgba(15, 23, 42, 0.18);
}

body.theme-light .cp-left-nav-title {
  color: #0f172a;
}

body.theme-light .cp-left-nav-subtitle {
  color: rgba(15, 23, 42, 0.72);
}

body.theme-light .cp-nav-item {
  color: #334155;
}

body.theme-light .cp-nav-item:hover,
body.theme-light .cp-nav-item.active {
  color: #be185d;
}

body.theme-light .cp-nav-section-label {
  color: rgba(190, 24, 93, 0.78);
}

body.theme-light .zone__head {
  background-color: #e7edf5;
  border-bottom-color: rgba(3, 105, 161, 0.35);
}

body.theme-light .zone__toolbar {
  background-color: #e7edf5;
}

body.theme-light .zone--source,
body.theme-light .zone--dest {
  background: rgba(255, 255, 255, 0.9);
}

body.theme-light .zone--source .zone__body,
body.theme-light .zone--dest .zone__body,
body.theme-light .tab-content,
body.theme-light .cp-dashboard-panel {
  background-color: #ffffff !important;
}

body.theme-light .zone-label,
body.theme-light #cpZoneHead .zone-label,
body.theme-light .zone--source .zone-label,
body.theme-light .zone--dest .zone-label {
  color: rgba(190, 24, 93, 0.92);
}

/* Magenta background overlay for contrast */
.magenta-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 0, 128, 0.05);
  pointer-events: none;
  z-index: 0;
}

/* Background effects */
.grid-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.12) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.14) 0%, transparent 70%);
  top: -160px; right: -160px;
  animation: float 20s ease-in-out infinite;
}

.orb-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255, 0, 128, 0.1) 0%, transparent 70%);
  bottom: -120px; left: -120px;
  animation: float 24s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-25px, 25px); }
}

/* Top navigation */
.aps-navbar {
  z-index: 1000;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--accent-cyan);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.aps-brand {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-decoration: none;
}

.aps-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.aps-nav-links a,
.aps-nav-links span {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.aps-nav-links a:hover {
  color: var(--accent-cyan);
}

.aps-signout {
  padding: 8px 14px;
  border: 1px solid rgba(255, 0, 128, 0.4);
  color: #fff !important;
  background: rgba(255, 0, 128, 0.2);
  transition: all 0.3s ease;
}

.aps-signout:hover {
  background: var(--accent-magenta);
  border-color: var(--accent-magenta);
  color: #fff !important;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 1;
}

.app-header {
  flex: none;
}

.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* .rail — Mission Control is now a fixed drawer; this class is kept for compat */
.rail {
  display: none;
}

.view-host {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Inner row containing rail + source + center + dest — preserves height constraint for scrolling */
.view-host__zones {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.cp-splitter {
  flex: none;
  width: 5px;
  background: rgba(0, 212, 255, 0.15);
  cursor: col-resize;
  transition: background 0.15s;
  z-index: 10;
}
.cp-splitter:hover,
.cp-splitter:active {
  background: rgba(0, 212, 255, 0.55);
}

/* ================================================================
   Update RCW Link Paths — chip card, report panels
   ================================================================ */
.lu-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 480px;
}
.lu-chip__icon { font-size: 20px; flex: none; }
.lu-chip__name { font-size: 13px; font-weight: 600; color: #111827; }
.lu-chip__sub  { font-size: 11px; color: #6b7280; margin-top: 2px; }

.lu-report-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 14px;
  color: #15803d;
  font-size: 13px;
}
.lu-report-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 10px 14px;
  color: #92400e;
  font-size: 13px;
}
.lu-report-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 10px 14px;
  color: #b91c1c;
  font-size: 13px;
}

.cp-acc-about__note {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  border-left: 3px solid #d1d5db;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
}

/* ACC CONTROL PLANE full-width heading row — universal top bar */
.cp-zonerow-head {
  flex: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  /* inherits .zone__head background (light grey) */
}
/* Center the main title text while hamburger stays on left — matches .aps-brand style */
.cp-zone-main-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}
/* Hamburger toggle */
.cp-mc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--accent-magenta);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  flex: none;
  line-height: 1;
}
.cp-mc-toggle:hover {
  background: rgba(255, 0, 128, 0.12);
  color: #ff0080;
}
/* "Mission\nControl" sub-label beside hamburger */
.cp-mc-heading-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--accent-magenta);
  text-transform: uppercase;
  line-height: 1.25;
  text-align: center;
  flex: none;
}
/* .cp-zone-main-title — defined above near .cp-zonerow-head */

/* Center zone ops-metrics header — vertically aligns with Source/Destination zone headers */
.cp-ops-zone-head {
  align-items: flex-start;
  padding: 4px 8px;
  min-height: 43px;
}
.cp-ops-zone-head .cp-ops-bar {
  margin-bottom: 0;
  width: 100%;
}
.cp-ops-zone-head .cp-ops-bar__inner {
  gap: 6px;
}
.cp-ops-zone-head .cp-ops-metric {
  padding: 8px 10px 6px;
}

.zone {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.zone--fixed {
  flex: none;
  width: 600px;
  border-right: 1px solid rgba(0, 212, 255, 0.3);
  background: #ffffff;
}

@media (max-width: 1400px) {
  .zone--fixed { width: 420px; }
}
@media (max-width: 1100px) {
  .zone--fixed { width: 320px; min-width: 260px; }
}

/* Source/Destination zones should visually match the Control Plane zone */
.zone--source,
.zone--dest {
  background: rgba(0, 212, 255, 0.04);
}

.zone--source .zone__body,
.zone--dest .zone__body {
  background: #ffffff;
}

.zone--flex {
  flex: 1;
}

.zone__head {
  flex: none;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(10, 10, 15, 0.9);
}

/* #cpZoneHead matches navbar styling (blur + cyan border); bg from .zone__head */
#cpZoneHead {
  backdrop-filter: blur(20px);
  border-bottom-color: var(--accent-cyan);
}

.zone__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Panel-level grid visible in white content areas (theme-aware) */
#cpCenterZone .zone__body,
.tab-content,
.cp-dashboard-panel {
  background-image:
    linear-gradient(var(--panel-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-grid-color) 1px, transparent 1px);
  background-size: var(--panel-grid-size) var(--panel-grid-size);
  background-position: 0 0;
}

/* Keep source/destination jsTree surfaces clean for text legibility */
.zone--source .zone__body,
.zone--dest .zone__body,
#sourceHubs,
#destinationHubs {
  background-image: none !important;
}

.zone-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 77, 148, 0.82);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.aps-user-status {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 1.12rem;
}

/* Action buttons in left nav */
.action-card {
  text-decoration: none;
}

.action-card:hover,
.action-card:focus {
  text-decoration: none;
}

.cp-nav-actions {
  padding: 2px 10px 12px;
}

.cp-nav-section-actions {
  margin-top: 12px;
}

.cp-left-nav .action-card {
  display: block;
  margin-bottom: 10px;
  padding: 12px 12px 11px;
  border: 1px solid rgba(128, 0, 32, 0.65);
  border-radius: 12px;
  background: rgba(15, 15, 20, 0.96);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.cp-left-nav .action-card:hover,
.cp-left-nav .action-card:focus {
  background: rgba(15, 15, 25, 0.98);
  border-color: rgba(0, 212, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.16);
}

.cp-left-nav .action-card.active {
  background: linear-gradient(145deg, rgba(0, 212, 255, 0.16), rgba(255, 0, 128, 0.08)), rgba(15, 15, 20, 0.98);
  border-color: #00d4ff;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.25);
}

.cp-left-nav .action-card-icon {
  display: block;
  font-size: 18px;
  line-height: 1;
  margin-bottom: 6px;
  filter: none;
}

.cp-left-nav .action-card-label {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1.2;
}

.cp-side-action-subtitle {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  line-height: 1.25;
}

.panel-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.7rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 10px;
}

#sourceHubs {
  overflow: visible;
  width: 100%;
  color: #111;
}

#destinationHubs {
  overflow: visible;
  width: 100%;
  color: #111;
}

#sourceHubs .jstree-anchor,
#destinationHubs .jstree-anchor {
  color: #111 !important;
}

#sourceHubs .jstree-hovered,
#destinationHubs .jstree-hovered {
  background: rgba(0, 212, 255, 0.08) !important;
}

#sourceHubs .jstree-clicked,
#destinationHubs .jstree-clicked {
  background: rgba(0, 212, 255, 0.18) !important;
}

#sourceHubs .jstree-themeicon,
#destinationHubs .jstree-themeicon,
#sourceHubs .jstree-icon,
#destinationHubs .jstree-icon {
  filter: none;
}

#sourceHubs .jstree-anchor.jstree-clicked,
#destinationHubs .jstree-anchor.jstree-clicked {
  color: #111 !important;
}

/* Resize jsTree custom icons (like ACC hub icon) */
.jstree-icon.jstree-themeicon {
  background-size: contain !important;
}

/* Target all img icons in the tree */
#sourceHubs .jstree-icon img,
#destinationHubs .jstree-icon img {
  max-width: 18px;
  max-height: 18px;
  width: 18px !important;
  height: 18px !important;
}

/* Tab Page Styling - Vertical Box Design */
.circle-tabs {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 0 !important;
  border-bottom: none;
  float: left;
  width: 120px;
  margin-right: 20px;
}

.circle-tabs > li {
  width: 100%;
  float: none;
}

.circle-tabs > li > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 90px;
  border-radius: 12px !important;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  padding: 15px 10px;
  background-clip: padding-box;
  width: 100%;
}

.circle-tabs > li > a:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.circle-tabs > li.active > a:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.circle-tabs > li.active > a {
  transform: translateX(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  border: none !important;
}

.tab-icon {
  display: none;
}

.tab-label {
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0px;
  color: white;
  font-weight: 700;
  text-align: center;
}

.nav-tabs {
  margin-bottom: 0 !important;
  border-bottom: none;
}

.tab-content {
  background-color: rgba(255, 255, 255, 0.98);
  background-image:
    linear-gradient(var(--panel-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-grid-color) 1px, transparent 1px);
  background-size: var(--panel-grid-size) var(--panel-grid-size);
  background-position: 0 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  min-height: 100%;
  backdrop-filter: blur(25px);
  margin-left: 0;
  color: #111;
}

.tab-content h1,
.tab-content h2,
.tab-content h3,
.tab-content h4,
.tab-content h5,
.tab-content h6,
.tab-content p,
.tab-content li,
.tab-content label,
.tab-content span {
  color: #111;
}

/* Make panes fill the height and add padding */
.tab-pane {
  min-height: 100%;
  padding: 20px;
}

/* Enhanced Panel Styling */
.panel {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.panel:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.panel-heading {
  border-radius: 8px 8px 0 0 !important;
  font-weight: 600;
  background: rgba(255, 255, 255, 1) !important;
  color: #111 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.panel-body {
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 1) !important;
  color: #111 !important;
}

/* Pastel Colors for Pages with Gradients */
#projectInfo {
  background: linear-gradient(135deg, #E8DFF5 0%, #d4c5f0 100%);
}

#accInfo {
  background: linear-gradient(135deg, #FFC2D1 0%, #ffadc0 100%);
}

#publish {
  background: linear-gradient(135deg, #B8E0D2 0%, #a0d4c4 100%);
}

#testUpgrade {
  background: linear-gradient(135deg, #CFE2F3 0%, #b8d4ed 100%);
}

#upgrade {
  background: linear-gradient(135deg, #fdf2e9 0%, #f5e5d3 100%);
}

/* Tab Colors - Flat Design matching content areas */
.circle-tabs > li > a[href="#accInfo"] {
  background: #FFB3C1;
  color: #000000;
}

.circle-tabs > li > a[href="#publish"] {
  background: #A8D8D8;
  color: #000000;
}

.circle-tabs > li > a[href="#testUpgrade"] {
  background: #B4D7FF;
  color: #000000;
}

.circle-tabs > li > a[href="#upgrade"] {
  background: #FFD9A8;
  color: #000000;
}

.circle-tabs > li.active > a[href="#accInfo"] {
  background: #FF7A9E;
  color: #000000;
}

.circle-tabs > li.active > a[href="#publish"] {
  background: #5EBFBF;
  color: #000000;
}

.circle-tabs > li.active > a[href="#testUpgrade"] {
  background: #6BA3E5;
  color: #000000;
}

.circle-tabs > li.active > a[href="#upgrade"] {
  background: #F5B547;
  color: #000000;
}

/* Sign Out Tab Styling */
.circle-tabs > li > a[data-description="Sign out of your account"],
.circle-tabs > li > a[onclick*="autodeskSignOutButton"] {
  background: #000000 !important;
  color: #ffffff !important;
}

/* Enhanced Button Styling */
.btn {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653b8f 100%);
}

.btn-info {
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  border: none;
}

.btn-info:hover {
  background: linear-gradient(135deg, #2ab8c2 0%, #4a6ec9 100%);
}

.btn-lg {
  padding: 12px 30px;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Progress Bar Enhancements */
.progress {
  height: 30px;
  border-radius: 15px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  background-color: rgba(0,0,0,0.05);
}

.progress-bar {
  border-radius: 15px;
  background: linear-gradient(90deg, #36d1dc 0%, #5b86e5 100%);
  font-weight: 600;
  line-height: 30px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.progress-bar-success {
  background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
}

.progress-bar-info {
  background: linear-gradient(90deg, #36d1dc 0%, #5b86e5 100%);
}

/* Side Panel Enhancements */
.panel-default {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/* Title Styling */
h2, h4 {
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: #ffffff;
}

h4 {
  color: #2d3748;
}

/* Side panel labels */
label {
  color: #2d3748;
}

/* Navbar Enhancements */
.navbar-default {
  background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,249,250,0.98) 100%);
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
}

/* Alert Enhancements */
.alert {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: none;
}

/* Input Group Enhancements */
.input-group .form-control {
  border-radius: 8px 0 0 8px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.input-group .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group-addon {
  border-radius: 0 8px 8px 0;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 2px solid #e2e8f0;
  border-left: none;
}

/* List Group Enhancements */
.list-group-item {
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.list-group-item:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transform: translateX(4px);
}

/* jstree contextmenu z-index fix */
.vakata-context {
  z-index: 9999 !important;
}

/* =========================================================
   Control Plane Left Navigation — fixed slide-over drawer
   ========================================================= */
.cp-left-nav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100vh;
  z-index: 9500;
  background-color: rgba(8, 15, 28, 0.97);
  border-right: 1px solid rgba(0, 212, 255, 0.35);
  padding: 10px 0;
  overflow-y: auto;
  transition: left 0.22s ease;
  border-radius: 0 8px 8px 0;
}
.cp-left-nav.open {
  left: 0;
}
/* Dim overlay behind the open drawer */
.cp-mc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9499;
  background: rgba(0, 0, 0, 0.45);
}
.cp-mc-overlay.visible {
  display: block;
}

.cp-left-nav-header {
  padding: 10px 12px;
  margin: -10px 0 8px;
  background: rgba(0, 212, 255, 0.08);
  border-bottom: 1px solid rgba(0, 212, 255, 0.24);
}

.cp-left-nav-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  line-height: 1.2;
}

.cp-left-nav-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cp-left-nav-subtitle {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.1px;
  color: rgba(255, 77, 148, 0.9);
  text-transform: uppercase;
}

.cp-nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255, 77, 148, 0.72);
  padding: 8px 12px 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.cp-nav-item {
  display: block;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-nav-item:hover {
  color: #ff4d94;
  background: rgba(255, 77, 148, 0.1);
  text-decoration: none;
}

.cp-nav-item.active {
  color: #ff4d94;
  border-left-color: #ff4d94;
  background: rgba(255, 77, 148, 0.12);
}

/* =========================================================
   Control Plane Cards
   ========================================================= */
.cp-dashboard-panel {
  background-color: #ffffff !important;
  color: #1f2937 !important;
}

.tracking-wider {
  letter-spacing: 0.08em;
}

.cp-card-grid {
  margin-top: 8px;
}

.cp-file-card {
  background-color: #0f1117 !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.cp-card-head {
  background-color: #1b1f26;
  border-bottom: 1px solid rgba(181, 30, 58, 0.45);
}

.cp-card-title {
  color: #6b7280;
}

.cp-file-name-lg {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.cp-hub-section {
  margin-bottom: 14px;
}

.cp-group-heading {
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 6px 0 8px;
}

.cp-hub-heading {
  color: #3b4250;
  border-bottom: 1px solid rgba(59, 66, 80, 0.25);
  padding-bottom: 4px;
}

.cp-project-heading {
  color: #b51e3a;
  font-weight: 700;
  border-bottom: 2px solid #b51e3a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cp-card-footer {
  background-color: #ffffff;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}


.cp-pill {
  margin-right: 4px;
  margin-bottom: 4px;
  display: inline-block;
  border-radius: 3px;
  font-weight: 600;
}

.cp-card-footer .label {
  border-radius: 3px;
  font-size: 12px;
  padding: 3px 6px;
}

.cp-card-footer .label-default {
  background-color: #5f6775;
  color: #eaf0f7;
}

.cp-card-footer .label-info {
  background-color: #67c8f3;
  color: #0c2a3b;
}

.cp-card-footer .label-success {
  background-color: #71d186;
  color: #112a18;
}

.cp-card-footer .label-primary {
  background-color: #8ca2ff;
  color: #14224d;
}

.cp-card-footer .label-warning {
  background-color: #f1c468;
  color: #3a2b0a;
}

.cp-card-footer .label-danger {
  background-color: #ff8b96;
  color: #3e1116;
}

.cp-card-footer .label-mechanical {
  background-color: #ffe1bf;
  color: #643f00;
}

.cp-card-footer .label-architecture {
  background-color: #d2ecff;
  color: #0e3a61;
}

.cp-card-footer .label-structural {
  background-color: #dadff0;
  color: #2a3654;
}

.cp-card-footer .label-electrical {
  background-color: #ffe0b8;
  color: #6d4100;
}

.cp-card-footer .label-civil {
  background-color: #d8f3dd;
  color: #1f5a33;
}


.cp-badge-row .badge {
  border-radius: 4px !important;
}

/* Bootstrap 5 subtle utility fallbacks (for environments still using Bootstrap 3/4) */
.bg-success-subtle {
  background-color: rgba(34, 197, 94, 0.16) !important;
}

.bg-info-subtle {
  background-color: rgba(59, 130, 246, 0.16) !important;
}

.bg-secondary-subtle {
  background-color: rgba(148, 163, 184, 0.16) !important;
}

.border-secondary-subtle {
  border-color: rgba(148, 163, 184, 0.35) !important;
}

.gap-1 {
  gap: 0.25rem !important;
}

.rounded-1 {
  border-radius: 0.25rem !important;
}

.cp-links-container {
  padding: 8px 0 0;
  border-top: 1px solid rgba(181, 30, 58, 0.35);
  margin-top: 8px;
}

/* ── Control Plane Cards: box-5 style (blue header / red body) ── */
.cp-file-card {
  border: none !important;
  background: #0440B2 !important;
  font-family: 'Titillium Web', sans-serif;
  overflow: hidden;
  border-radius: 4px !important;
}

.cp-card-header-blue {
  background: #0440B2;
  border-bottom: 0;
  padding: 10px 14px;
}

.cp-card-top-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.cp-revit-brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 44px;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: 1px;
  line-height: 1;
  flex-shrink: 0;
  padding-right: 10px;
}

.cp-card-header-blue,
.cp-card-header-blue * {
  color: #ffffff !important;
}
/* Host-file path block inside the red card header */
.cp-card-host-path {
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 5px;
}
.cp-card-host-path .path-current {
  color: rgba(255, 255, 255, 0.80) !important;
  font-size: 12px;
  line-height: 1.45;
}
.cp-card-host-path .path-dest {
  color: rgba(175, 240, 255, 0.90) !important;
  font-size: 12px;
  line-height: 1.45;
}

/* ================================================================
   ACC Control Plane — zone subtitle
   ================================================================ */

.cp-zone-subtitle {
  font-family: 'Titillium Web', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.55);
  margin-top: 2px;
}
body.theme-light .cp-zone-subtitle {
  color: rgba(190, 24, 93, 0.60);
}

/* ================================================================
   ACC Control Plane — Governance Panels
   ================================================================ */

.cp-govpanel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}
.cp-govpanel-row .col-md-6 {
  min-width: 260px;
}
@media (max-width: 992px) {
  .cp-govpanel-row {
    flex-direction: column;
  }
}

.cp-govpanel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.22);
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
}
body.theme-light .cp-govpanel {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(190, 24, 93, 0.22);
}

.cp-govpanel__header {
  padding: 7px 12px;
  background: rgba(0, 212, 255, 0.08);
  border-bottom: 1px solid rgba(0, 212, 255, 0.18);
}
body.theme-light .cp-govpanel__header {
  background: rgba(190, 24, 93, 0.06);
  border-bottom-color: rgba(190, 24, 93, 0.18);
}

.cp-govpanel__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.60rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.75);
  font-weight: 600;
}
body.theme-light .cp-govpanel__title {
  color: rgba(190, 24, 93, 0.80);
}

.cp-govpanel__body {
  padding: 10px 12px;
}

/* Toggle switch rows */
.cp-gov-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
  user-select: none;
  margin: 0;
}
body.theme-light .cp-gov-toggle-row {
  color: #334155;
}
.cp-gov-toggle-row:hover {
  color: rgba(0, 212, 255, 0.95);
}
body.theme-light .cp-gov-toggle-row:hover {
  color: rgba(190, 24, 93, 0.9);
}

/* Hide native checkbox */
.cp-gov-toggle-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* The toggle switch track */
.cp-toggle-switch {
  flex-shrink: 0;
  display: inline-block;
  width: 34px;
  height: 18px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.35);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.cp-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.5);
  transition: left 0.18s, background 0.18s;
}
.cp-gov-toggle-row input[type="checkbox"]:checked ~ .cp-toggle-switch {
  background: rgba(0, 212, 255, 0.28);
  border-color: rgba(0, 212, 255, 0.75);
}
.cp-gov-toggle-row input[type="checkbox"]:checked ~ .cp-toggle-switch::after {
  left: 18px;
  background: #00d4ff;
}
body.theme-light .cp-toggle-switch {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(190, 24, 93, 0.35);
}
body.theme-light .cp-toggle-switch::after {
  background: rgba(190, 24, 93, 0.45);
}
body.theme-light .cp-gov-toggle-row input[type="checkbox"]:checked ~ .cp-toggle-switch {
  background: rgba(190, 24, 93, 0.18);
  border-color: rgba(190, 24, 93, 0.70);
}
body.theme-light .cp-gov-toggle-row input[type="checkbox"]:checked ~ .cp-toggle-switch::after {
  background: #be185d;
}

.cp-root-path-input {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 212, 255, 0.35);
  color: #fff;
  font-size: 0.78rem;
}
.cp-root-path-input::placeholder {
  color: rgba(0, 212, 255, 0.35);
}
body.theme-light .cp-root-path-input {
  background: #fff;
  border-color: rgba(190, 24, 93, 0.35);
  color: #0f172a;
}

/* Policy Impact rows */
.cp-policy-placeholder {
  font-size: 0.80rem;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
  margin: 0;
}
body.theme-light .cp-policy-placeholder {
  color: rgba(15, 23, 42, 0.42);
}

.cp-policy-row {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.cp-policy-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cp-policy-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cp-policy-badge--requirement {
  background: rgba(217, 119, 6, 0.22);
  color: #f59e0b;
  border: 1px solid rgba(217, 119, 6, 0.45);
}
.cp-policy-badge--blocker {
  background: rgba(220, 38, 38, 0.20);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.45);
}
body.theme-light .cp-policy-badge--requirement {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.40);
}
body.theme-light .cp-policy-badge--blocker {
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.40);
}

.cp-policy-message {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
  line-height: 1.45;
}
body.theme-light .cp-policy-message {
  color: rgba(15, 23, 42, 0.65);
}

/* ================================================================
   ACC Control Plane — Execution Plane
   ================================================================ */

.cp-execpanel {
  background: rgba(255, 215, 0, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 6px;
  overflow: hidden;
}
body.theme-light .cp-execpanel {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(8, 47, 73, 0.22);
}

.cp-execpanel__header {
  padding: 7px 12px;
  background: rgba(255, 215, 0, 0.07);
  border-bottom: 1px solid rgba(255, 215, 0, 0.18);
}
body.theme-light .cp-execpanel__header {
  background: rgba(8, 47, 73, 0.06);
  border-bottom-color: rgba(8, 47, 73, 0.15);
}

.cp-execpanel__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.60rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 215, 0, 0.70);
  font-weight: 600;
}
body.theme-light .cp-execpanel__title {
  color: rgba(8, 47, 73, 0.75);
}

.cp-execpanel__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-exec-version-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cp-exec-label {
  font-family: 'Titillium Web', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 215, 0, 0.60);
  white-space: nowrap;
}
body.theme-light .cp-exec-label {
  color: rgba(8, 47, 73, 0.65);
}

.cp-exec-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cp-exec-block-reason {
  font-size: 0.76rem;
  color: rgba(255, 215, 0, 0.55);
  font-style: italic;
}
body.theme-light .cp-exec-block-reason {
  color: rgba(8, 47, 73, 0.55);
}

#cpExecuteBtn[disabled],
#cpExecuteBtn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.cp-card-divider-v {
  width: 1px;
  background: rgba(255, 255, 255, 0.3);
  align-self: stretch;
  margin-right: 10px;
  flex-shrink: 0;
}

.cp-card-meta {
  flex: 1;
  min-width: 0;
}

.cp-card-meta-hub {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1.4;
}

.cp-card-meta-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin: 4px 0;
}

.cp-card-meta-project {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.4;
  word-break: break-word;
}

.cp-card-body-red {
  background: #0440B2 !important;
  padding: 10px 14px 12px;
}

.cp-card-filename {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  word-break: break-word;
  line-height: 1.3;
}

/* Overrides for toggle rows inside the card body — system blue theme */
.cp-card-body-red .cp-lm-toggle {
  background: #0330a0;
  border-left-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}
.cp-card-body-red .cp-lm-toggle:hover {
  background: #0330a0;
  filter: brightness(0.88);
}
.cp-card-body-red .cp-lm2-header {
  background: #0330a0;
  border-left-color: rgba(255, 255, 255, 0.35);
}
.cp-card-body-red .cp-lm2-header:hover {
  background: #0330a0;
  filter: brightness(0.88);
}
.cp-card-body-red .cp-lm-arrow {
  color: rgba(255, 255, 255, 0.8);
}
.cp-card-body-red .cp-lm-section {
  background: #0330a0;
  border-left: none;
}
.cp-card-body-red .path-current,
.cp-card-body-red .path-dest {
  background: rgba(0, 0, 0, 0.18);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.45;
}
.cp-card-body-red .path-dest {
  color: rgba(175, 240, 255, 0.95);
}
.cp-card-body-red .path-current .path-label,
.cp-card-body-red .path-dest .path-label {
  color: rgba(255, 255, 255, 0.92);
}
.cp-card-body-red .path-dest.path-dest--unresolved {
  color: rgba(255, 214, 145, 0.95);
}
.cp-card-body-red .cp-lm-row {
  border-bottom-color: rgba(255, 255, 255, 0.18);
}
.cp-card-body-red .cp-lm-row-num {
  color: #ffffff;
  font-size: 33px;
  min-width: 44px;
  line-height: 1;
}
.cp-card-body-red .cp-lm2-btn {
  background: #021f7a;
  border-color: #011666;
}
.cp-card-body-red .cp-lm2-btn:hover:not(:disabled) {
  background: #011666;
}
.cp-card-body-red .cp-lm2-btn:disabled {
  background: rgba(255, 255, 255, 0.15);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.45);
}
.cp-card-body-red .cp-verify-btn {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.30);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  padding: 4px 10px;
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
}
.cp-card-body-red .cp-verify-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.20);
}
.cp-card-body-red .cp-verify-btn.verified {
  background: rgba(40, 167, 69, 0.30);
  border-color: rgba(40, 167, 69, 0.55);
  color: rgba(255, 255, 255, 0.55);
  cursor: default;
}

/* ── Link Manifest: Level 1 / Level 2 toggle rows ── */
.cp-lm-toggle {
  display: flex;
  align-items: center;
  background: rgba(181, 30, 58, 0.18);
  border-left: 3px solid #b51e3a;
  border-radius: 2px;
  padding: 7px 10px;
  margin-top: 6px;
  cursor: pointer;
  user-select: none;
  color: #f1f5f9;
  transition: background 0.15s;
}
.cp-lm-toggle:hover {
  background: rgba(181, 30, 58, 0.30);
}
.cp-lm2-header {
  background: rgba(59, 130, 246, 0.15);
  border-left-color: #3b82f6;
}
.cp-lm2-header:hover {
  background: rgba(59, 130, 246, 0.28);
}
.cp-lm-arrow {
  font-size: 10px;
  color: #94a3b8;
  min-width: 12px;
}
.cp-lm-section {
  border-left: 2px solid rgba(181, 30, 58, 0.20);
  margin-left: 2px;
  background: #1b1f26;
}
.cp-lm-row {
  display: flex;
  align-items: flex-start;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
}
.cp-lm-row:last-child {
  border-bottom: none;
}
.cp-lm-row-num {
  font-size: 33px;
  font-weight: 700;
  color: #b51e3a;
  min-width: 44px;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cp-lm-row-body {
  flex: 1;
  min-width: 0;
}
.cp-lm2-btn {
  background: #1d4ed8;
  color: #ffffff;
  border: 1px solid #1e40af;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  padding: 4px 10px;
  transition: background 0.15s;
}
.cp-lm2-btn:hover:not(:disabled) {
  background: #1e40af;
  color: #ffffff;
}
.cp-lm2-btn:disabled {
  background: #374151;
  border-color: #374151;
  color: #6b7280;
  cursor: default;
}

/* ── Link Manifest: Level 2 extraction progress bar ── */
.cp-lm-progress {
  margin-top: 8px;
  padding: 0 2px;
}
.cp-lm-progress-track {
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.cp-lm-progress-bar {
  height: 100%;
  width: 15%;
  border-radius: 6px;
  background: linear-gradient(90deg, #36d1dc 0%, #5b86e5 100%);
  background-size: 40px 40px;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.18) 25%, transparent 25%,
    transparent 50%, rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.18) 75%, transparent 75%, transparent
  );
  animation: cp-lm-progress-stripes 1s linear infinite;
  transition: width 0.4s ease;
}
@keyframes cp-lm-progress-stripes {
  from { background-position: 40px 0; }
  to   { background-position: 0 0; }
}
.cp-lm-progress-caption {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
  letter-spacing: 0.2px;
}
.cp-lm-progress.is-done .cp-lm-progress-bar {
  background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
  background-image: none;
  animation: none;
}
.cp-lm-progress.is-done .cp-lm-progress-caption {
  color: #38ef7d;
}
.cp-lm-progress.is-failed .cp-lm-progress-bar {
  background: linear-gradient(90deg, #b51e3a 0%, #e74c3c 100%);
  background-image: none;
  animation: none;
}
.cp-lm-progress.is-failed .cp-lm-progress-caption {
  color: #ff8b96;
}

/* Light-theme legibility for the progress track/caption */
body.theme-light .cp-lm-progress-track {
  background: rgba(0, 0, 0, 0.12);
}
body.theme-light .cp-lm-progress-caption {
  color: rgba(30, 41, 59, 0.85);
}

/* ================================================================
   ACC Control Plane — grid removal (workspace only)
   ================================================================ */

/* Centre the zone header label + subtitle in ACC mode */
#cpCenterZone.cp-workspace-active #cpZoneHead {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#cpCenterZone.cp-workspace-active #cpZoneHead .zone-label {
  margin: 0;
}

#cpCenterZone.cp-workspace-active .cp-zone-subtitle {
  margin-top: 2px;
}

#cpCenterZone.cp-workspace-active .zone__body {
  background-image: none !important;
  background-color: #f3f4f6;
}

#cpWorkspace {
  padding: 16px;
  background-color: #f3f4f6;
}

/* ================================================================
   ACC Control Plane — operational metric bar
   ================================================================ */

.cp-ops-bar {
  margin-bottom: 14px;
}

.cp-ops-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cp-ops-metric {
  flex: 1;
  min-width: 110px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cp-ops-metric__label {
  font-family: 'Titillium Web', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #9ca3af;
}

.cp-ops-metric__value {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}

.cp-ops-metric__secondary {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

.cp-ops-metric--total    .cp-ops-metric__value { color: #3b82f6; }
.cp-ops-metric--success  .cp-ops-metric__value { color: #16a34a; }
.cp-ops-metric--progress .cp-ops-metric__value { color: #d97706; }
.cp-ops-metric--failed   .cp-ops-metric__value { color: #dc2626; }
.cp-ops-metric--exists   .cp-ops-metric__value { color: #f59e0b; }
.cp-ops-metric--duration .cp-ops-metric__value { color: #7c3aed; }
.cp-ops-metric--rate     .cp-ops-metric__value { color: #0ea5e9; }

.cp-ops-metric--loading .cp-ops-metric__value,
.cp-ops-metric--loading .cp-ops-metric__label {
  color: #d1d5db;
}

.cp-ops-bar__error {
  font-size: 13px;
  color: #9ca3af;
  padding: 10px 0;
}

/* ================================================================
   ACC Control Plane — white container + centered heading + about row
   ================================================================ */

.cp-acc-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px 24px 20px;
  margin-bottom: 14px;
}

.cp-acc-heading {
  text-align: center;
  margin-bottom: 20px;
  background: #E3EEFE;
  border-bottom: 1px solid #c9d9f5;
  padding: 14px 12px;
  border-radius: 4px 4px 0 0;
}

.cp-acc-heading__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.15;
}

.cp-acc-heading__subtitle {
  font-family: 'Titillium Web', sans-serif;
  font-size: 16px;
  color: #6b7280;
  margin-top: 4px;
}

.cp-acc-about-row {
  display: flex;
  gap: 0;
  background: #ffffff;
  border-top: 1px solid #f3f4f6;
  padding-top: 18px;
}

.cp-acc-about-col {
  flex: 1;
  padding: 0 20px;
}

.cp-acc-about-col:first-child {
  padding-left: 0;
}

.cp-acc-about-col:last-child {
  padding-right: 0;
}

.cp-acc-about-divider {
  width: 1px;
  background: #e5e7eb;
  flex-shrink: 0;
  margin: 0 4px;
}

.cp-acc-about__section-title {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.cp-acc-about__text {
  font-size: 14px;
  color: #374151;
  line-height: 1.55;
  margin: 0;
}

.cp-acc-about__list {
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
  padding-left: 18px;
  margin: 0;
}

@media (max-width: 767px) {
  .cp-acc-about-row {
    flex-direction: column;
    gap: 16px;
  }
  .cp-acc-about-divider {
    display: none;
  }
  .cp-acc-about-col {
    padding: 0;
  }
}

/* ================================================================
   ACC Control Plane — govpanel overrides (neutral gray, always light)
   Intentionally remain light in both dark and light app themes.
   Scoped to .cp-govpanel — RCW cards in #parentFileCards are unaffected.
   ================================================================ */

.cp-govpanel,
body.theme-dark .cp-govpanel,
body.theme-light .cp-govpanel {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

.cp-govpanel__header,
body.theme-dark .cp-govpanel__header,
body.theme-light .cp-govpanel__header {
  background: #E3EEFE !important;
  border-bottom: 1px solid #c9d9f5 !important;
  padding: 10px 14px;
}

.cp-govpanel__title,
body.theme-dark .cp-govpanel__title,
body.theme-light .cp-govpanel__title {
  font-family: 'Titillium Web', sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #111827 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  display: block;
}

.cp-govpanel__subtitle {
  font-family: 'Titillium Web', sans-serif;
  font-size: 14px;
  color: #374151;
  line-height: 1.55;
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
body.theme-dark .cp-govpanel__subtitle,
body.theme-light .cp-govpanel__subtitle {
  color: #374151;
}

.cp-govpanel__body,
body.theme-dark .cp-govpanel__body,
body.theme-light .cp-govpanel__body {
  font-family: 'Titillium Web', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
}

.cp-govpanel__body .cp-gov-toggle-row,
body.theme-dark .cp-govpanel__body .cp-gov-toggle-row,
body.theme-light .cp-govpanel__body .cp-gov-toggle-row {
  font-family: 'Titillium Web', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: #374151 !important;
  font-weight: 400 !important;
}

.cp-govpanel__body .cp-gov-toggle-row:hover,
body.theme-dark .cp-govpanel__body .cp-gov-toggle-row:hover,
body.theme-light .cp-govpanel__body .cp-gov-toggle-row:hover {
  color: #111827 !important;
}

.cp-govpanel__body .cp-toggle-switch,
body.theme-dark .cp-govpanel__body .cp-toggle-switch,
body.theme-light .cp-govpanel__body .cp-toggle-switch {
  background: rgba(15, 23, 42, 0.12) !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
}
.cp-govpanel__body .cp-toggle-switch::after,
body.theme-dark .cp-govpanel__body .cp-toggle-switch::after,
body.theme-light .cp-govpanel__body .cp-toggle-switch::after {
  background: rgba(0, 0, 0, 0.35) !important;
}
.cp-govpanel__body input[type="checkbox"]:checked ~ .cp-toggle-switch,
body.theme-dark .cp-govpanel__body input[type="checkbox"]:checked ~ .cp-toggle-switch,
body.theme-light .cp-govpanel__body input[type="checkbox"]:checked ~ .cp-toggle-switch {
  background: rgba(190, 24, 93, 0.18) !important;
  border-color: rgba(190, 24, 93, 0.70) !important;
}
.cp-govpanel__body input[type="checkbox"]:checked ~ .cp-toggle-switch::after,
body.theme-dark .cp-govpanel__body input[type="checkbox"]:checked ~ .cp-toggle-switch::after,
body.theme-light .cp-govpanel__body input[type="checkbox"]:checked ~ .cp-toggle-switch::after {
  background: #be185d !important;
}

.cp-govpanel__body .cp-root-path-input,
body.theme-dark .cp-govpanel__body .cp-root-path-input,
body.theme-light .cp-govpanel__body .cp-root-path-input {
  background: #ffffff !important;
  border-color: rgba(190, 24, 93, 0.35) !important;
  color: #111827 !important;
}
.cp-govpanel__body .cp-root-path-input::placeholder {
  color: #9ca3af !important;
}

.cp-govpanel__body .cp-policy-placeholder,
body.theme-dark .cp-govpanel__body .cp-policy-placeholder,
body.theme-light .cp-govpanel__body .cp-policy-placeholder {
  font-family: 'Titillium Web', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  font-style: normal !important;
  color: #9ca3af !important;
}

.cp-govpanel__body .cp-policy-message,
body.theme-dark .cp-govpanel__body .cp-policy-message,
body.theme-light .cp-govpanel__body .cp-policy-message {
  font-family: 'Titillium Web', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  font-style: normal !important;
  color: #374151 !important;
}

.cp-govpanel__body {
  padding: 12px 14px;
}

/* ================================================================
   ACC Control Plane — Execution Plane header (large centered title)
   ================================================================ */

#cpExecutionPlane .cp-execpanel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
#luExecutionPlane .cp-execpanel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

#cpExecutionPlane .cp-execpanel__header {
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 24px 14px;
  text-align: center;
}
/* Green header variant for Execution Plane sub-panels */
.cp-execpanel__header--green,
#cpExecutionPlane .cp-execpanel__header--green {
  background: #E3FEF3 !important;
  border-bottom: 1px solid #b6f0d8 !important;
  padding: 10px 14px !important;
  text-align: left !important;
}
.cp-execpanel__header--green .cp-execpanel__title,
#cpExecutionPlane .cp-execpanel__header--green .cp-execpanel__title {
  font-family: 'Titillium Web', sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #111827 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
/* About the Execution Plane header — matches Make Execution Plan / Run Migration */
.cp-acc-heading--teal {
  background: #E3FEF3 !important;
  border-bottom: 1px solid #b6f0d8 !important;
}
.cp-acc-heading--teal .cp-acc-heading__title {
  color: #111827 !important;
}
.cp-acc-heading--teal .cp-acc-heading__subtitle {
  color: #374151 !important;
}

#cpExecutionPlane .cp-execpanel__title {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  line-height: 1.15;
  display: block;
}

.cp-execpanel__subtitle {
  font-family: 'Titillium Web', sans-serif;
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

/* Metrics row inside Execution Plane */
.cp-exec-metrics-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 20px 4px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 8px;
}

.cp-exec-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 70px;
}

.cp-exec-metric b {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #be185d;
  line-height: 1.1;
}

.cp-exec-metric span {
  font-family: 'Titillium Web', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #9ca3af;
}

/* Execution Plan explainer block */
.cp-exec-explainer {
  padding: 14px 20px 10px;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 4px;
}
.cp-exec-explainer__heading {
  font-family: 'Titillium Web', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #374151;
  margin-bottom: 6px;
}
body:not(.theme-light) .cp-exec-explainer__heading {
  color: rgba(255,215,0,0.75);
}
.cp-exec-explainer__body {
  font-family: 'Titillium Web', sans-serif;
  font-size: 12px;
  line-height: 1.55;
  color: #6b7280;
  margin: 0 0 6px;
}
body:not(.theme-light) .cp-exec-explainer__body {
  color: #9ca3af;
}
.cp-exec-explainer__body strong {
  color: #374151;
}
body:not(.theme-light) .cp-exec-explainer__body strong {
  color: rgba(255,215,0,0.85);
}
/* Execution Plane panels use white backgrounds — keep text dark regardless of theme */
#cpExecutionPlane .cp-exec-explainer__heading {
  color: #374151;
}
#cpExecutionPlane .cp-exec-explainer__body strong {
  color: #374151;
}

/* Radio version picker */
.cp-exec-version-row--centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 12px 4px !important;
}
.cp-radio-version-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}
.cp-radio-version {
  font-family: 'Titillium Web', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  user-select: none;
}
body:not(.theme-light) .cp-radio-version {
  color: rgba(255,255,255,0.80);
}
/* #cpExecutionPlane panels always have a white background */
#cpExecutionPlane .cp-radio-version {
  color: #374151;
}
#luExecutionPlane .cp-radio-version {
  color: #374151;
}
.cp-radio-version input[type=radio] {
  accent-color: #be185d;
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* Execution plane body padding */
#cpExecutionPlane .cp-execpanel__body {
  padding: 0 8px 12px;
}
#luExecutionPlane .cp-execpanel__body {
  padding: 0 8px 12px;
}

#cpExecutionPlane .cp-exec-action-row,
#luExecutionPlane .cp-exec-action-row {
  padding: 8px 12px 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ================================================================
   ACC Control Plane — RCW card grid padding
   ================================================================ */

/* Breathing room around the card grid in ACC mode */
#cpWorkspace #parentFileCards {
  padding: 8px 0 4px;
}

#cpWorkspace .cp-dashboard-panel {
  padding: 14px 16px !important;
}

#cpWorkspace .cp-card-grid {
  gap: 16px;
}

/* Govpanel flex columns — side-by-side layout without Bootstrap floats */
.cp-gp-col {
  display: flex;
  flex-direction: column;
  min-width: 240px;
}
.cp-gp-col--gov { flex: 1 1 0; }
.cp-gp-col--pol { flex: 1 1 0; }
.cp-gp-col .cp-govpanel { height: 100%; }

/* Sub-nav items under ACC Control Plane */
.cp-nav-sub-group {
  margin: 0;
  padding: 0;
}

.cp-left-nav .cp-nav-sub-item {
  display: block;
  padding: 6px 12px 6px 28px;
  color: rgba(15, 23, 42, 0.65);
  font-size: 11px;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: none !important;
  box-shadow: none !important;
  border-top: none;
  border-right: none;
  border-bottom: none;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s, border-left-color 0.15s;
}

.cp-left-nav .cp-nav-sub-item:hover,
.cp-left-nav .cp-nav-sub-item:focus {
  color: #0f172a;
  background: none !important;
  border-left-color: rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.cp-left-nav .cp-nav-sub-item.active {
  color: #0f172a;
  background: none !important;
  border-left-color: rgba(0, 0, 0, 0.45);
}

/* Dark theme sub-nav override */
body:not(.theme-light) .cp-left-nav .cp-nav-sub-item {
  color: rgba(255, 255, 255, 0.55);
}
body:not(.theme-light) .cp-left-nav .cp-nav-sub-item:hover,
body:not(.theme-light) .cp-left-nav .cp-nav-sub-item:focus {
  color: rgba(255, 255, 255, 0.9);
  border-left-color: rgba(255, 255, 255, 0.3);
}
body:not(.theme-light) .cp-left-nav .cp-nav-sub-item.active {
  color: #ffffff;
  border-left-color: rgba(255, 255, 255, 0.6);
}

/* Reset action-card base styles when used as sub-nav items */
.cp-left-nav .cp-nav-sub-item.action-card {
  border: none !important;
  border-left: 3px solid transparent;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.cp-left-nav .cp-nav-sub-item.action-card:hover,
.cp-left-nav .cp-nav-sub-item.action-card:focus {
  border: none !important;
  border-left: 3px solid rgba(255, 255, 255, 0.3) !important;
  background: none !important;
  box-shadow: none !important;
}

.cp-left-nav .cp-nav-sub-item.action-card.active {
  border: none !important;
  border-left: 3px solid rgba(255, 255, 255, 0.6) !important;
  background: none !important;
  box-shadow: none !important;
}

/* ================================================================
   Policy Engine Page
   ================================================================ */

.cp-pe-container {
  padding: 20px 28px 28px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  /* Fill the visible tab page (viewport minus app chrome); grows + scrolls with more rows */
  min-height: calc(100vh - 200px);
}

.cp-pe-header {
  margin-bottom: 20px;
}

.cp-pe-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #111827;
  margin-bottom: 6px;
}

.cp-pe-subtitle {
  font-size: 13px;
  color: #6b7280;
  max-width: 720px;
  line-height: 1.5;
}

.cp-pe-table-wrap {
  overflow-x: auto;
  flex: 1;
  min-height: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.cp-pe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cp-pe-table th {
  font-family: 'Titillium Web', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #374151;
  background: #f9fafb;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.cp-pe-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937;
  vertical-align: top;
  line-height: 1.4;
}

.cp-pe-table tr:last-child td {
  border-bottom: none;
}

.cp-pe-table tr:hover td {
  background: #f8fafc;
}

.cp-pe-policy-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.cp-pe-policy-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.4;
  max-width: 560px;
}

.cp-pe-center {
  text-align: center;
}

.cp-pe-loading,
.cp-pe-empty,
.cp-pe-error {
  padding: 28px 14px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

.cp-pe-error { color: #ef4444; }

/* Policy type badges */
.cp-pe-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.cp-pe-badge--governance {
  background: #fef3c7;
  color: #92400e;
}

.cp-pe-badge--routing {
  background: #dbeafe;
  color: #1e40af;
}

.cp-pe-badge--requirement {
  background: #fce7f3;
  color: #9d174d;
}

/* Toggle inside Policy Engine table — reset margin/padding */
.cp-pe-toggle {
  margin: 0;
  justify-content: center;
}

/* Dark-theme overrides for Policy Engine */
/* Title/subtitle sit on the light tab surface in both themes — keep them dark */
body:not(.theme-light) .cp-pe-container .cp-pe-title {
  color: #111827;
}
body:not(.theme-light) .cp-pe-container .cp-pe-subtitle {
  color: #4b5563;
}
body:not(.theme-light) .cp-pe-table-wrap {
  background: #000000;
  border-color: rgba(0, 212, 255, 0.18);
}
body:not(.theme-light) .cp-pe-table th {
  background: rgba(0, 212, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border-bottom-color: rgba(0, 212, 255, 0.14);
}
body:not(.theme-light) .cp-pe-table td {
  color: rgba(255, 255, 255, 0.82);
  border-bottom-color: rgba(0, 212, 255, 0.08);
}
body:not(.theme-light) .cp-pe-table tr:hover td {
  background: rgba(0, 212, 255, 0.04);
}
body:not(.theme-light) .cp-pe-policy-name  { color: #ffffff; }
body:not(.theme-light) .cp-pe-policy-desc  { color: rgba(255,255,255,0.45); }

/* ================================================================
   Policy Impact — enriched structured display
   ================================================================ */

.cp-pi-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #f3f4f6;
  font-family: 'Titillium Web', sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.cp-pi-row:last-child { border-bottom: none; }

.cp-pi-label {
  flex: 0 0 150px;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
}

.cp-pi-value {
  flex: 1;
  color: #1f2937;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 14px;
  line-height: 1.55;
}

.cp-pi-none    { color: #9ca3af; }
.cp-pi-yes     { color: #b45309; font-weight: 600; }
.cp-pi-warn    { color: #d97706; font-weight: 600; }
.cp-pi-blocked { color: #dc2626; font-weight: 600; }

.cp-pi-route {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cp-pi-route--ok      { background: #15803d; border: none; color: #ffffff; }
.cp-pi-route--blocked { background: #b91c1c; border: none; color: #ffffff; }

.cp-pi-policy-pill {
  background: #1e40af;
  border: none;
  color: #ffffff;
  font-size: 10px;
  padding: 2px 7px;
}

.cp-pi-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 8px 0;
}

/* Dark-theme overrides for Policy Impact */
body:not(.theme-light) .cp-pi-label       { color: rgba(255,255,255,0.5); }
body:not(.theme-light) .cp-pi-value       { color: rgba(255,255,255,0.85); }
body:not(.theme-light) .cp-pi-row         { border-bottom-color: rgba(255,255,255,0.08); }
body:not(.theme-light) .cp-pi-route--ok   { background: #15803d; color: #ffffff; }
body:not(.theme-light) .cp-pi-route--blocked { background: #b91c1c; color: #ffffff; }
body:not(.theme-light) .cp-pi-policy-pill { background: #1e40af; color: #ffffff; }
body:not(.theme-light) .cp-pi-yes         { color: #fbbf24; }
body:not(.theme-light) .cp-pi-warn        { color: #fbbf24; }
body:not(.theme-light) .cp-pi-blocked     { color: #f87171; }
body:not(.theme-light) .cp-pi-divider     { border-top-color: rgba(255,255,255,0.1); }

/* Keep Policy Impact text style aligned with center panel body copy (How to Use style) */
.cp-govpanel .cp-pi-label,
body.theme-dark .cp-govpanel .cp-pi-label,
body.theme-light .cp-govpanel .cp-pi-label {
  color: #374151;
}

.cp-govpanel .cp-pi-value,
body.theme-dark .cp-govpanel .cp-pi-value,
body.theme-light .cp-govpanel .cp-pi-value {
  color: #1f2937;
}


/* ─── Link Governance Report — metrics row ──────────────────────────────── */
.cp-gov-metrics-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.cp-gov-metric-tile {
  flex: 1;
  background: rgba(190, 24, 93, 0.06);
  border: 1px solid rgba(190, 24, 93, 0.18);
  border-radius: 4px;
  padding: 6px 8px;
  text-align: center;
}
.cp-gov-metric-tile__value {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #be185d;
  letter-spacing: 1px;
  line-height: 1.2;
}
.cp-gov-metric-tile__label {
  font-family: 'Titillium Web', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6b7280;
  margin-top: 3px;
}

/* ─── Link Governance Report — issue list ───────────────────────────────── */
.cp-gov-report-heading {
  font-family: 'Titillium Web', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.4;
  color: #92400e;
}
.cp-gov-report-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.cp-gov-report-item {
  font-family: 'Titillium Web', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: #374151;
  background: #fef9c3;
  border-radius: 3px;
  padding: 4px 8px;
  margin-bottom: 4px;
}
.cp-gov-report-toggle {
  color: #be185d;
}
.cp-gov-report-count {
  font-size: 12px;
  color: #6b7280;
}

/* ─── Link Governance toggle tooltips — pure CSS ────────────────────────── */
.cp-gov-tt-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cp-gov-tt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(190, 24, 93, 0.50);
  cursor: help;
  position: relative;
  line-height: 1;
  flex-shrink: 0;
  font-style: normal;
}
.cp-gov-tt-icon:hover {
  color: #be185d;
}
.cp-gov-tt-text {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  width: 240px;
  background: #1e293b;
  color: #e2e8f0;
  font-family: 'Titillium Web', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 4px;
  z-index: 999;
  pointer-events: none;
  white-space: normal;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.cp-gov-tt-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}
.cp-gov-tt-icon:hover .cp-gov-tt-text {
  display: block;
}

/* ================================================================
   Uniform zone header row — Source · Center metrics · Destination
   ================================================================ */

/* Neutral grey background in both themes */
.zone--source .zone__head,
.zone--dest   .zone__head,
body.theme-light .zone--source .zone__head,
body.theme-light .zone--dest   .zone__head,
.cp-ops-zone-head {
  background-color: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

/* Uniform height + vertical centering for source/dest labels */
.zone--source .zone__head,
.zone--dest   .zone__head {
  min-height: 64px;
  padding: 0 14px;
  align-items: center;
}

/* Match height and center metrics bar vertically */
.cp-ops-zone-head {
  min-height: 64px;
  padding: 6px 8px;
  align-items: center;
}


/* ── Who's Online + Migration Lock ───────────────────────────────────────── */

.cp-who-online-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 7px;
  transition: border-color 0.15s, color 0.15s;
}
.cp-who-online-btn:hover {
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
}
.cp-online-count {
  font-weight: 700;
  font-size: 11px;
}

.cp-who-online-panel {
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  margin-top: 8px;
  padding: 8px 10px;
}
.cp-who-online-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}
.cp-online-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cp-online-user {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  padding: 3px 0;
}
.cp-online-user + .cp-online-user {
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cp-presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.cp-online-user--migrating .cp-presence-dot {
  background: #f59e0b;
}

/* Lock badge on jsTree source file nodes */
.cp-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #f59e0b;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: 3px;
  padding: 0 4px;
  vertical-align: middle;
  white-space: nowrap;
}
