/* Modern Custom Styling for AutoValuate Web App */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #080d1a;
  --bg-surface: rgba(15, 25, 48, 0.82);
  --bg-surface-elevated: rgba(22, 36, 68, 0.88);
  --bg-surface-hover: rgba(28, 45, 84, 0.95);
  --border-color: rgba(148, 163, 184, 0.16);
  --border-color-hover: rgba(29, 168, 235, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --brand-navy: #002366;
  --brand-navy-dark: #06132b;
  --accent-blue: #1da8eb;
  --accent-blue-hover: #0ea5e9;
  --accent-blue-glow: rgba(29, 168, 235, 0.28);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 35px -5px rgba(29, 168, 235, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 30% at 10% 65%, rgba(16, 185, 129, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: 60px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #002366 0%, #0c3b88 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -4px rgba(0, 35, 102, 0.6), 0 0 15px rgba(29, 168, 235, 0.35);
  border: 1px solid rgba(29, 168, 235, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #1da8eb;
}

.brand-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 24px -4px rgba(0, 35, 102, 0.7), 0 0 20px rgba(29, 168, 235, 0.5);
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

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

.lang-selector {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-dropdown {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  height: 36px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.lang-dropdown:hover, .lang-dropdown:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(29, 168, 235, 0.25);
}

.status-badges {
  display: flex;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  background-color: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(8px);
}

.badge.green {
  background-color: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.badge.red {
  background-color: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: currentColor;
}

/* Card */
.card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-color-hover);
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

/* VIN Input Section */
.vin-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.input-wrapper {
  position: relative;
  flex: 1;
}

.vin-input {
  width: 100%;
  padding: 15px 20px;
  background-color: rgba(10, 15, 29, 0.9);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.vin-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  background-color: #0d1424;
}

.char-counter {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-dim);
  pointer-events: none;
}

.btn-primary {
  padding: 14px 28px;
  background: linear-gradient(135deg, #1da8eb 0%, #0284c7 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(29, 168, 235, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  box-shadow: 0 6px 20px rgba(29, 168, 235, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

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

.vin-input-group .btn-secondary {
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.btn-primary.btn-success {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* Recent Appraisals Section */
.recent-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

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

.recent-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-link:hover {
  color: #ef4444;
}

.recent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-chip {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.recent-chip:hover {
  background-color: #475569;
  border-color: var(--accent-blue);
}

.recent-chip-vin {
  font-family: var(--font-mono);
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 12px;
}

/* Vehicle Specs Card */
.vehicle-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.vehicle-heading {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.spec-item {
  background: rgba(15, 23, 42, 0.65);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.spec-item:hover {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(22, 30, 49, 0.8);
  transform: translateY(-1px);
}

.spec-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 6px;
}

.spec-value {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

/* Controls (Mileage & Categorized Condition) */
.controls-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mileage-control-box {
  background: rgba(18, 26, 44, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

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

.mileage-display {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: -0.02em;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #1e293b 0%, #334155 100%);
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  margin: 14px 0;
  transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.8), 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 18px rgba(59, 130, 246, 1), 0 2px 8px rgba(0, 0, 0, 0.5);
}

input[type="range"]:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.05);
}

.quick-mileage-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-subtle {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-subtle:hover {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Categorized Condition & Equipment Cards */
.condition-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.amzs-override-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.condition-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .condition-categories-grid {
    grid-template-columns: 1fr;
  }
}

.positive-factors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .positive-factors-grid {
    grid-template-columns: 1fr;
  }
}

.wear-full-panel {
  background: rgba(18, 26, 44, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.wear-full-panel:hover {
  border-color: var(--border-color-hover);
}

.ev-battery-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: border-color 0.2s ease;
}

.ev-battery-box:hover {
  border-color: rgba(16, 185, 129, 0.55);
}

.ev-battery-box input[type="range"] {
  accent-color: #10b981;
}

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

.wear-filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wear-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.wear-filter-pill.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: #3b82f6;
  font-weight: 600;
}

.wear-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .wear-cards-grid {
    grid-template-columns: 1fr;
  }
}

.condition-checkbox-card.compact {
  padding: 9px 12px;
  gap: 10px;
  align-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
  min-height: 48px;
}

.condition-checkbox-card.compact input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 0;
  accent-color: #ef4444;
}

.condition-checkbox-card.compact .chk-content {
  min-width: 0;
}

.condition-checkbox-card.compact .chk-title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.condition-checkbox-card.compact .chk-desc {
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.condition-checkbox-card.compact.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 2px 10px -2px rgba(239, 68, 68, 0.25);
}

.generic-defects-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.generic-defects-toggle-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  color: #60a5fa;
}

.attr-category-col {
  background: rgba(18, 26, 44, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease;
}

.attr-category-col:hover {
  border-color: var(--border-color-hover);
}

.attr-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.attr-category-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.attr-category-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background-color: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.attr-category-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  transition: opacity 0.25s ease;
}

.attr-category-cards.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.amzs-wear-note {
  font-size: 11.5px;
  color: #34d399;
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.condition-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.condition-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
  margin-top: 2px;
  cursor: pointer;
}

.condition-checkbox-card:hover {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-1px);
}

.condition-checkbox-card.active {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 4px 16px -2px rgba(59, 130, 246, 0.25);
}

.chk-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chk-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chk-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f8fafc;
}

.chk-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.chk-tag.positive {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.chk-tag.negative {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.chk-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.condition-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.condition-card {
  padding: 12px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.condition-card:hover {
  border-color: #64748b;
}

.condition-card.active {
  border-color: var(--accent-blue);
  background-color: rgba(59, 130, 246, 0.12);
}

.condition-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}

.condition-mult {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.condition-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .condition-checkbox-group {
    grid-template-columns: 1fr;
  }
}

/* Valuation Results - Dual Price Grid (Buy & Sell Only) */
.dual-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.price-showcase-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.price-showcase-card:hover {
  transform: translateY(-3px);
}

/* Buy Price Card Accent - Vibrant Neon Blue */
.price-showcase-card.buy-card {
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.88) 100%), rgba(18, 26, 44, 0.9);
  border: 1.5px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.65), 0 0 35px -8px rgba(59, 130, 246, 0.3);
}

.price-showcase-card.buy-card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 160px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.28), transparent 70%);
  pointer-events: none;
}

.price-showcase-card.buy-card:hover {
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.75), 0 0 45px -4px rgba(59, 130, 246, 0.45);
}

/* Sell Price Card Accent - Emerald Green / Teal */
.price-showcase-card.sell-card {
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.4) 0%, rgba(15, 23, 42, 0.88) 100%), rgba(18, 26, 44, 0.9);
  border: 1.5px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.65), 0 0 35px -8px rgba(16, 185, 129, 0.25);
}

.price-showcase-card.sell-card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 160px;
  background: radial-gradient(ellipse, rgba(16, 185, 129, 0.28), transparent 70%);
  pointer-events: none;
}

.price-showcase-card.sell-card:hover {
  border-color: rgba(52, 211, 153, 0.75);
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.75), 0 0 45px -4px rgba(16, 185, 129, 0.4);
}

/* Marketplace Horizontal Comparison Section */
.marketplace-horizontal-card {
  margin-bottom: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.88) 100%), rgba(18, 26, 44, 0.9);
  border: 1.5px solid rgba(129, 140, 248, 0.35);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.65), 0 0 35px -8px rgba(99, 102, 241, 0.2);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.marketplace-horizontal-card:hover {
  border-color: rgba(165, 180, 252, 0.55);
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.75), 0 0 45px -4px rgba(99, 102, 241, 0.3);
}

.marketplace-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.marketplace-header-flex .showcase-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.marketplace-header-flex .card-title {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.portal-tag {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.4);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.marketplace-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.portal-horizontal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.portal-horizontal-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 12px);
  padding: 18px 16px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.portal-horizontal-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.portal-horizontal-item:hover {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(129, 140, 248, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px -4px rgba(99, 102, 241, 0.3);
}

.portal-horizontal-item:hover::before {
  opacity: 1;
}

.portal-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.portal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-flag {
  font-size: 18px;
  line-height: 1;
}

.portal-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}

.portal-link-icon {
  font-size: 14px;
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.portal-horizontal-item:hover .portal-link-icon {
  color: #38bdf8;
  transform: translate(2px, -2px);
}

.portal-price-section {
  margin-bottom: 14px;
}

.portal-mean-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}

.portal-mean-val {
  font-family: var(--font-mono, monospace);
  font-size: 19px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.portal-mean-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.portal-price-range {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.portal-range-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.portal-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.portal-count-badge {
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 9999px;
  white-space: nowrap;
}

.portal-count-badge.estimated {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.portal-domain-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.portal-range-skeleton {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  grid-column: 1 / -1;
}

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

.showcase-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-icon {
  font-size: 18px;
}

.showcase-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.buy-card .showcase-label {
  color: #93c5fd;
}

.sell-card .showcase-label {
  color: #6ee7b7;
}

.showcase-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.buy-tag {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.sell-tag {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.showcase-price {
  font-size: 52px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 10px;
}

.buy-card .showcase-price {
  text-shadow: 0 4px 24px rgba(59, 130, 246, 0.45);
}

.sell-card .showcase-price {
  text-shadow: 0 4px 24px rgba(16, 185, 129, 0.45);
}

.showcase-range {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.showcase-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 992px) {
  .portal-horizontal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .dual-price-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .showcase-price {
    font-size: 40px;
  }
  .marketplace-horizontal-card {
    padding: 18px 16px;
  }
  .marketplace-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 580px) {
  .portal-horizontal-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .portal-price-range {
    font-size: 15px;
  }
}

/* Legacy Valuation Hero (retained for fallback) */
.valuation-hero {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4) 0%, rgba(15, 23, 42, 0.85) 100%), rgba(18, 26, 44, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(59, 130, 246, 0.45);
  border-radius: var(--radius-xl);
  padding: 38px 24px;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 45px -12px rgba(0, 0, 0, 0.65), 0 0 45px -8px rgba(59, 130, 246, 0.35);
}

.valuation-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 260px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.35), transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #93c5fd;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hero-price {
  font-size: 60px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 12px;
  text-shadow: 0 4px 28px rgba(59, 130, 246, 0.45);
}

.hero-range {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 6px 18px;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pricing-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.spread-card {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-md);
  position: relative;
}

.spread-card:hover {
  border-color: rgba(148, 163, 184, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.45);
}

.spread-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 8px;
}

.spread-val {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
}

.spread-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Breakdown table */
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.breakdown-row:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

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

.breakdown-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.breakdown-val.positive {
  color: #34d399;
}

.breakdown-val.negative {
  color: #fb7185;
}

/* SVG Chart Container */
.chart-container {
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
}

/* Comparable Listings */
.comps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 14px;
}

.comps-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comps-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: middle;
}

.comps-table tr:hover td {
  background-color: rgba(59, 130, 246, 0.04);
}

.comps-price {
  font-weight: 800;
  color: #60a5fa;
  font-family: var(--font-mono);
  font-size: 15px;
}

.badge-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-right: 4px;
  margin-top: 3px;
  background-color: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-prov {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 4px;
  margin-top: 3px;
  background-color: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-equip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-right: 4px;
  margin-top: 3px;
  background-color: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Loader */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Action Feedback & Cursor States */
body.is-decoding {
  cursor: wait;
}

body.is-decoding #decodeBtn {
  cursor: wait;
  opacity: 0.8;
}

body.is-calculating {
  cursor: progress;
}

/* Interactive Element Cursors & Active States */
button,
select,
.condition-card,
.recent-chip,
.btn-link,
.btn-subtle,
.unit-btn,
.btn-secondary,
.btn-primary {
  cursor: pointer;
}

button:active:not(:disabled),
.recent-chip:active,
.unit-btn:active,
.btn-subtle:active {
  transform: scale(0.96);
  transition: transform 0.08s ease;
}

.condition-card:active {
  transform: scale(0.98);
}

input[type="range"] {
  cursor: grab;
}

input[type="range"]:active {
  cursor: grabbing;
}

/* Top Progress Bar for Live Action Feedback */
.top-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #10b981, #60a5fa, #3b82f6);
  background-size: 200% 100%;
  z-index: 10000;
  animation: shimmerProgress 1.1s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

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

/* Dynamic Value Update Pulse & Shimmer */
.updating {
  opacity: 0.45;
  filter: blur(0.4px);
  transform: scale(0.99);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.pulse-updated {
  animation: valueFlash 0.35s ease-out;
}

@keyframes valueFlash {
  0% {
    transform: scale(0.97);
    color: #93c5fd;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
    color: inherit;
    text-shadow: none;
  }
}

.alert-box {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Section Header Flex */
.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-header-flex .card-title {
  margin-bottom: 0;
}

/* Unit Toggle */
.unit-toggle {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.unit-toggle-label {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 6px;
}

.unit-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.unit-btn.active {
  background-color: var(--accent-blue);
  color: #ffffff;
}

/* Secondary Action Button */
.btn-secondary {
  padding: 8px 16px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background-color: #475569;
  border-color: var(--accent-blue);
}

/* Print Stylesheet for Appraisal Sheet */
@media print {
  body {
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .lang-selector,
  .status-badges,
  #vinForm,
  #recentSection,
  .quick-mileage-buttons,
  .unit-toggle,
  #printReportBtn,
  #adminIntelligenceCard,
  input[type="range"] {
    display: none !important;
  }

  .card {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #0f172a !important;
    page-break-inside: avoid;
    margin-bottom: 16px !important;
    padding: 16px !important;
  }

  .vehicle-heading,
  .hero-price,
  .spread-val,
  .spec-value,
  .card-title {
    color: #0f172a !important;
  }

  .spec-item {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
  }

  .valuation-hero {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }

  .spread-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
  }

  .hero-price {
    color: #1d4ed8 !important;
  }

  .hero-range {
    color: #475569 !important;
  }

  .comps-table th,
  .comps-table td {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
  }

  .comps-price {
    color: #1d4ed8 !important;
  }

  .breakdown-row {
    border-bottom: 1px solid #e2e8f0 !important;
  }

  .price-showcase-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #0f172a !important;
    page-break-inside: avoid;
  }

  .showcase-price {
    color: #0f172a !important;
    text-shadow: none !important;
  }

  .marketplace-horizontal-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    color: #0f172a !important;
    page-break-inside: avoid;
  }

  .portal-horizontal-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
  }

  .portal-name,
  .portal-mean-val,
  .portal-price-range {
    color: #0f172a !important;
  }
}

/* ==============================================================================
   AMZS VEHICLE INSPECTION & DEFECTS STYLING
   ============================================================================== */
.amzs-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.amzs-empty-state {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-top: 12px;
  background: rgba(15, 23, 42, 0.35);
  border: 1.5px dashed rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amzs-empty-state:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.amzs-upload-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.amzs-upload-text {
  flex: 1;
}

.amzs-upload-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main, #f1f5f9);
}

.amzs-upload-sub {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}


.amzs-meta-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 14px;
}

.amzs-meta-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: rgba(18, 26, 44, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
}

.amzs-meta-label {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.amzs-meta-val {
  color: #f8fafc;
  font-weight: 700;
  font-family: var(--font-mono);
}

.amzs-subsystems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.subsystem-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.subsystem-card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.3);
}

.subsystem-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.subsystem-status-pill {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}

.subsystem-card.ok {
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.04);
}
.subsystem-card.ok .subsystem-status-pill {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.subsystem-card.warning {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.04);
}
.subsystem-card.warning .subsystem-status-pill {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

.subsystem-card.critical {
  border-left: 3px solid #ef4444;
  background: rgba(239, 68, 68, 0.05);
}
.subsystem-card.critical .subsystem-status-pill {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
}

.amzs-issues-box {
  background: rgba(18, 26, 44, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.amzs-issues-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.amzs-impact-tag {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 9999px;
}

.amzs-impact-tag.negative {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.amzs-impact-tag.positive {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.amzs-issues-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.amzs-issue-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.55);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-left: 3.5px solid #f59e0b;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.amzs-issue-row:hover {
  background: rgba(22, 30, 49, 0.7);
  transform: translateY(-1px);
}

.amzs-issue-row.critical {
  border-left-color: #ef4444;
}

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

.amzs-issue-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}

.amzs-issue-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.amzs-issue-cost {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fb7185;
  white-space: nowrap;
}

.badge.yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==============================================================================
   AMZS DEFECT REVIEW & ADJUSTMENT MODAL
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.4);
}

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

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.modal-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

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

.amzs-modal-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.amzs-modal-meta-strip .meta-label {
  color: #94a3b8;
  margin-right: 4px;
}

.amzs-modal-meta-strip .meta-value {
  color: #f8fafc;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
}

.modal-alert {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
  font-size: 13px;
  line-height: 1.4;
}

.modal-measurements-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .modal-measurements-row {
    grid-template-columns: 1fr;
  }
}

.modal-meas-card {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}

.meas-card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  display: block;
  margin-bottom: 6px;
}

.meas-card-content {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
}

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

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

.modal-section-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0;
}

.defects-counter {
  font-size: 12px;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
}

.modal-defects-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-defect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  transition: border-color 0.15s;
}

.modal-defect-row.disabled {
  opacity: 0.5;
  background: rgba(15, 23, 42, 0.2);
}

.modal-defect-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.modal-defect-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3b82f6;
}

.modal-defect-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-defect-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.modal-defect-cat {
  font-size: 11px;
  color: #94a3b8;
}

.modal-defect-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.defect-cost-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.defect-cost-input {
  width: 90px;
  padding: 5px 22px 5px 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  color: #f87171;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-mono, monospace);
  text-align: right;
}

.defect-cost-addon {
  position: absolute;
  right: 8px;
  font-size: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.defect-del-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 4px;
}

.defect-del-btn:hover {
  background: rgba(239, 68, 68, 0.15);
}

.modal-add-defect-box {
  margin-top: 6px;
  padding: 12px 14px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px dashed rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-add-defect-box h5 {
  font-size: 12px;
  font-weight: 600;
  color: #93c5fd;
  margin: 0;
}

.add-defect-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.add-defect-grid select {
  flex: 2;
  min-width: 200px;
  padding: 7px 10px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 12px;
}

.add-defect-grid input[type="text"] {
  flex: 2;
  min-width: 200px;
  padding: 7px 10px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 12px;
}

.add-defect-grid .input-with-addon {
  position: relative;
  width: 100px;
}

.add-defect-grid .input-with-addon input {
  width: 100%;
  padding: 7px 22px 7px 8px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 12px;
  text-align: right;
}

.add-defect-grid .input-with-addon .addon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #94a3b8;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.4);
}

.modal-footer-impact {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-footer-impact .impact-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* User Profile Badge in Header */
.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 6px 0 8px;
  height: 36px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-blue);
  flex-shrink: 0;
}

.user-text-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
  max-width: 140px;
  justify-content: center;
}

.user-display-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-display-email {
  font-size: 10px;
  color: var(--text-muted);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fca5a5;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  height: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.4);
}

/* ==============================================================================
   MOBILE & TABLET RESPONSIVENESS (AutoValuate)
   ============================================================================== */
@media (max-width: 768px) {
  .container {
    padding: 16px 12px;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .brand {
    gap: 12px;
  }

  .brand-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
    border-radius: 12px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 11.5px;
    line-height: 1.3;
  }

  .header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
    flex-wrap: nowrap;
  }

  .user-profile-badge {
    padding: 0 4px 0 6px;
    height: 44px;
    min-height: 44px;
    gap: 6px;
  }

  .user-avatar {
    width: 20px;
    height: 20px;
  }

  .user-display-name {
    font-size: 11px;
  }

  .user-display-email {
    font-size: 9.5px;
    max-width: 100px;
  }

  .lang-dropdown {
    height: 44px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 16px !important;
  }

  /* iOS Auto-Zoom Prevention */
  input,
  select,
  textarea,
  .form-input-text,
  .form-select-control,
  .form-textarea-control,
  .history-search-input,
  .history-filter-select,
  .lang-dropdown {
    font-size: 16px !important;
  }

  .card {
    padding: 18px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
  }

  .card-title {
    font-size: 16px;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .vin-input-group {
    flex-direction: column;
    gap: 10px;
  }

  .input-wrapper {
    width: 100%;
  }

  .vin-input {
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    padding: 12px 14px;
    letter-spacing: 1.5px;
    border-radius: var(--radius-sm);
  }

  .char-counter {
    right: 12px;
    font-size: 11px;
  }

  .btn-primary {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
    justify-content: center;
  }

  .vin-input-group .btn-secondary {
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
    justify-content: center;
  }

  .recent-section {
    margin-top: 14px;
    padding-top: 12px;
  }

  .recent-chips {
    gap: 6px;
  }

  .recent-chip {
    padding: 5px 9px;
    font-size: 11.5px;
  }

  .vehicle-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  .vehicle-heading {
    font-size: clamp(18px, 5.5vw, 24px);
    line-height: 1.25;
  }

  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .spec-item {
    padding: 10px 12px;
  }

  .spec-label {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .spec-value {
    font-size: 13.5px;
  }

  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .amzs-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .amzs-actions .btn-sm {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  .amzs-meta-bar {
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
  }

  .amzs-subsystems-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .controls-container {
    gap: 14px;
  }

  .mileage-control-box {
    padding: 16px 14px;
  }

  .mileage-slider-header {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }

  .mileage-display {
    font-size: 20px;
  }

  .quick-mileage-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }

  .quick-mileage-buttons .btn-subtle {
    flex: 1 1 calc(33.33% - 4px);
    min-height: 38px;
    padding: 6px 8px;
    font-size: 11px;
    text-align: center;
    justify-content: center;
    border-radius: 6px;
  }

  .positive-factors-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .wear-cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .condition-checkbox-card {
    padding: 12px;
    gap: 10px;
    min-height: 48px;
  }

  .chk-title {
    font-size: 13px;
  }

  .defect-selector-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .defect-selector-row select,
  .defect-selector-row button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .dual-price-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 18px;
  }

  .price-showcase-card {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }

  .showcase-price {
    font-size: clamp(34px, 9vw, 44px);
    margin-bottom: 6px;
  }

  .showcase-range {
    font-size: 12.5px;
  }

  .marketplace-horizontal-card {
    padding: 18px 14px;
    margin-bottom: 16px;
  }

  .portal-horizontal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .portal-horizontal-item {
    padding: 14px 12px;
  }

  .breakdown-row {
    padding: 8px 0;
    font-size: 12.5px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .breakdown-val {
    margin-left: auto;
  }

  .chart-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .chart-container svg {
    max-width: 100%;
    height: auto;
    touch-action: pan-y;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-top: 8px;
  }

  .history-card {
    padding: 16px;
  }

  .data-table {
    table-layout: auto;
    min-width: 820px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .data-table th:last-child,
  .data-table td:last-child {
    min-width: 155px;
  }

  .history-actions-wrap {
    gap: 4px;
  }

  .history-act-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .comps-table {
    font-size: 12px;
    min-width: 520px;
  }

  .comps-table th,
  .comps-table td {
    padding: 8px 10px;
  }

  /* Modals on Mobile */
  .modal-backdrop {
    padding: 8px;
  }

  .modal-card {
    max-height: 94vh;
    width: 100%;
    border-radius: 12px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-title {
    font-size: 15px;
  }

  .modal-subtitle {
    font-size: 12px;
  }

  .modal-body {
    padding: 14px 16px;
    gap: 12px;
  }

  .modal-measurements-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .modal-defect-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  .modal-defect-right {
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    padding-top: 6px;
  }

  .add-defect-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .add-defect-grid select,
  .add-defect-grid input[type="text"],
  .add-defect-grid .input-with-addon,
  .add-defect-grid button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .modal-footer {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .modal-footer-impact {
    justify-content: space-between;
    width: 100%;
  }

  .modal-footer-actions {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  .modal-footer-actions button {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .specs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .spec-item {
    padding: 8px 10px;
  }

  .spec-value {
    font-size: 12.5px;
  }

  .quick-mileage-buttons .btn-subtle {
    flex: 1 1 100%;
  }

  .showcase-price {
    font-size: clamp(30px, 8.5vw, 38px);
  }

  .user-display-email {
    max-width: 90px;
  }

  .brand-title {
    font-size: 18px;
  }

  .history-act-btn .act-btn-label {
    display: none;
  }

  .data-table th:last-child,
  .data-table td:last-child {
    min-width: 76px !important;
    width: 76px !important;
    padding: 6px 8px !important;
  }

  .history-act-btn {
    padding: 5px 7px;
    font-size: 12px;
  }
}

/* Autopoint Official Footer Styling */
.app-footer {
  max-width: 1080px;
  margin: 40px auto 0 auto;
  padding: 24px 20px 10px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.footer-brand .accent-dot {
  color: var(--accent-blue);
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-blue);
}

@media (max-width: 768px) {
  .app-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-top: 30px;
    padding-bottom: 20px;
  }
  .footer-info {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==========================================================================
   Navigation Bar Tabs
   ========================================================================== */
.app-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  white-space: nowrap;
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.nav-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 35, 102, 0.9) 0%, rgba(29, 168, 235, 0.45) 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 35, 102, 0.5), inset 0 0 0 1px rgba(29, 168, 235, 0.4);
}

.nav-tab-icon {
  font-size: 16px;
  line-height: 1;
}

/* ==========================================================================
   Dashboard View — KPI Metrics Cards
   ========================================================================== */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.kpi-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.kpi-content {
  flex-grow: 1;
  min-width: 0;
}

.kpi-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}

.kpi-sep {
  color: var(--text-dim);
  margin: 0 2px;
}

.kpi-subtext {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   Dashboard View — Visual Charts Grid
   ========================================================================== */
.dashboard-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .dashboard-visual-grid {
    grid-template-columns: 1fr;
  }
}

.visual-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.timeline-chart-box {
  flex-grow: 1;
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  padding: 8px 0;
}

.dist-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  flex-grow: 1;
  align-items: start;
}

@media (max-width: 600px) {
  .dist-container {
    grid-template-columns: 1fr;
  }
}

.dist-subtitle {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dist-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dist-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dist-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.dist-bar-name {
  color: var(--text-secondary);
  font-weight: 600;
}

.dist-bar-val {
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.dist-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.dist-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1da8eb, #38bdf8);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.dist-bar-fill.fuel {
  background: linear-gradient(90deg, #10b981, #34d399);
}

/* ==========================================================================
   History Table Card & Controls
   ========================================================================== */
.history-card {
  padding: 24px;
  overflow: hidden;
  min-width: 0;
}

.history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.history-title-wrap {
  flex-grow: 1;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-search-input {
  min-width: 260px;
  padding: 7px 12px;
  font-size: 13px;
}

@media (max-width: 650px) {
  .history-search-input {
    min-width: 180px;
  }
}

/* Ensure the table wrapper constrains overflow at all viewport sizes */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.4);
}

.data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 13px;
  table-layout: auto;
}

.data-table th {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

/* Explicit minimum widths so columns never collapse into an unreadable state */
.data-table th:nth-child(1), .data-table td:nth-child(1) { min-width: 110px; width: 11%; }  /* Date */
.data-table th:nth-child(2), .data-table td:nth-child(2) { min-width: 140px; width: 14%; }  /* VIN */
.data-table th:nth-child(3), .data-table td:nth-child(3) { min-width: 160px; }               /* Vehicle */
.data-table th:nth-child(4), .data-table td:nth-child(4) { min-width: 90px; width: 9%; }    /* Odometer */
.data-table th:nth-child(5), .data-table td:nth-child(5) { min-width: 105px; width: 10%; }  /* Price */
.data-table th:nth-child(6), .data-table td:nth-child(6) { min-width: 80px; width: 8%; }    /* AMZS */
.data-table th:nth-child(7), .data-table td:nth-child(7) { min-width: 140px; width: 14%; }  /* User Email */
.data-table th:nth-child(8), .data-table td:nth-child(8) { min-width: 175px; width: 175px; } /* Actions */

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
  background-color: rgba(29, 168, 235, 0.05);
}

.history-vin-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.history-price-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #34d399;
}

/* Actions Column: Sticky right so it is ALWAYS visible and NEVER cut off */
.data-table th:last-child,
.data-table td:last-child {
  position: sticky;
  right: 0;
  background: #0d1527;
  z-index: 2;
  box-shadow: -6px 0 12px rgba(8, 13, 26, 0.75);
  text-align: right;
  white-space: nowrap;
}

.data-table th:last-child {
  background: #09101f;
  z-index: 3;
}

.data-table tbody tr:hover td:last-child {
  background: #14223d;
}

.history-actions-cell {
  padding: 8px 12px !important;
}

.history-actions-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.history-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.history-act-btn:hover {
  background: rgba(29, 168, 235, 0.15);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.history-act-btn.primary {
  background: rgba(29, 168, 235, 0.15);
  border-color: rgba(29, 168, 235, 0.4);
  color: #38bdf8;
}

.history-act-btn.primary:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.history-act-btn .act-btn-icon {
  font-size: 13px;
  line-height: 1;
}

.history-act-btn .act-btn-label {
  letter-spacing: 0.02em;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   Quote Detail Modal Styles
   ========================================================================== */
.qd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 600px) {
  .qd-grid {
    grid-template-columns: 1fr;
  }
}

.qd-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.qd-box-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
  margin-bottom: 10px;
}

.qd-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

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

.qd-value {
  color: #ffffff;
  font-weight: 600;
}

.qd-price-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.qd-price-box {
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 35, 102, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(29, 168, 235, 0.3);
  text-align: center;
}

.qd-price-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.qd-price-num {
  font-size: 22px;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
  margin-top: 4px;
}

/* ==========================================================================
   Upfront Intake Redesign Styles (VIN, Mileage & Slovenian Condition NLP)
   ========================================================================== */
.intake-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.intake-checkbox-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.intake-checkbox-toggle:hover {
  color: #e2e8f0;
}

.intake-checkbox-toggle input[type="checkbox"] {
  accent-color: var(--accent-cyan);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.form-input-text, .form-select-control {
  width: 100%;
  padding: 11px 14px;
  background-color: rgba(10, 15, 29, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.form-input-text:focus, .form-select-control:focus, .form-textarea-control:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(29, 168, 235, 0.25);
  background-color: #0d1424;
}

.form-textarea-control {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(10, 15, 29, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  min-height: 78px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.manual-specs-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.detected-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all 0.15s ease;
}

.detected-pill.pill-defect {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.detected-pill.pill-maintenance {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.detected-pill.pill-sentiment {
  background-color: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.detected-pill .pill-close {
  cursor: pointer;
  margin-left: 3px;
  opacity: 0.7;
  font-size: 13px;
  font-weight: 700;
  display: none !important;
}

.admin-only-col {
  display: none;
}

.detected-pill.pill-defect.expanded {
  border-radius: 12px;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px 12px;
  background-color: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.detected-pill .pill-main-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.detected-pill .pill-admin-badge {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
}

.detected-pill .pill-details-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
}

.detected-pill .pill-details-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

.detected-pill .pill-admin-breakdown {
  background: rgba(8, 13, 26, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 400;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.detected-pill .pill-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 3px;
}

.detected-pill .pill-breakdown-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detected-pill .pill-bd-label {
  color: #94a3b8;
  font-size: 10.5px;
}

.detected-pill .pill-bd-val {
  color: #f8fafc;
  font-weight: 600;
  font-family: monospace;
  text-align: right;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@media (max-width: 768px) {
  .form-input-text, .form-select-control, .form-textarea-control {
    font-size: 16px !important;
  }
}

.snippet-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.snippet-chip-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.snippet-chip-btn:hover {
  background: rgba(29, 168, 235, 0.15);
  border-color: rgba(29, 168, 235, 0.45);
  color: #38bdf8;
  transform: translateY(-1px);
}

/* ==============================================================================
   FLEET BATCH VALUATION MODULE STYLES
   ============================================================================== */
.fleet-hero-card {
  margin-bottom: 24px;
}

.fleet-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.fleet-actions-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fleet-dropzone {
  border: 2px dashed rgba(29, 168, 235, 0.4);
  background: rgba(8, 13, 26, 0.6);
  border-radius: 14px;
  padding: 38px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.fleet-dropzone:hover,
.fleet-dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(29, 168, 235, 0.08);
  box-shadow: 0 0 28px rgba(29, 168, 235, 0.25);
  transform: translateY(-2px);
}

.fleet-drop-icon {
  font-size: 42px;
  margin-bottom: 12px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.fleet-dropzone:hover .fleet-drop-icon {
  transform: scale(1.1);
}

.fleet-drop-title {
  font-size: 17px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 6px 0;
}

.fleet-drop-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}

.fleet-drop-pills {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fleet-pill {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Mapping Panel */
.fleet-mapping-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(29, 168, 235, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.fleet-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.fleet-step-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 4px 0;
}

.fleet-step-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

.fleet-mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fleet-mapping-table th {
  text-align: left;
  padding: 10px 12px;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fleet-mapping-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: #f1f5f9;
}

.fleet-col-select {
  width: 100%;
  max-width: 280px;
  background: rgba(15, 25, 48, 0.9);
  border: 1px solid rgba(29, 168, 235, 0.35);
  color: #f8fafc;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-height: 38px;
}

.fleet-col-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(29, 168, 235, 0.3);
}

.fleet-preview-box {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.fleet-mini-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.fleet-mini-preview-table th {
  background: rgba(15, 25, 48, 0.7);
  color: #94a3b8;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  white-space: nowrap;
}

.fleet-mini-preview-table td {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
  white-space: nowrap;
}

/* Progress bar */
.fleet-progress-section {
  margin-top: 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(29, 168, 235, 0.3);
  border-radius: 10px;
  padding: 16px 20px;
}

.fleet-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.fleet-progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.fleet-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #10b981);
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* Liquidity strip */
.fleet-liquidity-card {
  margin-bottom: 20px;
  padding: 16px 20px;
}

.fleet-liq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.fleet-liq-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 2px 0;
}

.fleet-liq-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-liq {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-liq.high {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-liq.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-liq.niche {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Grid Table */
.fleet-grid-table th {
  white-space: nowrap;
}

.fleet-grid-table td {
  vertical-align: middle;
}

.fleet-price-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #38bdf8;
  font-size: 14px;
}

.fleet-auction-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #34d399;
  font-size: 13px;
}

.fleet-damage-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
}

.fleet-pos-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 3px;
}

.fleet-drill-btn {
  background: transparent;
  border: 1px solid rgba(29, 168, 235, 0.3);
  color: #38bdf8;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fleet-drill-btn:hover {
  background: rgba(29, 168, 235, 0.15);
  border-color: #38bdf8;
}

.fleet-expanded-row {
  background: rgba(15, 25, 48, 0.5) !important;
}

.fleet-drilldown-card {
  padding: 14px 16px;
  background: rgba(8, 13, 26, 0.85);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 8px;
  margin: 6px 0;
}

.snippet-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.snippet-chip-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.snippet-chip-btn:hover {
  background: rgba(29, 168, 235, 0.15);
  border-color: rgba(29, 168, 235, 0.45);
  color: #38bdf8;
  transform: translateY(-1px);
}
