/* ORDBITS OSCS — COMMAND DASHBOARD V3
   Intentional evolution over V2: command hierarchy, governed Onyx intelligence,
   Domain analytics emphasis and shared navigation compatibility. */

:root {
  --v3-onyx: #8b5cf6;
  --v3-onyx-soft: #a78bfa;
  --v3-cyan: #00d4ff;
  --v3-ink: rgba(4, 8, 16, .94);
  --v3-panel: rgba(8, 14, 24, .78);
  --v3-line: rgba(126, 173, 226, .12);
}

html[data-oscs-dashboard="v3"] body {
  background:
    radial-gradient(circle at 14% 8%, rgba(0, 212, 255, .09), transparent 30%),
    radial-gradient(circle at 83% 14%, rgba(139, 92, 246, .11), transparent 25%),
    radial-gradient(circle at 68% 68%, rgba(0, 212, 255, .045), transparent 28%),
    linear-gradient(180deg, #02050a 0%, #040913 30%, #06101d 68%, #040912 100%);
}

html[data-oscs-dashboard="v3"] .dashboard-shell {
  max-width: 1840px;
}

html[data-oscs-dashboard="v3"] .topbar,
html[data-oscs-dashboard="v3"] .hero-copy,
html[data-oscs-dashboard="v3"] .kpi-card,
html[data-oscs-dashboard="v3"] .module-card,
html[data-oscs-dashboard="v3"] .insight-card,
html[data-oscs-dashboard="v3"] .oscs-next-modules {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-oscs-dashboard="v3"] .hero-copy {
  min-height: 300px;
  padding: 30px clamp(24px, 4vw, 54px) 28px;
  border: 1px solid rgba(0, 212, 255, .11);
  background:
    linear-gradient(120deg, rgba(0, 212, 255, .035), transparent 38%, rgba(139, 92, 246, .035)),
    rgba(6, 12, 22, .76);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .03);
}

html[data-oscs-dashboard="v3"] .hero-copy::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, .28), rgba(139, 92, 246, .3), transparent);
  box-shadow: 0 0 18px rgba(139, 92, 246, .14);
}

html[data-oscs-dashboard="v3"] .hero-title {
  max-width: 100%;
  letter-spacing: -.035em;
}

html[data-oscs-dashboard="v3"] .hero-title strong {
  color: #f4f0ff;
  text-shadow: 0 0 22px rgba(139, 92, 246, .22);
}

html[data-oscs-dashboard="v3"] .signal-chip.onyx {
  border-color: rgba(139, 92, 246, .28);
  background: rgba(139, 92, 246, .07);
  color: #c4b5fd;
  box-shadow: 0 0 20px rgba(139, 92, 246, .06);
}

html[data-oscs-dashboard="v3"] .kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

html[data-oscs-dashboard="v3"] .kpi-card {
  min-height: 118px;
  border-color: rgba(255, 255, 255, .075);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .032), rgba(255, 255, 255, .012)),
    rgba(7, 13, 23, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 16px 34px rgba(0, 0, 0, .18);
}

.v3-section-head {
  margin: 28px 0 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.v3-section-head h3,
.v3-panel-head h3,
.v3-intelligence-head h3 {
  margin: 5px 0 0;
  color: #f4f8ff;
  font-size: clamp(1rem, 1.8vw, 1.34rem);
  font-weight: 850;
  letter-spacing: .02em;
}

.v3-section-head p,
.v3-panel-head p,
.v3-intelligence-head p {
  margin: 6px 0 0;
  color: rgba(166, 187, 215, .72);
  font-size: .78rem;
  line-height: 1.55;
}

.v3-section-kicker {
  color: rgba(151, 178, 214, .62);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.v3-command-zone {
  margin: 18px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 16px;
}

.v3-command-panel {
  min-width: 0;
  border-radius: 24px;
  border: 1px solid var(--v3-line);
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 212, 255, .055), transparent 35%),
    linear-gradient(180deg, rgba(10, 17, 29, .86), rgba(6, 11, 20, .84));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .03);
  padding: 20px;
}

.v3-command-panel--priority {
  background:
    radial-gradient(circle at 90% 0%, rgba(139, 92, 246, .065), transparent 36%),
    linear-gradient(180deg, rgba(10, 17, 29, .86), rgba(6, 11, 20, .84));
}

.v3-panel-head,
.v3-intelligence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.v3-panel-link,
.v3-onyx-open {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid rgba(0, 212, 255, .18);
  background: rgba(0, 212, 255, .045);
  color: #b9f4ff;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.v3-panel-link:hover,
.v3-panel-link:focus-visible,
.v3-onyx-open:hover,
.v3-onyx-open:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(0, 212, 255, .34);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24), 0 0 18px rgba(0, 212, 255, .06);
}

.v3-pulse-list {
  display: grid;
  gap: 8px;
}

.v3-pulse-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .065);
  background: rgba(255, 255, 255, .025);
  color: #eef6ff;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.v3-pulse-row:hover,
.v3-pulse-row:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(0, 212, 255, .22);
  background: rgba(0, 212, 255, .035);
}

.v3-pulse-row[data-signal-state="queued"] {
  border-color: rgba(255, 207, 74, .14);
}

.v3-pulse-icon,
.v3-workflow-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(0, 212, 255, .14);
  background: rgba(0, 212, 255, .04);
  color: #79eaff;
}

.v3-pulse-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.v3-pulse-copy strong,
.v3-workflow strong {
  color: #f1f7ff;
  font-size: .78rem;
  letter-spacing: .02em;
}

.v3-pulse-copy small,
.v3-workflow small {
  color: rgba(157, 180, 211, .64);
  font-size: .64rem;
  line-height: 1.35;
}

.v3-pulse-value {
  min-width: 44px;
  text-align: right;
  color: #f7fbff;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 1.12rem;
  font-weight: 850;
}

.v3-workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.v3-workflow {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .065);
  background: rgba(255, 255, 255, .022);
  color: rgba(222, 235, 250, .76);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.v3-workflow:hover,
.v3-workflow:focus-visible {
  outline: none;
  border-color: rgba(139, 92, 246, .24);
  background: rgba(139, 92, 246, .035);
  color: #fff;
  transform: translateY(-1px);
}

.v3-workflow > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.v3-workflow-icon {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, .18);
  background: rgba(139, 92, 246, .055);
}

.v3-intelligence-zone {
  position: relative;
  overflow: hidden;
  margin: 24px 0 28px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(139, 92, 246, .24);
  background:
    radial-gradient(circle at 8% 10%, rgba(139, 92, 246, .1), transparent 28%),
    radial-gradient(circle at 92% 20%, rgba(0, 212, 255, .055), transparent 24%),
    linear-gradient(180deg, rgba(8, 12, 23, .92), rgba(5, 9, 18, .9));
  box-shadow: 0 26px 70px rgba(0, 0, 0, .33), 0 0 34px rgba(139, 92, 246, .055), inset 0 1px 0 rgba(255, 255, 255, .03);
}

.v3-intelligence-aura {
  position: absolute;
  inset: -35%;
  pointer-events: none;
  background:
    radial-gradient(circle at 36% 44%, rgba(139, 92, 246, .09), transparent 22%),
    radial-gradient(circle at 64% 52%, rgba(0, 212, 255, .05), transparent 18%);
  filter: blur(18px);
  animation: v3OnyxDrift 9s ease-in-out infinite alternate;
}

@keyframes v3OnyxDrift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1); }
  to { transform: translate3d(1.5%, -1%, 0) scale(1.035); }
}

.v3-intelligence-head,
.v3-intelligence-grid {
  position: relative;
  z-index: 1;
}

.v3-intelligence-brand {
  min-width: 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.v3-onyx-core {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, .34);
  background:
    radial-gradient(circle, rgba(139, 92, 246, .18), rgba(139, 92, 246, .045) 56%, transparent 58%);
  color: #a78bfa;
  box-shadow: 0 0 24px rgba(139, 92, 246, .18), inset 0 0 18px rgba(139, 92, 246, .05);
}

.v3-intelligence-head h3 span {
  color: var(--v3-onyx-soft);
  text-shadow: 0 0 15px rgba(139, 92, 246, .4);
}

.v3-onyx-open {
  border-color: rgba(139, 92, 246, .28);
  background: rgba(139, 92, 246, .065);
  color: #c4b5fd;
}

.v3-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, .7);
}

.v3-intelligence-grid {
  display: grid;
  grid-template-columns: .95fr .95fr 1.1fr;
  gap: 11px;
}

.v3-intel-card {
  min-width: 0;
  padding: 15px;
  border-radius: 17px;
  border: 1px solid rgba(139, 92, 246, .12);
  background: rgba(10, 14, 23, .72);
}

.v3-intel-card--recommendation {
  border-color: rgba(0, 212, 255, .11);
}

.v3-intel-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: #c4b5fd;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.v3-intel-list {
  display: grid;
  gap: 7px;
}

.v3-intel-item {
  min-height: 43px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .055);
  background: rgba(255, 255, 255, .022);
  color: rgba(216, 229, 246, .78);
  font-size: .7rem;
  line-height: 1.42;
}

.v3-intel-item[data-tone="attention"] { border-color: rgba(255, 207, 74, .13); }
.v3-intel-item[data-tone="active"] { border-color: rgba(0, 212, 255, .12); }
.v3-intel-item[data-tone="clear"] { border-color: rgba(25, 245, 159, .12); }
.v3-intel-item[data-tone="onyx"] { border-color: rgba(139, 92, 246, .14); }
.v3-intel-item i { color: #a78bfa; }
.v3-intel-item[data-tone="clear"] i { color: #35e6a4; }
.v3-intel-item[data-tone="attention"] i { color: #ffd36a; }

.v3-intel-action {
  width: 100%;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  color: rgba(225, 236, 250, .82);
  text-align: left;
  cursor: pointer;
}

.v3-intel-action:hover,
.v3-intel-action:focus-visible {
  outline: none;
  border-color: rgba(139, 92, 246, .25);
  background: rgba(139, 92, 246, .04);
}

.v3-priority-rank {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(139, 92, 246, .09);
  color: #c4b5fd;
  font-size: .64rem;
  font-weight: 900;
}

html[data-oscs-dashboard="v3"] .module-shell.v3-module-family-grid {
  gap: 14px;
}

html[data-oscs-dashboard="v3"] .module-column {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .055);
  background: rgba(7, 13, 23, .4);
  padding: 14px;
}

html[data-oscs-dashboard="v3"] .module-card {
  border-radius: 15px;
  background: rgba(255, 255, 255, .022);
  box-shadow: none;
}

html[data-oscs-dashboard="v3"] .module-card:hover,
html[data-oscs-dashboard="v3"] .module-card:focus-visible {
  transform: translateY(-2px);
}

html[data-oscs-dashboard="v3"] .oscs-next-modules {
  margin-top: 20px;
  opacity: .88;
}

html[data-oscs-dashboard="v3"] .insights-shell {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

html[data-oscs-dashboard="v3"] .insight-card {
  min-width: 0;
  border-radius: 21px;
  border-color: rgba(255, 255, 255, .065);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .027), rgba(255, 255, 255, .012)),
    rgba(7, 13, 23, .64);
}

html[data-oscs-dashboard="v3"] .insight-card.v3-workforce-card {
  border-color: rgba(0, 212, 255, .13);
  background:
    radial-gradient(circle at 90% 10%, rgba(0, 212, 255, .055), transparent 30%),
    rgba(7, 13, 23, .68);
}

html[data-oscs-dashboard="v3"] .v3-workforce-card .bar-fill {
  background: linear-gradient(90deg, #00d4ff, #8b5cf6);
  box-shadow: 0 0 16px rgba(0, 212, 255, .16);
}

.v3-metric-loading {
  color: transparent !important;
  position: relative;
}

.v3-metric-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54%;
  height: .72em;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, rgba(255, 255, 255, .045), rgba(139, 92, 246, .13), rgba(255, 255, 255, .045));
  background-size: 220% 100%;
  animation: v3Skeleton 1.45s linear infinite;
}

@keyframes v3Skeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 1280px) {
  html[data-oscs-dashboard="v3"] .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v3-command-zone,
  .v3-intelligence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .v3-panel-head,
  .v3-intelligence-head {
    display: grid;
  }

  .v3-workflow-grid,
  html[data-oscs-dashboard="v3"] .insights-shell {
    grid-template-columns: 1fr;
  }

  html[data-oscs-dashboard="v3"] .hero-copy {
    min-height: 0;
    padding: 24px 20px;
  }
}

@media (max-width: 640px) {
  html[data-oscs-dashboard="v3"] .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v3-command-panel,
  .v3-intelligence-zone {
    border-radius: 20px;
    padding: 16px;
  }

  .v3-intelligence-brand {
    gap: 10px;
  }

  .v3-onyx-core {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v3-intelligence-aura,
  .v3-metric-loading::after {
    animation: none !important;
  }

  .v3-pulse-row,
  .v3-workflow,
  .v3-panel-link,
  .v3-onyx-open {
    transition: none !important;
  }
}

/* INDEX RAIL CENTERLINE R2 */
html[data-oscs-dashboard="v3"] {
  --oscs-sidebar-collapsed: 72px;
}

html[data-oscs-dashboard="v3"] .oscs-command-sidebar {
  inset: 14px auto 14px 14px;
  padding: 10px 8px;
  gap: 8px;
  box-sizing: border-box;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  row-gap: 6px;
  min-height: 0;
  padding: 0 0 8px;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-mark {
  width: 40px;
  height: 40px;
  justify-self: center;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-toggle {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  justify-self: center;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-head {
  display: none;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 0 0 16px;
  scrollbar-width: none;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-item {
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 0;
  padding: 2px;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-item:hover,
html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-item:focus-visible {
  transform: translateY(-1px);
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-item i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-brand-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-foot {
  justify-content: center;
  gap: 0;
  padding: 8px 0 0;
}

html[data-oscs-dashboard="v3"][data-oscs-sidebar="collapsed"] .oscs-sidebar-foot > i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
