/* Infrastructure map: a calm, card-first view for non-technical decisions. */
:root {
  --surface-0: #020617;
  --surface-1: #0b1220;
  --surface-2: #111c2d;
  --surface-3: #17243a;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.13);
  --focus: #86efac;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 18px;
}
.section-heading h1 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  letter-spacing: -0.035em;
  margin: 3px 0 5px;
}
.section-description {
  max-width: 700px;
  color: var(--muted);
  margin: 0;
}
.eyebrow {
  color: #8ea2bb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0;
}
.heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.infra-overview {
  margin-bottom: 24px;
}
.infra-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
}
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: min(460px, 100%);
}
.search-field svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #8ea2bb;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.search-field input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  outline: none;
}
.search-field input::placeholder {
  color: #718397;
}
.search-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.filter-count {
  color: #9db0c4;
  font-size: 12px;
  white-space: nowrap;
}
.server-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
}
.server-card {
  min-width: 0;
  background: linear-gradient(145deg, var(--surface-2), #0d1727);
  border: 1px solid #263850;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.server-card:hover {
  border-color: #3b5878;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}
.server-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.server-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.server-identity > span:last-child {
  min-width: 0;
}
.server-identity strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-identity small {
  display: block;
  color: #8ea2bb;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-glyph {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  background: #122238;
  border: 1px solid #2b4665;
  color: #8ee6b0;
}
.server-glyph svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.server-card .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.health-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 38px;
  margin: 16px 0 14px;
  padding: 10px 11px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.34);
  color: #c4d1df;
  font-size: 12px;
}
.health-message-mark {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.badge.down ~ .health-message-mark,
.health-message:has(+ .server-resources) .health-message-mark {
  background: var(--accent);
}
.server-resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 17px;
}
.resource-meter {
  min-width: 0;
}
.resource-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #8ea2bb;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.resource-head strong {
  font-size: 11px;
  color: #d9e4ed;
  letter-spacing: 0;
}
.resource-track {
  height: 6px;
  border-radius: 999px;
  background: #24344a;
  overflow: hidden;
}
.resource-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #7ce7a2);
  transition: width 0.25s ease;
}
.server-card-section {
  border-top: 1px solid rgba(89, 112, 143, 0.28);
  padding-top: 14px;
  margin-top: 10px;
}
.server-section-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c4d1df;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.count-pill {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  background: #1b2c43;
  border: 1px solid #2d4563;
  color: #9fb4c9;
  border-radius: 999px;
  font-size: 10px;
}
.server-project-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.infra-project {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  background: rgba(7, 16, 30, 0.62);
  border: 1px solid #22364e;
  border-radius: 10px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.infra-project:hover {
  background: #14243a;
  border-color: #3a5a7a;
}
.project-monogram {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1b3a32;
  border: 1px solid #2c7358;
  color: #a5f3c2;
  font-size: 12px;
  font-weight: 900;
}
.project-monogram.large {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 16px;
}
.infra-project-copy {
  min-width: 0;
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
.infra-project-copy strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.infra-project-copy small,
.infra-project-copy span {
  color: #8296ac;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.infra-project-copy span {
  color: #a6b7c7;
}
.infra-project-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.infra-project-meta small {
  color: #8296ac;
  font-size: 10px;
  white-space: nowrap;
}
.infra-project-actions {
  display: grid;
  gap: 4px;
  width: min(150px, 100%);
  margin-top: 2px;
}
.infra-empty {
  color: #8296ac;
  font-size: 11px;
  margin: 9px 0 1px;
}
.apps-section {
  padding-bottom: 1px;
}
.service-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 8px;
  background: #15243a;
  border: 1px solid #263e5c;
  border-radius: 7px;
  color: #c3d2e1;
  font-size: 10px;
}
.service-chip-link {
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.service-chip-link:hover {
  background: #1b3150;
  border-color: #4b739e;
}
.service-chip small {
  color: #83a0bb;
  font-size: 9px;
  border-left: 1px solid #38506d;
  padding-left: 5px;
  white-space: nowrap;
}
.service-chip .status-dot {
  width: 6px;
  height: 6px;
}
.server-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(89, 112, 143, 0.28);
  color: #7e94ab;
  font-size: 10px;
}
.server-card-footer > a,
.project-card-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 5px;
  color: #9ee8bb;
  font-weight: 800;
  white-space: nowrap;
}
.server-card-footer svg,
.project-card-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.infra-empty-state {
  grid-column: 1/-1;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 42px;
}
.infra-empty-state strong {
  font-size: 15px;
  color: #d8e4ed;
}
.infra-empty-state span {
  color: var(--muted);
  font-size: 12px;
}
.filter-empty {
  margin: 16px 0;
}
.support-panels {
  margin-top: 20px;
}
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  background: linear-gradient(145deg, var(--surface-2), #0d1727);
  border: 1px solid #263850;
  border-radius: 15px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.project-card:hover {
  border-color: #3b5878;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}
.project-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.project-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.project-card-title {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.project-card-title strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-card-title small {
  color: #8ea2bb;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-health-copy {
  min-height: 36px;
  margin: 14px 0;
  color: #b6c5d4;
  font-size: 11px;
}
.project-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 13px;
}
.project-card-stats span {
  padding: 5px 7px;
  background: #15243a;
  border-radius: 6px;
  color: #8296ac;
  font-size: 10px;
}
.project-card-stats b {
  color: #d6e2eb;
}
.project-location {
  display: grid;
  gap: 3px;
  padding-top: 11px;
  border-top: 1px solid rgba(89, 112, 143, 0.28);
  color: #b5c5d5;
  font-size: 11px;
}
.project-access {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(89, 112, 143, 0.28);
}
.project-access-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8296ac;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.access-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.access-link {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  gap: 8px;
  padding: 7px 9px;
  background: #15243a;
  border: 1px solid #2b4665;
  border-radius: 8px;
  color: #cfe0ee;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.access-link:hover {
  background: #1b3150;
  border-color: #4b739e;
  color: #f0f7fb;
}
.access-link.compact {
  min-height: 44px;
  padding: 5px 7px;
  gap: 5px;
}
.access-link-icon {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  flex: none;
  color: #9ee8bb;
}
.access-link-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.access-link-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.access-link-copy strong,
.access-link-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.access-link-copy strong {
  color: #ccebd9;
  font-size: 10px;
}
.access-link-copy small {
  color: #8ea2bb;
  font-size: 9px;
}
.access-empty {
  display: grid;
  gap: 4px;
}
.github-shortcuts {
  padding-top: 8px;
  border-top: 1px solid rgba(89, 112, 143, 0.2);
}
.access-empty .infra-empty {
  margin-bottom: 0;
}
.access-manage {
  width: fit-content;
  color: #9ee8bb;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}
.location-label {
  color: #8296ac;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.project-card-link {
  justify-content: flex-end;
  margin-top: 15px;
  font-size: 11px;
}
.project-card-footer {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid rgba(89, 112, 143, 0.28);
}
.add-vps-panel,
.add-project-panel {
  margin-top: 20px;
}
.page-section-heading {
  margin-bottom: 8px;
}
.server-edit {
  margin-top: 14px;
  padding-top: 9px;
  border-top: 1px solid rgba(89, 112, 143, 0.28);
}
.server-edit summary {
  color: #91a5b9;
}
.servers-toolbar {
  margin-bottom: 18px;
}
@media (min-width: 1280px) {
  .server-card-grid {
    grid-template-columns: repeat(3, minmax(300px, 1fr));
  }
}
@media (max-width: 860px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions .btn {
    flex: 1;
    text-align: center;
  }
  .server-card-grid,
  .project-card-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .infra-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .search-field {
    width: 100%;
  }
  .filter-count {
    align-self: flex-end;
  }
  .server-card {
    padding: 14px;
  }
  .server-card-top {
    align-items: flex-start;
  }
  .server-card-top > .badge {
    font-size: 9px;
  }
  .server-identity strong {
    font-size: 15px;
  }
  .server-resources {
    gap: 7px;
  }
  .server-card-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .infra-project {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .infra-project-meta {
    grid-column: 2;
    justify-items: start;
  }
  .infra-project-actions {
    width: 100%;
  }
  .project-access .access-link-list {
    display: grid;
    grid-template-columns: 1fr;
  }
  .add-vps-panel,
  .add-project-panel {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .server-card,
  .project-card,
  .infra-project,
  .resource-track span {
    transition: none;
  }
}
.nav-icon {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  flex: none;
  color: currentColor;
}
.nav-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logout button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.server-card a,
.project-card {
  cursor: pointer;
}
.health-message.warning .health-message-mark {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(245, 185, 76, 0.12);
}
.health-message.down .health-message-mark {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 95, 104, 0.12);
}
.health-message.unknown .health-message-mark {
  background: #91a4b8;
  box-shadow: 0 0 0 4px rgba(145, 164, 184, 0.12);
}
