 
:root {
  --bg-body: #1c1e2b;
  --bg-dark: #161824;
  --bg-card: #1e2030;
  --bg-elevated: #252738;
  --bg-hover: #2d2f42;
  --bg-surface: #212334;
  --bg-glass: rgba(30, 32, 48, 0.9);

  --red: #e02b2b;
  --red-light: #ef4444;
  --red-dark: #c82020;
  --red-glow: rgba(224, 43, 43, 0.08);
  --red-subtle: rgba(224, 43, 43, 0.04);

  --teal: #18b8a8;
  --teal-light: #2dd4bf;
  --teal-dark: #14a396;
  --teal-glow: rgba(24, 184, 168, 0.08);

  --warning: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;

  --text-primary: #eaecf0;
  --text-secondary: #a0a4b0;
  --text-muted: #5f6375;
  --text-white: #ffffff;

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.16);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 100px;
}

/* ═══ RESET ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
   overflow: auto; 
  -webkit-font-smoothing: antialiased;
}

.grain-overlay { display: none; }

.app {
  display: flex;
  flex-direction: column;
 
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.header {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 38px;
  height: 38px;
  background: var(--red);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.logo svg { width: 20px; height: 20px; }

.header-title h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.3px;
}

.header-title p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-badge {
  padding: 5px 12px;
  background: var(--red-subtle);
  border: 1px solid rgba(224, 43, 43, 0.12);
  border-radius: var(--radius-pill);
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--red-light);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════
   TOP CONTROLS BAR
   ═══════════════════════════════════════ */
.top-controls {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  z-index: 90;
  overflow: visible;
  display: flex;
  align-items: center;
}

.controls-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  height: 100%;
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  justify-content: center;
  padding: 0 20px;
}

.control-section:first-child {
  padding-left: 0;
}

/* Dikey ayırıcı */
.control-section + .control-section {
  border-left: 1px solid var(--border);
}

.control-label {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════
   ARAÇ SEÇİMİ
   ═══════════════════════════════════════ */
.vehicle-grid {
  display: flex;
  gap: 2px;
  background: var(--bg-dark);
  padding: 3px;
  border-radius: var(--radius);
}

.vehicle-card {
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 6px 14px 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-width: 64px;
}

.vehicle-card-glow { display: none; }

.vehicle-card:hover {
  background: var(--bg-elevated);
}

.vehicle-card.active {
  background: var(--bg-elevated);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.vehicle-card::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.vehicle-card.active::after {
  transform: translateX(-50%) scaleX(1);
}

.vehicle-icon {
  font-size: 20px;
  display: block;
  margin-bottom: 2px;
  opacity: 0.4;
  transition: opacity 0.15s;
  filter: none;
}

.vehicle-card.active .vehicle-icon { opacity: 1; }
.vehicle-card:hover .vehicle-icon { opacity: 0.7; }

.vehicle-name {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s;
}

.vehicle-card.active .vehicle-name { color: var(--text-primary); }
.vehicle-card:hover .vehicle-name { color: var(--text-secondary); }

.vehicle-specs {
  font-family: 'Space Mono', monospace;
  font-size: 7px;
  color: var(--text-muted);
  opacity: 0.5;
  line-height: 1.3;
}

/* ═══════════════════════════════════════
   INPUTS
   ═══════════════════════════════════════ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-label {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-wrapper { position: relative; }

.input-wrapper input,
.input-wrapper select {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  padding-right: 34px;
  color: var(--text-primary);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  transition: border-color 0.15s;
  outline: none;
  height: 36px;
  appearance: none;
  -webkit-appearance: none;
}

.input-wrapper select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%235f6375' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.input-wrapper input:hover,
.input-wrapper select:hover {
  border-color: var(--border-light);
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red-glow);
}

.input-unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  pointer-events: none;
}

.input-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.input-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ═══════════════════════════════════════
   PARSİYEL
   ═══════════════════════════════════════ */
.partial-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 20px;
}

.partial-section::before { display: none; }

.partial-section .control-label {
  color: var(--text-muted);
}

.partial-inputs-grid {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ═══════════════════════════════════════
   BUTONLAR
   ═══════════════════════════════════════ */
.actions-section {
  margin-left: auto;
  border-left: none !important;
  padding-right: 0 !important;
}

.action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.action-btn {
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  height: 36px;
}

/* Ana Buton — Kırmızı */
.action-btn.primary {
  background: var(--red);
  color: white;
  border: none;
}

.action-btn.primary:hover {
  background: var(--red-light);
}

/* İkincil Buton */
.action-btn.secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.action-btn.secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

/* Başarılı Buton — Teal */
.action-btn.success {
  background: var(--teal);
  color: white;
  border: none;
  animation: none;
  box-shadow: none;
}

.action-btn.success:hover {
  background: var(--teal-light);
}

/* Sıfırla */
.action-btn.reset {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.action-btn.reset:hover {
  color: var(--red-light);
  border-color: rgba(224, 43, 43, 0.2);
}

.btn-icon { font-size: 12px; }

/* ═══════════════════════════════════════
   VIEWPORT
   ═══════════════════════════════════════ */
.viewport {
  position: relative;
  background: var(--bg-body);
  overflow: hidden;
  height: 600px;   /* sabit piksel yükseklik */
  flex: none;
}

.viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.018) 1px, transparent 0);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 1;
}

.viewport::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(22, 24, 36, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

#canvas3d { width: 100%; height: 100%; display: block; }

.viewport-empty {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-muted);
  z-index: 2;
}

.viewport-empty-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: 0.15;
}

.viewport-empty p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}

.viewport-empty strong {
  color: var(--red-light);
  font-weight: 700;
}

/* ═══ LEGEND ═══ */
.legend {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  max-width: 200px;
  z-index: 10;
}

.legend-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 11px;
}

#legendItems { display: flex; flex-direction: column; gap: 6px; }

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 11px;
}

.legend-color {
  width: 12px; height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* ═══ VIEWPORT BADGE ═══ */
.viewport-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 10;
}

.viewport-badge span {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--teal);
}

/* ═══ VIEWPORT CONTROLS ═══ */
.viewport-controls {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 3px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  z-index: 10;
}

.view-btn {
  padding: 8px 18px;
  background: none;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.view-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.view-btn.active {
  color: white;
  background: var(--red);
}

/* ═══════════════════════════════════════
   MODAL
   ═══════════════════════════════════════ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22, 24, 36, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}

.modal-content.large { max-width: 1400px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 10px; }

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 0 20px;
  height: 38px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-btn.primary {
  background: var(--red);
  color: white;
}

.modal-btn.primary:hover {
  background: var(--red-light);
}

.modal-btn.secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.modal-btn.secondary:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════
   CARGO TABLE
   ═══════════════════════════════════════ */
.cargo-table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cargo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cargo-table thead {
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 10;
}

.cargo-table th {
  padding: 10px;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cargo-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }

.cargo-table tbody tr { transition: background 0.1s; }
.cargo-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.cargo-table input,
.cargo-table select {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text-primary);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.cargo-table input:focus,
.cargo-table select:focus {
  border-color: var(--red);
}

.cargo-table .color-picker {
  width: 42px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
}

.cargo-table .color-picker:hover { border-color: var(--border-hover); }

.delete-cargo-btn {
  padding: 6px 10px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}

.delete-cargo-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.add-cargo-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.add-cargo-btn:hover {
  border-color: var(--red);
  color: var(--red-light);
}

/* ═══ MODAL SUMMARY ═══ */
.modal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 20px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 16px 14px;
  background: var(--bg-elevated);
}

.summary-label {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.summary-value {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--red-light);
}

/* ═══════════════════════════════════════
   SONUÇLAR
   ═══════════════════════════════════════ */
.result-section { margin-bottom: 24px; }

.result-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.result-banner {
  padding: 14px 18px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.result-banner.success {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.result-banner.error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.result-icon { font-size: 24px; flex-shrink: 0; }
.result-text { flex: 1; line-height: 1.5; }
.result-text small { display: block; font-size: 11px; opacity: 0.7; margin-top: 2px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.stat-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}

.stat-card:hover { border-color: var(--border-hover); }

.stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.stat-value.warning { color: var(--warning); }
.stat-value.danger { color: var(--danger); }
.stat-value.success { color: var(--success); }

.stat-label {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

/* Progress */
.progress-wrapper { margin-top: 12px; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.progress-label { font-size: 11px; color: var(--text-secondary); font-weight: 600; }

.progress-value {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}

.progress-bar {
  height: 6px;
  background: var(--bg-dark);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--teal-dark), var(--teal), var(--teal-light));
  transition: width 0.6s ease;
}

.progress-fill::after { display: none; }

.progress-fill.warning {
  background: linear-gradient(90deg, #b8860b, var(--warning));
}

.progress-fill.danger {
  background: linear-gradient(90deg, #b91c1c, var(--danger));
}

/* Cargo details */
.cargo-details-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }

.cargo-details-table th,
.cargo-details-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cargo-details-table th {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-elevated);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cargo-details-table tr:hover { background: rgba(255,255,255,0.015); }

/* ═══ ALTERNATİFLER ═══ */
.alternatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.alternative-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.alternative-card:hover {
  border-color: var(--border-hover);
}

.alternative-card.selected {
  border-color: var(--red);
}

.alternative-card.selected::before {
  content: '✓';
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  background: var(--red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.alternative-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.alternative-type {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 5px;
}

.alternative-count {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
}

.alternative-details { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.alternative-detail-row { display: flex; justify-content: space-between; align-items: center; }
.alternative-detail-label { color: var(--text-muted); font-size: 11px; }

.alternative-detail-value {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 12px;
}

.alternative-badge {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: var(--radius-pill);
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--success);
  margin-top: 8px;
  text-transform: uppercase;
}

.alternative-badge.recommended {
  background: var(--teal-glow);
  border-color: rgba(24, 184, 168, 0.12);
  color: var(--teal);
}

/* ═══ ÖZEL ARAÇ MODAL ═══ */
.custom-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22, 24, 36, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.custom-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 340px;
  max-width: 92vw;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.custom-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}

.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.custom-modal-title { display: flex; align-items: center; gap: 10px; }
.custom-modal-icon { font-size: 20px; }

.custom-modal-name {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.custom-modal-desc { font-size: 11px; color: var(--text-muted); }

.custom-modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  transition: all 0.15s;
}

.custom-modal-close:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.custom-modal-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.custom-modal-block:last-of-type { margin-bottom: 20px; }

.custom-modal-block-title {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  margin-bottom: 12px;
  font-weight: 700;
}

.custom-modal-fields { display: flex; flex-direction: column; gap: 8px; }

.custom-modal-row { display: flex; align-items: center; justify-content: space-between; }
.custom-modal-row label { font-size: 12px; color: var(--text-secondary); }
.custom-modal-row .input-wrapper { width: 130px; }

.custom-modal-buttons { display: flex; gap: 8px; }

.custom-modal-btn-cancel {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.custom-modal-btn-cancel:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.custom-modal-btn-apply {
  flex: 2;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--red);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.custom-modal-btn-apply:hover { background: var(--red-light); }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 10px; }
::selection { background: rgba(224, 43, 43, 0.15); color: var(--text-white); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1400px) {
  .controls-wrapper { gap: 0; }
}

@media (max-width: 1200px) {
  .top-controls { height: auto; padding: 12px 20px; }
  .controls-wrapper { flex-wrap: wrap; gap: 10px; }
  .control-section { height: auto; padding: 8px 0 !important; }
  .control-section + .control-section { border-left: none; }
  .actions-section { margin-left: 0; width: 100%; }
  .action-buttons { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .header { padding: 0 16px; height: 50px; }
  .header-title h1 { font-size: 14px; }
  .header-badge { display: none; }
  .top-controls { padding: 10px 14px; }
  .vehicle-grid { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .vehicle-card { min-width: 0; }
  .action-buttons { flex-direction: column; width: 100%; }
  .action-btn { width: 100%; justify-content: center; }
  .modal-content { border-radius: var(--radius-lg); }
  .modal-summary { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== ARKA PLAN LOGOSU - KESİN ÇÖZÜM ===== */
.viewport {
    position: relative;
    isolation: isolate; /* Katmanları ayır */
}

#canvas3d {
    position: relative;
    z-index: 2;
}

.viewport::after {
    content: "";
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    background-image: url('https://www.ugurnakliyat.com/wp-content/uploads/logo.png');
    background-size: 400px auto;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
    filter: grayscale(100%) brightness(1.2);
}

/* Ekstra: Yazılı versiyon */
.viewport::before {
    content: "UĞUR NAKLİYAT";
    position: absolute;
    bottom: 30px;
    right: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    z-index: 3;
    pointer-events: none;
}

.container-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 0 4px;
}

.container-btn {
  flex: 1;
  padding: 16px 10px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.container-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.container-btn.active {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15), 0 4px 15px rgba(231, 76, 60, 0.2);
}

.container-btn-icon {
  font-size: 32px;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.container-btn-label {
  font-weight: 700;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
}

.container-btn.active .container-btn-label {
  color: #fff;
}

.container-btn-icon {
  width: 56px;
  height: 44px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.container-btn-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transition: filter 0.25s ease;
}

.container-btn:hover .container-btn-icon {
  transform: scale(1.1);
}

.container-btn.active .container-btn-icon svg {
  filter: drop-shadow(0 2px 10px rgba(231, 76, 60, 0.5)) brightness(1.2);
}