:root {
  color-scheme: light;
  --bg: #f2f4f7;
  --panel: #ffffff;
  --line: #d9e0ea;
  --text: #172033;
  --muted: #5f6b7b;
  --blue: #174ea6;
  --blue-soft: #e8f0fe;
  --green: #1d7f48;
  --amber: #a86400;
  --red: #b42318;
  --unknown: #586174;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.drawer-toggle { position: fixed; opacity: 0; pointer-events: none; }
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: 320px;
  padding: 0 16px 22px;
  background: #0b1424;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  color: white;
  transform: translateX(-100%);
  transition: transform 180ms ease;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.34);
}
#sidebar-drawer:checked ~ .sidebar { transform: translateX(0); }
.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  margin: 0 -16px 16px;
  padding: 0 18px 0 24px;
}
.sidebar-brand { color: white; font-weight: 900; font-size: 20px; letter-spacing: 0; }
.sidebar-close {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
}
.sidebar-close:hover { background: rgba(148, 163, 184, 0.12); }
.sidebar-close span {
  position: absolute;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: #dbe6f5;
}
.sidebar-close span:first-child { transform: rotate(45deg); }
.sidebar-close span:last-child { transform: rotate(-45deg); }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #dbe6f5;
  font-weight: 750;
}
.sidebar nav a:hover { background: rgba(13, 110, 253, 0.16); color: white; text-decoration: none; }
.sidebar-overlay {
  z-index: 35;
}
#sidebar-drawer:checked ~ .sidebar-overlay { display: block; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: #101827;
  color: white;
}
.topbar-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.sidebar-toggle-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  cursor: pointer;
}
.sidebar-toggle-button:hover { background: rgba(148, 163, 184, 0.12); }
.sidebar-toggle-button span { width: 16px; height: 2px; border-radius: 999px; background: #dbe6f5; }
.brand { color: white; font-weight: 900; letter-spacing: 0; }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  color: #9fb0c8;
  font-weight: 700;
  margin-left: 8px;
  padding-left: 18px;
  border-left: 1px solid rgba(148, 163, 184, 0.24);
}
.breadcrumbs a { color: #dbe6f5; }
.breadcrumbs span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: white;
}
.topbar a { color: #dbe6f5; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-link { font-weight: 800; }
.account-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
}
.account-trigger:hover { background: rgba(148, 163, 184, 0.12); }
.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #0d6efd;
  color: white;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(13, 110, 253, 0.26);
}
.account-overlay,
.logout-overlay {
  z-index: 80;
}
.account-drawer,
.logout-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(430px, 100vw);
  background: #f5f7fb;
  color: #172033;
  border-left: 4px solid #0d6efd;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.34);
  transform: translateX(100%);
  transition: transform 190ms ease;
}
.logout-overlay { z-index: 100; }
.logout-drawer {
  z-index: 110;
  border-left-color: var(--red);
}
#account-drawer:checked ~ .account-overlay,
#logout-confirm-drawer:checked ~ .logout-overlay {
  display: block;
}
#account-drawer:checked ~ .account-drawer,
#logout-confirm-drawer:checked ~ .logout-drawer {
  transform: translateX(0);
}
.account-drawer-header {
  height: 64px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #d9e0ea;
}
.account-drawer-header h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}
.drawer-close {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
}
.drawer-close:hover { background: #e8edf5; }
.drawer-close span {
  position: absolute;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #344258;
}
.drawer-close span:first-child { transform: rotate(45deg); }
.drawer-close span:last-child { transform: rotate(-45deg); }
.account-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}
.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d9e0ea;
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 22px rgba(16, 24, 39, 0.06);
}
.account-card-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #0d6efd;
  color: white;
  font-size: 14px;
  font-weight: 900;
}
.account-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.account-card-copy strong,
.account-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-card-copy span { color: #66758a; font-size: 12px; }
.drawer-kicker {
  margin: 18px 4px 12px;
  color: #7a8798;
  font-size: 10px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.drawer-action-list {
  display: grid;
  gap: 10px;
}
.drawer-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid #d9e0ea;
  border-radius: 14px;
  background: white;
  color: #172033;
  cursor: pointer;
  text-align: left;
}
.drawer-action:hover {
  border-color: rgba(13, 110, 253, 0.45);
  background: #f2f7ff;
  text-decoration: none;
}
.drawer-action.danger:hover {
  border-color: rgba(180, 35, 24, 0.38);
  background: #fff3f2;
}
.drawer-action-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e8f0fe;
  color: #0d6efd;
  font-weight: 900;
}
.drawer-action.danger .drawer-action-icon {
  background: #ffe7e5;
  color: var(--red);
}
.drawer-action span:nth-child(2) {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.drawer-action strong { font-size: 14px; }
.drawer-action small {
  color: #66758a;
  font-size: 11px;
  line-height: 1.25;
}
.drawer-action b {
  color: #94a1b3;
  font-size: 22px;
  line-height: 1;
}
.account-drawer-footer {
  flex: 0 0 auto;
  padding: 12px;
  border-top: 1px solid #d9e0ea;
  background: white;
}
.logout-drawer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}
.logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: #ffe7e5;
  color: var(--red);
  font-size: 34px;
  font-weight: 900;
}
.logout-drawer-body h3 {
  margin: 0;
  font-size: 22px;
}
.logout-drawer-body p {
  max-width: 300px;
  margin: 0;
  color: #66758a;
}
.logout-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: white;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(23, 78, 166, 0.20), transparent 34rem),
    #eef2f6;
  color: #172033;
}
.auth-card {
  width: min(410px, 100%);
  padding: 24px;
  border: 1px solid #d9e0ea;
  border-radius: 14px;
  background: white;
  box-shadow: 0 18px 50px rgba(16, 24, 39, 0.12);
}
.auth-brand {
  color: #101827;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}
.auth-subtitle {
  margin: 8px auto 20px;
  max-width: 300px;
  color: #66758a;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.auth-form {
  display: grid;
  gap: 12px;
}
.auth-form p {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #172033;
}
.auth-form label {
  color: #526173;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-form input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #bdc7d4;
  border-radius: 10px;
  background: white;
  color: #172033;
  font: inherit;
}
.auth-form input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.14);
  outline: none;
}
.auth-form button {
  min-height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: #0d6efd;
  color: white;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(13, 110, 253, 0.22);
}
.auth-form .errorlist {
  margin: 0;
  padding-left: 18px;
  color: var(--red);
  font-size: 13px;
}
.microsoft-login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #bdc7d4;
  border-radius: 10px;
  background: #172033;
  color: white;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(16, 24, 39, 0.16);
}
.microsoft-login-button:hover {
  background: #101827;
}
.microsoft-mark {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 2px;
}
.microsoft-mark span {
  display: block;
  width: 9px;
  height: 9px;
}
.microsoft-mark span:nth-child(1) { background: #f25022; }
.microsoft-mark span:nth-child(2) { background: #7fba00; }
.microsoft-mark span:nth-child(3) { background: #00a4ef; }
.microsoft-mark span:nth-child(4) { background: #ffb900; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #66758a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d9e0ea;
}
.link-button { background: transparent; color: #dbe6f5; border: 0; cursor: pointer; font: inherit; }
.page { max-width: 1400px; margin: 0 auto; padding: 28px 32px 40px; }
.page-header, .section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
h1 { margin: 0; font-size: 28px; }
h2 { margin: 0 0 12px; font-size: 20px; }
p { color: var(--muted); }
.section { margin-top: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.status-card { display: grid; gap: 6px; min-height: 132px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-left-width: 6px; border-radius: 8px; color: var(--text); }
.status-card.green { border-left-color: var(--green); }
.status-card.amber { border-left-color: var(--amber); }
.status-card.red { border-left-color: var(--red); }
.status-card.unknown { border-left-color: var(--unknown); }
.status-card span, .status-card small { color: var(--muted); }
.status-card em { font-style: normal; font-weight: 800; }
.summary-strip { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.summary-strip div, .facts div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 5px; box-shadow: 0 1px 2px rgba(16, 24, 39, 0.03); }
.summary-strip .badge { width: 100%; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.facts strong, .summary-strip strong { font-size: 11px; color: #526173; text-transform: uppercase; }
.facts span, .summary-strip span { font-size: 15px; }
.tabs { display: inline-flex; gap: 2px; align-items: center; max-width: 100%; padding: 4px; background: #e7ecf3; border: 1px solid #d2dbe8; border-radius: 8px; margin: 0 0 22px; }
.tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 14px; border-radius: 6px; color: #526173; font-weight: 800; }
.tabs a.active { background: var(--panel); color: var(--blue); box-shadow: 0 1px 2px rgba(16, 24, 39, 0.10); }
.tabs a:hover { text-decoration: none; color: var(--text); background: rgba(255, 255, 255, 0.58); }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; background: #f9fafc; }
.badge { display: inline-flex; align-items: center; min-width: 64px; justify-content: center; padding: 3px 8px; border-radius: 999px; color: white; font-size: 12px; font-weight: 800; text-transform: capitalize; }
.badge.green, .badge.info { background: var(--green); }
.badge.amber, .badge.warning { background: var(--amber); }
.badge.red, .badge.error, .badge.critical { background: var(--red); }
.badge.unknown, .badge.debug { background: var(--unknown); }
.button, button.primary, button.danger { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line); background: white; color: var(--text); font-weight: 700; cursor: pointer; }
button.primary { background: var(--blue); border-color: var(--blue); color: white; }
button.danger { background: var(--red); border-color: var(--red); color: white; }
.actions { display: flex; gap: 8px; align-items: center; }
.form-panel { max-width: 840px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.form-panel p { display: grid; gap: 6px; margin: 0 0 14px; color: var(--text); }
.form-panel input, .form-panel select, .form-panel textarea, .filters input, .filters select { width: 100%; padding: 9px 10px; border: 1px solid #bdc7d4; border-radius: 6px; font: inherit; }
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(160px, 220px)) auto; gap: 10px; margin-bottom: 16px; align-items: end; }
.messages { margin-bottom: 16px; }
.message { background: #e8f2ff; border: 1px solid #bcd5ff; padding: 10px 12px; border-radius: 8px; }
.log-message { max-width: 760px; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 800px) {
  .sidebar { width: min(320px, 86vw); }
  .topbar { padding: 0 14px; }
  .brand { display: none; }
  .breadcrumbs { margin-left: 0; padding-left: 0; border-left: 0; }
  .page { padding: 16px; }
  .summary-strip, .facts { grid-template-columns: 1fr; }
  .tabs { display: flex; width: 100%; overflow-x: auto; }
  .tabs a { flex: 1 0 auto; }
  .page-header, .section-header { align-items: flex-start; flex-direction: column; }
  .filters { grid-template-columns: 1fr; }
}

body.server-detail-shell {
  background:
    radial-gradient(circle at 20% 0%, rgba(23, 78, 166, 0.28), transparent 34rem),
    linear-gradient(135deg, #07111f 0%, #0c1728 42%, #07111f 100%);
  color: #eef5ff;
}

body.server-detail-shell .topbar {
  background: rgba(7, 17, 31, 0.86);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

body.server-detail-shell .page {
  max-width: 1320px;
}

.server-page {
  display: grid;
  gap: 14px;
}

.server-breadcrumb {
  display: flex;
  gap: 10px;
  color: #9fb0c8;
  font-size: 14px;
}

.server-breadcrumb a {
  color: #cbd7ea;
}

.server-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: -6px;
}

.server-context {
  margin: 0;
  color: #9fb0c8;
  font-weight: 700;
}

.server-title-line {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-title-line h1 {
  color: white;
  font-size: 40px;
  letter-spacing: 0;
}

.server-hero p {
  margin: 8px 0 0;
  color: #b9c6d9;
}

.server-hero p span {
  margin: 0 8px;
  color: #738399;
}

.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.8);
}

.online-label {
  color: #d9e7f7;
  font-weight: 700;
}

.server-detail-shell .button,
.server-detail-shell button.primary {
  min-height: 46px;
  padding: 10px 18px;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 26, 44, 0.72);
  color: #eef5ff;
}

.server-detail-shell .button.compact,
.server-detail-shell button.primary.compact {
  min-height: 36px;
  padding: 8px 13px;
}

.server-detail-shell button.primary {
  background: #0d6efd;
  border-color: #0d6efd;
  color: white;
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.28);
}

.server-detail-shell .button.ghost {
  background: rgba(15, 26, 44, 0.58);
}

.health-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(260px, auto);
  grid-template-areas: "identity actions meta";
  gap: 16px;
  align-items: center;
  padding: 22px 30px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(17, 92, 63, 0.38), rgba(12, 31, 48, 0.82));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.health-identity {
  display: grid;
  gap: 8px;
  grid-area: identity;
}

.health-identity strong {
  color: white;
  font-size: 30px;
  line-height: 1.1;
}

.health-identity span {
  color: #b9c6d9;
}

.health-identity b {
  margin: 0 8px;
  color: #708197;
  font-weight: 400;
}

.health-meta {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  grid-area: meta;
}

.health-meta div {
  display: grid;
  gap: 3px;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 26, 44, 0.64);
}

.health-meta strong {
  color: #9fb0c8;
  font-size: 11px;
  text-transform: uppercase;
}

.health-meta span {
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.health-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
  white-space: nowrap;
  grid-area: actions;
}

.health-actions form {
  margin: 0;
}

.application-control-panel form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(15, 26, 44, 0.4);
}

.application-control-panel .icon-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 8px;
}

.application-control-panel .icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 26, 44, 0.72);
  color: #eef5ff;
  cursor: pointer;
}

.icon-button.ghost {
  background: rgba(15, 26, 44, 0.58);
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(203, 215, 234, 0.44);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button .fa-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.icon-button .fa-play {
  width: 13px;
}

.icon-button .icon-fallback {
  display: none;
  color: currentColor;
  font-size: 15px;
  line-height: 1;
}

.icon-button .icon-fallback {
  display: inline-flex;
}

.icon-button .fa-play {
  display: none;
}


.health-inputs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.health-inputs span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 26, 44, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.server-tabs {
  width: fit-content;
  background: rgba(15, 26, 44, 0.78);
  border-color: rgba(148, 163, 184, 0.20);
  margin-bottom: 4px;
}

.server-tabs a {
  color: #aebdd0;
}

.server-tabs a.active {
  color: white;
  background: rgba(13, 110, 253, 0.22);
  box-shadow: inset 0 -2px 0 #0d6efd;
}

.monitor-panel {
  padding: 20px 20px 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(9, 20, 36, 0.70);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.monitor-panel h2 {
  color: white;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(20, 34, 55, 0.92), rgba(12, 24, 42, 0.92));
}

.metric-card strong {
  color: #cbd7ea;
}

.metric-card span {
  color: white;
  font-size: 28px;
  font-weight: 800;
}

.metric-card em,
.secondary-metrics span {
  font-style: normal;
  font-weight: 800;
}

.good { color: #4ade80; }
.warn { color: #fbbf24; }
.danger { color: #fb7185; }
.neutral { color: #d9e7f7; }

.metric-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.20);
}

.metric-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4ade80;
}

.metric-bar i.warn { background: #fbbf24; }
.metric-bar i.danger { background: #fb7185; }

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
}

.chart-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(20, 34, 55, 0.92), rgba(12, 24, 42, 0.92));
}

.chart-card-header {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.chart-card-header strong {
  color: white;
  font-size: 16px;
}

.chart-card-header span {
  color: #9fb0c8;
  font-size: 13px;
}

.health-chart {
  min-height: 260px;
}

.secondary-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  background: rgba(15, 26, 44, 0.56);
}

.secondary-metrics div {
  display: grid;
  gap: 6px;
  padding: 0 18px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
}

.secondary-metrics div:last-child {
  border-right: 0;
}

.secondary-metrics strong {
  color: #aebdd0;
  font-size: 13px;
}

.server-page .table-wrap {
  background: rgba(11, 24, 42, 0.70);
  border-color: rgba(148, 163, 184, 0.18);
}

.server-page th {
  color: #aebdd0;
  background: rgba(22, 36, 57, 0.82);
}

.server-page td {
  color: #e5edf8;
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

.server-page .badge.green,
.server-page .badge.info {
  background: #0d6efd;
}

.server-page .log-message {
  color: #cbd7ea;
}

@media (max-width: 1100px) {
  .health-panel,
  .metric-grid,
  .chart-grid,
  .secondary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .secondary-metrics div {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    padding: 12px;
  }
}

@media (max-width: 760px) {
  .server-title-line h1 {
    font-size: 30px;
  }

  .server-hero,
  .metric-grid,
  .chart-grid,
  .secondary-metrics {
    grid-template-columns: 1fr;
  }

  .health-panel {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "identity actions"
      "meta meta";
  }

  .server-hero {
    display: grid;
  }

  .health-meta {
    justify-content: flex-start;
  }

  .health-actions {
    justify-content: flex-start;
  }
}

/* Unified AxialMonitor theme */
:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1a2c;
  --panel-strong: #101f35;
  --panel-soft: #13243b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #eef5ff;
  --muted: #a8b7cc;
  --blue: #2f80ff;
  --blue-soft: rgba(47, 128, 255, 0.12);
  --green: #33d17a;
  --amber: #f4b740;
  --red: #f87171;
  --unknown: #8792a6;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  --radius: 8px;
}

body,
body.server-detail-shell {
  min-height: 100vh;
  font-family: "Montserrat", "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% -10%, rgba(47, 128, 255, 0.20), transparent 34rem),
    linear-gradient(135deg, #07111f 0%, #0b1627 52%, #07111f 100%);
  color: var(--text);
}

a { color: #93c5fd; }
a:hover { color: white; }

.topbar,
body.server-detail-shell .topbar {
  height: 60px;
  background: rgba(7, 17, 31, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.sidebar-brand {
  color: white;
  font-weight: 900;
}

.breadcrumbs {
  color: var(--muted);
  border-left-color: var(--line);
}

.breadcrumbs a,
.topbar a {
  color: #dbeafe;
}

.account-avatar,
.account-card-avatar {
  background: linear-gradient(135deg, #0d6efd, #38bdf8);
  color: white;
}

.sidebar {
  background: #091426;
  border-right-color: var(--line);
}

.sidebar-header {
  border-bottom-color: var(--line);
}

.sidebar nav a {
  border: 1px solid transparent;
  color: #cbd7ea;
}

.sidebar nav a:hover {
  border-color: rgba(147, 197, 253, 0.20);
  background: rgba(47, 128, 255, 0.12);
}

.page,
body.server-detail-shell .page {
  max-width: 1360px;
  padding-top: 24px;
}

.page-header {
  padding: 18px 0 4px;
}

h1,
h2,
.page-header h1,
.monitor-panel h2 {
  color: white;
  font-family: "Raleway", "Montserrat", system-ui, sans-serif;
  font-weight: 800;
}

p,
.page-header p {
  color: var(--muted);
}

.section {
  margin-top: 20px;
}

.section-header {
  margin-bottom: 12px;
}

.button,
button.primary,
button.danger,
.server-detail-shell .button,
.server-detail-shell button.primary {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--text);
  box-shadow: none;
}

.button:hover,
button.primary:hover,
button.danger:hover {
  border-color: rgba(147, 197, 253, 0.38);
  background: #17304f;
  color: white;
  text-decoration: none;
}

button.primary,
.server-detail-shell button.primary {
  background: #0d6efd;
  border-color: #0d6efd;
  color: white;
  box-shadow: 0 12px 26px rgba(13, 110, 253, 0.22);
}

button.danger {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.34);
  color: #fecaca;
}

.grid {
  gap: 14px;
}

.status-card,
.summary-strip div,
.facts div,
.form-panel,
.table-wrap,
.monitor-panel,
.chart-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 26, 44, 0.84);
  color: var(--text);
  box-shadow: var(--shadow);
}

.status-card {
  min-height: 130px;
  border-left-width: 4px;
}

.status-card span,
.status-card small {
  color: var(--muted);
}

.status-card:hover {
  border-color: rgba(147, 197, 253, 0.35);
  background: rgba(16, 31, 53, 0.94);
  text-decoration: none;
}

.summary-strip strong,
.facts strong,
.health-meta strong,
.secondary-metrics strong {
  color: #9fb0c8;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.summary-strip span,
.facts span {
  color: var(--text);
}

.tabs,
.server-tabs {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 20, 36, 0.78);
}

.tabs a,
.server-tabs a {
  border-radius: 6px;
  color: #aebdd0;
}

.tabs a.active,
.server-tabs a.active {
  background: rgba(47, 128, 255, 0.22);
  color: white;
  box-shadow: inset 0 -2px 0 #2f80ff;
}

.tabs a:hover,
.server-tabs a:hover {
  background: rgba(47, 128, 255, 0.12);
  color: white;
}

th {
  color: #aebdd0;
  background: rgba(19, 36, 59, 0.92);
  border-bottom-color: var(--line);
}

td {
  color: #e5edf8;
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

tr:hover td {
  background: rgba(47, 128, 255, 0.04);
}

.badge {
  min-width: 58px;
  border-radius: 999px;
  font-weight: 900;
}

.badge.green,
.badge.info,
.server-page .badge.green,
.server-page .badge.info {
  background: #0d6efd;
}

.badge.red,
.badge.error,
.badge.critical {
  background: #dc3545;
}

.badge.amber,
.badge.warning {
  background: #c9891f;
}

.filters {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 26, 44, 0.78);
}

.form-panel input,
.form-panel select,
.form-panel textarea,
.filters input,
.filters select,
.auth-form input {
  border-color: rgba(148, 163, 184, 0.30);
  border-radius: var(--radius);
  background: rgba(7, 17, 31, 0.72);
  color: var(--text);
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus,
.filters input:focus,
.filters select:focus,
.auth-form input:focus {
  border-color: #2f80ff;
  box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.14);
  outline: none;
}

.form-panel label {
  color: #cbd7ea;
  font-weight: 800;
}

.message {
  border-color: rgba(47, 128, 255, 0.28);
  background: rgba(47, 128, 255, 0.12);
  color: #dbeafe;
}

.health-panel {
  border-color: rgba(51, 209, 122, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(19, 112, 82, 0.34), rgba(13, 26, 44, 0.92));
  box-shadow: var(--shadow);
}

.health-meta div,
.icon-button {
  border-color: var(--line);
  border-radius: var(--radius);
  background: rgba(7, 17, 31, 0.52);
}

.icon-button:hover {
  border-color: rgba(147, 197, 253, 0.38);
  background: rgba(47, 128, 255, 0.12);
}

.monitor-panel {
  padding: 20px;
}

.chart-card {
  background: rgba(16, 31, 53, 0.92);
}

.chart-card-header span,
.server-page .log-message {
  color: var(--muted);
}

.apexcharts-canvas,
.apexcharts-svg {
  background: transparent !important;
}

.account-drawer,
.logout-drawer,
.auth-card {
  background: var(--panel);
  color: var(--text);
  border-color: #2f80ff;
}

.logout-drawer {
  border-left-color: #dc3545;
}

.account-drawer-header,
.account-drawer-footer {
  background: rgba(13, 26, 44, 0.96);
  border-color: var(--line);
}

.account-drawer-header h2,
.logout-drawer-body h3,
.account-card-copy strong,
.drawer-action strong {
  color: white;
}

.account-drawer-body {
  background: rgba(7, 17, 31, 0.50);
}

.account-card,
.drawer-action {
  border-color: var(--line);
  border-radius: var(--radius);
  background: rgba(16, 31, 53, 0.86);
  color: var(--text);
}

.drawer-action:hover {
  border-color: rgba(147, 197, 253, 0.38);
  background: rgba(47, 128, 255, 0.12);
}

.drawer-action.danger:hover {
  border-color: rgba(248, 113, 113, 0.40);
  background: rgba(248, 113, 113, 0.10);
}

.drawer-action small,
.account-card-copy span,
.logout-drawer-body p,
.drawer-kicker {
  color: var(--muted);
}

.drawer-action-icon {
  border-radius: var(--radius);
  background: rgba(47, 128, 255, 0.14);
  color: #93c5fd;
}

.drawer-action.danger .drawer-action-icon,
.logout-icon {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

.drawer-close:hover {
  background: rgba(148, 163, 184, 0.12);
}

.drawer-close span {
  background: #dbe6f5;
}

.auth-shell {
  background:
    radial-gradient(circle at 50% -10%, rgba(47, 128, 255, 0.20), transparent 34rem),
    #07111f;
}

.auth-brand {
  color: white;
}

.auth-subtitle,
.auth-form label {
  color: var(--muted);
}

.auth-form p {
  color: var(--text);
}

.auth-form button {
  background: #0d6efd;
}

.health-identity strong {
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 1050px) {
  .health-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity actions"
      "meta meta";
  }

  .health-meta {
    justify-content: flex-start;
  }
}

/* DaisyUI dark theme integration */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --color-base-100: oklch(25.33% 0.016 252.42);
  --color-base-200: oklch(23.26% 0.014 253.1);
  --color-base-300: oklch(21.15% 0.012 254.09);
  --color-base-content: oklch(97.807% 0.029 256.847);
  --color-primary: oklch(58% 0.233 277.117);
  --color-primary-content: oklch(96% 0.018 272.314);
  --color-secondary: oklch(65% 0.241 354.308);
  --color-secondary-content: oklch(94% 0.028 342.258);
  --color-accent: oklch(77% 0.152 181.912);
  --color-accent-content: oklch(38% 0.063 188.416);
  --color-neutral: oklch(14% 0.005 285.823);
  --color-neutral-content: oklch(92% 0.004 286.32);
  --color-info: oklch(74% 0.16 232.661);
  --color-info-content: oklch(29% 0.066 243.157);
  --color-success: oklch(76% 0.177 163.223);
  --color-success-content: oklch(37% 0.077 168.94);
  --color-warning: oklch(82% 0.189 84.429);
  --color-warning-content: oklch(41% 0.112 45.904);
  --color-error: oklch(71% 0.194 13.428);
  --color-error-content: oklch(27% 0.105 12.094);
  --radius-selector: 0.5rem;
  --radius-field: 0.25rem;
  --radius-box: 0.5rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 1px;
  --depth: 1;
  --noise: 0;
  --bg: var(--color-base-100);
  --panel: var(--color-base-200);
  --panel-strong: var(--color-base-300);
  --panel-soft: color-mix(in oklab, var(--color-base-200) 74%, var(--color-primary) 8%);
  --line: color-mix(in oklab, var(--color-base-content) 17%, transparent);
  --text: var(--color-base-content);
  --muted: color-mix(in oklab, var(--color-base-content) 66%, transparent);
  --blue: var(--color-primary);
  --blue-soft: color-mix(in oklab, var(--color-primary) 18%, transparent);
  --green: var(--color-success);
  --amber: var(--color-warning);
  --red: var(--color-error);
  --unknown: color-mix(in oklab, var(--color-base-content) 48%, transparent);
  --shadow: 0 18px 44px color-mix(in oklab, var(--color-neutral) 58%, transparent);
  --radius: var(--radius-box);
}

body,
body.server-detail-shell,
.auth-shell {
  background:
    radial-gradient(circle at 20% -10%, color-mix(in oklab, var(--color-primary) 20%, transparent), transparent 34rem),
    var(--color-base-100);
  color: var(--color-base-content);
}

.topbar,
body.server-detail-shell .topbar,
.sidebar,
.account-drawer,
.logout-drawer,
.auth-card {
  background: var(--color-base-200);
  color: var(--color-base-content);
  border-color: var(--line);
}

.sidebar-header,
.account-drawer-header,
.account-drawer-footer {
  background: color-mix(in oklab, var(--color-base-200) 92%, var(--color-base-300));
  border-color: var(--line);
}

.brand,
.sidebar-brand,
h1,
h2,
.page-header h1,
.monitor-panel h2,
.account-drawer-header h2,
.auth-brand {
  color: var(--color-base-content);
}

a,
.breadcrumbs a,
.topbar a {
  color: color-mix(in oklab, var(--color-primary) 72%, white);
}

.button,
button.primary,
button.danger,
.server-detail-shell .button,
.server-detail-shell button.primary,
.icon-button,
.health-meta div,
.tabs,
.server-tabs,
.filters,
.status-card,
.summary-strip div,
.facts div,
.form-panel,
.table-wrap,
.monitor-panel,
.chart-card,
.metric-card,
.account-card,
.drawer-action {
  background: var(--color-base-200);
  border-color: var(--line);
  border-radius: var(--radius-box);
  color: var(--color-base-content);
}

.health-panel {
  border-color: color-mix(in oklab, var(--color-success) 34%, transparent);
  background:
    linear-gradient(90deg,
      color-mix(in oklab, var(--color-success) 20%, var(--color-base-200)),
      var(--color-base-200));
}

.chart-card,
.metric-card,
.health-meta div,
.icon-button,
.tabs,
.server-tabs {
  background: color-mix(in oklab, var(--color-base-200) 78%, var(--color-base-300));
}

button.primary,
.server-detail-shell button.primary,
.account-avatar,
.account-card-avatar,
.auth-form button {
  background: var(--color-primary);
  color: var(--color-primary-content);
  border-color: var(--color-primary);
}

.badge.green,
.badge.info,
.server-page .badge.green,
.server-page .badge.info {
  background: var(--color-primary);
  color: var(--color-primary-content);
}

.badge.red,
.badge.error,
.badge.critical,
.logout-button {
  background: var(--color-error);
  color: var(--color-error-content);
}

.badge.amber,
.badge.warning {
  background: var(--color-warning);
  color: var(--color-warning-content);
}

.good { color: var(--color-success); }
.warn { color: var(--color-warning); }
.danger { color: var(--color-error); }

th {
  background: var(--color-base-300);
  color: var(--muted);
}

td,
.server-page td {
  color: var(--color-base-content);
  border-bottom-color: var(--line);
}

.form-panel input,
.form-panel select,
.form-panel textarea,
.filters input,
.filters select,
.auth-form input {
  background: var(--color-base-100);
  border-color: var(--line);
  color: var(--color-base-content);
}

.form-panel input:focus,
.form-panel select:focus,
.form-panel textarea:focus,
.filters input:focus,
.filters select:focus,
.auth-form input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 18%, transparent);
}

.drawer-action-icon {
  background: color-mix(in oklab, var(--color-primary) 16%, transparent);
  color: color-mix(in oklab, var(--color-primary) 70%, white);
}

.drawer-action.danger .drawer-action-icon,
.logout-icon {
  background: color-mix(in oklab, var(--color-error) 16%, transparent);
  color: color-mix(in oklab, var(--color-error) 70%, white);
}

.drawer-action:hover,
.sidebar nav a:hover,
.icon-button:hover,
.tabs a:hover,
.server-tabs a:hover {
  background: color-mix(in oklab, var(--color-primary) 12%, var(--color-base-200));
  border-color: color-mix(in oklab, var(--color-primary) 36%, transparent);
}

.tabs a.active,
.server-tabs a.active {
  background: color-mix(in oklab, var(--color-primary) 22%, var(--color-base-200));
  color: var(--color-primary-content);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.fleet-trends-panel {
  margin-bottom: 28px;
}

.server-list-section {
  margin-bottom: 28px;
}

.dashboard-shell {
  display: grid;
  gap: 24px;
}

.dashboard-overview-card {
  display: grid;
  gap: 18px;
}

.dashboard-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-heading-with-action {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex: 1 1 auto;
  min-width: 0;
  gap: 18px;
}

.dashboard-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
}

.dashboard-heading-actions form {
  margin: 0;
}

.dashboard-card-header h2 {
  margin-bottom: 6px;
}

.dashboard-card-header p {
  margin: 0;
}

.dashboard-card-header .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-application-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-server-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.servers-tab-card {
  display: grid;
  gap: 18px;
}

.server-tab-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.server-tab-header {
  display: flex;
  justify-content: flex-start;
}

.server-tab-buttons {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--color-base-100) 70%, transparent);
}

.server-tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.server-tab-button:hover {
  border-color: color-mix(in oklab, var(--color-primary) 36%, transparent);
  background: color-mix(in oklab, var(--color-primary) 12%, var(--color-base-200));
  color: var(--color-base-content);
}

.server-tab-content {
  min-width: 0;
}

.server-tab-panel {
  display: none;
}

#servers-tab-trends:checked ~ .server-tab-header label[for="servers-tab-trends"],
#servers-tab-list:checked ~ .server-tab-header label[for="servers-tab-list"] {
  border-color: color-mix(in oklab, var(--color-primary) 48%, transparent);
  background: color-mix(in oklab, var(--color-primary) 22%, var(--color-base-200));
  color: var(--color-primary-content);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

#servers-tab-trends:checked ~ .server-tab-content .server-tab-panel-trends,
#servers-tab-list:checked ~ .server-tab-content .server-tab-panel-list {
  display: block;
}

.list-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.list-section-header h2 {
  margin-bottom: 4px;
}

.list-section-header p {
  margin: 0;
}

.application-detail-page {
  display: grid;
  gap: 24px;
}

.application-panel {
  display: grid;
  gap: 18px;
}

.application-trends-panel {
  display: grid;
  gap: 16px;
}

.application-trend-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.application-pressure-card {
  grid-column: 1 / -1;
}

.application-activity-header {
  align-items: flex-start;
  gap: 18px;
}

.application-activity-header > div {
  flex: 0 0 auto;
}

.application-activity-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(155px, 1fr) minmax(155px, 1fr) minmax(170px, 1fr) minmax(190px, 1fr);
  align-items: end;
  gap: 12px;
  margin-left: 0;
  position: relative;
  width: 100%;
}

.application-activity-form.compact {
  grid-template-columns: minmax(250px, 1.9fr) minmax(155px, 1fr) minmax(155px, 1fr) minmax(170px, 1fr);
}

.application-activity-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.application-activity-form .activity-search-field {
  width: auto;
}

.application-activity-form .activity-select-field {
  width: auto;
}

.application-activity-form .activity-time-field {
  width: auto;
}

.application-activity-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.application-activity-form input,
.application-activity-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in oklab, var(--color-base-100) 62%, transparent);
  color: var(--color-base-content);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  outline: none;
  padding: 0 12px;
}

.application-activity-form input:focus,
.application-activity-form select:focus {
  border-color: color-mix(in oklab, var(--color-primary) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 18%, transparent);
}

.activity-loading {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 0;
  padding-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.htmx-request .activity-loading,
.activity-loading.htmx-request {
  opacity: 1;
}

.application-hero.health-panel {
  margin: 0;
}

.application-hero .health-meta div {
  min-width: 128px;
}

.application-container-badges {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in oklab, var(--color-base-content) 14%, transparent);
}

.application-container-badges > strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.application-container-badges > div {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.application-container-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-base-100) 58%, transparent);
  color: var(--color-base-content);
  font-size: 12px;
  font-weight: 900;
}

.application-container-pill:hover {
  border-color: color-mix(in oklab, var(--color-primary) 42%, transparent);
  background: color-mix(in oklab, var(--color-primary) 14%, var(--color-base-200));
  text-decoration: none;
}

.application-container-pill small,
.application-container-pill em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.application-container-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--unknown);
}

.application-container-pill.green::before {
  background: var(--color-success);
}

.application-container-pill.amber::before,
.application-container-pill.warning::before {
  background: var(--color-warning);
}

.application-container-pill.red::before,
.application-container-pill.error::before,
.application-container-pill.critical::before {
  background: var(--color-error);
}

.application-hero-header,
.application-container-card,
.application-log-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.application-hero-copy h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 4vw, 46px);
}

.application-hero-copy p {
  margin: 0;
  color: color-mix(in oklab, var(--color-primary) 38%, white);
  font-size: 18px;
  font-weight: 700;
}

.application-status-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
}

.application-status-strip div {
  display: grid;
  gap: 8px;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--color-base-100) 60%, transparent);
}

.application-status-strip strong,
.application-container-main a,
.application-container-state span:last-child,
.application-log-meta time,
.application-log-source {
  color: var(--muted);
}

.application-status-strip strong {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.application-status-strip > div:last-child span {
  color: var(--color-base-content);
  font-size: 16px;
  font-weight: 750;
}

.application-container-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.application-container-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--color-base-100) 58%, transparent);
}

.application-container-main {
  min-width: 0;
}

.application-container-main h3 {
  margin: 0 0 6px;
  color: var(--color-base-content);
  font-size: 16px;
}

.application-container-main a {
  font-size: 13px;
  font-weight: 800;
}

.application-container-state {
  display: grid;
  gap: 7px;
  justify-items: start;
}

.application-detail-page .button.ghost {
  background: color-mix(in oklab, var(--color-base-100) 56%, transparent);
}

.application-detail-page .button.compact {
  min-height: 34px;
  padding: 7px 11px;
}

.application-activity-feed {
  display: grid;
  gap: 12px;
}

.application-log-entry {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--unknown);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--color-base-100) 58%, transparent);
}

.application-log-entry.debug,
.application-log-entry.info {
  border-left-color: var(--color-info);
}

.application-log-entry.warning,
.application-log-entry.amber {
  border-left-color: var(--color-warning);
}

.application-log-entry.error,
.application-log-entry.critical,
.application-log-entry.red {
  border-left-color: var(--color-error);
}

.application-log-meta {
  align-items: center;
}

.application-log-meta time {
  font-size: 13px;
  font-weight: 800;
}

.application-log-entry p {
  margin: 0;
  color: var(--color-base-content);
  font-size: 16px;
  line-height: 1.5;
}

.application-log-source {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.application-log-source span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-base-200) 72%, transparent);
}

@media (max-width: 900px) {
  .dashboard-card-header,
  .list-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-card-header .actions {
    justify-content: flex-start;
  }

  .dashboard-application-grid,
  .dashboard-server-grid,
  .application-trend-grid {
    grid-template-columns: 1fr;
  }

  .application-pressure-card {
    grid-column: auto;
  }

  .application-activity-form,
  .application-activity-form.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .application-activity-form .activity-search-field {
    grid-column: 1 / -1;
  }

  .activity-loading {
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  .dashboard-heading-with-action,
  .dashboard-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .application-hero-header,
  .application-container-card {
    align-items: stretch;
    flex-direction: column;
  }

  .application-status-strip {
    grid-template-columns: 1fr;
  }

  .application-activity-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .application-activity-form.compact {
    grid-template-columns: 1fr;
  }

  .application-activity-form .activity-search-field,
  .application-activity-form .activity-select-field,
  .application-activity-form .activity-time-field {
    grid-column: auto;
    width: 100%;
  }
}

.advisor-header {
  margin-bottom: 22px;
}

.placement-advisor-shell .page {
  max-width: 1320px;
  padding-top: 34px;
  padding-bottom: 72px;
}

.placement-advisor-shell .monitor-panel {
  margin-top: 32px;
  padding: 30px;
}

.placement-advisor-shell .section-header {
  margin-bottom: 24px;
}

.placement-advisor-shell .section-header h2,
.advisor-header h1 {
  margin-bottom: 8px;
}

.placement-advisor-shell .section-header p,
.advisor-header p {
  max-width: 760px;
  line-height: 1.7;
}

.advisor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 34px;
  align-items: center;
  margin-top: 0;
  background:
    radial-gradient(circle at top left, color-mix(in oklab, var(--color-primary) 18%, transparent), transparent 36%),
    var(--panel);
}

.advisor-hero h2 {
  margin: 18px 0 12px;
}

.advisor-hero p,
.empty-state p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.advisor-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.advisor-kpis div,
.empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--color-base-100) 72%, transparent);
}

.advisor-kpis strong,
.advisor-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.advisor-kpis span {
  display: block;
  margin-top: 10px;
  color: var(--color-base-content);
  font-size: 24px;
  font-weight: 900;
}

.advisor-recommendation-list,
.advisor-pressure-grid {
  display: grid;
  gap: 18px;
}

.advisor-recommendation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 24px;
  padding: 22px;
  border: 1px solid color-mix(in oklab, var(--color-warning) 30%, transparent);
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--color-warning) 14%, transparent),
    color-mix(in oklab, var(--color-base-200) 86%, transparent)
  );
}

.advisor-recommendation h3,
.advisor-pressure-card h3 {
  margin: 12px 0 6px;
  color: var(--color-base-content);
  font-size: 20px;
}

.advisor-recommendation p {
  margin: 0 0 12px;
  color: color-mix(in oklab, var(--color-primary) 40%, white);
  font-weight: 800;
}

.advisor-recommendation small {
  color: var(--muted);
  line-height: 1.75;
}

.advisor-signal-list,
.advisor-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.advisor-signal-list span,
.advisor-reasons span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-base-100) 58%, transparent);
  color: var(--color-base-content);
  font-size: 12px;
  font-weight: 800;
}

.advisor-pressure-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.advisor-pressure-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--color-base-200) 84%, transparent);
}

.advisor-pressure-card.good {
  border-color: color-mix(in oklab, var(--color-success) 30%, transparent);
}

.advisor-pressure-card.warn {
  border-color: color-mix(in oklab, var(--color-warning) 34%, transparent);
}

.advisor-pressure-card.danger {
  border-color: color-mix(in oklab, var(--color-error) 38%, transparent);
}

.advisor-pressure-card header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.advisor-pressure-card header span {
  color: var(--muted);
}

.advisor-pressure-card header > strong {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-primary) 16%, transparent);
  color: var(--color-base-content);
  font-size: 18px;
}

.advisor-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.advisor-metrics div {
  padding: 13px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--color-base-100) 58%, transparent);
}

.advisor-metrics b {
  display: block;
  margin-top: 8px;
  color: var(--color-base-content);
  font-size: 16px;
}

.placement-advisor-shell .table-wrap {
  border-radius: var(--radius);
}

.placement-advisor-shell th,
.placement-advisor-shell td {
  padding-top: 15px;
  padding-bottom: 15px;
}

.advisor-table td:last-child {
  max-width: 360px;
}

@media (max-width: 900px) {
  .advisor-hero,
  .advisor-recommendation {
    grid-template-columns: 1fr;
  }

  .advisor-kpis,
  .advisor-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
