/* ═══════════════════════════════════════════════════════════════════════════
   RNI Ops Dashboard — client-shared/rni-ops-dashboard.css

   Operations tab markup for the Executive Portal.
   Bloomberg density · Linear restraint · Stripe chokepoint. Light only.

   Zones:
     #ops-header-strip       3 live counters (no chrome)
     .ops-main               12-col grid: left 60%, right 40%
       .ops-left             vertical grid (6 cards)
       .ops-right            squadron pulse + event stream tail
     .ops-footer-strip       3 accent panels
   ═══════════════════════════════════════════════════════════════════════════ */

#command-view {
  font-family: 'Heebo', system-ui, -apple-system, sans-serif;
  color: #0F172A;
  background: transparent;
  padding: 4px 0 32px;
}

/* ── ACCENT RULE between zones ──────────────────────────────────────── */
.ops-rule {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    #43DBA3 50%,
    transparent 100%
  );
  opacity: 0.35;
  margin: 14px 0 10px;
}
.ops-zone-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94A3B8;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ops-zone-label .ops-zone-tally {
  font-size: 10px;
  font-weight: 500;
  color: #64748B;
  letter-spacing: 0.02em;
  text-transform: none;
  margin-left: auto;
}

/* ── HEADER STRIP: 3 live counters ──────────────────────────────────── */
.ops-header-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: baseline;
  gap: 40px;
  padding: 10px 2px 18px;
}
.ops-counter {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.ops-counter-value {
  font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 32px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.ops-counter-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ops-header-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43DBA3;
  box-shadow: 0 0 0 0 rgba(67, 219, 163, 0.7);
  animation: ops-pulse 2s infinite;
  align-self: center;
}
@keyframes ops-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(67, 219, 163, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(67, 219, 163, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 219, 163, 0); }
}

/* ── MAIN GRID: 60% / 40% on desktop, stacks on mobile ─────────────── */
.ops-main {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .ops-main { grid-template-columns: 1fr; }
}

/* ── LEFT: 6 vertical cards ─────────────────────────────────────────── */
.ops-vertical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 700px) {
  .ops-vertical-grid { grid-template-columns: repeat(2, 1fr); }
}

.ops-vertical-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ops-vertical-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.ops-v-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ops-v-name {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}
.ops-v-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43DBA3;
  display: inline-block;
  animation: ops-pulse 2s infinite;
}
.ops-vertical-card[data-vertical="clinical"] .ops-v-pulse { background: #43DBA3; }
.ops-vertical-card[data-vertical="compliance"] .ops-v-pulse { background: #DC2626; }
.ops-vertical-card[data-vertical="sales"] .ops-v-pulse { background: #3B82F6; }
.ops-vertical-card[data-vertical="marketing"] .ops-v-pulse { background: #A855F7; }
.ops-vertical-card[data-vertical="grants"] .ops-v-pulse { background: #4F46E5; }
.ops-vertical-card[data-vertical="strategy"] .ops-v-pulse { background: #0891B2; }

.ops-v-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ops-v-lead {
  font-size: 11px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ops-v-lead-label {
  color: #94A3B8;
  font-weight: 500;
}
.ops-v-lead .v-lead {
  font-weight: 600;
  color: #334155;
  text-transform: capitalize;
}

.ops-llm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  font-family: 'SF Mono', ui-monospace, monospace;
  text-transform: lowercase;
  background: #F1F5F9;
  color: #475569;
  width: fit-content;
}
.ops-vertical-card[data-vertical="sales"]      .ops-llm-badge { background: rgba(0, 120, 212, 0.08);  color: #0078D4; }
.ops-vertical-card[data-vertical="grants"]     .ops-llm-badge { background: rgba(79, 70, 229, 0.08);  color: #4F46E5; }
.ops-vertical-card[data-vertical="marketing"]  .ops-llm-badge { background: rgba(168, 85, 247, 0.09); color: #9333EA; }
.ops-vertical-card[data-vertical="clinical"]   .ops-llm-badge { background: rgba(5, 150, 105, 0.10);  color: #059669; }
.ops-vertical-card[data-vertical="compliance"] .ops-llm-badge { background: rgba(220, 38, 38, 0.08);  color: #DC2626; }
.ops-vertical-card[data-vertical="strategy"]   .ops-llm-badge { background: rgba(8, 145, 178, 0.09);  color: #0891B2; }

.ops-v-counts {
  display: flex;
  gap: 18px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #E2E8F0;
}
.ops-v-counts > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ops-v-counts .v-agents-active,
.ops-v-counts .v-agents-sideline {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ops-v-counts em {
  font-size: 9px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94A3B8;
}

/* Patent Watch sub-row, nested under Compliance */
.ops-v-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(220, 38, 38, 0.04);
  border-radius: 6px;
  border-left: 2px solid #DC2626;
}
.ops-v-sub-label {
  font-size: 10px;
  font-weight: 600;
  color: #991B1B;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ops-v-subrow .pw-count {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  color: #991B1B;
  font-variant-numeric: tabular-nums;
}

/* ── RIGHT TOP: Squadron Pulse (4 tiles) ────────────────────────────── */
.ops-squadron-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ops-sq-tile {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  overflow: hidden;
}
.ops-sq-tile::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
}
.ops-sq-tile[data-squadron="alpha"]::before { background: #43DBA3; }
.ops-sq-tile[data-squadron="beta"]::before  { background: #3B82F6; }
.ops-sq-tile[data-squadron="gamma"]::before { background: #D4AF37; }
.ops-sq-tile[data-squadron="delta"]::before { background: #DC2626; }

.ops-sq-letter {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #64748B;
  text-transform: uppercase;
}
.ops-sq-tile[data-squadron="alpha"] .ops-sq-letter { color: #059669; }
.ops-sq-tile[data-squadron="beta"]  .ops-sq-letter { color: #2563EB; }
.ops-sq-tile[data-squadron="gamma"] .ops-sq-letter { color: #B45309; }
.ops-sq-tile[data-squadron="delta"] .ops-sq-letter { color: #DC2626; }

.ops-sq-count {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ops-sq-ts {
  font-size: 10px;
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* ── RIGHT BOTTOM: Event Stream Tail (hash-chained) ─────────────────── */
.ops-event-stream {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 6px 0;
  max-height: 320px;
  overflow-y: auto;
  font-family: 'SF Mono', 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  scroll-behavior: smooth;
}
.ops-event-stream:empty::before {
  content: 'awaiting events · chain verified';
  display: block;
  padding: 24px;
  text-align: center;
  color: #94A3B8;
  font-style: italic;
  font-family: 'Heebo', sans-serif;
}
.ops-event-row {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 10px;
  padding: 6px 12px;
  align-items: center;
  border-bottom: 1px solid #F1F5F9;
  line-height: 1.3;
}
.ops-event-row:last-child { border-bottom: none; }
.ops-event-hash {
  color: #94A3B8;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.ops-event-kind {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Heebo', sans-serif;
  white-space: nowrap;
  width: fit-content;
  background: #F1F5F9;
  color: #475569;
}
.ops-event-row[data-event-type="wake_dispatched"] .ops-event-kind { background: rgba(5, 150, 105, 0.10); color: #059669; }
.ops-event-row[data-event-type="wake_failed"]     .ops-event-kind { background: rgba(220, 38, 38, 0.08); color: #DC2626; }
.ops-event-row[data-event-type="wake_vetoed"]     .ops-event-kind { background: rgba(220, 38, 38, 0.12); color: #991B1B; }
.ops-event-row[data-event-type="wake_deduped"]    .ops-event-kind { background: rgba(100, 116, 139, 0.10); color: #475569; }
.ops-event-row[data-event-type="quorum_decision"] .ops-event-kind { background: rgba(59, 130, 246, 0.10); color: #2563EB; }
.ops-event-row[data-event-type="phoenix_heal"]    .ops-event-kind { background: rgba(212, 175, 55, 0.14); color: #B45309; }
.ops-event-row[data-event-type="log_only"]        .ops-event-kind { background: #F1F5F9; color: #64748B; }

.ops-event-vertical {
  font-size: 10px;
  color: #64748B;
  text-transform: lowercase;
  font-family: 'Heebo', sans-serif;
}
.ops-event-ts {
  color: #94A3B8;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ops-chain-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #059669;
  text-transform: uppercase;
}
.ops-chain-light::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #059669;
  animation: ops-pulse 2s infinite;
}

/* ── FOOTER STRIP: 3 accent panels ──────────────────────────────────── */
.ops-footer-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.ops-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
.ops-panel-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ops-panel-value {
  font-family: 'SF Mono', ui-monospace, monospace;
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Zeigarnik-tagged open loop: awaiting review has a gold accent */
.ops-panel--zeigarnik {
  border-left: 3px solid #F4C84B;
  background: linear-gradient(to right, rgba(244, 200, 75, 0.06), #FFFFFF 40%);
}
.ops-panel--zeigarnik .ops-panel-value { color: #92400E; }
.ops-panel--zeigarnik .ops-panel-label { color: #92400E; }

.ops-panel--patent { border-left: 3px solid #DC2626; }
.ops-panel--licensing { border-left: 3px solid #43DBA3; }

/* ── TASK FEED (today's dispatched-task tail) ──────────────────────── */
.ops-task-feed {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 6px 0;
  max-height: 240px;
  overflow-y: auto;
  font-family: 'SF Mono', 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  scroll-behavior: smooth;
}
.ops-task-feed:empty::before {
  content: 'no tasks dispatched today';
  display: block;
  padding: 20px;
  text-align: center;
  color: #94A3B8;
  font-style: italic;
  font-family: 'Heebo', sans-serif;
}
.ops-task-row {
  padding: 6px 12px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ops-task-row:last-child { border-bottom: none; }
.ops-task-row[data-status="awaiting_review"] {
  background: rgba(244, 200, 75, 0.06);
  color: #92400E;
}
.ops-task-row[data-status="dispatched"]      { color: #2563EB; }
.ops-task-row[data-status="completed"]       { color: #059669; }
.ops-task-row[data-status="failed"]          { color: #DC2626; }
