:root {
  color-scheme: light;
  --navy: #0b314b;
  --navy-2: #12405f;
  --blue: #1a7aa8;
  --mint: #45d09e;
  --mint-2: #7ae0b8;
  --gold: var(--mint);
  --gold-2: var(--mint-2);
  --ink: #0f2433;
  --muted: #5a7280;
  --line: #d0e2ea;
  --canvas: #f3f7f9;
  --white: #ffffff;
  --bad: #a33b32;
  --shadow: 0 10px 30px rgba(11, 49, 75, 0.08);
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
h1, h2 { margin: 0; font-weight: 600; color: var(--navy); }
h1 { font-size: 1.7rem; letter-spacing: -0.03em; }
h2 { font-size: 1.05rem; }
code { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; color: var(--navy); }

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, #071f30 100%);
  color: #f5f8fc;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.85rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  padding: 0.75rem 0.65rem 0.9rem;
  margin-bottom: 0.35rem;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.brand-logo {
  width: min(9.5rem, 100%);
  height: auto;
  display: block;
}
.eyebrow, .nav-label, .fine, .muted, .sub, .crumb span { color: var(--muted); }
.eyebrow {
  margin: 0;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}
.brand .eyebrow { color: var(--navy); opacity: 0.72; }
nav { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 0.12rem; }
.nav-label {
  margin: 0.85rem 0.55rem 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(69, 208, 158, 0.9);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 0.55rem;
  padding: 0.38rem 0.6rem;
  background: transparent;
  color: #e7eef6;
  font-weight: 500;
  font-size: 0.9rem;
}
.nav-item svg, .nav-item svg path, .nav-item svg circle, .nav-item svg rect {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 3px 0 0 var(--mint);
  color: white;
}
.sidebar-foot { margin-top: auto; display: grid; gap: 0.45rem; padding: 0.8rem 0.35rem 0; }
.fine { margin: 0; color: rgba(231, 238, 246, 0.72); font-size: 0.8rem; }
.pill {
  margin: 0;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.pill.ok { color: var(--mint-2); border-color: rgba(69, 208, 158, 0.55); }
.pill.bad { color: #ffd0cb; border-color: rgba(255, 180, 172, 0.45); }

.workspace { min-width: 0; padding: 1.25rem 1.4rem 2rem; }
.topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.crumb { margin: 0 0 0.25rem; color: var(--navy); font-size: 0.92rem; }
.sub { margin: 0.2rem 0 0; }

.notice {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  background: #fff6f4;
  color: var(--bad);
  border: 1px solid #f0d0cb;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.toolbar .muted { white-space: nowrap; font-size: 0.88rem; }
#filter { flex: 1 1 220px; min-width: 0; padding: 0.6rem 0.75rem; }
#status-filter { width: auto; max-width: 100%; padding: 0.6rem 0.7rem; }
#filter, #status-filter, #create-form input:not([type="radio"]) {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 0.7rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}
.card, .env-card, dialog {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  box-shadow: var(--shadow);
}
.card {
  position: relative;
  min-height: 168px;
  padding: 0.95rem 0.95rem 0.8rem;
  display: grid;
  align-content: start;
  gap: 0.55rem;
}
.card header { display: flex; justify-content: space-between; gap: 1.6rem; align-items: start; }
.card h3 { font-size: 1rem; }
.meta, .links, .host { margin: 0; color: var(--muted); font-size: 0.86rem; }
.host, .links a { word-break: break-all; }
.dot {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #9aafc6;
}
.dot[data-status="running"] { background: var(--mint); box-shadow: 0 0 0 4px rgba(69, 208, 158, 0.18); }
.dot[data-status="failed"] { background: var(--bad); }
.dot[data-status="queued"],
.dot[data-status="cloning"],
.dot[data-status="building"],
.dot[data-status="starting"] { background: var(--blue); }
.card-icon {
  position: absolute;
  top: 2.35rem;
  right: 0.85rem;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--blue);
}
.card-icon path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.card-actions, .actions, .logs-bar, .dialog-head { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.card-actions { margin-top: 0.2rem; }
.card-actions button { padding: 0.32rem 0.55rem; font-size: 0.78rem; }

button, .primary {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: var(--mint);
  color: #072433;
  font-weight: 600;
}
button.ghost {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
  font-weight: 500;
}
button.danger { background: var(--white); color: var(--bad); border: 1px solid #f0d0cb; font-weight: 500; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
#open-create { padding: 0.7rem 1rem; }

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 0.95rem;
  padding: 1.5rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.env-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.env-card { padding: 1rem 1.05rem; }
.env-card p { color: var(--muted); line-height: 1.5; }
.env-card.wide { grid-column: 1 / -1; }

.home-dashboard {
  display: grid;
  gap: 1rem;
}
.home-dashboard-static { animation: none; }
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.8fr);
  gap: 1.1rem;
  align-items: end;
  padding: 1.35rem 1.4rem;
  border-radius: 1.1rem;
  border: 1px solid color-mix(in srgb, var(--mint) 28%, var(--line));
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--mint) 28%, transparent), transparent 55%),
    linear-gradient(135deg, #0b314b 0%, #12405f 48%, #1a7aa8 100%);
  color: #f5f8fc;
  box-shadow: 0 16px 36px rgba(11, 49, 75, 0.18);
}
.home-hero .eyebrow { color: var(--mint-2); margin-bottom: 0.35rem; }
.home-hero h2 {
  color: #fff;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}
.home-hero-lead {
  margin: 0;
  color: rgba(245, 248, 252, 0.82);
  line-height: 1.45;
  max-width: 36rem;
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.home-hero-actions .ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.home-hero-actions .primary {
  box-shadow: 0 8px 18px rgba(7, 36, 51, 0.25);
}
.home-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.home-metric {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.home-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(11, 49, 75, 0.1);
}
.home-metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  background: var(--line);
}
.home-metric.tone-ok::before { background: var(--mint); }
.home-metric.tone-warn::before { background: #d4a017; }
.home-metric.tone-bad::before { background: var(--bad); }
.home-metric-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-metric .stat { margin-top: 0.35rem; }
.home-metric .fine { margin: 0.35rem 0 0; }
.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 0.85rem;
}
.home-panel { padding: 1.05rem 1.1rem 1.15rem; }
.home-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.home-panel-head .ghost { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.home-empty {
  display: grid;
  gap: 0.45rem;
  padding: 0.35rem 0 0.15rem;
}
.home-empty-title {
  margin: 0;
  color: var(--navy);
  font-weight: 650;
}
.home-recent-list { display: grid; gap: 0.45rem; }
.home-recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--canvas) 75%, #fff);
  border: 1px solid var(--line);
  position: relative;
  font-weight: 500;
}
.home-recent-row strong {
  display: block;
  color: var(--navy);
  margin-bottom: 0.1rem;
}
.home-recent-row span:not(.dot) {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
.home-recent-row .dot {
  position: static;
  flex: 0 0 auto;
}
.home-shortcuts { display: grid; gap: 0.45rem; margin-top: 0.75rem; }
.home-shortcut {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--canvas) 75%, #fff);
  border: 1px solid var(--line);
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.home-shortcut:hover {
  border-color: color-mix(in srgb, var(--mint) 45%, var(--line));
  background: #fff;
}
.home-shortcut strong { color: var(--navy); }
.home-shortcut span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
.monitor-live { display: grid; gap: 1rem; }
.monitor-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.chart-card .fine { margin: 0.15rem 0 0.55rem; }
.sparkline { position: relative; min-height: 6.2rem; }
.sparkline-svg {
  display: block;
  width: 100%;
  height: 6rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--canvas) 70%, #fff);
}
.sparkline-value {
  position: absolute;
  right: 0.55rem;
  top: 0.35rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--navy);
}
.gauge-card .gauge-track {
  margin-top: 0.65rem;
  height: 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 80%, #fff);
  overflow: hidden;
}
.gauge-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #1a7aa8);
  transition: width 0.4s ease;
}
.gauge-fill.warn { background: linear-gradient(90deg, #d4a017, #c0392b); }
.gauge-fill.danger { background: var(--bad); }
.monitor-stamp { margin: 0; }

dialog {
  width: min(44rem, calc(100vw - 2rem));
  min-width: 0;
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 28px 70px rgba(14, 42, 74, 0.28);
  overflow: hidden;
}
dialog::backdrop { background: rgba(10, 32, 58, 0.55); }
#create-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  max-height: calc(100vh - 2rem);
  padding: 0;
  gap: 0;
}
.dialog-head {
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f7fafc 100%);
  min-width: 0;
}
.dialog-head > div { min-width: 0; }
.dialog-head .eyebrow { margin: 0 0 0.15rem; color: var(--mint); }
.dialog-head h2 { font-size: 1.35rem; }
#create-close { padding: 0.4rem 0.75rem; }
.dialog-body {
  overflow: auto;
  min-width: 0;
  padding: 1.1rem 1.25rem 0.35rem;
  display: grid;
  gap: 0.9rem;
  background: var(--white);
}
.dialog-foot {
  justify-content: flex-end;
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid var(--line);
  background: #f4f7fb;
}
.lede { margin: 0; color: var(--muted); line-height: 1.45; }
#create-form .dialog-body > label,
#create-form .split > label,
#create-form fieldset { display: grid; gap: 0.4rem; }
#create-form .dialog-body > label,
#create-form .split > label,
#create-form legend {
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 600;
}
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }
.origin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.choice {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
}
.choice:has(input:checked) {
  border-color: var(--mint);
  background: #f2fcf8;
  box-shadow: inset 0 0 0 1px var(--mint);
}
.choice input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--navy);
  flex: 0 0 auto;
}
.choice strong { display: block; color: var(--navy); font-size: 0.95rem; }
.choice small { display: block; margin-top: 0.1rem; color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; min-width: 0; }
.split.three { grid-template-columns: 1fr 1fr 1fr; }
#create-form select {
  padding: 0.7rem 0.8rem;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--white);
  color: var(--ink);
}
#create-form input:not([type="radio"]) {
  padding: 0.7rem 0.8rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-weight: 400;
  color: var(--ink);
}
.form-error { margin: 0; color: var(--bad); }

#logs {
  position: fixed;
  z-index: 3;
  left: calc(248px + 1rem);
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.45rem;
}
.logs-bar {
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}
#logs-body {
  margin: 0;
  max-height: 34vh;
  overflow: auto;
  background: var(--navy);
  color: #f4f7fb;
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.note { margin: 0 0 0.8rem; color: var(--muted); }
.mini-form, .stack-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-bottom: 0.9rem; }
.stack-form { display: grid; max-width: 40rem; }
.mini-form label, .stack-form label { display: grid; gap: 0.3rem; min-width: 10rem; }
textarea {
  min-height: 5.5rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.data { width: 100%; border-collapse: collapse; background: var(--white); }
.sheet { background: var(--white); border: 1px solid var(--line); border-radius: 0.95rem; overflow: auto; }
.data th, .data td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; vertical-align: top; }
.data th { color: var(--muted); font-weight: 600; }
.stat { font-size: 1.6rem; color: var(--navy); margin: 0.2rem 0 0; }

.plan-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.45rem 0.8rem;
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--white);
}
.plan-features legend {
  padding: 0 0.25rem;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 600;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
}
.check input { width: 1rem; height: 1rem; accent-color: var(--navy); }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at top, rgba(69, 208, 158, 0.28) 0%, transparent 48%),
    linear-gradient(180deg, var(--navy) 0%, #071f30 100%);
}
.login-card {
  width: min(26rem, 100%);
  display: grid;
  gap: 0.8rem;
  justify-items: stretch;
  padding: 1.4rem 1.35rem 1.2rem;
  background: var(--white);
  border-radius: 1.15rem;
  box-shadow: 0 28px 70px rgba(8, 24, 48, 0.28);
}
.login-logo {
  width: min(12rem, 70%);
  height: auto;
  justify-self: center;
  margin: 0.2rem 0 0.15rem;
}
.login-card h1 { font-size: 1.7rem; text-align: center; }
.login-card label { display: grid; gap: 0.35rem; color: var(--navy); font-size: 0.84rem; font-weight: 600; }
.login-card input {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  font-weight: 400;
  color: var(--ink);
}
.login-card button { justify-self: start; }
.login-card .ghost { background: transparent; color: var(--navy); border: 1px solid color-mix(in srgb, var(--navy) 22%, transparent); }
.totp-secret {
  display: block;
  margin: 0.25rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  word-break: break-all;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--navy) 6%, white);
  border-radius: 8px;
}
.totp-backups {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.7;
}
.store-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.store-filters button {
  border: 1px solid color-mix(in srgb, var(--navy) 18%, transparent);
  background: transparent;
  color: var(--navy);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}
.store-filters button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 0.9rem;
}
.store-card {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, white 88%, var(--mint, #45d09e) 6%);
}
.store-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy);
}
.store-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.store-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.store-card .primary {
  justify-self: start;
  margin-top: 0.25rem;
}
.store-ai {
  margin-bottom: 1.4rem;
  max-width: 42rem;
}
.store-ai textarea {
  width: 100%;
  min-height: 5rem;
  resize: vertical;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--navy) 18%, transparent);
}
#store-ai-compose {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  min-height: 14rem;
}
.store-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.store-catalog-title {
  margin: 0.4rem 0 0.5rem;
  font-size: 1.15rem;
  color: var(--navy);
}
#install-dialog {
  width: min(28rem, calc(100vw - 2rem));
}
#install-form .dialog-body {
  display: grid;
  gap: 0.75rem;
}
#install-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 600;
}
#install-form input,
#install-form select {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--navy) 18%, transparent);
}
.alertify-notifier .ajs-message {
  border-radius: 10px;
  font-family: inherit;
}
.alertify-notifier .ajs-message.ajs-success {
  background: color-mix(in srgb, var(--mint, #45d09e) 88%, #0b314b);
  color: #07301f;
}
.alertify-notifier .ajs-message.ajs-error {
  background: color-mix(in srgb, var(--bad, #c0392b) 90%, #111);
  color: #fff;
}
.alertify .ajs-header {
  font-weight: 700;
  color: var(--navy, #0b314b);
}
.alertify .ajs-button.ajs-ok {
  background: var(--mint, #45d09e);
  color: #07301f;
  border-radius: 8px;
}
.alertify .ajs-button.ajs-ok.ajs-ok-danger {
  background: var(--bad, #c0392b);
  color: #fff;
}
.alertify .ajs-button.ajs-cancel {
  border-radius: 8px;
}
.alertify .ajs-dialog {
  border-radius: 14px;
  max-width: min(26rem, calc(100vw - 2rem));
  font-family: inherit;
}
.alertify .ajs-body .ajs-content {
  color: var(--navy, #0b314b);
  line-height: 1.45;
}
.alertify .ajs-footer .ajs-buttons .ajs-button {
  font: inherit;
  padding: 0.45rem 0.9rem;
}
.sidebar-foot .ghost {
  width: 100%;
  margin-top: 0.35rem;
  color: #f5f8fc;
  background: transparent;
  border-color: rgba(245, 248, 252, 0.28);
}

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  nav { max-height: 16rem; grid-template-columns: 1fr; }
  .sidebar-foot { margin-top: 0.8rem; }
  .topbar, .toolbar, .env-grid, .monitor-charts, .home-hero, .home-metrics, .home-lower, .split, .split.three, .origin-row { grid-template-columns: 1fr; display: grid; }
  .home-hero-actions { justify-content: flex-start; }
  .dialog-foot { justify-content: stretch; }
  .dialog-foot button { width: 100%; }
  .toolbar .muted { margin-left: 0; }
  #logs { left: 1rem; }
}
