:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --line: #d7dde5;
  --line-strong: #b8c2cf;
  --text: #17202a;
  --muted: #667085;
  --muted-strong: #485465;
  --green: #12805c;
  --green-bg: #e8f6ef;
  --red: #c4363b;
  --red-bg: #fdecec;
  --amber: #a15c00;
  --amber-bg: #fff4df;
  --blue: #1f6feb;
  --blue-bg: #eaf2ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.provisioning-nav {
  margin-bottom: 8px;
}

.provisioning-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.provisioning-form,
.provisioning-history {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.section-heading.compact {
  margin: 0 0 16px;
}

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

.form-field {
  display: grid;
  gap: 6px;
}

.form-field > span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 9px 10px;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(31, 111, 235, 0.14);
}

.account-preview {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.account-preview > header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.account-preview > header span {
  font-weight: 700;
}

.account-preview > header small {
  color: var(--muted);
  text-align: right;
}

.account-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-preview-grid > div {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.account-preview-grid > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.account-preview-grid span,
.account-preview-grid strong {
  display: block;
}

.account-preview-grid span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-preview-grid strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.modal-actions button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.provisioning-notice {
  margin: 0 0 16px;
}

.request-list {
  display: grid;
  gap: 10px;
}

.request-card {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.request-card strong,
.request-card small {
  display: block;
}

.request-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.request-card .status-chip {
  align-self: start;
}

.status-chip.pending {
  background: var(--amber-bg);
  color: var(--amber);
}

.request-error {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--red);
  font-size: 12px;
}

.layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 14px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 6px 22px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #cfe6ef;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  padding: 1px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.environment-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.environment-button {
  display: grid;
  width: 100%;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.environment-button:hover {
  background: var(--surface-soft);
}

.environment-button.active {
  border-color: #b7cffd;
  background: var(--blue-bg);
}

.global-button {
  margin-bottom: 8px;
}

.environment-button strong,
.environment-button small {
  display: block;
}

.environment-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.status-dot.healthy {
  background: var(--green);
}

.status-dot.attention,
.status-dot.unhealthy {
  background: var(--red);
}

.status-dot.inactive {
  background: var(--line-strong);
}

.status-dot.stale,
.status-dot.unknown {
  background: var(--red);
}

.content {
  max-width: 1480px;
  width: 100%;
  padding: 20px 24px 36px;
}

.page-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-header h1 {
  margin: 3px 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.header-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.pill,
.status-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.pill.healthy,
.status-chip.healthy {
  background: var(--green-bg);
  color: var(--green);
}

.pill.attention,
.status-chip.unhealthy,
.status-chip.attention {
  background: var(--red-bg);
  color: var(--red);
}

.pill.unknown {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-chip.stale,
.status-chip.unknown {
  background: var(--red-bg);
  color: var(--red);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.summary-panel.primary {
  border-color: #b7d9c7;
  background: linear-gradient(180deg, #ffffff, var(--green-bg));
}

.summary-panel strong,
.summary-panel span {
  display: block;
}

.summary-panel strong {
  margin: 10px 0 5px;
  font-size: 28px;
  line-height: 1;
}

.summary-panel span:last-child {
  color: var(--muted);
  font-size: 13px;
}

.summary-panel a {
  color: var(--blue);
  font-size: 13px;
  text-decoration: none;
}

.summary-panel a:hover {
  text-decoration: underline;
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin: 24px 0 10px;
}

.environment-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.environment-identity,
.environment-toolbar-meta {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.environment-identity h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.environment-identity > span:not(.status-dot),
.environment-toolbar-meta {
  color: var(--muted);
  font-size: 12px;
}

.environment-toolbar .action-notice {
  flex-basis: 100%;
  margin: 0;
}

.environment-dashboard {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.operational-status {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(220px, 1.2fr) minmax(190px, 0.9fr);
  min-height: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.operational-status > div {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 10px 14px;
}

.operational-status > div:first-child {
  border-left: 0;
}

.operational-state {
  display: flex;
  gap: 10px;
  align-items: center;
}

.state-indicator {
  width: 10px;
  height: 36px;
  flex: 0 0 10px;
  border-radius: 3px;
  background: var(--green);
}

.operational-status.attention .state-indicator {
  background: var(--red);
}

.operational-state strong,
.operational-state small,
.operational-fact > span,
.operational-fact strong,
.operational-fact small,
.operational-fact a {
  display: block;
}

.operational-state strong {
  font-size: 16px;
}

.operational-state small,
.operational-fact small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.operational-fact {
  text-align: left;
}

.operational-fact > span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.operational-fact strong,
.operational-fact a {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-fact:last-child strong,
.operational-fact:last-child a {
  text-transform: capitalize;
}

.operational-fact small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-dashboard-section {
  border-top: 1px solid var(--line-strong);
  padding-top: 10px;
}

.ops-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ops-section-heading h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.ops-section-heading div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.health-legend {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.health-legend i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

.health-legend i:nth-of-type(2) {
  margin-left: 5px;
  background: var(--red);
}

.dashboard-empty {
  color: var(--muted);
  padding: 20px;
  font-size: 13px;
}

.dashboard-application + .dashboard-application {
  margin-top: 10px;
}

.dashboard-application > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.dashboard-application > header strong {
  font-size: 11px;
  text-transform: uppercase;
}

.dashboard-application > header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-application > header span.healthy {
  color: var(--green);
}

.dashboard-application > header span.attention {
  color: var(--red);
}

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

.service-health-tile {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 6px;
  background: var(--surface);
  padding: 7px 8px 6px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.service-health-tile:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12);
}

.service-health-tile:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.service-health-tile.unhealthy,
.service-health-tile.stale,
.service-health-tile.unknown {
  border-top-color: var(--red);
}

.service-health-tile > header {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.service-health-tile > header .status-dot {
  width: 7px;
  height: 7px;
}

.service-health-tile > header strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-health-tile > header > span:last-child {
  font-size: 10px;
  font-weight: 750;
}

.service-health-tile > p {
  overflow: hidden;
  margin: 4px 0;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-health-tile > footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.service-health-tile > footer > small {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.service-health-tile .health-history > small {
  display: none;
}

.health-history.compact,
.health-history.compact .history-chart,
.health-history.compact svg {
  width: 96px;
}

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

.telemetry-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.telemetry-card.attention,
.telemetry-card.unknown {
  border-top-color: var(--red);
}

.telemetry-card.inactive {
  border-top-color: var(--line-strong);
}

.telemetry-card-content {
  display: grid;
  min-height: 94px;
  align-content: space-between;
  gap: 6px;
  padding: 8px;
}

.telemetry-title {
  display: flex;
  gap: 6px;
  align-items: center;
}

.telemetry-title .status-dot {
  width: 7px;
  height: 7px;
}

.telemetry-title strong {
  font-size: 11px;
}

.telemetry-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.telemetry-highlights > span {
  min-width: 0;
}

.telemetry-highlights strong,
.telemetry-highlights small {
  display: block;
}

.telemetry-highlights strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telemetry-highlights small,
.telemetry-reporting {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.telemetry-reporting {
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-drawer-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(23, 32, 42, 0.34);
}

.service-drawer {
  display: grid;
  width: min(640px, calc(100vw - 40px));
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg);
  box-shadow: -12px 0 30px rgba(16, 24, 40, 0.18);
}

.service-drawer-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px;
}

.service-drawer-header > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.service-drawer-header strong,
.service-drawer-header small {
  display: block;
}

.service-drawer-header strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-drawer-header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.service-drawer-header button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.service-drawer-header button:hover {
  border-color: var(--blue);
  color: var(--text);
}

.service-drawer-content {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 12px;
}

.service-health-panel,
.service-detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.service-health-panel {
  display: grid;
  gap: 12px;
  border-top: 3px solid var(--green);
  padding: 12px;
}

.service-health-panel.unhealthy,
.service-health-panel.stale,
.service-health-panel.unknown {
  border-top-color: var(--red);
}

.service-health-panel > header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.service-health-panel > header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.service-health-panel .status-chip {
  flex: 0 0 auto;
}

.service-health-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.service-health-metrics > div {
  min-width: 0;
  padding: 9px 10px;
}

.service-health-metrics > div + div {
  border-left: 1px solid var(--line);
}

.service-health-metrics dt,
.service-health-metrics dd {
  margin: 0;
}

.service-health-metrics dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.service-health-metrics dd {
  overflow: hidden;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-health-visual {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.service-health-visual > header {
  display: flex;
  min-height: 42px;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 7px 10px;
}

.service-health-visual > header strong,
.service-health-visual > header span {
  display: block;
}

.service-health-visual > header strong {
  font-size: 11px;
}

.service-health-visual > header span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.service-health-visual > header > span {
  margin: 0;
  font-weight: 700;
}

.service-health-visual svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 188px;
  background: var(--surface);
}

.service-chart-grid {
  stroke: #e5e9ef;
  stroke-width: 1;
}

.service-chart-axis {
  fill: var(--muted);
  font-size: 9px;
}

.service-chart-area {
  pointer-events: none;
}

.service-chart-line {
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  pointer-events: none;
}

.service-chart-hit {
  fill: transparent;
  cursor: crosshair;
  outline: none;
}

.service-chart-hit:focus {
  fill: rgba(31, 111, 235, 0.15);
  stroke: var(--blue);
  stroke-width: 1;
}

.service-chart-point {
  fill: var(--green);
  stroke: var(--surface);
  stroke-width: 2;
  pointer-events: none;
}

.service-chart-point.unhealthy,
.service-chart-point.stale,
.service-chart-point.unknown {
  fill: var(--red);
}

.service-detail-section {
  overflow: hidden;
}

.service-detail-section > header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 8px 10px;
}

.service-detail-section h3 {
  margin: 0;
  font-size: 13px;
}

.service-detail-section > header > span {
  color: var(--muted);
  font-size: 10px;
}

.service-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
}

.service-resource-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 6px;
  padding: 8px;
}

.service-resource-card.attention,
.service-resource-card.unhealthy,
.service-resource-card.unknown {
  border-top-color: var(--red);
}

.service-resource-card.inactive {
  border-top-color: var(--line-strong);
}

.service-resource-card > header {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.service-resource-card > header .status-dot {
  width: 7px;
  height: 7px;
}

.service-resource-card > header strong,
.service-resource-card > header small {
  display: block;
}

.service-resource-card > header strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-resource-card > header small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.service-resource-card > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.service-resource-card > div span strong,
.service-resource-card > div span small {
  display: block;
}

.service-resource-card > div span strong {
  font-size: 14px;
}

.service-resource-card > div span small,
.service-resource-card > div > small {
  color: var(--muted);
  font-size: 9px;
}

.service-log-list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.service-log-link {
  display: grid;
  min-width: 0;
  min-height: 46px;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 7px 8px;
  text-decoration: none;
}

.service-log-link:hover {
  border-color: var(--blue);
}

.service-log-link .status-dot {
  width: 7px;
  height: 7px;
}

.service-log-link strong,
.service-log-link small {
  display: block;
}

.service-log-link strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-log-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.service-log-link > span:last-child {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.service-detail-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  padding: 12px;
  font-size: 11px;
}

.section-heading h2,
.database-panel h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.section-heading p,
.database-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.environment-table {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.environment-row {
  display: grid;
  width: 100%;
  grid-template-columns: 10px minmax(220px, 1fr) minmax(95px, 0.2fr) minmax(95px, 0.2fr) minmax(220px, 0.55fr) minmax(150px, 0.35fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
}

.environment-row:hover {
  border-color: var(--blue);
}

.environment-row strong,
.environment-row small {
  display: block;
}

.environment-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.environment-row-name strong {
  font-size: 15px;
}

.database-panel,
.service-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.database-panel {
  padding: 16px;
  margin-bottom: 18px;
}

.database-panel.unknown {
  border-color: #e4bf75;
}

.database-panel-header {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.database-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.database-grid div {
  min-width: 0;
  background: var(--surface-soft);
  padding: 10px;
}

.database-grid div + div {
  border-left: 1px solid var(--line);
}

.database-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.database-grid dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}

.action-notice {
  border: 1px solid #b7cffd;
  border-radius: 8px;
  background: var(--blue-bg);
  padding: 9px 10px;
  color: #174ea6;
  font-size: 13px;
  max-width: 460px;
  text-align: left;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.logout-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted-strong);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  cursor: pointer;
}

.logout-button:hover {
  background: var(--surface-soft);
}

.actions-menu {
  position: relative;
}

.actions-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.actions-menu summary::-webkit-details-marker {
  display: none;
}

.actions-menu summary::after {
  content: "v";
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.actions-menu[open] summary {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

.actions-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  display: grid;
  width: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.16);
  overflow: hidden;
}

.actions-menu-list button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.actions-menu-list button:last-child {
  border-bottom: 0;
}

.actions-menu-list button:hover {
  background: var(--surface-soft);
}

.actions-menu-list button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.actions-menu-list button.destructive:hover {
  background: var(--red-bg);
}

.actions-menu-list button strong {
  font-size: 13px;
}

.actions-menu-list button span {
  color: var(--muted);
  font-size: 12px;
}

.health-history {
  display: grid;
  width: 132px;
  gap: 1px;
}

.health-history svg {
  display: block;
  width: 132px;
  height: 34px;
  overflow: visible;
  pointer-events: none;
}

.history-chart {
  position: relative;
  display: block;
  width: 132px;
  height: 34px;
}

.health-history small {
  margin: 0;
  text-align: right;
}

.history-guide {
  stroke-width: 1;
}

.history-guide.healthy {
  stroke: #d8ebe1;
}

.history-guide.unhealthy {
  stroke: #f2d2d3;
}

.history-line {
  fill: none;
  stroke: #8b96a8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.history-point {
  stroke: #ffffff;
  stroke-width: 1.5;
}

.history-point.healthy {
  fill: var(--green);
}

.history-point.unhealthy,
.history-point.stale,
.history-point.unknown {
  fill: var(--red);
}

.history-hit {
  position: absolute;
  width: 12px;
  height: 14px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  outline: none;
  padding: 0;
}

.history-hit::after {
  position: absolute;
  inset: 3px 2px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
  content: "";
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 100ms ease, transform 100ms ease;
}

.history-hit.unhealthy::after,
.history-hit.stale::after,
.history-hit.unknown::after {
  background: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.history-hit:hover::after,
.history-hit:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

.history-tooltip {
  position: fixed;
  z-index: 20;
  display: grid;
  min-width: 148px;
  gap: 2px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: #17202a;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.2);
  color: #ffffff;
  padding: 8px 10px;
  pointer-events: none;
  font-size: 12px;
}

.history-tooltip[hidden] {
  display: none;
}

.history-tooltip.unhealthy,
.history-tooltip.stale,
.history-tooltip.unknown {
  border-left-color: var(--red);
}

.history-tooltip strong,
.history-tooltip span {
  display: block;
}

.history-tooltip span {
  color: #d7dde5;
}

.history-empty {
  color: var(--muted);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 40, 0.48);
  padding: 20px;
}

.confirmation-modal {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(16, 24, 40, 0.22);
  padding: 20px;
}

.modal-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
}

.modal-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.modal-details div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.modal-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.modal-details dd {
  margin: 4px 0 0;
}

.confirmation-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.confirmation-field span,
.confirmation-note {
  color: var(--muted);
}

.confirmation-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 11px 12px;
}

.confirmation-field input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(31, 111, 235, 0.14);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.modal-actions button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 13px;
  cursor: pointer;
}

.modal-actions button.destructive {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.modal-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.empty-state {
  padding: 40px;
}

.data-source {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.data-unavailable {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
}

.data-unavailable section {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
}

.data-unavailable h1 {
  margin: 6px 0 12px;
  font-size: 28px;
  letter-spacing: 0;
}

.data-unavailable p {
  color: var(--muted);
}

.data-unavailable button {
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  padding: 10px 16px;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .environment-row {
    grid-template-columns: 1fr;
  }

  .environment-row {
    gap: 8px;
  }

  .database-panel-header,
  .modal-details,
  .database-grid,
  .provisioning-layout {
    grid-template-columns: 1fr;
  }

  .database-grid div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .operational-status {
    grid-template-columns: 1fr 1fr;
  }

  .operational-state {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }

  .service-tile-grid,
  .telemetry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content {
    padding: 20px;
  }

  .page-header,
  .section-heading {
    display: grid;
  }

  .header-meta {
    justify-items: start;
    text-align: left;
  }

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

  .environment-toolbar {
    display: grid;
    gap: 8px;
  }

  .environment-identity,
  .environment-toolbar-meta {
    flex-wrap: wrap;
  }

  .environment-toolbar-meta {
    justify-content: flex-start;
  }

  .actions-menu-list {
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 40px));
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .account-preview > header,
  .account-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-preview > header small {
    text-align: left;
  }

  .account-preview-grid > div:nth-child(odd) {
    border-right: 0;
  }

  .environment-row .status-dot {
    display: none;
  }

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

  .operational-state {
    grid-column: auto;
  }

  .operational-status > div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .operational-status > div:first-child {
    border-top: 0;
  }

  .service-tile-grid,
  .telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-drawer {
    width: 100%;
  }

  .service-resource-grid {
    grid-template-columns: 1fr;
  }

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

  .service-health-metrics > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .service-health-metrics > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}
