/* FRIENDS Live-Ops read-only admin console */

.liveops-admin {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: #0b1220;
  color: #e2e8f0;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.liveops-sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.95);
}

.liveops-brand h1 {
  margin: 0;
  font-size: 1.25rem;
}

.liveops-brand p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.liveops-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.liveops-nav-item {
  text-align: left;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.liveops-nav-item.is-active,
.liveops-nav-item:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #f8fafc;
}

.liveops-sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.liveops-main {
  padding: 1.25rem 1.5rem 2rem;
  overflow: auto;
}

.liveops-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.liveops-panel-header h2 {
  margin: 0;
}

.liveops-readonly-badge {
  margin: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  font-size: 0.75rem;
}

.liveops-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.liveops-widget {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.65);
}

.liveops-widget h3 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.liveops-widget-value {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.liveops-widget-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.liveops-widget--ok .liveops-widget-value { color: #86efac; }
.liveops-widget--warn .liveops-widget-value { color: #fde047; }
.liveops-widget--error .liveops-widget-value { color: #fca5a5; }

.liveops-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.liveops-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.liveops-filter input {
  min-width: 10rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0f172a;
  color: #e2e8f0;
}

.liveops-filter-actions {
  display: flex;
  gap: 0.35rem;
}

.liveops-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
}

.liveops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.liveops-table th,
.liveops-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
}

.liveops-table tbody tr[data-user-row] {
  cursor: pointer;
}

.liveops-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08);
}

.liveops-sort {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.liveops-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.liveops-split {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1rem;
}

.liveops-online-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
}

.liveops-online-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.liveops-link-btn {
  border: 0;
  background: transparent;
  color: #7dd3fc;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.liveops-online-dot {
  color: #4ade80;
}

.liveops-drawer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

.liveops-drawer.is-open {
  pointer-events: auto;
}

.liveops-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.liveops-drawer.is-open .liveops-drawer-backdrop {
  opacity: 1;
}

.liveops-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100%;
  background: #0f172a;
  border-left: 1px solid rgba(148, 163, 184, 0.25);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.liveops-drawer.is-open .liveops-drawer-panel {
  transform: translateX(0);
}

.liveops-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.liveops-drawer-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.liveops-drawer-subtitle {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.8rem;
}

.liveops-drawer-body {
  padding: 0.75rem 1rem 1.25rem;
  overflow: auto;
}

.liveops-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.liveops-tab {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  color: #cbd5e1;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.liveops-tab.is-active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
}

.liveops-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  color: #94a3b8;
}

.liveops-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: #38bdf8;
  animation: liveops-spin 0.8s linear infinite;
}

@keyframes liveops-spin {
  to { transform: rotate(360deg); }
}

.liveops-empty,
.liveops-meta {
  color: #94a3b8;
  font-size: 0.85rem;
}

.liveops-dl {
  display: grid;
  gap: 0.55rem;
}

.liveops-dl dt {
  font-size: 0.75rem;
  color: #94a3b8;
}

.liveops-dl dd {
  margin: 0;
}

.liveops-pos { color: #86efac; }
.liveops-neg { color: #fca5a5; }
.liveops-muted { color: #64748b; font-size: 0.8rem; }

.liveops-pre {
  max-height: 280px;
  overflow: auto;
  font-size: 0.72rem;
  background: #020617;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.liveops-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0b1220;
  color: #e2e8f0;
}

.liveops-login-card {
  width: min(420px, 92vw);
  padding: 1.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.9);
  display: grid;
  gap: 0.75rem;
}

.liveops-login-card label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.liveops-login-card input {
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0f172a;
  color: #e2e8f0;
}

.liveops-login-error {
  color: #fca5a5;
  margin: 0;
  font-size: 0.85rem;
}

.liveops-login-hint {
  margin: 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.playground--liveops-view #site-release-static,
.playground--liveops-login #site-release-static {
  display: none;
}

.liveops-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.liveops-ops-card {
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.liveops-ops-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.liveops-ops-card p {
  margin: 0.15rem 0;
}

.liveops-ops-card--wide {
  grid-column: 1 / -1;
}

.liveops-ops-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.liveops-mini-timeline ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.liveops-mini-timeline li {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.liveops-track {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.liveops-track--reward { background: rgba(74, 222, 128, 0.15); color: #86efac; }
.liveops-track--progress { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; }
.liveops-track--companion { background: rgba(244, 114, 182, 0.15); color: #f9a8d4; }
.liveops-track--economy { background: rgba(251, 191, 36, 0.15); color: #fcd34d; }
.liveops-track--activity { background: rgba(167, 139, 250, 0.15); color: #c4b5fd; }

.liveops-vlist {
  position: relative;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.5rem;
}

.liveops-vlist-window {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}

.liveops-vlist-row {
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  padding: 0 0.65rem;
  display: flex;
  align-items: center;
}

.liveops-timeline-row-inner {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  gap: 0.5rem;
  width: 100%;
  align-items: center;
  font-size: 0.82rem;
}

.liveops-timeline-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.liveops-timeline-copy span {
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liveops-timeline-meta {
  display: grid;
  justify-items: end;
  gap: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.liveops-progress-delta {
  color: #7dd3fc;
  font-size: 0.75rem;
}

.liveops-timeline-actions {
  margin-top: 0.65rem;
}

.liveops-drawer-panel {
  max-width: min(960px, 96vw);
}

@media (max-width: 900px) {
  .liveops-admin {
    grid-template-columns: 1fr;
  }
  .liveops-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }
  .liveops-split {
    grid-template-columns: 1fr;
  }
}
