/* Page styles for the servers area (admin redesign, DEC-181). Scoped to body.admin-shell. */

/*
 * Boards: ServersList (admin/servers.njk, body.srv-list-page), Main /
 * ServerMoreMenu / ServerHistory / MobileServer (admin/server-detail*.njk,
 * body.srv-detail). Every class below is prefixed `srv-` or scoped to one of
 * those two body classes, so nothing leaks into other pages.
 *
 * The server detail is also what a customer sees (no admin shell), so its
 * rules are scoped to body.srv-detail rather than .admin-shell.
 */

/* ── Shared helpers ─────────────────────────────────────────────────────── */

.srv-list-page .srv-sr-only,
.srv-detail .srv-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.srv-list-page .srv-mono,
.srv-detail .srv-mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.5px;
}

.srv-list-page .srv-nowrap,
.srv-detail .srv-nowrap {
  white-space: nowrap;
}

.srv-list-page .srv-num,
.srv-detail .srv-num {
  text-align: right;
}

.srv-list-page .srv-list__spacer,
.srv-detail .srv-list__spacer {
  flex: 1;
}

/* Filter chips (servers list, history tab) */
.srv-list-page .srv-chip,
.srv-detail .srv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #c9d3da;
  background: #fff;
  font: 500 13px var(--tdo-font-body, Poppins, sans-serif);
  color: #2d3139 !important;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.srv-list-page .srv-chip:hover,
.srv-detail .srv-chip:hover {
  background: #f2f5f7;
  text-decoration: none;
}

.srv-list-page .srv-chip--on,
.srv-list-page .srv-chip--on:hover,
.srv-detail .srv-chip--on,
.srv-detail .srv-chip--on:hover {
  background: #2d3139;
  border-color: #2d3139;
  color: #fff !important;
}

.srv-list-page .srv-chip__count {
  min-height: 18px;
  height: 18px;
  padding: 0 7px;
  font-size: 11px;
}

/* ── Servers list (board ServersList) ───────────────────────────────────── */

.admin-shell.srv-list-page .srv-list-hero {
  align-items: center;
  margin-bottom: 16px;
}

.admin-shell.srv-list-page .srv-list-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-shell.srv-list-page .srv-list {
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 16px;
}

.admin-shell.srv-list-page .srv-list__filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid #dce4e9;
}

.admin-shell.srv-list-page .srv-list__search {
  flex: 1 1 280px;
  display: flex;
  margin: 0;
}

.admin-shell.srv-list-page .srv-list__search-label {
  display: flex;
  flex: 1;
}

.admin-shell.srv-list-page .srv-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #c9d3da;
  border-radius: 10px;
  background: #fff;
  font: 400 13px var(--tdo-font-body, Poppins, sans-serif);
  color: #2d3139;
}

.admin-shell.srv-list-page .srv-input:focus {
  outline: none;
  border-color: var(--tdo-color-secondary, #836fff);
  box-shadow: 0 0 0 3px rgba(131, 111, 255, 0.18);
}

.admin-shell.srv-list-page .srv-chip-menu .ui-menu__panel {
  left: 0;
  right: auto;
  min-width: 220px;
}

.admin-shell.srv-list-page .srv-chip-menu__panel--scroll {
  max-height: 360px;
  overflow-y: auto;
}

.admin-shell.srv-list-page .srv-menu-item--on {
  background: var(--tdo-color-active-tint, #f9ffb2);
  font-weight: 600;
}

.admin-shell.srv-list-page .srv-menu-group--sep {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #eef2f5;
}

/* Columns chooser: the board's ghost "Columns" button */
.admin-shell.srv-list-page .srv-columns > summary {
  list-style: none;
}

.admin-shell.srv-list-page .srv-columns__menu {
  border-radius: 14px;
  border-color: #dce4e9;
  box-shadow: 0 14px 40px rgba(45, 49, 57, 0.14);
  background: #fff;
}

.admin-shell.srv-list-page .srv-list__table-wrap {
  overflow-x: auto;
}

.admin-shell.srv-list-page .srv-table th {
  padding: 10px 14px;
  background: #f8fafb;
  border-bottom: 1px solid #dce4e9;
}

.admin-shell.srv-list-page .srv-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f5;
}

.admin-shell.srv-list-page .srv-table th.srv-num .ui-th-button {
  justify-content: flex-end;
}

.admin-shell.srv-list-page .srv-table__name {
  font-weight: 600;
  color: #2d3139;
  text-decoration: none;
}

.admin-shell.srv-list-page .srv-table__name:hover {
  color: #4a376a;
  text-decoration: underline;
}

.admin-shell.srv-list-page .srv-table__sub {
  font-size: 12.5px;
}

.admin-shell.srv-list-page .srv-table__server .badge {
  margin-left: 6px;
}

.admin-shell.srv-list-page .srv-table__actions-col,
.admin-shell.srv-list-page .srv-table__actions {
  width: 48px;
  text-align: right;
}

.admin-shell.srv-list-page .srv-row-menu {
  position: relative;
  display: inline-block;
}

.admin-shell.srv-list-page .srv-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #4a5160;
  font: 700 16px/1 var(--tdo-font-body, Poppins, sans-serif);
  cursor: pointer;
}

.admin-shell.srv-list-page .srv-icon-btn:hover,
.admin-shell.srv-list-page .actions-dropdown--open .srv-icon-btn {
  background: #eef2f5;
}

.admin-shell.srv-list-page .srv-row-menu .actions-dropdown__menu {
  min-width: 180px;
  padding: 6px;
  border-color: #dce4e9;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(45, 49, 57, 0.16);
  text-align: left;
}

.admin-shell.srv-list-page .srv-row-menu .actions-dropdown__item {
  padding: 9px 10px;
  border-radius: 8px;
  font: 500 13px var(--tdo-font-body, Poppins, sans-serif);
}

.admin-shell.srv-list-page .srv-row-menu .actions-dropdown__item--danger {
  color: #b3141d;
}

.admin-shell.srv-list-page .copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 2px;
  font-size: 0.9em;
  color: #9aa2ae;
  vertical-align: middle;
}

.admin-shell.srv-list-page .copy-btn:hover {
  color: #2d3139;
}

.admin-shell.srv-list-page .copy-btn.copied {
  color: #1e6b33;
}

.admin-shell.srv-list-page .srv-list__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  font-size: 13px;
}

.admin-shell.srv-list-page .srv-list__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-shell.srv-list-page .srv-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  color: #4a5160;
  font-weight: 600;
  text-decoration: none;
}

.admin-shell.srv-list-page .srv-page:hover {
  background: #eef2f5;
}

.admin-shell.srv-list-page .srv-page--current {
  background: var(--tdo-color-active-tint, #f9ffb2);
  box-shadow: inset 0 0 0 1px #e4f04c;
  color: #2d3139;
}

.admin-shell.srv-list-page .srv-dialog .ui-dialog__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-shell.srv-list-page .srv-dialog .ui-dialog__title,
.admin-shell.srv-list-page .srv-dialog .ui-dialog__text {
  margin: 0;
}

/* ── Server detail: header (boards Main, MobileServer) ──────────────────── */

.srv-detail .srv-head {
  align-items: flex-start;
}

.srv-detail .srv-head__main {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
}

.srv-detail .srv-head__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.srv-detail .srv-head__badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.srv-detail .srv-head__facts {
  display: flex;
  gap: 4px 16px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 13px;
  color: #5f6876;
}

.srv-detail .srv-head__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.srv-detail .srv-mobile-only {
  display: none !important;
}

/* More ▾ (board ServerMoreMenu) */
.srv-detail .srv-more [data-ui-menu-toggle][aria-expanded="true"] {
  border-color: #2d3139;
}

.srv-detail .srv-more .ui-menu__panel {
  width: 290px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(45, 49, 57, 0.14);
  display: flex;
  flex-direction: column;
}

.srv-detail .srv-more .ui-menu__panel[hidden] {
  display: none;
}

.srv-detail .srv-more .ui-menu__group {
  padding: 8px 10px 4px;
  font: 600 11px var(--tdo-font-body, Poppins, sans-serif);
  letter-spacing: 0.06em;
}

.srv-detail .srv-more .ui-menu__group:not(:first-child) {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #eef2f5;
}

.srv-detail .srv-more .ui-menu__item {
  padding: 9px 10px;
  border-radius: 8px;
  font: 500 13px var(--tdo-font-body, Poppins, sans-serif);
}

.srv-detail .srv-more .ui-menu__item.vis-admin,
.srv-detail .srv-more .ui-menu__item.vis-staff {
  box-shadow: none;
}

.srv-detail .srv-more .ui-menu__item + .ui-menu__item {
  margin-top: 1px;
}

.srv-detail .srv-more .srv-menu-item--destroy {
  background: #fbe3e4 !important;
  color: #9b1219 !important;
  font-weight: 600;
}

.srv-detail .srv-more .srv-menu-item--destroy:hover {
  background: #f6cfd1 !important;
}

/* Confirm dialogs (board ServerMoreMenu) */
.srv-detail .ui-dialog.srv-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid #dce4e9;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(45, 49, 57, 0.22);
}

.srv-detail .srv-dialog .ui-dialog__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px 0;
}

.srv-detail .srv-dialog .ui-dialog__title {
  margin: 0;
  font: 700 22px/1.2 var(--tdo-font-heading, 'Baloo 2', sans-serif);
}

.srv-detail .srv-dialog .ui-dialog__text {
  margin: 0;
  font-size: 14px;
}

.srv-detail .srv-dialog .srv-dialog__note {
  color: #5f6876;
  font-size: 13px;
}

.srv-detail .srv-dialog .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.srv-detail .srv-dialog .field__label {
  font: 600 13px var(--tdo-font-body, Poppins, sans-serif);
}

.srv-detail .srv-dialog .field__control {
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
}

.srv-detail .srv-dialog .ui-dialog__actions {
  padding: 18px 24px 24px;
}

.srv-detail .srv-dialog .button--ghost {
  border-color: transparent;
  background: transparent;
}

.srv-detail .srv-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: #4a376a;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Tabs: the short label only shows at phone width */
.srv-detail .srv-tabs__short {
  display: none;
}

/* ── Server detail: Overview body (board Main) ──────────────────────────── */

.srv-detail .srv-overview {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.srv-detail .srv-overview > .alert {
  margin: 0;
}

/* Provisioning / recovery strip: absent unless one of its tiles shows */
.srv-detail .srv-state {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.srv-detail .srv-state:not(:has(> :not([hidden]))) {
  display: none;
}

.srv-detail .srv-state__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 14px;
}

.srv-detail .srv-state__item.vis-admin {
  border-color: #dad0ff;
  box-shadow: none;
}

.srv-detail .srv-state__item form {
  margin: 0;
}

.srv-detail .srv-state__label {
  font-size: 12px;
  color: #5f6876;
}

.srv-detail .srv-state__value {
  font-size: 15px;
}

.srv-detail .srv-state__note {
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* Health */
.srv-detail .srv-health {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.srv-detail .srv-health:focus {
  outline: none;
}

.srv-detail .srv-health__head {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
}

.srv-detail .srv-health__head h2 {
  margin: 0;
  font: 700 16px var(--tdo-font-body, Poppins, sans-serif);
}

.srv-detail .srv-health__spacer {
  flex: 1;
}

.srv-detail .srv-health__checked,
.srv-detail .srv-health__feedback {
  font-size: 12px;
}

.srv-detail .srv-range {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 10px;
}

.srv-detail .srv-range button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: 600 12px var(--tdo-font-body, Poppins, sans-serif);
  color: #4a5160;
  cursor: pointer;
}

.srv-detail .srv-range button:hover {
  background: #f2f5f7;
}

.srv-detail .srv-range button[aria-pressed="true"] {
  background: #f9ffb2;
  box-shadow: inset 0 0 0 1px #e4f04c;
  color: #2d3139;
}

.srv-detail .srv-health__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.srv-detail .srv-kpi {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 14px;
}

.srv-detail .srv-kpi__head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.srv-detail .srv-kpi__head strong {
  font-size: 13px;
}

.srv-detail .srv-kpi__head .muted {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The chart grows into whatever height the card has (the row is as tall
   as its tallest card), so oscillations read; the bar sits right on the
   separator under it. */
.srv-detail .srv-kpi__chart {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 150px;
}

/* The figure and its mini gauge, over the chart's top-left corner. */
.srv-detail .srv-kpi__value {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 2px 0;
  background: linear-gradient(90deg, #fff 75%, rgba(255, 255, 255, 0));
  pointer-events: none;
}

.srv-detail .srv-kpi__value .srv-kpi__figure {
  position: static;
  padding: 0;
  background: none;
}

.srv-detail .srv-gauge {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  transform: rotate(-90deg);
}

.srv-detail .srv-gauge circle {
  fill: none;
  stroke-width: 5;
}

.srv-detail .srv-gauge__track {
  stroke: #eef2f5;
}

.srv-detail .srv-gauge__value {
  stroke: #36a151;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.srv-detail .srv-gauge--warning .srv-gauge__value {
  stroke: #e8740c;
}

.srv-detail .srv-gauge--danger .srv-gauge__value {
  stroke: #d21d27;
}

/* Full bleed: the chart runs to both edges of the card (its padding is
   16px); the figure keeps the card's inner margin. Phones keep their own
   compact layout. */
@media (min-width: 641px) {
  .srv-detail .srv-kpi__chart {
    margin-left: -16px;
    margin-right: -16px;
  }

  .srv-detail .srv-kpi__chart .srv-kpi__value {
    left: 16px;
  }
}

.srv-detail .srv-spark {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 64px;
  /* The big figure sits over the top-left corner: start below it. */
  margin-top: 34px;
  overflow: visible;
}

/* Top and bottom of the (data-following) scale, over the chart's right edge;
   the top aligns with the chart's top (it starts 34px down, under the figure). */
.srv-detail .srv-spark__scale {
  position: absolute;
  top: 34px;
  right: 6px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  font-size: 10px;
  line-height: 1;
  color: #8a93a0;
  /* Each label sits on its guide line rather than inside the chart. */
  margin: -6px 0;
}

.srv-detail .srv-spark__scale[hidden] {
  display: none;
}

.srv-detail .srv-spark__scale span {
  padding: 1px 0 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
}

/* The chart is full bleed: 16px puts the labels on the card's text margin. */
@media (min-width: 641px) {
  .srv-detail .srv-spark__scale {
    right: 16px;
  }
}

.srv-detail .srv-spark__dot {
  position: absolute;
  /* Small, so it marks the point without hiding the detail around it; a
     lighter violet than the line (#4a376a) so it reads as the reading. */
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #8b6cff;
  box-shadow: 0 0 0 1.5px #fff;
  pointer-events: none;
  z-index: 2;
}

.srv-detail .srv-spark__dot[hidden] {
  display: none;
}

.srv-detail .srv-spark__guide {
  stroke: #9aa2ae;
  stroke-opacity: 0.45;
  stroke-dasharray: 3 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

@media (max-width: 640px) {
  .srv-detail .srv-spark__scale {
    display: none;
  }
}

.srv-detail .srv-spark__threshold {
  stroke: #d21d27;
  stroke-opacity: 0.35;
  stroke-dasharray: 4 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.srv-detail .srv-spark__area {
  fill: #836fff;
  fill-opacity: 0.12;
}

.srv-detail .srv-spark__line {
  fill: none;
  stroke: #4a376a;
  stroke-width: 1.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.srv-detail .srv-spark__cursor {
  stroke: #9aa2ae;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.srv-detail .srv-spark__tooltip {
  position: absolute;
  bottom: 100%;
  transform: translate(-50%, -4px);
  padding: 3px 7px;
  border-radius: 6px;
  background: #2d3139;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.srv-detail .srv-kpi__figure {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0 8px 2px 0;
  background: linear-gradient(90deg, #fff 70%, rgba(255, 255, 255, 0));
  font: 700 26px/1.1 var(--tdo-font-body, Poppins, sans-serif);
  letter-spacing: -0.02em;
  pointer-events: none;
}

.srv-detail .srv-kpi__unit {
  font-size: 15px;
}

.srv-detail .srv-kpi__chart--plain .srv-kpi__figure {
  position: static;
  background: none;
}

.srv-detail .srv-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #eef2f5;
  overflow: hidden;
}

.srv-detail .srv-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #36a151;
  transition: width 0.3s ease;
}

.srv-detail .srv-bar > span.srv-bar--warning {
  background: #e8740c;
}

.srv-detail .srv-bar > span.srv-bar--danger {
  background: #d21d27;
}

.srv-detail .srv-kpi__subs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f5;
}

.srv-detail .srv-kpi__subs > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.srv-detail .srv-kpi__subs .muted {
  font-size: 11px;
}

.srv-detail .srv-kpi__subs strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srv-detail .srv-kpi__subs small {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srv-detail .srv-kpi__error {
  margin: 0;
  font-size: 12px;
}

.srv-detail .srv-mounts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.srv-detail .srv-mounts:empty {
  display: none;
}

.srv-detail .srv-mounts__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px auto;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.srv-detail .srv-mounts__path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.srv-detail .srv-mounts__bar {
  height: 4px;
}

.srv-detail .srv-mounts__value {
  font-weight: 600;
}

.srv-detail .srv-kpi__rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.srv-detail .srv-kpi__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.srv-detail .srv-kpi__row > .muted {
  flex: 1;
  font-size: 12px;
}

.srv-detail .srv-kpi__row > strong {
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

.srv-detail .srv-kpi__alerts {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f5;
}

.srv-detail .srv-kpi__alerts .muted {
  flex: 1;
  font-size: 12px;
}

.srv-detail .srv-kpi__alerts strong {
  font-size: 20px;
}

.srv-detail .srv-problems {
  margin: 0;
  max-height: 160px;
  overflow-y: auto;
}

.srv-detail .srv-problems:empty {
  display: none;
}

/* Environments + Recent activity | Details + Notes + Provider status */
.srv-detail .srv-overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: start;
}

.srv-detail .srv-overview__side,
.srv-detail .srv-overview__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Hardware specifications: icon tiles, four across where there is room and
   two otherwise (never 3 + 3 + 2). */
.srv-detail .srv-hw {
  container-type: inline-size;
}

.srv-detail .srv-hw__offer {
  padding: 3px 10px;
  border-radius: 999px;
  background: #f6f3ff;
  color: #4a376a;
  font: 600 12px var(--tdo-font-body, Poppins, sans-serif);
  white-space: nowrap;
}

.srv-detail .srv-hw__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

/* Four across: each tile stacks its icon over the text. */
@container (min-width: 520px) {
  .srv-detail .srv-hw__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .srv-detail .srv-hw__item {
    flex-direction: column;
    gap: 10px;
  }

  .srv-detail .srv-hw__text {
    width: 100%;
  }
}

/* Wide cards: tiles keep a short fixed width and more fit on each row,
   instead of stretching. */
@container (min-width: 760px) {
  .srv-detail .srv-hw__grid {
    grid-template-columns: repeat(auto-fill, 160px);
  }
}

.srv-detail .srv-hw__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #eef2f5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.srv-detail .srv-hw__item:hover {
  border-color: #dce4e9;
  box-shadow: 0 2px 8px rgba(30, 40, 60, 0.06);
}

.srv-detail .srv-hw__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--hw-bg, #eef2f5);
  color: var(--hw-fg, #4a5160);
}

.srv-detail .srv-hw__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.srv-detail .srv-hw__item--cpu { --hw-bg: #efeaff; --hw-fg: #6b4fe0; }
.srv-detail .srv-hw__item--memory { --hw-bg: #e4f5f8; --hw-fg: #0e7f8c; }
.srv-detail .srv-hw__item--disk { --hw-bg: #fff1e0; --hw-fg: #b65c07; }
.srv-detail .srv-hw__item--os { --hw-bg: #eef2f5; --hw-fg: #2d3139; }
.srv-detail .srv-hw__item--location { --hw-bg: #fdeaf0; --hw-fg: #b8336a; }
.srv-detail .srv-hw__item--network { --hw-bg: #e6efff; --hw-fg: #2b5cc8; }
.srv-detail .srv-hw__item--uptime { --hw-bg: #e3f4e7; --hw-fg: #1e6b33; }
.srv-detail .srv-hw__item--docker { --hw-bg: #e3f2fd; --hw-fg: #1d63a6; }

.srv-detail .srv-hw__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.srv-detail .srv-hw__label {
  color: #5f6876;
  font-size: 12px;
}

.srv-detail .srv-hw__value {
  overflow: hidden;
  font: 700 16px/1.35 var(--tdo-font-body, Poppins, sans-serif);
  color: #2d3139;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.srv-detail .srv-hw__item--network .srv-hw__value {
  font-family: var(--font-mono);
  font-size: 14px;
}

.srv-detail .srv-hw__detail {
  color: #5f6876;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.srv-detail .srv-hw__detail .badge {
  max-width: 100%;
  margin-top: 4px;
  white-space: normal;
}

.srv-detail .srv-card {
  margin: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 16px;
  min-width: 0;
}

.srv-detail .srv-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.srv-detail .srv-card__head h3 {
  flex: 1;
  margin: 0 0 4px;
  font: 700 16px var(--tdo-font-body, Poppins, sans-serif);
}

.srv-detail .srv-card__head form {
  margin: 0;
}

.srv-detail .srv-card__head--sub {
  margin-top: 22px;
}

.srv-detail .srv-card__lead {
  margin: 6px 0 0;
  font-size: 12.5px;
}

.srv-detail .srv-card__empty {
  margin: 10px 0 0;
}

.srv-detail .srv-env-table th,
.srv-detail .srv-activity-table th {
  padding: 10px 12px;
}

.srv-detail .srv-env-table td,
.srv-detail .srv-activity-table td {
  padding: 12px;
}

.srv-detail .srv-env-table__name {
  font-weight: 600;
}

.srv-detail .srv-env-table__domain,
.srv-detail .srv-activity-table__by {
  font-size: 12px;
}

.srv-detail .srv-activity-table__when {
  width: 120px;
}

.srv-detail .srv-dl {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  row-gap: 10px;
  column-gap: 16px;
  margin: 12px 0 0;
}

.srv-detail .srv-dl dt {
  color: #5f6876;
}

.srv-detail .srv-dl dd {
  margin: 0;
  font-weight: 500;
  min-width: 0;
}

.srv-detail .srv-dl__clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.srv-detail .srv-dl__wrap {
  overflow-wrap: anywhere;
}

.srv-detail .srv-dl__note {
  font-size: 12px;
  font-weight: 400;
}

.srv-detail .srv-more-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f5;
}

.srv-detail .srv-more-details > summary {
  cursor: pointer;
  color: #4a376a;
  font: 600 13px var(--tdo-font-body, Poppins, sans-serif);
}

.srv-detail .srv-notes__text {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.srv-detail .srv-notes__form {
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.srv-detail .srv-notes__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.srv-detail .srv-notes__private {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
}

.srv-detail .srv-notes__private-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.srv-detail .srv-notes__private-head .muted {
  flex: 1;
  font-size: 12px;
}

.srv-detail .srv-maintenance {
  margin-top: 20px;
}

/* ── History tab (board ServerHistory) ──────────────────────────────────── */

.srv-detail .srv-history {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.srv-detail .srv-history__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.srv-detail .srv-history__card {
  padding: 8px 20px;
}

.srv-detail .srv-timeline {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.srv-detail .srv-timeline__item {
  display: grid;
  grid-template-columns: 120px 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #eef2f5;
}

.srv-detail .srv-timeline__item:last-child {
  border-bottom: 0;
}

.srv-detail .srv-timeline__item[hidden] {
  display: none;
}

.srv-detail .srv-timeline__when {
  font-size: 12px;
}

.srv-detail .srv-timeline__dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: #5f6876;
}

.srv-detail .srv-timeline__dot--success {
  background: #36a151;
}

.srv-detail .srv-timeline__dot--danger {
  background: #d21d27;
}

.srv-detail .srv-timeline__dot--warning {
  background: #e8740c;
}

.srv-detail .srv-timeline__dot--info {
  background: #836fff;
}

.srv-detail .srv-timeline__body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.srv-detail .srv-timeline__meta {
  display: block;
  font-size: 12px;
}

.srv-detail .srv-history__none {
  margin: 14px 0;
}

.srv-detail .srv-history__more {
  margin: 14px 0 10px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .srv-detail .srv-health__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .srv-detail .srv-overview__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Board MobileServer (390 px): stacked header, button row, 4-column tabs,
   2×2 health cards, compact cards. */
@media (max-width: 640px) {
  .srv-detail .srv-mobile-only {
    display: block !important;
  }

  .srv-detail .srv-desktop-only,
  .srv-detail .srv-head__restart {
    display: none !important;
  }

  .srv-detail .srv-head {
    flex-direction: column;
    gap: 14px;
  }

  .srv-detail .srv-head__main {
    flex: 0 0 auto;
    width: 100%;
  }

  .srv-detail .srv-head__title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .srv-detail .srv-head .dashboard-hero__title {
    font-size: 26px;
  }

  .srv-detail .srv-head__badges {
    gap: 6px;
  }

  .srv-detail .srv-head__facts {
    gap: 0;
  }

  .srv-detail .srv-head__facts > span + span::before {
    content: '·';
    margin: 0 6px;
  }

  .srv-detail .srv-head__fact-label,
  .srv-detail .srv-head__facts > .srv-head__fact-renew {
    display: none;
  }

  .srv-detail .srv-head__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
  }

  .srv-detail .srv-head__actions .button {
    min-height: 44px;
    font-size: 14px;
  }

  .srv-detail .srv-head__actions > .srv-more:only-child {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .srv-detail .srv-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .srv-detail .srv-tabs .ui-tabs__link {
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 40px;
    padding: 0 6px;
    font-size: 13px;
  }

  .srv-detail .srv-tabs .ui-tabs__link > svg {
    display: none;
  }

  .srv-detail .srv-tabs .ui-tabs__link:has(.srv-tabs__short) .srv-tabs__label {
    display: none;
  }

  .srv-detail .srv-tabs .srv-tabs__short {
    display: inline;
  }

  .srv-detail .srv-overview,
  .srv-detail .srv-overview__side,
  .srv-detail .srv-overview__col,
  .srv-detail .srv-history {
    gap: 14px;
  }

  .srv-detail .srv-hw__grid {
    gap: 8px;
  }

  .srv-detail .srv-hw__item {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .srv-detail .srv-hw__item--network .srv-hw__value {
    font-size: 13px;
  }

  .srv-detail .srv-hw__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .srv-detail .srv-hw__icon svg {
    width: 17px;
    height: 17px;
  }

  .srv-detail .srv-hw__value {
    font-size: 14px;
  }

  .srv-detail .srv-health__checked,
  .srv-detail .srv-health__feedback {
    display: none;
  }

  .srv-detail .srv-health__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .srv-detail .srv-kpi {
    gap: 0;
    padding: 12px;
  }

  .srv-detail .srv-kpi__head .muted,
  .srv-detail .srv-bar,
  .srv-detail .srv-kpi__subs,
  .srv-detail .srv-mounts,
  .srv-detail .srv-kpi__error,
  .srv-detail .srv-kpi--status .srv-kpi__head,
  .srv-detail .srv-kpi--status .srv-kpi__rows,
  .srv-detail .srv-problems {
    display: none;
  }

  .srv-detail .srv-kpi__head strong {
    font-weight: 400;
    font-size: 12px;
    color: #5f6876;
  }

  .srv-detail .srv-kpi__chart {
    display: flex;
    flex-direction: column-reverse;
    height: auto;
    min-height: 0;
  }

  .srv-detail .srv-kpi__figure,
  .srv-detail .srv-kpi__chart--plain .srv-kpi__figure {
    position: static;
    padding: 0;
    background: none;
    font-size: 20px;
  }

  .srv-detail .srv-kpi__value {
    position: static;
    padding: 0;
    background: none;
  }

  .srv-detail .srv-gauge {
    width: 18px;
    height: 18px;
  }

  .srv-detail .srv-kpi__unit {
    font-size: 20px;
  }

  .srv-detail .srv-spark {
    flex: none;
    height: 24px;
    min-height: 0;
    margin-top: 6px;
  }

  .srv-detail .srv-kpi__alerts {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    border: 0;
  }

  .srv-detail .srv-card {
    padding: 16px;
    border-radius: 14px;
  }

  .srv-detail .srv-env-table thead,
  .srv-detail .srv-env-table__mode,
  .srv-detail .srv-env-table__services,
  .srv-detail .srv-env-table__monthly,
  .srv-detail .srv-env-table__domain {
    display: none;
  }

  .srv-detail .srv-env-table td {
    padding: 10px 0;
  }

  .srv-detail .srv-env-table__status {
    text-align: right;
  }

  .srv-detail .srv-dl {
    grid-template-columns: 110px minmax(0, 1fr);
    row-gap: 8px;
    column-gap: 12px;
    margin-top: 10px;
    font-size: 13px;
  }

  .srv-detail .srv-dl dd {
    overflow-wrap: anywhere;
  }

  .srv-detail .srv-timeline__item {
    grid-template-columns: 18px minmax(0, 1fr) auto;
  }

  .srv-detail .srv-timeline__when {
    grid-column: 1 / -1;
  }

  .admin-shell.srv-list-page .srv-list-hero__actions {
    width: 100%;
  }
}

/* Long ids and box names must not widen the Server column past the page. */
.admin-shell.srv-list-page .srv-table__server {
  max-width: 320px;
}

.admin-shell.srv-list-page .srv-table__server .srv-nowrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  white-space: normal;
}

.admin-shell.srv-list-page .srv-table__server .srv-nowrap .badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-shell.srv-list-page .srv-table__id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Phone: each Recent activity entry is two lines — what happened (and who)
   beside its outcome, the date underneath — so nothing is squeezed. */
@media (max-width: 640px) {
  .srv-detail .srv-activity-table thead {
    display: none;
  }

  .srv-detail .srv-activity-table,
  .srv-detail .srv-activity-table tbody {
    display: block;
    width: 100%;
  }

  .srv-detail .srv-activity-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--tdo-color-hover);
  }

  .srv-detail .srv-activity-table tr:last-child {
    border-bottom: 0;
  }

  .srv-detail .srv-activity-table td {
    display: block;
    width: auto;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
    overflow-wrap: break-word;
  }

  .srv-detail .srv-activity-table td::before {
    display: none;
  }

  .srv-detail .srv-activity-table td:first-child {
    grid-row: 2;
    grid-column: 1;
    font-size: 12px;
    color: var(--tdo-color-muted);
  }

  .srv-detail .srv-activity-table td:nth-child(2) {
    grid-row: 1;
    grid-column: 1;
  }

  .srv-detail .srv-activity-table td.srv-num {
    grid-row: 1 / span 2;
    grid-column: 2;
    white-space: nowrap;
  }
}

/* The kit's `.admin-shell .dashboard-hero > div:first-child` (display block,
   flex 1 1 420px) outranks the rules above inside the admin shell. */
.admin-shell.srv-detail .srv-head > div.srv-head__main {
  display: flex !important;
}

@media (max-width: 640px) {
  .admin-shell.srv-detail .srv-head > div.srv-head__main {
    flex: 0 0 auto;
  }
}

/* Phone (board 13): the Environments card is a compact list — name, status
   and a chevron per row — instead of one card per environment. */
@media (max-width: 640px) {
  .admin-shell.srv-detail .srv-env-table thead,
  .admin-shell.srv-detail .srv-env-table td.srv-env-table__mode,
  .admin-shell.srv-detail .srv-env-table td.srv-env-table__services,
  .admin-shell.srv-detail .srv-env-table td.srv-env-table__monthly,
  .admin-shell.srv-detail .srv-env-table .srv-env-table__domain {
    display: none !important;
  }

  .admin-shell.srv-detail .srv-env-table.ui-table-cards tr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--tdo-color-hover);
    border-radius: 0;
    background: transparent;
  }

  .admin-shell.srv-detail .srv-env-table.ui-table-cards tr:last-child {
    border-bottom: 0;
  }

  .admin-shell.srv-detail .srv-env-table.ui-table-cards td {
    width: auto;
    padding: 0;
  }

  .admin-shell.srv-detail .srv-env-table.ui-table-cards td::before {
    display: none;
  }

  .admin-shell.srv-detail .srv-env-table.ui-table-cards td:first-child {
    flex: 1 1 auto;
    text-align: left !important;
  }

  .admin-shell.srv-detail .srv-env-table.ui-table-cards td.srv-env-table__status::after {
    content: '\203A';
    margin-left: 8px;
    color: var(--tdo-color-muted);
  }
}
