/* Direct port of the V4 glass cockpit. */
:root {
  --side-w: var(--side);
  --rail-w: 300px;
  --glass-shell: blur(22px) saturate(1.4);
  --glass-data: blur(12px) saturate(1.2);
  --panel-data: rgba(6, 18, 32, 0.55);
  --ws-h: min(78vh, 820px);
  --violet: #9b8cff;
}

.v4-muted { color: var(--muted); }

.v4-panel {
  background: rgba(8, 24, 40, 0.3);
  backdrop-filter: var(--glass-shell);
  -webkit-backdrop-filter: var(--glass-shell);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.v4-panel--data {
  background: var(--panel-data);
  backdrop-filter: var(--glass-data);
  -webkit-backdrop-filter: var(--glass-data);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.v4-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.v4-panel__title {
  font-weight: 650;
  color: var(--bright);
  font-size: 0.98rem;
}

.v4-table-card {
  border-width: 1px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(78, 179, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.v4-table-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.v4-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.v4-chip {
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.v4-chip:hover { color: var(--bright); border-color: var(--border-strong); }
.v4-chip.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--border-strong);
  box-shadow: 0 0 12px rgba(78, 179, 255, 0.15);
}

.v4-player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v4-player-name {
  font-weight: 600;
  color: var(--bright);
}

.v4-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(78, 179, 255, 0.35), transparent 55%),
    var(--elev);
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0 1px rgba(78, 179, 255, 0.12);
}

.v4-avatar--initials .v4-avatar__wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 80%, rgba(78, 179, 255, 0.18), transparent 50%);
  pointer-events: none;
}

.v4-avatar__letters {
  position: relative;
  z-index: 1;
}

.v4-avatar--photo .v4-avatar__letters,
.v4-avatar--photo .v4-avatar__wash {
  display: none;
}

.v4-avatar--photo.is-fallback .v4-avatar__letters,
.v4-avatar.v4-avatar--initials .v4-avatar__letters {
  display: inline;
}

.v4-avatar--photo.is-fallback .v4-avatar__wash {
  display: block;
}

.v4-avatar__chip {
  position: absolute;
  right: -2px;
  bottom: -2px;
  font-size: 0.52rem;
  font-weight: 750;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(8, 20, 36, 0.92);
  border: 1px solid var(--border);
  color: var(--muted);
  z-index: 2;
}

.v4-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v4-player-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.v4-player-meta {
  font-size: 0.68rem;
  color: var(--muted);
}

.v4-ws-card--why p {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--bright);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v4-sim__block {
  margin-bottom: 8px;
}

.v4-chip-ico {
  width: 12px;
  height: 12px;
  display: inline-block;
  vertical-align: -1px;
  margin-right: 4px;
}

.v4-decision {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  min-width: 6.4rem;
  text-align: center;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.v4-decision--protect {
  background: rgba(62, 207, 142, 0.28);
  color: #7dffc0;
  border-color: rgba(62, 207, 142, 0.5);
}
.v4-decision--hold {
  background: rgba(78, 179, 255, 0.24);
  color: #9ad4ff;
  border-color: rgba(78, 179, 255, 0.45);
}
.v4-decision--reprice-up {
  background: rgba(155, 140, 255, 0.3);
  color: #c8bfff;
  border-color: rgba(155, 140, 255, 0.55);
}
.v4-decision--reprice-down {
  background: rgba(232, 168, 56, 0.28);
  color: #ffd48a;
  border-color: rgba(232, 168, 56, 0.5);
}
.v4-decision--review {
  background: rgba(239, 91, 91, 0.26);
  color: #ffb0b0;
  border-color: rgba(239, 91, 91, 0.5);
}

.v4-ring3d {
  padding: 4px 10px 12px;
}

.v4-ring3d__stage {
  position: relative;
  height: 188px;
  perspective: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v4-ring3d--large {
  padding: 4px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v4-ring3d--large .v4-ring3d__stage {
  flex: 1;
  height: auto;
  min-height: 0;
  perspective: none;
}

.v4-ring3d__svg {
  width: 280px;
  height: 184px;
  transform: rotateX(58deg) scale(1.06);
  transform-origin: 50% 48%;
}

.v4-ring3d--large .v4-ring3d__svg {
  width: 100%;
  height: 100%;
  max-width: none;
  transform: none;
  filter: drop-shadow(0 16px 28px rgba(0, 220, 255, 0.16));
}

.v4-ring3d__glass--large {
  width: 28%;
  height: auto;
  aspect-ratio: 1;
  max-width: 200px;
  min-width: 92px;
  top: 50%;
  background: rgba(6, 18, 36, 0.55);
  border: 1px solid rgba(46, 230, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 0 28px rgba(46, 230, 255, 0.22);
}

.v4-ring3d--large .v4-ring3d__pool {
  font-size: 1.35rem;
}

.v4-ring3d__seg {
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.28));
}

.v4-ring3d__glass {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(10, 24, 42, 0.42);
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 22px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 8px;
  pointer-events: none;
}

.v4-ring3d__pool {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--bright);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.v4-ring3d__pool-lbl {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 3px;
}

.v4-ring3d__names {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--accent);
  margin-top: 6px;
  line-height: 1.2;
}

.v4-ring3d__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  padding: 0 4px 4px;
}

.v4-ring3d__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text);
  background: rgba(8, 22, 36, 0.45);
  border: 1px solid rgba(200, 225, 255, 0.14);
  border-radius: 999px;
  padding: 3px 8px;
}

.v4-ring3d__chip i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  display: block;
}

.v4-nil-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 12px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.v4-ring3d__hit {
  cursor: pointer;
}
.v4-ring3d__hit:hover path {
  filter: brightness(1.18);
}
.v4-ring3d--large .v4-ring3d__svg {
  pointer-events: auto;
}

.v4-slice-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(8, 24, 42, 0.4);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.v4-slice-row:hover,
.v4-slice-row.is-selected {
  background: rgba(96, 190, 255, 0.12);
  border-color: rgba(96, 190, 255, 0.28);
}
.v4-slice-row__id {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.v4-slice-row__name {
  font-weight: 650;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v4-slice-row__usd {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}
.v4-slice-row .v4-decision {
  min-width: 0;
  padding: 3px 8px;
  font-size: 0.66rem;
}
.v4-nil-stub {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(160, 200, 240, 0.28);
  background: rgba(8, 22, 36, 0.4);
}

.v4-nil-stub__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.v4-nil-stub__tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}

.v4-nil-stub__when {
  font-size: 0.68rem;
  color: var(--muted);
}

.v4-nil-stub__title {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--bright);
}

.v4-nil-stub__body {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

/* —— Workspace overlay —— */
.v4-workspace {
  position: fixed;
  left: calc(var(--side-w) + 14px);
  right: 14px;
  bottom: 10px;
  height: 520px;
  max-height: 520px;
  background: rgba(6, 16, 28, 0.94);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow:
    0 -16px 56px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 0 16px 14px;
  animation: v4SlideUp 0.22s ease-out;
}
#sheet.v4-workspace { height: 520px; max-height: 520px; }
.is-card-veiled { filter: blur(6px); user-select: none; pointer-events: none; }

@keyframes v4SlideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.v4-workspace[hidden] { display: none !important; }

.v4-ws__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 8px;
  gap: 12px;
  flex-shrink: 0;
}

.v4-ws__tabs {
  display: flex;
  gap: 2px;
}

.v4-ws__tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  padding: 6px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.v4-ws__tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 650;
}

.v4-ws__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.v4-ws__body {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.v4-ws__body--cockpit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 10px;
  align-items: start;
  overflow: auto;
}
.v4-ws__body--cockpit .v4-ws-card--action { grid-column: 1 / -1; }
.v4-ws__body--cockpit .v4-ws-card--identity { grid-column: 1; }
.v4-ws__body--cockpit .v4-ws-card--why { grid-column: 2; }
.v4-ws__body--cockpit .v4-ws-card { overflow: visible; padding: 10px 12px; }

.v4-ws__body--manage {
  grid-template-columns: minmax(220px, 1.15fr) minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(260px, 1.2fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.v4-ws-card--chart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.v4-ws-card {
  background: rgba(14, 34, 54, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

.v4-nego-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.v4-nego-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(96, 190, 255, 0.16);
  background: rgba(0, 0, 0, 0.2);
}

.v4-nego-item--wide { grid-column: 1 / -1; }

.v4-nego-item__lbl {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.v4-nego-item__val {
  margin-top: 4px;
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--bright);
  font-family: var(--mono);
}

.v4-nego-item__val.is-up { color: #7dffb3; }
.v4-nego-item__val.is-down { color: #ff9b7a; }

.v4-nego-why-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.v4-nego-why {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}

.v4-ws-card--identity {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.v4-ws-card--why {
  background: rgba(78, 179, 255, 0.1);
  border-color: var(--border-strong);
}

.v4-ws-card--chart .v4-hist-chart {
  flex: 1;
  min-height: 80px;
}

.v4-ws-card--why h4,
.v4-ws-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 6px;
}

.v4-ws-id-inline {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 0;
}

.v4-ws__avatar img { width: 100%; height: 100%; object-fit: cover; }

.v4-ws__name {
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--bright);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.v4-ws__meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}

.v4-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.v4-stat-grid--compact {
  grid-template-columns: 1fr 1fr 1fr;
}

.v4-ws-card--evidence-detail .v4-stat-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.v4-stat {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(80, 120, 180, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
}

.v4-stat__lbl {
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.v4-stat__val {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--bright);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.v4-history-list {
  list-style: none;
  font-size: 0.76rem;
}

.v4-history-list li {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(80, 120, 180, 0.1);
}

.v4-sim {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.v4-sim h4 {
  font-size: 0.82rem;
  color: var(--bright);
  margin-bottom: 6px;
}

.v4-sim__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.76rem;
}

.v4-sim input[type="range"] {
  width: 100%;
  margin: 4px 0 8px;
  accent-color: var(--accent);
}

.v4-sim__impacts {
  list-style: none;
  font-size: 0.72rem;
  overflow: auto;
  max-height: 72px;
  flex: 1;
}

.v4-sim__impacts li {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid rgba(80, 120, 180, 0.08);
}

.v4-sim-pos {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 4px;
}

.v4-sim__neg { color: var(--red); font-family: var(--mono); font-size: 0.7rem; }
.v4-sim__pos { color: var(--green); font-family: var(--mono); font-size: 0.7rem; }

.v4-sim__actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.v4-btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(120, 200, 255, 0.55);
  background: linear-gradient(180deg, rgba(96, 190, 255, 0.55), rgba(56, 150, 230, 0.42));
  color: #f2f8ff;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(78, 179, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.v4-btn:hover { background: linear-gradient(180deg, rgba(110, 200, 255, 0.7), rgba(70, 165, 240, 0.55)); }

.v4-btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

#v4SimMsg { font-size: 0.7rem; }

.v4-scenarios p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 14px 10px;
}

.v4-dc-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.72rem;
}
.v4-dc-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(6, 18, 32, 0.95);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 4px;
  font-weight: 650;
  border-bottom: 1px solid var(--border);
}
.v4-dc-table td {
  padding: 4px 4px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v4-dc-table th:first-child,
.v4-dc-table td:first-child {
  width: 36%;
}
.v4-dc-table tr.v4-dc-row {
  display: table-row;
  width: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  grid-template-columns: none;
  cursor: pointer;
}
.v4-dc-table tr.v4-dc-row:hover td,
.v4-dc-table tr.v4-dc-row.is-selected td {
  background: rgba(96, 190, 255, 0.1);
}
.v4-player-cell--tight {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.v4-dc-table .v4-decision {
  min-width: 0;
  padding: 3px 8px;
  font-size: 0.66rem;
}

.v4-slice-table {
  font-size: 0.7rem;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.v4-slice-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(6, 18, 32, 0.94);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 5px;
}
.v4-slice-table td {
  padding: 6px 5px;
  vertical-align: middle;
}
.v4-slice-table tr.v4-slice-row {
  display: table-row;
  width: auto;
  background: transparent;
  border: none;
  padding: 0;
  grid-template-columns: none;
  cursor: pointer;
}
.v4-slice-table tr.v4-slice-row:hover td,
.v4-slice-table tr.v4-slice-row.is-selected td {
  background: rgba(96, 190, 255, 0.1);
}
.v4-nil-stack--table {
  padding: 0;
  overflow: auto;
}
.v4-app[data-view="decisions"][data-dc-layout="split"] {
  --rail-w: 20%;
  height: 100vh;
  overflow: hidden;
}

.v4-app[data-view="decisions"][data-dc-layout="split"] .v4-body {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 20%);
  overflow: hidden;
}

.v4-app[data-view="decisions"][data-dc-layout="split"] .v4-rail {
  width: auto;
}

.v4-app[data-view="decisions"][data-dc-layout="roster"] {
  --rail-w: 280px;
}

.v4-app[data-view="decisions"][data-dc-layout="roster"] .v4-body {
  grid-template-columns: minmax(0, 1fr) 280px;
  overflow: hidden;
}

.v4-app[data-view="decisions"][data-dc-layout="roster"] .v4-rail {
  width: auto;
}

.v4-dc__cockpit {
  display: grid;
  grid-template-columns: minmax(220px, var(--dc-queue-w, 32%)) 8px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  flex: 1;
}

.v4-dc__split {
  cursor: col-resize;
  background: linear-gradient(90deg, transparent, rgba(96, 190, 255, 0.35), transparent);
  position: relative;
  z-index: 2;
}
.v4-dc__split::after {
  content: "";
  position: absolute;
  inset: 0 -4px;
}
.v4-dc__split:hover,
.v4-app.is-dc-resizing .v4-dc__split {
  background: linear-gradient(90deg, transparent, rgba(46, 230, 255, 0.7), transparent);
}
.v4-app.is-dc-resizing {
  cursor: col-resize;
  user-select: none;
}

.v4-app[data-view="decisions"][data-dc-layout="split"] .v4-main {
  min-height: 0;
  overflow: hidden;
}

.v4-dc {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.v4-dc__queue {
  min-width: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.v4-dc__viz {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 42%, rgba(46, 230, 255, 0.12), transparent 58%),
    radial-gradient(ellipse at 70% 70%, rgba(139, 107, 255, 0.1), transparent 50%);
}

.v4-panel__head--tight {
  padding: 8px 12px;
}

.v4-dc-delta {
  margin: 6px 10px 0;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(96, 190, 255, 0.22);
  background: linear-gradient(135deg, rgba(8, 36, 58, 0.85), rgba(4, 22, 38, 0.72));
  flex-shrink: 0;
}

.v4-dc-delta__pilot {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(160, 210, 255, 0.85);
  margin-bottom: 6px;
}

.v4-dc-delta__title {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--bright);
  margin-bottom: 6px;
}

.v4-dc-delta__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.v4-dc-delta__metric {
  min-width: 0;
}

.v4-dc-delta__val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v4-dc-delta__lbl {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
}

.v4-dc-hold {
  margin: 8px 2px 4px;
  border-top: 1px solid rgba(96, 190, 255, 0.12);
  padding-top: 6px;
}

.v4-dc-hold > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 6px 8px;
  list-style: none;
}

.v4-dc-hold > summary::-webkit-details-marker {
  display: none;
}

.v4-dc-hold__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.v4-ws-capital-range {
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--bright);
  margin: 4px 0 6px;
}

.v4-market-needs {
  margin-bottom: 12px;
}

.v4-market-needs__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 14px 8px;
}

.v4-market-need {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(96, 190, 255, 0.28);
  background: rgba(96, 190, 255, 0.1);
  font-weight: 650;
  letter-spacing: 0.04em;
}

.v4-market-recs {
  margin: 0 14px 14px;
  padding-left: 1.1rem;
  color: var(--text);
  line-height: 1.45;
}

.v4-market-recs li {
  margin-bottom: 6px;
}

.v4-dc__headline {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--bright);
  margin-top: 4px;
}

@media (max-width: 900px) {
  .v4-dc-delta__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.v4-dc__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 8px 10px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.v4-dc-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1.15fr) 64px auto minmax(72px, 0.9fr) 40px;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(8, 24, 42, 0.35);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.v4-dc-row .v4-decision {
  min-width: 0;
  padding: 3px 8px;
  font-size: 0.68rem;
}

.v4-dc-row__chg {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--muted);
}

.v4-dc-row__chg.is-up { color: #3dffb0; }
.v4-dc-row__chg.is-down { color: #ff5c7a; }

.v4-dc-row__pct {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 650;
  text-align: right;
  color: var(--bright);
}

.v4-dc-row:hover {
  background: rgba(96, 190, 255, 0.08);
  border-color: rgba(96, 190, 255, 0.18);
}

.v4-dc-row.is-selected {
  background: rgba(96, 190, 255, 0.14);
  border-color: rgba(96, 190, 255, 0.35);
}

.v4-dc-row__rank {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.v4-dc-row__id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v4-dc-row__name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v4-dc-row__why {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v4-dc-row__usd {
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: nowrap;
}

.v4-dc-row__trail {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.v4-dc-row__conf {
  min-width: 48px;
  text-align: right;
}

/* Player Intel */
.v4-intel__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 12px;
  max-height: min(70vh, 800px);
  overflow: auto;
}

.v4-sim--inline,
.v4-sim--compact {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(200, 225, 255, 0.12);
  min-height: 0;
}

.v4-sim--inline h4,
.v4-sim--compact h4 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}

.v4-sim--compact input[type="range"] {
  margin: 6px 0 0;
}

.v4-ws-card--action {
  border: 1px solid rgba(96, 190, 255, 0.28);
  background: linear-gradient(180deg, rgba(12, 40, 68, 0.55), rgba(8, 24, 42, 0.45));
  padding: 10px 14px;
}

.v4-action-terminal {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.v4-action-terminal__record {
  flex: 1;
  min-width: 200px;
}

.v4-action-terminal__lbl {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.v4-action-terminal__rt {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.v4-action-terminal__rt .v4-action-terminal__lbl {
  margin-bottom: 0;
}

.v4-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v4-action-chip {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(196, 212, 232, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  cursor: pointer;
}

.v4-action-chip:hover {
  border-color: rgba(96, 190, 255, 0.4);
}

.v4-action-chip.is-active {
  border-color: rgba(96, 190, 255, 0.65);
  background: rgba(96, 190, 255, 0.16);
  color: var(--bright);
}

.v4-action-terminal__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

@media (max-width: 1400px) {
  .v4-tagline { display: none; }
  .v4-command { grid-template-columns: repeat(3, 1fr); }
  .v4-ws__body--cockpit,
  .v4-ws__body--manage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    overflow: auto;
  }
}

/* Rail collapses before workspace below ~1280 */
@media (max-width: 1280px) {
  .v4-dc__cockpit {
    grid-template-columns: minmax(180px, var(--dc-queue-w, 38%)) 8px minmax(0, 1fr);
  }
  .v4-body {
    grid-template-columns: 1fr;
  }
  .v4-rail {
    display: none;
  }
  .v4-workspace {
    left: 12px;
    right: 12px;
    height: 520px;
    max-height: 520px;
  }
  .v4-ws__body--cockpit {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow: auto;
  }
  .v4-ws__body--cockpit .v4-ws-card--why,
  .v4-ws__body--cockpit .v4-ws-card--chart { grid-column: auto; }
}

.v4-dc-holes {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 10px;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(232, 168, 56, 0.32);
  background: rgba(232, 168, 56, 0.08);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.v4-dc-holes__val { font-weight: 650; font-size: 0.88rem; line-height: 1.35; }
.v4-dc-holes__lbl { margin-top: 4px; font-size: 0.7rem; color: var(--muted); }


.v4-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 0.58rem;
}
.v4-player-cell .head,
.v4-ws__avatar,
.v4-ws__avatar img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}
.v4-player-cell .head { width: 28px; height: 28px; border-radius: 50%; }

/* —— ACC team directory + placeholder program shell —— */
.v4-acc-dir {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v4-acc-dir__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.v4-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: 14px;
  align-items: start;
}
.dc-shell { display: flex; flex-direction: column; }
.v4-dc { height: auto; min-height: 0; overflow: visible; }
.v4-dc__cockpit {
  flex: none;
  height: min(58vh, 560px);
  max-height: min(58vh, 560px);
  min-height: 420px;
  grid-template-columns: minmax(360px, 44%) 8px minmax(0, 1fr);
}
.v4-dc__queue, .v4-dc__viz { min-height: 0; overflow: hidden; }
.v4-ring3d--large { min-height: 0; height: 100%; }
.v4-ring3d--large .v4-ring3d__stage { min-height: 0; height: 100%; }
.v4-rail { min-width: 0; min-height: 0; }
.v4-rail .v4-panel { height: 100%; display: flex; flex-direction: column; }
#sheet.v4-workspace { left: calc(var(--side) + 14px); }
@media (max-width: 1100px) {
  .v4-body { grid-template-columns: 1fr; }
  .v4-ws__body--cockpit, .v4-ws__body--manage { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  #sheet.v4-workspace { left: 10px; right: 10px; height: 520px; max-height: 520px; }
  .v4-ws__body--cockpit, .v4-ws__body--manage { grid-template-columns: 1fr; }
  .v4-dc__cockpit { grid-template-columns: 1fr; }
  .v4-dc__split { display: none; }
}
.v4-ctx-select {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(120, 160, 210, 0.28);
  background: rgba(12, 32, 52, 0.85);
  color: var(--bright);
  cursor: pointer;
  text-align: left;
}
.v4-ctx-select:hover,
.v4-ctx-select[aria-expanded="true"] {
  border-color: rgba(120, 180, 240, 0.5);
  background: rgba(16, 40, 64, 0.95);
}
.v4-ctx-select__logo-full { height: 22px; width: auto; max-width: 120px; object-fit: contain; flex: 0 0 auto; }
.v4-ctx-select__chev { margin-left: auto; color: var(--muted); font-size: 12px; }
.is-identity-veiled .v4-ws__name,
.is-identity-veiled .v4-ws__avatar,
.is-identity-veiled .v4-ws__meta { filter: blur(6px); user-select: none; }
.is-num-veiled { filter: blur(6px); user-select: none; }
.v4-conf-switch { position: relative; margin: 0 0 8px; }
.v4-conf-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  padding: 10px; border-radius: 12px;
  border: 1px solid rgba(120, 160, 210, 0.32);
  background: rgba(6, 18, 32, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}
.v4-conf-menu[hidden] { display: none !important; }
.v4-conf-menu__hint { font-size: 0.68rem; color: rgba(170, 190, 215, 0.65); margin: 0 0 8px; }
.v4-conf-menu__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.v4-conf-opt {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid rgba(120, 160, 210, 0.18);
  background: rgba(12, 32, 52, 0.7); cursor: pointer;
}
.v4-conf-opt:hover { border-color: rgba(120, 180, 240, 0.45); background: rgba(20, 48, 76, 0.9); }
.v4-conf-opt.is-selected { border-color: rgba(78, 179, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(78, 179, 255, 0.25); }
.v4-conf-opt img { height: 26px; width: auto; max-width: 100%; object-fit: contain; }
.v4-hist-chart { display: block; width: 100%; margin-top: 8px; }
.v4-dossier__cat { margin-top: 12px; }
.v4-dossier__cat-lbl { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.v4-audit-chain { color: var(--text); font-size: 0.84rem; margin: 6px 0 10px; }
.v4-audit-chain code { font-family: var(--mono); color: var(--bright); }
