:root {
  color: #172033;
  background: #f3f6f8;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-synthesis: none;
  letter-spacing: 0;
  --ink: #172033;
  --muted: #64748b;
  --line: #dce3e8;
  --surface: #ffffff;
  --surface-alt: #f7f9fb;
  --teal: #087f76;
  --teal-dark: #06645e;
  --blue: #1769aa;
  --green: #168049;
  --amber: #a66308;
  --red: #b4232d;
  --sidebar: #132938;
  --shadow: 0 1px 2px rgba(20, 41, 56, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f3f6f8;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 232px;
  flex-direction: column;
  background: var(--sidebar);
  color: #e7f2f4;
}

.brand {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 18px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: #0f9489;
  color: #fff;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 15px;
}

.brand-copy small {
  margin-top: 2px;
  color: #9fc0c8;
  font-size: 11px;
}

.nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 14px 10px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #c8d9de;
  padding: 0 12px;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-item.active {
  background: #0b756f;
  color: #fff;
}

.nav-item-settings {
  margin-top: auto;
}

.nav-item img,
.button img,
.icon-button img {
  width: 17px;
  height: 17px;
}

.nav-item img {
  filter: invert(93%) sepia(12%) saturate(244%) hue-rotate(144deg);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 18px;
  color: #9fc0c8;
  font-size: 11px;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #46d28c;
}

.workspace {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 9px 24px;
}

.topbar h1,
.section-heading h2,
.modal-header h2 {
  margin: 0;
  color: var(--ink);
}

.topbar h1 {
  font-size: 18px;
}

.topbar p,
.section-heading p,
.modal-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.last-updated {
  color: var(--muted);
  font-size: 11px;
}

.content {
  width: min(100%, 1520px);
  margin: 0 auto;
  padding: 22px 24px 50px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.summary-item {
  min-height: 94px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: var(--surface);
  padding: 15px 16px;
  box-shadow: var(--shadow);
}

.summary-item.blue {
  border-left-color: var(--blue);
}

.summary-item.amber {
  border-left-color: var(--amber);
}

.summary-item.red {
  border-left-color: var(--red);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong {
  display: block;
  margin-top: 10px;
  font-size: 25px;
  line-height: 1;
}

.server-health-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.server-health-card,
.health-empty {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.server-health-card.warning {
  border-left-color: var(--amber);
}

.server-health-card.critical,
.server-health-card.unavailable {
  border-left-color: var(--red);
}

.server-health-heading,
.disk-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-health-heading {
  justify-content: space-between;
  margin-bottom: 15px;
}

.server-health-heading strong,
.server-health-heading small {
  display: block;
}

.server-health-heading small,
.disk-line small,
.retention-note,
.server-health-card p {
  color: var(--muted);
}

.disk-line strong {
  margin-left: auto;
  font-size: 20px;
}

.health-progress {
  height: 7px;
  margin: 9px 0 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef1;
}

.health-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.server-health-card.warning .health-progress span {
  background: var(--amber);
}

.server-health-card.critical .health-progress span {
  background: var(--red);
}

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

.health-metrics div {
  min-width: 0;
  border: 1px solid #e5ebef;
  border-radius: 6px;
  background: var(--surface-alt);
  padding: 9px;
}

.health-metrics dt {
  color: var(--muted);
  font-size: 11px;
}

.health-metrics dd {
  margin: 4px 0 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-health-card p {
  margin: 12px 0 5px;
  font-size: 12px;
}

.retention-note {
  font-size: 11px;
}

.resource-monitor {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.resource-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.3fr) 140px;
  gap: 12px;
  padding: 18px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.resource-toolbar label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.resource-toolbar input, .resource-toolbar select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.resource-summary { display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 12px 18px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.resource-summary span:first-child { color: var(--ink); font-weight: 700; }
.resource-list { max-height: 360px; overflow-y: auto; }
.resource-good { color: var(--green); }
.resource-warning { color: var(--amber); }
.resource-row { display: grid; grid-template-columns: minmax(145px, 1.25fr) repeat(3, minmax(85px, 1fr)) minmax(110px, .95fr); gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #edf1f4; background: white; padding: 12px 18px; color: var(--ink); }
button.resource-row:hover { background: #f6fafc; }
button.resource-row.selected { background: #eef6fc; box-shadow: inset 3px 0 0 var(--blue); }
button.resource-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.resource-list-heading { position: sticky; top: 0; z-index: 1; font-size: 11px; color: var(--muted); background: var(--surface-alt); padding-top: 9px; padding-bottom: 9px; }
.resource-server-name, .resource-cell, .resource-row-status { min-width: 0; }
.resource-server-name strong { display: block; overflow-wrap: anywhere; }
.resource-server-name small, .resource-row-status small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.resource-cell strong { display: block; font-size: 15px; }
.resource-sparkline { display: block; width: 100%; max-width: 120px; height: 28px; margin-top: 3px; }
.resource-row-status .badge { white-space: normal; }
.resource-mobile-label { display: none; }
.resource-row.offline .resource-sparkline, .resource-row.warning .resource-sparkline { opacity: .55; }
.resource-detail { padding: 20px 18px; border-top: 1px solid var(--line); }
.resource-detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.resource-detail h3 { margin: 0 0 4px; font-size: 17px; }
.resource-detail-heading small { color: var(--muted); font-size: 12px; }
.resource-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.resource-metric-grid > div { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface-alt); }
.resource-metric-grid span, .resource-metric-grid small { display: block; color: var(--muted); font-size: 11px; }
.resource-metric-grid strong { display: block; margin: 6px 0; font-size: 19px; overflow-wrap: anywhere; }
.resource-metric-grid .resource-low-memory { background: #fff5f4; border-color: #f4cbc8; }
.resource-low-memory strong { color: var(--red); }
.resource-trend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.resource-trend { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.resource-trend > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.resource-trend h4, .storage-bars h4 { margin: 0; font-size: 12px; }
.resource-trend strong { font-size: 17px; }
.resource-chart { display: block; width: 100%; margin-top: 8px; }
.resource-chart-times { display: flex; justify-content: space-between; gap: 8px; margin: -4px 0 10px 20px; color: var(--muted); font-size: 10px; }
.resource-trend small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }
.resource-condition { margin: 14px 0 8px; padding: 10px 12px; border-radius: 6px; background: #f0f8f3; color: var(--green); font-size: 12px; }
.resource-condition.warning { background: #fff8e9; color: var(--amber); }
.resource-condition.critical, .resource-stale-note { background: #fff0ef; color: var(--red); padding: 10px 12px; border-radius: 6px; font-size: 12px; }
.resource-detail.stale .resource-metric-grid, .resource-detail.stale .resource-trend-grid { opacity: .6; }
.resource-history-note, .resource-monitor-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.resource-monitor-note { margin: 0; padding: 12px 18px; background: var(--surface-alt); border-top: 1px solid var(--line); }
.resource-detail-empty, .chart-empty { color: var(--muted); padding: 20px; font-size: 12px; text-align: center; }
.resource-cell .chart-empty { padding: 0; font-size: 10px; text-align: left; }
.storage-bars { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.storage-bars h4 { margin-bottom: 12px; }
.storage-bar-row { display: grid; grid-template-columns: 105px minmax(0, 1fr) 80px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 12px; }
.storage-bar-row strong { text-align: right; font-size: 11px; }
.storage-bar-track { height: 8px; border-radius: 99px; overflow: hidden; background: #edf1f4; }
.storage-bar-track span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.storage-bars > small { color: var(--muted); font-size: 11px; }
.badge.critical { color: var(--red); background: #fff0ef; border-color: #f4cbc8; }

@media (max-width: 1100px) {
  .resource-trend-grid { grid-template-columns: minmax(0, 1fr); }
  .resource-chart { max-height: 160px; }
}

@media (max-width: 760px) {
  .resource-toolbar { grid-template-columns: minmax(0, 1fr) 130px; }
  .resource-toolbar label:first-child { grid-column: 1 / -1; }
  .resource-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .resource-list-heading { display: none; }
  .resource-server-name { grid-column: 1 / -1; }
  .resource-row-status { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; }
  .resource-mobile-label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
  .resource-detail-heading { align-items: flex-start; }
  .resource-metric-grid strong { font-size: 17px; }
  .storage-bar-row { grid-template-columns: 90px minmax(0, 1fr) 65px; gap: 8px; }
}

.release-journey {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #cfe2df;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.journey-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e5eeec;
  padding: 13px 15px;
  background: linear-gradient(90deg, #f3fbf9, #fff);
}

.journey-heading > div {
  min-width: 0;
}

.journey-heading strong,
.journey-heading small,
.journey-step strong,
.journey-step small {
  display: block;
}

.journey-heading small,
.journey-step small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.journey-heading .button {
  margin-left: auto;
  white-space: nowrap;
}

.journey-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.journey-step {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
}

.journey-step + .journey-step {
  border-left: 1px solid #e5eeec;
}

.journey-index {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e6f5f2;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
}

.journey-step.attention .journey-index {
  background: #fff1d7;
  color: #8a5308;
}

.show-more-row {
  display: flex;
  justify-content: center;
  padding: 12px 0 0;
}

.alert-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
  border-radius: 5px;
  padding: 11px 13px;
  line-height: 1.45;
}

.alert img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.alert.warning {
  border-color: #edca8d;
  background: #fff8e8;
  color: #784507;
}

.alert.error {
  border-color: #efb7bb;
  background: #fff0f1;
  color: #8c1e28;
}

.alert.info {
  border-color: #b8d6eb;
  background: #eff8ff;
  color: #15547f;
}

.section-heading {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 16px;
  margin: 6px 0 10px;
}

.section-heading.compact {
  margin-top: 22px;
}

.section-heading h2 {
  font-size: 16px;
}

.section-heading > :last-child {
  margin-left: auto;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.advanced-actions {
  position: relative;
}

.advanced-actions summary {
  min-height: 34px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  line-height: 34px;
  list-style: none;
}

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

.advanced-actions summary:hover {
  color: var(--teal-dark);
}

.advanced-actions > div {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 15;
  width: 270px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 6px;
  box-shadow: 0 10px 28px rgba(20, 41, 56, 0.16);
}

.advanced-action {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 7px 9px;
  color: var(--ink);
  text-align: left;
}

.advanced-action:hover {
  background: var(--surface-alt);
}

.advanced-action img {
  width: 17px;
  height: 17px;
}

.deployment-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.deployment-path > div {
  position: relative;
  min-width: 0;
  min-height: 86px;
  padding: 15px 14px 13px 54px;
}

.deployment-path > div + div {
  border-left: 1px solid var(--line);
}

.deployment-path span,
.wizard-step-heading > span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5f5f3;
  color: var(--teal-dark);
  font-weight: 700;
}

.deployment-path span {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 28px;
  height: 28px;
}

.deployment-path strong,
.deployment-path small {
  display: block;
}

.deployment-path strong {
  font-size: 13px;
}

.deployment-path small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  height: 48px;
  border-bottom: 1px solid #e9eef1;
  padding: 9px 13px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-alt);
  color: #425268;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fafcfd;
}

td small,
.muted {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.empty-cell {
  height: 126px;
  color: var(--muted);
  text-align: center;
}

.actions-column {
  text-align: right;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.primary-row-actions {
  align-items: center;
  flex-wrap: nowrap;
}

.row-action-menu {
  position: relative;
}

.row-action-menu > summary {
  list-style: none;
  cursor: pointer;
}

.row-action-menu > summary::-webkit-details-marker {
  display: none;
}

.row-action-menu-content {
  display: none;
  min-width: 190px;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  padding: 5px;
  box-shadow: var(--shadow);
}

.row-action-menu[open] .row-action-menu-content {
  display: flex;
  margin-top: 5px;
}

.row-action-menu-content button {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 0 9px;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

.row-action-menu-content button:hover {
  background: var(--surface-alt);
}

.row-action-menu-content img {
  width: 16px;
  height: 16px;
}

.button,
.icon-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 600;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  border-color: #cbd5dc;
  background: #fff;
}

.button.secondary:hover {
  border-color: #91a5b1;
  background: #f7fafb;
}

.button.danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.button.small {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.button img {
  filter: none;
}

.button.primary img,
.button.danger img {
  filter: brightness(0) invert(1);
}

.icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
  border-color: #d5dde2;
  background: #fff;
}

.mobile-menu {
  display: none;
}

.badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.badge.online,
.badge.succeeded,
.badge.verified {
  border-color: #9dd8b8;
  background: #eefaf3;
  color: var(--green);
}

.badge.warning,
.badge.canceled,
.badge.running,
.badge.queued {
  border-color: #edca8d;
  background: #fff8e8;
  color: var(--amber);
}

.badge.offline,
.badge.failed,
.badge.unverified {
  border-color: #efb7bb;
  background: #fff0f1;
  color: var(--red);
}

.badge.unknown {
  border-color: #cbd5dc;
  background: #f5f7f8;
  color: var(--muted);
}

.job-list {
  display: grid;
  gap: 8px;
}

.job-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 11px 13px;
}

.job-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 5px;
  background: #e9f6f5;
}

.job-icon img {
  width: 18px;
  height: 18px;
}

.job-copy strong {
  display: block;
  font-size: 13px;
}

.job-copy > span {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
}

.job-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.job-list.detailed .job-item {
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: start;
}

.job-latest-log {
  overflow: hidden;
  max-width: 720px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail-button {
  align-self: center;
}

.job-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.fingerprint-value {
  display: block;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-wrap: anywhere;
  background: var(--surface-muted);
}

.job-log {
  grid-column: 2 / -1;
  max-height: 210px;
  overflow: auto;
  border: 1px solid #27394a;
  border-radius: 4px;
  background: #152531;
  color: #d9e8eb;
  padding: 10px 12px;
  font-family: Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.dialog-log {
  grid-column: auto;
  max-height: 60vh;
  margin: 14px 0 0;
}

.job-log-status {
  margin-top: 14px;
}

.check-list {
  display: grid;
  gap: 8px;
}

.system-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.system-summary-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 5px;
  background: var(--surface);
  padding: 12px;
}

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

.system-summary-item span {
  color: var(--muted);
  font-size: 12px;
}

.system-summary-item strong {
  margin-top: 7px;
  font-size: 21px;
}

.source-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 2.3fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  padding: 12px 14px;
  margin-bottom: 24px;
}

.source-summary strong,
.source-summary small {
  display: block;
}

.source-summary small {
  margin-top: 4px;
  color: var(--muted);
}

.source-summary dl {
  display: grid;
  grid-template-columns: repeat(6, minmax(80px, 1fr));
  gap: 8px;
  margin: 0;
}

.source-summary dl div {
  min-width: 0;
}

.source-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.source-summary dd {
  margin: 3px 0 0;
  font-weight: 600;
}

.source-summary .latest-migration {
  grid-column: 1 / -1;
  margin-top: 0;
  overflow-wrap: anywhere;
}

.check-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  padding: 12px 14px;
}

.check-item > img {
  width: 20px;
  height: 20px;
}

.check-item strong,
.check-item small {
  display: block;
}

.check-item small {
  margin-top: 3px;
  color: var(--muted);
}

.modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0;
  box-shadow: 0 18px 60px rgba(20, 41, 56, 0.2);
}

.modal::backdrop {
  background: rgba(11, 28, 39, 0.46);
}

.compact-modal {
  width: min(520px, calc(100vw - 32px));
}

.wide-modal {
  width: min(860px, calc(100vw - 32px));
}

.content-modal {
  overflow-x: hidden;
  padding: 18px;
}

.modal form {
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin: -18px -18px 18px;
  padding: 16px 18px;
}

.modal-header h2 {
  font-size: 17px;
}

.modal-header .icon-button {
  margin-left: auto;
}

.wizard-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 17px 0 11px;
}

.modal-header + .wizard-step-heading {
  margin-top: 0;
}

.wizard-step-heading > span {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.wizard-step-heading strong,
.wizard-step-heading small {
  display: block;
}

.wizard-step-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.hidden {
  display: none !important;
}

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

label {
  display: grid;
  gap: 6px;
  color: #36465a;
  font-size: 12px;
  font-weight: 600;
}

label.full-width {
  grid-column: 1 / -1;
}

label > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.checkbox-field {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafb;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
}

.template-choice-hint {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.template-choice-hint strong {
  color: #26384d;
}

.safety-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid #b8ddd8;
  border-radius: 5px;
  background: #f2fbfa;
  padding: 10px 12px;
  color: #28524f;
  font-size: 12px;
}

.safety-note img {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.project-mail-server-panel > div {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.project-mail-server-panel p,
.section-intro small {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.section-intro {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.inline-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dns-check-status {
  border-top: 1px solid #cce6e2;
  padding-top: 8px;
  color: var(--muted);
}

.dns-check-status.success {
  color: #087a66;
  font-weight: 700;
}

.dns-check-status.error {
  color: #a52a34;
  font-weight: 700;
}

.mail-dns-guide {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.mail-dns-guide p,
.mail-dns-guide ol {
  margin: 0;
}

.mail-dns-guide ol {
  display: grid;
  gap: 4px;
  padding-left: 19px;
}

.mail-dns-table {
  box-shadow: none;
}

.mail-dns-table table {
  font-size: 11px;
}

.mail-dns-table th,
.mail-dns-table td {
  height: auto;
  padding: 7px 9px;
}

.mail-dns-table code {
  user-select: all;
  white-space: nowrap;
}

.warning-note {
  border-color: #efcf8d;
  background: #fffaf0;
  color: #704f13;
}

.secret-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-alt);
  padding: 12px;
}

.secret-meta > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.secret-meta span {
  color: var(--muted);
  font-size: 11px;
}

.secret-meta strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
}

.secret-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.secret-control .button {
  min-height: 38px;
}

.favicon-picker {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.favicon-picker > img {
  width: 48px;
  height: 48px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.favicon-picker input {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5dc;
  border-radius: 5px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
  outline: 0;
}

input,
select {
  height: 38px;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 9px 10px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(8, 127, 118, 0.12);
}

.release-code-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

#releaseDetailDialog {
  padding: 18px;
}

.release-detail-content {
  display: grid;
  gap: 14px;
}

.release-detail-grid,
.version-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.release-detail-grid > div,
.version-grid > div,
.release-notes {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-alt);
  padding: 11px 12px;
}

.release-detail-grid span,
.version-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.release-detail-grid code,
.artifact-list code {
  overflow-wrap: anywhere;
}

.release-notes p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 16px;
}

.artifact-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  margin-top: 9px;
}

.artifact-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 7px 2px;
}

.comparison-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}

.modal > form > label + label {
  margin-top: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin: 18px -18px -18px;
  padding: 14px 18px;
}

.split-actions {
  justify-content: space-between;
}

.settings-panel {
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.settings-divider {
  height: 1px;
  margin: 32px 0;
  background: var(--line);
}

.activity-backups-heading {
  margin-top: 28px;
}

.settings-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.settings-panel-heading h3 {
  margin: 0;
  font-size: 16px;
}

.settings-panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.settings-panel-heading > :last-child {
  margin-left: auto;
}

.check-row {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-alt);
  padding: 8px 10px;
}

.check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.inline-actions {
  margin: 16px 0 0;
  padding: 14px 0 0;
}

.selection-column {
  width: 48px;
  text-align: center;
}

.selection-column input {
  width: 16px;
  height: 16px;
}

.modal-table {
  max-height: min(55vh, 480px);
  overflow: auto;
  box-shadow: none;
}

#apiDocsDialog {
  padding: 18px;
}

.document-list {
  display: grid;
  gap: 8px;
}

.document-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.document-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 11px 12px;
  color: var(--ink);
  text-decoration: none;
}

.document-item:hover {
  border-color: #91a5b1;
  background: var(--surface-alt);
}

.document-item strong,
.document-item small {
  display: block;
}

.document-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.toast-region {
  position: fixed;
  z-index: 100;
  top: 16px;
  right: 16px;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 8px;
}

.toast {
  border: 1px solid;
  border-radius: 6px;
  background: #fff;
  padding: 11px 13px;
  box-shadow: 0 8px 30px rgba(20, 41, 56, 0.16);
  animation: toast-in 160ms ease-out;
}

.toast.success {
  border-color: #9dd8b8;
  color: #126c3d;
}

.toast.error {
  border-color: #efb7bb;
  color: #941f2a;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

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

  .system-summary-grid {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

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

  .source-summary dl {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }

  .last-updated {
    display: none;
  }

  .journey-steps {
    grid-template-columns: 1fr;
  }

  .journey-step + .journey-step {
    border-top: 1px solid #e5eeec;
    border-left: 0;
  }

  .deployment-path {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 160ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 30px rgba(20, 41, 56, 0.2);
  }

  .workspace {
    min-height: 100vh;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    padding-right: 14px;
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .topbar-actions .button span {
    display: none;
  }

  .topbar-actions .button {
    width: 36px;
    padding: 0;
  }

  .content {
    padding: 16px 12px calc(28px + env(safe-area-inset-bottom));
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > :last-child {
    width: 100%;
    margin-left: 0;
  }

  .heading-actions {
    flex-wrap: wrap;
  }

  .heading-actions .button {
    flex: 1 1 210px;
  }

  .advanced-actions {
    width: 100%;
  }

  .advanced-actions > div {
    right: auto;
    left: 0;
    width: min(100%, 320px);
  }

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

  .release-detail-grid,
  .version-grid,
  .compare-row {
    grid-template-columns: 1fr;
  }

  .compare-row .button {
    width: 100%;
  }

  label.full-width {
    grid-column: auto;
  }

  .deployment-path {
    grid-template-columns: 1fr;
  }

  .deployment-path > div + div,
  .deployment-path > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 470px) {
  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .summary-item {
    min-width: 0;
    padding: 12px;
  }

  .summary-item strong {
    font-size: 22px;
  }

  .system-summary-grid {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .source-summary dl {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .secret-meta > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .secret-control {
    grid-template-columns: 1fr 1fr;
  }

  .secret-control input {
    grid-column: 1 / -1;
  }

  .job-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .job-list.detailed .job-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .job-item > .badge {
    grid-column: 2;
    justify-self: start;
  }

  .job-detail-button {
    grid-column: 2;
    justify-self: start;
  }

  .modal-actions,
  .split-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }
}
/* Control Center server-mode sign in */
.control-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(13, 148, 136, 0.18), transparent 38%),
    #f5f7fb;
}

.control-login[hidden] {
  display: none;
}

.control-login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 20px;
  padding: 32px;
  border: 1px solid #dce3ed;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.control-login-card h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.control-login-card p {
  margin: 0;
  color: #64748b;
}

.control-login-card label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.control-login-card input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
}

.login-brand {
  color: #0f172a;
}
