.server-command-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
  background: #f3f6fb;
}

.server-command-page.ant-space,
.server-command-page.ant-space > .ant-space-item {
  width: 100%;
}

.server-command-page.ant-space {
  flex: 1 1 auto;
}

.server-command-page .ant-alert-description {
  width: 100%;
}

.server-command-page__surface {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.server-command-page__surface--toolbar {
  background: #ffffff;
}

.server-command-page__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.server-command-page__toolbar-copy {
  min-width: 0;
}

.server-command-page__toolbar-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.server-command-page__title.ant-typography,
.server-command-page__server-title.ant-typography {
  margin-bottom: 0;
}

.server-command-page__copy.ant-typography,
.server-command-page__summary.ant-typography,
.server-command-page__preview.ant-typography,
.server-command-page__shared-server-footer.ant-typography,
.server-command-page__work-detail.ant-typography,
.server-command-page__command.ant-typography {
  margin-bottom: 0;
}

.server-command-page__copy.ant-typography {
  margin-top: 2px;
  color: #6b7280;
}

.server-command-page__status-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.server-command-page__status-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.server-command-page__status-summary-item strong {
  font-size: 12px;
  font-weight: 700;
}

.server-command-page__status-summary-item--online {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.server-command-page__status-summary-item--latest {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.server-command-page__status-summary-item--degraded,
.server-command-page__status-summary-item--update-available {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.server-command-page__status-summary-item--offline,
.server-command-page__status-summary-item--build-required {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.server-command-page__status-summary-item--unknown,
.server-command-page__status-summary-item--info {
  color: #475569;
}

.server-command-page__reservation-panel {
  border-color: #dbeafe;
  background: #fcfdff;
}

.server-command-page__alert-body {
  width: 100%;
}

.server-command-page__alert-code,
.server-command-page__preview,
.server-command-page__work-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
}

.server-command-page__preview-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.server-command-page__preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.server-command-page__alert-code {
  background: #fff2f0;
}

.server-command-page__alert-text {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.server-command-page__compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.server-command-page__compact-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fbfcfe;
}

.server-command-page__restart-button {
  min-width: 96px;
  height: 32px;
  border-radius: 8px;
  font-weight: 600;
}

.server-command-page__work-list {
  width: 100%;
}

.server-command-page__control-list {
  display: grid;
  gap: 12px;
}

.server-command-page__control-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: #d7deea;
}

.server-command-page__control-main {
  min-width: 0;
  flex: 1 1 auto;
}

.server-command-page__control-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 10px;
}

.server-command-page__control-title.ant-typography {
  margin-bottom: 0;
  font-size: 15px;
}

.server-command-page__status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.server-command-page__status-badge--online,
.server-command-page__status-badge--latest {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

.server-command-page__status-badge--degraded,
.server-command-page__status-badge--update-available {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #b45309;
}

.server-command-page__status-badge--offline,
.server-command-page__status-badge--build-required {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

.server-command-page__status-badge--unknown,
.server-command-page__status-badge--info {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.server-command-page__control-meta {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.server-command-page__control-meta + .server-command-page__control-meta {
  margin-top: 4px;
}

.server-command-page__control-meta .ant-typography {
  margin-bottom: 0;
}

.server-command-page__control-button {
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .server-command-page__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .server-command-page__toolbar-side {
    justify-content: space-between;
  }

  .server-command-page__restart-button {
    min-width: 64px;
  }

  .server-command-page__control-card {
    align-items: flex-start;
  }

  .server-command-page__control-button {
    min-width: 72px;
  }
}
