/* ==========================================================================
   Kabuk + bileşen katmanı — E-Ticaret Paneli
   Sınıf isimleri Laravel fazında Blade component'lere birebir karşılık gelir.
   Harici bağımlılık yok (CDN, font, ikon paketi yok).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Sıfırlama & temel
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  letter-spacing: var(--track-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
/* Varsayılan ikon ölçüsü — daha özgül kurallar (.btn svg gibi) bunu ezer.
   Bu satır olmadan boyut verilmeyen bir SVG kapsayıcıyı doldurur. */
svg { display: block; flex: none; width: 18px; height: 18px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }

/* --------------------------------------------------------------------------
   2. Yardımcı sınıflar (u- ön ekli — çakışma yaratmaz)
   -------------------------------------------------------------------------- */
.u-row { display: flex; align-items: center; }
.u-col { display: flex; flex-direction: column; }
.u-between { display: flex; align-items: center; justify-content: space-between; }
.u-wrap { flex-wrap: wrap; }
.u-center { display: flex; align-items: center; justify-content: center; }
.u-start { align-items: flex-start; }
.u-end { justify-content: flex-end; }
.u-grow { flex: 1 1 auto; min-width: 0; }
.u-dim { opacity: .5; }        /* kapalı ama duran satır */
.u-g1 { gap: var(--s-1); } .u-g2 { gap: var(--s-2); } .u-g3 { gap: var(--s-3); }
.u-g4 { gap: var(--s-4); } .u-g5 { gap: var(--s-5); } .u-g6 { gap: var(--s-6); }
.u-grid { display: grid; gap: var(--s-4); }
.u-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.u-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.u-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Boşluk yardımcıları — ölçek adımlarının TAMAMI tanımlı olmalı.
   Eksik bir adım (örn. .u-mt5) markup'ta sessizce hiçbir şey yapmaz;
   boşluk kaybı fark edilmeden her ekrana yayılır. */
.u-mt2 { margin-top: var(--s-2); } .u-mt3 { margin-top: var(--s-3); }
.u-mt4 { margin-top: var(--s-4); } .u-mt5 { margin-top: var(--s-5); }
.u-mt6 { margin-top: var(--s-6); }
.u-mb2 { margin-top: 0; margin-bottom: var(--s-2); } .u-mb3 { margin-bottom: var(--s-3); }
.u-mb4 { margin-bottom: var(--s-4); } .u-mb5 { margin-bottom: var(--s-5); }
.u-mb6 { margin-bottom: var(--s-6); }
.u-muted { color: var(--text-muted); }
.u-soft { color: var(--text-soft); }
.u-faint { color: var(--text-faint); }
.u-xs { font-size: var(--fs-xs); } .u-sm { font-size: var(--fs-sm); } .u-lg { font-size: var(--fs-lg); }
.u-medium { font-weight: var(--fw-medium); }
.u-semi { font-weight: var(--fw-semi); }
.u-mono { font-family: var(--font-mono); font-size: var(--fs-xs); }
.u-right { text-align: right; }
.u-nowrap { white-space: nowrap; }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-cap {
  font-size: var(--fs-2xs); font-weight: var(--fw-semi);
  letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--text-faint);
}
.u-num { font-variant-numeric: tabular-nums; }
.u-hr { height: 1px; background: var(--border); border: 0; margin: var(--s-5) 0; }
.u-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Uygulama iskeleti
   -------------------------------------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns var(--dur) var(--ease);
}
.app.is-mini { grid-template-columns: var(--side-w-mini) minmax(0, 1fr); }

/* ---- Sol menü ---- */
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--side-bg);
  border-right: 1px solid var(--side-border);
  z-index: var(--z-side);
  overflow: hidden;
}
.side__brand {
  display: flex; align-items: center; gap: var(--s-3);
  height: var(--topbar-h); padding: 0 var(--s-4);
  border-bottom: 1px solid var(--side-border);
  flex: none;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--a-400), var(--a-600));
  color: #fff; font-weight: var(--fw-bold); font-size: var(--fs-sm);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}
.brand-text { color: #fff; font-weight: var(--fw-semi); font-size: var(--fs-md); white-space: nowrap; }
.brand-text small { display: block; color: var(--side-text-dim); font-size: var(--fs-2xs); font-weight: var(--fw-normal); }

.side__nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: var(--s-3) var(--s-3) var(--s-6); }
.side__nav::-webkit-scrollbar { width: 6px; }
.side__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border: 0; }

/* --------------------------------------------------------------- menü
   DÜZ liste: grup ve akordiyon yok, 9 girdi. Önceki sürümde 7 grup içinde
   34 girdi vardı; kullanıcı her seferinde uzun bir listede arama yapıyordu.
   Alt ekranlar artık içerik alanının üstündeki sekme çubuğunda.

   Ölçüler bilinçli olarak büyütüldü — panel gün boyu açık duran bir araç;
   sıkışık bir menü ilk bakışta "karmaşık" hissi veriyor. */
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; padding: 11px var(--s-3);
  border-radius: var(--r-md);
  color: var(--side-text); font-size: var(--fs-md); font-weight: var(--fw-medium);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-item + .nav-item { margin-top: 3px; }

/* Sekme çubuğu rozeti — bölüm içindeyken hangi sekmede iş var */
.section-tabs__badge {
    margin-left: 6px; display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--danger, #dc2626); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums; vertical-align: middle;
}

/* Satır işlem menüsü — üç nokta */
.satir-menu { position: relative; display: inline-block; }
.satir-menu__panel {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 40;
    min-width: 168px; padding: 5px;
    background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px; box-shadow: 0 10px 28px rgba(16,24,40,.14);
    display: flex; flex-direction: column;
}
.satir-menu__panel > a,
.satir-menu__panel > button {
    all: unset; box-sizing: border-box; cursor: pointer;
    padding: 8px 10px; border-radius: 7px;
    font-size: 13px; color: var(--text, #111); text-align: left;
}
.satir-menu__panel > a:hover,
.satir-menu__panel > button:hover { background: var(--hover, #f3f4f6); }
.satir-menu__panel .satir-menu__sil { color: var(--danger, #dc2626); }

/* İşleme alınmamış sipariş satırı — solunda ince şerit + başında nokta.
   Zebra deseni ve tıklanabilirlik bozulmadan ayırt edilir. */
tr.satir--yeni > td:first-child { box-shadow: inset 3px 0 0 var(--danger, #dc2626); }
tr.satir--yeni > td { background: color-mix(in srgb, var(--danger, #dc2626) 5%, transparent); }
tr.satir--yeni:hover > td { background: color-mix(in srgb, var(--danger, #dc2626) 9%, transparent); }
.yeni-nokta {
    display: inline-block; width: 7px; height: 7px; margin-right: 6px;
    border-radius: 50%; background: var(--danger, #dc2626); vertical-align: middle;
}

/* Menü rozeti — hangi ekranda iş biriktiği tıklamadan görünsün.
   Yeni menüye geçerken düşmüştü: sipariş geldiğini panelde anlamanın
   hiçbir yolu kalmamıştı. */
.nav-item__badge {
    margin-left: auto; flex: none;
    min-width: 19px; height: 19px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--danger, #dc2626); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
}
/* Bilgi amaçlı sayaç (kritik stok) — kırmızı olursa gerçek acil işler kaybolur */
.nav-item__badge--soft { background: rgba(255,255,255,.16); color: #fff; }

/* Menü daraltılıyken rozet ikonun köşesine küçük bir nokta olur */
.app.is-mini .nav-item__badge {
    position: absolute; top: 6px; right: 6px;
    min-width: 8px; height: 8px; padding: 0; font-size: 0;
}
.app.is-mini .nav-item { position: relative; }
.nav-item svg { width: 19px; height: 19px; stroke-width: 1.8; opacity: .8; flex: none; }
.nav-item:hover { background: var(--side-hover); color: #fff; }
.nav-item:hover svg { opacity: 1; }
.nav-item.is-active { background: var(--side-active); color: var(--side-active-tx); }
.nav-item.is-active svg { opacity: 1; }

/* ------------------------------------------------------- bölüm sekmeleri
   Menüden çıkarılan alt ekranlar buraya taşındı. Ekranların kendisi bu
   çubuğu bilmez; düzen katmanında çizilir. */
.section-tabs {
  display: flex; gap: 2px; align-items: center;
  padding: 0 var(--s-6); margin: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs__item {
  flex: none; padding: 13px var(--s-4) 11px;
  border-bottom: 2px solid transparent;
  color: var(--text-muted); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.section-tabs__item:hover { color: var(--text); }
.section-tabs__item.is-active { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 720px) { .section-tabs { padding: 0 var(--s-4); } }

.side__foot { flex: none; padding: var(--s-3); border-top: 1px solid var(--side-border); }
.side-mini-btn {
  display: flex; align-items: center; gap: var(--s-3); width: 100%;
  padding: 8px var(--s-3); border-radius: var(--r-sm);
  color: var(--side-text-dim); font-size: var(--fs-sm);
}
.side-mini-btn:hover { background: var(--side-hover); color: #fff; }

/* Daraltılmış hâl */
.app.is-mini .brand-text,
.app.is-mini .nav-item span,
.app.is-mini .side-mini-btn span { display: none; }
.app.is-mini .nav-item { justify-content: center; padding-inline: 0; }
.app.is-mini .side__brand { justify-content: center; padding-inline: 0; }
.app.is-mini .side-mini-btn { justify-content: center; }

/* ---- Ana sütun ---- */
.main { display: flex; flex-direction: column; min-width: 0; }

/* ---- Üst bar ---- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-topbar);
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 var(--s-6);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar__search {
  display: flex; align-items: center; gap: var(--s-2);
  height: 34px; min-width: 260px; max-width: 380px; flex: 1 1 320px;
  padding: 0 var(--s-3);
  background: var(--surface-sunk); border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--text-muted); font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.topbar__search:hover { border-color: var(--border-strong); }
.topbar__search svg { width: 15px; height: 15px; }
.topbar__search kbd { margin-left: auto; }
kbd {
  font-family: var(--font); font-size: var(--fs-2xs); font-weight: var(--fw-medium);
  padding: 2px 5px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-faint); box-shadow: 0 1px 0 var(--border-strong);
}
.topbar__actions { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }

.icon-btn {
  position: relative;
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--text-soft);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--surface-sunk); color: var(--text); }
.icon-btn__dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--surface);
}
.topbar__sep { width: 1px; height: 22px; background: var(--border); margin: 0 var(--s-2); }

.user-btn {
  display: flex; align-items: center; gap: var(--s-2);
  height: 34px; padding: 0 var(--s-2) 0 var(--s-1); border-radius: var(--r-sm);
  transition: background var(--dur-fast) var(--ease);
}
.user-btn:hover { background: var(--surface-sunk); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: var(--fs-xs); font-weight: var(--fw-semi);
  border: 1px solid var(--accent-soft-brd);
}
.avatar--lg { width: 38px; height: 38px; font-size: var(--fs-sm); }

/* ---- Sayfa ---- */
.page { padding: var(--s-6); max-width: var(--page-max); width: 100%; margin: 0 auto; }
.page-head {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding-bottom: var(--s-5); margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--border);
}
.page-head__title { font-size: var(--fs-2xl); font-weight: var(--fw-semi); line-height: 1.2; }
.page-head__meta { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-muted); }
.page-head__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); flex: none; }

/* --------------------------------------------------------------------------
   4. Butonlar
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--surface); color: var(--text);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(0.5px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

.btn--primary { background: var(--accent); color: var(--accent-on); box-shadow: var(--sh-xs); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--outline { border-color: var(--border-strong); background: var(--surface); }
.btn--outline:hover { background: var(--surface-sunk); border-color: var(--text-faint); }
.btn--ghost { background: transparent; color: var(--text-soft); }
.btn--ghost:hover { background: var(--surface-sunk); color: var(--text); }
.btn--soft { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft-brd); }
.btn--soft:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 8%); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.06); }
.btn--danger-soft { background: var(--danger-bg); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 24%, transparent); }
.btn--sm { height: 30px; padding: 0 10px; font-size: var(--fs-xs); }
.btn--sm svg { width: 14px; height: 14px; }
.btn--lg { height: 42px; padding: 0 20px; font-size: var(--fs-md); }
.btn--block { width: 100%; }
.btn--icon { width: 36px; padding: 0; }
.btn--sm.btn--icon { width: 30px; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; border-color: var(--border-strong); margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* Segmentli kontrol */
.segmented {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-sunk); border-radius: var(--r-sm);
}
.segmented button {
  /* nowrap ŞART: "Son 90 gün" telefonda "Son 90 / gün" diye ikiye bölünüyor,
     seçicinin yüksekliği iki katına çıkıyor ve başlıkla hizası kayıyordu. */
  height: 28px; padding: 0 12px; border-radius: 6px; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--sh-xs); }

/* --------------------------------------------------------------------------
   5. Rozet · etiket · durum
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--surface-sunk); color: var(--text-soft);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); white-space: nowrap;
}
.badge--ok     { background: var(--ok-bg);     color: var(--ok-text); }
.badge--warn   { background: var(--warn-bg);   color: var(--warn-text); }
.badge--danger { background: var(--danger-bg); color: var(--danger-text); }
.badge--info   { background: var(--info-bg);   color: var(--info-text); }
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 6px 0 10px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-soft-brd);
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
}
.chip button { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; opacity: .7; }
.chip button:hover { opacity: 1; background: rgba(0,0,0,.08); }
.chip svg { width: 12px; height: 12px; }

/* --------------------------------------------------------------------------
   6. Kart
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.card__head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.card__title { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.card__sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }
.card__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.card__body { padding: var(--s-5); }
.card__body--flush { padding: 0; }
.card__foot {
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* KPI kartı */
.kpi { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.kpi__top { display: flex; align-items: center; gap: var(--s-2); }
.kpi__label { font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-medium); }
.kpi__icon {
  margin-left: auto; width: 30px; height: 30px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--surface-sunk); color: var(--text-muted);
}
.kpi__icon svg { width: 15px; height: 15px; }
.kpi__value { font-size: var(--fs-2xl); font-weight: var(--fw-semi); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi__delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.kpi__delta svg { width: 13px; height: 13px; }
.kpi__delta--up { color: var(--ok-text); }
.kpi__delta--down { color: var(--danger-text); }

/* --------------------------------------------------------------------------
   7. Tablo
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th {
  position: sticky; top: 0; z-index: 1;
  padding: 10px var(--s-4);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
  font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--text-muted);
}
.table th.is-sortable { cursor: pointer; user-select: none; }
.table th.is-sortable:hover { color: var(--text); }
.table th .sort { display: inline-flex; align-items: center; gap: 4px; }
.table th svg { width: 13px; height: 13px; opacity: .55; }
.table td {
  padding: 11px var(--s-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr { transition: background var(--dur-fast) var(--ease); }
.table tbody tr:hover { background: var(--surface-soft); }
.table tbody tr.is-selected { background: var(--accent-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-check { width: 44px; padding-right: 0; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table .col-num { text-align: right; font-variant-numeric: tabular-nums; }

.cell-media { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.thumb {
  width: 38px; height: 38px; border-radius: var(--r-sm); flex: none;
  background: var(--surface-sunk); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-faint); overflow: hidden;
}
.thumb svg { width: 16px; height: 16px; }
.thumb--img { object-fit: cover; padding: 0; border: 0; }
/* Baş harf — görseli olmayan kayıtlar için. Boyut kutuya göre değil sabit:
   38px'lik kutuda 13px, göz taramasında okunur ama öne çıkmaz. */
.thumb__harf {
  font-size: var(--fs-sm); font-weight: var(--fw-semi);
  color: var(--text-muted); letter-spacing: -.02em; line-height: 1;
}
.cell-title { font-weight: var(--fw-medium); color: var(--text); }
.cell-sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 1px; }

/* Araç çubuğu */
.toolbar {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
}
.search-input {
  display: flex; align-items: center; gap: var(--s-2);
  height: 34px; flex: 1 1 240px; max-width: 340px; padding: 0 var(--s-3);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.search-input svg { width: 15px; height: 15px; color: var(--text-faint); }
.search-input input { flex: 1; border: 0; background: none; outline: 0; font-size: var(--fs-sm); min-width: 0; }
.search-input input::placeholder { color: var(--text-faint); }

/* Toplu işlem çubuğu */
.bulkbar {
  position: sticky; bottom: var(--s-5); z-index: 20;
  display: flex; align-items: center; gap: var(--s-3);
  margin: var(--s-4) auto 0; width: fit-content;
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--n-900); color: #fff;
  border-radius: var(--r-full); box-shadow: var(--sh-lg);
  font-size: var(--fs-sm);
  animation: rise var(--dur) var(--ease-out);
}
.bulkbar .btn--ghost { color: rgba(255, 255, 255, 0.72); }
.bulkbar .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
[data-theme="dark"] .bulkbar { background: var(--surface-sunk); border: 1px solid var(--border-strong); }
[data-theme="dark"] .bulkbar .btn--ghost { color: var(--text-soft); }
[data-theme="dark"] .bulkbar .btn--ghost:hover { background: var(--surface); color: var(--text); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Sekmeler */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border); padding: 0 var(--s-4); }
.tab {
  position: relative; padding: 11px var(--s-3) 12px;
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 7px;
  transition: color var(--dur-fast) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); }
.tab.is-active::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px 2px 0 0;
}
.tab__count {
  min-width: 20px; height: 18px; padding: 0 5px; border-radius: var(--r-full);
  background: var(--surface-sunk); color: var(--text-muted);
  font-size: var(--fs-2xs); font-weight: var(--fw-semi); display: grid; place-items: center;
}
.tab.is-active .tab__count { background: var(--accent-soft); color: var(--accent); }

/* Sayfalama */
.pager {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border);
  font-size: var(--fs-sm); color: var(--text-muted);
}
.pager__pages { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.pager__pages button {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px;
  font-size: var(--fs-sm); color: var(--text-soft);
}
.pager__pages button:hover { background: var(--surface-sunk); color: var(--text); }
.pager__pages button.is-active { background: var(--accent); color: #fff; font-weight: var(--fw-medium); }

/* --------------------------------------------------------------------------
   8. Form
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text); }
.label .req { color: var(--danger); margin-left: 2px; }
.hint { font-size: var(--fs-xs); color: var(--text-muted); }
.err { font-size: var(--fs-xs); color: var(--danger-text); display: flex; align-items: center; gap: 5px; }
.err svg { width: 13px; height: 13px; }

.input, .select, .textarea {
  width: 100%; min-height: 36px; padding: 7px var(--s-3);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  font-size: var(--fs-sm); outline: 0;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.input[disabled], .select[disabled] { background: var(--surface-sunk); color: var(--text-faint); cursor: not-allowed; }
.textarea { min-height: 96px; resize: vertical; line-height: var(--lh-base); }
.select {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23697283' 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 10px center;
}
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--danger); }
.field--error .input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }

.inputgroup { display: flex; }
.inputgroup .input { border-radius: 0; }
.inputgroup > :first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.inputgroup > :last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.inputgroup__addon {
  display: grid; place-items: center; padding: 0 var(--s-3);
  background: var(--surface-sunk); border: 1px solid var(--border-strong);
  color: var(--text-muted); font-size: var(--fs-sm); white-space: nowrap;
}
.inputgroup__addon + .input { border-left: 0; }
.inputgroup .input + .inputgroup__addon { border-left: 0; }

/* Anahtar */
.switch { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 38px; height: 22px; border-radius: var(--r-full); flex: none;
  background: var(--border-strong); position: relative;
  transition: background var(--dur) var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: var(--sh-xs);
  transition: transform var(--dur) var(--ease);
}
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 3px var(--ring); }
.switch__text { font-size: var(--fs-sm); }

/* Kutu & radyo */
.check { display: inline-flex; align-items: center; gap: var(--s-2); cursor: pointer; font-size: var(--fs-sm); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 17px; height: 17px; border-radius: 5px; flex: none;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; color: #fff;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.check__box svg { width: 11px; height: 11px; opacity: 0; stroke-width: 3; }
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check__box svg { opacity: 1; }
.check input:indeterminate + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:indeterminate + .check__box::after { content: ""; width: 9px; height: 2px; background: #fff; border-radius: 1px; }
.check input:indeterminate + .check__box svg { display: none; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px var(--ring); }

/* Radyo kart */
.radio-card {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  cursor: pointer; background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.radio-card:hover { border-color: var(--text-faint); }
.radio-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.radio-card__mark {
  width: 17px; height: 17px; border-radius: 50%; flex: none; margin-top: 1px;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center;
}
.radio-card.is-active .radio-card__mark { border-color: var(--accent); border-width: 5px; }
.radio-card__title { display: block; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.radio-card__desc { display: block; font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

/* Dosya bırakma alanı */
.dropzone {
  display: grid; place-items: center; gap: var(--s-2);
  padding: var(--s-8) var(--s-5); text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md);
  background: var(--surface-soft); color: var(--text-muted);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  cursor: pointer;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 22px; height: 22px; color: var(--text-faint); }

/* --------------------------------------------------------------------------
   9. Editör kalıbı (Kalıp B)
   -------------------------------------------------------------------------- */
.editor { display: grid; grid-template-columns: 200px minmax(0, 1fr) 300px; gap: var(--s-6); align-items: start; }
.editor__nav { position: sticky; top: calc(var(--topbar-h) + var(--s-6)); display: flex; flex-direction: column; gap: 1px; }
.editor__nav > * {
  display: block; width: 100%; text-align: left;
  padding: 7px var(--s-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--text-muted); font-weight: var(--fw-medium);
  border-left: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.editor__nav > *:hover { color: var(--text); background: var(--surface-sunk); }
.editor__nav > *.is-active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
/* Alt boşluk: son bölümlerin de yapışkan navigasyon çizgisine ulaşabilmesi için.
   Olmazsa "Kargo" veya "İlişkili ürünler" hiçbir zaman aktif işaretlenemez. */
.editor__main { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; padding-bottom: 38vh; }
.editor__side { display: flex; flex-direction: column; gap: var(--s-4); position: sticky; top: calc(var(--topbar-h) + var(--s-6)); }

.savebar {
  position: sticky; bottom: 0; z-index: 25;
  display: flex; align-items: center; gap: var(--s-3);
  margin: var(--s-6) calc(var(--s-6) * -1) calc(var(--s-6) * -1);
  padding: var(--s-3) var(--s-6);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   10. Ayar kalıbı (Kalıp C)
   -------------------------------------------------------------------------- */
.setting-row {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s-6);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row:first-child { padding-top: 0; }
.setting-row__label { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.setting-row__desc { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 4px; line-height: var(--lh-loose); }
.setting-row__field { display: flex; flex-direction: column; gap: var(--s-3); max-width: 520px; }

/* --------------------------------------------------------------------------
   11. Modal · drawer · katman
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(12, 15, 20, 0.5);
  backdrop-filter: blur(2px);
  animation: fade var(--dur) var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center; padding: var(--s-5);
}
.modal__panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px; max-height: 86vh;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  animation: pop var(--dur-slow) var(--ease-out);
}
.modal__panel--lg { max-width: 760px; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modal__head { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-4); }
.modal__title { font-size: var(--fs-lg); font-weight: var(--fw-semi); }
.modal__sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 3px; }
.modal__body { padding: 0 var(--s-5) var(--s-5); overflow-y: auto; }
.modal__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s-2);
  padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border);
  background: var(--surface-soft); border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.modal__icon {
  width: 38px; height: 38px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
}
.modal__icon--danger { background: var(--danger-bg); color: var(--danger-text); }
.modal__icon--warn { background: var(--warn-bg); color: var(--warn-text); }

.drawer {
  position: fixed; inset: 0; z-index: var(--z-drawer); display: flex; justify-content: flex-end;
}
.drawer__panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px; height: 100%;
  display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--sh-lg);
  animation: slide-in var(--dur-slow) var(--ease-out);
}
.drawer__panel--wide { max-width: 680px; }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); flex: none; }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--s-5); }
.drawer__foot { flex: none; display: flex; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); background: var(--surface-soft); }

/* Açılır menü */
.menu {
  min-width: 190px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-md);
  animation: pop var(--dur) var(--ease-out);
}
.menu__item {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; padding: 7px var(--s-3); border-radius: 7px;
  font-size: var(--fs-sm); color: var(--text-soft); text-align: left;
}
.menu__item svg { width: 15px; height: 15px; opacity: .8; }
.menu__item:hover { background: var(--surface-sunk); color: var(--text); }
.menu__item--danger { color: var(--danger-text); }
.menu__item--danger:hover { background: var(--danger-bg); }
.menu__sep { height: 1px; background: var(--border); margin: 5px 0; }
.menu__label { padding: 6px var(--s-3) 4px; font-size: var(--fs-2xs); font-weight: var(--fw-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--text-faint); }

/* Bildirim */
.toast-wrap {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--s-2); pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: var(--s-3);
  min-width: 300px; max-width: 400px; padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-md);
  font-size: var(--fs-sm); pointer-events: auto;
  animation: rise var(--dur-slow) var(--ease-out);
}
.toast__icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast--ok .toast__icon { color: var(--ok); }
.toast--danger .toast__icon { color: var(--danger); }
.toast--warn .toast__icon { color: var(--warn); }
.toast--info .toast__icon { color: var(--info); }
.toast__title { font-weight: var(--fw-medium); }
.toast__text { color: var(--text-muted); font-size: var(--fs-xs); margin-top: 2px; }
.toast.is-out { animation: fade-out var(--dur) var(--ease) forwards; }
@keyframes fade-out { to { opacity: 0; transform: translateY(6px); } }

/* Satır içi uyarı */
.alert {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  font-size: var(--fs-sm); border: 1px solid transparent;
}
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.alert--info   { background: var(--info-bg);   color: var(--info-text);   border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.alert--ok     { background: var(--ok-bg);     color: var(--ok-text);     border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.alert--warn   { background: var(--warn-bg);   color: var(--warn-text);   border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.alert--danger { background: var(--danger-bg); color: var(--danger-text); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }

/* --------------------------------------------------------------------------
   12. Boş durum · iskelet · ilerleme · zaman çizelgesi
   -------------------------------------------------------------------------- */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-3);
  padding: var(--s-16) var(--s-5); text-align: center;
}
.empty__icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--surface-sunk); color: var(--text-faint);
}
.empty__icon svg { width: 21px; height: 21px; }
.empty__title { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.empty__text { font-size: var(--fs-sm); color: var(--text-muted); max-width: 380px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-sunk) 25%, var(--border) 37%, var(--surface-sunk) 63%);
  background-size: 400% 100%;
  border-radius: 6px; height: 12px;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.progress { height: 6px; border-radius: 99px; background: var(--surface-sunk); overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width var(--dur-slow) var(--ease); }

.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: var(--s-3); }
.tl-item__rail { display: flex; flex-direction: column; align-items: center; }
.tl-item__dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-sunk); color: var(--text-muted);
  border: 1px solid var(--border);
}
.tl-item__dot svg { width: 13px; height: 13px; }
.tl-item__dot--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft-brd); }
.tl-item__dot--ok { background: var(--ok-bg); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.tl-item__line { flex: 1; width: 1.5px; background: var(--border); margin: 4px 0; min-height: 14px; }
.tl-item:last-child .tl-item__line { display: none; }
.tl-item__body { padding-bottom: var(--s-4); min-width: 0; }
.tl-item:last-child .tl-item__body { padding-bottom: 0; }
.tl-item__title { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.tl-item__meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

/* Basit sütun grafiği (prototip amaçlı) */
.chart { display: flex; align-items: stretch; gap: 6px; height: 168px; }
.chart__col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; align-items: center; }
.chart__bar-wrap { width: 100%; flex: 1; display: flex; align-items: flex-end; }
.chart__bar {
  width: 100%; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent));
  min-height: 3px;
  transition: opacity var(--dur-fast) var(--ease);
}
.chart__col:hover .chart__bar { opacity: .78; }
.chart__label { font-size: var(--fs-2xs); color: var(--text-faint); }

/* Satır içi hızlı düzenleme — Kalıp A'nın ayrışma noktası */
.inline-edit {
  padding: 3px 7px; margin: -3px -7px; border-radius: 6px;
  font: inherit; color: inherit; font-weight: var(--fw-semi);
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.inline-edit:hover { background: var(--surface); border-color: var(--border-strong); }
.inline-edit:hover::after { content: "✎"; margin-left: 6px; opacity: .45; font-size: 11px; }

/* Kategori ağacı */
.tree-row {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 7px var(--s-3); border-radius: var(--r-sm);
  cursor: pointer; user-select: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.tree-row:hover { background: var(--surface-sunk); }
.tree-row.is-active { background: var(--accent-soft); color: var(--accent); }
.tree-row .sortable-row__grip { opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.tree-row:hover .sortable-row__grip { opacity: .6; }
.tree-caret svg { width: 14px; height: 14px; color: var(--text-faint); }

/* Sürükle-bırak satır */
.sortable-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.sortable-row + .sortable-row { margin-top: var(--s-2); }
.sortable-row__grip { color: var(--text-faint); cursor: grab; display: grid; place-items: center; touch-action: none; }
.sortable-row__grip:active { cursor: grabbing; }

/* Sürüklenen öğe */
.is-dragging { opacity: .55; }
.is-dragging .sortable-row,
.is-dragging.sortable-row,
.is-dragging .tree-row {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.sortable-row__grip svg { width: 16px; height: 16px; }
.sortable-row:hover { border-color: var(--border-strong); }

/* --------------------------------------------------------------------------
   13. Komut paleti
   -------------------------------------------------------------------------- */
.cmdk { position: fixed; inset: 0; z-index: var(--z-cmdk); display: flex; justify-content: center; padding-top: 12vh; }
.cmdk__panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 580px; max-height: 62vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  animation: pop var(--dur-slow) var(--ease-out);
}
.cmdk__search { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-bottom: 1px solid var(--border); }
.cmdk__search svg { width: 18px; height: 18px; color: var(--text-faint); }
.cmdk__search input { flex: 1; border: 0; background: none; outline: 0; font-size: var(--fs-lg); }
.cmdk__search input::placeholder { color: var(--text-faint); }
.cmdk__list { flex: 1; overflow-y: auto; padding: var(--s-2); }
.cmdk__group { padding: var(--s-2) var(--s-3) 4px; font-size: var(--fs-2xs); font-weight: var(--fw-semi); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--text-faint); }
.cmdk__item {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; padding: 9px var(--s-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--text-soft); text-align: left;
}
.cmdk__item svg { width: 16px; height: 16px; opacity: .75; }
.cmdk__item small { margin-left: auto; color: var(--text-faint); font-size: var(--fs-xs); }
.cmdk__item.is-active { background: var(--accent-soft); color: var(--accent); }
.cmdk__foot {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-2) var(--s-4); border-top: 1px solid var(--border);
  background: var(--surface-soft); font-size: var(--fs-xs); color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   14. Giriş ekranı
   -------------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 44%; }
.auth__form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: var(--s-8) var(--s-6); }
.auth__box { width: 100%; max-width: 368px; }
.auth__aside {
  position: relative; overflow: hidden;
  background: var(--side-bg); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--s-10);
}
/* Marka tonu: mor SaaS gradyanı yerine grafit zemin + ince altın ışık.
   Izgara deseni kaldırıldı (şablon hissi veriyordu). */
.auth__aside::before {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,162,54,.16), transparent 70%);
  top: -220px; right: -200px;
}
.auth__aside::after {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,162,54,.08), transparent 72%);
  bottom: -150px; left: -110px;
}
.auth__quote { position: relative; z-index: 1; }
.auth-grid { display: none; }

/* --------------------------------------------------------------------------
   15. Duyarlılık
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .editor { grid-template-columns: minmax(0, 1fr) 280px; }
  .editor__nav { display: none; }
}
@media (max-width: 1024px) {
  .u-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__aside { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* Ekran dışına almak için transform yerine `left`: transform'un devre dışı
     bırakıldığı ortamlarda da menü gerçekten gizli kalır. */
  .side {
    position: fixed; top: 0; width: var(--side-w);
    left: calc(var(--side-w) * -1);
    transition: left var(--dur-slow) var(--ease-out);
  }
  .app.is-open .side { left: 0; box-shadow: var(--sh-lg); }
  .app.is-open .side-scrim { position: fixed; inset: 0; z-index: 29; background: rgba(12,15,20,.45); }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor__side { position: static; }
  .setting-row { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .page { padding: var(--s-4); }
  .topbar { padding: 0 var(--s-4); }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head__actions { margin-left: 0; }
  .u-grid-2, .u-grid-3, .u-grid-4 { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 861px) { .side-toggle, .side-scrim { display: none; } }

/* --------------------------------------------------------------------------
   16. Zengin metin editörü
   -------------------------------------------------------------------------- */
.editor-rt { border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.editor-rt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.editor-rt__bar {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-soft);
}
.editor-rt__btn {
  min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--text-muted); cursor: pointer;
  font-size: var(--fs-xs); line-height: 1; display: grid; place-items: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.editor-rt__btn:hover { background: var(--surface-sunk); color: var(--text); }
.editor-rt__sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }
.editor-rt__area {
  min-height: 200px; max-height: 520px; overflow-y: auto;
  padding: var(--s-4); font-size: var(--fs-sm); line-height: var(--lh-loose); color: var(--text);
  outline: 0;
}
.editor-rt__area:empty::before { content: attr(data-placeholder); color: var(--text-faint); }
.editor-rt__area h2 { font-size: var(--fs-lg); font-weight: var(--fw-semi); margin: var(--s-4) 0 var(--s-2); }
.editor-rt__area h3 { font-size: var(--fs-md); font-weight: var(--fw-semi); margin: var(--s-3) 0 var(--s-2); }
.editor-rt__area p { margin: 0 0 var(--s-3); }
.editor-rt__area ul, .editor-rt__area ol { margin: 0 0 var(--s-3); padding-left: 22px; }
.editor-rt__area li { margin-bottom: 4px; }
.editor-rt__area a { color: var(--accent); text-decoration: underline; }

/* Yan navigasyonu dar olan editör (ayarlar) — satır içi stil kullanılırsa
   mobil medya sorgusu ezilir ve içerik 200px'e sıkışır. */
.editor--narrow-nav { grid-template-columns: 210px minmax(0, 1fr); }
/* İki eşit sütun (aktarma) ve içerik + panel (anasayfa düzeni, tema) */
.editor-split { display: grid; gap: var(--s-6); align-items: start; grid-template-columns: minmax(0, 1fr) 420px; }
.editor-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.editor-split--list { grid-template-columns: 280px minmax(0, 1fr); }
.editor-split--media { grid-template-columns: 220px minmax(0, 1fr); }

@media (max-width: 959px) {
  .editor--narrow-nav { grid-template-columns: minmax(0, 1fr); }
  .editor-split, .editor-split--even, .editor-split--list, .editor-split--media {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   17. Liste okunabilirliği + yardım ipucu + modül renkleri
   -------------------------------------------------------------------------- */

/* Zebra: uzun listede satır takibi. Ton farkı BİLEREK çok az —
   fazlası tabloyu gürültülü yapıyor, azı okunabilirliği artırmıyor. */
.table tbody tr:nth-child(even) { background: var(--row-alt); }
.table tbody tr:nth-child(even):hover,
.table tbody tr:hover { background: var(--row-hover); }
.table tbody tr.is-selected,
.table tbody tr.is-selected:nth-child(even) { background: var(--accent-soft); }

/* Satıra tıklayınca detaya git — 3 nokta menüsünü aramaya gerek kalmasın.
   İçindeki düğme/bağlantı/onay kutusu tıklaması satırı tetiklemez (JS'te). */
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-clickable:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}

/* Sürüklenebilir satır listeleri de zebra alsın */
.sortable-row:nth-child(even) { background: var(--row-alt); }

/* Yardım ipucu — alan adının yanındaki küçük soru işareti */
.hint-dot {
  display: inline-grid; place-items: center;
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  margin-left: 5px; vertical-align: middle;
  background: var(--surface-sunk); color: var(--text-muted);
  font-size: var(--fs-2xs); font-weight: 700; line-height: 1; cursor: help;
  border: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.hint-dot:hover, .hint-dot:focus-visible { background: var(--accent); color: #fff; border-color: var(--accent); }

.hint { position: relative; display: inline-flex; align-items: center; }
.hint__bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  z-index: var(--z-tooltip, 110);
  width: max-content; max-width: 280px;
  padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--n-900); color: #fff;
  font-size: var(--fs-xs); font-weight: 400; line-height: 1.55; text-align: left;
  box-shadow: var(--sh-md);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.hint__bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--n-900);
}
.hint:hover .hint__bubble,
.hint:focus-within .hint__bubble { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Kenara taşmasın diye hizalama seçenekleri */
.hint__bubble--start { left: 0; transform: translateX(0) translateY(4px); }
.hint__bubble--start::after { left: 12px; }
.hint:hover .hint__bubble--start,
.hint:focus-within .hint__bubble--start { transform: translateX(0) translateY(0); }
.hint__bubble--end { left: auto; right: 0; transform: translateX(0) translateY(4px); }
.hint__bubble--end::after { left: auto; right: 12px; }
.hint:hover .hint__bubble--end,
.hint:focus-within .hint__bubble--end { transform: translateX(0) translateY(0); }

/* --------------------------------------------------------------------------
   18. Kategori ağacı (Shopify tarzı) — hiyerarşi görünür olmalı
   -------------------------------------------------------------------------- */
.tree { padding: var(--s-2); }

.tree-node { position: relative; }

/* Alt kategoriler: sol kılavuz çizgisi hiyerarşiyi gösterir.
   Girinti tek başına yetmiyordu — "bu hangi kategorinin altı?" sorusu kalıyordu. */
.tree-children {
  position: relative;
  margin-left: 22px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.tree-children::before {
  content: ""; position: absolute; left: -1px; bottom: 0;
  width: 1px; height: 14px; background: var(--surface);   /* son çocuktan sonrasını kes */
}

.tree-item {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 8px var(--s-3) 8px 6px;
  border-radius: var(--r-sm);
  cursor: pointer; user-select: none;
  transition: background var(--dur-fast) var(--ease);
}
.tree-item:hover { background: var(--surface-soft); }
.tree-item.is-active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.tree-item.is-off { opacity: .55; }

/* Açma/kapama oku — çocuğu yoksa yer tutar ama görünmez */
.tree-toggle {
  width: 20px; height: 20px; flex: none; border: 0; background: none; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: var(--text-faint);
  border-radius: 4px;
}
.tree-toggle:hover { background: var(--surface-sunk); color: var(--text); }
.tree-toggle svg { width: 13px; height: 13px; transition: transform var(--dur-fast) var(--ease); }
.tree-toggle.is-open svg { transform: rotate(0deg); }
.tree-toggle.is-closed svg { transform: rotate(-90deg); }
.tree-toggle--empty { visibility: hidden; }

.tree-icon { width: 18px; height: 18px; flex: none; color: var(--text-faint); }
.tree-item.is-active .tree-icon { color: var(--accent); }

.tree-name { flex: 1 1 auto; min-width: 0; font-size: var(--fs-sm); overflow: hidden;
             text-overflow: ellipsis; white-space: nowrap; }
.tree-item--parent .tree-name { font-weight: var(--fw-medium); }

/* Ürün sayısı — her zaman görünür, sayı 0 ise soluk */
.tree-count {
  flex: none; min-width: 26px; text-align: center;
  padding: 1px 6px; border-radius: 99px;
  background: var(--surface-sunk); color: var(--text-muted);
  font-size: var(--fs-2xs); font-variant-numeric: tabular-nums;
}
.tree-count--zero { opacity: .45; }

/* Satır işlemleri yalnız üzerine gelince — liste sakin kalsın */
.tree-actions { display: flex; gap: 2px; flex: none; opacity: 0;
                transition: opacity var(--dur-fast) var(--ease); }
.tree-item:hover .tree-actions,
.tree-item:focus-within .tree-actions { opacity: 1; }

.tree-grip { opacity: 0; cursor: grab; color: var(--text-faint); display: grid;
             place-items: center; width: 16px; flex: none; touch-action: none; }
.tree-item:hover .tree-grip { opacity: .6; }

@media (max-width: 640px) {
  /* Dokunmatikte hover yok — işlemler hep görünsün */
  .tree-actions, .tree-grip { opacity: 1; }
}

/* --------------------------------------------------------------------------
   19. Modül renkleri — panel "soğuk" görünmesin
   -------------------------------------------------------------------------- */

/* Renkli ikon kutusu. `data-tint` ile renk seçilir. */
.tint-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--tint-bg, var(--surface-sunk));
  color: var(--tint, var(--text-muted));
}
.tint-icon svg { width: 17px; height: 17px; }
.tint-icon--sm { width: 26px; height: 26px; border-radius: 8px; }
.tint-icon--sm svg { width: 14px; height: 14px; }

[data-tint="indigo"] { --tint: var(--t-indigo); --tint-bg: var(--t-indigo-bg); }
[data-tint="green"]  { --tint: var(--t-green);  --tint-bg: var(--t-green-bg); }
[data-tint="blue"]   { --tint: var(--t-blue);   --tint-bg: var(--t-blue-bg); }
[data-tint="rose"]   { --tint: var(--t-rose);   --tint-bg: var(--t-rose-bg); }
[data-tint="violet"] { --tint: var(--t-violet); --tint-bg: var(--t-violet-bg); }
[data-tint="teal"]   { --tint: var(--t-teal);   --tint-bg: var(--t-teal-bg); }
[data-tint="orange"] { --tint: var(--t-orange); --tint-bg: var(--t-orange-bg); }
[data-tint="slate"]  { --tint: var(--t-slate);  --tint-bg: var(--t-slate-bg); }

/* Renkli KPI kartı — üstte ince şerit, rakam kendi renginde */
.kpi-card { position: relative; }
.kpi-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tint, var(--accent));
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.kpi-card .kpi__value { color: var(--tint, var(--text)); }

/* Sol menü grup başlığındaki renk noktası */
.side-group__dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--tint, var(--side-title));
}

/* --------------------------------------------------------------------------
   20. Vitrin bölüm önizlemesi — kesikli kutu yerine gerçek taslak
   -------------------------------------------------------------------------- */
.mock { border-radius: var(--r-sm); overflow: hidden; margin-bottom: 10px; }
.mock__label {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; font-size: var(--fs-2xs); font-weight: var(--fw-medium);
  background: var(--tint-bg); color: var(--tint);
}
.mock__body { padding: 8px; background: var(--surface); border: 1px solid var(--border); border-top: 0; }

.mock-hero { height: 62px; border-radius: 4px; background: linear-gradient(115deg, var(--tint) 0%, var(--tint-bg) 130%); position: relative; }
.mock-hero::after {
  content: ""; position: absolute; left: 10px; bottom: 10px;
  width: 46%; height: 7px; border-radius: 3px; background: rgba(255,255,255,.75);
}
.mock-row { display: flex; gap: 6px; }
.mock-tile { flex: 1; height: 40px; border-radius: 4px; background: var(--surface-sunk); }
.mock-card { flex: 1; }
.mock-card__img { height: 34px; border-radius: 4px; background: var(--surface-sunk); }
.mock-card__line { height: 5px; border-radius: 3px; background: var(--surface-sunk); margin-top: 5px; }
.mock-card__price { height: 6px; width: 46%; border-radius: 3px; background: var(--tint); opacity: .55; margin-top: 4px; }
.mock-band { height: 26px; border-radius: 4px; background: var(--tint-bg); border: 1px dashed var(--tint); opacity: .8; }
.mock-strip { display: flex; gap: 6px; }
.mock-chip { flex: 1; height: 20px; border-radius: 99px; background: var(--surface-sunk); }

/* --------------------------------------------------------------------------
   21. Kontrol paneli — yoğun istatistik ekranı
   -------------------------------------------------------------------------- */
.stat-grid {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .stat-grid { grid-template-columns: minmax(0, 1fr); } }

.stat {
  /* DİKKAT: overflow:hidden KULLANMA — yardım balonunu kutunun içinde kesiyor.
     Renk şeridi kendi köşe yuvarlaklığını taşıyor, kırpmaya gerek yok. */
  position: relative;
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tint, var(--accent));
  border-radius: var(--r-md) 0 0 var(--r-md);
}
.stat__head { display: flex; align-items: center; gap: var(--s-2); margin-bottom: 10px; }
.stat__label { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-medium); }
.stat__value { font-size: var(--fs-2xl); font-weight: var(--fw-semi); line-height: 1.1;
               font-variant-numeric: tabular-nums; color: var(--tint, var(--text)); }
.stat__foot { display: flex; align-items: center; gap: var(--s-2); margin-top: 8px; flex-wrap: wrap; }
.stat__sub { font-size: var(--fs-2xs); color: var(--text-faint); }

.delta { display: inline-flex; align-items: center; gap: 3px;
         font-size: var(--fs-2xs); font-weight: var(--fw-semi);
         padding: 2px 6px; border-radius: 99px; }
.delta--up   { background: var(--ok-bg);     color: var(--ok-text); }
.delta--down { background: var(--danger-bg); color: var(--danger-text); }
.delta--none { background: var(--surface-sunk); color: var(--text-faint); font-weight: 400; }

/* İki çizgili karşılaştırmalı sütun grafiği */
.chart2 { display: flex; align-items: stretch; gap: 4px; height: 150px; }
.chart2__col { flex: 1; min-width: 0; display: flex; flex-direction: column;
               justify-content: flex-end; gap: 5px; align-items: center; position: relative; }
.chart2__stack { width: 100%; flex: 1; display: flex; align-items: flex-end; gap: 2px; }
.chart2__bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--accent);
               min-height: 2px; transition: opacity var(--dur-fast) var(--ease); }
.chart2__bar--prev { background: var(--surface-sunk); }
.chart2__col:hover .chart2__bar { opacity: .75; }
.chart2__label { font-size: var(--fs-2xs); color: var(--text-faint); white-space: nowrap; }
/* 30-90 günlük seride her sütunun etiketi sığmaz; görünmeyenler yer kaplamadan
   gizlenir ama başlık (title) ipucunda tarih yine okunur. */
.chart2__label--hidden { visibility: hidden; }

/* Grafik altındaki küçük ölçü şeridi */
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
              gap: var(--s-3); padding-top: var(--s-4);
              border-top: 1px solid var(--border); }
.metric__val { font-size: var(--fs-lg); font-weight: var(--fw-semi); line-height: 1.2;
               font-variant-numeric: tabular-nums; }
.metric__lbl { display: flex; align-items: center; gap: 4px; margin-top: 2px;
               font-size: var(--fs-2xs); color: var(--text-faint); }
@media (max-width: 720px) { .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* -------------------------------------------------- arama sonucu seçim listesi
   Manuel siparişte müşteri/ürün ararken çıkan sonuç satırları. */
.pick-list { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.pick-list__row { display: flex; align-items: center; gap: var(--s-3); width: 100%;
                  padding: 9px var(--s-3); background: var(--surface); text-align: left;
                  transition: background var(--dur-fast) var(--ease); }
.pick-list__row + .pick-list__row { border-top: 1px solid var(--border); }
.pick-list__row:hover { background: var(--surface-soft); }
.pick-list__row > span { min-width: 0; }
.pick-list__row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Adet artır/azalt — sayı alanı ile düğmeler tek gövde */
.stepper { display: flex; align-items: stretch; max-width: 118px;
           border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.stepper button { width: 30px; flex: none; background: var(--surface-soft);
                  color: var(--text-muted); font-size: var(--fs-lg); line-height: 1;
                  transition: background var(--dur-fast) var(--ease); }
.stepper button:hover { background: var(--surface-sunk); color: var(--text); }
.stepper .input { border: 0; border-radius: 0; text-align: center; padding: 6px 2px;
                  font-variant-numeric: tabular-nums; min-width: 0; }
.stepper .input::-webkit-outer-spin-button,
.stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .input { -moz-appearance: textfield; }

/* Mali özet dökümü — muhasebe fişi mantığı: kalemler alt alta,
   toplam satırı vurgulu, eksiler ayrı renkte. */
.ledger { display: flex; flex-direction: column; }
.ledger__row { display: flex; align-items: baseline; gap: var(--s-3); padding: 9px 0; }
.ledger__row + .ledger__row { border-top: 1px solid var(--border); }
.ledger__name { flex: 1 1 auto; font-size: var(--fs-sm); }
.ledger__val { flex: none; font-size: var(--fs-sm); font-weight: var(--fw-medium);
               font-variant-numeric: tabular-nums; }
.ledger__row--eksi .ledger__val { color: var(--danger-text); }
.ledger__row--toplam { border-top: 2px solid var(--border-strong, var(--border)); }
.ledger__row--toplam .ledger__name { font-weight: var(--fw-semi); }
.ledger__row--toplam .ledger__val { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.ledger__row--alt { padding-top: 4px; padding-bottom: 4px; border-top: 0; }
.ledger__row--alt .ledger__name,
.ledger__row--alt .ledger__val { font-size: var(--fs-xs); color: var(--text-faint);
                                 font-weight: var(--fw-regular, 400); }

/* Dar kolonda yatay bar-row sıkışıyor: isim kırpılıyor, çubuk sıfıra iniyor.
   Bu varyantta isim ve değer üstte, çubuk altta tam genişlikte durur. */
.bar-stack { padding: 7px 0; }
.bar-stack + .bar-stack { border-top: 1px solid var(--border); }
.bar-stack__top { display: flex; align-items: baseline; gap: var(--s-2); margin-bottom: 5px; }
.bar-stack__name { flex: 1 1 auto; font-size: var(--fs-sm); overflow: hidden;
                   text-overflow: ellipsis; white-space: nowrap; }
.bar-stack__val { flex: none; font-size: var(--fs-xs); font-weight: var(--fw-semi);
                  font-variant-numeric: tabular-nums; color: var(--text-muted); }
.bar-stack__track { display: block; height: 6px; border-radius: 99px;
                    background: var(--surface-sunk); overflow: hidden; }
.bar-stack__fill { display: block; height: 100%; border-radius: 99px;
                   background: var(--tint, var(--accent)); }

/* Tek satırda yığılmış pay çubuğu (cihaz dağılımı) */
.split-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden;
             background: var(--surface-sunk); }
.split-bar__seg { background: var(--tint, var(--accent)); min-width: 3px; }
.split-bar__seg + .split-bar__seg { box-shadow: inset 1px 0 0 var(--surface); }

.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend__dot { width: 9px; height: 9px; border-radius: 3px; flex: none;
               background: var(--tint, var(--accent)); }

/* --------------------------------------------------------- Bekleyen işler
   TEK SATIR şerit. Önceki sürüm kart panosuydu: ekranın yarısını kaplıyor,
   asıl içeriği (grafikler, listeler) katlamanın altına itiyordu. Bilgi aynı
   kaldı — sayı, başlık, aciliyet, bekleme süresi — yalnız hacim küçüldü. */
.todo {
  display: flex; align-items: center; gap: var(--s-4);
  padding: 9px var(--s-4); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
}
.todo__ozet { display: flex; align-items: center; gap: 6px; flex: none;
              font-size: var(--fs-sm); color: var(--text-muted); white-space: nowrap; }
.todo__ozet b { font-size: var(--fs-md); font-weight: var(--fw-semi); color: var(--text);
                font-variant-numeric: tabular-nums; }
.todo__ozet i { font-style: normal; color: var(--text-faint); font-size: var(--fs-xs); }

.todo__nokta { width: 7px; height: 7px; border-radius: 50%; flex: none;
               background: var(--accent); margin-right: 2px; }
.todo__nokta.is-alarm { background: var(--danger); }

.todo__liste { display: flex; align-items: center; gap: 6px; flex: 1 1 auto;
               min-width: 0; overflow-x: auto; padding-left: var(--s-3);
               border-left: 1px solid var(--border);
               scrollbar-width: none; -ms-overflow-style: none;
               /* Sağ kenarda solma: şeridin devam ettiğini gösterir. Kaydırma
                  çubuğu gizli çünkü tek satırda çirkin duruyor ve yer kaplıyor. */
               -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
               mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); }
.todo__liste::-webkit-scrollbar { display: none; }
/* Hepsi sığıyorsa solma gereksiz — mask yalnız taşma varken anlamlı */
.todo__liste:not(:hover) { }

.todo__cip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 5px 10px 5px 8px; border-radius: 99px;
  background: var(--surface-soft); color: var(--text);
  font-size: var(--fs-xs); text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease);
}
.todo__cip:hover { background: var(--surface-sunk); }
.todo__cip svg { width: 13px; height: 13px; color: var(--tint, var(--accent)); }
.todo__cip b { font-variant-numeric: tabular-nums; font-weight: var(--fw-semi); }
.todo__cip span { color: var(--text-muted); }

/* Geciken iş kendini belli etmeli ama şeridi renk cümbüşüne çevirmemeli:
   yalnız gün sayısı rozeti renklenir. */
.todo__gun { font-style: normal; font-size: var(--fs-2xs); font-weight: var(--fw-semi);
             padding: 1px 5px; border-radius: 99px;
             background: var(--warn-bg); color: var(--warn-text); }
.todo__cip--kritik .todo__gun { background: var(--danger); color: #fff; }

.todo--clear { color: var(--text-muted); font-size: var(--fs-sm); }
.todo__check { display: inline-flex; align-items: center; justify-content: center;
               width: 22px; height: 22px; flex: none; border-radius: 50%;
               background: var(--ok-bg); color: var(--ok-text); }
.todo__check svg { width: 13px; height: 13px; }

@media (max-width: 860px) {
  .todo { flex-direction: column; align-items: stretch; gap: var(--s-2); }
  .todo__liste { padding-left: 0; border-left: 0; }
}

/* ------------------------------------------------------------- gösterge şeridi
   Sekiz ayrı kart yerine tek kart içinde ayraçlı hücreler. Aynı kutunun
   sekiz kez tekrarı "hazır şablon" görüntüsü veriyordu. */
/* Sütun sayısı DashboardService::kpis() ile aynı olmalı (6). Gösterge sayısı
   değişirse aşağıdaki üç kırılım noktası da güncellenmeli, yoksa şeritte
   ya boşluk kalır ya da hücreler taşar. */
.kpi-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-cell { padding: 13px var(--s-3); min-width: 0; }
.kpi-cell + .kpi-cell { border-left: 1px solid var(--border); }

.kpi-cell__ust { display: flex; align-items: center; gap: 4px; margin-bottom: 7px;
                 font-size: var(--fs-2xs); color: var(--text-muted); }
.kpi-cell__ust svg { width: 13px; height: 13px; flex: none; color: var(--tint, var(--accent)); }
.kpi-cell__ust span { flex: 1 1 auto; min-width: 0; overflow: hidden;
                      text-overflow: ellipsis; white-space: nowrap; }

.kpi-cell__deger { font-size: var(--fs-xl); font-weight: var(--fw-semi); line-height: 1.15;
                   font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-cell__alt { display: flex; align-items: center; gap: 5px; margin-top: 5px;
                 min-height: 17px; }
.kpi-cell__not { font-size: var(--fs-2xs); color: var(--text-faint);
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-cell .delta { padding: 1px 5px; font-size: var(--fs-2xs); }

@media (max-width: 1400px) { .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-cell:nth-child(3n+1) { border-left: 0; }
  .kpi-cell:nth-child(n+4) { border-top: 1px solid var(--border); } }
@media (max-width: 820px)  { .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-cell { border-left: 0 !important; }
  .kpi-cell:nth-child(2n) { border-left: 1px solid var(--border) !important; }
  .kpi-cell:nth-child(n+3) { border-top: 1px solid var(--border); } }


/* Yatay pay çubukları (durum, ödeme, şehir) */
.bar-row { display: flex; align-items: center; gap: var(--s-3); padding: 7px 0; }
.bar-row + .bar-row { border-top: 1px solid var(--border); }
.bar-row__name { flex: 0 0 34%; font-size: var(--fs-sm); overflow: hidden;
                 text-overflow: ellipsis; white-space: nowrap; }
/* DİKKAT: ikisi de <span> olarak kullanılıyor — display:block olmazsa
   satır içi eleman kalır ve width/height hiç uygulanmaz, çubuk boş görünür. */
.bar-row__track { display: block; flex: 1 1 auto; height: 8px; border-radius: 99px;
                  background: var(--surface-sunk); overflow: hidden; }
.bar-row__fill { display: block; height: 100%; border-radius: 99px;
                 background: var(--tint, var(--accent)); }
.bar-row__val { flex: none; min-width: 80px; text-align: right;
                font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

/* Halka (donut) — müşteri dağılımı gibi iki-üç dilimli veriler için */
.donut { width: 116px; height: 116px; border-radius: 50%; flex: none;
         display: grid; place-items: center; position: relative; }
.donut::after {
  content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--surface);
}
.donut__center { position: relative; z-index: 1; text-align: center; }

/* Sıralı liste (çok satanlar) */
.rank { display: flex; align-items: center; gap: var(--s-3); padding: 8px 0; }
.rank + .rank { border-top: 1px solid var(--border); }
.rank__no { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid;
            place-items: center; font-size: var(--fs-2xs); font-weight: var(--fw-semi);
            background: var(--surface-sunk); color: var(--text-muted); }
.rank__no--top { background: var(--tint-bg, var(--accent-soft)); color: var(--tint, var(--accent)); }
.rank__body { flex: 1 1 auto; min-width: 0; }
.rank__name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   22. Ürün başlığı — "hangi ürüne bakıyorum, durumu ne?" tek bakışta
   -------------------------------------------------------------------------- */
.entity-head {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: var(--s-5);
}
.entity-head__img {
  width: 84px; height: 84px; flex: none; border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-sunk); display: grid; place-items: center; color: var(--text-faint);
  border: 1px solid var(--border);
}
.entity-head__img img { width: 100%; height: 100%; object-fit: cover; }
.entity-head__body { flex: 1 1 auto; min-width: 0; }
.entity-head__title { font-size: var(--fs-xl); font-weight: var(--fw-semi); line-height: 1.25; }
.entity-head__meta { display: flex; align-items: center; gap: var(--s-3);
                     margin-top: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); }

/* Başlığın altındaki rakam şeridi */
.entity-stats { display: flex; gap: var(--s-5); margin-top: var(--s-4); flex-wrap: wrap; }
.entity-stat { min-width: 92px; }
.entity-stat__label { display: flex; align-items: center; gap: 3px;
                      font-size: var(--fs-2xs); color: var(--text-muted); }
.entity-stat__value { font-size: var(--fs-lg); font-weight: var(--fw-semi);
                      font-variant-numeric: tabular-nums; margin-top: 2px;
                      color: var(--tint, var(--text)); }

/* Bölüm navigasyonunda renkli ikon */
.editor__nav button { display: flex; align-items: center; gap: var(--s-2); }
.editor__nav .nav-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--tint, var(--border-strong));
  opacity: .55; transition: opacity var(--dur-fast) var(--ease);
}
.editor__nav button.is-active .nav-dot { opacity: 1; }

/* Fiyat kutusu — sayılar öne çıksın */
.price-box {
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.price-box__row { display: flex; align-items: center; justify-content: space-between;
                  padding: 9px var(--s-4); font-size: var(--fs-sm); }
.price-box__row + .price-box__row { border-top: 1px solid var(--border); }
.price-box__row--total { background: var(--accent-soft); font-weight: var(--fw-semi); }
.price-box__row--total .price-box__val { color: var(--accent); font-size: var(--fs-md); }
.price-box__val { font-variant-numeric: tabular-nums; }

/* ===================================================== bildirim açılırı
   Üst çubuktaki zil. Menü rozetleri kaldırıldığı için bekleyen işlerin
   tek toplandığı yer burası. */
.bildirim { position: relative; }

.bildirim__panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: var(--z-dropdown, 90);
  width: 268px; padding: var(--s-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
}
.bildirim__panel[hidden] { display: none; }

.bildirim__baslik {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-2) var(--s-3) var(--s-3);
  font-size: var(--fs-xs); font-weight: var(--fw-semi);
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
}
.bildirim__baslik span { color: var(--danger); }

.bildirim__satir {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 9px var(--s-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--text);
  transition: background var(--dur-fast) var(--ease);
}
.bildirim__satir:hover { background: var(--surface-sunk); }
.bildirim__satir b { color: var(--danger); }

.bildirim__bos {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3); font-size: var(--fs-sm); color: var(--text-muted);
}
.bildirim__bos svg { width: 16px; height: 16px; color: var(--ok); }

/* Tablo içindeki sayılar ASLA kırılmaz: "₺4.544,00" veya "#2026-000142"
   iki satıra bölününce satır yüksekliği oynuyor ve liste dalgalı görünüyor.
   Metin sütunları (ürün adı, müşteri adı) sarmaya devam eder. */
.table .u-num { white-space: nowrap; }

/* Düğme bekleme göstergesi — Livewire isteği sürerken ikonun yerini alır.
   Boyut ikonla aynı (17px) tutuldu; farklı olursa düğme genişliği oynuyor
   ve yanındaki düğmeler her tıklamada zıplıyor. */
.btn__spin {
  width: 17px; height: 17px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; opacity: .65;
  animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.btn:disabled, .btn[disabled] { opacity: .55; pointer-events: none; }

/* Hareketi azaltma tercihi — panelde dönen gösterge, geçiş ve kayan animasyon
   var; işletim sisteminde "hareketi azalt" seçen kullanıcı için susturulur.
   Gösterge KAYBOLMAZ, yalnız dönmez: bekleme bilgisi erişilebilirlikten
   önemsiz değil. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .btn__spin { border-right-color: currentColor; opacity: .4; }
}

/* ================================================== üst çubuk — dar ekran
   390px'te `.topbar__search` tek başına 260px min-width istiyordu; hamburger
   ve yatay dolgu düşünce eylemlere ~50px kalıyor, kullanıcı adı ve ÇIKIŞ
   DÜĞMESİ ekranın dışında kalıyordu. Sayfa kaymadığı için düğme görünmez ve
   ulaşılmaz oluyordu: telefondan çıkış yapmanın hiçbir yolu yoktu.

   Çözüm: aramayı daralt, kullanıcı ADINI gizle (avatar kalır), dolguyu azalt.
   Çıkış ve zil her genişlikte erişilebilir kalmalı. */
@media (max-width: 720px) {
  .topbar { padding: 0 var(--s-3); gap: var(--s-2); }

    /* nowrap: yer daralınca "Ara veya komut çalıştır…" ikiye bölünüp çubuğu
     yükseltiyordu; metin kesilmeli, sarmamalı. */
  .topbar__search { min-width: 0; flex: 1 1 auto; }
  .topbar__search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar__search kbd { display: none; }          /* telefonda klavye kısayolu yok */

  .user-btn > .u-sm { display: none; }            /* isim gizlenir, avatar kalır */
  .topbar__sep { display: none; }
}

/* Çok dar (≤380px): arama yalnız ikon olur, metin yerini eylemlere bırakır */
@media (max-width: 380px) {
  .topbar__search { flex: none; width: 34px; padding: 0; justify-content: center; }
  .topbar__search span { display: none; }
}

/* ============================================ içerik + yan panel ızgarası
   KURAL (bir kez daha): düzen kararı SINIFTA olur, satır içi stilde değil.
   `style="grid-template-columns:…"` yazıldığında medya sorgusu onu EZEMEZ;
   sipariş detayı 390px'lik ekranda 197px + 141px diye iki sütuna sıkışıyor,
   zaman çizelgesi ve kalem tablosu okunamaz hâle geliyordu.

   Oranlar da tekleştirildi: aynı işi yapan yedi ekran 1.2 / 1.3 / 1.4 / 1.6 /
   1.7 gibi keyfi değerler kullanıyordu ve panel ekrandan ekrana kayıyordu. */
.icerik-yan { display: grid; gap: var(--s-5); align-items: start; }

/* Sabit genişlikte yan panel — sipariş detayı, manuel sipariş */
.icerik-yan--panel { grid-template-columns: minmax(0, 1fr) 340px; }

/* Oransal iki sütun — kontrol paneli, raporlar */
.icerik-yan--genis { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }

/* Yan panel yalnız düzenlerken açılıyor (markalar) */
.icerik-yan--kosullu { grid-template-columns: minmax(0, 1fr) 360px; }
.icerik-yan--kapali { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1100px) {
  .icerik-yan--panel, .icerik-yan--genis, .icerik-yan--kosullu {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Dar ekranda dönem seçici sığmazsa kırılmak yerine yatay kayar */
@media (max-width: 720px) {
  .page-head__actions { flex-wrap: wrap; }
  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
}

/* Tek başına duran vurgulu rakam (ör. terk edilen sepet tutarı) — ölçeğin
   bir üst adımı, keyfi bir ara değer değil. Rengi data-tint'ten alır. */
.stat__value--buyuk { font-size: var(--fs-3xl); color: var(--tint, var(--text)); }

/* İkon sarmalayıcı — bekleme göstergesiyle yer değiştirebilmesi için.
   Boyutu ikonla aynı; farklı olursa düğme her tıklamada genişlik değiştirir. */
.btn__ico { display: inline-flex; width: 17px; height: 17px; flex: none; }

/* "+KDV" işareti — fiyatın yanında, satırı uzatmadan.
   Alt satır olarak yazıldığında yalnız bazı ürünlerde çıkıyor ve tablo
   satırları 62px ile 81px arasında dalgalanıyordu. */
.tag-kdv {
  /* line-height sabit: rozet satır kutusunu yükseltirse hücre 3px uzuyor
     ve rozetli satırlar diğerlerinden hafifçe ayrılıyor. */
  display: inline-block; margin-left: 6px; padding: 0 5px; line-height: 16px;
  border-radius: 4px; vertical-align: middle;
  font-size: var(--fs-2xs); font-weight: var(--fw-semi);
  color: var(--warn-text); background: var(--warn-bg);
  cursor: help;
}

/* Nötr satır içi işaret — varyant sayısı gibi bağlam bilgisi.
   `.tag-kdv` ile aynı ölçü; ikisi de satır yüksekliğini değiştirmez. */
.tag-notr {
  /* line-height sabit: rozet satır kutusunu yükseltirse hücre 3px uzuyor
     ve rozetli satırlar diğerlerinden hafifçe ayrılıyor. */
  display: inline-block; margin-left: 6px; padding: 0 5px; line-height: 16px;
  border-radius: 4px; vertical-align: middle;
  font-size: var(--fs-2xs); font-weight: var(--fw-semi);
  color: var(--text-muted); background: var(--surface-sunk);
  cursor: help;
}

/* Atlama bağlantısı — ekran dışında durur, Tab ile odaklanınca belirir.
   `display:none` KULLANILMAZ: gizlenen eleman odaklanamaz, bağlantı da işe
   yaramaz. Konumla kaçırılıp odakta geri getirilir. */
.atla {
  position: fixed; top: 8px; left: -9999px; z-index: 200;
  padding: 10px var(--s-4); border-radius: var(--r-sm);
  background: var(--accent); color: #fff;
  font-size: var(--fs-sm); font-weight: var(--fw-semi);
}
.atla:focus { left: 8px; }

/* ================================================ zamanlayıcı uyarısı
   Cron kurulmamışsa otomasyon/hatırlatma/yedek sessizce çalışmaz. Uyarı
   kapatılabilir DEĞİL: kapatılabilseydi bir kez kapatılır ve mağaza aylarca
   çalışmayan otomasyonlarla yaşardı. */
.cron-uyari {
  display: flex; gap: var(--s-3); align-items: flex-start;
  margin: var(--s-4) var(--s-6) 0;
  padding: var(--s-4);
  background: var(--warn-bg); color: var(--warn-text);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  border-radius: var(--r-md);
}
.cron-uyari__ikon svg { width: 18px; height: 18px; flex: none; }
.cron-uyari__komut {
  display: block; margin-top: var(--s-2); padding: 8px 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs); overflow-x: auto; white-space: nowrap;
}
@media (max-width: 720px) { .cron-uyari { margin: var(--s-3) var(--s-3) 0; } }
