@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --header-bg: #161616;
  --header-text: #f4f4f4;
  --bg: #f4f4f4;
  --bg-elevated: #f4f4f4;
  --card-bg: #ffffff;
  --card-bg-hover: #f4f4f4;
  --text: #161616;
  --muted: #525252;
  --border: #e0e0e0;
  --input-border: #8d8d8d;
  --primary: #0f62fe;
  --primary-dark: #0043ce;
  --primary-active: #002d9c;
  --primary-soft: rgba(15, 98, 254, 0.1);
  --danger: #da1e28;
  --danger-active: #a2191f;
  --danger-soft: rgba(218, 30, 40, 0.1);
  --success: #24a148;
  --success-soft: rgba(36, 161, 72, 0.1);
  --success-text: #0e6027;
  --warning: #f1c21b;
  --warning-text: #684e00;
  --warning-soft: rgba(241, 194, 27, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-low: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-mid: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-high: 0 16px 40px rgba(0, 0, 0, 0.14), 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* ---- Dark theme ----
   Same token set, IBM Carbon "g100"-ish values. Applied automatically when
   the OS is in dark mode (unless the user picked "light" explicitly via
   the toggle), and always when the user picked "dark" explicitly -
   `[data-theme]` on <html> wins over the OS preference either way. The
   header/topbar is already dark in the light theme on purpose (matches
   IBM Cloud console chrome) so it isn't touched here. */
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --bg: #161616;
    --bg-elevated: #262626;
    --card-bg: #262626;
    --card-bg-hover: #333333;
    --text: #f4f4f4;
    --muted: #a8a8a8;
    --border: #393939;
    --input-border: #6f6f6f;
    --primary: #4589ff;
    --primary-dark: #78a9ff;
    --primary-active: #a6c8ff;
    --primary-soft: rgba(69, 137, 255, 0.16);
    --danger: #fa4d56;
    --danger-active: #ff8389;
    --danger-soft: rgba(250, 77, 86, 0.16);
    --success: #42be65;
    --success-soft: rgba(66, 190, 101, 0.16);
    --success-text: #42be65;
    --warning: #f1c21b;
    --warning-text: #f1c21b;
    --warning-soft: rgba(241, 194, 27, 0.16);
    --shadow-low: 0 1px 3px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.26);
    --shadow-mid: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-high: 0 16px 40px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.32);
  }
}
:root[data-theme="dark"] {
  --bg: #161616;
  --bg-elevated: #262626;
  --card-bg: #262626;
  --card-bg-hover: #333333;
  --text: #f4f4f4;
  --muted: #a8a8a8;
  --border: #393939;
  --input-border: #6f6f6f;
  --primary: #4589ff;
  --primary-dark: #78a9ff;
  --primary-active: #a6c8ff;
  --primary-soft: rgba(69, 137, 255, 0.16);
  --danger: #fa4d56;
  --danger-active: #ff8389;
  --danger-soft: rgba(250, 77, 86, 0.16);
  --success: #42be65;
  --success-soft: rgba(66, 190, 101, 0.16);
  --success-text: #42be65;
  --warning: #f1c21b;
  --warning-text: #f1c21b;
  --warning-soft: rgba(241, 194, 27, 0.16);
  --shadow-low: 0 1px 3px rgba(0, 0, 0, 0.32), 0 1px 2px rgba(0, 0, 0, 0.26);
  --shadow-mid: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-high: 0 16px 40px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Views share one page and are toggled via display:none <-> block, which
   restarts a CSS animation each time - so entering a screen gets a small,
   consistent settle-in instead of an instant, jarring swap. */
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.view { animation: viewEnter 0.2s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}

/* IBM Cloud console's top shell bar is always near-black, even on an
   otherwise light theme - this is one of the most recognizable parts of
   the IBM UI, so it's kept dark deliberately rather than following the
   light page background. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid #393939;
  transition: box-shadow 0.15s ease;
}

.topbar.scrolled { box-shadow: var(--shadow-mid); }

.brand { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; letter-spacing: 0; color: var(--header-text); min-width: 0; flex-shrink: 1; }
.brand-mark {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #0f62fe;
  padding: 2px 6px;
  border-radius: 2px;
}
.brand-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nike-mark { display: inline-flex; align-items: center; flex-shrink: 0; }
.nike-mark img { width: 36px; height: auto; display: block; }

.whoami { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #c6c6c6; flex-shrink: 0; }
#whoamiEmail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.topbar .btn-ghost { color: #78a9ff; flex-shrink: 0; white-space: nowrap; }
.topbar .btn-ghost:active { background: rgba(120, 169, 255, 0.15); }

/* Everything at once (two logos, a title, three icons, an email, and a
   logout link) simply doesn't fit a phone-width topbar - the title and
   email are the two things that add nothing an icon/avatar doesn't already
   say, so they're what gives way first, in two steps as space gets tighter. */
@media (max-width: 480px) {
  #whoamiEmail { display: none; }
  .brand-title { display: none; }
  .nike-mark img { width: 30px; }
}

#app { max-width: 640px; margin: 0 auto; padding: 16px 12px 80px; }

.view.hidden, .hidden { display: none !important; }

/* Shown by default (see index.html) the instant the page loads, before
   checkSession() has resolved and decided whether to show the provider
   picker or jump straight into a logged-in view - without this the
   provider picker itself used to flash on screen first even for an
   already-logged-in user, for however long that one request took. */
.loading-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
}
.loading-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: loading-blur-in 1s cubic-bezier(0.22, 0.8, 0.2, 1) both;
}
.loading-ibm-badge {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: #0f62fe;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.loading-ninja { font-size: 30px; line-height: 1; }
/* The IBM logo (and ninja beside it) comes into focus as the page loads -
   starts blurred/faded/slightly scaled down and sharpens into place,
   rather than just popping in at full clarity immediately. */
@keyframes loading-blur-in {
  from { opacity: 0; filter: blur(14px); transform: scale(0.92); }
  to { opacity: 1; filter: blur(0); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .loading-mark { animation: none; }
}
.loading-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  animation: loading-fade-up 0.6s ease-out 0.15s both;
}
.loading-tagline {
  margin: -10px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  max-width: 28ch;
  animation: loading-fade-up 0.6s ease-out 0.3s both;
}
@keyframes loading-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-title, .loading-tagline { animation: none; }
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: loading-spin 0.8s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .loading-spinner { animation: none; }
}
.loading-text { color: var(--muted); font-size: 13px; margin: 0; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-low);
}

.login-card { margin-top: 8vh; }
.login-hero { text-align: center; margin-bottom: 18px; }
.login-mark {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: #0f62fe;
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 14px;
}
.login-hero h1 { font-size: 24px; margin-bottom: 4px; }
.nike-mark-lg { margin-left: 10px; vertical-align: middle; }
.nike-mark-lg img { width: 74px; }
.login-footnote { margin-top: 16px; font-size: 12px; }
.login-back-btn { margin: 0 0 10px; }

.provider-landing-card { margin-top: 6vh; }
.provider-landing-mark { display: block; font-size: 40px; line-height: 1; margin-bottom: 10px; }
.provider-landing-card .login-hero h1 { font-size: 26px; }
.provider-landing-card .login-hero p { max-width: 34ch; margin: 0 auto; }

.provider-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.provider-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.provider-card:active { transform: scale(0.98); }
.provider-card:hover { border-color: var(--provider-accent, var(--primary)); box-shadow: var(--shadow-low); }
.provider-card-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 34px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--provider-accent, var(--primary));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.provider-card-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.provider-card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.provider-card-sub { font-size: 12.5px; color: var(--muted); }
.provider-card-chevron { flex-shrink: 0; display: flex; color: var(--muted); }
.provider-card-chevron svg { width: 18px; height: 18px; }

.provider-card-ibm { --provider-accent: #0f62fe; }
.provider-card-azure { --provider-accent: #0078d4; }
.provider-card-gcp { --provider-accent: #4285f4; }

h1 { font-size: 20px; font-weight: 600; margin: 0 0 8px; letter-spacing: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--text); }

.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }

label { display: block; font-size: 12px; font-weight: 600; margin: 10px 0 6px; color: var(--muted); }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  text-transform: none;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.mono-textarea, .mono-input {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}
.mono-textarea { resize: vertical; }

input[type="text"], input[type="password"], textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
textarea { resize: vertical; }
.login-card textarea { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

input::placeholder { color: var(--muted); }

select {
  width: 100%;
  padding: 12px 36px 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  color: var(--text);
  margin-top: 10px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23525252' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.container-tab {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.container-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

#containerTabs { display: flex; flex-wrap: wrap; gap: 6px; background: none; border: none; padding: 0; margin-top: 8px; }

.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 160px; }

/* Carbon-style underlined tabs rather than a filled pill switcher. */
/* Visually hidden but still in the DOM/tab order - unlike display:none,
   browsers still pick this up for password-manager autofill/save
   heuristics (the hidden username field paired with the API key field on
   the login form). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tabs {
  display: flex;
  gap: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0;
  margin-bottom: 14px;
}

.tab-btn {
  flex: 1;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  padding: 11px 8px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* Top-level nav can outgrow a phone's width as tabs are added - scroll it
   horizontally instead of squeezing/wrapping every label onto two lines. */
#mainTabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 2px;
  border-bottom: none;
  padding-bottom: 8px;
}
#mainTabs::-webkit-scrollbar { display: none; }
#mainTabs .tab-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  border-bottom: none;
}
#mainTabs .tab-btn:active { background: var(--bg-elevated); }
#mainTabs .tab-btn.active {
  background: var(--primary-soft);
  border-bottom: none;
}
#mainTabs .tab-btn-icon { display: flex; color: inherit; opacity: 0.75; }
#mainTabs .tab-btn.active .tab-btn-icon { opacity: 1; }
#mainTabs .tab-btn-icon svg { width: 15px; height: 15px; }

#clusterFilter {
  margin-top: 10px;
}

.cluster-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
  margin-left: 6px;
}

.cluster-type-openshift { background: rgba(138, 63, 252, 0.1); color: #6929c4; }
.cluster-type-kubernetes { background: var(--primary-soft); color: var(--primary-dark); }

.advanced { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; }
.advanced summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.advanced .inline-form { margin-top: 12px; align-items: flex-end; }
.advanced .field-group { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 160px; }
.advanced .field-group.field-narrow { flex: 0 1 130px; min-width: 110px; }
.advanced .field-group label { margin: 0 0 6px; }
.advanced select {
  width: 100%;
  margin-top: 0;
  padding: 12px 8px;
  font-size: 14px;
}
.advanced .inline-form > .btn { flex: 0 0 auto; }

/* ---- "Find a toolchain" - scoped modern refresh ----
   Rest of the app deliberately follows flat IBM Carbon (sharp corners,
   underlined inputs, hard shadows). This page gets a softer, rounded,
   more "SaaS search bar" treatment instead - scoped to #toolchainView so
   nothing else on the site is affected. Redefining the shared --radius/
   --shadow tokens here (rather than duplicating every rule) lets cards,
   buttons, inputs, and list items pick it up automatically since they all
   already reference these tokens. */
#toolchainView {
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-low: 0 1px 3px rgba(0, 0, 0, 0.05), 0 6px 16px rgba(0, 0, 0, 0.06);
  --shadow-mid: 0 4px 10px rgba(0, 0, 0, 0.07), 0 10px 24px rgba(0, 0, 0, 0.08);
}

#toolchainView .card { border-color: transparent; padding: 22px; }

#toolchainView input[type="text"],
#toolchainView select {
  border: 1px solid var(--border);
  background-color: var(--card-bg);
}

#toolchainView input[type="text"]:focus,
#toolchainView select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

#toolchainView .list-item {
  border-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
#toolchainView .list-item:hover { box-shadow: var(--shadow-mid); transform: translateY(-1px); }

#toolchainView .entity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
#toolchainView .entity-icon svg { width: 20px; height: 20px; }
#toolchainView .entity-icon-prod { background: rgba(138, 63, 252, 0.14); color: #6929c4; }
#toolchainView .entity-icon-stg { background: var(--warning-soft); color: var(--warning-text); }
#toolchainView .entity-icon-dev { background: var(--success-soft); color: var(--success-text); }

#toolchainView .advanced {
  border-top: none;
  margin-top: 18px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}
#toolchainView .advanced[open] { padding-bottom: 18px; }

/* ---- Deploy Plan - same scoped modern refresh as #toolchainView ----
   Rounded cards/inputs/chips/list-items with softer shadows, same recipe
   (redefine the shared tokens locally) so the rest of the app keeps its
   flat IBM Carbon look. */
#deployPlanView {
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-low: 0 1px 3px rgba(0, 0, 0, 0.05), 0 6px 16px rgba(0, 0, 0, 0.06);
  --shadow-mid: 0 4px 10px rgba(0, 0, 0, 0.07), 0 10px 24px rgba(0, 0, 0, 0.08);
}

#deployPlanView .card { border-color: transparent; padding: 22px; }

#deployPlanView input[type="text"],
#deployPlanView select {
  border: 1px solid var(--border);
  background-color: var(--card-bg);
}
#deployPlanView input[type="text"]:focus,
#deployPlanView select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

#deployPlanView .list-item {
  border-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
#deployPlanView .list-item:hover { box-shadow: var(--shadow-mid); transform: translateY(-1px); }

#deployPlanView .deploy-toolchain-btn { box-shadow: none; }

#deployPlanView .tabs { margin-top: 16px; }

#deployPlanView .chip {
  padding: 6px 12px;
  font-size: 12.5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#deployPlanView .status-badge { border-radius: 999px; padding: 5px 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:disabled { opacity: 0.5; cursor: default; }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-low); }
.btn-primary:active { background: var(--primary-active); }
.btn-block { width: 100%; margin-top: 12px; }
.btn-ghost { background: transparent; color: var(--primary); padding: 8px 10px; min-height: 36px; }
.btn-ghost:active { background: var(--primary-soft); }
.btn-danger { background: var(--danger); color: #fff; padding: 8px 12px; min-height: 36px; }
.btn-danger:active { background: var(--danger-active); }
.btn-icon { padding: 6px 10px; min-height: 32px; font-size: 13px; }

/* Hover lift only on devices with a real pointer (mouse/trackpad) - gated
   behind (hover: hover) so a touch tap doesn't leave the button looking
   "stuck" in its hovered state after the finger lifts. */
@media (hover: hover) {
  .btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-mid); transform: translateY(-1px); }
  .btn-ghost:hover { background: var(--primary-soft); }
  .btn-danger:hover { background: var(--danger-active); box-shadow: var(--shadow-mid); transform: translateY(-1px); }
}

.deploy-toolchain-btn { justify-content: flex-start; }
.deploy-toolchain-btn-icon { display: flex; flex-shrink: 0; opacity: 0.9; }
.deploy-toolchain-btn-icon svg { width: 16px; height: 16px; }
.deploy-toolchain-btn-label { flex: 1; text-align: left; }
.deploy-toolchain-btn-chevron { display: flex; flex-shrink: 0; opacity: 0.8; }
.deploy-toolchain-btn-chevron svg { width: 16px; height: 16px; }
.btn-sm { font-size: 13px; }

.run-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.error {
  margin-top: 10px;
  color: #a2191f;
  background: var(--danger-soft);
  border-left: 3px solid var(--danger);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.notice {
  margin-top: 10px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.analysis-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--primary);
  margin-bottom: 8px;
}

.analysis-body {
  line-height: 1.55;
  color: var(--text);
  overflow-wrap: anywhere;
}
.analysis-body p { margin: 0 0 10px; }
.analysis-body p:last-child { margin-bottom: 0; }
.analysis-body code {
  background: rgba(15, 98, 254, 0.12);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  word-break: break-all;
}
.analysis-body strong { font-weight: 600; }

.list { display: flex; flex-direction: column; gap: 10px; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-low);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.list-item:active { background: var(--card-bg-hover); box-shadow: none; transform: translateY(1px); }
.list-item.non-interactive { cursor: default; opacity: 0.85; }
.list-item.non-interactive:active { background: var(--card-bg); box-shadow: var(--shadow-low); transform: none; }
@media (hover: hover) {
  .list-item:not(.non-interactive):hover { border-color: var(--primary); box-shadow: var(--shadow-mid); transform: translateY(-1px); }
}

.list-item > div:first-child { min-width: 0; flex: 1; }
.list-item-title { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.list-item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }

.row-between { display: flex; align-items: center; justify-content: space-between; }

.status-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
  margin-bottom: 6px;
}

.status-succeeded, .status-normal, .status-active, .status-ok { background: var(--success-soft); color: var(--success-text); }
.status-failed, .status-error, .status-critical { background: var(--danger-soft); color: var(--danger); }
.status-running, .status-pending, .status-queued, .status-waiting, .status-deploying, .status-warning, .status-waiting-on-client, .status-in-progress { background: var(--warning-soft); color: var(--warning-text); }
.status-new { background: var(--primary-soft); color: var(--primary); }
.status-cancelled, .status-deleting { background: var(--bg-elevated); color: var(--muted); }

.log-content {
  white-space: pre-wrap;
  word-break: break-word;
  background: #161616;
  color: #e0e0e0;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  max-height: 60vh;
  overflow: auto;
  /* Without this, iOS Safari often fails to hand a touch-drag to this
     nested scroll box at all - the swipe just scrolls the outer page
     instead, since the browser can't tell which element should own the
     gesture. Same fix already used on #mainTabs. */
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
}

/* ---- Log line coloring - level, echoed shell commands, timestamps ---- */

.log-line { display: block; }
.log-ts { color: #7a7a7a; margin-right: 2px; }
.log-command { color: #569cd6; }
.log-info { color: #4fc1ff; }
.log-debug { color: #8a8a8a; }
.log-success { color: #89d185; }
.log-warn { color: #e5c07b; }
.log-error, .log-fatal {
  color: #f14c4c;
  background: rgba(241, 76, 76, 0.1);
  border-left: 2px solid #f14c4c;
  padding-left: 6px;
  margin-left: -8px;
}
.log-warn {
  background: rgba(229, 192, 123, 0.08);
  border-left: 2px solid #e5c07b;
  padding-left: 6px;
  margin-left: -8px;
}

/* ---- Pipeline run: task timeline + "pro" log viewer chrome ---- */

.run-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.run-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.run-step-item:hover { box-shadow: var(--shadow-low); }
.run-step-item.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.run-step-waiting { cursor: default; opacity: 0.7; }
.run-step-waiting:hover { box-shadow: none; }

.run-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--success);
}
.run-step-running .run-step-dot {
  background: var(--primary);
  animation: runStepPulse 1.4s ease-in-out infinite;
}
.run-step-failed .run-step-dot { background: var(--danger); }
.run-step-cancelled .run-step-dot { background: var(--muted); }
.run-step-waiting .run-step-dot {
  background: var(--border);
  border: 1px dashed var(--muted);
  animation: runStepPulse 1.4s ease-in-out infinite;
}

@keyframes runStepPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .run-step-running .run-step-dot, .run-step-waiting .run-step-dot { animation: none; }
}

.run-step-body { flex: 1; min-width: 0; }
.run-step-title {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.run-step-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.run-step-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success-text);
}
.run-step-badge-running { background: var(--primary-soft); color: var(--primary-dark); }
.run-step-badge-failed { background: var(--danger-soft); color: var(--danger); }
.run-step-badge-cancelled { background: var(--bg-elevated); color: var(--muted); }

.run-log-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #323235;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid #3a3a3d;
  border-bottom: none;
}
.run-log-title {
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
  color: #c9c9cc;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.run-log-live-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ff6b6b;
  animation: runStepPulse 1.4s ease-in-out infinite;
}
#runLogViewer .log-content {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-top: none;
  margin-top: 0;
}

.analyze-log-btn { margin-top: 10px; width: 100%; }


.terminal-toolbar {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.terminal-toolbar .btn {
  flex: 1;
  min-width: 44px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* A real terminal-app look (VS Code / iTerm-style dark theme, a proper
   title bar with traffic lights) instead of the earlier green-on-black
   CRT/hacker theme - reads as a professional dev tool rather than a
   novelty, and the softer palette is easier to stare at for a while. */
.terminal-window {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-mid, 0 4px 16px rgba(0, 0, 0, 0.18));
  border: 1px solid #3a3a3d;
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: #323235;
  border-bottom: 1px solid #232325;
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.terminal-dot-red { background: #ff5f57; }
.terminal-dot-yellow { background: #febc2e; }
.terminal-dot-green { background: #28c840; }
.terminal-chrome-title {
  flex: 1;
  text-align: center;
  margin-right: 33px; /* balances the three dots so the title is truly centered */
  font-size: 12px;
  font-weight: 500;
  color: #c9c9cc;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-tab-strip {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.terminal-tab-strip:empty { display: none; }
.terminal-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: 7px 7px 0 0;
  background: #2a2a2d;
  color: #b3b3b6;
  font-size: 12.5px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
  border: 1px solid #3a3a3d;
  border-bottom: none;
}
.terminal-tab.active {
  background: #1e1e1e;
  color: #ffffff;
}
.terminal-tab-close {
  border-radius: 4px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  color: inherit;
  opacity: 0.6;
}
.terminal-tab-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.terminal-xterm-container {
  position: relative;
  height: 50vh;
  min-height: 280px;
}
.terminal-xterm {
  display: none;
  position: absolute;
  inset: 0;
  padding: 10px 8px;
  background: #1e1e1e;
}
.terminal-xterm.active { display: block; }
.terminal-xterm .xterm-viewport { border-radius: 0; }

/* ---- Deployment / pod workload cards ---- */

.workload-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-low);
}

.workload-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; cursor: pointer; }
.workload-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

.scale-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.scale-control button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scale-control button:active { background: var(--primary); color: #fff; }
.scale-control span { font-size: 13px; font-weight: 600; min-width: 20px; text-align: center; }

.ce-app-image {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.ce-app-endpoint {
  font-size: 12px;
  color: var(--primary);
  overflow-wrap: anywhere;
  margin-top: -4px;
}
.ce-app-actions { gap: 6px; }
.ce-app-actions .btn { flex: none; }

.ce-scale-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
  padding: 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}
.ce-scale-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.ce-scale-label input {
  width: 52px;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
}
.ce-job-run-status { margin-top: 2px; }

.ce-revisions-list, .ce-run-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.ce-revision-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.ce-revision-name { font-weight: 600; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.ce-revision-row .status-badge { margin-bottom: 0; }
.ce-run-history { margin-top: 8px; }

.ce-env-list { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.ce-env-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.ce-env-edit-row:last-child { border-bottom: none; }
.ce-env-icon { display: flex; flex: none; color: var(--muted); width: 14px; }
.ce-env-icon svg { width: 14px; height: 14px; }
.ce-env-kind-select {
  flex: none;
  font-size: 11px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--muted);
}
.ce-env-name-input {
  flex: 1 1 120px;
  min-width: 90px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
}
.ce-env-value-field { display: flex; align-items: center; gap: 6px; flex: 2 1 160px; min-width: 120px; }
.ce-env-value-input, .ce-env-ref-select, .ce-env-key-select {
  flex: 1;
  min-width: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
}
.ce-env-show { flex: none; }
.ce-env-remove { flex: none; color: var(--danger); }
.ce-env-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }

/* ---- Toasts ---- */

.toast-stack {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  margin: 0 auto;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  animation: toast-in 0.18s ease-out;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }

.toast.leaving { animation: toast-out 0.18s ease-in forwards; }

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

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

/* ---- Confirm modal ---- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(22, 22, 22, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

/* confirmDialog() can be opened from inside another already-open modal
   (Delete/Save inside the ESO "View YAML" modal, etc.) - without this, both
   overlays share the same z-index and DOM order decides which paints on
   top, so the confirm dialog can render invisibly *behind* the modal that
   opened it: a "Delete" click looks like nothing happened, and dismissing
   the modal underneath then reveals (and can accidentally trigger) the
   confirm dialog that was silently waiting the whole time. */
#confirmOverlay { z-index: 300; }

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}

.modal-card {
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-high);
  animation: modalEnter 0.18s ease-out;
}

@keyframes modalEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal-card p { font-size: 14px; line-height: 1.5; margin: 0 0 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

.yaml-edit-card { max-width: min(90vw, 720px); }
.yaml-edit-textarea {
  width: 100%;
  height: 55vh;
  min-height: 320px;
  padding: 12px;
  background: #161616;
  color: #e0e0e0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  resize: vertical;
  margin-bottom: 10px;
}
.modal-actions .btn { flex: 1; }

/* A colored-but-still-editable JSON box: a plain <textarea> can't render
   per-token color, so this overlays a transparent-text textarea (visible
   caret/selection only) directly on top of a <pre> that renders the same
   text syntax-highlighted underneath - both layers share identical font/
   padding/line-height/wrapping so they stay pixel-aligned as you type and
   scroll. */
.yaml-editor {
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 320px;
  margin: 0 0 10px;
}
.yaml-editor-layer {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow: auto;
  box-sizing: border-box;
}
.yaml-editor-highlight {
  background: #161616;
  color: #e0e0e0;
  pointer-events: none;
}
.yaml-editor-input {
  background: transparent;
  color: transparent;
  caret-color: #e0e0e0;
  resize: none;
}
.yaml-editor-input::selection { background: rgba(255, 255, 255, 0.25); }

.tok-key { color: #79c0ff; }
.tok-string { color: #ffab70; }
.tok-number { color: #79ffe1; }
.tok-bool { color: #ff7b72; }
.tok-null { color: #ff7b72; }

.eso-issue-actions { display: flex; gap: 10px; margin-top: 4px; }
.eso-issue-link {
  font-size: 11px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--primary);
}
.eso-issue-link.danger { color: var(--danger); }

/* ---- "What's New" bell (topbar) ---- */

.whats-new-btn {
  position: relative;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.whats-new-btn:hover { background: rgba(255, 255, 255, 0.12); }
.whats-new-btn svg { width: 18px; height: 18px; }

.theme-toggle-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.theme-toggle-btn:hover { background: rgba(255, 255, 255, 0.12); }
.theme-toggle-btn svg { width: 17px; height: 17px; }
.whats-new-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid var(--header-bg);
}

/* ---- "What's New" page ---- */

.whats-new-header { display: flex; align-items: center; gap: 10px; }
.whats-new-header h1 { margin: 0; font-size: 20px; }

.whats-new-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.whats-new-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-low);
}

.whats-new-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.whats-new-body { flex: 1; min-width: 0; }
.whats-new-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.whats-new-title { font-size: 16px; font-weight: 700; }
.whats-new-badge {
  flex: none;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
}
.whats-new-desc {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.whats-new-date {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ---- Pipeline config editor ---- */

.config-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

.config-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
}

.config-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
}

.config-row input {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}

.config-row input:disabled {
  color: var(--muted);
  background: var(--bg-elevated);
  opacity: 0.7;
}

.config-row .locked-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---- CIS origin pools ---- */

.origin-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

.origin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
}

.origin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
}

.origin-dot.on { background: var(--success); }
.origin-dot.off { background: var(--danger); }

.origin-name { font-weight: 600; }
.origin-address { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Carbon-style Toggle switch, used for pool/origin enabled state */
.carbon-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.carbon-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.carbon-toggle .track {
  width: 32px;
  height: 16px;
  border-radius: 999px;
  background: #8d8d8d;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.carbon-toggle .track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.carbon-toggle input:checked + .track { background: var(--success); }
.carbon-toggle input:checked + .track::after { transform: translateX(16px); }
.carbon-toggle input:disabled + .track { opacity: 0.5; }
.carbon-toggle .toggle-label { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---- Editable origin pool card ---- */

.pool-card { display: flex; flex-direction: column; gap: 14px; }
.pool-name-row { display: flex; flex-direction: column; gap: 2px; }
.pool-name-row input { font-weight: 600; font-size: 15px; }

.origin-edit-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.origin-edit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .origin-edit-grid { grid-template-columns: 1fr 1fr; }
}

.origin-edit-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.origin-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #161616;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.origin-remove-btn:disabled { opacity: 0.3; cursor: default; }

.add-origin-btn { align-self: flex-start; }

/* ---- Ninja voice assistant ---- */

.assistant-fab {
  position: fixed;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.assistant-fab:active { background: var(--primary-active); }

.assistant-card {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 82vh;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  /* No outer border - the old gradient header used to hide the inherited
     .modal-card border in its own color; against a flat header it just
     reads as a harsh outline instead. Shadow alone gives enough
     separation from the page behind it. */
  border: none;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16), 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Calm and quiet on purpose - the old shifting purple/blue gradient read
   as "app chrome," not "a serious tool." A plain surface with a hairline
   border under it reads closer to a real AI chat interface. */
.assistant-header {
  position: relative;
  /* Without this, a short viewport (card content taller than the card's
     own max-height: 82vh) makes the flex column shrink this along with
     everything else, squashing the avatar/title before the scrollable
     transcript gives up any space - it should never shrink, only the
     transcript should. */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  color: var(--text);
}
.assistant-avatar {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 1;
}
/* A soft glow ring behind the avatar while a voice conversation is live -
   the one visual cue that ties the header to "Ninja is actively
   listening/replying" without needing extra text. */
.assistant-avatar::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--primary-soft);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.assistant-card.voice-live .assistant-avatar::after {
  opacity: 1;
  transform: scale(1);
  animation: assistant-avatar-glow 1.6s ease-in-out infinite;
}
@keyframes assistant-avatar-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-soft); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
.assistant-header-text { flex: 1; min-width: 0; }
.assistant-header-text h2 { margin: 0; color: var(--text); font-size: 15px; font-weight: 600; }

/* The Notify modal's teammate picker sits right in the chat header, in
   place of the assistant's status line - styled to read as a label, not
   a form control, so it doesn't fight the chat-bubble look. */
.notify-recipient-select {
  width: auto;
  margin: 1px 0 0;
  padding: 0 18px 0 0;
  border: none;
  background-color: transparent;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 4px top 60%, right 0 top 60%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.notify-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.notify-attachment {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.notify-attachment-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}
.notify-attachment-remove:hover { color: var(--danger); }
.assistant-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.assistant-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(36, 161, 72, 0.6);
  animation: assistant-pulse-dot 2s ease-in-out infinite;
}
@keyframes assistant-pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(36, 161, 72, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(36, 161, 72, 0); }
}
.assistant-close-btn {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.assistant-close-btn:active { background: var(--bg-elevated); }

.assistant-transcript {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 18px;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  min-height: 240px;
}
.assistant-transcript::-webkit-scrollbar { width: 6px; }
.assistant-transcript::-webkit-scrollbar-track { background: transparent; }
.assistant-transcript::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

.assistant-msg-row { display: flex; align-items: flex-start; gap: 10px; max-width: 100%; animation: assistant-msg-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.3); }
/* User turns keep the bubble-on-the-right chat convention. Assistant
   turns don't - full width, no avatar-plus-bubble pairing, text flows
   like a document instead of a speech balloon. This is the single
   biggest thing that makes a reply that includes a heading/list/code
   block actually readable instead of cramped inside a rounded box. */
.assistant-msg-row.user { justify-content: flex-end; }
.assistant-msg-row.assistant, .assistant-msg-row.error { justify-content: flex-start; }

@keyframes assistant-msg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-msg-row { animation: none; }
}

.assistant-msg-avatar {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.assistant-msg-bubble { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.assistant-msg-row.user .assistant-msg-bubble { max-width: 82%; }
.assistant-msg-row.assistant .assistant-msg-bubble,
.assistant-msg-row.error .assistant-msg-bubble { flex: 1; min-width: 0; }

.assistant-msg {
  font-size: 14.5px;
  line-height: 1.6;
  word-wrap: break-word;
}
.assistant-msg p { margin: 0 0 10px; }
.assistant-msg p:last-child { margin-bottom: 0; }
.assistant-msg-heading { font-weight: 700; font-size: 15px; margin: 2px 0 6px; }
.assistant-msg-list { margin: 0 0 10px; padding-left: 20px; }
.assistant-msg-list:last-child { margin-bottom: 0; }
.assistant-msg-list li { margin: 3px 0; }
.assistant-code-block {
  margin: 4px 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.assistant-code-block:last-child { margin-bottom: 0; }
.assistant-code-block code {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  white-space: pre;
  background: none;
  padding: 0;
  color: var(--text);
}
.assistant-msg code {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

.assistant-msg-row.user .assistant-msg {
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  color: #fff;
  padding: 9px 13px;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.25);
}
.assistant-msg-row.user .assistant-msg code {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.assistant-msg-row.assistant .assistant-msg {
  color: var(--text);
}

.assistant-msg-row.error .assistant-msg {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(218, 30, 40, 0.3);
  border-radius: 12px;
  padding: 9px 13px;
}

.assistant-msg-time {
  font-size: 10px;
  color: var(--muted);
  padding: 0 4px;
}
.assistant-msg-row.user .assistant-msg-time { text-align: right; }

.assistant-typing-row { align-self: flex-start; }
.assistant-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}
.assistant-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: assistant-typing-bounce 1.1s ease-in-out infinite;
}
.assistant-typing span:nth-child(2) { animation-delay: 0.15s; }
.assistant-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes assistant-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}
.assistant-suggestions:empty { display: none; }

/* ---- Audio lines - live mic waveform while listening, a stylized
   equalizer while Ninja is talking. Seven bars either way; which one
   drives their height (JS per-frame mic data, vs a CSS keyframe) is
   toggled by the .listening / .speaking class from app.js. ---- */
.audio-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 16px 10px;
}
.audio-bars span {
  width: 3px;
  min-height: 3px;
  border-radius: 999px;
  background: var(--primary);
  transform: scaleY(var(--bar-scale, 0.15));
  transform-origin: center;
  transition: transform 0.08s ease-out;
}
.audio-bars.speaking span {
  background: #6a2fd9;
  animation: audio-bar-eq 1s ease-in-out infinite;
  animation-duration: var(--bar-duration, 1s);
}
.audio-bars span:nth-child(1) { height: 8px; --bar-duration: 0.9s; }
.audio-bars span:nth-child(2) { height: 16px; --bar-duration: 0.7s; }
.audio-bars span:nth-child(3) { height: 24px; --bar-duration: 1.1s; }
.audio-bars span:nth-child(4) { height: 28px; --bar-duration: 0.6s; }
.audio-bars span:nth-child(5) { height: 22px; --bar-duration: 1s; }
.audio-bars span:nth-child(6) { height: 15px; --bar-duration: 0.8s; }
.audio-bars span:nth-child(7) { height: 9px; --bar-duration: 0.95s; }
@keyframes audio-bar-eq {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .audio-bars.speaking span { animation: none; transform: scaleY(0.6); }
}
.assistant-suggestion-chip {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--primary);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.assistant-suggestion-chip:hover { border-color: var(--primary); box-shadow: var(--shadow-low); transform: translateY(-1px); }
.assistant-suggestion-chip:active { background: var(--primary-soft); transform: scale(0.97); }

.assistant-input-row {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.assistant-input-row input {
  flex: 1;
  margin: 0;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 10px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.assistant-input-row input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.cloud-logs-title-row { display: flex; align-items: center; gap: 12px; }
.cloud-logs-title-row h1 { margin: 0 0 2px; }
.cloud-logs-title-row .muted { margin: 0; }
.cloud-logs-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cloud-logs-icon svg { width: 20px; height: 20px; }
.cloud-logs-hint { margin-top: 10px; font-size: 12.5px; }
.cloud-logs-hint code { font-size: 11.5px; }

.cloud-logs-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.cloud-logs-search-row input { flex: 2; min-width: 180px; margin: 0; }
.cloud-logs-search-row select { flex: 1; min-width: 130px; margin: 0; }
.cloud-logs-search-row #cloudLogsInstance { min-width: 170px; }
.cloud-logs-search-row .btn { flex: none; }
#cloudLogsLiveBtn.active { color: var(--success); border-color: var(--success); }
#cloudLogsLiveBtn:not(.active) { opacity: 0.6; }

.cloud-logs-meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cloud-logs-meta-row .chip { background: var(--bg-elevated); color: var(--muted); font-weight: 500; }

.cloud-logs-filter-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cloud-logs-filter-label { flex: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.cloud-logs-infra-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.cloud-logs-infra-chip {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cloud-logs-infra-chip .count { color: var(--muted); font-weight: 400; }
.cloud-logs-infra-chip:hover { border-color: var(--primary); }
.cloud-logs-infra-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cloud-logs-infra-chip.active .count { color: rgba(255, 255, 255, 0.8); }

.cloud-logs-severity-chip-error.active { background: var(--danger); border-color: var(--danger); }
.cloud-logs-severity-chip-warning.active { background: var(--warning); border-color: var(--warning); color: var(--warning-text); }
.cloud-logs-severity-chip-info.active { background: var(--primary); border-color: var(--primary); }
.cloud-logs-severity-chip-debug.active { background: var(--bg-elevated); border-color: var(--border); color: var(--text); }

.cloud-log-infra-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.cloud-log-infra-iks { border-color: var(--primary); color: var(--primary-dark); }
.cloud-log-infra-openshift { border-color: #e8590c; color: #e8590c; }

.cloud-log-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.cloud-logs-empty {
  text-align: center;
  padding: 32px 16px;
  margin: 0;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.cloud-log-entry {
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-low);
}
.cloud-log-entry-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}
.cloud-log-severity-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
}
.cloud-log-source {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cloud-log-time {
  margin-left: auto;
  flex: none;
  font-size: 11px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
}
.cloud-log-message {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.cloud-log-entry-error { border-left-color: var(--danger); background: linear-gradient(90deg, var(--danger-soft), var(--card-bg) 160px); }
.cloud-log-entry-error .cloud-log-severity-badge { background: var(--danger-soft); color: var(--danger); }
.cloud-log-entry-warning { border-left-color: var(--warning); background: linear-gradient(90deg, var(--warning-soft), var(--card-bg) 160px); }
.cloud-log-entry-warning .cloud-log-severity-badge { background: var(--warning-soft); color: var(--warning-text); }
.cloud-log-entry-info { border-left-color: var(--primary); }
.cloud-log-entry-info .cloud-log-severity-badge { background: var(--primary-soft); color: var(--primary-dark); }

.cloud-log-repeat-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
  border: 1px solid var(--border);
}
.cloud-log-entry-debug .cloud-log-severity-badge { background: var(--bg-elevated); color: var(--muted); }
.cloud-log-entry { cursor: pointer; transition: box-shadow 0.12s ease, transform 0.1s ease; }
.cloud-log-entry:hover { box-shadow: var(--shadow-mid); transform: translateY(-1px); }

.modal-close-btn {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close-btn:hover { background: var(--border); color: var(--text); }

.cloud-log-detail-card { max-width: min(90vw, 640px); max-height: 85vh; display: flex; flex-direction: column; overflow-y: auto; }
.cloud-log-detail-card .analyze-log-btn { width: 100%; margin-top: 10px; }
.cloud-log-detail-header { display: flex; align-items: center; gap: 10px; }
.cloud-log-detail-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cloudLogDetailTime { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; margin: 4px 0 12px; }

.cloud-log-detail-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
  max-height: 30vh;
  overflow-y: auto;
}
.cloud-log-detail-fields dt { color: var(--muted); white-space: nowrap; }
.cloud-log-detail-fields dd { margin: 0; word-break: break-word; font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.cost-detail-card { max-width: min(90vw, 560px); max-height: 85vh; display: flex; flex-direction: column; overflow-y: auto; }
.cost-detail-plans { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.cost-detail-plan {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--bg-elevated);
}
.cost-detail-plan-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.cost-detail-plan-name { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cost-detail-plan-cost { font-weight: 600; font-size: 13px; flex: none; }
.cost-detail-usage-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 3px 0; }
.cost-detail-usage-row > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cost-detail-usage-row > span:last-child { flex: none; white-space: nowrap; }
.cost-service-item { cursor: pointer; }

.instana-event-fields { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.instana-event-field-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.instana-event-field-row:last-child { border-bottom: none; }
.instana-event-field-row > span:first-child { flex: none; white-space: nowrap; }
.instana-event-field-row > span:last-child { flex: 1; min-width: 0; font-family: 'IBM Plex Mono', monospace; text-align: right; overflow-wrap: anywhere; }

.cost-recommendations-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.cost-recommendation-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--warning-soft);
}
.cost-recommendation-icon { display: flex; flex: none; color: var(--warning-text); }
.cost-recommendation-icon svg { width: 20px; height: 20px; }
.cost-recommendation-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }

.cloud-log-detail-badge-error { background: var(--danger-soft); color: var(--danger); }
.cloud-log-detail-badge-warning { background: var(--warning-soft); color: var(--warning-text); }
.cloud-log-detail-badge-info { background: var(--primary-soft); color: var(--primary-dark); }
.cloud-log-detail-badge-debug { background: var(--bg-elevated); color: var(--muted); }

.cloud-log-detail-subhead { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
#cloudLogDetailRaw { max-height: 32vh; overflow-y: auto; margin: 0; }

.assistant-send-btn {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.assistant-send-btn svg { width: 16px; height: 16px; }
.assistant-send-btn:active { transform: scale(0.92); }
.assistant-send-btn:disabled { opacity: 0.4; cursor: default; }

.assistant-mic-btn {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease, border-color 0.15s ease;
}
.assistant-mic-btn svg { width: 16px; height: 16px; }
.assistant-mic-btn:active { transform: scale(0.92); }
.assistant-mic-btn.listening {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  animation: runStepPulse 1.4s ease-in-out infinite;
}

.assistant-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 10px;
}

.wake-word-toggle {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.wake-word-toggle.active {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success-text);
}

/* Two named system voices (best-available male/female picked from
   whatever this device/browser actually has installed - the app can't
   ship real custom voices, so this is choosing the best of what's there,
   not something distinct per name beyond gender). */
.voice-picker {
  display: flex;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.voice-picker-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.voice-picker-btn.active {
  background: var(--primary);
  color: #fff;
}

/* ---- Instana usage charts ---- */

.chart-container { margin-top: 6px; }

.chart-value {
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.chart-value-label { font-size: 12px; font-weight: 400; color: var(--muted); }

.line-chart { width: 100%; height: 120px; display: block; }
.line-chart-area { fill: var(--primary-soft); stroke: none; }
.line-chart-line { fill: none; stroke: var(--primary); stroke-width: 2; }

.value-warning { color: var(--warning-text); font-weight: 600; }

/* ---- Home dashboard ---- */

.dashboard-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-active));
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 20px;
  margin-bottom: 14px;
  animation: viewEnter 0.25s ease-out;
}
.dashboard-hero-eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.dashboard-hero h1 { margin: 0 0 6px; color: #fff; font-size: 26px; }
.dashboard-hero-sub { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 13px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-low);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  animation: viewEnter 0.3s ease-out backwards;
}
.dashboard-tile:nth-child(1) { animation-delay: 0.02s; }
.dashboard-tile:nth-child(2) { animation-delay: 0.06s; }
.dashboard-tile:nth-child(3) { animation-delay: 0.1s; }
.dashboard-tile:nth-child(4) { animation-delay: 0.14s; }
.dashboard-tile:active { transform: scale(0.97); box-shadow: none; }

.dashboard-tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dashboard-tile-icon svg { width: 17px; height: 17px; }
.dashboard-tile-icon-blue { background: var(--primary-soft); color: var(--primary); }
.dashboard-tile-icon-purple { background: rgba(138, 63, 252, 0.14); color: #8a3ffc; }
.dashboard-tile-icon-amber { background: var(--warning-soft); color: var(--warning-text); }
.dashboard-tile-icon-green { background: var(--success-soft); color: var(--success); }

.dashboard-tile-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1; }
.dashboard-tile-label { font-size: 12px; color: var(--muted); }
.dashboard-tile-value.has-issues { color: var(--danger); }
.dashboard-tile.non-interactive { cursor: default; }

.health-overall-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.health-overall-row .status-badge { margin-bottom: 0; }

.health-topology-card { padding-bottom: 8px; }
.health-topology {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.health-topology-diagram {
  position: relative;
  width: 100%;
  min-width: 480px;
  aspect-ratio: 640 / 460;
}
.health-topology-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.health-topology-edge { stroke-width: 2; fill: none; opacity: 0.6; }

.health-topology-node {
  position: absolute;
  transform: translate(-50%, -50%);
  margin: 0;
}

.health-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 6px 8px;
  text-align: center;
  box-shadow: var(--shadow-low);
  cursor: pointer;
  transition: transform 0.1s ease;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  appearance: none;
}
.health-node:active { transform: translate(-50%, -50%) scale(0.96); }
.health-node-icon { display: flex; color: var(--muted); }
.health-node-icon svg { width: 16px; height: 16px; }
.health-node-title { font-size: 12px; font-weight: 700; line-height: 1.2; }
.health-node-metric { font-size: 10px; color: var(--muted); line-height: 1.2; }

.health-node-ok { border-color: var(--success); }
.health-node-ok .health-node-icon { color: var(--success); }
.health-node-warning { border-color: var(--warning-text); }
.health-node-warning .health-node-icon { color: var(--warning-text); }
.health-node-critical, .health-node-error { border-color: var(--danger); }
.health-node-critical .health-node-icon, .health-node-error .health-node-icon { color: var(--danger); }
.health-node-checking { border-color: var(--border); opacity: 0.7; }

.health-hub { background: var(--bg-elevated); }
.health-hub .health-node-title { font-size: 13px; }

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.health-card { animation: viewEnter 0.3s ease-out backwards; }
.health-card-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.health-card-icon { display: flex; color: var(--muted); }
.health-card-icon svg { width: 18px; height: 18px; }
.health-card-summary { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.health-card-problems { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.health-problem-row {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow-wrap: anywhere;
}

.eso-scan-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.eso-scan-progress span { white-space: nowrap; }
.eso-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.eso-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.eso-all-clear {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--success);
  background: var(--bg-elevated);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}
.eso-all-clear svg { width: 16px; height: 16px; flex-shrink: 0; }

.eso-issue-group { margin-top: 10px; }
.eso-priority-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 5px;
}

.eso-issue-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px 8px 12px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--danger);
  margin-bottom: 6px;
}
.eso-issue-row:last-child { margin-bottom: 0; }
.eso-issue-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.eso-issue-meta { font-size: 11px; color: var(--muted); }
.eso-issue-detail { font-size: 11px; color: var(--danger); overflow-wrap: anywhere; }

.eso-footnote { font-size: 11px; color: var(--muted); margin: 10px 0 0; }

.tls-cert-fields { margin: 0 0 16px; }
.tls-cert-fields dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 12px 0 2px;
}
.tls-cert-fields dt:first-child { margin-top: 0; }
.tls-cert-fields dd {
  margin: 0;
  font-size: 13px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.dashboard-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dashboard-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.1s ease;
}
.dashboard-link-btn:active { background: var(--card-bg-hover); transform: scale(0.96); }
.dashboard-link-icon { display: flex; color: var(--primary); }
.dashboard-link-icon svg { width: 15px; height: 15px; }

.alerts-credit { margin-top: 10px; font-size: 11px; }

/* ---- IBM Support cases ---- */

.support-case-description {
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--text);
  margin: 6px 0 0;
}

.support-comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: 14px;
  padding-right: 2px;
}

.support-comment {
  border-left: 3px solid var(--border);
  padding: 4px 0 4px 12px;
}
.support-comment.support-comment-ibm { border-left-color: var(--primary); }

.support-comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.support-comment-meta time { font-weight: 400; color: var(--muted); }

.support-comment-body {
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--text);
}

.support-reply-form { display: flex; flex-direction: column; gap: 10px; }
.support-reply-form textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
}

/* ---- Deploy plan (GitHub tasks.txt) ---- */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.empty-state {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.empty-state svg { flex: none; width: 18px; height: 18px; stroke: var(--muted); }

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.chip-muted { background: var(--bg-elevated); color: var(--muted); font-weight: 500; }

.stage-card {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-low);
}

.stage-number {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-body { flex: 1; min-width: 0; }
.stage-tasks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stage-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.chip.removable { padding-right: 6px; gap: 6px; }
.chip-remove-btn {
  border: none;
  background: rgba(0, 0, 0, 0.12);
  color: inherit;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.add-service-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

.add-service-row select { margin: 0; flex: 1; min-width: 160px; }
.add-service-row input { margin: 0; flex: 1; min-width: 140px; }

.add-tasktype-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  padding: 2px 0;
}
/* Toggle chips instead of plain checkboxes - the actual <input> stays for
   real checkbox semantics/keyboard support, just visually hidden in favor
   of styling its <label> as the pill; :has() drives the checked look. */
.tasktype-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.tasktype-check:hover { border-color: var(--primary); }
.tasktype-check:active { transform: scale(0.96); }
.tasktype-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.tasktype-check::before {
  content: '';
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.tasktype-check:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}
.tasktype-check:has(input:checked)::before {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 2.5px var(--primary-soft);
}
.tasktype-check:has(input:focus-visible) {
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.add-plumbing-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}
.add-plumbing-row select { margin: 0; flex: 1; min-width: 160px; }

/* ---- Toolchain / pipeline entity cards ---- */

.entity-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.entity-icon svg { width: 17px; height: 17px; }

.entity-row { display: flex; align-items: center; gap: 12px; }
.entity-row .list-item-title { display: flex; align-items: center; gap: 6px; }
.entity-title-col { flex: 1; min-width: 0; }
.entity-chevron {
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.entity-chevron svg { width: 16px; height: 16px; }

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 4px 2px 2px;
}

.tool-group-header:first-child { margin-top: 0; }
.tool-group-count { font-weight: 500; text-transform: none; letter-spacing: 0; }
.tool-group-icon { display: inline-flex; width: 14px; height: 14px; }
.tool-group-icon svg { width: 14px; height: 14px; }

.tool-type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
}

.tool-type-pipeline { background: var(--primary-soft); color: var(--primary-dark); }

.run-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 6px;
}

.run-status-dot.succeeded, .run-status-dot.normal, .run-status-dot.active { background: var(--success); }
.run-status-dot.failed, .run-status-dot.error, .run-status-dot.critical { background: var(--danger); }
.run-status-dot.running, .run-status-dot.pending, .run-status-dot.queued, .run-status-dot.waiting { background: var(--warning); }
.run-status-dot.cancelled { background: var(--muted); }

/* ---- Skeleton loading (replaces plain "Loading…" text in busy lists) ---- */

.skeleton-list { display: flex; flex-direction: column; gap: 10px; }

.skeleton-row {
  height: 54px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--card-bg) 25%, var(--bg-elevated) 50%, var(--card-bg) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-row { animation: none; background: var(--bg-elevated); }
}

/* ---- Small spacing utilities (replace scattered inline styles) ---- */

.mt-xs { margin-top: 6px; }
.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 14px; }
.mb-sm { margin-bottom: 10px; }
.m-0 { margin: 0; }
.block-link { display: block; margin: 6px 0; }

@media (min-width: 640px) {
  #app { padding-top: 24px; }
}
