/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-width: 260px;
  --header-height: 60px;
  --primary: #0d6efd;
  --primary-hover: #0b5ed7;
  --primary-light: rgba(13, 110, 253, 0.08);
  --sidebar-bg: #1e1e2d;
  --sidebar-text: #9899ac;
  --sidebar-active: #ffffff;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
  --header-bg: #ffffff;
  --body-bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #333;
  --text-muted: #5a6268;
  --border: #e9ecef;
  --success: #198754;
  --success-bg: #d1e7dd;
  --danger: #dc3545;
  --danger-bg: #f8d7da;
  --warning: #ffc107;
  --info: #0dcaf0;
  --info-bg: #cff4fc;
  --radius: 8px;
  --shadow: 0 2px 6px rgba(0,0,0,0.08);
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LOGIN PAGE ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e1e2d 0%, #2d2d44 100%);
}

.login-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 44px;
  width: 440px;
  max-width: 90vw;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0dcaf0);
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 12px 14px;
  background: rgba(13,110,253,0.04);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
}

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

.login-card .logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--sidebar-bg);
}

.login-card .logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ===== LAYOUT: SIDEBAR + HEADER + MAIN ===== */
.layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: width 0.3s;
}

.sidebar-logo {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sidebar-logo h1 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.sidebar-logo h1 span {
  color: var(--primary);
}

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}

.sidebar-section {
  padding: 0 20px;
  margin-bottom: 8px;
}

.sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
  padding: 12px 0 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--sidebar-text);
  cursor: pointer;
  border-radius: 8px;
  margin: 4px 8px;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-active);
  text-decoration: none;
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(13,110,253,0.3);
  border-left: 3px solid #fff;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.nav-item.active .nav-badge {
  background: rgba(255,255,255,0.3);
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 99;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h2 {
  font-size: 18px;
  font-weight: 600;
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.header-breadcrumb span { color: var(--text-muted); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--body-bg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.header-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

/* --- Main Content --- */
.main {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 24px;
  min-height: calc(100vh - var(--header-height));
  flex: 1;
}

/* ===== COMPONENTS ===== */

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

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

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-body { padding: 20px; }

/* Collapsible cards */
.card-collapsible .card-body { transition: max-height 0.3s ease, padding 0.3s ease; overflow: hidden; }
.card-collapsible.collapsed .card-body { max-height: 0; padding-top: 0; padding-bottom: 0; }
.card-chevron { transition: transform 0.2s; color: var(--text-muted); }
.card-collapsible.collapsed .card-chevron { transform: rotate(-90deg); }

/* Forms */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Settings sections */
.settings-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.settings-section:first-child { padding-top: 0; }
.settings-section:last-child { border-bottom: none; padding-bottom: 0; }

.settings-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Mapping select dropdowns */
.mapping-select-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mapping-select {
  flex: 1;
  padding: 3px 6px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  max-width: 100%;
}
.mapping-select:focus { border-color: var(--primary); outline: none; }
.conf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.conf-ok { background: #dcfce7; color: #16a34a; }
.conf-miss { background: #fee2e2; color: #dc2626; }

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}
.settings-toggle:hover { background: var(--bg-secondary); }
.settings-toggle input:checked + span { font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  text-decoration: none;
}

.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 10px 28px; font-size: 15px; }
.btn-primary { background: linear-gradient(135deg, #0d6efd, #0a58ca); color: #fff; box-shadow: 0 2px 8px rgba(13,110,253,0.2); }
.btn-primary:hover { background: linear-gradient(135deg, #0b5ed7, #084cba); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(13,110,253,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #157347; }
.btn-danger { background: linear-gradient(135deg, #dc3545, #bb2d3b); color: #fff; box-shadow: 0 2px 8px rgba(220,53,69,0.2); }
.btn-danger:hover { background: linear-gradient(135deg, #bb2d3b, #a52834); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(220,53,69,0.3); }
.btn-danger:active { transform: translateY(0); }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5c636a; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--body-bg); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: validate-spin 0.6s linear infinite;
  vertical-align: -1px;
}
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.badge-done { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--danger-bg); color: var(--danger); }
.badge-running { background: var(--info-bg); color: #055160; }
.badge-pending { background: #e2e3e5; color: #41464b; }
.badge-rolled_back { background: #f3e8ff; color: #7c3aed; }

/* Tables */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 14px; }
thead th {
  background: var(--body-bg);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
tbody td { border-bottom: 1px solid var(--border); }
tbody tr:hover { background: rgba(13, 110, 253, 0.02); }
tbody tr { cursor: pointer; }

/* Progress bar */
.progress {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* (entity-panel v1 removed — replaced by entity-panel-v2) */

/* Mapping */
/* ============================================= */
/* VARIANT MAPPING UI                            */
/* ============================================= */

/* Toolbar */
.mapping-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--body-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.mapping-filter {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mapping-filter:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,253,0.1); }
.mapping-stats {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  background: white;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Progress steps during auto-match */
.match-progress-container {
  max-width: 600px;
  margin: 40px auto;
  text-align: center;
}
.match-progress-steps {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}
.match-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.match-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.match-step.active .match-step-icon { background: var(--primary); color: white; animation: pulse-dot 1.5s infinite; }
.match-step.done .match-step-icon { background: var(--success); color: white; }
.match-step.active, .match-step.done { color: var(--text); }

/* Sections */
.mapping-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 8px;
  background: white;
  overflow: hidden;
  transition: all 0.2s;
}
.mapping-section.open {
  border-color: var(--primary);
  box-shadow: 0 2px 12px rgba(13,110,253,0.08);
  margin-top: 12px;
  margin-bottom: 12px;
}
.mapping-section.hidden { display: none; }
.mapping-section.conf-high { border-left: 3px solid var(--success); }
.mapping-section.conf-mid { border-left: 3px solid var(--warning); }
.mapping-section.conf-low { border-left: 3px solid var(--danger); }

/* Header */
.mapping-header {
  display: grid;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  gap: 8px;
  background: #fafbfc;
}
.mapping-header:hover { background: #f0f2f5; }
.mapping-section.open .mapping-header { background: #f0f4ff; border-bottom: 1px solid var(--border); }

.mapping-header .chevron {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.mapping-section.open .mapping-header .chevron { transform: rotate(90deg); }

.mapping-header strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapping-header .mapping-meta { font-size: 11px; color: var(--text-muted); text-align: left; display: flex; align-items: center; gap: 4px; }
.mapping-header .mapping-conf { font-size: 11px; font-weight: 600; white-space: nowrap; text-align: right; }

/* Values grid */
.mapping-values {
  display: none;
  padding: 0;
  max-height: 500px;
  overflow-y: auto;
}
.mapping-section.open .mapping-values { display: block; }

.mapping-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 12px;
  transition: background 0.1s;
}
.mapping-row:last-child { border-bottom: none; }
.mapping-row:hover { background: #fafbff; }
.mapping-row .arrow { color: var(--text-muted); font-size: 14px; text-align: center; }
.mapping-row select { font-size: 12px; padding: 3px 6px; width: 100%; }
.mapping-row .mapping-reason { font-size: 10px; text-align: right; color: var(--text-muted); }
.mapping-row.unmatched { background: #fff8f8; }
.mapping-row.unmatched:hover { background: #fff0f0; }

/* Searchable select */
.search-select { position: relative; }
.search-select input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  background: white;
  transition: border-color 0.2s;
}
.search-select input:focus { outline: none; border-color: var(--primary); }
.search-select .ss-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 180px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--primary);
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.search-select.open .ss-dropdown { display: block; }
.search-select .ss-option {
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.1s;
}
.search-select .ss-option:hover { background: var(--primary); color: white; }
.search-select .ss-option.selected { background: #f0f4ff; font-weight: 600; }
.search-select .ss-empty { padding: 8px; color: var(--text-muted); font-size: 11px; font-style: italic; }

/* Mapping select dropdowns (saved view) */
.mapping-select-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mapping-select {
  flex: 1;
  padding: 3px 6px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s;
  max-width: 100%;
}
.mapping-select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(13,110,253,0.1); }

/* Confidence badges */
.conf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.conf-ok { background: #dcfce7; color: #16a34a; }
.conf-miss { background: #fee2e2; color: #dc2626; }
.conf-ai { background: #dbeafe; color: #2563eb; }

/* Summary stats bar */
.mapping-summary {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.mapping-summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mapping-summary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mapping-summary-dot.green { background: var(--success); }
.mapping-summary-dot.blue { background: var(--primary); }
.mapping-summary-dot.yellow { background: var(--warning); }
.mapping-summary-dot.red { background: var(--danger); }

/* Project list */
.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.project-card:last-child { border-bottom: none; }
.project-card:hover { background: var(--primary-light); }

.project-card .project-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.project-card .project-info .project-meta { font-size: 12px; color: var(--text-muted); }
.project-card .project-actions { display: flex; gap: 8px; }

/* Connection status */
.conn-status {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

.conn-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--body-bg);
  font-size: 14px;
  font-weight: 500;
}

.conn-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
}

.conn-item .dot.ok { background: var(--success); }
.conn-item .dot.fail { background: var(--danger); }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  border-left: 4px solid transparent;
}

.alert-danger { background: var(--danger-bg); color: var(--danger); border-left-color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); border-left-color: var(--success); }

/* Utility */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.text-error { color: var(--danger); }
.text-success { color: var(--success); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }

/* ===== DATA SOURCE HERO ===== */
.ds-hero {
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13,110,253,0.06) 0%, rgba(13,110,253,0.02) 100%);
  border: 1px solid rgba(13,110,253,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(13,110,253,0.06);
}
.ds-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}
.ds-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ds-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #4f9cf7 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ds-hero-title { font-size: 15px; font-weight: 700; color: var(--text); }
.ds-hero-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; }
.ds-dot { width: 8px; height: 8px; border-radius: 50%; background: #ccc; flex-shrink: 0; }
.ds-dot-ok { background: var(--success); }
.ds-dot-warn { background: var(--danger); }
.ds-dot-muted { background: var(--text-muted); }
.ds-status { color: var(--text-muted); }
.ds-status-ok { color: var(--success); }
.ds-status-warn { color: var(--danger); }
.ds-status-muted { color: var(--text-muted); }
.ds-pills { display: flex; gap: 4px; background: rgba(0,0,0,0.04); border-radius: 10px; padding: 4px; }
.ds-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}
.ds-pill:hover { color: var(--text); background: rgba(255,255,255,0.5); }
.ds-pill.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ===== DRY-RUN TOGGLE ===== */
.ds-dryrun {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-left: 12px;
}
.ds-dryrun input { display: none; }
.ds-dryrun-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  transition: all 0.2s;
  user-select: none;
}
.ds-dryrun-label:hover { border-color: #d97706; color: #d97706; }
.ds-dryrun input:checked + .ds-dryrun-label {
  color: #d97706;
  border-color: #d97706;
  border-style: solid;
  background: rgba(217,119,6,0.06);
}

/* Dry-run entity panel states */
.entity-panel-v2.dry-run.done {
  border-color: rgba(217,119,6,0.3);
  background: rgba(217,119,6,0.03);
  animation: panel-done-flash 0.8s ease-out;
}
.entity-panel-v2.dry-run.done .entity-icon {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
}
.entity-panel-v2.dry-run.done .progress-fill-v2 {
  background: linear-gradient(90deg, #d97706, #f59e0b);
  box-shadow: 0 0 12px rgba(217,119,6,0.3);
  animation: progress-done-glow 1.5s ease-out forwards;
}
.entity-panel-v2.dry-run .completion-badge.success {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 2px 12px rgba(217,119,6,0.4);
}
.entity-panel-v2.dry-run .done-summary.success {
  background: linear-gradient(135deg, rgba(217,119,6,0.08), rgba(245,158,11,0.08));
  color: #d97706;
  border-color: rgba(217,119,6,0.15);
}

/* ===== SKELETON LOADER ===== */
.skeleton-loader { animation: skeleton-fade-in 0.4s ease-out; }
.skeleton-group { margin-bottom: 12px; padding-left: 36px; margin-left: 11px; border-left: 2px solid #e2e5ea; }
.skeleton-label {
  width: 120px;
  height: 16px;
  background: linear-gradient(90deg, #e9ecf0 25%, #f4f5f7 50%, #e9ecf0 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  margin: 16px 0 10px -47px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.skeleton-card {
  height: 64px;
  background: linear-gradient(90deg, #edf0f4 25%, #f8f9fb 50%, #edf0f4 75%);
  background-size: 200% 100%;
  border: 1px solid #e9ecf0;
  border-radius: 12px;
  margin-bottom: 8px;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.skeleton-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e2e5ea 25%, #edf0f4 50%, #e2e5ea 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.skeleton-card:nth-child(2) { animation-delay: 0.15s; }
.skeleton-card:nth-child(3) { animation-delay: 0.3s; }
.skeleton-card:nth-child(4) { animation-delay: 0.45s; }
.skeleton-card:nth-child(2)::after { animation-delay: 0.15s; }
.skeleton-card:nth-child(3)::after { animation-delay: 0.3s; }
.skeleton-card:nth-child(4)::after { animation-delay: 0.45s; }

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes skeleton-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CTA ROW ===== */
.cta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}
.cta-row .pipeline-cta { margin-bottom: 0; min-width: 0; }

/* ===== ACTION CARDS ===== */
.pipeline-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 22px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.pipeline-cta:hover {
  border-color: rgba(13,110,253,0.3);
  background: #fff;
  box-shadow: 0 4px 16px rgba(13,110,253,0.08);
}
.pipeline-cta:active { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.pipeline-cta-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #4f9cf7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pipeline-cta strong { display: block; font-size: 14px; }
.pipeline-cta-sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* Pipeline queue status bar */
.pipeline-queue-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13,110,253,0.06), rgba(79,156,247,0.03));
  border: 1px solid rgba(13,110,253,0.15);
  font-size: 13px;
  animation: summary-slide-in 0.3s ease-out;
}
.pipeline-queue-bar .pq-label {
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pipeline-queue-bar .pq-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}
.pipeline-queue-bar .pq-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(0,0,0,0.04);
  color: var(--text-muted);
  transition: all 0.3s;
}
.pq-step.pq-done { background: rgba(25,135,84,0.1); color: var(--success); }
.pq-step.pq-active { background: var(--primary); color: #fff; animation: pulse-dot 1.5s infinite; }
.pq-step.pq-error { background: rgba(220,53,69,0.1); color: var(--danger); }
.pq-step-arrow { color: var(--border); font-size: 10px; }
.pipeline-queue-bar .pq-stop {
  margin-left: auto;
  padding: 4px 14px;
  border-radius: 6px;
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.pipeline-queue-bar .pq-stop:hover { background: var(--danger); color: #fff; }

/* Pipeline modal */
.pm-entity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 420px;
  overflow-y: auto;
}
.pm-entity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.pm-entity:hover { background: rgba(13,110,253,0.03); border-color: rgba(13,110,253,0.2); }
.pm-entity.selected { background: rgba(13,110,253,0.05); border-color: var(--primary); }
.pm-entity.disabled { opacity: 0.4; cursor: not-allowed; }
.pm-entity .pm-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--body-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.pm-entity.selected .pm-icon {
  background: linear-gradient(135deg, var(--primary), #4f9cf7);
  color: #fff;
}
.pm-entity .pm-name { font-weight: 600; font-size: 13px; flex: 1; }
.pm-entity .pm-deps { font-size: 11px; color: var(--text-muted); }
.pm-entity .pm-check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.pm-entity.selected .pm-check {
  background: var(--primary);
  border-color: var(--primary);
}
.pm-entity .pm-order {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pm-entity.selected .pm-order { display: flex; }
.pm-entity.selected .pm-check { display: none; }

/* Pipeline preview in modal footer */
.pm-preview {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.pm-preview-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(13,110,253,0.08);
  color: var(--primary);
  font-weight: 600;
  font-size: 11px;
}
.pm-preview-arrow { color: var(--border); }

/* Pre-migration summary */
.pm-summary {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(13,110,253,0.04);
  border: 1px solid rgba(13,110,253,0.12);
}
.pm-summary-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}
.pm-summary-inner svg { flex-shrink: 0; margin-top: 1px; color: var(--primary); }
.pm-summary-inner strong { display: block; font-size: 13px; }
.pm-summary-detail { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== PIPELINE V2 — Grouped with glassmorphism ===== */
.pipeline-v2 {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pipeline-group {
  position: relative;
  margin-bottom: 4px;
}

.pipeline-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 6px;
  margin-bottom: 2px;
}

.pipeline-group-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #4f9cf7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.pipeline-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--text-muted);
}

.pipeline-group-content {
  position: relative;
  padding-left: 36px;
  margin-left: 11px;
  border-left: 2px solid var(--border);
}

.pipeline-group:last-child .pipeline-group-content {
  border-left-color: transparent;
}

/* Pipeline step dots */
.pipeline-step {
  position: relative;
  margin-bottom: 6px;
}

.pipeline-step::before {
  content: '';
  position: absolute;
  left: -43px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--border);
  z-index: 1;
}

.pipeline-step.step-done::before {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success), 0 0 8px rgba(25,135,84,0.3);
}

.pipeline-step.step-running::before {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
  animation: pulse-dot 1.5s infinite;
}

.pipeline-step.step-error::before {
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--danger), 0 0 8px rgba(220,53,69,0.3);
}

.pipeline-step.step-disabled .entity-panel-v2 {
  opacity: 0.5;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px var(--primary); }
  50% { box-shadow: 0 0 0 8px rgba(13, 110, 253, 0.15); }
}

/* ===== ENTITY PANEL V2 — Glassmorphism ===== */
.entity-panel-v2 {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: all 0.25s ease;
}

.entity-panel-v2:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,0.8);
  transform: translateY(-1px);
}

.entity-panel-v2.running {
  border: 2px solid var(--primary);
  border-radius: 10px;
  background: rgba(255,255,255,0.95);
}

.entity-panel-v2.done {
  border: 1px solid rgba(25,135,84,0.3);
  background: rgba(25,135,84,0.03);
  animation: panel-done-flash 0.8s ease-out;
}

.entity-panel-v2.error {
  border: 1px solid rgba(220,53,69,0.3);
  background: rgba(220,53,69,0.03);
  animation: panel-error-shake 0.5s ease-out;
}

/* Entity header */
.entity-header-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}

.entity-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--body-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.entity-panel-v2.running .entity-icon {
  background: linear-gradient(135deg, var(--primary), #4f9cf7);
  color: #fff;
}

.entity-panel-v2.done .entity-icon {
  background: var(--success);
  color: #fff;
}

.entity-panel-v2.error .entity-icon {
  background: var(--danger);
  color: #fff;
}

.entity-header-v2 h3 {
  font-size: 14px;
  font-weight: 600;
}

/* Entity action buttons */
.entity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.entity-actions .btn-migrate {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}

.btn-entity-options {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-entity-options:hover { background: var(--body-bg); color: var(--text); }
.btn-entity-options { position: relative; }
.btn-entity-options::after {
  content: 'Indstillinger';
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--sidebar-bg); color: #fff; font-size: 11px; padding: 4px 8px;
  border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.btn-entity-options:hover::after { opacity: 1; }
.btn-entity-options.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* Entity queue checkbox */
.entity-queue-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}
.entity-queue-label:hover { background: var(--body-bg); }
.entity-queue-cb {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* Custom queue footer */
.cq-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--card-bg, #fff);
  border-top: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  animation: summary-slide-in 0.2s ease-out;
}
.cq-footer.hidden { display: none; }
.cq-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.cq-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.cq-items {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.cq-items::-webkit-scrollbar { display: none; }
.cq-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  background: var(--body-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cq-item:active { cursor: grabbing; }
.cq-item.cq-dragging { opacity: 0.4; }
.cq-item.cq-over { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.cq-drag-handle { color: var(--text-muted); display: flex; align-items: center; }
.cq-num {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cq-label { color: var(--text); }
.cq-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 2px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.cq-remove:hover { color: var(--danger); }
.cq-arrow {
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
}
.cq-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Entity options drawer */
.entity-options {
  padding: 16px 20px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  background: #f8f9fb;
  border-radius: 0 0 10px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: summary-slide-in 0.2s ease-out;
}

.entity-opt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s;
  cursor: pointer;
}
.entity-opt:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.entity-opt input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.entity-opt input[type="text"] {
  width: 160px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  font-family: var(--font);
}
.entity-opt input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,253,0.1); }
.entity-opt .btn { font-size: 13px; padding: 8px 16px; }
.entity-opt .btn-primary { background: var(--primary); color: #fff; border: none; }
.entity-opt .btn-secondary { background: #6c757d; color: #fff; border: none; text-decoration: none; }
.entity-opt .btn-secondary:hover { background: #5c636a; }
.simple-variant-count-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--body-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
}

.entity-opt-info {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--body-bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  flex-shrink: 0;
  border: 1px solid var(--border);
  position: relative;
}
.entity-opt-info:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Tooltip for info buttons */
.entity-opt-info::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e2d;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.4;
  width: 220px;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.entity-opt-info:hover::after {
  opacity: 1;
}

.entity-deps {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
  padding: 2px 8px;
  background: var(--body-bg);
  border-radius: 4px;
}

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

/* Progress bar V2 — gradient with glow */
.progress-v2 {
  width: 100%;
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill-v2 {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), #4f9cf7, #67d6f7);
  background-size: 200% 100%;
  box-shadow: 0 0 12px rgba(13,110,253,0.3);
  transition: width 0.5s ease;
  animation: shimmer 2s linear infinite;
}

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

.entity-panel-v2.done .progress-v2 {
  position: relative;
  overflow: visible;
  height: 6px;
}

.entity-panel-v2.done .progress-fill-v2 {
  background: linear-gradient(90deg, var(--success), #34d399);
  box-shadow: 0 0 12px rgba(25,135,84,0.3);
  animation: progress-done-glow 1.5s ease-out forwards;
}

.entity-panel-v2.error .progress-fill-v2 {
  background: linear-gradient(90deg, var(--danger), #f87171);
  box-shadow: 0 0 12px rgba(220,53,69,0.3);
  animation: none;
}

/* Completion badge overlay */
.completion-badge {
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  animation: badge-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.completion-badge.success {
  background: linear-gradient(135deg, var(--success), #34d399);
  box-shadow: 0 2px 12px rgba(25,135,84,0.4);
}

.completion-badge.failure {
  background: linear-gradient(135deg, var(--danger), #f87171);
  box-shadow: 0 2px 12px rgba(220,53,69,0.4);
}

.completion-badge svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.completion-badge.success svg {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkmark-draw 0.4s ease-out 0.6s forwards;
}

.completion-badge.failure svg {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: checkmark-draw 0.3s ease-out 0.6s forwards;
}

/* Particle burst on completion */
.completion-particles {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.completion-particles .particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0;
  animation: particle-burst 0.8s ease-out 0.4s forwards;
}

/* Done summary bar */
.done-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  animation: summary-slide-in 0.4s ease-out 0.2s both;
}

.done-summary.success {
  background: linear-gradient(135deg, rgba(25,135,84,0.08), rgba(52,211,153,0.08));
  color: var(--success);
  border: 1px solid rgba(25,135,84,0.15);
}

.done-summary.failure {
  background: linear-gradient(135deg, rgba(220,53,69,0.08), rgba(248,113,113,0.08));
  color: var(--danger);
  border: 1px solid rgba(220,53,69,0.15);
}

.done-summary svg {
  flex-shrink: 0;
}

.done-summary .done-detail {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: auto;
  font-size: 12px;
}

/* Animations */
@keyframes panel-done-flash {
  0% { box-shadow: 0 0 0 0 rgba(25,135,84,0.4); }
  40% { box-shadow: 0 0 0 8px rgba(25,135,84,0.1); }
  100% { box-shadow: 0 2px 12px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8); }
}

@keyframes panel-error-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@keyframes badge-pop {
  0% { transform: translateY(-50%) scale(0); }
  100% { transform: translateY(-50%) scale(1); }
}

@keyframes checkmark-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes progress-done-glow {
  0% { box-shadow: 0 0 12px rgba(25,135,84,0.3); }
  50% { box-shadow: 0 0 24px rgba(25,135,84,0.5), 0 0 48px rgba(52,211,153,0.2); }
  100% { box-shadow: 0 0 8px rgba(25,135,84,0.2); }
}

@keyframes particle-burst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: var(--particle-end) scale(0); }
}

@keyframes summary-slide-in {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Stat pills */
.entity-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--body-bg);
  font-size: 12px;
}

.stat-pill-label {
  color: var(--text-muted);
  font-weight: 500;
}

.stat-pill-value {
  font-weight: 700;
  color: var(--text);
}

.stat-pill-ok { background: rgba(25,135,84,0.08); }
.stat-pill-ok .stat-pill-value { color: var(--success); }
.stat-pill-err { background: rgba(220,53,69,0.08); }
.stat-pill-err .stat-pill-value { color: var(--danger); }
.stat-pill-skip { background: rgba(108,117,125,0.08); }
.stat-pill-skip .stat-pill-value { color: var(--text-muted); }

.stat-time {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
}

/* Current item indicator */
.current-item {
  font-size: 12px;
  color: var(--primary);
  margin-top: 8px;
  padding: 4px 12px;
  background: rgba(13,110,253,0.04);
  border-radius: 6px;
  border-left: 2px solid var(--primary);
  font-family: 'SF Mono', 'Fira Code', monospace;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  animation: item-fade 0.3s ease-out;
}

@keyframes item-fade {
  0% { opacity: 0; transform: translateX(-4px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ===== LOG VIEWER V2 ===== */
.log-viewer {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 16px 20px;
  max-height: 320px;
  overflow-y: auto;
  border-radius: 0 0 8px 8px;
}

.log-placeholder {
  color: #484f58;
  font-style: italic;
}

.log-line {
  white-space: pre-wrap;
  word-break: break-all;
  padding: 2px 0;
  border-left: 3px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  transition: background 0.15s;
}
.log-line:hover { background: rgba(255,255,255,0.03); }
.log-line.error { color: var(--danger); border-left-color: var(--danger); }
.log-line.success { color: var(--success); border-left-color: var(--success); }
.log-line.info { color: #58a6ff; border-left-color: #58a6ff; }
.log-line.warn { color: #d29922; border-left-color: #d29922; }

.log-card .card-header {
  background: #161b22;
  border-bottom: 1px solid #21262d;
  color: #c9d1d9;
}
.log-card .card-header h3 { color: #c9d1d9; }
.log-card .btn-outline { border-color: rgba(255,255,255,0.15); color: var(--sidebar-text); }
.log-card .btn-outline:hover { background: #21262d; }
.log-card .text-sm { color: var(--sidebar-text); }

/* Log mode toggle */
.log-mode-toggle {
  display: flex;
  background: #21262d;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
.log-mode-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.log-mode-btn:hover { color: #c9d1d9; }
.log-mode-btn.active { background: rgba(255,255,255,0.15); color: #c9d1d9; }

/* Validation scanning overlay */
.validate-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: validate-spin 0.8s linear infinite;
}
@keyframes validate-spin {
  to { transform: rotate(360deg); }
}
.validate-scan-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
}
.validate-scan-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--body-bg);
  color: var(--text-muted);
  transition: all 0.3s;
}
.validate-scan-item.active {
  background: rgba(13,110,253,0.08);
  color: var(--primary);
  font-weight: 700;
}
.validate-scan-item.done {
  background: rgba(25,135,84,0.08);
  color: var(--success);
}
.validate-scan-icon { display: flex; align-items: center; }
.validate-scan-item.done.has-errors {
  background: rgba(220,53,69,0.08);
  color: var(--danger);
}
.validate-scan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 1s infinite;
}

/* Validation report */
.vr-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 700;
}
.vr-summary.all-ok { background: rgba(25,135,84,0.06); border: 1px solid rgba(25,135,84,0.15); color: var(--success); }
.vr-summary.has-issues { background: rgba(217,119,6,0.06); border: 1px solid rgba(217,119,6,0.15); color: #d97706; }
.vr-summary.has-errors { background: rgba(220,53,69,0.06); border: 1px solid rgba(220,53,69,0.15); color: var(--danger); }

.vr-entity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.15s;
}
.vr-entity.vr-expandable { cursor: pointer; }
.vr-entity.vr-expandable:hover { background: rgba(13,110,253,0.02); border-color: rgba(13,110,253,0.15); }
.vr-entity .vr-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vr-entity .vr-icon.ok { background: rgba(25,135,84,0.1); color: var(--success); }
.vr-entity .vr-icon.warn { background: rgba(217,119,6,0.1); color: #d97706; }
.vr-entity .vr-icon.err { background: rgba(220,53,69,0.1); color: var(--danger); }
.vr-info { flex: 1; min-width: 0; }
.vr-name { font-weight: 700; font-size: 14px; display: block; }
.vr-sub { font-size: 12px; color: var(--text-muted); display: block; margin-top: 1px; }
.vr-stats { display: flex; gap: 6px; font-size: 12px; flex-shrink: 0; }
.vr-stat { padding: 3px 10px; border-radius: 12px; font-weight: 700; }
.vr-stat.ok { background: rgba(25,135,84,0.08); color: var(--success); }
.vr-stat.warn { background: rgba(217,119,6,0.08); color: #d97706; }
.vr-stat.err { background: rgba(220,53,69,0.08); color: var(--danger); }
.vr-chevron {
  color: var(--text-muted); flex-shrink: 0; transition: transform 0.2s;
  display: flex; align-items: center;
}

/* Validation details */
.vr-details {
  margin: -4px 0 8px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 240px;
  overflow-y: auto;
  background: #fafbfc;
}
.vr-detail-row {
  display: grid;
  grid-template-columns: 20px 140px 60px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 12px;
  border-bottom: 1px solid #f0f1f3;
  transition: background 0.1s;
}
.vr-detail-row:last-child { border-bottom: none; }
.vr-detail-row:hover { background: #f5f6f8; }
.vr-detail-row.vr-detail-err { border-left: 3px solid var(--danger); }
.vr-detail-row.vr-detail-warn { border-left: 3px solid #d97706; }
.vr-detail-badge {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.vr-detail-badge.err { background: rgba(220,53,69,0.1); color: var(--danger); }
.vr-detail-badge.warn { background: rgba(217,119,6,0.1); color: #d97706; }
.vr-detail-id {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  padding: 2px 8px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vr-detail-field {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.vr-detail-msg { color: var(--text); }

/* Health check */
.hc-checks { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.hc-check {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.hc-check-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hc-check-header svg { flex-shrink: 0; margin-top: 2px; }
.hc-check-info { flex: 1; }
.hc-check-info strong { font-size: 13px; display: block; }
.hc-check-meta { font-size: 11px; color: var(--text-muted); display: block; margin-top: 2px; }
.hc-check-meta code { font-size: 11px; background: rgba(0,0,0,0.04); padding: 1px 6px; border-radius: 3px; }
.hc-check-issues { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 2px; }

/* Export bar */
.export-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* PDF report (rendered offscreen, captured by html2canvas) */
.pdf-render {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 794px; /* A4 width at 96dpi */
  background: white;
  font-family: 'Segoe UI', -apple-system, sans-serif;
  color: #1a1a2e;
}
.pdf-page {
  padding: 48px;
  min-height: 1123px; /* A4 height */
  position: relative;
}
.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e9ecef;
}
.pdf-logo img { height: 36px; }
.pdf-title { font-size: 24px; font-weight: 800; color: #1a1a2e; text-align: right; letter-spacing: -0.3px; }
.pdf-subtitle { font-size: 12px; color: #6c757d; text-align: right; margin-top: 4px; }
.pdf-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}
.pdf-meta-item { font-size: 13px; }
.pdf-meta-label { font-size: 10px; color: #6c757d; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 4px; }
.pdf-meta-value { font-weight: 700; font-size: 14px; color: #1a1a2e; }
.pdf-status-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: 0.2px;
}
.pdf-status-ok { background: #d1e7dd; color: #0f5132; border: 1px solid #a3cfbb; }
.pdf-status-warn { background: #fff3cd; color: #664d03; border: 1px solid #ffe69c; }
.pdf-entities { margin-bottom: 28px; border: 1px solid #e9ecef; border-radius: 12px; overflow: hidden; }
.pdf-entity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 14px;
}
.pdf-entity-row:last-child { border-bottom: none; }
.pdf-entity-row:nth-child(even) { background: #fafbfc; }
.pdf-entity-name { font-weight: 700; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pdf-entity-check { color: #198754; font-size: 16px; }
.pdf-entity-warn { color: #cc7700; font-size: 16px; }
.pdf-entity-count { color: #6c757d; font-size: 13px; font-weight: 500; }
.pdf-total {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, #eef4ff, #e0f0ff);
  border-radius: 14px;
  margin-bottom: 28px;
  border: 1px solid rgba(13,110,253,0.1);
}
.pdf-total-num { font-size: 48px; font-weight: 900; color: #0d6efd; letter-spacing: -1px; }
.pdf-total-label { font-size: 14px; color: #6c757d; margin-top: 6px; font-weight: 500; }
.pdf-footer {
  position: absolute;
  bottom: 32px;
  left: 48px;
  right: 48px;
  text-align: center;
  font-size: 10px;
  color: #adb5bd;
  border-top: 1px solid #e9ecef;
  padding-top: 12px;
  letter-spacing: 0.3px;
}
.pdf-errors-title { font-size: 18px; font-weight: 800; margin: 36px 0 16px; padding-top: 28px; border-top: 2px solid #e9ecef; color: #1a1a2e; }
.pdf-error-group { margin-bottom: 12px; padding: 16px 20px; background: #fff5f5; border-radius: 10px; border-left: 4px solid #dc3545; }
.pdf-error-group-header { font-weight: 700; font-size: 14px; margin-bottom: 6px; color: #1a1a2e; }
.pdf-error-group-ids { font-size: 12px; color: #6c757d; font-family: 'SF Mono', monospace; }

/* Error groups */
.err-groups { padding: 12px 16px; max-height: 400px; overflow-y: auto; }
.err-group {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid var(--danger);
}
.err-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.err-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  border-radius: 12px;
  background: rgba(220,53,69,0.1);
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  padding: 0 8px;
}
.err-group-msg {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.err-group-ids {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.err-group-ids code {
  font-size: 11px;
  background: rgba(0,0,0,0.04);
  padding: 1px 6px;
  border-radius: 3px;
}

/* Error log modal */
.error-log-viewer {
  background: var(--sidebar-bg);
  max-height: 400px;
  overflow-y: auto;
}
.error-log-pre {
  margin: 0;
  padding: 20px 24px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Modal / Preview */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--card-bg);
  border-radius: 12px;
  width: 800px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.modal-header h3 { font-size: 18px; }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-list {
  max-height: 400px;
  overflow-y: auto;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.preview-item:hover { background: rgba(13, 110, 253, 0.02); }
.preview-item .preview-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-item .preview-id { color: var(--text-muted); font-size: 12px; min-width: 80px; }
.preview-item .preview-meta { color: var(--text-muted); font-size: 12px; }
.preview-item.migrated { background: rgba(25, 135, 84, 0.05); }
.preview-item.migrated .preview-name::after { content: ' ✓'; color: var(--success); font-size: 11px; }

.preview-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

/* ===== GO-LIVE DASHBOARD ===== */
.gl-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 14px;
  margin-bottom: 20px;
}
.gl-hero-ready { background: linear-gradient(135deg, rgba(25,135,84,0.08), rgba(52,211,153,0.04)); border: 1px solid rgba(25,135,84,0.2); color: var(--success); }
.gl-hero-partial { background: linear-gradient(135deg, rgba(217,119,6,0.08), rgba(245,158,11,0.04)); border: 1px solid rgba(217,119,6,0.2); color: #d97706; }
.gl-hero-not-ready { background: linear-gradient(135deg, rgba(220,53,69,0.08), rgba(248,113,113,0.04)); border: 1px solid rgba(220,53,69,0.2); color: var(--danger); }
.gl-hero-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gl-hero-ready .gl-hero-icon { background: var(--success); }
.gl-hero-partial .gl-hero-icon { background: #d97706; }
.gl-hero-not-ready .gl-hero-icon { background: var(--danger); }
.gl-hero-icon svg { stroke: #fff; }
.gl-hero-text h2 { font-size: 20px; font-weight: 800; margin: 0; color: inherit; }
.gl-hero-text p { font-size: 14px; color: var(--text-muted); margin: 4px 0 0; }

/* Entity table */
.gl-entity-table { overflow: hidden; }
.gl-entity-header {
  display: grid;
  grid-template-columns: 32px 1fr 24px 200px 160px;
  gap: 8px;
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--body-bg);
  border-bottom: 2px solid var(--border);
}
.gl-entity-row {
  display: grid;
  grid-template-columns: 32px 1fr 24px 200px 160px;
  gap: 8px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  transition: background 0.1s;
}
.gl-entity-row:last-child { border-bottom: none; }
.gl-entity-row:hover { background: rgba(13,110,253,0.02); }
.gl-entity-row.gl-missing { opacity: 0.5; }
.gl-entity-icon { display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.gl-entity-row.gl-ok .gl-entity-icon { color: var(--success); }
.gl-entity-row.gl-warn .gl-entity-icon { color: #d97706; }
.gl-entity-name { font-weight: 600; }
.gl-entity-status { display: flex; align-items: center; }
.gl-entity-count { font-size: 12px; color: var(--text-muted); }
.gl-entity-row.gl-warn .gl-entity-count { color: #d97706; font-weight: 600; }
.gl-entity-time { font-size: 11px; color: var(--text-muted); }

/* Dependency pipeline */
.gl-pipeline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.gl-pipe-step {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.gl-pipe-done { background: rgba(25,135,84,0.1); color: var(--success); }
.gl-pipe-pending { background: var(--body-bg); color: var(--text-muted); }
.gl-pipe-arrow { color: var(--border); font-size: 14px; }

/* Health check */
.gl-health-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.gl-health-summary.gl-ok { background: rgba(25,135,84,0.06); color: var(--success); }
.gl-health-summary.gl-warn { background: rgba(217,119,6,0.06); color: #d97706; }
.gl-health-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid #f3f4f6;
}
.gl-health-row:last-child { border-bottom: none; }
.gl-health-row strong { font-size: 13px; }
.gl-health-row code { font-size: 11px; background: rgba(0,0,0,0.04); padding: 1px 6px; border-radius: 3px; }

/* Test result rows */
.test-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.test-result-row:last-child { border-bottom: none; }

/* Empty states */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 13px; line-height: 1.6; margin-bottom: 20px; }

/* Responsive */
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 0; overflow: hidden; }
  .header { left: 0; }
  .main { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }

  /* Modals: full-width on mobile */
  .modal { width: 95vw !important; max-width: 95vw !important; max-height: 90vh; }
  .modal-body { max-height: 70vh; overflow-y: auto; }

  /* CTA row: stack vertically */
  .cta-row { flex-direction: column; }

  /* Data source hero: stack */
  .ds-hero-inner { flex-direction: column; gap: 12px; align-items: stretch; }
  .ds-pills { justify-content: center; }

  /* Entity panels: wrap actions */
  .entity-header-v2 { flex-wrap: wrap; }
  .entity-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }

  /* Entity options: stack */
  .entity-options { flex-direction: column; }

  /* Pipeline group: less indent */
  .pipeline-group-content { padding-left: 20px; margin-left: 8px; }

  /* Stats pills: wrap */
  .entity-stats { flex-wrap: wrap; }

  /* Log viewer: larger font */
  .log-viewer { font-size: 13px; }

  /* Validation details: stack */
  .vr-detail-row { grid-template-columns: 20px 1fr; }
  .vr-detail-id, .vr-detail-field { display: none; }

  /* Header breadcrumb: hide */
  .header-breadcrumb { display: none; }
}

@media (max-width: 480px) {
  .header-left h2 { font-size: 15px; }
  .entity-header-v2 h3 { font-size: 13px; }
  .btn-migrate { font-size: 12px !important; padding: 6px 14px !important; }
}
