/* ============================================
   FINDER VIEW CSS
   macOS Finder-inspired 3-pane layout
   ============================================ */

/* =========================================
   LAYOUT STRUCTURE
   ========================================= */

.finder-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--slate-950);
  color: var(--slate-300);
  font-family: var(--font-finder-body);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* =========================================
   HEADER (Glassy redesign from mockup)
   ========================================= */

.finder-header {
  height: 68px;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

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

.finder-header-center {
  flex: 1.5;
  display: flex;
  justify-content: center;
}

.finder-header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

/* Icon Button */
.finder-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(15, 23, 42, 0.5);
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.finder-icon-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--finder-blue-500);
  border-color: rgba(59, 130, 246, 0.2);
}

.finder-icon-btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--finder-blue-500);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Breadcrumbs */
.finder-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-finder-display);
  font-size: 14px;
  color: var(--slate-400);
}

.finder-crumb-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.finder-crumb-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--slate-200);
}

.finder-crumb-separator {
  color: var(--slate-600);
  font-size: 16px;
}

.finder-crumb-current {
  color: white;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
}

/* Search Bar */
.finder-search-bar {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.finder-search-bar input {
  width: 100%;
  height: 40px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  padding: 0 70px 0 42px;
  color: white;
  font-family: var(--font-finder-body);
  font-size: 14px;
  transition: all 0.2s;
}

.finder-search-bar input:focus {
  background: rgba(15, 23, 42, 0.8);
  border-color: var(--finder-blue-500);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
  outline: none;
}

.finder-search-bar input::placeholder {
  color: var(--slate-500);
}

.finder-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-500);
  font-size: 20px;
  pointer-events: none;
}

.finder-search-shortcut {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--slate-400);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Status Segmented Control */
.finder-status-segmented {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 3px;
  border-radius: 10px;
  display: flex;
  gap: 2px;
}

.finder-status-tab {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate-400);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
}

.finder-status-tab:hover {
  color: var(--slate-200);
}

.finder-status-tab.active {
  background: var(--slate-700);
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 600;
}

/* =========================================
   RIBBON (Energy & Brands - Mockup redesign)
   ========================================= */

.finder-ribbon {
  height: 64px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  flex-shrink: 0;
}

/* Energy Filter Chips (Pill style) */
.finder-energy-group {
  display: flex;
  gap: 8px;
  padding-right: 24px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.finder-energy-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 99px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--slate-300);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.finder-energy-chip:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--slate-200);
}

.finder-energy-chip.active {
  background: var(--finder-blue-500);
  border-color: var(--finder-blue-500);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.finder-energy-chip.elec.active {
  background: var(--finder-emerald-500);
  border-color: var(--finder-emerald-500);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.finder-energy-chip .material-symbols-rounded {
  font-size: 18px;
}

/* Brand Filters (Rounded square logo style) */
.finder-brands-group {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}

.finder-brands-group::-webkit-scrollbar {
  display: none;
}

.finder-brand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
  min-width: 48px;
}

.finder-brand-item:hover,
.finder-brand-item.active {
  opacity: 1;
  transform: translateY(-1px);
}

.finder-brand-logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--slate-800);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.2s;
}

.finder-brand-item.active .finder-brand-logo-circle {
  border-color: var(--finder-blue-500);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
}

.finder-brand-logo-circle img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: invert(1);
}

.finder-brand-logo-circle .material-symbols-rounded {
  font-size: 20px;
  color: var(--slate-400);
}

.finder-brand-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.finder-brand-item.active .finder-brand-label {
  color: var(--finder-blue-500);
}

/* =========================================
   EMPTY STATES
   ========================================= */

.finder-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  grid-column: 1 / -1;
}

.finder-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--slate-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.finder-empty-icon .material-symbols-rounded {
  font-size: 40px;
  color: var(--slate-500);
}

.finder-empty-title {
  font-family: var(--font-finder-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-300);
  margin: 0 0 8px 0;
}

.finder-empty-message {
  font-family: var(--font-finder-body);
  font-size: 14px;
  color: var(--slate-500);
  margin: 0 0 24px 0;
  max-width: 300px;
}

.finder-empty-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--slate-700);
  border-radius: 8px;
  background: transparent;
  color: var(--slate-400);
  font-family: var(--font-finder-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.finder-empty-action:hover {
  background: var(--slate-800);
  border-color: var(--slate-600);
  color: white;
}

.finder-empty-action .material-symbols-rounded {
  font-size: 18px;
}

/* =========================================
   CONTENT PANES
   ========================================= */

.finder-content-panes {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* =========================================
   TREE PANE (Left Sidebar)
   ========================================= */

.finder-tree-pane {
  width: auto;
  min-width: 180px;
  max-width: 280px;
  background: var(--slate-950);
  border-right: 1px solid var(--slate-800);
  padding: 16px;
  overflow-y: auto;
  transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.finder-tree-pane.collapsed {
  width: 0;
  padding: 16px 0;
  opacity: 0;
  border-right: none;
  overflow: hidden;
}

.finder-tree-label {
  font-family: var(--font-finder-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.finder-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-family: var(--font-finder-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  width: 100%;
  text-align: left;
}

.finder-tree-item:hover {
  background: var(--slate-800);
  color: var(--slate-200);
}

.finder-tree-item.active {
  background: var(--finder-blue-500-10);
  color: var(--finder-blue-500);
  font-weight: 600;
}

.finder-tree-item .material-symbols-rounded {
  font-size: 18px;
}

.finder-tree-item.active .material-symbols-rounded {
  color: var(--finder-blue-500);
}

.finder-tree-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--slate-500);
  background: var(--slate-800);
  padding: 2px 6px;
  border-radius: 4px;
}

.finder-tree-item.active .finder-tree-count {
  background: var(--finder-blue-500-20);
  color: var(--finder-blue-500);
}

/* Tree sections */
.finder-tree-section {
  margin-bottom: 20px;
}

.finder-tree-section:last-child {
  margin-bottom: 0;
}

.finder-tree-label {
  font-family: var(--font-finder-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 12px;
  margin-bottom: 8px;
}

/* Tree group nesting (mockup style) */
.finder-tree-group {
  margin-left: 12px;
  border-left: 1px solid var(--slate-800);
  padding-left: 12px;
  margin-bottom: 8px;
}

.finder-tree-group .finder-tree-item {
  font-size: 12px;
  padding: 6px 10px;
}

/* =========================================
   CENTER PANE (Main Content)
   ========================================= */

.finder-center-pane {
  flex: 1;
  background: var(--slate-900);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Main Toolbar */
.finder-main-toolbar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--slate-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.95);
  z-index: 10;
  flex-shrink: 0;
}

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

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

.finder-count {
  font-family: var(--font-finder-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-400);
  margin-right: 12px;
  letter-spacing: 0.01em;
}

/* Filter chips */
.finder-filter-chip {
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  color: var(--slate-400);
  font-family: var(--font-finder-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.finder-filter-chip:hover {
  background: var(--slate-700);
  color: white;
}

.finder-filter-chip.active {
  background: var(--finder-blue-500);
  border-color: var(--finder-blue-500);
  color: white;
}

.finder-filter-chip .chip-icon {
  font-size: 14px;
}

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

.finder-content-scroll::-webkit-scrollbar {
  width: 10px;
}

.finder-content-scroll::-webkit-scrollbar-track {
  background: var(--slate-900);
  border-radius: 5px;
}

.finder-content-scroll::-webkit-scrollbar-thumb {
  background: var(--slate-700);
  border-radius: 5px;
  border: 2px solid var(--slate-900);
}

.finder-content-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--slate-600);
}

/* =========================================
   CARDS GRID
   ========================================= */

.finder-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

/* Simplified horizontal simulation card */
.finder-sim-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.finder-sim-card:hover {
  background: var(--slate-800);
  border-color: var(--slate-600);
}

/* Card icon (brand logo or car placeholder) */
.finder-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-800);
  border-radius: 8px;
  flex-shrink: 0;
}

.finder-card-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.8;
}

.finder-card-icon .material-symbols-rounded {
  font-size: 24px;
  color: var(--slate-400);
}

/* Card info (model + metadata) */
.finder-card-info {
  flex: 1;
  min-width: 0;
}

.finder-card-model {
  font-family: var(--font-finder-display);
  font-weight: 600;
  color: white;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finder-card-meta {
  font-family: var(--font-finder-body);
  font-size: 12px;
  color: var(--slate-400);
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

/* Fuel type icon */
.finder-card-fuel {
  flex-shrink: 0;
  color: var(--slate-500);
}

.finder-card-fuel .material-symbols-rounded {
  font-size: 20px;
}

/* Price display */
.finder-card-price {
  font-family: var(--font-finder-display);
  font-weight: 700;
  color: var(--finder-emerald-500);
  font-size: 16px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Right side container (status + price) */
.finder-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* =========================================
   DETAIL VIEW (5 Scenarios)
   ========================================= */

.finder-detail-view {
  background: var(--slate-950);
  border: 1px solid var(--slate-800);
  border-radius: 16px;
  overflow: hidden;
  animation: finderSlideUp 0.3s ease-out;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  /* Fix scrolling: fill available height */
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Important for flex scrolling */
  margin: 0 24px 24px 24px; /* Add margins to separate from edges */
}

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

.finder-detail-header {
  background: var(--slate-800);
  padding: 12px 24px;
  border-bottom: 1px solid var(--slate-700);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Prevent header shrinking */
}

.finder-detail-title {
  font-family: var(--font-finder-display);
  font-size: 18px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.01em;
}

.finder-detail-close {
  cursor: pointer;
  color: var(--slate-500);
  transition: 0.2s;
}

.finder-detail-close:hover {
  color: white;
}

/* Scenarios scroll container */
.finder-scenarios-container {
  display: flex;
  gap: 16px;
  /* Enable bidirectional scrolling */
  overflow: auto;
  padding: 24px 24px 40px 24px; /* Extra bottom padding for scrollbar clearance */
  flex: 1; /* Fill remaining height */
  align-items: flex-start; /* Allow cards to grow naturally (enables vertical scrolling) */
}

.finder-scenarios-container::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.finder-scenarios-container::-webkit-scrollbar-thumb {
  background: var(--slate-700);
  border-radius: 5px;
  border: 2px solid var(--slate-950); /* Padding around thumb */
}

.finder-scenarios-container::-webkit-scrollbar-track {
  background: var(--slate-900);
  border-radius: 5px;
}

.finder-scenarios-container::-webkit-scrollbar-corner {
  background: var(--slate-900);
}

/* Scenario cards from scenario-card.css within Finder */
.finder-scenarios-container .scenario-breakdown-card {
  min-width: 320px;
  width: 320px;
  flex-shrink: 0;
  /* Override background for Finder dark theme */
  background: var(--slate-950);
  border-color: var(--slate-700);
}

.finder-scenarios-container .scenario-breakdown-card.best {
  border-color: var(--finder-emerald-500);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--slate-950) 100%);
}

/* Adjust card header for Finder */
.finder-scenarios-container .scenario-card-header {
  background: var(--slate-800);
  border-bottom: 1px solid var(--slate-700);
}

/* Adjust divider */
.finder-scenarios-container .scenario-card-divider {
  background: var(--slate-700);
}

/* Adjust section labels */
.finder-scenarios-container .scenario-section-label {
  color: var(--slate-400);
}

/* Adjust stacked bar colors */
.finder-scenarios-container .bar-segment.loyer {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.9), rgba(59, 130, 246, 0.95));
}

.finder-scenarios-container .bar-segment.assurance {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.9), rgba(20, 184, 166, 0.95));
}

.finder-scenarios-container .bar-segment.fiscal {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.95));
}

/* Legacy Scenario card - kept for backwards compatibility */
.finder-scenario-card {
  min-width: 320px;
  width: 320px;
  background: var(--slate-950);
  border: 1px solid var(--slate-800);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  /* Removed align-self: stretch to allow card to grow past container height for scrolling */
}

.finder-scenario-card.best {
  border-color: var(--finder-emerald-500);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--slate-950) 100%);
}

.finder-sc-header {
  padding: 16px;
  border-bottom: 1px solid var(--slate-800);
}

.finder-sc-title {
  font-family: var(--font-finder-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-200);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.01em;
}

.finder-badge-best {
  background: var(--finder-emerald-500);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finder-sc-price-large {
  font-family: var(--font-finder-display);
  font-size: 32px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.finder-scenario-card.best .finder-sc-price-large {
  color: var(--finder-emerald-500);
}

.finder-sc-sub-price {
  font-family: var(--font-finder-body);
  font-size: 12px;
  color: var(--slate-500);
  font-weight: 500;
}

.finder-sc-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Stacked bar (Finder custom styles + Shared Renderer overrides) */
.finder-stacked-bar,
.scenario-stacked-bar { /* Shared renderer class */
  height: 24px;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px; /* Increased margin */
  background: var(--slate-800);
  width: 100%;
}

.finder-sb-segment,
.bar-segment { /* Shared renderer class */
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-finder-display);
  text-transform: uppercase;
  position: relative; /* Ensure title tooltips work */
}

/* Override colors for shared renderer classes within Finder */
.bar-segment.loyer {
  background: var(--finder-blue-600) !important;
}
.bar-segment.assurance {
  background: var(--finder-teal-500, #14b8a6) !important;
}
.bar-segment.fiscal {
  background: var(--finder-orange-500) !important;
}
.bar-segment.tvs {
  background: var(--finder-emerald-500) !important;
}

/* Card Body - Margin fix */
.finder-sc-body {
  padding: 24px; /* Increased from 16px */
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Styling for Shared Breakdown/Verification Components */
.breakdown-group {
  margin-bottom: 16px;
  font-size: 12px;
  font-family: var(--font-finder-body);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--slate-300);
}

.breakdown-item.main {
  font-weight: 600;
  color: var(--slate-200);
  margin-top: 8px;
}

.breakdown-item.sub {
  padding-left: 16px;
  color: var(--slate-400);
  font-size: 11px;
}

.breakdown-value {
  font-family: monospace;
  font-weight: 600;
}

/* Verification Container (Calculs) */
.verification-container {
  margin-top: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6); /* Darker background */
  border: 1px dashed var(--slate-700);
  border-radius: 8px;
}

.verification-subsection {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--slate-800);
}

.verification-header {
  color: var(--finder-blue-500);
  font-weight: 700;
}

.verification-highlight-yellow,
.verification-highlight-green,
.verification-highlight-purple,
.verification-highlight-orange {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 4px 8px;
  margin: 4px 0;
}

/* Metric rows (Legacy) */
.finder-sc-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--slate-800);
  font-size: 12px;
  font-family: var(--font-finder-body);
}

.finder-sc-metric-row:last-child {
  border-bottom: none;
}

.finder-sc-metric-label {
  color: var(--slate-400);
  display: flex;
  align-items: center;
  gap: 6px;
}

.finder-sc-metric-value {
  color: var(--slate-200);
  font-weight: 500;
  font-family: monospace;
}

.finder-sc-icon {
  font-size: 14px;
  color: var(--slate-500);
}

/* Total row */
.finder-sc-total-row {
  margin-top: auto;
  padding-top: 12px;
  border-top: 2px solid var(--slate-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.finder-sc-total-label {
  font-family: var(--font-finder-display);
  font-weight: 800;
  color: var(--slate-300);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finder-sc-total-value {
  font-family: var(--font-finder-display);
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.finder-scenario-card.best .finder-sc-total-value {
  color: var(--finder-emerald-500);
}

/* Scenario bar (LOYER / TVS) */
.finder-scenario-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-finder-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finder-bar-loyer {
  background: linear-gradient(135deg, var(--finder-blue-500), var(--finder-blue-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.finder-bar-tvs {
  background: linear-gradient(135deg, var(--finder-emerald-500), var(--finder-emerald-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

/* Scenario total row */
.finder-scenario-total {
  margin-top: auto;
  padding-top: 12px;
  border-top: 2px solid var(--slate-700);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-finder-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--slate-400);
}

.finder-total-value {
  font-size: 16px;
  color: white;
}

.finder-scenario-card.best .finder-total-value {
  color: var(--finder-emerald-500);
}

/* =========================================
   CONTEXT PANE (Right Sidebar) - Mockup Style
   ========================================= */

.finder-context-pane {
  width: 300px;
  background: var(--slate-950);
  border-left: 1px solid var(--slate-800);
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 20px;
  transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  flex-shrink: 0;
  overflow-y: auto;
}

.finder-context-pane.collapsed {
  width: 0;
  padding: 24px 0;
  opacity: 0;
  border-left: none;
  overflow: hidden;
}

/* Context header - centered with icon wrapper */
.finder-context-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--slate-800);
  position: relative;
}

.finder-context-icon-wrapper {
  width: 72px;
  height: 72px;
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.finder-context-icon-wrapper img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.9;
}

.finder-context-icon-wrapper .material-symbols-rounded {
  font-size: 36px;
  color: var(--slate-400);
}

.finder-context-title {
  font-family: var(--font-finder-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

.finder-context-subtitle {
  font-family: var(--font-finder-body);
  font-size: 14px;
  color: var(--slate-500);
  font-weight: 500;
}

/* Favorite button positioning */
.finder-context-header .favorite-btn {
  position: absolute;
  top: 0;
  right: 0;
}

.finder-context-header .favorite-btn.active {
  color: #fbbf24;
}

/* KPI Section */
.finder-kpi-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* KPI Cards - Large */
.finder-kpi-card-large {
  background: var(--slate-900);
  border: 1px solid var(--finder-blue-500-20);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(180deg, var(--slate-900) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.finder-kpi-label {
  font-family: var(--font-finder-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--finder-blue-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.finder-kpi-value-large {
  font-family: var(--font-finder-display);
  font-size: 40px;
  font-weight: 800;
  color: white;
  line-height: 1;
  letter-spacing: -0.03em;
}

.finder-kpi-unit {
  font-family: var(--font-finder-body);
  font-size: 16px;
  color: var(--slate-400);
  font-weight: 500;
}

.finder-kpi-sublabel {
  font-family: var(--font-finder-body);
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 4px;
}

/* KPI Grid (Duration/Distance) */
.finder-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.finder-kpi-card-small {
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 12px;
  padding: 12px;
}

.finder-kpi-label-small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-finder-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.finder-kpi-label-small .material-symbols-rounded {
  font-size: 14px;
}

.finder-kpi-value-small {
  font-family: var(--font-finder-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--slate-200);
}

/* Workflow widget - mockup style */
.finder-workflow-widget {
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 12px;
  padding: 16px;
}

.finder-wf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.finder-wf-label {
  font-family: var(--font-finder-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finder-wf-badge {
  background: var(--finder-blue-500-10);
  color: var(--finder-blue-500);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-finder-display);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.finder-wf-badge .material-symbols-rounded {
  font-size: 16px;
}

.finder-wf-badge.submitted {
  background: var(--finder-blue-500-10);
  color: var(--finder-blue-500);
  border-color: rgba(59, 130, 246, 0.2);
}

.finder-wf-badge.accepted {
  background: var(--finder-emerald-500-10);
  color: var(--finder-emerald-500);
  border-color: rgba(16, 185, 129, 0.2);
}

.finder-wf-badge.refused {
  background: var(--finder-red-500-10);
  color: var(--finder-red-500);
  border-color: rgba(239, 68, 68, 0.2);
}

.finder-wf-actions {
  display: flex;
  gap: 8px;
}

.finder-wf-btn {
  flex: 1;
  background: var(--finder-blue-600);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-finder-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.01em;
  transition: all 0.2s;
}

.finder-wf-btn:hover {
  background: var(--finder-blue-500);
  transform: translateY(-1px);
}

.finder-wf-btn.primary {
  background: var(--finder-blue-600);
}

.finder-wf-btn.primary:hover {
  background: var(--finder-blue-500);
}

.finder-wf-btn.success {
  background: var(--finder-emerald-600);
}

.finder-wf-btn.success:hover {
  background: var(--finder-emerald-500);
}

.finder-wf-btn.danger {
  background: var(--finder-red-500);
}

.finder-wf-btn.danger:hover {
  background: #dc2626;
}

.finder-wf-btn.secondary {
  background: var(--slate-800);
  color: var(--slate-300);
}

.finder-wf-btn.secondary:hover {
  background: var(--slate-700);
  color: white;
}

.finder-wf-btn .material-symbols-rounded {
  font-size: 16px;
}

/* Actions section */
/* Client Selector */
.finder-client-section {
  padding: 16px;
  border-top: 1px solid var(--slate-800);
}

.finder-client-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: 8px;
  color: white;
  font-family: var(--font-finder-body);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.finder-client-select:focus {
  outline: none;
  border-color: var(--finder-blue-500);
}

.finder-client-select option {
  background: var(--slate-800);
  color: white;
}

.finder-actions-section {
  margin-top: auto;
}

.finder-section-title {
  font-family: var(--font-finder-display);
  font-size: 10px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Actions grid - mockup style */
.finder-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.finder-action-tile {
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--slate-400);
}

.finder-action-tile:hover {
  background: var(--slate-800);
  color: white;
  border-color: var(--slate-700);
  transform: translateY(-1px);
}

.finder-action-tile .material-symbols-rounded {
  font-size: 22px;
}

.finder-action-label {
  font-family: var(--font-finder-body);
  font-size: 12px;
  font-weight: 500;
}

.finder-action-tile.danger:hover {
  background: var(--finder-red-500-10);
  color: var(--finder-red-500);
  border-color: rgba(239, 68, 68, 0.2);
}

.finder-action-tile.full-width {
  grid-column: span 2;
}

/* Context pane empty state */
.finder-context-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 20px;
}

.finder-context-empty .material-symbols-rounded {
  font-size: 48px;
  color: var(--slate-600);
  margin-bottom: 16px;
}

.finder-context-empty p {
  font-family: var(--font-finder-body);
  font-size: 14px;
  color: var(--slate-500);
  line-height: 1.5;
}

/* =========================================
   EMPTY STATE
   ========================================= */

.finder-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.finder-empty-icon {
  font-size: 64px;
  color: var(--slate-600);
  margin-bottom: 24px;
}

.finder-empty-title {
  font-family: var(--font-finder-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.finder-empty-text {
  font-family: var(--font-finder-body);
  font-size: 14px;
  color: var(--slate-500);
  max-width: 300px;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1280px) {
  .finder-context-pane {
    width: 280px;
  }
}

@media (max-width: 1024px) {
  .finder-tree-pane {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .finder-tree-pane.collapsed {
    transform: translateX(-100%);
  }

  .finder-context-pane {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .finder-context-pane.collapsed {
    transform: translateX(100%);
  }
}

@media (max-width: 768px) {
  .finder-header {
    padding: 0 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .finder-header-left,
  .finder-header-right {
    flex: 1 1 100%;
    justify-content: center;
  }

  .finder-header-center {
    order: -1;
    flex: 1 1 100%;
  }

  .finder-search {
    width: 100%;
    max-width: none;
  }

  .finder-breadcrumbs {
    display: none;
  }

  .finder-status-chips {
    display: none;
  }

  .finder-brand-ribbon {
    padding: 0 12px;
  }

  .finder-ribbon-label {
    display: none;
  }

  /* Hide tree pane on mobile by default */
  .finder-tree-pane {
    display: none;
  }

  .finder-tree-pane.mobile-open {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 100;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
  }

  .finder-content-scroll {
    padding: 16px;
  }

  .finder-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }

  .finder-sim-card {
    height: 95px;
    padding: 10px;
  }

  .finder-sim-model {
    font-size: 12px;
  }

  .finder-sim-meta-mini {
    font-size: 9px;
  }

  /* Context pane as bottom sheet on mobile */
  .finder-context-pane {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: auto;
    max-height: 60vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 1px solid var(--slate-700);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .finder-context-pane.mobile-open {
    transform: translateY(0);
  }

  .finder-context-pane.collapsed {
    display: none;
  }

  /* Scenario cards horizontal scroll */
  .finder-scenarios-container {
    padding-bottom: 20px;
  }

  .finder-scenario-card {
    min-width: 220px;
    width: 220px;
  }

  /* Mobile overlay for sidebars */
  .finder-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .finder-mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */

.finder-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-finder-body);
  font-size: 14px;
  color: var(--slate-200);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.finder-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.finder-toast .material-symbols-rounded {
  font-size: 20px;
}

.finder-toast-success .material-symbols-rounded {
  color: var(--finder-emerald-500);
}

.finder-toast-error .material-symbols-rounded {
  color: var(--finder-red-500);
}

.finder-toast-info .material-symbols-rounded {
  color: var(--finder-blue-500);
}

.finder-toast-warning .material-symbols-rounded {
  color: var(--finder-orange-500, #f59e0b);
}

/* =========================================
   CARD STATUS BADGES
   ========================================= */

.finder-card-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.finder-card-status .material-symbols-rounded {
  font-size: 14px;
}

.finder-card-status--draft {
  background: var(--slate-700);
  color: var(--slate-300);
}

.finder-card-status--submitted {
  background: rgba(59, 130, 246, 0.2);
  color: var(--finder-blue-500);
}

.finder-card-status--accepted {
  background: rgba(16, 185, 129, 0.2);
  color: var(--finder-emerald-500);
}

.finder-card-status--refused {
  background: rgba(239, 68, 68, 0.2);
  color: var(--finder-red-500);
}

/* =========================================
   SHARE SECTION
   ========================================= */

.finder-share-section {
  padding: 16px;
  border-bottom: 1px solid var(--slate-800);
}

.finder-share-link-box {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.finder-share-link-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: 8px;
  color: var(--slate-300);
  font-family: monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  min-width: 0;
}

.finder-share-link-input:focus {
  outline: none;
  border-color: var(--finder-blue-500);
}

.finder-share-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--slate-500);
}

.finder-share-meta .material-symbols-rounded {
  font-size: 14px;
}

.finder-share-loading {
  color: var(--slate-500);
  font-size: 12px;
  padding: 8px 0;
}

/* =========================================
   ATTACHMENTS SECTION
   ========================================= */

.finder-attachments-section {
  padding: 16px;
  border-bottom: 1px solid var(--slate-800);
}

.finder-attachments-section .finder-wf-btn {
  width: 100%;
  justify-content: center;
}

/* =========================================
   CONTEXT PANE REDESIGN (ctx-* classes)
   Consolidated hero card + simplified sections
   ========================================= */

/* Hero Card - Merged header + KPIs */
.ctx-hero-card {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.ctx-hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ctx-hero-icon {
  width: 48px;
  height: 48px;
  background: var(--slate-700);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ctx-hero-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.9;
}

.ctx-hero-icon .material-symbols-rounded {
  font-size: 28px;
  color: var(--slate-400);
}

.ctx-hero-info {
  flex: 1;
  min-width: 0;
}

.ctx-hero-title {
  font-family: var(--font-finder-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--slate-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ctx-hero-subtitle {
  font-family: var(--font-finder-body);
  font-size: 13px;
  color: var(--slate-400);
  margin-top: 2px;
}

.ctx-hero-fav {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ctx-hero-fav:hover {
  background: var(--slate-700);
  color: var(--slate-300);
}

.ctx-hero-fav.active {
  color: var(--amber-400, #fbbf24);
}

.ctx-hero-fav .material-symbols-rounded {
  font-size: 20px;
}

.ctx-hero-kpis {
  border-top: 1px solid var(--slate-700);
  padding-top: 12px;
}

.ctx-kpi-main {
  font-family: var(--font-finder-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--slate-100);
  line-height: 1;
}

.ctx-kpi-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--slate-400);
}

.ctx-kpi-secondary {
  font-family: var(--font-finder-body);
  font-size: 13px;
  color: var(--slate-400);
  margin-top: 4px;
}

/* Workflow - Simplified inline status */
.ctx-workflow {
  margin-bottom: 16px;
}

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

.ctx-label {
  font-family: var(--font-finder-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-400);
}

.ctx-status-badge {
  font-family: var(--font-finder-display);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
}

.ctx-status-cree {
  background: var(--slate-700);
  color: var(--slate-300);
}

.ctx-status-soumis {
  background: rgba(59, 130, 246, 0.15);
  color: var(--finder-blue-500);
}

.ctx-status-accepte {
  background: rgba(16, 185, 129, 0.15);
  color: var(--finder-emerald-500);
}

.ctx-status-refuse {
  background: rgba(239, 68, 68, 0.15);
  color: var(--finder-red-500);
}

.ctx-workflow-actions {
  display: flex;
  gap: 8px;
}

/* Files Section - Combined share + attachments */
.ctx-files-section {
  margin-bottom: 16px;
}

.ctx-section-title {
  font-family: var(--font-finder-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-400);
  margin-bottom: 10px;
}

.ctx-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--slate-800);
}

.ctx-file-row:last-child {
  border-bottom: none;
}

.ctx-file-row > .material-symbols-rounded {
  color: var(--slate-500);
  font-size: 18px;
  flex-shrink: 0;
}

.ctx-file-label {
  flex: 1;
  font-family: var(--font-finder-body);
  font-size: 13px;
  color: var(--slate-300);
}

.ctx-share-input {
  flex: 1;
  background: var(--slate-800);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-family: monospace;
  font-size: 11px;
  color: var(--slate-300);
  min-width: 0;
  text-overflow: ellipsis;
}

.ctx-share-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--finder-blue-500);
}

.ctx-btn-small {
  font-family: var(--font-finder-display);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  background: var(--slate-700);
  color: var(--slate-300);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ctx-btn-small:hover {
  background: var(--slate-600);
  color: white;
}

/* Actions Bar - Modern Grid Layout */
.ctx-actions-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  margin-top: auto;
  background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.3));
}

.ctx-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: var(--font-finder-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--slate-300);
}

.ctx-action-btn .material-symbols-rounded {
  font-size: 18px;
}

/* Primary Action: Modifier */
.ctx-action-btn[data-action="edit-simulation"] {
  grid-column: 1 / -1;
  background: var(--finder-blue-600);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.ctx-action-btn[data-action="edit-simulation"]:hover {
  background: var(--finder-blue-500);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

/* Secondary Actions Hover */
.ctx-action-btn:not([data-action="edit-simulation"]):not(.danger):hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: white;
  transform: translateY(-1px);
}

/* Danger Action: Supprimer */
.ctx-action-btn.danger {
  grid-column: 1 / -1;
  background: transparent;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  color: var(--slate-500);
  margin-top: 8px;
}

.ctx-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--finder-red-500);
  border-color: rgba(239, 68, 68, 0.3);
  border-style: solid;
}

/* Disabled State */
.ctx-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.ctx-action-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}
.ctx-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-finder-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ctx-btn.full {
  width: 100%;
}

.ctx-btn .material-symbols-rounded {
  font-size: 16px;
}

.ctx-btn.primary {
  background: var(--finder-blue-600);
  color: white;
}

.ctx-btn.primary:hover {
  background: var(--finder-blue-500);
}

.ctx-btn.secondary {
  background: var(--slate-700);
  color: var(--slate-300);
}

.ctx-btn.secondary:hover {
  background: var(--slate-600);
  color: white;
}

.ctx-btn.success {
  background: var(--finder-emerald-600);
  color: white;
  flex: 1;
}

.ctx-btn.success:hover {
  background: var(--finder-emerald-500);
}

.ctx-btn.danger {
  background: var(--finder-red-500);
  color: white;
  flex: 1;
}

.ctx-btn.danger:hover {
  background: #dc2626;
}

.ctx-icon-btn {
  width: 32px;
  height: 32px;
  background: var(--slate-700);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ctx-icon-btn:hover {
  background: var(--slate-600);
  color: white;
}

.ctx-icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.ctx-icon-btn .material-symbols-rounded {
  font-size: 16px;
}

/* =========================================
   EXPIRED STATUS STYLES
   ========================================= */

.finder-card-status--expired {
  background: rgba(100, 116, 139, 0.2);
  color: var(--slate-400);
}

.finder-sim-card--expired {
  opacity: 0.7;
}

.finder-sim-card--expired:hover {
  opacity: 0.85;
}

/* Hero card dates section */
.ctx-hero-dates {
  border-top: 1px solid var(--slate-700);
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctx-date-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-finder-body);
  font-size: 12px;
  color: var(--slate-400);
}

.ctx-date-item .material-symbols-rounded {
  font-size: 14px;
  color: var(--slate-500);
}

.ctx-date-expired {
  color: var(--finder-orange-500, #f59e0b);
}

.ctx-date-expired .material-symbols-rounded {
  color: var(--finder-orange-500, #f59e0b);
}

.ctx-hero-card--expired {
  border: 1px solid var(--slate-600);
  opacity: 0.85;
}

/* Disabled action button */
.ctx-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ctx-action-btn:disabled:hover {
  background: var(--slate-800);
  color: var(--slate-300);
}

/* =========================================
   SCENARIOS AS ROWS (comparison table)
   Each row opens on its monthly breakdown and the calculation proof.
   ========================================= */

.finder-detail-header { gap: 16px; flex-wrap: wrap; justify-content: flex-start; }
.finder-detail-vehicle { margin-left: auto; }

.finder-layout-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--slate-700);
  border-radius: 10px;
  background: var(--slate-900);
}

.finder-layout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--slate-400);
  font: 600 13px var(--font-finder-body);
  cursor: pointer;
}

.finder-layout-btn .material-symbols-rounded { font-size: 18px; }
.finder-layout-btn:hover { color: white; }
.finder-layout-btn[aria-pressed="true"] { background: rgba(59, 130, 246, 0.22); color: white; }

.scenario-rows {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 32px;
}

.scenario-rows__head,
.scenario-row__summary {
  display: grid;
  grid-template-columns: minmax(150px, 1.6fr) minmax(112px, 1.1fr) repeat(5, minmax(58px, 0.75fr)) minmax(76px, 0.9fr) minmax(58px, 0.75fr) 20px;
  align-items: center;
  gap: 8px;
}

.scenario-rows__head {
  padding: 0 17px 4px;
  color: var(--slate-500);
  font: 700 11px var(--font-finder-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scenario-row {
  border: 1px solid var(--slate-800);
  border-radius: 12px;
  background: var(--slate-950);
  transition: border-color 0.15s ease;
}

.scenario-row:hover { border-color: var(--slate-700); }
.scenario-row.is-best { border-color: rgba(16, 185, 129, 0.45); background: linear-gradient(90deg, rgba(16, 185, 129, 0.07), var(--slate-950) 60%); }
.scenario-row.is-open { border-color: rgba(96, 165, 250, 0.45); }

.scenario-row__summary {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: var(--slate-200);
  font: 500 14px var(--font-finder-body);
  text-align: left;
  cursor: pointer;
}

.scenario-row__name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: white;
  font-weight: 600;
}

.scenario-row__best {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scenario-row__cost strong {
  display: block;
  color: white;
  font: 700 18px var(--font-finder-display);
  font-variant-numeric: tabular-nums;
}

.scenario-row.is-best .scenario-row__cost strong { color: #34d399; }
.scenario-row__num { font-variant-numeric: tabular-nums; }

.scenario-row__cost small,
.scenario-row__num small {
  display: block;
  margin-top: 2px;
  color: var(--slate-500);
  font-size: 12px;
}

.scenario-row__chevron { color: var(--slate-500); transition: transform 0.15s ease; }
.scenario-row.is-open .scenario-row__chevron { transform: rotate(180deg); color: #93c5fd; }

.scenario-row__detail {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 24px;
  padding: 4px 16px 20px;
  border-top: 1px solid var(--slate-800);
}

.scenario-row.is-open .scenario-row__detail { display: grid; }

.scenario-row__detail h5 {
  margin: 14px 0 10px;
  color: var(--slate-400);
  font: 700 11px var(--font-finder-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scenario-row__proof .verification-section,
.scenario-row__proof .breakdown-group.verification-container { margin-top: 0; }

.scenario-row__figures { display: none; }

@container (max-width: 820px) {
  .scenario-rows__head { display: none; }
  .scenario-row__summary { grid-template-columns: minmax(0, 1fr) auto 24px; }
  .scenario-row__num { display: none; }
  .scenario-row__detail { grid-template-columns: minmax(0, 1fr); gap: 8px; }

  .scenario-row__figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 0;
  }

  .scenario-row__figures dt { color: var(--slate-500); font-size: 11px; }
  .scenario-row__figures dd { margin: 2px 0 0; color: white; font-weight: 600; font-variant-numeric: tabular-nums; }
}

/* =========================================
   SIMULATIONS AS TILES (shared .fs-tile look)
   ========================================= */
.finder-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 12px;
}

.finder-tile--expired { opacity: 0.72; }
.finder-tile__cost { color: #34d399 !important; }
.finder-tile__fav .material-symbols-rounded { color: #fbbf24; }
.ctx-kpi-caption { margin-top: 2px; color: var(--slate-500); font-size: 12px; }

/* =========================================
   PHONES: one column, header on two rows, details below the list
   (shared by the dashboard and Offres du moment)
   ========================================= */
@media (max-width: 768px) {
  .finder-layout { height: auto; min-height: calc(100dvh - 61px); overflow: visible; }
  .finder-header { height: auto; padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .finder-header-left { display: none; }
  .finder-header-center { order: 0; flex: 1 1 100%; }
  .finder-layout { max-width: 100vw; }
  .finder-header-right { order: 1; flex: 1 1 100%; min-width: 0; justify-content: space-between; gap: 8px; }
  .finder-header-right > .finder-icon-btn[data-action="toggle-context"] { display: none; }
  /* Recette UI-01 : les actions principales passent à la ligne au lieu d'élargir la page. */
  .finder-header-right { flex-wrap: wrap; }
  .finder-header-right > .ws-primary-btn { flex: 1 1 auto; min-width: 0; justify-content: center; }
  .finder-header-right > .finder-status-segmented { flex: 1 1 100%; }
  .finder-status-segmented { flex: 1; min-width: 0; overflow-x: auto; }
  .finder-ribbon { flex-wrap: nowrap; gap: 12px; min-width: 0; max-width: 100%; padding: 8px 12px; overflow-x: auto; }
  .finder-energy-group, .finder-brands-group { flex: none; }
  .finder-content-panes { flex-direction: column; overflow: visible; }
  .finder-center-pane { min-height: 0; overflow: visible; }
  .finder-content-scroll { padding: 12px; overflow: visible; }
  .finder-cards-grid { grid-template-columns: minmax(0, 1fr); }
  .finder-detail-view { margin: 0 12px 12px; }

  .finder-context-pane,
  .finder-context-pane.collapsed {
    position: static;
    display: flex;
    width: auto;
    max-height: none;
    padding: 16px 12px 24px;
    border-top: 1px solid var(--slate-800);
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }

  /* Nothing selected: no empty panel under the list */
  .finder-context-pane:has(> .finder-context-empty:only-child) { display: none; }
  .finder-context-pane > .finder-context-empty { display: none; }
}

/* A collapsed tree takes no room at all (it kept its 180px min-width) */
.finder-tree-pane.collapsed { min-width: 0; padding-left: 0; padding-right: 0; }

/* Cost components: right-aligned, one-shot amounts set apart */
.scenario-rows__num, .scenario-row__num { text-align: right; white-space: nowrap; }
.scenario-rows__head .scenario-rows__num { white-space: normal; line-height: 1.2; }
.scenario-row__num { color: var(--slate-300); font-size: 13px; }
.scenario-rows__num--once, .scenario-row__num--once { color: var(--slate-500); }
.scenario-row__num.scenario-row__num--once { color: var(--slate-400); }
.scenario-rows__head > span:nth-child(7) { border-left: 1px solid var(--slate-800); padding-left: 6px; }
.scenario-row__summary > span:nth-child(7) { border-left: 1px solid var(--slate-800); padding-left: 6px; }
.scenario-row__figures { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* Narrow comparison: the monthly components stay visible under the name */
.scenario-row__parts { display: none; flex-basis: 100%; color: var(--slate-400); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
@container (max-width: 820px) {
  .scenario-row__parts { display: block; }
}
/* Server-paged workspace: controls remain outside the scrolling cards. */
.ws-pagination { display:flex; flex-shrink:0; align-items:center; justify-content:center; gap:16px; padding:12px; border-top:1px solid var(--fs-line,#dce3eb); }
.ws-pagination button { padding:8px 16px; border:1px solid var(--fs-line-strong,#bdcbd8); border-radius:6px; background:var(--fs-surface-raised,white); color:var(--fs-text,inherit); cursor:pointer; }
.ws-pagination button:disabled { opacity:.45; cursor:default; }
