.ops-topbar {
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.ops-container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
}

.ops-topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ops-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ops-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--brand);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-brand-mark svg {
  width: 16px;
  height: 16px;
}

.ops-brand-title {
  font-size: 15px;
  color: var(--ink-primary);
  white-space: nowrap;
}

.ops-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ops-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  font-size: 12px;
  color: var(--ink-secondary);
}

.ops-link-icon,
.ops-btn-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-link-icon svg,
.ops-btn-icon svg {
  width: 15px;
  height: 15px;
}

.ops-main {
  padding: 24px 0 56px;
}

.ops-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ops-stack-sm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ops-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.ops-infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ops-main .card-head {
  flex-wrap: wrap;
}

#ops-tenant-count {
  white-space: nowrap;
  flex-shrink: 0;
}

.ops-tenant-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ops-tenant-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-denied-box {
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 560px;
}

/* Reuse drawer and modal structure on standalone /ops shell */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.22);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 94vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.drawer-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-title {
  font-size: 16px;
  color: var(--ink-primary);
}

.drawer-subtitle {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.drawer-body {
  padding: 20px 22px 32px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.28);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 15px;
  color: var(--ink-primary);
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1080px) {
  .ops-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ops-infra-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ops-container {
    padding: 0 16px;
  }
  .ops-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ops-auth-pill {
    display: none;
  }
  .page-head {
    flex-direction: column;
    align-items: stretch;
  }
  .segmented {
    flex-wrap: wrap;
  }
  .filter-group input {
    min-width: 0;
    width: 100%;
  }
}

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