:root, html[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --dropdown-bg: #ffffff;
  --dropdown-hover: #f1f5f9;
  --dropdown-text: #1e293b;
}

html[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: #1e293b;
  --bg-sidebar: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --input-bg: #1e293b;
  --input-border: #475569;
  --dropdown-bg: #1e293b;
  --dropdown-hover: #334155;
  --dropdown-text: #f8fafc;
}

html[data-theme="cinematic"] {
  --bg-primary: #050508;
  --bg-secondary: #0d0b18;
  --bg-card: #141126;
  --bg-sidebar: #0a0814;
  --text-main: #f3f0ff;
  --text-muted: #a799cc;
  --border: #2a224a;
  --accent: #a855f7;
  --accent-hover: #c084fc;
  --input-bg: #141126;
  --input-border: #3b3068;
  --dropdown-bg: #141126;
  --dropdown-hover: #262045;
  --dropdown-text: #f3f0ff;
}

html[data-theme="high-contrast"] {
  --bg-primary: #000000;
  --bg-secondary: #000000;
  --bg-card: #000000;
  --bg-sidebar: #000000;
  --text-main: #ffffff;
  --text-muted: #ffff00;
  --border: #ffffff;
  --accent: #00ffff;
  --accent-hover: #55ffff;
  --input-bg: #000000;
  --input-border: #ffffff;
  --dropdown-bg: #000000;
  --dropdown-hover: #333333;
  --dropdown-text: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Shell */
.shell { display: flex; height: 100vh; overflow: hidden; background: var(--bg-primary); }

/* Sidebar */
.sidebar {
  width: 220px;
  min-width: 220px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 15px; font-weight: 600; color: var(--text-main); letter-spacing: -0.2px; }
.logo-sub  { font-size: 9px; color: var(--text-muted); letter-spacing: 0.8px; margin-top: 1px; }

nav { padding: 12px 10px; flex: 1; }

.nav-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1px;
  position: relative;
}
.nav-item:hover { background: var(--bg-secondary); color: var(--text-main); }
.nav-item.active { background: var(--bg-secondary); color: var(--accent); font-weight: 600; }

/* Custom Select Component Styles */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  font-family: inherit;
  user-select: none;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.custom-select-trigger span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.custom-select-trigger svg {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.custom-select-wrapper.open .custom-select-trigger svg {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
}

.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-option {
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--dropdown-text);
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-select-option:hover {
  background-color: var(--dropdown-hover);
  color: var(--text-main);
}

.custom-select-option.selected {
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 500;
}

/* Project Switcher Custom Select Theme Integration */
.project-switcher .custom-select-trigger {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-main);
  border-radius: 8px;
  min-height: 32px;
  padding: 4px 10px;
}.nav-item.active { background: #EEEDFE; color: #4338C9; }
.nav-item.active svg { stroke: #4338C9; }
.nav-item svg { flex-shrink: 0; stroke: #aaa; }

.nav-badge {
  margin-left: auto;
  background: #E53935;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  display: none;
}
.nav-badge.visible { display: inline-block; }

/* Topbar */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: 52px;
  border-bottom: 1px solid #ebebeb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.topbar-title { font-size: 14px; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.region-badge {
  font-size: 11px;
  background: #EAF3DE;
  color: #3B6D11;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 500;
}

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #EEEDFE;
  color: #4338C9;
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.account-menu { position: relative; display: inline-block; }
.account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
}
.account-trigger:hover { background: #f1f5f9; }
.account-trigger #current-username { font-size: 13px; font-weight: 500; color: #475569; }
.account-trigger svg { stroke: #94a3b8; }
.account-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 180px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  padding: 6px;
  z-index: 1000;
}
.account-dropdown a {
  padding: 8px 12px;
  text-decoration: none;
  color: #334155;
  font-size: 13px;
  border-radius: 6px;
  display: block;
}
.account-dropdown a:hover { background: #f8fafc; }

/* Content */
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* Page header */
.page-header { margin-bottom: 20px; }
.page-header h1 { display: none; /* Removed duplicate titles inside tabs */ }
.page-header p  { font-size: 13px; color: #777; }

/* Stat cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fafafa;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 16px;
}
.stat-label { font-size: 12px; color: #888; margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 600; }
.stat-value.green  { color: #3B6D11; }
.stat-value.amber  { color: #854F0B; }
.stat-value.red    { color: #A32D2D; }
.stat-value.purple { color: #4338C9; }

/* Section label */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #aaa;
  margin-bottom: 10px;
}

/* Table */
.table-wrap {
  border: 1px solid #ebebeb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: #fafafa;
  padding: 10px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #ebebeb;
}
tbody tr { border-bottom: 1px solid #f0f0f0; }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 11px 16px; }
tbody tr:hover { background: #fafafa; }

.mono { font-family: "SF Mono", "Fira Code", monospace; font-size: 12px; color: #666; }
.muted { color: #999; font-size: 12px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
}
.badge-ok      { background: #EAF3DE; color: #3B6D11; }
.badge-pending { background: #FAEEDA; color: #854F0B; }
.badge-fail    { background: #FCEBEB; color: #A32D2D; }
.badge-running { background: #EEEDFE; color: #4338C9; }
.badge-stopped { background: #f0f0f0; color: #666; }

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: 1px solid #4338ca;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  border-color: #3730a3;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}
.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

.btn-approve {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}
.btn-approve:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.btn-reject {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  margin-left: 6px;
}
.btn-reject:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Auto-scaling page */
.scaling-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .scaling-grid { grid-template-columns: 1fr; }
}
.scaling-card { padding: 16px; }
.scaling-field-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.scaling-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 100px;
}
.scaling-field label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.scaling-field input {
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
}
.scaling-field input:focus {
  outline: none;
  border-color: #5B4FCF;
  box-shadow: 0 0 0 2px rgba(91,79,207,0.15);
}

/* Blue-Green traffic split bar */
.traffic-split-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: #e2e8f0;
}
.traffic-split-blue { background: #3b82f6; transition: width 0.3s ease; }
.traffic-split-green { background: #22c55e; transition: width 0.3s ease; }

/* Branch tag */
.branch-tag {
  font-family: "SF Mono", monospace;
  font-size: 11px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 2px 7px;
  color: #444;
}

/* Approval card */
.approval-card {
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
  background: #fff;
}
.approval-card:hover { border-color: #d0d0d0; }

.approval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.approval-meta { display: flex; gap: 20px; margin-bottom: 16px; }
.approval-meta-item { }
.approval-meta-item .key { font-size: 11px; color: #aaa; margin-bottom: 2px; }
.approval-meta-item .val { font-size: 13px; font-weight: 500; }

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

.comment-input {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 7px;
  font-size: 12px;
  outline: none;
}
.comment-input:focus { border-color: #5B4FCF; }

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 0;
  color: #bbb;
}
.empty p { font-size: 13px; margin-top: 8px; }

/* Stage pipeline visual */
.stages-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 4px;
}

.stage-block {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stage-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  color: #555;
}
.stage-pill.succeeded { background: #EAF3DE; border-color: #C0DD97; color: #3B6D11; }
.stage-pill.inprogress { background: #EEEDFE; border-color: #AFA9EC; color: #4338C9; }
.stage-pill.failed { background: #FCEBEB; border-color: #F09595; color: #A32D2D; }

.stage-arrow { color: #ccc; font-size: 14px; }

/* Loading */
.loading { color: #bbb; font-size: 13px; padding: 32px 0; text-align: center; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast-loading {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
}
.toast-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.toast-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.toast-info {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #4338ca;
}
.toast-spinner {
  animation: toastSpin 0.9s linear infinite;
  color: #6366f1;
}
@keyframes toastSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* Refresh btn */
.refresh-btn {
  font-size: 12px;
  color: #5B4FCF;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
}
.refresh-btn:hover { background: #EEEDFE; }

.flex-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* Live indicator */
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3B6D11;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(59,109,17,0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(59,109,17,0.4); }
  70%  { box-shadow: 0 0 0 6px rgba(59,109,17,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,109,17,0); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.modal-overlay.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.modal {
  display: none;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 520px;
  max-width: 95vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.modal-overlay.show .modal {
  display: block;
}
.modal-overlay.show .modal:has(.diff-split-container),
.modal-overlay.show .modal.modal-wide-diff {
  width: 920px;
}


.modal h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.modal .modal-sub { font-size: 12px; color: #888; margin-bottom: 18px; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 12px; color: #666; margin-bottom: 5px; font-weight: 500; }
.modal-field input, .modal-field select {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.modal-field select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 10px center;
  background-size: 14px;
  padding-right: 32px;
  cursor: pointer;
}
.modal-field input:focus, .modal-field select:focus { border-color: #5B4FCF; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal .btn-cancel { border-color: #e0e0e0; color: #666; }

/* Build log console */
.log-console {
  background: #161616;
  color: #d8d8d8;
  border-radius: 10px;
  padding: 16px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.7;
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-console .log-line { color: #c4c4c4; }
.log-console .log-empty { color: #777; }

/* Selectable instance row */
tr.selectable { cursor: pointer; }
tr.selectable.selected { background: #EEEDFE; }
tr.selectable.selected:hover { background: #EEEDFE; }

.radio-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: inline-block;
  position: relative;
}
tr.selected .radio-dot { border-color: #5B4FCF; }
tr.selected .radio-dot::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #5B4FCF;
  border-radius: 50%;
}

.btn-danger { border-color: #A32D2D; color: #A32D2D; }
.btn-danger:hover { background: #FCEBEB; }

.action-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* Project switcher */
.project-switcher {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #ebebeb;
}
.project-switcher select {
  flex: 1;
  min-width: 0;
  padding: 6px 28px 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12.5px;
  background: #f8fafc url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 8px center;
  background-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  color: #334155;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}
.project-switcher select:hover { border-color: #cbd5e1; }
.project-switcher select:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.project-add-btn {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border: 1px solid #e0e0e0;
  border-radius: 7px;
  background: #fff;
  color: #5B4FCF;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.project-add-btn:hover { background: #EEEDFE; }

/* No project state */
.no-project {
  text-align: center;
  padding: 60px 20px;
}
.no-project h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.no-project p { font-size: 13px; color: #888; margin-bottom: 18px; }

/* Setup wizard */
.wizard-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.wizard-step {
  flex: 1;
  min-width: 140px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 14px;
  position: relative;
}
.wizard-step.done { border-color: #C0DD97; background: #FAFEF5; }
.wizard-step .step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #888;
  font-size: 11px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.wizard-step.done .step-num { background: #3B6D11; color: #fff; }
.wizard-step .step-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.wizard-step .step-sub { font-size: 11px; color: #999; }

.setup-card {
  border: 1px solid #ebebeb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.setup-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.setup-card .setup-sub { font-size: 12px; color: #888; margin-bottom: 16px; }
.setup-card.disabled { opacity: 0.5; pointer-events: none; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.form-grid.full { grid-template-columns: 1fr; }
.form-field label { display: block; font-size: 12px; color: #666; margin-bottom: 5px; font-weight: 500; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 10px center;
  background-size: 14px;
  padding-right: 32px;
  cursor: pointer;
}
.form-field textarea { font-family: "SF Mono", monospace; font-size: 12px; min-height: 110px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #5B4FCF; }
.form-hint { font-size: 11px; color: #aaa; margin-top: 4px; }

/* Terraform wizard components */
.tf-log-box {
  background: #0d1117; color: #58d68d;
  font-family: "SF Mono", monospace; font-size: 11px; line-height: 1.6;
  border-radius: 8px; padding: 14px 16px; margin-top: 16px;
  max-height: 340px; overflow-y: auto; white-space: pre-wrap;
  word-break: break-all; border: 1px solid #222;
}
.tf-results { background: #f8f9fb; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.tf-result-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px solid #eee; font-size: 12px; }
.tf-result-row:last-child { border-bottom: none; }
.tf-label { min-width: 130px; color: #666; font-weight: 500; flex-shrink: 0; }
.tf-result-row code { font-size: 11px; color: #5B4FCF; word-break: break-all; }
.tf-result-row a { color: #5B4FCF; text-decoration: none; font-weight: 500; }
.tf-result-row a:hover { text-decoration: underline; }
.alert-warning {
  background: #fff9e6; border: 1px solid #f5c842;
  border-radius: 7px; padding: 10px 14px;
  font-size: 12px; color: #7a5800; line-height: 1.5;
}


/* Login Overlay Styles */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: #ffffff;
  padding: 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-box .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

/* Status badges for audit log */
.status-unknown {
  background: #f1f5f9;
  color: #475569;
}

/* Premium Split-Screen Login */
.login-overlay-premium {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.login-left {
  flex: 1;
  background: radial-gradient(circle at top left, #0f2027, #203a43, #2c5364);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.login-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1), transparent);
}

.login-left-content {
  max-width: 400px;
  text-align: center;
}

.login-logo svg {
  margin-bottom: 24px;
}

.login-title {
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.login-subtitle {
  color: #00f2fe;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 24px 0;
}

.login-desc {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.login-right {
  flex: 1;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.login-card-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-card h3 {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 8px 0;
}

.login-card p {
  color: #64748b;
  font-size: 14px;
  text-align: center;
  margin: 0 0 32px 0;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 12px;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px 12px 12px 40px;
  color: #f8fafc;
  font-size: 14px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.input-with-icon input:focus {
  outline: none;
  border-color: #4facfe;
  box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.2);
}

.forgot-password {
  text-align: right;
  margin-bottom: 24px;
}

.forgot-password a {
  color: #4facfe;
  font-size: 12px;
  text-decoration: none;
}

.btn-gradient {
  width: 100%;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-gradient:hover {
  opacity: 0.9;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: #475569;
  font-size: 12px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #334155;
}

.divider span {
  padding: 0 10px;
}

.btn-outline {
  width: 100%;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  color: #f8fafc;
}

.login-error {
  color: #f87171;
  font-size: 13px;
  margin-top: 16px;
  display: none;
  text-align: center;
}

.login-footer {
  text-align: center;
  color: #475569;
  font-size: 11px;
  margin-top: 32px;
}

/* Audit log lifecycle badge colours */
.status-inprogress {
  background: rgba(79, 172, 254, 0.15);
  color: #4facfe;
}

/* ============================================
   PREMIUM PIPELINE UI
   ============================================ */

.pipeline-running-banner {
  background: linear-gradient(135deg, rgba(79,172,254,0.15), rgba(0,242,254,0.08));
  border: 1px solid rgba(79,172,254,0.4);
  border-radius: 8px;
  padding: 12px 18px;
  color: #4facfe;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: pulse-border 2.5s ease-in-out infinite;
}

/* Stage Flow Container */
.pipeline-flow-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
}

/* Individual Stage Card */
.pipeline-stage-card {
  border: 1px solid #334155;
  border-left-width: 4px;
  border-radius: 10px;
  background: rgba(71,85,105,0.07);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.pipeline-stage-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.pipeline-stage-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.pipeline-stage-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.pipeline-stage-info {
  flex: 1;
}

.pipeline-stage-name {
  font-weight: 600;
  font-size: 14px;
  color: #f1f5f9;
}

.pipeline-stage-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.pipeline-stage-status {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.pipeline-stage-actions {
  display: flex;
  gap: 8px;
  padding: 0 18px 12px;
  flex-wrap: wrap;
}

/* Connector Arrow Between Stages */
.pipeline-connector {
  width: 3px;
  height: 20px;
  margin-left: 31px;
  border-radius: 2px;
  opacity: 0.5;
}

/* Per-Stage Action Buttons */
.pipe-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pipe-btn-retry {
  background: rgba(234,179,8,0.12);
  color: #eab308;
  border-color: rgba(234,179,8,0.3);
}
.pipe-btn-retry:hover { background: rgba(234,179,8,0.25); }

.pipe-btn-stop {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border-color: rgba(239,68,68,0.3);
}
.pipe-btn-stop:hover { background: rgba(239,68,68,0.25); }

.pipe-btn-logs {
  background: rgba(100,116,139,0.12);
  color: #94a3b8;
  border-color: rgba(100,116,139,0.25);
}
.pipe-btn-logs:hover { background: rgba(100,116,139,0.25); color: #f1f5f9; }

/* Terminal / Log Drawer per Stage */
.stage-log-terminal {
  border-top: 1px solid #1e293b;
  background: #020812;
  animation: slideDown 0.2s ease-out;
}

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

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #0d1117;
  border-bottom: 1px solid #1e293b;
  font-size: 12px;
  color: #4facfe;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 600;
}

.terminal-close {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.terminal-close:hover { color: #ef4444; }

.terminal-body {
  min-height: 140px;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #a8b5c8;
}

.term-line {
  color: #a8b5c8;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-line:hover { background: rgba(255,255,255,0.03); }

/* Execution Timeline */
.exec-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.exec-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(30,41,59,0.6);
  border-radius: 8px;
  padding: 12px 16px;
  border-left: 3px solid #334155;
  transition: background 0.15s;
  flex-wrap: wrap;
}
.exec-row:hover { background: rgba(30,41,59,0.9); }

.exec-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #94a3b8;
  min-width: 120px;
}

.exec-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.exec-trigger {
  font-size: 12px;
  flex: 1;
}

.exec-time {
  font-size: 12px;
  white-space: nowrap;
}

/* Spin animation for in-progress stage icons */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Pipeline inline action buttons */
.pipe-action-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pipe-action-btn {
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.15s, color 0.15s;
}

.pipe-retry {
  background: rgba(234,179,8,0.1);
  color: #ca8a04;
  border-color: rgba(234,179,8,0.3);
}
.pipe-retry:hover { background: rgba(234,179,8,0.2); }

.pipe-stop {
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  border-color: rgba(239,68,68,0.3);
}
.pipe-stop:hover { background: rgba(239,68,68,0.2); }

.pipe-logs {
  background: rgba(100,116,139,0.1);
  color: #64748b;
  border-color: rgba(100,116,139,0.2);
}
.pipe-logs:hover { background: rgba(100,116,139,0.2); color: #334155; }

/* Pipeline SVG icon-only buttons — no background, no box */
.pipe-icon-btn {
  background: none;
  border: none;
  padding: 4px 5px;
  cursor: pointer;
  color: #94a3b8;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  line-height: 1;
}
.pipe-icon-btn:hover {
  color: #475569;
}
.pipe-icon-stop {
  color: #dc2626;
}
.pipe-icon-stop:hover {
  color: #991b1b;
}
/* Retry icon — amber/orange */
.pipe-icon-btn:not(.pipe-icon-stop):not(.pipe-icon-logs):hover {
  color: #ca8a04;
}
.pipe-icon-logs {
  color: #64748b;
}
.pipe-icon-logs:hover {
  color: #334155;
}

/* ============================================
   AWS-STYLED PIPELINE STAGE CARDS
   ============================================ */

.aws-pipeline-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px auto 0;
  max-width: 640px;
  width: 100%;
}

.aws-stage-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  width: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.aws-stage-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Visual feedback: glow effect for active/completed/failed stages */
.stage-glow-blue {
  box-shadow: 0 0 0 1px rgba(59,130,246,0.25), 0 0 16px rgba(59,130,246,0.35);
}
.stage-glow-green {
  box-shadow: 0 0 0 1px rgba(34,197,94,0.2), 0 0 12px rgba(34,197,94,0.25);
}
.stage-glow-red {
  box-shadow: 0 0 0 1px rgba(239,68,68,0.2), 0 0 12px rgba(239,68,68,0.25);
}
.stage-glow-blue:hover, .stage-glow-green:hover, .stage-glow-red:hover {
  box-shadow: 0 0 0 1px rgba(59,130,246,0.3), 0 0 20px rgba(59,130,246,0.4), 0 2px 12px rgba(0,0,0,0.08);
}

.aws-stage-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.aws-stage-body {
  flex: 1;
  min-width: 0;
}

.aws-stage-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.aws-stage-service {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 500;
}

/* Animated shimmer progress bar for InProgress stages */
.aws-stage-progress {
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
  width: 100%;
  max-width: 200px;
}

.aws-stage-progress-bar {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  background-size: 200% 100%;
  border-radius: 2px;
  animation: shimmer-slide 1.5s ease-in-out infinite;
}

@keyframes shimmer-slide {
  0%   { background-position: -200% center; transform: translateX(-100%); }
  100% { background-position: 200% center; transform: translateX(350%); }
}

.aws-stage-right {
  flex-shrink: 0;
  text-align: right;
  min-width: 120px;
}

.aws-stage-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.aws-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.aws-status-text {
  font-size: 12px;
  font-weight: 600;
}

.aws-stage-time {
  font-size: 11px;
  margin-top: 2px;
  text-align: right;
}

/* Connector arrow between stages */
.aws-stage-connector {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 33px;
}

.aws-connector-line {
  width: 2px;
  height: 14px;
  opacity: 0.4;
}

.aws-stage-connector svg {
  margin-left: -4px;
  opacity: 0.5;
}

/* Pulse animation for InProgress dots */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* Spinner rotation for in-progress status icon */
.status-icon-spin {
  animation: status-spin 0.9s linear infinite;
  transform-origin: center;
}
@keyframes status-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* AWS service badge in header */
.aws-service-badge {
  display: inline-block;
  background: #FFF3E0;
  color: #C7511F;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════
   GIT WORKSPACE — n8n-style branch canvas + command panel
   Themed to the existing Benevolate palette (purple #5B4FCF primary,
   #EAF3DE/#3B6D11 for "added", #FCEBEB/#A32D2D for "removed").
   ══════════════════════════════════════════════════════════════════ */

.gitws-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 4px; }
.gitws-stat-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 16px 18px; }
.gitws-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; font-weight: 600; margin-bottom: 6px; }
.gitws-stat-value { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.gitws-overview-cta {
  margin-top: 20px; display: flex; align-items: center; justify-content: space-between;
  background: #EEEDFE; border: 1px solid #d9d5fb; border-radius: 12px; padding: 18px 22px;
}

.gitws-toolbar { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.gitws-sync-indicator { font-size: 12px; color: #3B6D11; font-weight: 600; display: flex; align-items: center; }
.gitws-sync-indicator.gitws-sync-error { color: #A32D2D; }

.gitws-canvas-wrap {
  position: relative; width: 100%; height: 560px; overflow: hidden;
  background: #fdfcff; border: 1px solid #e0e0e0; border-radius: 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}
.gitws-svg { display: block; cursor: grab; }
.gitws-svg:active { cursor: grabbing; }
.gitws-fork-edge { fill: none; stroke: #D7D3F5; stroke-width: 1.6; stroke-dasharray: 4 3; }

.gitws-node {
  background: #fff; border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 8px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04); font-family: inherit; position: relative;
}
.gitws-node-default { border-color: #5B4FCF; background: #FBFAFF; }
.gitws-node-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gitws-node-name { font-size: 13px; font-weight: 700; color: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitws-node-menu-btn {
  border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 16px;
  line-height: 1; padding: 2px 4px; border-radius: 4px;
}
.gitws-node-menu-btn:hover { background: #f1f5f9; color: #334155; }
.gitws-node-badges { margin-top: 5px; display: flex; gap: 5px; flex-wrap: wrap; }

.gitws-badge-ahead, .gitws-badge-behind, .gitws-badge-default, .gitws-badge-even {
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; display: inline-block;
}
.gitws-badge-ahead  { background: #EAF3DE; color: #3B6D11; }
.gitws-badge-behind { background: #FCEBEB; color: #A32D2D; }
.gitws-badge-default { background: #EEEDFE; color: #5B4FCF; }
.gitws-badge-even    { background: #f1f5f9; color: #64748b; }

.gitws-node-menu {
  display: none; position: absolute; top: calc(100% + 4px); right: 0; z-index: 20;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px; padding: 4px; flex-direction: column;
}
.gitws-node-menu.open { display: flex; }
.gitws-node-menu button {
  text-align: left; background: none; border: none; padding: 8px 10px; font-size: 12.5px;
  border-radius: 6px; cursor: pointer; color: #334155;
}
.gitws-node-menu button:hover { background: #f1f5f9; }
.gitws-node-menu button.gitws-menu-danger { color: #A32D2D; }
.gitws-node-menu button.gitws-menu-danger:hover { background: #FCEBEB; }

.gitws-dot { cursor: pointer; transition: r 0.15s; }
.gitws-dot:hover { filter: brightness(1.15); }

.gitws-cmd-fab {
  position: fixed; right: 32px; bottom: 32px; width: 54px; height: 54px; border-radius: 50%;
  background: #5B4FCF; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(91,79,207,0.4); z-index: 40; transition: transform 0.15s, background 0.15s;
}
.gitws-cmd-fab:hover { background: #4338C9; transform: scale(1.06); }

.gitws-cmd-overlay {
  position: fixed; inset: 0; background: rgba(15,15,25,0.28); opacity: 0; pointer-events: none;
  transition: opacity 0.2s; z-index: 45;
}
.gitws-cmd-overlay.open { opacity: 1; pointer-events: auto; }

.gitws-cmd-panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 480px; max-width: 92vw;
  background: #fff; box-shadow: -8px 0 32px rgba(0,0,0,0.14); z-index: 50;
  transform: translateX(100%); transition: transform 0.25s ease, width 0.3s ease; display: flex; flex-direction: column;
}
.gitws-cmd-panel.open { transform: translateX(0); }
.gitws-cmd-panel.expanded { width: 100vw; max-width: 100vw; }
.gitws-cmd-header {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 20px;
  border-bottom: 1px solid #e0e0e0; font-weight: 700; font-size: 14px; color: #1a1a1a;
}
.gitws-cmd-header div { display: flex; align-items: center; }
.gitws-cmd-expand { border: none; background: none; font-size: 18px; line-height: 1; color: #94a3b8; cursor: pointer; margin-right: 12px; }
.gitws-cmd-close { border: none; background: none; font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; }
.gitws-cmd-expand:hover, .gitws-cmd-close:hover { color: #1e1e2e; }
.gitws-cmd-input-row {
  display: flex; align-items: center; gap: 8px; margin: 16px 20px 0; padding: 10px 12px;
  background: #1e1e2e; border-radius: 8px;
}
.gitws-prompt { color: #8B7FE8; font-family: 'SFMono-Regular', Consolas, monospace; font-weight: 700; }
.gitws-cmd-input-row input {
  flex: 1; background: transparent; border: none; outline: none; color: #eef1f8;
  font-family: 'SFMono-Regular', Consolas, monospace; font-size: 13px;
}
.gitws-cmd-input-row input::placeholder { color: #6b7280; }
.gitws-cmd-hint { font-size: 11px; color: #94a3b8; margin: 8px 20px 0; }
.gitws-cmd-hint code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; color: #5B4FCF; }
.gitws-scope-notice {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 8px 20px 0;
  padding: 7px 10px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 7px;
  font-size: 11px; color: #92400e; line-height: 1.5;
}
.gitws-scope-notice svg { flex-shrink: 0; margin-top: 1px; color: #d97706; }
.gitws-scope-notice code { background: #fef3c7; padding: 1px 4px; border-radius: 3px; color: #92400e; font-family: monospace; }
.gitws-scope-notice--inline {
  margin: 10px 0 0; background: #f0f9ff; border-color: #bae6fd; color: #0c4a6e;
}
.gitws-scope-notice--inline svg { color: #0284c7; }
.gitws-scope-notice--inline code { background: #e0f2fe; color: #0c4a6e; }
.gitws-smart-actions { display: flex; gap: 8px; margin: 12px 20px 0; }
.gitws-smart-btn { border: none; border-radius: 6px; font-weight: 600; font-size: 11.5px; padding: 6px 12px; cursor: pointer; transition: background 0.15s, transform 0.1s; color: #fff; }
.gitws-smart-btn:active { transform: scale(0.96); }
.gitws-smart-warn { background: #d97706; } .gitws-smart-warn:hover { background: #b45309; }
.gitws-smart-danger { background: #e11d48; } .gitws-smart-danger:hover { background: #be123c; }
.gitws-smart-success { background: #16a34a; } .gitws-smart-success:hover { background: #15803d; }
.gitws-smart-primary { background: #5B4FCF; } .gitws-smart-primary:hover { background: #4a3eb3; }
.gitws-cmd-results { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }

.gitws-result-title { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12.5px; color: #5B4FCF; font-weight: 700; margin-bottom: 10px; }
.gitws-cmd-error { background: #FCEBEB; color: #A32D2D; font-size: 12.5px; padding: 10px 12px; border-radius: 8px; }
.gitws-help div { font-size: 12.5px; margin-bottom: 8px; color: #334155; }
.gitws-help code { background: #EEEDFE; color: #5B4FCF; padding: 1px 6px; border-radius: 4px; margin-right: 6px; }
.gitws-help span { color: #64748b; }

.gitws-branch-list-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid #f1f5f9; }

.gitws-node { cursor: pointer; transition: box-shadow 0.2s, transform 0.2s; }
.gitws-node:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.gitws-node-active {
  border: 2px solid #5B4FCF;
  box-shadow: 0 0 0 3px rgba(91, 79, 207, 0.15);
}
.gitws-node-dirty {
  border: 2px solid #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25);
  animation: pulse-dirty 2s infinite;
}
@keyframes pulse-dirty {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

/* Drag and Drop Visuals */
.gitws-node.dragging {
  opacity: 0.9;
  box-shadow: 0 12px 24px rgba(91, 79, 207, 0.25);
  cursor: grabbing !important;
}
.gitws-lane-track.drag-target {
  stroke: #5B4FCF !important;
  stroke-width: 4px !important;
  stroke-dasharray: 6;
}
.gitws-commit-timeline { position: relative; }
.gitws-commit-row { display: flex; gap: 10px; padding: 8px 2px; cursor: pointer; border-radius: 6px; }
.gitws-commit-row:hover { background: #f8fafc; }
.gitws-commit-dot-sm { width: 8px; height: 8px; border-radius: 50%; background: #5B4FCF; margin-top: 5px; flex-shrink: 0; }
.gitws-commit-msg { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.gitws-commit-meta { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.gitws-commit-detail-card { background: #f8fafc; border: 1px solid #e0e0e0; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }

.gitws-diff-file { border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.gitws-diff-file-header {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f8fafc;
  cursor: pointer; user-select: none;
}
.gitws-diff-status {
  width: 16px; height: 16px; border-radius: 4px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.gitws-diff-status-added    { background: #3B6D11; }
.gitws-diff-status-modified { background: #5B4FCF; }
.gitws-diff-status-removed  { background: #A32D2D; }
.gitws-diff-status-renamed  { background: #64748b; }
.gitws-diff-filename { flex: 1; font-size: 12px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitws-diff-counts { font-size: 11px; white-space: nowrap; }
.gitws-diff-add { color: #3B6D11; font-weight: 600; }
.gitws-diff-del { color: #A32D2D; font-weight: 600; }
.gitws-diff-caret { color: #94a3b8; font-size: 11px; transition: transform 0.15s; }
.gitws-diff-file.collapsed .gitws-diff-caret { transform: rotate(-90deg); }
.gitws-diff-file.collapsed .gitws-diff-file-body { display: none; }
.gitws-patch { font-size: 11.5px; line-height: 1.6; overflow-x: auto; }
.gitws-diff-line-ctx, .gitws-diff-line-add, .gitws-diff-line-del, .gitws-diff-hunk {
  padding: 0 12px; white-space: pre;
}
.gitws-diff-line-add { background: #EAF3DE; color: #2c5209; }
.gitws-diff-line-del { background: #FCEBEB; color: #8a2323; }
.gitws-diff-line-ctx { color: #64748b; }
.gitws-diff-hunk { background: #EEEDFE; color: #5B4FCF; font-weight: 600; }

/* ── CodeDeploy Blue/Green Stepper ──────────────────────────────────────── */

/* ── Blue-Green Deployment Status Card ──────────────────────────────────── */
.bg-status-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(91,79,207,.03) 100%);
}

.bg-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
}

/* ── Stepper ─────────────────────────────────────────────────────────────── */
.bg-stepper {
  display: flex;
  align-items: flex-start;
  padding: 28px 20px 20px;
  gap: 0;
  overflow-x: auto;
}

.bg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  flex: 1;
  position: relative;
}

/* Icon node */
.bg-step-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  color: var(--muted);
  transition: all 0.3s ease;
  flex-shrink: 0;
  z-index: 1;
}

/* Done: green fill with checkmark */
.bg-step.done .bg-step-icon-wrap {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(22,163,74,.35);
}

/* Active: glowing purple ring */
.bg-step.active .bg-step-icon-wrap {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(91,79,207,.1);
  animation: stepActiveGlow 2.2s ease-in-out infinite;
}

/* Failed: red fill */
.bg-step.failed .bg-step-icon-wrap {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,.3);
}

@keyframes stepActiveGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(91,79,207,.12), 0 4px 14px rgba(91,79,207,.2); }
  50%       { box-shadow: 0 0 0 10px rgba(91,79,207,.04), 0 4px 24px rgba(91,79,207,.38); }
}

/* Expanding pulse ring on active step */
.bg-step-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: stepPulseRing 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes stepPulseRing {
  0%   { transform: scale(.85); opacity: .9; }
  70%  { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Connector line between steps */
.bg-step-connector {
  flex: 1;
  min-width: 20px;
  height: 2px;
  background: var(--border);
  margin-top: 23px; /* aligns with center of 48px icon */
  border-radius: 2px;
  transition: background 0.5s ease;
  flex-shrink: 0;
}
.bg-step-connector.done {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

/* Labels */
.bg-step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  letter-spacing: .4px;
  text-transform: uppercase;
  max-width: 88px;
  line-height: 1.3;
  transition: color 0.3s;
}
.bg-step.done   .bg-step-label { color: var(--success); }
.bg-step.failed .bg-step-label { color: var(--danger);  }
.bg-step.active .bg-step-label { color: var(--primary); }

.bg-step-sub {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  max-width: 88px;
  opacity: .65;
  line-height: 1.3;
}
.bg-step.active .bg-step-sub { opacity: 1; color: var(--primary); }

/* ── Live dot ────────────────────────────────────────────────────────────── */
.bg-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: livePulse 1.4s ease-in-out infinite;
  display: inline-block;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.8); }
}

/* ── Meta row ────────────────────────────────────────────────────────────── */
.bg-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.bg-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 20px;
  border-right: 1px solid var(--border);
}
.bg-meta-item:last-child { border-right: none; }
.bg-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
}
.bg-meta-value {
  font-size: 12px;
  color: var(--text);
  font-family: monospace;
}

/* ── Error box ───────────────────────────────────────────────────────────── */
.bg-error-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 20px 4px;
  padding: 12px 14px;
  background: rgba(239,68,68,.07);
  border-radius: 8px;
  border-left: 3px solid var(--danger);
  color: var(--danger);
  font-size: 12px;
}
.bg-error-box p { margin: 2px 0 0; color: var(--muted); }

/* ── Actions row ─────────────────────────────────────────────────────────── */
.bg-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.bg-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700; letter-spacing:.3px; }
.badge-success   { background:rgba(34,197,94,.15);  color:var(--success); }
.badge-danger    { background:rgba(239,68,68,.15);  color:var(--danger); }
.badge-info      { background:rgba(139,92,246,.15); color:var(--primary); }
.badge-secondary { background:var(--bg-secondary);  color:var(--muted); border:1px solid var(--border); }


/* ── Blue-Green Traffic Shifting Settings ───────────────────────────────── */
.bg-strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.bg-strategy-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: var(--bg-secondary);
  user-select: none;
}
.bg-strategy-option:hover {
  border-color: var(--primary);
  background: rgba(91,79,207,.06);
}
.bg-strategy-option.selected {
  border-color: var(--primary);
  background: rgba(91,79,207,.1);
  box-shadow: 0 0 0 3px rgba(91,79,207,.15);
}
.bg-strategy-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.bg-strategy-option.selected .bg-strategy-label { color: var(--primary); }
.bg-strategy-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Blue-Green Deploy Drawer ────────────────────────────────────────────── */
.bg-deploy-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.bg-deploy-overlay.open { display: block; }

.bg-deploy-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(500px, 100vw);
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 48px rgba(0,0,0,.3);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.bg-deploy-drawer.open { transform: translateX(0); }

.bg-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.bg-drawer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Settings summary chips */
.bg-drawer-settings-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(91,79,207,.06);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.bg-drawer-setting-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.bg-drawer-setting-chip strong {
  color: var(--primary);
  font-weight: 700;
}
.bg-drawer-setting-chip svg { flex-shrink: 0; color: var(--primary); }

/* Image list header */
.bg-image-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  flex-shrink: 0;
}

.bg-image-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

/* Image row */
.bg-image-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  background: var(--bg-secondary);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.bg-image-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
  transform-origin: bottom;
  border-radius: 0 2px 2px 0;
}
.bg-image-row.selected::before { transform: scaleY(1); }
.bg-image-row:hover:not(.selected) {
  border-color: rgba(91,79,207,.4);
  background: rgba(91,79,207,.04);
}
.bg-image-row.selected {
  border-color: var(--primary);
  background: rgba(91,79,207,.08);
  box-shadow: 0 0 0 3px rgba(91,79,207,.12);
}

/* Custom radio indicator */
.bg-image-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.18s;
}
.bg-image-row.selected .bg-image-radio {
  border-color: var(--primary);
}
.bg-image-radio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.bg-image-row.selected .bg-image-radio-dot { transform: scale(1); }

/* Image info layout */
.bg-image-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bg-image-top-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.bg-image-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bg-image-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  transition: color 0.18s;
}
.bg-image-row.selected .bg-image-tag { color: var(--primary); }

.bg-image-latest-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(34,197,94,.15);
  color: var(--success);
  border: 1px solid rgba(34,197,94,.25);
}

.bg-image-digest-chip {
  font-size: 10px;
  font-family: monospace;
  color: var(--muted);
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.bg-image-sub {
  font-size: 11px;
  color: var(--muted);
}

/* Animated checkmark */
.bg-image-check {
  color: var(--primary);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s cubic-bezier(.34,1.56,.64,1);
  flex-shrink: 0;
}
.bg-image-row.selected .bg-image-check {
  opacity: 1;
  transform: scale(1);
}

/* Selected URI confirmation bar */
.bg-selected-uri-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(91,79,207,.08);
  border-top: 1px solid rgba(91,79,207,.2);
  font-size: 11px;
  color: var(--primary);
  flex-shrink: 0;
  font-family: monospace;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bg-selected-uri-bar.visible {
  opacity: 1;
  transform: translateY(0);
}

.bg-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

/* Custom Select Component Styles */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  font-family: 'Inter', sans-serif;
  user-select: none;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 36px;
}

.custom-select-trigger span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e293b;
}

.custom-select-trigger svg {
  color: #64748b;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.custom-select-wrapper.open .custom-select-trigger svg {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
}

.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-option {
  padding: 8px 12px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-select-option:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.custom-select-option.selected {
  background-color: #eff6ff;
  color: #1d4ed8;
  font-weight: 500;
}

/* Project Switcher Custom Select Theme Integration */
.project-switcher .custom-select-trigger {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-main);
  border-radius: 8px;
  min-height: 36px;
  padding: 6px 12px;
}
.project-switcher .custom-select-trigger span {
  color: var(--text-main);
  font-weight: 500;
}
.project-switcher .custom-select-trigger svg {
  color: var(--text-muted);
}
.project-switcher .custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.project-switcher .custom-select-options {
  background-color: var(--dropdown-bg);
  border-color: var(--border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  padding: 4px;
}
.project-switcher .custom-select-option {
  color: var(--dropdown-text);
  font-size: 13px;
}
.project-switcher .custom-select-option:hover {
  background-color: var(--dropdown-hover);
  color: var(--text-main);
}
.project-switcher .custom-select-option.selected {
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 500;
}

/* Side-by-Side Diff Modal */
.diff-split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  max-height: 420px;
  overflow-y: auto;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
}

.diff-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.diff-pane-header {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diff-pane-content {
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-main);
  overflow-x: auto;
}

.diff-pane-content.removed {
  background: rgba(239, 68, 68, 0.08);
}

.diff-pane-content.added {
  background: rgba(34, 197, 94, 0.08);
}
