/* ==========================================================================
   SolutionsExplorer - Premium Dark Responsive Table Design System
   with Grouping, Multi-Filtering & Git Local/Sync Safety Layers
   ========================================================================== */

:root {
  /* Color Palette - Dark Modern Slate */
  --bg-app: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-surface-hover: #222f42;
  --bg-glass: rgba(15, 23, 42, 0.85);

  --border-subtle: #1e293b;
  --border-default: #334155;
  --border-focus: #6366f1;
  --border-highlight: rgba(99, 102, 241, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Brand & Semantic Accents */
  --color-primary: #6366f1;      /* Indigo */
  --color-primary-hover: #4f46e5;
  --color-accent: #06b6d4;       /* Cyan */
  --color-success: #10b981;      /* Emerald */
  --color-warning: #f59e0b;      /* Amber / Gold */
  --color-danger: #f43f5e;       /* Rose */
  --color-purple: #a855f7;       /* Purple */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);

  /* Typography & Layout */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --transition: all 0.15s ease;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 16px;
}

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

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

/* Source Status Pill */
.header-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: var(--transition);
}

.header-source-pill:hover {
  border-color: var(--color-primary);
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
  flex-shrink: 0;
}

.source-dot.error {
  background: var(--color-danger);
  box-shadow: 0 0 6px var(--color-danger);
}

/* Header KPI Badges */
.header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.kpi-chip.highlight {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.1);
}

.kpi-chip.highlight .kpi-value {
  color: #a5b4fc;
}

.kpi-chip.primary-app {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.1);
}

.kpi-chip.primary-app .kpi-value {
  color: #fda4af;
}

.kpi-chip.favorite-chip {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.kpi-chip.favorite-chip .kpi-value {
  color: #fbbf24;
}

.kpi-chip.hidden-chip {
  border-color: rgba(100, 116, 139, 0.4);
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
}

.kpi-chip.hidden-chip .kpi-value {
  color: #cbd5e1;
}

.kpi-label {
  color: var(--text-muted);
}

.kpi-value {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  border-color: #475569;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
  padding: 5px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sync-btn {
  border-color: rgba(6, 182, 212, 0.4);
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.08);
}

.sync-btn:hover {
  background: rgba(6, 182, 212, 0.18);
  border-color: #06b6d4;
}

/* Visual Studio Button Styles */
.btn-vs {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  border-color: rgba(167, 139, 250, 0.3);
}

.btn-vs:hover {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

.btn-vs-icon {
  color: #c4b5fd;
}

.btn-vs-icon:hover {
  color: #ffffff;
  background: rgba(124, 58, 237, 0.3) !important;
  border-color: #a78bfa !important;
}

/* Star / Favorite Buttons */
.btn-star {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-star:hover {
  color: #fbbf24;
  transform: scale(1.2);
}

.btn-star.active {
  color: #f59e0b;
}

.btn-star.active svg {
  fill: #f59e0b;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}

/* Hide / Unhide Action Buttons */
.btn-action-hide {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-action-hide:hover {
  color: #f43f5e;
  transform: scale(1.2);
}

.btn-action-hide.is-hidden-action {
  color: #38bdf8;
}

.btn-action-hide.is-hidden-action:hover {
  color: #10b981;
}

.btn-fav-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-fav-filter:hover {
  border-color: #f59e0b;
  color: #fbbf24;
}

.btn-fav-filter.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}

.btn-fav-filter.active svg {
  fill: #f59e0b;
}

.btn-hidden-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-hidden-filter:hover {
  border-color: #a855f7;
  color: #c084fc;
}

.btn-hidden-filter.active {
  background: rgba(168, 85, 247, 0.15);
  border-color: #a855f7;
  color: #c084fc;
}

/* Navigation Tabs */
.nav-tabs-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-tabs {
  display: flex;
  gap: 2px;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 15px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--text-primary);
}

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

/* Filters Bar */
.filters-bar {
  padding: 12px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 9px 36px 9px 38px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}

#searchInput:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.filter-dropdowns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filters-context-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.custom-select {
  padding: 6px 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
  max-width: 220px;
}

.custom-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.custom-select.small {
  padding: 4px 8px;
  font-size: 0.78rem;
}

.custom-select.highlight-select {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
  color: #c7d2fe;
  font-weight: 600;
}

/* Active Filter Pills */
.active-filters-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 24px;
  flex-wrap: wrap;
}

.active-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: #a5b4fc;
}

.active-pill.hidden-pill {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
  color: #d8b4fe;
}

.active-pill button {
  background: transparent;
  border: none;
  color: #a5b4fc;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Main Content */
.app-main {
  flex: 1;
  padding: 16px 24px 32px;
  width: 100%;
}

.view-content {
  display: none;
  width: 100%;
}

.view-content.active {
  display: block;
}

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

.results-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text-primary);
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ==========================================================================
   Zero Horizontal Scroll Data Table & Grouping Headers
   ========================================================================== */

.solutions-table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 100%;
  overflow-x: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
  table-layout: auto;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  background: var(--bg-surface-elevated);
  padding: 9px 10px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
}

.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover td {
  background: var(--bg-surface-hover);
}

.data-table tbody tr.is-favorite {
  background: rgba(245, 158, 11, 0.03);
}

.data-table tbody tr.is-favorite:hover td {
  background: rgba(245, 158, 11, 0.07);
}

.data-table tbody tr.is-hidden td {
  opacity: 0.55;
  background: rgba(15, 23, 42, 0.4);
}

/* Group Header Row */
.group-header-row {
  background: rgba(15, 23, 42, 0.95);
}

.group-header-row:hover td {
  background: rgba(30, 41, 59, 0.85) !important;
}

.group-header-cell {
  padding: 10px 14px !important;
  background: rgba(99, 102, 241, 0.08);
  border-top: 1px solid rgba(99, 102, 241, 0.3) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
}

.group-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-icon {
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
}

.group-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e0e7ff;
  letter-spacing: -0.01em;
}

.group-count-badge {
  padding: 2px 8px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: #a5b4fc;
  font-family: var(--font-mono);
}

/* Column Sizing */
.col-icon {
  width: 34px;
  text-align: center;
}

.col-count {
  width: 65px;
  text-align: center;
  white-space: nowrap;
}

.col-actions {
  width: 70px;
  text-align: center;
  white-space: nowrap;
}

.col-status {
  width: 90px;
  text-align: center;
  white-space: nowrap;
}

.col-type {
  white-space: nowrap;
}

/* Compact Name Cell */
.cell-name-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 260px;
}

.cell-name-title {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-name-path {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-primary-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 250px;
}

.cell-frameworks {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 140px;
}

.cell-used-in {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 240px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.3;
}

.badge-type {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.badge-count {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-default);
  font-family: var(--font-mono);
}

.badge-count.highlight {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.3);
}

.badge-category {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.badge-maui {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-library {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-hidden {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.fw-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-radius: 3px;
  white-space: nowrap;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Favorites & Hidden View */
.favorites-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fav-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

/* Metrics & Charts View */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.metric-card.full-width {
  grid-column: span 2;
}

.metric-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.bar-chart-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-bar-label {
  width: 200px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
}

.chart-bar-value {
  width: 35px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.frameworks-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fw-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.fw-stat-pill strong {
  color: var(--color-accent);
}

/* ==========================================================================
   Settings & Synchronization Modal Dialogs
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 18px 22px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 75vh;
  overflow-y: auto;
}

.settings-box {
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.settings-box.highlight-box {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.04);
}

.settings-box-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.settings-box-header strong {
  font-size: 0.88rem;
  color: var(--text-primary);
}

.settings-box-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.box-icon {
  font-size: 1.25rem;
}

/* Switch Toggle */
.sync-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  transition: 0.2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

.validation-status-badge {
  font-size: 0.75rem;
  margin-top: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.validation-status-badge.valid {
  color: #34d399;
}

.validation-status-badge.invalid {
  color: #fb7185;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-with-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-help {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-help code {
  font-family: var(--font-mono);
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
}

.connection-test-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.test-feedback-box {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.4;
}

.test-feedback-box.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.test-feedback-box.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.test-feedback-box.loading {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

/* ==========================================================================
   Git Status & Sync Safety Card
   ========================================================================== */

.git-status-card {
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.git-status-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.branch-pill {
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.git-safety-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface-elevated);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.safety-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.check-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.check-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.sync-safety-alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.4;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
}

.sync-safety-alert.clean {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.sync-progress-card {
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.2s ease;
}

.sync-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sync-phase-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
  animation: pulseDot 1.2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
}

.phase-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #818cf8;
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.sync-detail-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.percent-badge {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--bg-app);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #38bdf8, #10b981);
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  animation: progressGradient 2s linear infinite;
}

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

.sync-logs-box {
  padding: 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #cbd5e1;
  max-height: 130px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.45;
}

.modal-footer {
  padding: 14px 22px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Solution Detail Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  transition: var(--transition);
}

.drawer-panel {
  width: 100%;
  max-width: 640px;
  background: var(--bg-surface);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  border-left: 1px solid var(--border-default);
  animation: slideLeft 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-glass);
}

.drawer-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.drawer-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.drawer-path {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  word-break: break-all;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}

.btn-close:hover {
  color: var(--text-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.stat-box {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

.stat-number {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-number.highlight {
  color: var(--color-danger);
}

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

.section-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.section-heading.primary-heading {
  color: #fb7185;
}

.projects-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-detail-card {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-detail-card.primary {
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.05);
}

.project-detail-card.is-favorite {
  border-color: rgba(245, 158, 11, 0.4);
}

.project-detail-card.is-hidden {
  opacity: 0.6;
  border-style: dashed;
}

.p-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-detail-title {
  font-size: 0.88rem;
  font-weight: 700;
}

.p-detail-type {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.p-detail-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.p-detail-path {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  word-break: break-all;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-surface);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state svg {
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1rem;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.82rem;
  max-width: 380px;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 18px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

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

.hidden {
  display: none !important;
}

/* Responsive Column Hiding Breakpoints */
@media (min-width: 1600px) {
  .cell-name-box { max-width: 320px; }
  .cell-primary-apps { max-width: 320px; }
  .cell-used-in { max-width: 300px; }
}

@media (max-width: 1599px) {
  .cell-name-box { max-width: 240px; }
  .cell-primary-apps { max-width: 220px; }
  .cell-used-in { max-width: 200px; }
}

@media (max-width: 1365px) {
  .col-status { display: none; }
  .cell-name-box { max-width: 210px; }
  .cell-primary-apps { max-width: 190px; }
  .cell-used-in { max-width: 170px; }
}

@media (max-width: 1199px) {
  .col-category { display: none; }
  .col-used-in { display: none; }
  .cell-name-box { max-width: 200px; }
}

@media (max-width: 991px) {
  .col-frameworks { display: none; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card.full-width { grid-column: span 1; }
  .header-stats { display: none; }
}

@media (max-width: 767px) {
  .col-primary { display: none; }
  .solutions-table-wrapper { overflow-x: auto; }
  .data-table { font-size: 0.78rem; }
}
