:root {
  --bg: #f3f7fa;
  --bg-elevated: #ffffff;
  --bg-subtle: #edf3f7;
  --bg-hover: #e8f1f8;
  --border: #dde7f0;
  --border-strong: #c6d7e6;
  --text: #0f2537;
  --text-secondary: #3b5368;
  --muted: #647c90;

  /* Ocean Teal + Plum Analytics Palette (Coupler / Enterprise OS Fusion) */
  --ocean-dark: #054e6b;
  --ocean: #0b698b;
  --ocean-light: #0ea5e9;
  --ocean-soft: #e6f4fa;
  --plum: #111827;
  --plum-soft: #f1f5f9;
  --emerald: #10b981;
  --emerald-soft: #ecfdf5;
  --coral: #e75a4d;
  --coral-soft: #fef1ef;
  --heat-bg: #f9b098;
  --amber: #e59a24;
  --amber-soft: #fff8eb;

  --shadow-sm: 0 1px 3px rgba(5, 40, 62, 0.05);
  --shadow-card: 0 4px 16px -4px rgba(5, 40, 62, 0.06), 0 1px 3px rgba(5, 40, 62, 0.04);
  --shadow-hover: 0 12px 26px -6px rgba(11, 105, 139, 0.16), 0 2px 6px rgba(5, 40, 62, 0.05);
  --radius-card: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
}

[data-theme="dark"] {
  --bg: #08101c;
  --bg-elevated: #0f1b2d;
  --bg-subtle: #16253c;
  --bg-hover: #1c2f4a;
  --border: #1e324d;
  --border-strong: #2b4568;
  --text: #edf4fb;
  --text-secondary: #bfd1e4;
  --muted: #849eb8;

  --ocean-dark: #073950;
  --ocean: #1482ab;
  --ocean-light: #38bdf8;
  --ocean-soft: rgba(14, 165, 233, 0.15);
  --plum: #05070c;
  --plum-soft: rgba(15, 23, 42, 0.35);
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --coral-soft: rgba(231, 90, 77, 0.18);
  --heat-bg: rgba(231, 90, 77, 0.38);
  --amber-soft: rgba(229, 154, 36, 0.16);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.32);
  --shadow-card: 0 6px 20px -4px rgba(0, 0, 0, 0.42);
  --shadow-hover: 0 14px 30px -6px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.tabular { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Main Shell: Ocean-Teal Header Banner + Left Sidebar + Workspace
   ========================================================================== */
#shell {
  display: grid;
  grid-template-columns: 238px 1fr;
  grid-template-rows: 64px 1fr;
  width: 100vw;
  height: 100vh;
}

#topbar {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  background: linear-gradient(95deg, var(--ocean-dark) 0%, #095f82 55%, #0c6f94 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(5, 78, 107, 0.22);
  z-index: 30;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 215px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}

.global-search-wrap {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.global-search-wrap .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

#globalSearch {
  width: 100%;
  height: 37px;
  padding: 0 54px 0 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font-size: 13px;
  transition: all 0.18s ease;
}

#globalSearch::placeholder { color: rgba(255, 255, 255, 0.72); }

#globalSearch:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.28);
}

.search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.18);
  padding: 2px 6px;
  border-radius: 6px;
}

.search-dropdown {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 6px;
  display: none;
  z-index: 80;
  max-height: 340px;
  overflow-y: auto;
}

.search-dropdown.open { display: block; animation: fadeDown 0.15s ease-out; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cta-deploy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: none;
  background: #0ea5e9;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
  transition: all 0.16s ease;
}

.cta-deploy-btn:hover { background: #38bdf8; transform: translateY(-1px); }
.cta-deploy-btn svg { width: 15px; height: 15px; }

.range-pill {
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #ffffff;
  color: #0f2537;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.range-pill:hover { background: #f0f9ff; }

.top-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.top-icon-btn:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-1px); }
.top-icon-btn svg { width: 16px; height: 16px; }
.top-icon-btn .badge-dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--coral); border: 1.5px solid var(--ocean-dark);
}

/* ==========================================================================
   Sidebar Navigation + Live Operational Status Card
   ========================================================================== */
#sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  overflow-y: auto;
}

.nav-group { display: flex; flex-direction: column; gap: 3px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item svg { width: 17px; height: 17px; stroke-width: 1.8; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text); transform: translateX(2px); }

.nav-item.active {
  background: linear-gradient(95deg, var(--ocean-dark), var(--ocean));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 6px 14px -4px rgba(11, 105, 139, 0.45);
  transform: none;
}

.nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.nav-item.active .nav-badge { background: rgba(255, 255, 255, 0.22); color: #ffffff; }

.sidebar-status-card {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: pulseRing 2.2s infinite; flex-shrink: 0;
}

.pulse-dot.danger { background: var(--coral); box-shadow: 0 0 0 0 rgba(231, 90, 77, 0.55); }

.sidebar-meta { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.sidebar-meta code { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-secondary); }

/* ==========================================================================
   Main Workspace & Coupler-Style Filter Bars, KPI Ribbons, Gauges & Tables
   ========================================================================== */
#main {
  padding: 18px 22px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  background: var(--bg);
}

.view { display: none; flex-direction: column; gap: 16px; min-height: 100%; }
.view.active { display: flex; animation: fadeSlideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
.view-full { height: calc(100vh - 100px); }

/* Top Teal-Outlined Filter Dropdown Bar (from images 2, 3, 4) */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}

.filter-control {
  height: 40px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1.5px solid var(--ocean);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.16s ease;
}

.filter-control:focus {
  outline: none;
  border-color: var(--ocean-light);
  box-shadow: 0 0 0 3px var(--ocean-soft);
}

/* Cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.card-interactive:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; }

/* Horizontal 6-Column KPI Ribbon with Vertical Dividers (from images 3 & 4) */
.kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 14px 6px;
}

.kpi-cell {
  padding: 4px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-cell:last-child { border-right: none; }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi-label svg { width: 13px; height: 13px; color: var(--ocean); }
.kpi-value { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.delta-good { color: var(--emerald); }
.delta-bad { color: var(--coral); }
.delta-flat { color: var(--muted); }

/* Centered Multi-Card KPI Grid (from image 1) */
.kpi-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kpi-mini-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.kpi-mini-card .kpi-label { justify-content: center; }

/* Searchable Teal-Header Checklist Card (from image 1) */
.checklist-card {
  background: var(--bg-elevated);
  border: 1.5px solid var(--ocean);
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.checklist-head {
  background: linear-gradient(95deg, var(--ocean-dark), var(--ocean));
  color: #ffffff;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
}

.checklist-search {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.checklist-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 12px;
}

.checklist-search svg {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.checklist-body {
  flex: 1;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.14s ease;
}

.check-row:hover { background: var(--bg-hover); }
.check-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; flex: 1; }
.check-row input[type="checkbox"] { accent-color: var(--ocean); width: 15px; height: 15px; cursor: pointer; }
.check-row .chk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.check-row .chk-val { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-secondary); font-weight: 600; flex-shrink: 0; }

/* Threshold Semicircular Gauge Card (from images 1 & 2) */
.gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.gauge-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 240px;
  line-height: 1.35;
}

.gauge-svg-wrap {
  position: relative;
  width: 220px;
  height: 128px;
  margin-top: 4px;
}

.gauge-center-text {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-center-text small { font-size: 11px; color: var(--muted); }
.gauge-center-text strong { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }

.gauge-bounds {
  width: 196px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: -4px;
}

/* Plum-Header Sortable & Paginated Table with Conditional Heat Highlighting (from images 1 & 3) */
.plum-table-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.plum-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.plum-table thead th {
  background: var(--plum);
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.plum-table thead th:hover { filter: brightness(1.1); }
.plum-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.plum-table tbody tr { transition: background 0.14s ease; cursor: pointer; }
.plum-table tbody tr:hover td { background: var(--bg-hover); }
.plum-table td.heat-warn { background: var(--heat-bg) !important; color: #3b1106; font-weight: 700; }
[data-theme="dark"] .plum-table td.heat-warn { color: #ffe4dc; }

.plum-table tfoot td {
  background: var(--bg-subtle);
  font-weight: 800;
  border-top: 2px solid var(--border-strong);
  border-bottom: none;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 4px 0;
  font-size: 11.5px;
  color: var(--muted);
}

/* Horizontal Ranked Resource Bars (from image 4: Green Efficient vs Red Top Consumers) */
.ranked-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rbar-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  cursor: pointer;
}

.rbar-name {
  text-align: right;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rbar-track {
  height: 26px;
  background: var(--bg-subtle);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.rbar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 9px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  min-width: 58px;
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.rbar-fill.green { background: linear-gradient(90deg, #3f9f5f, #55b673); }
.rbar-fill.red { background: linear-gradient(90deg, #d94c3d, #e96a5d); }
.rbar-fill.ocean { background: linear-gradient(90deg, #0b698b, #0ea5e9); }

/* Dashboard Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-asymmetric { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(290px, 1fr); gap: 16px; }
.grid-checklist-top { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.grid-donut-table { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 16px; }

.chart-box { position: relative; height: 225px; width: 100%; }

/* Rich Independent Docker Container Cards */
.container-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.c-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.c-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: var(--emerald);
}

.c-card.stopped::before { background: var(--coral); }
.c-card:hover { transform: translateY(-3px); border-color: var(--ocean); box-shadow: var(--shadow-hover); }

.c-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.c-card-title { font-size: 14.5px; font-weight: 800; letter-spacing: -0.015em; display: flex; align-items: center; gap: 8px; }
.c-card-img { font-family: var(--font-mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

.c-mem-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.c-mem-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11.5px;
}

.c-mem-top strong { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }

.mem-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.mem-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ocean), var(--ocean-light));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.mem-bar-fill.warn { background: linear-gradient(90deg, var(--amber), var(--coral)); }

.c-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.c-stat-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c-stat-pill span { font-size: 10px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.c-stat-pill strong { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   5-Step Guided Deployment Wizard Modal / View
   ========================================================================== */
.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

.wiz-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.18s ease;
}

.wiz-step:hover { border-color: var(--ocean); }
.wiz-step.active {
  background: linear-gradient(95deg, var(--ocean-dark), var(--ocean));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 14px -4px rgba(11, 105, 139, 0.4);
}

.wiz-step.done { border-color: var(--emerald); background: var(--emerald-soft); }
.wiz-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-subtle); color: var(--text);
  font-size: 11.5px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0;
}
.wiz-step.active .wiz-num { background: rgba(255,255,255,0.22); color: #fff; }
.wiz-step.done .wiz-num { background: var(--emerald); color: #fff; }
.wiz-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.wiz-meta strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-meta span { font-size: 10.5px; opacity: 0.78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pipeline-run-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.pipe-card {
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}

.pipe-card.running { border-color: var(--ocean-light); background: var(--ocean-soft); color: var(--ocean-dark); }
.pipe-card.done { border-color: var(--emerald); background: var(--emerald-soft); color: #065f46; }
.pipe-card.failed { border-color: var(--coral); background: var(--coral-soft); color: #991b1b; }
[data-theme="dark"] .pipe-card.running { color: var(--ocean-light); }
[data-theme="dark"] .pipe-card.done { color: var(--emerald); }
[data-theme="dark"] .pipe-card.failed { color: var(--coral); }

/* ==========================================================================
   Buttons, Forms, Tabs, Modals, Consoles & Toasts
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 35px; padding: 0 13px; border-radius: 9px;
  border: 1px solid transparent; background: var(--ocean); color: #ffffff;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all 0.16s ease; white-space: nowrap;
}

.btn svg { width: 14px; height: 14px; }
.btn:hover { background: var(--ocean-dark); transform: translateY(-1px); }
.btn-sm { height: 29px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.btn-sec { background: var(--bg); color: var(--text-secondary); border-color: var(--border-strong); }
.btn-sec:hover { background: var(--bg-hover); color: var(--text); }
.btn-emerald { background: var(--emerald); color: #ffffff; }
.btn-emerald:hover { background: #059669; }
.btn-danger { background: var(--coral); color: #ffffff; }
.btn-danger:hover { background: #c83d30; }
.btn-danger-soft { background: var(--coral-soft); color: var(--coral); border-color: rgba(231, 90, 77, 0.25); }
.btn-danger-soft:hover { background: var(--coral); color: #ffffff; }

input, select, textarea {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px var(--ocean-soft);
}

textarea.code {
  width: 100%; flex: 1; min-height: 200px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55;
  resize: none; padding: 12px;
  background: #0b1322; color: #e2e8f0; border-color: #1e293b;
}

.console-box {
  margin: 0; flex: 1; min-height: 200px; overflow: auto;
  background: #0a111f; color: #dbeafe; padding: 12px 14px;
  border-radius: 10px; border: 1px solid #1e293b;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
}

.seg-tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 11px;
  background: var(--bg-subtle); border: 1px solid var(--border); flex-wrap: wrap;
}

.seg-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; border: none;
  background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all 0.16s ease;
}

.seg-tab svg { width: 14px; height: 14px; }
.seg-tab:hover { color: var(--text); }
.seg-tab.active { background: var(--bg-elevated); color: var(--ocean); box-shadow: var(--shadow-sm); }

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); }
.field small { font-size: 11px; color: var(--muted); }

.pill-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border);
}

.pill-live {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--emerald-soft); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.25);
}

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.on { background: var(--emerald); }
.dot.off { background: var(--coral); }
.dot.idle { background: var(--amber); }

.studio-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; flex: 1; min-height: 0; }
.sites-split { display: grid; grid-template-columns: 265px minmax(0, 1fr) 310px; gap: 16px; flex: 1; min-height: 0; }
.scroll-y { flex: 1; overflow-y: auto; min-height: 0; }

.list-item {
  padding: 9px 11px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 12.5px; transition: all 0.14s ease;
}

.list-item:hover { background: var(--bg-hover); }
.list-item.sel { background: var(--ocean-soft); border-color: rgba(11, 105, 139, 0.28); color: var(--ocean); font-weight: 600; }

/* Auth Gate & Toast */
#authOverlay {
  position: fixed; inset: 0;
  background: radial-gradient(circle at top right, rgba(11, 105, 139, 0.16), transparent 52%), var(--bg);
  display: flex; align-items: center; justify-content: center; z-index: 999; padding: 20px;
}

.auth-box { width: 100%; max-width: 440px; padding: 28px; gap: 14px; box-shadow: 0 24px 60px -15px rgba(5, 40, 62, 0.2); }
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; background: var(--bg); border: 1px solid var(--border); padding: 12px; border-radius: 10px; }

#toastHost { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 1200; }
.toast {
  min-width: 260px; max-width: 420px; padding: 11px 15px; border-radius: 12px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-left: 4px solid var(--ocean);
  box-shadow: var(--shadow-hover); font-size: 12.5px; font-weight: 500;
  display: flex; align-items: center; gap: 9px; animation: slideInRight 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.ok { border-left-color: var(--emerald); }
.toast.err { border-left-color: var(--coral); }

#netBanner {
  display: none; background: var(--amber-soft); color: #92400e;
  border: 1px solid rgba(229, 154, 36, 0.35); padding: 10px 14px; border-radius: 12px;
  font-size: 12.5px; justify-content: space-between; align-items: center; margin-bottom: 12px;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1200px) {
  .kpi-ribbon { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .kpi-cell { border-right: none; }
  .grid-2, .grid-asymmetric, .grid-checklist-top, .grid-donut-table, .sites-split { grid-template-columns: 1fr; }
  .wizard-stepper { grid-template-columns: repeat(2, 1fr); }
  .pipeline-run-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  #shell { grid-template-columns: 64px 1fr; }
  .nav-item span, .nav-badge, .nav-section-label, .sidebar-status-card, .brand-sub { display: none; }
  .studio-split { grid-template-columns: 1fr; }
  .kpi-card-grid { grid-template-columns: repeat(2, 1fr); }
}


/* GitHub Repo Auth Status Pill in Topbar */
.gh-pill {
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.gh-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.gh-pill.connected {
  background: #111827;
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22);
}

.gh-pill svg {
  width: 15px;
  height: 15px;
}

.repo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.repo-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.18s ease;
}

.repo-card:hover {
  border-color: #111827;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.secret-box {
  background: #0b111e;
  color: #e2e8f0;
  border: 1px solid #1e293b;
  border-radius: 9px;
  padding: 9px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  max-height: 110px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}


/* ==========================================================================
   v4.7.0 — Notification Center Popover, Numeric Badges, Sidebar Reboot & Themed Modals
   ========================================================================== */
.notif-wrap {
  position: relative;
}

.notif-count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ocean-dark);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(231, 90, 77, 0.45);
  animation: popIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.notif-count-badge.show {
  display: inline-flex;
}

.notif-popover {
  position: absolute;
  top: 46px;
  right: 0;
  width: 440px;
  max-width: calc(100vw - 24px);
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 20px 50px -12px rgba(5, 30, 50, 0.28);
  padding: 15px 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 95;
}

.notif-popover.open {
  display: flex;
  animation: fadeDown 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.notif-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-item.warn {
  border-color: rgba(229, 154, 36, 0.45);
  background: var(--amber-soft);
}

.notif-item.danger {
  border-color: rgba(231, 90, 77, 0.42);
  background: var(--coral-soft);
}

.prog-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ocean), var(--ocean-light));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.prog-fill.emerald {
  background: linear-gradient(90deg, #059669, var(--emerald));
}

/* Sidebar Bottom Reboot Button */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.sidebar-footer .sidebar-status-card {
  margin-top: 0;
}

.sb-reboot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(231, 90, 77, 0.3);
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.sb-reboot-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sb-reboot-btn:hover {
  background: var(--coral);
  color: #ffffff;
  border-color: var(--coral);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -4px rgba(231, 90, 77, 0.45);
}

/* Themed Modal Backdrop & Dialog (Light + Dark) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 28, 0.58);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1100;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeOnly 0.18s ease-out;
}

.modal-dialog {
  width: 100%;
  max-width: 460px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 28px 64px -16px rgba(0, 0, 0, 0.42);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: popIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--coral-soft);
  color: var(--coral);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.modal-icon-circle svg {
  width: 21px;
  height: 21px;
}

.modal-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.modal-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-stat span {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

.modal-stat strong {
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: #111827;
  color: #ffffff;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeOnly {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .sb-reboot-btn span { display: none; }
}


/* ==========================================================================
   v4.8.0 — Users & Credential Templates, Wide Modals & Global Nginx Defaults
   ========================================================================== */
.tpl-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.tpl-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-sm);
}

.tpl-card:hover {
  border-color: #111827;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.tpl-card .tpl-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tpl-card .tpl-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.user-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.u-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 11px;
  position: relative;
  overflow: hidden;
  transition: all 0.18s ease;
}

.u-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: #111827;
}

.u-card.cicd::before { background: var(--ocean); }
.u-card.admin::before { background: var(--emerald); }
.u-card.disabled::before { background: var(--coral); }
.u-card:hover { transform: translateY(-2px); border-color: var(--ocean); box-shadow: var(--shadow-hover); }

.u-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.u-card.cicd .u-avatar { background: linear-gradient(135deg, var(--ocean-dark), var(--ocean)); }
.u-card.admin .u-avatar { background: linear-gradient(135deg, #047857, var(--emerald)); }

.u-meta-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.modal-dialog.modal-wide {
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
}

.pat-guide {
  background: var(--ocean-soft);
  border: 1px solid rgba(11, 105, 139, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pat-guide strong { color: var(--text); }

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


/* ==========================================================================
   v1.0.0 — Full Docker Control Center (Compact/Micro Cards, Tags, DB Badges, Paging)
   ========================================================================== */
.c-card.paused::before {
  background: var(--amber);
}

.c-card.paused {
  border-color: rgba(229, 154, 36, 0.45);
}

.pulse-dot.paused {
  background: var(--amber);
  box-shadow: none;
  animation: none;
}

/* Compact Density (smaller cards — fits many containers cleanly on one screen) */
.container-card-grid.density-compact {
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 10px;
}

.container-card-grid.density-compact .c-card {
  padding: 11px 12px;
  gap: 7px;
  border-radius: 12px;
}

.container-card-grid.density-compact .c-card-title {
  font-size: 13px;
}

.container-card-grid.density-compact .c-mem-block {
  padding: 7px 9px;
  gap: 4px;
}

.container-card-grid.density-compact .c-mem-top strong {
  font-size: 12.5px;
}

.container-card-grid.density-compact .c-extra-meta {
  display: none;
}

/* Micro / Single-Row Density (fits 20-30+ containers on one page) */
.container-card-grid.density-micro {
  grid-template-columns: 1fr;
  gap: 6px;
}

.c-micro-row {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--emerald);
  border-radius: 10px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(120px, 0.9fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  transition: all 0.14s ease;
}

.c-micro-row.paused { border-left-color: var(--amber); }
.c-micro-row.stopped { border-left-color: var(--coral); }
.c-micro-row:hover { border-color: var(--ocean); background: var(--bg-hover); }

/* Mini Live CPU + RAM Dual Bar inside Container Cards */
.c-dual-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.c-metric-mini {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.c-metric-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}

.c-metric-mini-head strong {
  font-size: 12px;
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cpu-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.cpu-bar-fill.warn {
  background: linear-gradient(90deg, var(--amber), var(--coral));
}

/* Tag Chips & Clickable Tag Filter Bar */
.tag-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-chip:hover {
  border-color: var(--ocean);
  color: var(--ocean);
}

.tag-chip.active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.tag-chip.db-chip {
  border-color: rgba(11, 105, 139, 0.35);
  background: var(--ocean-soft);
  color: var(--ocean-dark);
}

[data-theme="dark"] .tag-chip.db-chip {
  color: var(--ocean-light);
}

.tag-chip.db-chip.active {
  background: var(--ocean);
  color: #ffffff;
  border-color: var(--ocean);
}

.c-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--ocean-soft);
  color: var(--ocean-dark);
  border: 1px solid rgba(11, 105, 139, 0.22);
  cursor: pointer;
}

[data-theme="dark"] .c-tag-pill {
  color: var(--ocean-light);
}

.c-tag-add {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  cursor: pointer;
}

.c-tag-add:hover {
  color: var(--ocean);
  border-color: var(--ocean);
}

/* Bulk Action & Pagination Toolbar */
.dk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dk-pager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
}

.db-breakdown-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 2px;
}

.btn-amber {
  background: var(--amber);
  color: #ffffff;
}

.btn-amber:hover {
  background: #c98314;
}

@media (max-width: 960px) {
  .c-micro-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}


/* ==========================================================================
   v1.1.0 — Multi-Node Server/Org Switcher, Fleet Mesh Cards & Swap Pre-Approval
   ========================================================================== */
.node-switcher-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 0 8px 0 10px;
  height: 36px;
  margin-left: 8px;
}

.node-switcher-wrap.remote-active {
  background: #111827;
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28);
}

.node-switcher-select {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  max-width: 190px;
  padding-right: 4px;
}

.node-switcher-select option {
  color: #0f172a;
  background: #ffffff;
}

.remote-ctx-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.remote-ctx-bar.show {
  display: flex;
}

.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.fleet-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.18s ease;
}

.fleet-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: var(--emerald);
}

.fleet-card.offline::before { background: var(--coral); }
.fleet-card.active-node {
  border-color: var(--ocean);
  box-shadow: 0 0 0 2px rgba(11, 105, 139, 0.25);
}

.swap-config-box {
  background: var(--ocean-soft);
  border: 1px solid rgba(11, 105, 139, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.approve-checklist {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.approve-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border);
}

.approve-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
