/* Live Ops wall — compact TV-ready analytics */

.ss-live-ops {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(16, 185, 129, 0.12), transparent 55%),
    linear-gradient(165deg, #0b1220 0%, #111827 48%, #0f172a 100%);
  color: #e2e8f0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.ss-live-ops__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.ss-live-ops__title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.ss-live-ops__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: ss-ops-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes ss-ops-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.ss-live-ops__title {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.ss-live-ops__clock {
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: #94a3b8;
  margin-left: 0.35rem;
}

.ss-live-ops__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.ss-live-ops__stamp {
  font-size: 0.78rem;
  color: #94a3b8;
}

.ss-live-ops__tv {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.ss-live-ops__tv:hover,
.ss-live-ops__tv[aria-pressed='true'] {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.18);
}

.ss-live-ops__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 1100px) {
  .ss-live-ops__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ss-live-ops__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ss-live-ops__kpi {
  padding: 0.7rem 0.75rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 0;
}

.ss-live-ops__kpi-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.ss-live-ops__kpi-value {
  display: block;
  font-size: clamp(1.55rem, 2.8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.ss-live-ops__kpi--live .ss-live-ops__kpi-value { color: #6ee7b7; }
.ss-live-ops__kpi--view .ss-live-ops__kpi-value { color: #7dd3fc; }
.ss-live-ops__kpi--warn .ss-live-ops__kpi-value { color: #fbbf24; }

.ss-live-ops__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .ss-live-ops__cols { grid-template-columns: 1fr; }
}

.ss-live-ops__panel {
  padding: 0.65rem 0.75rem 0.7rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 8.5rem;
}

.ss-live-ops__panel h3 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ss-live-ops__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
}

.ss-live-ops__list li {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.ss-live-ops__list li:last-child { border-bottom: 0; }
.ss-live-ops__list strong { color: #f1f5f9; font-weight: 650; }
.ss-live-ops__list span { color: #94a3b8; font-size: 0.78rem; }

.ss-live-ops__empty {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
}

.ss-analytics-archive {
  margin-top: 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 0.35rem 0.85rem 0.85rem;
  background: var(--bg-card, #fff);
}

.ss-analytics-archive > summary {
  cursor: pointer;
  font-weight: 650;
  padding: 0.65rem 0.15rem;
  color: var(--text-muted, #64748b);
  list-style: none;
}

.ss-analytics-archive > summary::-webkit-details-marker { display: none; }

/* Compact classic pulse when Live Ops is present */
#ss-overview .ss-kpi-grid--pulse {
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.45rem;
}

#ss-overview .ss-kpi-grid--pulse .ss-kpi {
  min-height: 0;
  padding: 0.55rem 0.65rem 0.5rem;
}

#ss-overview .ss-kpi-grid--pulse .ss-kpi__value {
  font-size: 1.35rem;
}

#ss-overview .ss-kpi-grid--pulse .ss-kpi__sub {
  font-size: 0.7rem;
}

#ss-overview .ss-section-h--secondary {
  font-size: 0.95rem;
  margin-top: 0.85rem;
}

/* Fullscreen TV mode */
html[data-ss-ops] body.ss-ops-tv .ss-app > aside,
html[data-ss-ops] body.ss-ops-tv #ss-sidebar,
html[data-ss-ops] body.ss-ops-tv .ss-tabs,
html[data-ss-ops] body.ss-ops-tv #ss-tabs,
html[data-ss-ops] body.ss-ops-tv .main__toolbar,
html[data-ss-ops] body.ss-ops-tv .ss-page-hero,
html[data-ss-ops] body.ss-ops-tv .ss-analytics-archive,
html[data-ss-ops] body.ss-ops-tv #ss-analytics-loading {
  display: none !important;
}

html[data-ss-ops] body.ss-ops-tv .shell,
html[data-ss-ops] body.ss-ops-tv .ss-app {
  display: block;
}

html[data-ss-ops] body.ss-ops-tv main,
html[data-ss-ops] body.ss-ops-tv .super-settings-page,
html[data-ss-ops] body.ss-ops-tv #main-content {
  margin: 0 !important;
  padding: 0.75rem !important;
  max-width: none !important;
}

html[data-ss-ops] body.ss-ops-tv #ss-overview {
  display: block !important;
}

html[data-ss-ops] body.ss-ops-tv #ss-overview > .panel__head,
html[data-ss-ops] body.ss-ops-tv #ss-overview > .ss-section-h,
html[data-ss-ops] body.ss-ops-tv #ss-overview > .ss-kpi-grid,
html[data-ss-ops] body.ss-ops-tv #ss-overview > .ss-live-races {
  display: none !important;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops {
  min-height: calc(100vh - 1.5rem);
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  flex: 0 0 auto;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__kpi {
  padding: 1rem 1.1rem;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__kpi-value {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__cols {
  flex: 1 1 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__panel {
  min-height: 0;
  height: 100%;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__list {
  max-height: none;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__list li {
  font-size: 1.05rem;
  padding: 0.45rem 0;
}

html[data-ss-ops] body.ss-ops-tv .ss-live-ops__list span {
  font-size: 0.9rem;
}
