/* Ops tracker — surface-specific layout. Tokens come from oji-system.css. */

.ops-wrap {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  padding: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ops-error {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--error-surface, #efd0bd);
  color: var(--error-fg);
  border: 1px solid var(--error);
  border-radius: var(--radius-md);
}

.ops-hash-status {
  margin: 0;
  padding: 0.5rem 1rem;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.ops-derived {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ops-derived-card {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--atlas-ochre);
  border-radius: var(--radius-lg);
}

.ops-derived-label {
  margin: 0 0 0.35rem;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-derived-value {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}

.ops-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
}

.ops-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ops-filter select,
.ops-filter input {
  min-height: 38px;
  min-width: 9rem;
  padding: 0.35rem 0.55rem;
  background: var(--bg-input);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.ops-filter-search input {
  min-width: 14rem;
}

#refresh-btn {
  min-height: 38px;
  padding: 0.4rem 0.9rem;
  background: var(--atlas-teal);
  color: var(--atlas-sand);
  border: 1px solid var(--atlas-teal);
  border-radius: var(--radius-sm);
  font-weight: 750;
}

#refresh-btn:hover {
  background: var(--atlas-teal-2);
}

.ops-fetched {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.ops-section h2 {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-family: var(--font-headline);
  font-size: 1.45rem;
}

.ops-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ops-table th,
.ops-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.ops-table th {
  color: var(--ink-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-quiet, var(--surface-raised));
}

.ops-table tr.is-focused td {
  background: var(--accent-fade);
}

.ops-table .is-invalid {
  color: var(--error-fg);
  font-weight: 700;
}

.ops-empty {
  margin: 0;
  padding: 1rem;
  color: var(--ink-muted);
}

.ops-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .ops-derived {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  #refresh-btn {
    transition: none;
  }
}

/* Stale-data state (Themis ops-layer2-r8 cleanup): a failed refresh dims the
   rendered rows so old data cannot read as current under pressure; the error
   strip dates what is showing. Cleared on the next successful load. */
#main.is-stale .panel,
#main.is-stale table {
  opacity: 0.55;
  filter: grayscale(0.5);
}
