/* ============================================================
   Omni — Tasarım Sistemi
   Light · Monokrom (siyah-beyaz) · Modern SaaS
   ============================================================ */

/* ---- 1. Tasarım jetonları (design tokens) ---- */
:root {
  /* Yüzeyler */
  --bg:            #f6f6f7;
  --surface:       #ffffff;
  --surface-2:     #fafafa;
  --surface-3:     #f2f2f3;

  /* Kenarlıklar */
  --border:        #ececed;
  --border-strong: #e2e2e4;
  --border-input:  #d9d9dc;

  /* Metin */
  --text:          #0a0a0a;
  --text-2:        #565660;
  --muted:         #8b8b94;
  --faint:         #b4b4bb;

  /* Siyah aksiyon rengi */
  --ink:           #111113;
  --ink-hover:     #000000;
  --on-ink:        #ffffff;

  /* Durum tonları (yalnızca küçük vurgular için) */
  --success:       #0f9d58;
  --success-bg:    #e9f7ef;
  --warning:       #b45309;
  --warning-bg:    #fdf3e7;
  --danger:        #dc2626;
  --danger-bg:     #fdecec;
  --info:          #2563eb;
  --info-bg:       #eaf1fe;
  --accent:        #7c3aed;
  --accent-bg:     #f2edfe;

  /* Yarıçap */
  --r-xs: 5px;
  --r-sm: 7px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Gölge */
  --shadow-xs: 0 1px 2px rgba(15, 15, 20, 0.04);
  --shadow-sm: 0 1px 2px rgba(15, 15, 20, 0.05), 0 1px 3px rgba(15, 15, 20, 0.05);
  --shadow:    0 2px 4px rgba(15, 15, 20, 0.04), 0 4px 12px rgba(15, 15, 20, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 15, 20, 0.10), 0 2px 6px rgba(15, 15, 20, 0.06);
  --ring:      0 0 0 3px rgba(17, 17, 19, 0.12);
  /* Lucide "x" — mask olarak kullanılır (renk background-color'dan gelir, tek kaynak). */
  --icon-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");

  /* Ölçü */
  --sidebar-w: 258px;
  --topbar-h: 62px;

  /* İkon + metin satırlarında optik hizalama nudge'ı (em ile ölçeklenir) */
  --icon-nudge: 0.045em;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Menlo', monospace;
}

/* ---- 2. Sıfırlama ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}
h1, h2, h3, h4, h5 { font-weight: 640; letter-spacing: -0.014em; line-height: 1.25; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
img { display: block; max-width: 100%; }
svg { max-width: 100%; vertical-align: middle; }
svg { flex-shrink: 0; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
::selection { background: rgba(17,17,19,0.12); }

/* İnce kaydırma çubuğu */
* { scrollbar-width: thin; scrollbar-color: #d0d0d4 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #d5d5d9; border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #bcbcc2; background-clip: content-box; }

/* ---- 3. Uygulama iskeleti ---- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 40;
}
.sidebar__brand {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; letter-spacing: -0.03em;
}
.brand-name { font-weight: 680; font-size: 16px; letter-spacing: -0.02em; }
.brand-name span { color: var(--faint); font-weight: 500; }

/* Gerçek marka logosu (BEFOMNI). Yatay 4:1 wordmark — yüksekliği sabitle, en otomatik.
   Kenar çubuğunda 26px, giriş ekranında 44px. object-fit ile hiç bozulmaz. */
.brand-logo { height: 26px; width: auto; display: block; object-fit: contain; }
.auth__brand .brand-logo { height: 44px; }
.sidebar__brand { text-decoration: none; }

.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav__section { margin-bottom: 4px; }
.nav__label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--faint); padding: 14px 12px 6px;
}
.nav__link {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 520; font-size: 13.5px;
  position: relative; transition: background .12s, color .12s;
}
.nav__link + .nav__link { margin-top: 3px; }
.nav__link svg { color: var(--muted); transition: color .12s; }
.nav__link:hover { background: var(--surface-3); color: var(--text); }
.nav__link:hover svg { color: var(--text-2); }
.nav__link.is-active { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-xs); }
.nav__link.is-active svg { color: var(--on-ink); }
.nav__badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--surface-3); color: var(--text-2);
  padding: 1px 7px; border-radius: var(--r-full); min-width: 20px; text-align: center;
}
.nav__link.is-active .nav__badge { background: rgba(255,255,255,0.18); color: #fff; }

.sidebar__foot { border-top: 1px solid var(--border); padding: 12px; flex-shrink: 0; }
.userchip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--r-sm); width: 100%; text-align: left;
  transition: background .12s;
}
.userchip:hover { background: var(--surface-3); }
.userchip__meta { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1px; line-height: 1.3; }
.userchip__name { font-weight: 580; font-size: 13px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip__mail { font-size: 11.5px; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 4. Ana içerik ---- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
}
.topbar__title { display: flex; flex-direction: column; }
.topbar__title h1 { font-size: 16px; font-weight: 640; }
.topbar__title .crumb { font-size: 12px; color: var(--muted); }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--text-2);
  border: 1px solid var(--border); background: var(--surface);
  transition: background .12s, border-color .12s;
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.hamburger { display: none; }

/* Sade yuvarlak avatar tetikleyici (topbar hesap menüsü) — içine .avatar span alır */
.avatar-btn { display: inline-flex; padding: 0; border-radius: 50%; cursor: pointer; transition: box-shadow .13s, transform .1s; }
.avatar-btn:hover { box-shadow: 0 0 0 3px var(--surface-3); }
.avatar-btn:active { transform: scale(.96); }
.avatar-btn:focus-visible { outline: none; box-shadow: var(--ring); }

.content { flex: 1; padding: 26px 24px 60px; max-width: 1400px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head__text { flex: 1; min-width: 240px; }
.page-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.page-head p { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- 5. Butonlar ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: var(--r-sm);
  font-weight: 560; font-size: 13.5px; white-space: nowrap;
  border: 1px solid transparent; transition: background .13s, border-color .13s, box-shadow .13s, opacity .13s;
  user-select: none;
}
.btn svg { opacity: 0.95; }
/* GENEL KURAL — devre dışı / yükleniyor hâli GÖRÜNSÜN.
   `pointer-events: none` KULLANMIYORUZ: imleci de öldürür, kullanıcı butonun üstüne
   gelince hiçbir geri bildirim almaz ("bozuk mu?" hissi). Tıklamayı zaten native
   `disabled` engelliyor (loading'de de JS disabled=true yapıyor) → biz yalnız
   soluklaştırma + imleç veriyoruz. Hover görseli aşağıda nötrlenir. */
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
/* Yükleniyor: tam ölü değil "çalışıyor" — spinner okunur kalsın diye daha az soluk,
   ama eskiden opacity:1 idi ve buton HİÇ pasif görünmüyordu (kullanıcı bildirdi). */
.btn.is-loading { opacity: 0.72; cursor: progress; }
/* pointer-events açık olduğu için devre dışıyken hover rengi değişmesin. */
.btn--primary:disabled:hover   { background: var(--ink); }
.btn--secondary:disabled:hover { background: var(--surface); border-color: var(--border-input); }
.btn--ghost:disabled:hover     { background: transparent; color: var(--text-2); }
.btn--danger:disabled:hover    { background: var(--surface); border-color: var(--border-input); }
.btn--primary { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-xs); }
.btn--primary:hover { background: var(--ink-hover); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-input); box-shadow: var(--shadow-xs); }
.btn--secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--border-input); }
.btn--danger:hover { background: var(--danger-bg); border-color: #f2c4c4; }
.btn--sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn--lg { height: 44px; padding: 0 20px; font-size: 14.5px; }
.btn--block { width: 100%; }
.btn--icon { width: 38px; padding: 0; }

/* ---- 6. Kartlar ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column;
}
/* Yapışkan footer: eşit yükseklikli grid'lerde footer'lar (butonlar) hizalanır */
.card > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.card__foot { margin-top: auto; }
.card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.card__head h3 { font-size: 14.5px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.card__head h3 svg { flex-shrink: 0; }
.card__head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card__head .spacer { flex: 1; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }
.card__foot { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ---- 7. İstatistik kartları ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-xs);
  position: relative; overflow: hidden;
}
.stat__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat__label { font-size: 12.5px; color: var(--text-2); font-weight: 520; }
.stat__ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text); }
.stat__value { font-size: 26px; font-weight: 680; letter-spacing: -0.03em; }
.stat__meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.delta--up { color: var(--success); }
.delta--down { color: var(--danger); }

/* ---- 8. Tablolar ---- */
.table-wrap { overflow-x: auto; }
/* Tabloyu saran kartı köşelerine kırp: thead'in kare arka planı yuvarlak köşeleri bozmasın. */
.card:has(> .table-wrap) { overflow: hidden; }
.table { font-size: 13.5px; }
.table thead th {
  text-align: left; font-weight: 560; font-size: 12px; color: var(--muted);
  padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--surface-2); position: sticky; top: 0;
}
.table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .t-strong { font-weight: 580; color: var(--text); }
.table a.t-strong:hover { text-decoration: underline; }
.cell-sub { color: var(--muted); font-size: 12px; }

/* ---- 9. Rozetler ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 560; padding: 3px 9px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.4;
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.badge--info    { background: var(--info-bg);    color: var(--info); }
.badge--accent  { background: var(--accent-bg);  color: var(--accent); }
.badge--muted   { background: var(--surface-3);  color: var(--muted); }
.badge--outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }

/* Pazar yeri etiketi */
.mp { --mp-ico: 24px; display: inline-flex; align-items: center; gap: 8px; font-weight: 520; font-size: 13px; white-space: nowrap; }
/* Gerçek pazar yeri ikonu. Beyaz zeminli ikonlar (ör. Hepsiburada) beyaz satırda
   yüzmesin diye ince kenarlık — .mp-badge--img ile aynı gerekçe. */
.mp__ico {
  width: var(--mp-ico); height: var(--mp-ico); border-radius: calc(var(--mp-ico) / 4);
  flex-shrink: 0; object-fit: cover; background: #fff; border: 1px solid var(--border); display: block;
}
/* İkon dosyası yoksa devreye giren eski nokta (fallback). */
.mp__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
/* Tek ölçü kaynağı: --mp-badge. Rozet 4 yerde kullanılıyor (sipariş satırı, ürün listesi,
   pazar yeri kırılımı, ürün formu) — boyutu tek yerden değiştirebilmek için değişken. */
.mp-badge {
  --mp-badge: 40px;                      /* ← rozet boyutu TEK yerden. Aşağıdakiler buradan türer. */
  display: inline-grid; place-items: center;
  width: var(--mp-badge); height: var(--mp-badge);
  border-radius: calc(var(--mp-badge) / 4);
  font-size: calc(var(--mp-badge) * 0.36);
  font-weight: 700; color: #fff; letter-spacing: -0.02em; flex-shrink: 0;
}
/* Gerçek uygulama ikonu. Bazı markaların ikonu BEYAZ zeminli (ör. Hepsiburada) →
   beyaz kartın üstünde sınırsız kalır, "yüzer". İnce kenarlık ikonu kartın zemininden ayırır.
   object-fit: cover — ikonlar zaten 1:1, ama bozuk/farklı oranlı bir dosya gelirse esnetmesin. */
.mp-badge--img { display: block; object-fit: cover; background: #fff; border: 1px solid var(--border); }

/* ---- 10. Formlar ---- */
.form-grid { display: grid; gap: 16px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; }
/* Art arda gelen alanlar birbirine yapışıyordu: .field'in içi gap ile ayrılıyor ama
   ALANLAR ARASI boşluk hiç yoktu — yardım metni bir sonraki etiketin dibine giriyordu.
   .form-grid içinde boşluğu grid gap verir, orada tekrar etmesin. */
:not(.form-grid) > .field + .field { margin-top: 14px; }
.field.col-span-2 { grid-column: span 2; }
.label { font-size: 12.5px; font-weight: 560; color: var(--text); }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-input);
  border-radius: var(--r-sm); font-size: 13.5px; color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }

/* GENEL KURAL — native arama temizleme (X) düğmesi temaya çekilir.
   Tarayıcının kendi ikonu (WebKit/Chromium) gri-mavi ve tasarım dilimize yabancı —
   `appearance:none` ile kaldırıp kendi lucide "x"imizi MASK olarak basıyoruz; böylece
   rengi background-color'dan gelir ve tema değişkenlerimize uyar. Tek yerde tanımlı →
   projedeki her type=search kutusu kendiliğinden tutarlı.
   Not: Firefox bu düğmeyi hiç render etmez, ek kural gerekmez. */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
          appearance: none;
  width: 15px; height: 15px; margin-left: 6px;
  cursor: pointer;
  background-color: var(--muted);
  -webkit-mask: var(--icon-x) center / contain no-repeat;
          mask: var(--icon-x) center / contain no-repeat;
  transition: background-color .12s;
}
input[type="search"]::-webkit-search-cancel-button:hover { background-color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8b94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px;
}
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--danger); }

/* Özel tema select (native <select> geliştirilir) */
.cs { position: relative; }
.cs__native { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; margin: 0; }
.cs__trigger {
  width: 100%; height: 40px; padding: 0 34px 0 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--border-input); border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--text); cursor: pointer;
  display: flex; align-items: center; transition: border-color .12s, box-shadow .12s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8b94' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.cs__trigger:disabled { opacity: .6; cursor: default; background-color: var(--surface-2); }
.cs.open .cs__trigger, .cs__trigger:focus-visible { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.cs__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs__value.is-placeholder { color: var(--faint); }
.cs__panel {
  position: fixed; z-index: 100;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 5px; max-height: 264px; overflow-y: auto;
  opacity: 0; transform: translateY(-4px) scale(.99); pointer-events: none;
  transition: opacity .13s, transform .13s;
}
.cs.open .cs__panel { opacity: 1; transform: none; pointer-events: auto; }
.cs__opt {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-xs);
  font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.cs__opt > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.cs__opt:hover, .cs__opt.is-active { background: var(--surface-3); color: var(--text); }
.cs__opt.is-selected { color: var(--text); font-weight: 540; }
.cs__opt__check { margin-left: auto; color: var(--ink); display: inline-flex; opacity: 0; }
.cs__opt.is-selected .cs__opt__check { opacity: 1; }
.field--error .cs__trigger { border-color: var(--danger); }
/* Not: flex olduğu için içerik TEK parça olmalı (metni <span>'e sar) — aksi halde her
   metin parçası ayrı flex item olup yan yana sütunlaşır. flex-start: çok satırda ikon üstte kalır. */
.help { font-size: 12px; color: var(--muted); display: flex; align-items: flex-start; gap: 5px; line-height: 1.5; }
.help > svg { flex-shrink: 0; margin-top: 1px; }
.help > span { min-width: 0; }
/* GENEL KURAL — yardım metnine nefes payı.
   `.field` bir flex kolonu ve gap:6px veriyor → İÇİNE konan .help boşluğu zaten alır.
   Ama alanın KARDEŞİ olarak konduğunda (form-grid'in ardından, textarea'nın altında)
   hiç boşluk kalmıyordu ve metin kutuya yapışıyordu — 3 ayrı ekranda aynı hata.
   Bu yüzden: .field İÇİNDE değilse ve öncesinde bir kardeş varsa üstten boşluk ver.
   (.field içinde uygulanmaz, yoksa gap'in üstüne binip çift boşluk olurdu.) */
:not(.field) > * + .help { margin-top: 8px; }
/* Alan içindeki yardım metni girdiye fazla uzak duruyordu: .field zaten 6px gap veriyor,
   üstüne .help'in line-height'ı (1.5) ~3px daha boşluk ekliyor. Farkı geri alıyoruz. */
.field .help { margin-top: -3px; }
.error-text { font-size: 12px; color: var(--danger); display: flex; align-items: center; gap: 4px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: 38px; }
.input-group__icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); transition: background .15s; position: relative; flex-shrink: 0; }
.switch__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }

.checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.checkbox input { width: 17px; height: 17px; }

/* GENEL KURAL — TÜM native checkbox/radio tema rengini (monokrom ink) alır.
   `accent-color` native işaret/davranış/erişilebilirliği korur; tek yerde tanımlanır,
   panelin her onay/seçim kutusu kendiliğinden tutarlı olur (tarayıcı mavisi kalmaz).
   Bileşenler kendi boyutunu ezebilir (class özgüllüğü element seçicisini yener). */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--ink);
  width: 16px; height: 16px; cursor: pointer; flex-shrink: 0;
}
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: not-allowed; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible {
  outline: none; border-radius: 4px; box-shadow: var(--ring);
}

/* Renk seçici (yuvarlak swatch'lar) */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch-label { position: relative; display: inline-flex; cursor: pointer; }
.color-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch { display: block; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s, transform .1s; }
.swatch-label:hover .swatch { transform: scale(1.09); }
.color-radio:checked + .swatch,
.color-radio:focus-visible + .swatch { box-shadow: 0 0 0 2px var(--ink); }

/* ---- 11. Avatar ---- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 640; font-size: 12.5px;
  line-height: 0; letter-spacing: 0; text-indent: 0; background: var(--ink);
}
.avatar--sm { width: 28px; height: 28px; border-radius: 50%; font-size: 11px; }
.avatar--lg { width: 44px; height: 44px; border-radius: 50%; font-size: 15px; }

/* ---- 12. Menü (dropdown) ---- */
.dropdown { position: relative; }
.menu {
  position: fixed; min-width: 210px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 100;
  opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none;
  transition: opacity .13s, transform .13s;
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu__label { font-size: 11px; color: var(--muted); padding: 8px 10px 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: var(--r-xs); font-size: 13px; color: var(--text-2); font-weight: 500;
}
.menu__item svg { color: var(--muted); }
.menu__item:hover { background: var(--surface-3); color: var(--text); }
.menu__item:hover svg { color: var(--text); }
.menu__item--danger { color: var(--danger); }
.menu__item--danger svg { color: var(--danger); }
.menu__item--danger:hover { background: var(--danger-bg); color: var(--danger); }
.menu__sep { height: 1px; background: var(--border); margin: 5px 0; }

/* ---- 13. Sekmeler ---- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; }
.tab {
  padding: 10px 14px; font-size: 13.5px; font-weight: 520; color: var(--muted);
  white-space: nowrap; transition: color .12s, box-shadow .12s; box-shadow: inset 0 -2px 0 transparent;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--ink); font-weight: 580; }

/* Segmentli kontrol */
.segmented { display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.segmented a, .segmented button {
  padding: 6px 12px; border-radius: var(--r-xs); font-size: 12.5px; font-weight: 540; color: var(--text-2);
}
.segmented .is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

/* ---- 14. Araç çubuğu / filtreler ---- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 380px; }
.toolbar .search .input { height: 38px; }

/* ---- 15. Flash / uyarı ---- */
.flash-stack { position: fixed; bottom: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
@media (max-width: 480px) { .flash-stack { left: 12px; right: 12px; bottom: 12px; max-width: none; } }
.toast {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--muted);
  border-radius: var(--r); box-shadow: var(--shadow-lg); animation: toastIn .2s ease;
}
.toast--success { border-left-color: var(--success); }
.toast--error { border-left-color: var(--danger); }
.toast__ico { flex-shrink: 0; display: inline-flex; }
.toast--success .toast__ico { color: var(--success); }
.toast--error .toast__ico { color: var(--danger); }
.toast__body { flex: 1; font-size: 13px; line-height: 1.45; }
.toast__close { color: var(--faint); display: inline-flex; align-items: center; padding: 0; flex-shrink: 0; }
.toast__close:hover { color: var(--text); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.alert { display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r); font-size: 13px; border: 1px solid var(--border); background: var(--surface-2); }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert--warning { background: var(--warning-bg); border-color: #f4e2c8; color: #7c4a12; }
.alert--warning svg { color: var(--warning); }
.alert--info { background: var(--info-bg); border-color: #d3e1fb; color: #1e40af; }
.alert--info svg { color: var(--info); }
.alert--danger { background: var(--danger-bg); border-color: #f3cfcf; color: #991b1b; }

/* ---- 16. Boş durum ---- */
.empty { text-align: center; padding: 54px 24px; }
.empty__ico { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; margin: 0 auto 16px; }
.empty h3 { font-size: 15px; margin-bottom: 5px; }
.empty p { color: var(--muted); font-size: 13px; max-width: 340px; margin: 0 auto 18px; }

/* ---- 17. Sayfalama ---- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; flex-wrap: wrap; }
.pagination__info { font-size: 12.5px; color: var(--muted); }
.pagination__nav { display: flex; gap: 6px; }

/* ---- 18. Modal ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(15,15,20,0.42); backdrop-filter: blur(2px);
  z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { display: flex; animation: fade .15s ease; }

/* GENEL KURAL — görsel büyüteci. `data-zoom` taşıyan HER görsel tıklanınca burada açılır
   (ürün görselleri, AI önizlemeleri, ileride eklenecekler). Mevcut .overlay tabanını
   kullanır → arka plan, blur, açılış animasyonu ve z-index tek yerden yönetilir. */
.lightbox { padding: 24px; }
.lightbox__img {
  max-width: min(92vw, 1100px); max-height: 88vh; width: auto; height: auto;
  object-fit: contain; border-radius: var(--r); box-shadow: var(--shadow-lg); background: var(--surface);
  animation: modalIn .16s ease;
}
.lightbox__btn {
  position: absolute; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: background .12s, transform .12s;
}
.lightbox__btn:hover { background: #fff; transform: scale(1.06); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; margin-top: -20px; }
.lightbox__next { right: 18px; top: 50%; margin-top: -20px; }
.lightbox__count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(15,15,20,.6); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
/* Büyütülebilir görselde imleç ipucu — tıklanabilir olduğu anlaşılsın. */
img[data-zoom] { cursor: zoom-in; }
.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column;
  animation: modalIn .18s ease;
}
.modal__head { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal__head h3 { font-size: 15.5px; flex: 1; }
.modal__body { padding: 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.overlay.open.closing { animation: fadeOut .16s ease forwards; }
.overlay.open.closing .modal { animation: modalOut .16s ease forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Onay diyaloğu — native confirm() yerine temalı modal */
.modal--confirm { max-width: 416px; }
.confirm__body { display: flex; gap: 15px; padding: 22px 22px 18px; align-items: flex-start; }
.confirm__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.confirm__icon svg { width: 21px; height: 21px; }
.confirm__icon--danger { background: var(--danger-bg); color: var(--danger); }
.confirm__icon--default { background: var(--surface-3); color: var(--text-2); }
.confirm__title { font-size: 15.5px; font-weight: 600; margin: 2px 0 5px; color: var(--text); }
.confirm__msg { font-size: 13.5px; line-height: 1.55; color: var(--text-2); margin: 0; }

/* ---- 19. Çeşitli ---- */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.35); border-top-color: currentColor; border-radius: 50%; animation: spin .6s linear infinite; }
.spinner--dark { border-color: var(--border-strong); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.thumb { border-radius: var(--r-sm); border: 1px solid var(--border); object-fit: cover; background: var(--surface-3); }
.thumb--ph { display: grid; place-items: center; color: var(--faint); }

.divider { height: 1px; background: var(--border); border: none; margin: 20px 0; }
.kbd { font-family: var(--mono); font-size: 11px; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px; color: var(--text-2); }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* Yardımcı sınıflar */
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
/* Tabular sayılar hizalanmak için var; satır sonunda kırılmaları o hizayı bozar.
   Ayrıca "−₺132,00" gibi tutarlarda işaret tutardan kopup alt satıra düşüyordu. */
.tnum { font-variant-numeric: tabular-nums; white-space: nowrap; }
.flex { display: flex; }
.items-center { align-items: center; }
/* İkon + metin satırı — dikey ortalı + optik nudge (em ile ölçeklenir) */
.i-row { display: inline-flex; align-items: center; gap: 6px; }
.i-row > svg { flex-shrink: 0; transform: translateY(var(--icon-nudge)); }
/* Kredi hareket satırı + "tümünü gör" linki */
.tx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.tx-row:last-child { border-bottom: none; }
.tx-link { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 560; color: var(--text-2); }
.tx-link:hover { color: var(--text); }
.tx-link svg { transform: translateY(var(--icon-nudge)); margin-right: -2px; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.grid { display: grid; }
.hidden { display: none !important; }
.w-full { width: 100%; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }

/* ---- 19b. Kimlik doğrulama (giriş / kurulum) ---- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr; place-items: center;
  padding: 24px; background:
    radial-gradient(1200px 500px at 50% -10%, #ffffff, transparent),
    linear-gradient(180deg, #f6f6f7, #eeeef0);
}
.auth__card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 32px;
}
.auth__brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 26px; }
.auth__brand .brand-mark { width: 36px; height: 36px; font-size: 18px; }
.auth__brand .brand-name { font-size: 20px; }
.auth h1 { font-size: 20px; text-align: center; }
.auth__sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 6px 0 24px; }
.auth .field { margin-bottom: 15px; }
/* Giriş formu boşluğu KENDİ margin-bottom'ı ile verir → genel .field+.field kuralı
   burada tekrar uygulanmasın (yoksa 15+14 = çift boşluk olur). */
.auth .field + .field { margin-top: 0; }
.auth__foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; font-size: 12.5px; color: var(--muted); }
.auth__foot svg { color: var(--faint); }
.auth__steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; }
.auth__step { width: 30px; height: 4px; border-radius: 999px; background: var(--border-strong); }
.auth__step.on { background: var(--ink); }

/* ---- 19c. Grafik & dashboard bileşenleri ---- */
.chart-wrap { padding: 8px 6px 0; }
/* Grafik etkileşimi: imleç çizgisi + nokta + ipucu. Konumlar JS'ten piksel olarak gelir
   (noktalar oran taşır), o yüzden kap position:relative olmalı. */
.chart { position: relative; }
.chart__rule {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: var(--border-strong); pointer-events: none; transform: translateX(-0.5px);
}
.chart__dot {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); border: 2px solid #fff; box-shadow: var(--shadow-sm);
  pointer-events: none; transform: translate(-50%, -50%);
}
.chart__tip {
  position: absolute; z-index: 2; pointer-events: none; white-space: nowrap;
  background: var(--ink); color: var(--on-ink);
  font-size: 12px; font-weight: 520; line-height: 1.4;
  padding: 6px 9px; border-radius: var(--r-xs); box-shadow: var(--shadow);
}
.chart-svg { width: 100%; height: 200px; display: block; }
.chart-empty { height: 200px; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
.chart-axis { display: flex; justify-content: space-between; padding: 6px 6px 0; font-size: 11px; color: var(--faint); }

.ratebar { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.ratebar__fill { height: 100%; border-radius: 999px; transition: width .4s ease; }

.mp-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.mp-row:last-child { border-bottom: none; }
.mp-row__main { flex: 1; min-width: 0; }
.mp-row__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; gap: 10px; }
.mp-row__name { display: flex; align-items: center; gap: 8px; font-weight: 560; font-size: 13.5px; }
.mp-row__val { font-weight: 640; font-variant-numeric: tabular-nums; }
.mp-row__sub { font-size: 12px; color: var(--muted); }

.dash-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }

/* Temalı tarih seçici — native input gizli değer taşıyıcı, üstte kendi arayüzümüz */
.dp-native { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }
.dp-trigger { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left; color: var(--text); }
.dp-trigger:focus-visible { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.dp-trigger__txt.is-placeholder { color: var(--faint); }
.dp-trigger > svg { color: var(--muted); flex: none; }
.dp-panel {
  position: fixed; z-index: 100; width: 268px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-4px) scale(.99);
  pointer-events: none; transition: opacity .13s, transform .13s;
}
.dp-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.dp-head { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.dp-head strong { font-size: 13.5px; }
.dp-head__sp { flex: 1; }
.dp-nav { width: 28px; height: 28px; border-radius: 7px; border: none; background: transparent; color: var(--text-2); font-size: 18px; line-height: 1; cursor: pointer; transition: background .12s; }
.dp-nav:hover { background: var(--surface-3); color: var(--text); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { margin-bottom: 4px; }
.dp-dow span { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 0; }
.dp-day { height: 32px; border: none; background: transparent; border-radius: 7px; font-size: 12.5px; color: var(--text); cursor: pointer; transition: background .1s, color .1s; }
.dp-day:hover:not(.is-disabled):not(.is-selected) { background: var(--surface-3); }
.dp-day--mute { visibility: hidden; }
.dp-day.is-today { font-weight: 700; box-shadow: inset 0 0 0 1px var(--border-strong); }
.dp-day.is-selected { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.dp-day.is-disabled { color: var(--faint); cursor: default; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dp-link { background: none; border: none; color: var(--text-2); font-size: 12.5px; font-weight: 540; cursor: pointer; padding: 2px 4px; border-radius: 5px; }
.dp-link:hover { color: var(--ink); background: var(--surface-3); }

/* Kontrol paneli — dönem seçici */
.period-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.period-tabs { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.period-tab { padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 540; color: var(--text-2); white-space: nowrap; transition: background .12s, color .12s; }
.period-tab:hover { color: var(--text); }
.period-tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.period-custom { display: inline-flex; align-items: center; gap: 6px; }
.period-custom .input { width: auto; height: 34px; padding: 0 10px; font-size: 12.5px; }
.period-label { margin-left: auto; }
@media (max-width: 720px) { .period-label { margin-left: 0; width: 100%; } }

/* Kontrol paneli — trend rozeti + mini listeler (#11) */
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.trend--up   { color: var(--success); background: var(--success-bg); }
.trend--down { color: var(--danger);  background: var(--danger-bg); }
.trend--flat { color: var(--muted);   background: var(--surface-3); font-weight: 500; }
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--border); color: var(--text); transition: background .12s; }
.mini-row:first-child { border-top: none; }
.mini-row:hover { background: var(--surface-2); }
.mini-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.rank-badge { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

.mini-order { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.mini-order:last-child { border-bottom: none; }
.mini-order__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.mini-order__title { font-weight: 540; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-order__sub { font-size: 11.5px; color: var(--muted); }

/* Ürün hücresi (tablo) */
.prod-cell { display: flex; align-items: center; gap: 11px; }
.prod-cell__img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; border: 1px solid var(--border); }
.prod-cell__ph { display: grid; place-items: center; color: var(--faint); }
.prod-cell__meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.prod-cell__title { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.prod-cell__sku { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }

/* Çoklu pazar yeri rozeti (ürün listesi).
   BİNDİRME YOK — bilinçli. Avatar yığını deseni (üst üste %30 bindirme) yüzlerde işe
   yarar çünkü kısmen kapanan yüz hâlâ tanınır; MARKA LOGOSUNDA ise logonun bir kısmını
   kesmek onu okunamaz yapar ("trendy…", "hepsi burad…") — üstelik gerçek ikonları
   kullanmamızın tek amacı tanınırlıktı. Yan yana + boşluk: hepsi tam görünür.
   Beyaz halka da gereksizleşti; .mp-badge--img'in kendi ince kenarlığı yeterli. */
.mp-stack { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---- 19d. Pazar yeri kartları ---- */
.mp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.mp-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 16px;
}
.mp-card__head { display: flex; align-items: center; gap: 13px; }
.mp-card__logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.mp-card__logo--icon { background: #fff; border: 1px solid var(--border); overflow: hidden; padding: 7px; }
.mp-card__logo--icon img { width: 100%; height: 100%; object-fit: contain; }
.mp-card__logo--wordmark { width: auto; min-width: 46px; background: transparent; border-radius: 0; padding: 0 2px; }
.mp-card__logo--wordmark img { height: 24px; width: auto; max-width: 140px; object-fit: contain; }
.mp-card__title { font-weight: 640; font-size: 15px; }
.mp-card__title .muted { font-weight: 400; }
.mp-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mp-card__stat .n { font-size: 18px; font-weight: 680; }
.mp-card__stat .l { font-size: 11.5px; color: var(--muted); }
.mp-card__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.mp-card__view { margin-left: auto; width: 34px; padding: 0; flex-shrink: 0; }
.mp-card__meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
/* Wordmark kartlarında durum en sağda + dikey (● Bağlı üstte, Demo altta) */
.mp-card__meta--stacked { margin-left: auto; flex-direction: column; align-items: flex-end; gap: 5px; }
.mp-card__meta--stacked .mp-stat { display: inline-flex; align-items: center; gap: 6px; }
/* "Otomatik senkron" göstergesi (gerçek bağlantıda) */
.mp-auto { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--success); white-space: nowrap; }
.mp-auto svg { flex-shrink: 0; }

/* Detay — bağlantıyı kaldır (danger zone) */
.mp-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    margin-top: 22px; padding: 15px 18px; border: 1px solid var(--border-input); border-radius: var(--r-lg); background: var(--surface); }
.mp-danger-zone__text { max-width: 62ch; }
.mp-danger-zone__text strong { color: var(--text); }
.mp-danger-zone__text p { margin: 3px 0 0; }

/* Detay: özet kutuları + işlem günlüğü */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 15px 18px; box-shadow: var(--shadow-xs); }
.stat-box__n { font-size: 22px; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; }
.stat-box__l { font-size: 12px; color: var(--muted); margin-top: 3px; }
/* Uzun listeyi kartın içinde sınırlar: kart sınırsız uzamaz, liste kendi içinde kayar.
   Yüksekliği kullanım yerinde ezmek için: style="--scroll-max:280px".
   overscroll-behavior:contain → liste sonuna gelince kaydırma sayfaya sıçramaz. */
.scroll-y { max-height: var(--scroll-max, 420px); overflow-y: auto; overscroll-behavior: contain; }

.log-list { display: flex; flex-direction: column; }
.log-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--border); }
.log-row:first-child { border-top: none; }
.log-row__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.log-row__dot--ok { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.log-row__dot--err { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.log-row__main { flex: 1; min-width: 0; }
.log-row__title { font-size: 13.5px; font-weight: 560; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log-row__msg { margin-top: 2px; }
.log-row__time { flex-shrink: 0; white-space: nowrap; }

.dot-status { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-status--connected { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.dot-status--error { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.dot-status--disconnected { background: var(--faint); }

/* Detay/özellik satırları */
.deflist { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 13.5px; }
.deflist dt { color: var(--muted); }
.deflist dd { font-weight: 520; }

/* İki sütun düzen (detay sayfaları) */
.split { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---- 19e. Ürün görselleri & ilanlar ---- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.img-tile { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile__badge { position: absolute; top: 5px; left: 5px; font-size: 9.5px; font-weight: 700; background: var(--ink); color: #fff; padding: 2px 6px; border-radius: 5px; }
.img-tile__del { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 6px; background: rgba(255,255,255,0.9); color: var(--danger); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.img-tile__del:hover { background: #fff; }

.dropzone {
  display: block; /* label varsayılan inline; blok olmazsa dashed kenarlık satırlara bölünür */
  border: 1.5px dashed var(--border-input); border-radius: var(--r); padding: 26px 16px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s; background: var(--surface-2);
}
.dropzone:hover { border-color: var(--ink); background: var(--surface-3); }
.dropzone__ico { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); display: grid; place-items: center; margin: 0 auto 10px; }
.dropzone input { display: none; }
.dropzone__hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.listing-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.listing-row:last-child { border-bottom: none; }

/* ---- 19f. Modüller ---- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.module-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 14px;
  transition: border-color .15s, box-shadow .15s, transform .1s; position: relative;
}
a.module-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.module-card__ico { width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.module-card__title { font-weight: 640; font-size: 15.5px; }
.module-card__desc { font-size: 13px; color: var(--text-2); line-height: 1.55; flex: 1; }
.module-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.module-card--soon { opacity: 0.7; }
.module-card--soon .module-card__ico { background: var(--surface-3); color: var(--muted); }

/* ---- 19g. AI Stüdyo ---- */
.studio { display: grid; grid-template-columns: 400px 1fr; gap: 16px; align-items: start; }
@media (max-width: 940px) { .studio { grid-template-columns: 1fr; } }

.studio__panel { display: flex; flex-direction: column; gap: 16px; }
.prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prompt-chip {
  text-align: left; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); transition: border-color .12s, background .12s; cursor: pointer;
}
.prompt-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.prompt-chip.is-active { border-color: var(--ink); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--ink); }
.prompt-chip__ico { color: var(--text-2); margin-bottom: 6px; }
.prompt-chip__title { font-weight: 580; font-size: 12.5px; }
.prompt-chip__desc { font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

.ref-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.ref-tile { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); }
.ref-tile img { width: 100%; height: 100%; object-fit: cover; }
.ref-tile__del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 5px; background: rgba(255,255,255,.92); color: var(--danger); display: grid; place-items: center; }

.count-seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; }
.count-seg button { width: 40px; height: 30px; border-radius: var(--r-xs); font-weight: 600; font-size: 13px; color: var(--text-2); }
.count-seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.count-seg button:disabled { opacity: .35; cursor: default; }

/* Sonuç tuvali */
.studio__canvas { min-height: 480px; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .result-grid { grid-template-columns: 1fr; } }
.result-tile { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.result-tile img { width: 100%; height: 100%; object-fit: cover; }
.result-tile__load { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface-3) 10px, var(--surface-3) 20px); }
.result-tile__pick { position: absolute; top: 8px; left: 8px; }
.result-tile__pick input { width: 20px; height: 20px; accent-color: var(--ink); }
.result-tile__actions { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.result-tile:hover .result-tile__actions { opacity: 1; }
.result-tile__btn { width: 30px; height: 30px; border-radius: 7px; background: rgba(255,255,255,.94); color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.result-tile__err { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--danger); font-size: 12px; background: var(--danger-bg); }

.studio-empty { border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); padding: 60px 24px; text-align: center; }
.studio-empty__ico { width: 56px; height: 56px; border-radius: 15px; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; margin: 0 auto 16px; }

/* ---- 19h. Kredi paketleri (pricing) & checkout ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; align-items: stretch; }
.price-card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s;
}
.price-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.price-card--popular { border-color: var(--ink); box-shadow: var(--shadow); }
.price-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .01em;
  padding: 4px 13px; border-radius: var(--r-full); white-space: nowrap;
}
.price-card__name { font-weight: 640; font-size: 15.5px; }
.price-card__desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.price-card__amount { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.price-card__meta { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-feats { display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--text-2); flex: 1; }
.price-feats li { display: flex; align-items: center; gap: 8px; }
.price-feats li svg { color: var(--success); flex-shrink: 0; }

/* Checkout iki sütun */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.sum-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.sum-row:last-child { border-bottom: none; }
.sum-total { font-size: 17px; font-weight: 680; }
.card-input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Başarı */
.success-hero { text-align: center; padding: 20px 0 8px; }
.success-hero__ico { width: 64px; height: 64px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; margin: 0 auto 18px; }

/* Abonelik */
.price-card__per { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: normal; }
.price-card--current { border-color: var(--success); }
.price-badge--current { background: var(--success); }

.sub-status { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 18px; }
.sub-status svg { flex-shrink: 0; }
.sub-status > div { display: flex; flex-direction: column; gap: 2px; }
.sub-status--trial { background: var(--info-bg); border-color: #d3e1fb; }
.sub-status--trial svg { color: var(--info); }
.sub-status--active { background: var(--success-bg); border-color: #cbead8; }
.sub-status--active svg { color: var(--success); }

.lock-hero { text-align: center; padding: 34px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 20px; box-shadow: var(--shadow-xs); }
.lock-hero__ico { width: 60px; height: 60px; border-radius: 50%; background: var(--surface-3); color: var(--text); display: grid; place-items: center; margin: 0 auto 16px; }
.lock-hero h3 { font-size: 19px; }
.lock-hero p { max-width: 440px; margin: 8px auto 0; line-height: 1.55; }

.sub-banner { display: flex; align-items: center; gap: 11px; padding: 11px 15px; border-radius: var(--r); font-size: 13px; margin-bottom: 18px; border: 1px solid var(--border); }
.sub-banner svg { flex-shrink: 0; }
.sub-banner span { flex: 1; }
.sub-banner--trial { background: var(--info-bg); border-color: #d3e1fb; color: #1e40af; }
.sub-banner--trial svg { color: var(--info); }
.sub-banner--warn { background: var(--warning-bg); border-color: #f4e2c8; color: #7c4a12; }
.sub-banner--warn svg { color: var(--warning); }

/* ---- Zaman çizelgesi (sipariş geçmişi) ----
   Çizgi ::before ile çiziliyor; son öğede kesilir ki nokta boşlukta asılı kalmasın. */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item { position: relative; display: flex; gap: 12px; padding: 0 0 16px 0; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: 4px; top: 14px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline__item:last-child::before { display: none; }
.timeline__dot {
  flex-shrink: 0; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%;
  background: var(--border); position: relative; z-index: 1;
}
.timeline__item--now .timeline__dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, rgba(0,0,0,.06)); }

/* ---- Sipariş künyesi (detay başlığı) ----
   Tek satır: pazar yeri · tarih · bayraklar. Dar ekranda sarar.
   İkon burada KÜÇÜLTÜLÜR (--mp-ico): 24px, 13px'lik soluk künye satırında fazla ağır
   kalıyor ve ikincil olması gereken bilgiyi başlıktan daha baskın hâle getiriyordu. */
.order-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-meta .mp { --mp-ico: 18px; }
.order-meta__sep { color: var(--faint); }

/* ---- 20. Duyarlılık (responsive) ---- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .hamburger { display: grid; }
  .scrim { position: fixed; inset: 0; background: rgba(15,15,20,0.4); z-index: 39; display: none; }
  .scrim.open { display: block; }
}
@media (max-width: 680px) {
  .content { padding: 18px 15px 50px; }
  .topbar { padding: 0 15px; }
  .form-grid--2, .form-grid--3 { grid-template-columns: 1fr; }
  .field.col-span-2 { grid-column: auto; }
  .page-head h2 { font-size: 19px; }
  .stat__value { font-size: 22px; }
}
