:root {
  color-scheme: dark;
  --canvas: #121212;
  --canvas-deep: #090909;
  --surface: #1b1b1b;
  --surface-raised: #232323;
  --surface-soft: #272727;
  --border: #303030;
  --border-strong: #3d3d3d;
  --text: #ffffff;
  --text-secondary: #b4b4b4;
  --text-muted: #858585;
  --gold: #ffc629;
  --gold-hover: #f5b400;
  --gold-soft: rgba(255, 198, 41, .12);
  --green: #29d17f;
  --green-soft: rgba(41, 209, 127, .12);
  --red: #ff5a5a;
  --red-soft: rgba(255, 90, 90, .12);
  --amber: #ffb020;
  --amber-soft: rgba(255, 176, 32, .12);
  --blue: #4aa8ff;
  --radius-control: 13px;
  --radius-card: 20px;
  --radius-modal: 24px;
  --shadow-card: 0 18px 60px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .035);
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -12%, rgba(255, 198, 41, .09), transparent 62%),
    radial-gradient(740px 420px at 93% 12%, rgba(41, 209, 127, .035), transparent 70%),
    linear-gradient(180deg, #101010 0%, #121212 55%, #0f0f0f 100%);
}
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 45%);
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 198, 41, .35);
  border-radius: 11px;
  background: var(--gold);
  box-shadow: 0 8px 28px rgba(255, 198, 41, .18);
  color: #171100;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 900;
}
.brand-mark-large {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  font-size: 28px;
}

/* Login */
.login-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 440px);
  align-items: center;
  gap: clamp(56px, 9vw, 130px);
  padding: 48px 0;
}
.login-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 18px;
}
.login-brand span {
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -.045em;
}
.login-brand small {
  grid-column: 2;
  margin-top: -7px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.login-card {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-modal);
  background: rgba(27, 27, 27, .94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .045);
}
.login-card::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -80px;
  top: -110px;
  border-radius: 50%;
  background: rgba(255, 198, 41, .13);
  filter: blur(40px);
}
.login-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}
.login-card h1 {
  margin: 0 0 9px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.login-card > p {
  margin: 0 0 28px;
  color: var(--text-secondary);
  font-size: 14px;
}
.login-card label {
  display: block;
  margin-bottom: 8px;
  color: #d7d7d7;
  font-size: 12px;
  font-weight: 650;
}
.password-field { position: relative; }
.password-field input {
  width: 100%;
  height: 50px;
  padding: 0 52px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  outline: none;
  background: #141414;
  color: var(--text);
  transition: border-color .18s, box-shadow .18s;
}
.password-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 198, 41, .10);
}
.password-field input::placeholder { color: #686868; }
.password-toggle {
  position: absolute;
  right: 5px;
  top: 5px;
}
.login-submit { width: 100%; margin-top: 14px; }
.login-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--red);
  font-size: 12px;
  text-align: center;
}
.login-footnote {
  margin-top: 18px;
  color: #666;
  font-size: 10px;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

/* Buttons */
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: background .16s, border-color .16s, color .16s, transform .16s, opacity .16s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .62; }
.button-primary {
  background: var(--gold);
  color: #181200;
  box-shadow: 0 8px 25px rgba(255, 198, 41, .13);
}
.button-primary:hover:not(:disabled) { background: var(--gold-hover); }
.button-secondary {
  border-color: var(--border);
  background: var(--surface-raised);
  color: #e8e8e8;
}
.button-secondary:hover:not(:disabled) { border-color: #4a4a4a; background: #292929; }
.button-ghost { border-color: var(--border); background: transparent; color: var(--text-secondary); }
.button-ghost:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.button-icon, [data-icon] { display: inline-grid; place-items: center; }
.button-icon svg, [data-icon] svg, .icon-button svg { width: 18px; height: 18px; }
.button-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.button.is-loading .button-icon { display: none; }
.button.is-loading .button-loader, .button-loader.is-visible { display: inline-block; }
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-button:hover { border-color: var(--border); background: var(--surface-raised); color: var(--text); }
.text-button { margin-left: auto; padding: 6px 10px; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; }
.text-button:hover { color: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(18, 18, 18, .90);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  width: min(1580px, calc(100% - 48px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-copy { display: flex; align-items: baseline; gap: 7px; }
.brand-copy strong { font-size: 14px; letter-spacing: -.01em; }
.brand-copy small { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.live-state {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
}
.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-dot-online { background: var(--green); box-shadow: 0 0 0 4px rgba(41, 209, 127, .09); }
.status-dot-warning { background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 176, 32, .08); }
.status-dot-offline { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 90, 90, .08); }

/* Main */
.page { width: min(1580px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 30px; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 27px;
}
.eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.page-heading h1, .section-heading h2 { margin: 0; letter-spacing: -.045em; }
.page-heading h1 { font-size: clamp(30px, 3vw, 44px); line-height: 1; }
.page-heading p { margin: 12px 0 0; color: var(--text-secondary); font-size: 13px; }
.health-summary {
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(27, 27, 27, .72);
}
.health-orb {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 9px solid var(--green-soft);
  border-radius: 50%;
  background: var(--green);
}
.health-summary small { display: block; margin-bottom: 2px; color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.health-summary strong { font-size: 13px; }
.health-summary.is-warning .health-orb { border-color: var(--amber-soft); background: var(--amber); }
.health-summary.is-danger .health-orb { border-color: var(--red-soft); background: var(--red); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--gold);
}
.metric-label { color: var(--text-muted); font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.metric-value { margin-top: 18px; font-family: var(--mono); font-size: 29px; font-weight: 750; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metric-detail { min-height: 17px; margin-top: 3px; color: var(--text-secondary); font-size: 11px; }
.progress {
  height: 5px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 999px;
  background: #2b2b2b;
}
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--gold); transition: width .45s ease; }
.progress-bar.is-success { background: var(--green); }
.progress-bar.is-warning { background: var(--amber); }
.progress-bar.is-danger { background: var(--red); }
.metric-skeleton, .loading-card {
  min-height: 154px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: linear-gradient(100deg, #1a1a1a 25%, #232323 45%, #1a1a1a 65%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position-x: -220%; } }

/* Applications */
.apps-section { margin-top: 58px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.section-heading h2 { font-size: 29px; }
.section-heading p { margin: 7px 0 0; color: var(--text-muted); font-size: 12px; }
.search-box {
  width: min(290px, 100%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text-muted);
}
.search-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 198, 41, .08); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-box input::placeholder { color: #747474; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(390px, 1fr)); align-items: start; gap: 18px; }
.loading-card { grid-column: 1 / -1; min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-secondary); font-size: 13px; }
.app-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color .18s, transform .18s;
}
.app-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.app-card.is-filtered { display: none; }
.app-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 198, 41, .10), transparent 32%),
    linear-gradient(145deg, #161616, #0b0b0b);
}
.app-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 35%, transparent 54%, rgba(0, 0, 0, .74));
}
.app-preview img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.005); transition: opacity .25s, transform .35s; }
.app-preview img.is-loaded { opacity: 1; }
.app-card:hover .app-preview img.is-loaded { transform: scale(1.025); }
.preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  color: var(--text-muted);
  text-align: center;
}
.preview-placeholder .brand-mark { opacity: .72; }
.preview-placeholder strong { color: var(--text-secondary); font-size: 12px; }
.preview-placeholder span:last-child { max-width: 250px; font-size: 11px; }
.preview-status {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(9, 9, 9, .78);
  backdrop-filter: blur(10px);
  color: #e7e7e7;
  font-size: 10px;
  font-weight: 700;
}
.preview-status.is-online { border-color: rgba(41, 209, 127, .35); color: #8ceab9; }
.preview-status.is-warning { border-color: rgba(255, 176, 32, .4); color: #ffd17e; }
.preview-status.is-danger { border-color: rgba(255, 90, 90, .4); color: #ff9b9b; }
.preview-bottom {
  position: absolute;
  z-index: 3;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.capture-age { color: rgba(255, 255, 255, .78); font-size: 10px; text-shadow: 0 2px 9px #000; }
.open-app {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 10px;
  background: var(--gold);
  color: #171100;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}
.open-app:hover { background: var(--gold-hover); }
.app-content { padding: 18px; }
.app-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.app-heading h3 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.app-description { margin: 5px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.app-domain { display: block; margin-top: 8px; color: var(--text-secondary); font-size: 10px; text-decoration: none; }
.app-domain:hover { color: var(--gold); }
.service-count { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); font-family: var(--mono); font-size: 9px; }
.containers { display: grid; gap: 7px; }
.container-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 56px auto auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid #2a2a2a;
  border-radius: 13px;
  background: #171717;
}
.spark { width: 56px; height: 24px; display: block; opacity: .92; }
.pm2-row { grid-template-columns: minmax(120px, 1fr) auto; }
.container-main { min-width: 0; display: flex; align-items: center; gap: 9px; }
.container-copy { min-width: 0; }
.container-name { overflow: hidden; color: #e9e9e9; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.container-meta { overflow: hidden; margin-top: 3px; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.container-metrics { display: flex; gap: 5px; }
.metric-chip { padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-secondary); font-family: var(--mono); font-size: 8px; white-space: nowrap; }
.container-actions { display: flex; gap: 3px; }
.action-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}
.action-button svg { width: 15px; height: 15px; }
.action-button:hover { border-color: var(--border); background: var(--surface-soft); color: var(--text); }
.action-button[data-a="stop"]:hover { border-color: rgba(255, 90, 90, .35); background: var(--red-soft); color: var(--red); }
.action-button.is-armed { border-color: rgba(255, 176, 32, .45); background: var(--amber-soft); color: var(--amber); animation: armed 1s ease-in-out infinite alternate; }
.action-button:disabled { cursor: wait; opacity: .45; }
@keyframes armed { to { box-shadow: 0 0 0 3px rgba(255, 176, 32, .08); } }
.pm2-note {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 176, 32, .2);
  border-radius: 11px;
  background: var(--amber-soft);
  color: #d8b67c;
  font-size: 10px;
  line-height: 1.45;
}
.empty-search {
  grid-column: 1 / -1;
  padding: 48px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  color: var(--text-muted);
  text-align: center;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
}
.modal-panel {
  width: min(100%, 480px);
  max-height: min(90vh, 820px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-modal);
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .58);
}
.modal-panel-logs { width: min(100%, 980px); display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.modal-header .eyebrow { margin-bottom: 4px; }
.modal-header h3 { margin: 0; font-size: 17px; }
.modal-close::before, .modal-close::after { content: ""; position: absolute; width: 16px; height: 1.5px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }
.modal-close { position: relative; }
.log-toolbar { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 22px; border-bottom: 1px solid #242424; background: #111; color: var(--text-muted); font-size: 10px; }
#log-body {
  min-height: 420px;
  max-height: 65vh;
  margin: 0;
  overflow: auto;
  padding: 17px 20px 30px;
  background: #080808;
  color: #c7c7c7;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-color: #383838 transparent;
}
.modal-body { padding: 22px; }
.modal-intro { margin: 0 0 21px; color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.field-label { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; color: #e5e5e5; font-size: 12px; font-weight: 700; }
.field-label span { color: var(--text-muted); font-size: 10px; font-weight: 500; }
.field-label-spaced { margin-top: 20px; }
.field-input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 11px; outline: none; background: #141414; color: var(--text); }
.field-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 198, 41, .08); }
.field-hint { min-height: 15px; margin-top: 6px; color: var(--text-muted); font-size: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 22px 22px; }

/* Toasts/footer */
.toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast {
  width: min(370px, calc(100vw - 40px));
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: #202020;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .48);
  color: #e8e8e8;
  font-size: 12px;
  line-height: 1.45;
  animation: toast-in .2s ease-out;
}
.toast-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--gold-soft); color: var(--gold); }
.toast.is-error .toast-icon { background: var(--red-soft); color: var(--red); }
.toast.is-success .toast-icon { background: var(--green-soft); color: var(--green); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding: 20px 2px 0; border-top: 1px solid var(--border); color: #666; font-size: 10px; }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell { grid-template-columns: 1fr; justify-items: center; gap: 35px; }
  .login-brand { display: none; }
  .login-card { width: min(440px, 100%); }
}

@media (max-width: 720px) {
  .topbar-inner, .page { width: min(100% - 30px, 1580px); }
  .topbar-inner { height: 66px; }
  .brand-copy small, .live-state { display: none; }
  .button-secondary .button-label { display: none; }
  .button-secondary { width: 44px; padding: 0; }
  .page { padding-top: 34px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .health-summary { width: 100%; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .apps-grid { grid-template-columns: 1fr; }
  .modal { align-items: end; padding: 0; }
  .modal-panel { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; }
  #log-body { min-height: 55dvh; max-height: 70dvh; }
  .footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .login-shell { width: calc(100% - 28px); }
  .login-card { padding: 26px 20px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 138px; }
  .app-content { padding: 14px; }
  .container-row { grid-template-columns: minmax(0, 1fr) auto; }
  .spark { display: none; }
  .container-metrics { grid-column: 1; padding-left: 17px; }
  .container-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; }
  .app-heading { flex-direction: column; }
  .service-count { align-self: flex-start; }
  .modal-actions { flex-direction: column; }
  .modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
