
/* WS3_ADMIN_HEALTH_V1 */

body[data-admin-role="1"].ws3-admin-health-page {
  --health-bg:#0b1518;
  --health-panel:#14282a;
  --health-border:#35554a;
  --health-muted:#afc9bc;
}

/* Main page */
body.ws3-admin-health-page .content {
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
}

body.ws3-admin-health-page .content h1 {
  font-size:clamp(27px,3vw,36px);
  font-weight:750;
  letter-spacing:-.7px;
  line-height:1.2;
}

body.ws3-admin-health-page .content h2 {
  font-size:19px;
  color:#f0faf4;
  margin-bottom:14px;
}

body.ws3-admin-health-page .content h3 {
  font-size:15px;
  color:#e5f6ed;
}

body.ws3-admin-health-page .content p {
  line-height:1.65;
}

body.ws3-admin-health-page .content
:is(.muted,small,.subtle,.help-text) {
  color:#aac5b7 !important;
}

/* Service panels */
body.ws3-admin-health-page .content :is(
  .card,.panel,.form-card,.health-card,
  .service-card,.status-card,.ws-card
) {
  background:var(--health-panel) !important;
  border:1px solid var(--health-border) !important;
  color:#edf8f0 !important;
  border-radius:15px !important;
  box-shadow:none !important;
  min-width:0;
  max-width:100%;
}

body.ws3-admin-health-page .content :is(
  .card,.panel,.form-card
) {
  padding:21px;
}

/* Grid and service overview */
body.ws3-admin-health-page .content :is(
  .stats,.ws-stats,.health-stats,
  .health-grid,.service-grid,.card-grid
) {
  display:grid;
  grid-template-columns:repeat(
    auto-fit,minmax(min(100%,220px),1fr)
  );
  gap:14px;
  margin:17px 0 25px;
  min-width:0;
}

body.ws3-admin-health-page .content :is(
  .stat,.ws-stat,.health-stat
) {
  min-width:0;
  padding:20px;
  background:#19302e !important;
  border:1px solid #38584d !important;
  border-radius:13px !important;
}

body.ws3-admin-health-page .content :is(
  .stat,.ws-stat,.health-stat
) strong {
  color:#e8f9ef;
  font-size:clamp(23px,2.5vw,34px);
  font-variant-numeric:tabular-nums;
}

body.ws3-admin-health-page .content :is(
  .stat,.ws-stat,.health-stat
) span {
  color:#b4cfc1;
  font-size:12px;
}

/* Diagnostic tables */
body.ws3-admin-health-page .ws3-health-table-scroll {
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:#537665 transparent;
  border:1px solid #35554a;
  border-radius:12px;
  margin:14px 0;
}

body.ws3-admin-health-page .content table {
  border-collapse:collapse;
  width:100%;
  font-size:12px;
  color:#e8f6ed;
}

body.ws3-admin-health-page .content th {
  padding:13px 12px !important;
  background:#1d3933 !important;
  color:#b3cfc0 !important;
  font-size:10px;
  font-weight:750;
  letter-spacing:.6px;
  text-transform:uppercase;
  white-space:nowrap;
}

body.ws3-admin-health-page .content td {
  padding:13px 12px !important;
  color:#e7f5eb !important;
  border-bottom:1px solid #314c43 !important;
  vertical-align:middle;
  line-height:1.5;
}

body.ws3-admin-health-page .content tbody tr:hover td {
  background:#1b3531 !important;
}

/* Preserve existing monitor status text.
   Apply colours only to existing semantic status classes. */
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill) {
  display:inline-flex;
  align-items:center;
  border-radius:30px;
  padding:5px 10px;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}

body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill)
:is(.ok,.healthy,.online,.success,.connected),
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).ok,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).healthy,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).online,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).success {
  background:#20503b !important;
  color:#bdf3d8 !important;
}

body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).warning,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).degraded,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).stale {
  background:#483c21 !important;
  color:#f7d99d !important;
}

body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).error,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).offline,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).failed,
body.ws3-admin-health-page .content
:is(.badge,.pill,.status-badge,.ws-pill).critical {
  background:#4b2b31 !important;
  color:#ffbfc0 !important;
}

/* CPU, RAM and disk indicators */
body.ws3-admin-health-page .content :is(
  progress,.progress,.progress-bar,
  .meter,.usage-bar
) {
  max-width:100%;
}

body.ws3-admin-health-page .content progress {
  width:100%;
  height:11px;
  accent-color:#9fe7c6;
  border-radius:9px;
}

body.ws3-admin-health-page .content
:is(.progress,.meter,.usage-bar) {
  border-radius:30px;
  overflow:hidden;
}

/* Forms, filters and actions */
body.ws3-admin-health-page .content label {
  font-size:12px;
  color:#c6ddce;
  font-weight:650;
}

body.ws3-admin-health-page .content
:is(input:not([type=checkbox]):not([type=radio]),
    select,textarea) {
  max-width:100%;
  min-width:0;
  background:#102326 !important;
  color:#eef9f1 !important;
  border:1px solid #496d5e !important;
  border-radius:9px !important;
  padding:10px 12px;
}

body.ws3-admin-health-page .content :is(
  button,.button,.btn
) {
  border-radius:9px;
  font-weight:650;
}

body.ws3-admin-health-page .content :is(
  button,.button,.btn,a
):focus-visible {
  outline:2px solid #a6e8cd;
  outline-offset:2px;
}

/* Technical logs and error messages */
body.ws3-admin-health-page .content pre {
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  padding:15px;
  background:#0e2022 !important;
  color:#cfebdd !important;
  border:1px solid #36594b;
  border-radius:11px;
  line-height:1.55;
  font-size:12px;
}

body.ws3-admin-health-page .content :is(
  code,.log-entry,.endpoint,.technical-value
) {
  overflow-wrap:anywhere;
}

body.ws3-admin-health-page .content code {
  color:#bff0d9;
}

/* Mobile */
@media(max-width:760px) {
  body.ws3-admin-health-page .content {
    padding:18px 12px 55px !important;
  }

  body.ws3-admin-health-page .content :is(
    .card,.panel,.form-card
  ) {
    padding:15px !important;
  }

  body.ws3-admin-health-page .content :is(
    .stats,.ws-stats,.health-stats,
    .health-grid,.service-grid,.card-grid
  ) {
    grid-template-columns:minmax(0,1fr) !important;
    gap:10px;
  }

  body.ws3-admin-health-page .content
  :is(.stat,.ws-stat,.health-stat) {
    padding:16px;
  }

  body.ws3-admin-health-page .content :is(
    .grid,.form-grid,.grid-2
  ) {
    grid-template-columns:minmax(0,1fr) !important;
  }

  body.ws3-admin-health-page .content table {
    font-size:11px;
  }

  body.ws3-admin-health-page .content td,
  body.ws3-admin-health-page .content th {
    padding:10px !important;
  }
}
