:root {
  color-scheme: dark;
  --bg: #081018;
  --panel: rgba(15, 22, 32, 0.94);
  --panel-strong: rgba(18, 27, 39, 0.98);
  --panel-soft: rgba(10, 15, 22, 0.72);
  --border: rgba(98, 116, 134, 0.2);
  --text: #eef3f8;
  --muted: #93a4b6;
  --olive: #839b3f;
  --olive-soft: rgba(131, 155, 63, 0.14);
  --blue-soft: rgba(62, 169, 219, 0.12);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --display: "Space Grotesk", sans-serif;
  --mono: "JetBrains Mono", monospace;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(131, 155, 63, 0.09), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(62, 169, 219, 0.08), transparent 24%),
    linear-gradient(180deg, #081018 0%, #060b11 100%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

body {
  overflow-x: hidden;
}

.ops-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(108, 122, 139, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 122, 139, 0.14) 1px, transparent 1px);
  background-size: 34px 34px;
}

.ops-shell {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 50px;
}

.ops-topbar,
.ops-summary,
.ops-controls,
.ops-main,
.panel,
.card,
.table-panel,
.status-banner {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel-strong), rgba(9, 15, 23, 0.98));
  box-shadow: var(--shadow);
}

.ops-topbar,
.ops-summary,
.ops-controls,
.ops-main {
  animation: fadeUp 620ms ease both;
}

.ops-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 16px;
}

.eyebrow,
.metric-label,
.field-label,
.pill,
.action-link,
.action-button,
.mono,
.table-head,
.small-note {
  font-family: var(--mono);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--olive);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
strong {
  margin: 0;
  font-family: var(--display);
}

h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.lede,
.card p,
.status-panel small,
.status-banner p,
.empty-state,
.listing-subtext {
  color: var(--muted);
  line-height: 1.65;
}

.lede {
  margin: 16px 0 0;
  max-width: 62ch;
}

.topbar-actions,
.action-row,
.form-actions,
.inline-actions,
.meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-link,
.action-button,
.input,
.select,
.textarea {
  border-radius: 12px;
  border: 1px solid rgba(98, 116, 134, 0.24);
  background: var(--panel-soft);
  color: var(--text);
}

.action-link,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 12px 14px;
  font-size: 12px;
}

.action-button {
  min-height: 44px;
  cursor: pointer;
}

.action-button.primary {
  background: var(--olive);
  color: #08110a;
  border-color: transparent;
  font-weight: 700;
}

.action-button.warn {
  background: rgba(245, 158, 11, 0.16);
  color: #ffd089;
}

.action-button.blue {
  background: var(--blue-soft);
}

.action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.control-card,
.panel,
.card,
.table-panel,
.status-banner {
  border-radius: 20px;
}

.metric-card,
.panel,
.card,
.table-panel {
  padding: 18px;
}

.metric-label,
.field-label,
.small-note {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 3vw, 30px);
}

.ops-controls {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 18px;
}

.control-card,
.field,
.form-grid {
  display: grid;
  gap: 8px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  font: inherit;
}

.textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

.ops-main {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 16px;
}

.sidebar {
  display: grid;
  gap: 14px;
}

.panel ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.status-panel strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
}

.board-stack,
.feed-grid,
.side-stack {
  display: grid;
  gap: 14px;
}

.feed-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.card h3,
.table-panel h2,
.panel h2 {
  font-size: 22px;
  line-height: 1.08;
}

.card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.pill.locked,
.pill.retired {
  background: rgba(239, 68, 68, 0.15);
  color: #ffb0b0;
}

.pill.active,
.pill.standard {
  background: rgba(34, 197, 94, 0.14);
  color: #a6f2bc;
}

.pill.completed,
.pill.verified {
  background: rgba(62, 169, 219, 0.16);
  color: #aee8ff;
}

.pill.claimed,
.pill.champion,
.pill.founder {
  background: rgba(245, 158, 11, 0.16);
  color: #ffd089;
}

.pill.marketplace,
.pill.forum,
.pill.match,
.pill.event,
.pill.identity,
.pill.team,
.pill.premium {
  background: rgba(131, 155, 63, 0.12);
  color: var(--text);
}

.pill.web,
.pill.mobile,
.pill.email {
  background: rgba(62, 169, 219, 0.16);
  color: #aee8ff;
}

.pill.queued {
  background: rgba(245, 158, 11, 0.16);
  color: #ffd089;
}

.pill.sent,
.pill.delivered,
.pill.read {
  background: rgba(34, 197, 94, 0.14);
  color: #a6f2bc;
}

.pill.archived,
.pill.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #ffb0b0;
}

.pill.warn,
.pill.suspend,
.pill.ban,
.pill.reject {
  background: rgba(239, 68, 68, 0.16);
  color: #ffb0b0;
}

.pill.unban,
.pill.approve,
.pill.resolve {
  background: rgba(34, 197, 94, 0.14);
  color: #a6f2bc;
}

.pill.listing,
.pill.thread,
.pill.post,
.pill.report {
  background: rgba(62, 169, 219, 0.16);
  color: #aee8ff;
}

.meta-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(131, 155, 63, 0.08);
  border: 1px solid rgba(131, 155, 63, 0.18);
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.table-wrap {
  border: 1px solid rgba(98, 116, 134, 0.18);
  border-radius: 16px;
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 12px;
  align-items: center;
}

.table-head {
  padding: 14px 16px;
  background: rgba(131, 155, 63, 0.08);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.table-row {
  padding: 14px 16px;
  border-top: 1px solid rgba(98, 116, 134, 0.12);
  background: rgba(12, 18, 26, 0.9);
}

.table-row:nth-child(even) {
  background: rgba(16, 23, 33, 0.95);
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.full {
  grid-template-columns: 1fr;
}

.form-field-full {
  grid-column: 1 / -1;
}

.empty-state {
  border: 1px dashed rgba(98, 116, 134, 0.28);
  padding: 28px;
  text-align: center;
  border-radius: 20px;
}

.status-banner {
  margin-top: 18px;
  padding: 14px;
}

.status-banner strong {
  display: block;
  margin-bottom: 6px;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 140ms; }
.delay-3 { transition-delay: 200ms; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .ops-summary,
  .ops-controls,
  .ops-main,
  .feed-grid,
  .split-grid,
  .form-grid.two,
  .table-head,
  .table-row {
    grid-template-columns: 1fr;
  }

  .ops-topbar,
  .action-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-head {
    display: none;
  }
}

@media (max-width: 640px) {
  .ops-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 20px;
  }

  .ops-topbar,
  .ops-controls,
  .metric-card,
  .panel,
  .card,
  .table-panel,
  .status-banner {
    border-radius: 18px;
  }
}
