*{box-sizing:border-box}
html,body{margin:0;padding:0}
h1,h2,h3{margin:0;font-size:inherit;font-weight:inherit}

:root {
  --bg:#070A11;
  --panel:#0E1320;
  --panel2:#0B1019;
  --border:rgba(148,163,184,0.10);
  --border2:rgba(148,163,184,0.20);
  --text:#E6EDF3;
  --muted:#8B98A9;
  --dim:#55606E;
  --num:#34D399;
  --green:#10B981;
  --amber:#F59E0B;
  --orange:#F97316;
  --red:#EF4444;
  --gray:#6B7280;
  --chip:#121A28;
  --grid:rgba(16,185,129,0.07);
  --ecg:#2BD27E;
  --glow:rgba(43,210,126,0.55);
}

body.light {
  --bg:#F4F6F9;
  --panel:#FFFFFF;
  --panel2:#FBFCFD;
  --border:rgba(15,23,42,0.09);
  --border2:rgba(15,23,42,0.16);
  --text:#101826;
  --muted:#566173;
  --dim:#919DAD;
  --num:#047857;
  --green:#059669;
  --amber:#D97706;
  --orange:#EA580C;
  --red:#DC2626;
  --gray:#6B7280;
  --chip:#EEF2F6;
  --grid:rgba(5,150,105,0.10);
  --ecg:#059669;
  --glow:rgba(5,150,105,0.16);
}

body {
  background:var(--bg);
  color:var(--text);
  font-family:'IBM Plex Sans',-apple-system,BlinkMacSystemFont,sans-serif;
  -webkit-font-smoothing:antialiased;
  transition:background 280ms ease,color 280ms ease;
  min-height:100vh;
}

.mono { font-family:'IBM Plex Mono',monospace }

@keyframes iv-blink {
  0%,100%{opacity:1}
  50%{opacity:0.2}
}

.container {
  max-width:1280px;
  margin:0 auto;
  padding:22px 24px 64px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* utility bar */
.utility-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-bottom:2px;
}
.utility-bar .brand {
  display:flex;
  align-items:center;
  gap:10px;
}
.utility-bar .brand-name {
  font-family:'IBM Plex Mono',monospace;
  font-size:11px;
  font-weight:600;
  letter-spacing:0.22em;
  color:var(--num);
}
.utility-bar .brand-sub {
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  letter-spacing:0.16em;
  color:var(--dim);
}
.utility-controls { display:flex;align-items:center;gap:8px }
.lang-select {
  background:var(--chip);border:1px solid var(--border2);color:var(--muted);
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.06em;
  padding:5px 8px;border-radius:7px;cursor:pointer;outline:none;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 6px center;padding-right:20px;
}
.lang-select option { background:var(--bg);color:var(--text) }
/* patient header */
.patient-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:18px 20px;
}
.patient-info { display:flex;flex-direction:column;gap:7px;min-width:280px }
.patient-title { display:flex;align-items:baseline;gap:9px;flex-wrap:wrap }
.patient-label { font-size:10px;font-weight:600;letter-spacing:0.16em;text-transform:uppercase;color:var(--dim) }
.patient-name { font-size:19px;font-weight:700;letter-spacing:-0.01em;color:var(--text) }
.patient-net { font-size:14px;color:var(--muted) }
.patient-meta { font-family:'IBM Plex Mono',monospace;font-size:11px;line-height:1.5;color:var(--dim) }
.patient-status { display:flex;flex-direction:column;align-items:flex-end;gap:10px;flex-shrink:0 }
.live-row { display:flex;align-items:center;gap:12px;font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--muted);white-space:nowrap }
.live-dot-wrap { display:inline-flex;align-items:center;gap:6px }
.live-dot { width:8px;height:8px;border-radius:50%;background:var(--red);box-shadow:0 0 9px var(--red);animation:iv-blink 1.5s ease-in-out infinite }
.live-text { color:var(--text);letter-spacing:0.12em;font-weight:600 }
.live-dim { color:var(--dim) }
.status-pill { display:inline-flex;align-items:center;gap:8px;background:var(--chip);border:1px solid var(--border2);padding:7px 13px;border-radius:999px;white-space:nowrap }
.status-dot { width:9px;height:9px;border-radius:50% }
.status-label { font-size:12px;font-weight:600;letter-spacing:0.06em;white-space:nowrap;flex-shrink:0 }
.status-sub { font-size:11px;color:var(--dim);white-space:nowrap;flex-shrink:0 }

/* ECG strip */
.ecg-strip {
  background:var(--panel2);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px 16px 8px;
  position:relative;
  overflow:hidden;
}
.ecg-header { display:flex;align-items:center;justify-content:space-between;margin-bottom:6px }
.ecg-label { font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.16em;text-transform:uppercase;color:var(--muted) }
.ecg-meta { font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.1em;color:var(--dim) }
#ecg-canvas { display:block;width:100%;height:118px }

/* vital cards */
.vitals-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(216px,1fr));gap:14px }
.vital-card {
  display:flex;flex-direction:column;gap:13px;
  background:var(--panel);border:1px solid var(--border);
  border-radius:14px;padding:17px 18px 16px;min-height:152px;
}
.vital-top { display:flex;align-items:center;justify-content:space-between }
.vital-abbr {
  font-family:'IBM Plex Mono',monospace;font-size:11px;font-weight:600;
  letter-spacing:0.1em;border:1px solid var(--border2);
  padding:3px 8px;border-radius:6px;background:var(--chip);
}
.vital-indicator { width:8px;height:8px;border-radius:50% }
.vital-value-row { display:flex;align-items:baseline;gap:7px }
.vital-value {
  font-family:'IBM Plex Mono',monospace;font-size:34px;font-weight:500;
  line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-0.01em;
}
.vital-unit { font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--dim) }
.vital-bottom { display:flex;flex-direction:column;gap:5px;margin-top:auto }
.vital-status { font-size:10px;font-weight:600;letter-spacing:0.12em;text-transform:uppercase }
.vital-note { font-size:11.5px;line-height:1.4;color:var(--muted) }

/* health score */
.health-card {
  background:var(--panel);border:1px solid var(--border);
  border-radius:16px;padding:24px 26px;
  display:grid;grid-template-columns:minmax(220px,300px) 1fr;gap:34px;align-items:center;
}
.health-left { display:flex;flex-direction:column;gap:6px }
.health-label { font-size:10px;font-weight:600;letter-spacing:0.16em;text-transform:uppercase;color:var(--muted) }
.health-value-row { display:flex;align-items:baseline;gap:6px }
#health-score {
  font-family:'IBM Plex Mono',monospace;font-size:74px;font-weight:500;
  line-height:0.95;font-variant-numeric:tabular-nums;letter-spacing:-0.02em;
  color:var(--dim);
}
.health-pct { font-family:'IBM Plex Mono',monospace;font-size:26px;font-weight:500 }
.health-counts { font-family:'IBM Plex Mono',monospace;font-size:11.5px;color:var(--muted) }
.health-right { display:flex;flex-direction:column;gap:12px }
.health-bar-wrap {
  position:relative;height:14px;border-radius:8px;
  background:var(--chip);border:1px solid var(--border);overflow:hidden;
}
#health-bar {
  position:absolute;left:0;top:0;bottom:0;
  border-radius:8px;transition:width 600ms ease;
}
.health-scale {
  display:flex;align-items:center;justify-content:space-between;
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.04em;color:var(--dim);
}
#health-note { font-size:12px;line-height:1.5;color:var(--muted) }

/* health score history */
.history-card {
  background:var(--panel);border:1px solid var(--border);
  border-radius:16px;padding:18px 20px 12px;
}
.history-header {
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;margin-bottom:12px;
}
.history-label { font-size:10px;font-weight:600;letter-spacing:0.16em;text-transform:uppercase;color:var(--muted) }
.history-periods { display:flex;gap:6px }
.period-btn {
  background:var(--chip);border:1px solid var(--border2);color:var(--muted);
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.08em;
  padding:5px 11px;border-radius:7px;cursor:pointer;white-space:nowrap;
  transition:border-color 0.15s,color 0.15s;
}
.period-btn:hover { border-color:var(--muted);color:var(--text) }
.period-btn.active { border-color:var(--num);color:var(--num);box-shadow:0 0 8px rgba(52,211,153,0.2) }
.history-chart-wrap { position:relative }
#history-canvas { display:block;width:100%;height:180px;cursor:crosshair;transition:opacity 200ms ease }
#history-canvas:focus { outline:1px solid var(--border2);outline-offset:2px }
#history-tooltip {
  position:absolute;display:none;pointer-events:none;z-index:5;
  background:var(--panel2);border:1px solid var(--border2);border-radius:8px;
  padding:7px 11px;font-family:'IBM Plex Mono',monospace;
  box-shadow:0 4px 14px rgba(0,0,0,0.35);white-space:nowrap;
}
body.light #history-tooltip { box-shadow:0 4px 14px rgba(15,23,42,0.14) }
.tooltip-value { font-size:14px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums }
.tooltip-time { font-size:10px;color:var(--muted);margin-top:2px }
.tooltip-min { font-size:10px;color:var(--dim);margin-top:1px;font-variant-numeric:tabular-nums }

/* incident banner */
#incident-banner {
  display:none;
  background:var(--panel);
  border:1px solid var(--border);
  border-left:4px solid var(--red);
  border-radius:14px;
  padding:16px 20px;
  gap:10px;
  flex-direction:column;
}
#incident-banner.active { display:flex }
.incident-title { font-size:14px;font-weight:600;color:var(--red) }
.incident-details { font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--muted) }

/* organ systems */
.organs-section { display:flex;flex-direction:column;gap:12px;margin-top:6px }
.organs-header { display:flex;align-items:baseline;justify-content:space-between }
.organs-title { font-size:11px;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;color:var(--text) }
.organs-meta { font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.08em;color:var(--dim) }
#services-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(326px,1fr));gap:14px }
.organ-group {
  background:var(--panel);border:1px solid var(--border);
  border-radius:14px;padding:15px 16px 12px;
}
.organ-group-header {
  display:flex;align-items:baseline;justify-content:space-between;
  margin-bottom:10px;padding-bottom:9px;border-bottom:1px solid var(--border);
}
.organ-group-name { font-size:11px;font-weight:600;letter-spacing:0.04em;color:var(--text) }
.organ-group-short { font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.08em;color:var(--dim) }
.service-row {
  display:grid;grid-template-columns:12px 1fr auto 52px;
  align-items:center;gap:10px;padding:6px 2px;
}
.service-dot { width:8px;height:8px;border-radius:50% }
.service-name { font-size:13px;font-weight:500;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none }
.service-link:hover { text-decoration:underline;color:var(--num) }
.service-ms { font-family:'IBM Plex Mono',monospace;font-size:11px;font-variant-numeric:tabular-nums }
.service-weight { font-family:'IBM Plex Mono',monospace;font-size:11px;text-align:right;color:var(--dim);font-variant-numeric:tabular-nums }

/* alert subscription */
.alert-section {
  background:var(--panel2);border:1px solid var(--border);
  border-radius:16px;padding:24px 26px;display:flex;flex-direction:column;gap:18px;margin-top:8px;
}
.alert-title { font-size:16px;font-weight:600;color:var(--text) }
.alert-sub { font-size:13px;color:var(--muted) }
.alert-bottom { display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap }
.rss-btn {
  display:inline-block;text-decoration:none;
  background:var(--num);color:#06140E;border:none;
  font-family:'IBM Plex Sans',sans-serif;font-size:13px;font-weight:700;
  letter-spacing:0.01em;padding:11px 22px;border-radius:9px;cursor:pointer;
  box-shadow:0 0 22px rgba(52,211,153,0.28);
}

.share-section {
  background:var(--panel2);border:1px solid var(--border);
  border-radius:16px;padding:24px 26px;margin-top:8px;
}
.share-header { margin-bottom:16px }
.share-preview {
  background:var(--bg);border:1px solid var(--border2);border-radius:10px;
  padding:16px 18px;margin-bottom:16px;
  font-family:'IBM Plex Mono',monospace;font-size:13px;line-height:1.8;
  color:var(--muted);white-space:pre-line;
}
.share-buttons { display:flex;gap:10px;flex-wrap:wrap }
.share-btn {
  width:52px;height:52px;border:1px solid var(--border2);border-radius:12px;
  background:var(--bg);color:var(--text);font-size:20px;font-weight:700;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  font-family:'IBM Plex Sans',sans-serif;transition:all 0.15s;
}
.share-btn:hover { border-color:var(--num);color:var(--num);box-shadow:0 0 12px rgba(52,211,153,0.2) }
.share-x:hover { border-color:#1da1f2;color:#1da1f2;box-shadow:0 0 12px rgba(29,161,242,0.3) }
.share-fb:hover { border-color:#1877f2;color:#1877f2;box-shadow:0 0 12px rgba(24,119,242,0.3) }
.share-li:hover { border-color:#0a66c2;color:#0a66c2;box-shadow:0 0 12px rgba(10,102,194,0.3) }
.share-tg:hover { border-color:#26a5e4;color:#26a5e4;box-shadow:0 0 12px rgba(38,165,228,0.3) }
.share-rd:hover { border-color:#ff4500;color:#ff4500;box-shadow:0 0 12px rgba(255,69,0,0.3) }

.about-section {
  background:var(--panel2);border:1px solid var(--border);
  border-radius:16px;padding:28px 28px 24px;margin-top:8px;
}
.about-title {
  font-size:16px;font-weight:600;color:var(--text);margin-bottom:14px;
}
.about-text {
  font-size:13px;line-height:1.7;color:var(--muted);margin:0 0 10px;
}
.about-credits {
  display:flex;flex-direction:column;gap:4px;margin-top:16px;padding-top:16px;
  border-top:1px solid var(--border);
  font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:0.03em;color:var(--dim);
}
.about-link { color:var(--num);text-decoration:none }
.about-link:hover { text-decoration:underline }

.footer {
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px;margin-top:4px;
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.06em;color:var(--dim);
}

/* ========== SEO footer (all service links) ========== */
.seo-footer {
  background:var(--panel2);border:1px solid var(--border);
  border-radius:14px;padding:18px 20px;margin-top:8px;
}
.seo-footer-title {
  font-size:10px;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;
  color:var(--dim);margin-bottom:10px;
}
.seo-footer-links { display:flex;flex-wrap:wrap;gap:6px 14px }
.seo-footer-links a {
  font-family:'IBM Plex Mono',monospace;font-size:11px;
  color:var(--muted);text-decoration:none;white-space:nowrap;
}
.seo-footer-links a:hover { color:var(--num);text-decoration:underline }
.seo-footer-hub-link { color:var(--muted);text-decoration:none }
.seo-footer-hub-link:hover { color:var(--num);text-decoration:underline }

/* ========== Service detail page ========== */
.sp-container { max-width:1000px }
.sp-back {
  font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:0.04em;
  color:var(--muted);text-decoration:none;
}
.sp-back:hover { color:var(--num) }
.sp-header {
  display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap;
  background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:20px 22px;
}
.sp-header-main { display:flex;flex-direction:column;gap:12px;min-width:260px }
.sp-h1 { font-size:22px;font-weight:700;letter-spacing:-0.01em;color:var(--text);line-height:1.3 }
.sp-meta-row { display:flex;align-items:center;gap:14px;flex-wrap:wrap }
.sp-badge {
  display:inline-flex;align-items:center;gap:7px;
  border:1px solid;border-radius:999px;padding:5px 12px;
  font-size:12px;font-weight:600;letter-spacing:0.06em;white-space:nowrap;
}
.sp-meta-item { font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--muted);white-space:nowrap }
.sp-live { display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex-shrink:0 }
.sp-checked { font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--dim) }
.sp-h2 {
  font-size:11px;font-weight:600;letter-spacing:0.14em;text-transform:uppercase;
  color:var(--text);margin-top:10px;
}
.sp-card {
  background:var(--panel);border:1px solid var(--border);
  border-radius:14px;padding:18px 20px;
}
.sp-stats .vital-card { min-height:auto;gap:8px }
.sp-stat-label { font-size:10px;font-weight:600;letter-spacing:0.12em;text-transform:uppercase;color:var(--muted) }
.sp-stat-value {
  font-family:'IBM Plex Mono',monospace;font-size:28px;font-weight:500;
  line-height:1;font-variant-numeric:tabular-nums;
}
.sp-empty { font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--muted);margin:4px 0 }

/* downtime calendar */
.cal-grid {
  display:grid;grid-auto-flow:column;
  grid-template-rows:repeat(7,14px);grid-auto-columns:14px;
  gap:3px;overflow-x:auto;padding-bottom:4px;
}
.cal-cell { width:14px;height:14px;border-radius:3px;background:var(--chip) }
.cal-green { background:var(--green);opacity:0.85 }
.cal-yellow { background:var(--amber) }
.cal-red { background:var(--red) }
.cal-gray { background:var(--chip);border:1px solid var(--border) }
.cal-legend {
  display:flex;gap:16px;margin-top:12px;flex-wrap:wrap;
  font-family:'IBM Plex Mono',monospace;font-size:10px;color:var(--dim);
}
.cal-legend span { display:inline-flex;align-items:center;gap:5px }
.cal-legend .cal-cell { width:10px;height:10px }

/* response chart */
.sp-chart-wrap { position:relative;height:220px }
.sp-chart-note { font-size:11px;color:var(--dim);margin-top:10px }

/* incident log */
.inc-table-wrap { overflow-x:auto }
.incident-table { width:100%;border-collapse:collapse;font-size:12.5px }
.incident-table th {
  text-align:left;font-size:10px;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;
  color:var(--dim);padding:6px 14px 8px 0;border-bottom:1px solid var(--border2);
}
.incident-table td { padding:9px 14px 9px 0;border-bottom:1px solid var(--border);vertical-align:top }
.incident-table tr:last-child td { border-bottom:none }
.inc-date { font-family:'IBM Plex Mono',monospace;font-size:11.5px;color:var(--muted);white-space:nowrap }
.inc-duration { font-family:'IBM Plex Mono',monospace;font-size:11.5px;color:var(--text);white-space:nowrap }
.inc-badge {
  display:inline-block;border:1px solid;border-radius:6px;padding:2px 8px;
  font-size:10px;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;white-space:nowrap;
}
.inc-desc { color:var(--muted);line-height:1.5 }

/* related services */
.related-card { font-size:13px;color:var(--muted) }
.related-label { font-weight:600;color:var(--text);margin-right:6px }
.related-link { color:var(--num);text-decoration:none;white-space:nowrap }
.related-link:hover { text-decoration:underline }
.related-sep { margin:0 8px;color:var(--dim) }

.sp-footer {
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;
  margin-top:6px;font-family:'IBM Plex Mono',monospace;font-size:10px;
  letter-spacing:0.04em;color:var(--dim);
}

/* mobile */
@media(max-width:768px) {
  .vitals-grid { grid-template-columns:repeat(2,1fr) }
  .health-card { grid-template-columns:1fr;gap:20px }
  #services-grid { grid-template-columns:1fr }
  .patient-header { flex-direction:column }
  .patient-status { align-items:flex-start }
}
@media(max-width:480px) {
  .vitals-grid { grid-template-columns:1fr }
  .container { padding:16px 14px 48px }
  .sp-stats { grid-template-columns:repeat(2,1fr) }
}
@media(max-width:600px) {
  .cal-grid { grid-template-rows:repeat(7,8px);grid-auto-columns:8px;gap:2px }
  .cal-cell { width:8px;height:8px;border-radius:2px }
  .sp-live { align-items:flex-start }
}

/* ========== Theme buttons ========== */
.theme-buttons { display:flex;align-items:center;gap:6px }
.theme-btn {
  background:var(--chip);border:1px solid var(--border2);color:var(--muted);
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.08em;
  padding:6px 12px;border-radius:7px;cursor:pointer;text-transform:uppercase;white-space:nowrap;
  transition:border-color 0.15s,color 0.15s;
}
.theme-btn.active { border-color:var(--num);color:var(--num);box-shadow:0 0 8px rgba(52,211,153,0.2) }
.theme-btn:hover { border-color:var(--muted);color:var(--text) }

/* ========== Console-only elements (hidden by default) ========== */
.console-only { display:none !important }

/* ========== Console theme ========== */
body.console {
  --bg:#0C1117;--panel:#0C1117;--panel2:#0C1117;
  --border:rgba(0,255,65,0.08);--border2:rgba(0,255,65,0.18);
  --text:#00ff41;--muted:#338a3e;--dim:#1f5c28;
  --num:#00ff41;--green:#00ff41;--amber:#FFD93D;--orange:#FF8C00;
  --red:#FF4444;--gray:#4a6a3a;--chip:#0f1a14;
  --grid:rgba(0,255,65,0.04);--ecg:#00ff41;--glow:rgba(0,255,65,0.3);
}

/* Force monospace, kill letter-spacing */
body.console,
body.console .patient-name,body.console .alert-title,body.console .about-title,
body.console .organs-title,body.console .health-label,body.console .vital-note,
body.console .vital-status,body.console .status-label,body.console .status-sub,
body.console .service-name,body.console .rss-btn,body.console .alert-sub,
body.console .about-text { font-family:'IBM Plex Mono',monospace;letter-spacing:0 }
body.console .container { gap:6px;max-width:960px }

/* Remove border-radius everywhere */
body.console .patient-header,body.console .ecg-strip,body.console .vital-card,
body.console .health-card,body.console .organ-group,body.console .alert-section,
body.console .share-section,body.console .about-section,body.console #incident-banner,
body.console .status-pill,body.console .vital-abbr,body.console .health-bar-wrap,
body.console #health-bar,body.console .share-btn,body.console .share-preview,
body.console .rss-btn,body.console .lang-select,body.console .theme-btn,
body.console .history-card,body.console .period-btn,body.console #history-tooltip,
body.console .sp-header,body.console .sp-card,body.console .sp-badge,
body.console .inc-badge,body.console .seo-footer,body.console .cal-cell { border-radius:0 }

/* Console: service page + seo footer */
body.console .sp-header,body.console .sp-card,body.console .seo-footer {
  background:transparent;border:1px solid var(--border2);
}
body.console .vitals-grid.sp-stats { order:0 } /* cancel the dashboard's vitals-grid reordering */
body.console .sp-h1,body.console .sp-h2,body.console .related-label { letter-spacing:0 }

/* Console: history card restyle */
body.console .history-card { background:transparent;border:1px solid var(--border2);padding:10px 12px 8px }
body.console .history-label { letter-spacing:0;font-size:12px }
body.console .period-btn { letter-spacing:0;background:transparent }
body.console .period-btn.active { border-color:#00ff41;color:#00ff41;box-shadow:none }
body.console #history-canvas { height:140px }

/* Hide medical-specific elements */
body.console .patient-header,
body.console .ecg-strip,
body.console .share-section,
body.console .about-section,
body.console .alert-section,
body.console .footer,
body.console #incident-banner { display:none !important }

/* Show console-only elements */
body.console .console-only { display:block !important }
body.console .console-header { display:flex !important }

/* Reorder: health before vitals in console */
body.console .console-health-label { order:3 }
body.console .health-card { order:4 }
body.console .history-card { order:4 }
body.console .console-div-vitals { order:5 }
body.console .console-vitals-label { order:6 }
body.console .vitals-grid { order:7 }
body.console .console-div-organs { order:8 }
body.console .organs-section { order:9 }
body.console .console-footer { order:10 }

/* Console header */
.console-header {
  align-items:center;justify-content:space-between;
  border:none;border-bottom:1px solid var(--border2);
  padding:4px 0 6px;margin-bottom:2px;
  font-family:'IBM Plex Mono',monospace;font-size:12px;
  letter-spacing:0;color:var(--muted);
}
.console-title { color:var(--muted) }
.console-live { color:var(--dim);white-space:nowrap }
.console-live-dot { color:var(--green);margin-right:4px }

/* Console prompt */
.console-prompt {
  font-family:'IBM Plex Mono',monospace;font-size:13px;padding:2px 0;color:var(--dim);
  letter-spacing:0;line-height:1.4;
}
.prompt-user,.prompt-host { color:var(--green);font-weight:600 }
.prompt-path { color:#5C9DFF }
.prompt-cmd { color:var(--text) }

/* Console section labels */
.console-section-label {
  font-family:'IBM Plex Mono',monospace;font-size:12px;
  letter-spacing:0;text-transform:uppercase;
  color:var(--muted);padding:4px 0 0;
}

/* Console dividers */
.console-divider { border:none;border-top:1px solid var(--border2);margin:6px 0 }

/* Console: health card restyle */
body.console .health-card {
  background:transparent;border:none;padding:0;
  grid-template-columns:1fr;gap:4px;
}
body.console #health-score { font-size:32px;letter-spacing:0 }
body.console .health-pct { font-size:16px }
body.console .health-label { display:none }
body.console .health-right { display:none }
body.console .health-left { gap:4px }

/* Console: vital cards */
body.console .vital-card {
  background:transparent;border:1px solid var(--border2);
  min-height:auto;padding:10px 12px 8px;gap:6px;
}
body.console .vital-indicator { display:none }
body.console .vital-value { font-size:24px;letter-spacing:0 }
body.console .vital-abbr { letter-spacing:0;border-color:var(--border2);background:transparent;padding:2px 6px;font-size:11px }
body.console .vital-status { letter-spacing:0;font-size:11px }
body.console .vital-unit { font-size:11px }

/* Console: organs section */
body.console .organs-section { margin-top:0 }
body.console .organs-header { border-bottom:none;padding-bottom:0 }
body.console .organs-meta { display:none }
body.console .organs-title { font-size:12px;letter-spacing:0 }
body.console #services-grid { grid-template-columns:1fr;gap:0 }
body.console .organ-group { background:transparent;border:none;padding:0 }
body.console .organ-group-header { display:none }
body.console .service-row {
  display:grid;
  grid-template-columns:110px 44px 140px 60px 60px 100px auto;
  gap:4px;padding:2px 0;font-size:12px;align-items:baseline;
}
body.console .service-dot { display:none }

/* Console: status badge */
.service-badge {
  display:none;font-family:'IBM Plex Mono',monospace;font-size:11px;
  font-weight:600;letter-spacing:0;padding:0 4px;
}
body.console .service-badge { display:inline-block }
body.console .service-name { font-size:12px;font-weight:600 }
body.console .service-ms { font-size:12px;text-align:right }
body.console .service-weight { font-size:12px;text-align:right }
.service-ts { display:none;font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--dim) }
body.console .service-ts { display:inline }
.service-uptime { display:none;font-family:'IBM Plex Mono',monospace;font-size:12px;white-space:nowrap }
body.console .service-uptime { display:inline }
.service-status-text {
  display:none;font-family:'IBM Plex Mono',monospace;font-size:12px;
}
body.console .service-status-text { display:inline }

/* Console: show more link */
.console-services-more {
  display:none;font-family:'IBM Plex Mono',monospace;
  font-size:12px;color:var(--dim);padding:4px 0;
}
body.console .console-services-more { display:block }

/* Console footer */
.console-footer-info {
  font-family:'IBM Plex Mono',monospace;font-size:12px;
  letter-spacing:0;color:var(--muted);text-transform:uppercase;
}
.console-cursor { animation:iv-blink 1s step-end infinite;margin-left:2px }

/* Console: hide brand sub, restyle brand */
body.console .brand-sub { display:none }
body.console .brand-name { color:var(--dim);font-size:10px;letter-spacing:0;font-weight:400 }

/* Console: theme button active style */
body.console .theme-btn.active {
  border-color:#00ff41;color:#00ff41;box-shadow:none
}
body.console .theme-btn { letter-spacing:0 }

/* Console: ASCII health bar */
.console-ascii-bar {
  font-family:'IBM Plex Mono',monospace;font-size:13px;
  letter-spacing:0;white-space:pre;line-height:1.4;
}

/* Console: syslog section */
.console-syslog { order:11 }
.console-syslog-header {
  font-family:'IBM Plex Mono',monospace;font-size:12px;
  color:var(--dim);padding:2px 0;letter-spacing:0;
}
.console-syslog-lines {
  font-family:'IBM Plex Mono',monospace;font-size:12px;
  line-height:1.6;color:var(--muted);letter-spacing:0;
  white-space:pre-wrap;word-break:break-all;
}
.syslog-ts { color:var(--dim) }
.syslog-host { color:var(--green) }
.syslog-ok { color:var(--green) }
.syslog-warn { color:var(--amber) }
.syslog-err { color:var(--red) }

/* Console: health bar text overlay (unused now) */
.health-bar-text { display:none }

@media(max-width:900px) {
  body.console .service-row {
    grid-template-columns:44px 1fr auto auto auto;
  }
  body.console .service-ts { display:none !important }
  body.console .service-uptime { display:none !important }
}
@media(max-width:768px) {
  .console-header { flex-direction:column;gap:4px }
  .theme-buttons { flex-wrap:wrap }
}
@media(max-width:480px) {
  body.console .vitals-grid { grid-template-columns:repeat(2,1fr) }
}
