.system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
}

.system-card {
  min-height: 94px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.system-card span {
  display: block;
  color: #06152a;
  font-size: 12px;
}

.system-card strong {
  display: block;
  margin-top: 8px;
  color: #001229;
  font-size: 17px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.system-card strong.ok,
.status-badge.ok {
  color: var(--success);
}

.system-card strong.error,
.status-badge.error {
  color: var(--danger);
}

.system-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.endpoint-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px;
}

.endpoint-list code {
  display: block;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdff;
  color: #001229;
  padding: 8px 10px;
  font-family: "Fira Code", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.summary-row {
  border: 1px solid #9eb2ca;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px 10px 10px;
}

.summary-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.summary-row-head strong {
  font-size: 16px;
  font-weight: 500;
}

.summary-row-head span {
  white-space: nowrap;
}

.summary-row p {
  margin-top: 8px;
  color: #06152a;
  font-size: 12px;
}

.bar {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d4deea;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #111111;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #dbe4ef;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f7faff;
  color: #06152a;
  font-size: 12px;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8fbff;
}

.right {
  text-align: right;
}

.cell-title {
  color: #001229;
  font-weight: 600;
}

.cell-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid #c8d5e5;
  border-radius: 999px;
  background: #ffffff;
  color: #18304f;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.enabled {
  border: 1px solid #a9d5bd;
  background: #edf9f2;
  color: var(--success);
}

.badge.disabled {
  border: 1px solid #dfc68a;
  background: #fff8e8;
  color: var(--warning);
}

#projects-table .badge {
  width: 56px;
  min-width: 56px;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
  white-space: nowrap;
}

.project-row-actions {
  position: relative;
}

.project-more-menu {
  position: relative;
}

.project-more-trigger {
  gap: 7px;
}

.project-more-trigger::after {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.project-more-menu.is-open .project-more-trigger::after {
  transform: translateY(2px) rotate(225deg);
}

.project-more-panel {
  position: fixed;
  z-index: 30;
  top: 0;
  right: auto;
  display: grid;
  min-width: 132px;
  max-width: calc(100vw - 16px);
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgb(7 20 38 / 16%);
  visibility: hidden;
}

.project-more-panel[hidden] {
  display: none;
}

.project-more-menu.is-positioned .project-more-panel {
  visibility: visible;
}

.project-more-item {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  text-align: left;
}

.project-more-item:hover,
.project-more-item:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
}

.project-more-item.danger,
.project-more-item.danger:hover,
.project-more-item.danger:focus-visible {
  color: var(--danger);
}

.empty-row,
.empty-note {
  color: var(--muted);
  text-align: center;
}
