:root {
  /* Açık, soğuk-nötr palet — stitch/ referans mockup'larından: gri sayfa zemini
     üzerinde beyaz kartlar "yükselir" (panel zeminden daha açık), tek doygun
     mavi (Ignition Blue) ana renk, net yeşil ikincil, footer + öne çıkan
     pricing kartı koyu lacivert bant. */
  --bg: #f0f2f5;
  --bg-2: #e9edf2;
  --panel: #ffffff;
  --panel-2: #e9edf2;
  --border: #e2e6eb;
  --border-strong: #cbd3dc;
  --border-glow: rgba(29, 108, 245, 0.35);
  --text: #111827;
  --text-dim: #6b7280;
  --muted: var(--text-dim);
  --muted-2: #9aa3ae;
  --primary: #1d6cf5;
  --primary-hover: #1557d4;
  --primary-ink: #ffffff;
  --primary-tint: rgba(29, 108, 245, 0.12);
  --accent: #16a34a;
  --accent-hover: #15803d;
  --accent-ink: #ffffff;
  --accent-text: #15803d;
  --accent-tint: rgba(22, 163, 74, 0.12);
  --danger: #d5514d;
  --danger-hover: #b83f3c;
  --danger-text: #b83f3c;
  --danger-tint: rgba(213, 81, 77, 0.1);
  --hazard: #e8aa4e;
  --hazard-hover: #cf8f1f;
  --hazard-ink: #111827;
  --hazard-text: #93650a;
  --hazard-tint: rgba(232, 170, 78, 0.16);
  --navy: #0f172a;
  --navy-2: #1e293b;
  --navy-ink: #f1f5f9;
  --navy-ink-dim: #94a3b8;
  --navy-border: rgba(255, 255, 255, 0.1);
  --radius-xs: 0.5rem;
  --radius-sm: 0.625rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;
  --radius: var(--radius-lg);
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-sm: 0 2px 8px -2px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 8px 24px -8px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 16px 40px -12px rgba(17, 24, 39, 0.16);
  --shadow: var(--shadow-md);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Akışkan kök font-size: tüm boyutlar rem olduğu için arayüz ekran genişliğiyle
   orantılı ölçeklenir. ~1366px'e kadar 16px (mevcut görünüm korunur), büyük/
   yüksek-DPI ekranlarda kademeli olarak 24px'e kadar büyür. */
html { font-size: clamp(16px, 0.7vw + 6px, 24px); }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}


/* Header */
.app-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.75rem;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 0.875rem; }

.brand-mark {
  width: 2.875rem; height: 2.875rem;
  display: grid; place-items: center;
}

.brand-text { display: flex; flex-direction: column; }
.brand-title { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.0125rem; }
.brand-subtitle { font-size: 0.7812rem; color: var(--text-dim); }

.lang-switch {
  display: flex;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  padding: 0.1875rem;
  gap: 0.125rem;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-btn.active { background: var(--primary); color: var(--primary-ink); }
.lang-btn:not(.active):hover { color: var(--text); }

/* Header sağ (dil + kullanıcı/çıkış) */
.header-right { display: flex; align-items: center; gap: 0.875rem; }
.user-box { display: flex; align-items: center; gap: 0.625rem; }
.user-email {
  font-size: 0.8125rem; color: var(--text-dim);
  max-width: 13rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===================== AUTH MODAL ===================== */
.auth-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.auth-overlay[hidden] { display: none; }
.auth-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 24rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-lg);
  animation: authCardIn 0.25s var(--ease-out);
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 2rem; height: 2rem;
  background: rgba(17, 24, 39, 0.05); border: 1px solid var(--border);
  border-radius: 0.5rem; color: var(--text-dim); cursor: pointer;
  font-size: 0.9rem; display: grid; place-items: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.auth-modal-close:hover { color: var(--text); background: rgba(17, 24, 39, 0.09); }
.auth-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.3rem; font-weight: 700; margin-bottom: 1.25rem;
}
.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.1rem; }
.auth-tab {
  flex: 1; padding: 0.55rem; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim);
  border-radius: 0.5rem; font-weight: 600; cursor: pointer;
}
.auth-tab.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.auth-form { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-form input {
  padding: 0.7rem 0.85rem; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 0.5rem;
  color: var(--text); font-size: 0.9rem;
}
.auth-form input:focus { outline: none; border-color: var(--primary); }
.auth-error { color: var(--danger-text); font-size: 0.8125rem; }
.auth-error[hidden] { display: none; }
#auth-submit { width: 100%; margin-top: 0.4rem; padding: 0.7rem; }

/* Şifremi unuttum */
.auth-forgot-link { text-align: center; margin-top: 0.3rem; }
.auth-forgot-link a {
  color: var(--text-dim); font-size: 0.8125rem; text-decoration: none;
  transition: color 0.15s;
}
.auth-forgot-link a:hover { color: var(--primary-hover); }
.auth-forgot-title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem;
}
.auth-forgot-desc {
  color: var(--text-dim); font-size: 0.8125rem; line-height: 1.5;
  margin-bottom: 0.5rem;
}
.auth-success {
  color: var(--accent-text); font-size: 0.8125rem;
  background: var(--accent-tint); border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: 0.5rem; padding: 0.6rem 0.75rem;
}
.auth-success[hidden] { display: none; }
.auth-back-link { text-align: center; margin-top: 0.3rem; }
.auth-back-link a {
  color: var(--text-dim); font-size: 0.8125rem; text-decoration: none;
  transition: color 0.15s;
}
.auth-back-link a:hover { color: var(--primary-hover); }
#forgot-submit { width: 100%; padding: 0.7rem; }
.auth-reset-success {
  color: var(--accent-text); font-size: 0.875rem; font-weight: 500;
  background: var(--accent-tint); border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: 0.5rem; padding: 0.7rem 0.85rem; text-align: center;
  margin-top: 0.5rem;
}
.auth-reset-success[hidden] { display: none; }

/* E-posta doğrulama uyarı bandı */
.verify-banner {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  background: linear-gradient(90deg, var(--hazard-hover), var(--hazard));
  color: var(--hazard-ink); font-size: 0.8125rem; font-weight: 500;
  padding: 0.5rem 1rem; position: sticky; top: 0; z-index: 101;
}
.verify-banner button {
  background: rgba(17, 24, 39, 0.12); color: var(--hazard-ink); border: 1px solid rgba(17, 24, 39, 0.25);
  border-radius: 0.375rem; padding: 0.25rem 0.75rem; font-size: 0.75rem;
  font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.verify-banner button:hover { background: rgba(17, 24, 39, 0.18); }
.verify-banner button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Plan & kullanım modalı */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(17, 24, 39, 0.4); padding: 1.5rem;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 40rem; max-height: 90vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-head h3 { font-size: 1.15rem; }
.modal-close {
  background: transparent; border: none; color: var(--text-dim); font-size: 1.2rem; cursor: pointer;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; margin: -0.6rem -0.6rem -0.6rem 0;
}
.modal-close:hover { color: var(--text); }
.billing-usage { font-size: 0.9rem; margin-bottom: 0.4rem; }
.billing-bar { height: 0.5rem; background: var(--bg-2); border-radius: 0.25rem; overflow: hidden; margin: 0.4rem 0 1rem; }
.billing-bar > div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.billing-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 560px) { .billing-plans { grid-template-columns: 1fr; } }
.plan-card { border: 1px solid var(--border); border-radius: 0.625rem; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.plan-card h4 { font-size: 1rem; }
.plan-card .price { color: var(--text-dim); font-size: 0.8125rem; }
.plan-card ul { list-style: none; font-size: 0.78rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 0.2rem; margin: 0.3rem 0; }
.plan-card .btn { margin-top: auto; }
.plan-current-tag { font-size: 0.75rem; color: var(--accent-text); font-weight: 600; }
.billing-note { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.8rem; }

/* Yüklemelerim listesi */
.loadings-list { display: flex; flex-direction: column; gap: 0.5rem; }
.recent-packs-section { margin-bottom: 1.2rem; }
.loadings-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin: 0 0 0.55rem; }
.loadings-section-head h4 { font-size: 0.85rem; }
.loadings-section-head span { font-size: 0.72rem; color: var(--text-dim); }
.saved-loadings-head { padding-top: 0.85rem; border-top: 1px solid var(--border); }
.loading-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  border: 1px solid var(--border); border-radius: 0.625rem; padding: 0.7rem 0.9rem;
}
.loading-meta { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.loading-meta strong { font-size: 0.95rem; }
.loading-meta span { font-size: 0.78rem; color: var(--text-dim); }
.loading-acts { display: flex; gap: 0.4rem; flex-shrink: 0; }
.loadings-empty { font-size: 0.85rem; color: var(--text-dim); text-align: center; padding: 1rem 0; }

/* Admin / veri analitik */
.admin-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 0.9rem; }
.admin-kpis > div { border: 1px solid var(--border); border-radius: 0.625rem; padding: 0.6rem; text-align: center; }
.admin-kpis b { display: block; font-size: 1.25rem; }
.admin-kpis span { font-size: 0.72rem; color: var(--text-dim); }
.admin-actions { margin-bottom: 0.9rem; }
.admin-worst-h { font-size: 0.85rem; color: var(--text-dim); margin: 0.3rem 0 0.5rem; }
.admin-worst { display: flex; flex-direction: column; gap: 0.4rem; }
.admin-fb-h { font-size: 0.85rem; color: var(--text-dim); margin: 1rem 0 0.5rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
.admin-fb { display: flex; flex-direction: column; gap: 0.5rem; }
.fb-item { border: 1px solid var(--border); border-radius: 0.625rem; padding: 0.6rem 0.8rem; }
.fb-item-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.fb-stars { color: var(--hazard-text); font-size: 0.9rem; letter-spacing: 1px; }
.fb-item-meta { font-size: 0.72rem; color: var(--text-dim); }
.fb-item-text { font-size: 0.85rem; margin-top: 0.3rem; white-space: pre-wrap; }

/* Geri bildirim formu */
.fb-desc { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.fb-rating { display: flex; gap: 0.2rem; margin-bottom: 0.8rem; }
.fb-star {
  background: none; border: none; cursor: pointer; font-size: 1.6rem; line-height: 1; color: var(--border-strong);
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; padding: 0;
}
.fb-star.on { color: var(--hazard-text); }
#fb-text { width: 100%; min-height: 6rem; resize: vertical; background: var(--bg-2); border: 1px solid var(--border); border-radius: 0.5rem; color: var(--text); padding: 0.6rem 0.7rem; font: inherit; }
.fb-msg { font-size: 0.82rem; color: var(--accent-text); min-height: 1.1rem; margin: 0.5rem 0; }

/* Layout */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) 1.3fr;
  gap: 1.375rem;
  padding: 1.5rem 1.75rem;
  max-width: 87.5rem;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
}

/* ===== Çalışma alanı: tam ekran viewer + soldan açılan çekmeceler ===== */
.workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Sol dikey ray — panel tetikleyicileri (opak yüzen panel) */
.side-rail {
  position: absolute;
  top: 1rem; left: 1rem; bottom: 1rem;
  width: 4.5rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 0.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.25rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  background: rgba(17, 24, 39, 0.03);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .rail-btn:hover {
    color: var(--text);
    background: rgba(17, 24, 39, 0.06);
    transform: translateY(-2px);
  }
}
.rail-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--primary-ink);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}
.rail-ico { font-size: 1.35rem; line-height: 1; }
.rail-txt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.3px; }

/* Soldan kayan çekmece — opak yüzen kart */
.drawer {
  position: absolute;
  top: 1rem; bottom: 1rem;
  left: 6.25rem;
  width: min(26rem, calc(100% - 7.25rem));
  z-index: 30;
  overflow-y: auto;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: translateX(-120%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s var(--ease-out), visibility 0.25s;
}
.drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.drawer-close {
  position: absolute;
  top: 0.4rem; right: 0.4rem;
  z-index: 1;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
}
.drawer-close:hover { color: var(--text); border-color: var(--primary); }
/* Çekmece içindeki panel kartı: çerçeveyi tekrar etmesin */
.drawer .panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

@media (max-width: 640px) {
  .side-rail { width: 3.4rem; padding: 0.5rem 0.35rem; }
  .drawer { left: 3.4rem; width: calc(100% - 3.4rem); }
}

/* Telefon: header tek satıra sığmıyor → sarmalı yap, ölçüleri sıkılaştır */
@media (max-width: 640px) {
  .app-header {
    flex-wrap: wrap; row-gap: 0.5rem;
    padding: 0.7rem 0.9rem;
  }
  .header-right {
    flex-wrap: wrap; justify-content: flex-end;
    gap: 0.4rem 0.5rem; flex: 1 1 100%;
  }
  .user-box { flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
  .user-email { max-width: 10rem; font-size: 0.72rem; }
  .header-right .btn-sm { padding: 0.35rem 0.55rem; font-size: 0.78rem; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .brand-title { font-size: 1.05rem; }
  .layout { padding: 1rem 0.75rem; }
  .panel { padding: 1rem; min-width: 0; }     /* grid çocuğu içeriğe göre taşmasın */
  .panel > * { min-width: 0; }
  .app-footer { padding: 0.7rem 0.9rem; flex-wrap: wrap; gap: 0.5rem; }
}

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.375rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-head h2 { font-size: 1rem; font-weight: 700; }
.panel-desc { font-size: 0.8125rem; color: var(--text-dim); margin-top: 0.25rem; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field label {
  font-size: 0.7812rem;
  font-weight: 500;
  color: var(--text-dim);
}

input[type="text"],
input[type="number"],
select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 0.5625rem;
  color: var(--text);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 108, 245, 0.22);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }

.preset-row { display: flex; gap: 0.5rem; align-items: stretch; }
.preset-row select { flex: 1; min-width: 0; }
.preset-row .btn { flex-shrink: 0; }

/* Hesaplama ilerleme barı — app-ui akışında footer'ın hemen üstünde. */
.pack-progress {
  position: relative;
  flex: none;
  width: 100%;
  height: 2.125rem;
  background: var(--panel); border-top: 1px solid var(--border);
  z-index: 60; overflow: hidden; display: flex; align-items: center;
}
/* display:flex, hidden özniteliğinin varsayılan display:none'ını ezdiği için
   gizleme açıkça geri verilmeli — yoksa bar hesaplama bitince kaybolmaz. */
.pack-progress[hidden] { display: none; }
.pack-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: transform 0.25s ease; opacity: 0.9;
}
.pack-progress-label {
  position: relative; z-index: 1; padding-left: 0.875rem;
  font-size: 0.7812rem; font-weight: 600; color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

.color-row { display: flex; align-items: center; gap: 0.625rem; }
.color-row input[type="color"] {
  width: 3rem; height: 2.125rem; padding: 0.125rem;
  border: 1px solid var(--border); border-radius: 0.5rem;
  background: var(--panel-2); cursor: pointer; flex-shrink: 0;
}
.color-row .btn { flex-shrink: 0; }
.color-hint { font-size: 0.7188rem; color: var(--text-dim); }
.container-actions { display: flex; justify-content: flex-end; }

.axle-editor {
  border-block: 1px solid var(--border);
  padding-block: 0.125rem;
}
.axle-editor > summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.axle-editor > summary::-webkit-details-marker { display: none; }
.axle-editor > summary::after {
  content: "⌄";
  margin-left: auto;
  color: var(--text-dim);
  transition: transform 0.18s var(--ease-out);
}
.axle-editor[open] > summary::after { transform: rotate(180deg); }
.optional-label {
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  color: var(--text-dim);
  font-size: 0.6875rem;
  font-weight: 600;
}
.axle-editor-body {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 0.25rem 0 1rem;
}
.axle-disclaimer {
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--hazard-tint);
  color: var(--hazard-ink);
  font-size: 0.75rem;
  line-height: 1.5;
}
.axle-list-head,
.axle-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.axle-list-head > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.axle-list-head strong,
.axle-row-title { font-size: 0.7812rem; }
.axle-list-head span { color: var(--text-dim); font-size: 0.6875rem; }
.axle-rows { display: flex; flex-direction: column; }
.axle-row {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--border);
}
.axle-row:last-child { padding-bottom: 0; }
.axle-row-remove {
  border: none;
  background: transparent;
  color: var(--danger-text);
  font: inherit;
  font-size: 0.7188rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem;
}
.axle-row-remove:hover { text-decoration: underline; }
.axle-row-remove:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 0.125rem;
  border-radius: var(--radius-xs);
}

.check-field { justify-content: flex-end; }
.check-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}
.check-field-grid .check { padding-bottom: 0.375rem; }
.check {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; color: var(--text);
  cursor: pointer;
  padding-bottom: 0.625rem;
}
.check input { width: 1rem; height: 1rem; accent-color: var(--primary); cursor: pointer; }

/* Stats */
.stat-row { display: flex; gap: 0.75rem; margin-top: 0.25rem; }
.stat {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}
.stat-label { font-size: 0.7188rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.025rem; }
.stat-value { font-size: 1rem; font-weight: 700; }

/* Buttons */
.btn {
  border: none;
  border-radius: 0.5625rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6875rem 1.125rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-danger { background: var(--danger-tint); color: var(--danger-text); border: 1px solid rgba(213, 81, 77, .3); }
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn:focus-visible { outline: 3px solid rgba(29, 108, 245, .35); outline-offset: 2px; }

.product-form { display: flex; flex-direction: column; gap: 0.75rem; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0.625rem; }
.product-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.product-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.7188rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.025rem;
  padding: 0.625rem 0.75rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.product-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.product-table tr:last-child td { border-bottom: none; }
.empty-row td { text-align: center; color: var(--text-dim); padding: 1.375rem; }

.color-dot {
  width: 1rem; height: 1rem;
  border-radius: 0.3125rem;
  display: inline-block;
}

.row-del {
  background: transparent;
  border: none;
  color: var(--danger-text);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}
.row-del:hover { background: var(--danger-tint); }

.product-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1.125rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
  padding: 0.75rem 0.875rem;
  background: var(--bg-2);
  border-radius: 0.625rem;
  border: 1px solid var(--border);
}
.product-summary strong { color: var(--text); }

/* Viewer */
.viewer-panel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem 0.75rem 6rem;   /* sol: yüzen raydan sonra başlar */
  gap: 0.6rem;
  min-height: 0;
  overflow: hidden;   /* panel her zaman workspace'e sığsın, scroll gerekmesin */
}
.viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  flex: none;
}
.viewer-head h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.3px; }
.viewer-kpis { display: flex; gap: 0.75rem; }
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 6.5rem;
  box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.kpi-value { font-size: 1.15rem; font-weight: 700; color: var(--text); }

.viewer-body {
  display: grid;
  grid-template-columns: 1fr 21rem;
  gap: 1.25rem;
  flex: 1;
  min-height: 0;
}
@media (max-width: 920px) {
  /* Tek sütuna inince canvas-col ve side-col alt alta yığılır. viewer-body
     yüksekliği sabit olduğundan grid iki satırı EŞİT (yarı yükseklik) bölüştürür;
     canvas-host'un min yüksekliği + araç çubukları hücreye sığmayıp alttaki
     side-col satırına taşıp unplaced kutusuyla çakışıyordu. Satırları içeriğe
     göre boyutlayıp üstten hizala ve paneli dikey kaydırılabilir yap. */
  .viewer-panel { overflow-y: auto; }
  .viewer-body {
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    align-content: start;
  }
  .canvas-host { min-height: 55vh; }
}

.canvas-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 0.1875rem;
}
.canvas-host {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 18rem;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #e9edf2 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.canvas-host canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Kısa ekranlarda düzenleme/elle yerleştirme araçları 3B alanın altında
   taşmasın. Sütun kaydırılabilir kaldığı için hiçbir kontrol footer altında
   erişilemez duruma düşmez. */
@media (max-height: 800px) {
  .canvas-host { min-height: max(9rem, 24vh); }
  .viewer-panel.seed-mode-active .canvas-host { min-height: max(8rem, 20vh); }
}

/* ---- E-posta doğrulama uyarı bandı ---- */
.verify-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  background: var(--hazard);
  color: var(--hazard-ink);
  font-size: 0.875rem;
  font-weight: 500;
}
.verify-banner button {
  border: 1px solid rgba(17, 24, 39, 0.3);
  background: rgba(17, 24, 39, 0.12);
  color: var(--hazard-ink);
  padding: 0.25rem 0.7rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.verify-banner button:hover { background: rgba(17, 24, 39, 0.18); }
.verify-banner button:disabled { opacity: 0.6; cursor: default; }

/* ---- 3D yön küpü (sağ üst) — sürükleyerek döndür, yüze tıkla ---- */
.viewcube {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 5;
  user-select: none;
  touch-action: none;
}
.vc-stage {
  width: 64px;
  height: 64px;
  perspective: 300px;
  cursor: grab;
}
.vc-stage.dragging { cursor: grabbing; }
.vc-cube {
  position: relative;
  width: 64px;
  height: 64px;
  transform-style: preserve-3d;
  /* başlangıç izometrik açısı (JS sürükleyince güncellenir) */
  transform: rotateX(-26deg) rotateY(-38deg);
}
.vc-face {
  position: absolute;
  top: 0; left: 0;
  width: 64px;
  height: 64px;
  margin: 0;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.vc-face:hover { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.vc-face[data-edge-hover] { border-color: var(--accent); }
.vc-face[data-edge-hover="left"]   { box-shadow: inset 6px 0 0 rgba(22, 163, 74, 0.9); }
.vc-face[data-edge-hover="right"]  { box-shadow: inset -6px 0 0 rgba(22, 163, 74, 0.9); }
.vc-face[data-edge-hover="top"]    { box-shadow: inset 0 6px 0 rgba(22, 163, 74, 0.9); }
.vc-face[data-edge-hover="bottom"] { box-shadow: inset 0 -6px 0 rgba(22, 163, 74, 0.9); }
.vc-top    { transform: rotateX(90deg) translateZ(32px); }
.vc-bottom { transform: rotateX(-90deg) translateZ(32px); }
.vc-front  { transform: translateZ(32px); }
.vc-back   { transform: rotateY(180deg) translateZ(32px); }
.vc-right  { transform: rotateY(90deg) translateZ(32px); }
.vc-left   { transform: rotateY(-90deg) translateZ(32px); }

.playback {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  padding: 0.625rem 0.875rem;
}
.icon-btn {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.5rem;
  border: none;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.875rem;
  cursor: pointer;
  flex-shrink: 0;
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--primary-hover); }
#step-slider { flex: 1; accent-color: var(--primary); cursor: pointer; }
.step-counter { font-size: 0.8125rem; color: var(--text-dim); font-variant-numeric: tabular-nums; min-width: 3.5rem; text-align: center; }
.step-desc {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  padding: 0.55rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--text);
}
.step-desc .step-desc-num {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 1.5rem; height: 1.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.7rem; font-weight: 700;
}
.step-desc .step-desc-text strong { color: var(--text); }
.btn-sm { padding: 0.4375rem 0.75rem; font-size: 0.7812rem; }
.view-hint { font-size: 0.75rem; color: var(--text-dim); text-align: center; }
.playback .view-hint { margin-left: auto; white-space: nowrap; font-size: 0.7rem; }
@media (max-width: 1100px) { .playback .view-hint { display: none; } }
.edit-hint { color: var(--hazard-text); }
#edit-toggle.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.edit-toolbar {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  justify-content: center; padding: 0.4rem 0.5rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 0.5rem;
}
.edit-tb-label { font-size: 0.78rem; color: var(--text-dim); margin-right: 0.2rem; }
/* hidden attribute, sınıfın display:flex'ini ezmeli (UA [hidden] kuralı yetmiyor) */
.edit-toolbar[hidden], .seed-toolbar[hidden] { display: none !important; }
.seed-toolbar {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  justify-content: center; padding: 0.4rem 0.5rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 0.5rem;
}
.seed-select {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 0.4rem; padding: 0.25rem 0.4rem; font-size: 0.8rem; max-width: 220px;
}
.seed-count {
  min-width: 1.6rem; text-align: center; font-weight: 700; font-size: 0.85rem;
  color: var(--text); background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 0.4rem; padding: 0.15rem 0.4rem;
}
.edit-toast {
  position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%) translateY(1rem);
  z-index: 60; background: var(--hazard); color: var(--hazard-ink); font-size: 0.85rem; font-weight: 600;
  padding: 0.6rem 1rem; border-radius: 0.5rem; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.edit-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.side-col { display: flex; flex-direction: column; gap: 1rem; min-height: 0; overflow-y: auto; padding-right: 0.25rem; }
.info-card, .stats-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.util-value { font-size: 2.4rem; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.info-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; font-size: 0.9rem; }
.info-dot { width: 0.875rem; height: 0.875rem; border-radius: 0.25rem; background: #888; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1rem; font-size: 0.78rem; }
.info-grid > div { display: flex; flex-direction: column; gap: 0.15rem; }
.info-grid span { color: var(--text-dim); font-size: 0.7rem; }
.info-grid b { font-weight: 600; color: var(--text); }

/* Rozetler (Badges) */
.badge {
  padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.badge-loaded { background: var(--accent-tint); color: var(--accent-text); border: 1px solid rgba(22, 163, 74, 0.35); }
.badge-pending { background: rgba(107, 114, 128, 0.12); color: var(--text-dim); border: 1px solid rgba(107, 114, 128, 0.3); }

.steps-head {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .step-item:hover { border-color: rgba(29, 108, 245, 0.4); transform: translateX(3px); background: rgba(29, 108, 245, 0.05); }
}
.step-item.active { border-color: var(--primary); background: var(--primary-tint); }
.step-num {
  width: 1.75rem; height: 1.75rem;
  border-radius: 0.5rem;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700;
  color: var(--primary-ink);
  flex-shrink: 0;
}
.step-info { display: flex; flex-direction: column; gap: 0.0625rem; min-width: 0; }
.step-name { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-meta { font-size: 0.6875rem; color: var(--text-dim); }

.placed-summary {
  flex: none;
  background: var(--accent-tint);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
}
.placed-summary .steps-head { margin-bottom: 0; }
.placed-list {
  list-style: none;
  margin: 0.625rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 8rem;
  overflow-y: auto;
}
.placed-list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-dim);
}
.placed-list .color-dot { flex: 0 0 auto; }
.placed-list .placed-qty { color: var(--accent-text); font-weight: 700; flex: 0 0 auto; }
.placed-list .placed-name { color: var(--text); font-weight: 500; }

.headroom-hint {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-dim);
}
.headroom-list {
  list-style: none;
  margin: 0.625rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 10rem;
  overflow-y: auto;
}
.headroom-list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
}
.headroom-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.headroom-dims { color: var(--text-dim); font-size: 0.75rem; }

.unplaced-warn {
  flex: none;
  background: var(--danger-tint);
  border: 1px solid rgba(213, 81, 77, 0.35);
  color: var(--danger-text);
  border-radius: 0.625rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
}
.unplaced-warn strong { color: var(--text); }
.unplaced-reason {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  opacity: 0.85;
}
.unplaced-list {
  list-style: none;
  margin: 0.625rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 8rem;
  overflow-y: auto;
}
.unplaced-list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--danger-text);
}
.unplaced-list .color-dot { flex: 0 0 auto; }
.unplaced-list .unplaced-name { color: var(--text); font-weight: 500; }
.unplaced-list .unplaced-dims { color: var(--danger-text); }
.unplaced-list .unplaced-qty { margin-left: auto; color: var(--text); font-weight: 600; }

/* Footer */
.app-footer {
  display: flex;
  flex: none;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 50;
}
.run-action-group { display: flex; align-items: center; gap: 0.75rem; }
.run-settings { position: relative; }
.run-settings > summary { list-style: none; cursor: pointer; }
.run-settings > summary::-webkit-details-marker { display: none; }
.run-settings > summary::after { content: "⌃"; display: inline-block; margin-left: 0.4rem; transition: transform 0.15s var(--ease-out); }
.run-settings[open] > summary::after { transform: rotate(180deg); }
.run-settings-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.6rem);
  width: min(21rem, calc(100vw - 2rem));
  padding: 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.run-settings-menu .field { margin-bottom: 0.75rem; }
.run-settings-menu .field label { display: block; margin-bottom: 0.35rem; font-size: 0.8rem; color: var(--text-dim); }
.run-settings-menu select { width: 100%; }
.packer-capability-note {
  margin: 0;
  max-width: 18rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: right;
}
.packer-capability-note[data-blocked="true"] { color: var(--warning, #b45309); }
.check.is-disabled { opacity: 0.58; }
.run-cache-toggle { padding: 0; font-size: 0.8125rem; }
@media (max-width: 640px) {
  .run-action-group { margin-left: auto; }
  .packer-capability-note { max-width: 12rem; }
  .run-settings-menu { width: min(21rem, calc(100vw - 1.5rem)); }
}

/* Fragile-face 3D picker */
.facepicker {
  display: flex;
  gap: 0.875rem;
  align-items: stretch;
  flex-wrap: wrap;
}
.facepicker-canvas {
  width: 12.5rem;
  height: 11.25rem;
  flex: 0 0 12.5rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--panel-2);
  cursor: pointer;
  touch-action: none;
  overflow: hidden;            /* clip the WebGL canvas to the rounded box */
  position: relative;
}
.facepicker-canvas canvas {
  display: block;
  width: 100% !important;      /* never exceed the box (guards devicePixelRatio) */
  height: 100% !important;
  border-radius: 0.625rem;
}
.facepicker-info {
  flex: 1 1 13.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  min-width: 13.75rem;
}
.facepicker-row { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; }
.facepicker-sel-label { color: var(--muted); font-size: 0.8125rem; }
#facepicker-label { color: var(--text); font-size: 0.875rem; }
.facepicker-hint { color: var(--muted); font-size: 0.75rem; line-height: 1.45; }
.facepicker-top { margin-top: 0.25rem; }
.frag-badge { cursor: help; filter: saturate(1.3); }
.drop-badge { cursor: help; color: var(--text-dim); font-size: 0.6875rem; }
.first-badge { cursor: help; font-size: 0.6875rem; }

/* Product form action row (Save + Add) */
.product-actions { display: flex; gap: 0.75rem; }
.product-actions .btn { flex: 1 1 auto; }
.product-actions .btn-ghost { flex: 0 0 auto; }

/* Multi-vehicle truck tabs */
.truck-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.625rem;
}
.truck-tab {
  padding: 0.375rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.truck-tab:hover { color: var(--text); }
.truck-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

/* Excel import/template toolbar */
.excel-tools {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}
.excel-tools .btn { text-decoration: none; }
.excel-status { color: var(--muted); font-size: 0.8125rem; }


/* ==================== APP UI WRAPPER ==================== */
.app-ui { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.app-ui[hidden] { display: none !important; }

/* ===================== LANDING PAGE ===================== */
.landing-page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
.landing-page[hidden] { display: none !important; }

/* --- Navbar --- */
.lp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  height: 4.5rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, box-shadow 0.3s;
}
.lp-nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}
.lp-logo {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  text-decoration: none; letter-spacing: -0.01em;
  flex-shrink: 0;
}
.lp-nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.lp-nav-link {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  padding: 0.45rem 1rem; border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
}
.lp-nav-link:hover { color: var(--text); background: rgba(17, 24, 39, 0.05); }
.lp-nav-actions { display: flex; align-items: center; gap: 0.875rem; flex-shrink: 0; }
.lp-lab-link {
  display: inline-flex; align-items: center;
  color: var(--text); background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: 0.5625rem;
  font-size: 0.9rem; font-weight: 600; line-height: 1;
  padding: 0.55rem 0.85rem; text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.lp-lab-link:hover { color: var(--primary-hover); border-color: var(--primary); background: var(--primary-tint); }
.lp-lab-link:focus-visible,
.header-lab-link:focus-visible { outline: 3px solid rgba(29, 108, 245, 0.22); outline-offset: 2px; }
.header-lab-link { display: inline-flex; align-items: center; text-decoration: none; }
.lp-login-btn {
  position: relative;
  background: var(--primary); color: var(--primary-ink);
  border: none; border-radius: 0.5625rem;
  font-size: 0.9rem; font-weight: 600;
  padding: 0.55rem 1.5rem; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.lp-login-btn::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.lp-login-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.lp-login-btn:hover::after { opacity: 1; }

/* Hamburger (mobile only) */
.lp-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0.4rem;
}
.lp-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-dim); border-radius: 2px;
  transition: all 0.25s;
}
.lp-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.lp-hamburger.open span:nth-child(2) { opacity: 0; }
.lp-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav Drawer */
.lp-mobile-nav {
  display: none;
  flex-direction: column; gap: 0.5rem;
  position: fixed; top: 4.5rem; left: 0; right: 0; z-index: 199;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.5rem;
  transform: translateY(-110%); opacity: 0;
  transition: transform 0.25s var(--ease-out), opacity 0.25s;
}
.lp-mobile-nav.open { transform: translateY(0); opacity: 1; }

/* --- Hero Section --- */
.lp-hero {
  position: relative;
  display: flex; align-items: center;
  min-height: 100vh; padding: 4.5rem 2.5rem 3rem;
  overflow: hidden;
  background: #ffffff;
}
.lp-hero-glow-1 {
  position: absolute; left: -10%; top: 20%;
  width: 55%; height: 70%;
  background: radial-gradient(ellipse, rgba(29, 108, 245, 0.08) 0%, transparent 65%);
  pointer-events: none;
}
.lp-hero-glow-2 {
  position: absolute; right: 0; top: 10%;
  width: 50%; height: 80%;
  background: radial-gradient(ellipse, rgba(22, 163, 74, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
.lp-hero-content {
  position: relative; z-index: 2;
  flex: 0 0 50%; max-width: 50%;
  padding-right: 2rem;
}
.lp-hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--primary-tint);
  border: 1px solid rgba(29, 108, 245, 0.3);
  border-radius: 999px; padding: 0.35rem 0.9rem;
  font-size: 0.8rem; font-weight: 600;
  color: var(--primary); margin-bottom: 1.5rem;
}
.lp-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s linear infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}
.lp-hero-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.lp-hero-sub {
  font-size: 1.05rem; color: var(--text-dim); line-height: 1.65;
  margin-bottom: 2rem; max-width: 32rem;
}
.lp-hero-cta { display: flex; gap: 1rem; align-items: center; margin-bottom: 2.5rem; flex-wrap: wrap; }
.lp-btn-primary {
  position: relative;
  background: var(--primary); color: var(--primary-ink);
  border: none; border-radius: 0.625rem;
  font-size: 1rem; font-weight: 700;
  padding: 0.875rem 2rem; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}
.lp-btn-primary::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.lp-btn-primary:hover {
  background: var(--primary-hover); transform: translateY(-2px);
}
.lp-btn-primary:hover::after { opacity: 1; }
.lp-btn-secondary {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 0.625rem;
  font-size: 1rem; font-weight: 600;
  padding: 0.875rem 2rem; cursor: pointer;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.lp-btn-secondary:hover {
  background: var(--panel-2); transform: translateY(-2px);
  border-color: var(--text-dim);
}
.lp-btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim); border-radius: 0.5rem;
  font-size: 0.88rem; font-weight: 600;
  padding: 0.65rem 1.5rem; cursor: pointer;
  transition: all 0.15s; width: 100%; margin-top: 0.75rem;
}
.lp-btn-outline:hover {
  background: rgba(17, 24, 39, 0.04);
  border-color: var(--text-dim);
  color: var(--text);
}
.lp-hero-stats { display: flex; align-items: center; gap: 1.25rem; }
.lp-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.lp-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.lp-stat-label { font-size: 0.78rem; color: var(--text-dim); font-weight: 500; }
.lp-stat-divider { width: 1px; height: 2.5rem; background: var(--border-strong); }

/* Hero Visual */
.lp-hero-visual {
  position: relative; z-index: 2;
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 28rem;
  /* hero arka planıyla aynı renk, PNG saydamlığı bu zeminle karışsın diye */
  background: #ffffff;
  border-radius: 1.5rem;
}
.lp-truck-glow {
  position: absolute; inset: -10%;
  background: radial-gradient(ellipse at center, rgba(29, 108, 245, 0.1) 0%, transparent 65%);
  pointer-events: none;
}
.lp-truck-img {
  width: 100%; max-width: 700px; height: auto;
  filter: drop-shadow(0 20px 50px rgba(17, 24, 39, 0.15));
  animation: truckFloat 4s ease-in-out infinite;
  mix-blend-mode: normal;
  background: transparent;
}
@keyframes truckFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.lp-floating-badge {
  position: absolute;
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem; padding: 0.6rem 1rem;
  font-size: 0.83rem; font-weight: 600; color: var(--text);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  animation: badgeFloat 3.5s ease-in-out infinite;
}
.lp-fb-1 { top: 18%; left: 5%; animation-delay: -1s; }
.lp-fb-2 { bottom: 22%; right: 5%; animation-delay: -2.2s; }
@keyframes badgeFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.lp-fb-icon { font-size: 1.1rem; }

/* --- Section Shared --- */
.lp-section-inner {
  max-width: 74rem; margin: 0 auto; padding: 0 2.5rem;
  width: 100%;
}
.lp-section-header { text-align: center; margin-bottom: 3.5rem; }
.lp-section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800; letter-spacing: -0.02em; color: var(--text);
  margin-bottom: 0.75rem;
}
.lp-section-sub { font-size: 1rem; color: var(--text-dim); max-width: 38rem; margin: 0 auto; line-height: 1.6; }

/* --- Features Section --- */
.lp-features {
  padding: 6rem 0; background: var(--bg);
}
.lp-features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.lp-feature-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.25rem; padding: 2rem;
  transition: transform 0.25s, border-color 0.25s;
}
.lp-feature-card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.lp-feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}
.lp-feature-card:hover::after { opacity: 1; }
.lp-feature-card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  margin: 1rem 0 0.6rem;
}
.lp-feature-card p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.65; margin-bottom: 1.25rem; }
.lp-feature-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 0.75rem;
  display: grid; place-items: center;
}
.lp-icon-blue, .lp-icon-purple { background: var(--primary-tint); color: var(--primary); border: 1px solid rgba(29, 108, 245, 0.25); }
.lp-icon-green { background: var(--accent-tint); color: var(--accent-text); border: 1px solid rgba(22, 163, 74, 0.25); }

/* --- Plans Grid (Pricing section) --- */
.lp-plans-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.lp-plan-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.25rem; padding: 1.75rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: transform 0.25s, border-color 0.25s;
}
.lp-plan-card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.lp-plan-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.lp-plan-card:hover::after { opacity: 1; }
/* Öne çıkan ("Professional") plan — stitch referansındaki koyu lacivert vurgu bandı.
   --text/--text-dim yerel olarak override edilir: içindeki TÜM alt elemanlar
   (başlık, fiyat, açıklama, özellik listesi) otomatik açık renge döner. */
.lp-plan-card.lp-plan-popular {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: var(--shadow-md);
  --text: var(--navy-ink);
  --text-dim: var(--navy-ink-dim);
  --accent-text: #4ade80;
}
.lp-plan-card.lp-plan-popular::after {
  box-shadow: var(--shadow-lg);
}
.lp-popular-tag {
  display: inline-block;
  background: var(--primary); color: var(--primary-ink);
  border-radius: 999px; padding: 0.2rem 0.75rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  margin-bottom: 0.25rem; align-self: flex-start;
}
.lp-plan-header {
  display: flex; align-items: center; gap: 0.75rem;
}
.lp-plan-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.lp-plan-desc { font-size: 0.83rem; color: var(--text-dim); line-height: 1.55; }
.lp-plan-price-desc { font-size: 0.83rem; color: var(--text-dim); }
.lp-price {
  display: flex; align-items: baseline; gap: 0.2rem;
  margin: 0.5rem 0 0.25rem;
}
.lp-price-currency { font-size: 1.4rem; font-weight: 700; color: var(--text-dim); }
.lp-price-amount { font-size: 3rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.lp-price-period { font-size: 0.88rem; color: var(--text-dim); }
.lp-feature-list {
  list-style: none; display: flex; flex-direction: column; gap: 0.5rem;
  font-size: 0.83rem; color: var(--text-dim); margin-top: 0.5rem;
}
.lp-feature-list li { display: flex; gap: 0.5rem; align-items: flex-start; }
.lp-feature-list li::before { color: var(--accent-text); flex-shrink: 0; }
.lp-plan-card.lp-plan-popular .lp-btn-primary { width: 100%; margin-top: 0.75rem; text-align: center; }

/* --- Pricing Section --- */
.lp-pricing { padding: 6rem 0; background: var(--bg); }

/* --- Footer --- */
/* Koyu lacivert vurgu bandı — --text/--text-dim/--panel/--border yerel override
   sayesinde logo, tagline, kolon başlıkları, linkler ve sosyal butonlar otomatik
   açık renge döner (aynı teknik öne-çıkan pricing kartında da kullanıldı). */
.lp-footer {
  background: var(--navy);
  border-top: none;
  padding: 4rem 0 0;
  --text: var(--navy-ink);
  --text-dim: var(--navy-ink-dim);
  --panel: var(--navy-2);
  --border: var(--navy-border);
}
.lp-footer-inner {
  display: flex; gap: 4rem; align-items: flex-start; flex-wrap: wrap;
  padding-bottom: 3rem;
}
.lp-footer-brand { flex: 0 0 16rem; }
.lp-footer-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.875rem;
}
.lp-footer-tagline { font-size: 0.83rem; color: var(--text-dim); line-height: 1.6; }
.lp-footer-links { display: flex; gap: 3rem; flex: 1; flex-wrap: wrap; }
.lp-footer-col { display: flex; flex-direction: column; gap: 0.75rem; }
.lp-footer-col h4 { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.lp-footer-col a, .lp-footer-col span {
  font-size: 0.83rem; color: var(--text-dim); text-decoration: none; transition: color 0.15s;
}
.lp-footer-col a:hover { color: var(--text); }
.lp-social { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.lp-social-btn {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 0.5rem; color: var(--text-dim); font-size: 0.78rem; font-weight: 700;
  text-decoration: none; transition: all 0.15s;
}
.lp-social-btn:hover { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.lp-footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 2.5rem;
  display: flex; align-items: center; gap: 1.5rem;
  font-size: 0.78rem; color: var(--text-dim); max-width: 74rem; margin: 0 auto; width: 100%;
}
.lp-footer-bottom a { color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.lp-footer-bottom a:hover { color: var(--text); }
.lp-footer-copy { margin-left: auto; }
.lp-footer-contact-link { color: var(--text-dim); text-decoration: none; }

/* --- Landing page responsive --- */
@media (max-width: 1024px) {
  .lp-hero-content { flex: 0 0 55%; max-width: 55%; }
  .lp-features-grid { grid-template-columns: 1fr 1fr; }
  .lp-plans-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .lp-nav { padding: 0 1.25rem; }
  .lp-nav-links { display: none; }
  .lp-hamburger { display: flex; }
  .lp-mobile-nav { display: flex; }
  .lp-nav-actions .lang-switch { display: none; }
  .lp-nav-actions .lp-lab-link { display: none; }
  .lp-nav-actions .lp-login-btn { display: none; }
  .lp-hero { flex-direction: column; padding: 6rem 1.5rem 3rem; text-align: center; min-height: auto; }
  .lp-hero-content { flex: none; max-width: 100%; padding: 0; }
  .lp-hero-cta { justify-content: center; }
  .lp-hero-stats { justify-content: center; }
  .lp-hero-visual { min-height: 18rem; width: 100%; }
  .lp-truck-img { max-width: 90%; }
  .lp-fb-1, .lp-fb-2 { display: none; }
  .lp-section-inner { padding: 0 1.25rem; }
  .lp-features { padding: 4rem 0; }
  .lp-features-grid { grid-template-columns: 1fr; }
  .lp-plans-grid { grid-template-columns: 1fr; }
  .lp-pricing { padding: 4rem 0; }
  .lp-footer-inner { flex-direction: column; gap: 2rem; }
  .lp-footer-brand { flex: none; }
  .lp-footer-links { gap: 2rem; }
}

/* --- Hareket hassasiyeti: animasyon/transition'ları neredeyse anlık yap --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
