/* ============================================================
   manosdepot — tasarım sistemi
   Koyu "premium hesap aracı" · BDO altın/parşömen ruhu (oyun UI taklidi değil)
   ============================================================ */

:root {
  --bg:        #0E1013;
  --surface:   #171A1F;
  --surface-2: #1E232B;
  --surface-3: #252B34;
  --border:    #2A303A;
  --border-2:  #363E4A;
  --accent:    #C9A227;   /* altın */
  --accent-2:  #E0C868;
  --accent-soft:#D9BE7B;
  --text:      #E8E6E1;
  --muted:     #98A0AB;
  --muted-2:   #6B7280;
  --profit:    #4CAF7D;
  --profit-bg: rgba(76,175,125,.12);
  --loss:      #E05A4E;
  --loss-bg:   rgba(224,90,78,.12);
  --warn:      #E0A83C;
  --warn-bg:   rgba(224,168,60,.12);
  --info:      #5B9BD5;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --sidebar-w: 244px;
  --topbar-h:  60px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--accent-2); }

h1,h2,h3,h4 { font-weight: 650; letter-spacing: -.01em; margin: 0 0 .4em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }

::selection { background: rgba(201,162,39,.32); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #454e5c; }

/* ============================================================ Uygulama kabuğu */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #141821 0%, #101318 100%);
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.brand {
  display: flex; align-items: center; gap: .65rem;
  padding: 1.15rem 1.25rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: radial-gradient(120% 120% at 30% 20%, var(--accent-2), var(--accent) 55%, #8a6f16);
  display: grid; place-items: center;
  color: #1a1500; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 2px 10px rgba(201,162,39,.35), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand-name { font-weight: 700; font-size: 1.08rem; letter-spacing: -.02em; line-height: 1.1; }
.brand-name b { color: var(--accent-2); font-weight: 800; }
.brand-sub { font-size: .64rem; color: var(--muted-2); letter-spacing: .14em; text-transform: uppercase; }

.nav-list { padding: .75rem .6rem; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem .7rem; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; font-size: .95rem;
  transition: background .12s, color .12s; cursor: pointer; text-decoration: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-3); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active .nav-ico { color: var(--accent); }
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted-2); }

.sidebar-foot { padding: .8rem 1rem; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted-2); }

/* ---- Ana alan ---- */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem;
}
/* Buzlu cam efekti pseudo-öğede: backdrop-filter'ı topbar'a koymak onu position:fixed alt
   öğeler için "containing block" yapıp modal'ı topbar'a hapsediyordu. Pseudo'da efekt korunur,
   modal (position:fixed) viewport'a göre ortalanır. */
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(14,16,19,.82); backdrop-filter: blur(8px);
}
.topbar-title { font-weight: 650; font-size: 1.02rem; }
.topbar-spacer { flex: 1; }

.content { padding: 1.6rem 1.75rem 3rem; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ============================================================ Çipler / rozetler */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.chip.region { color: var(--accent-soft); border-color: rgba(201,162,39,.35); }
.chip.region .dot { background: var(--accent); }
.chip.net .dot { background: var(--profit); }
.chip.fresh .dot { background: var(--info); }
.chip.demo { color: var(--warn); border-color: rgba(224,168,60,.4); background: var(--warn-bg); }

/* ---- Topbar global eşya arama ---- */
.gsearch { position: relative; display: inline-flex; align-items: center; }
.gsearch-ico { position: absolute; left: .55rem; color: var(--muted-2); pointer-events: none; }
.gsearch-input {
  width: 190px; padding: .38rem .6rem .38rem 1.7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: .82rem; transition: width .15s, border-color .15s;
}
.gsearch-input:focus { width: 230px; outline: none; border-color: var(--accent); }
.gsearch-hint { position: absolute; right: .6rem; font-size: .72rem; color: var(--muted-2); pointer-events: none; }
.gsearch-drop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 90;
  width: 300px; max-height: 340px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); padding: .25rem;
}
.gsearch-hit { display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; border-radius: 6px; cursor: pointer; }
.gsearch-hit:hover, .gsearch-hit.on { background: var(--surface-3); }
.gsearch-hit .gs-name { flex: 1; font-size: .85rem; color: var(--text); }
.gsearch-hit .gs-stock { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gsearch-hit .gs-stock.zero { color: var(--warn); }

/* ---- Arama sonucu modalı ---- */
.modal-box.gs-modal { max-width: 880px; width: min(94vw, 880px); overflow-y: auto; }
/* Üreten reçete seçici sekmeleri */
.gs-recipe-tabs { display: flex; flex-direction: column; gap: 4px; }
.gs-recipe-tab {
  display: flex; align-items: center; gap: .5rem; padding: .4rem .55rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color .1s, background .1s;
}
.gs-recipe-tab:hover { background: var(--surface-3); }
.gs-recipe-tab.on { border-color: var(--accent); background: var(--surface-3); box-shadow: inset 2px 0 0 var(--accent); }
.gs-recipe-tab img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.gs-recipe-tab .grt-name { flex: 1; font-size: .84rem; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Bununla neler üretilebilir */
.gs-section { border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .7rem; }
.gs-uses { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 5px; }
.gs-use {
  display: flex; align-items: center; gap: .45rem; padding: .35rem .5rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color .1s, background .1s;
}
.gs-use:hover { border-color: var(--accent); background: var(--surface-3); }
.gs-use img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.gs-use .gu-name { flex: 1; font-size: .82rem; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-use .gu-qty { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.gs-stats { display: flex; flex-direction: column; gap: .22rem; border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .7rem; }
.gs-stat { display: flex; justify-content: space-between; gap: 1rem; font-size: .84rem; color: var(--muted); }
.gs-stat b { color: var(--text); font-weight: 600; white-space: nowrap; }
.gs-stat.muted, .gs-stat.muted b { color: var(--muted-2); }
.gs-stat.warn b { color: var(--warn); }
.gs-plan { margin-top: .6rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.gs-plan.illiquid { opacity: .82; }
.gs-modb { padding: .5rem .6rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .18rem .5rem; border-radius: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.badge.tax-free { background: rgba(201,162,39,.16); color: var(--accent-2); border: 1px solid rgba(201,162,39,.3); }
.badge.market  { background: var(--surface-3); color: var(--muted); border: 1px solid var(--border-2); }
.badge.craft   { background: var(--profit-bg); color: var(--profit); }
.badge.sell    { background: var(--loss-bg); color: var(--loss); }
.badge.dead    { background: var(--loss-bg); color: var(--loss); border: 1px solid rgba(224,90,78,.3); }
.badge.ok      { background: var(--profit-bg); color: var(--profit); }

/* ============================================================ Kartlar */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}
.card-pad { padding: 1.15rem 1.25rem; }

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat {
  padding: 1.15rem 1.25rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.stat::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--accent); opacity:0; transition:opacity .15s; }
.stat:hover::before { opacity:.7; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: .5rem; display:flex; align-items:center; gap:.5rem; }
.stat-key { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stat-key.gold { background: var(--accent); box-shadow: 0 0 8px rgba(201,162,39,.5); }
.stat-key.green { background: var(--profit); box-shadow: 0 0 8px rgba(76,175,125,.4); }
.stat-key.red { background: var(--loss); box-shadow: 0 0 8px rgba(224,90,78,.4); }
.stat-value { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
.stat-sub { font-size: .82rem; color: var(--muted); margin-top: .35rem; }

/* ============================================================ Gümüş değerler */
.num { color: var(--text); }
.silver { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text); }
.silver .unit { font-size: .78em; color: var(--muted); font-weight: 500; margin-left: .18em; }
.pos { color: var(--profit); }
.neg { color: var(--loss); }

/* ============================================================ Plan kartları (MOD A) */
.plan-card { padding: 0; overflow: hidden; }
.plan-head {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: 1rem 1.2rem .85rem; border-bottom: 1px solid var(--border);
}
.plan-rank {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface-3); color: var(--accent-2);
  display: grid; place-items: center; font-weight: 800; font-size: .92rem;
}
.plan-title { font-weight: 650; font-size: 1.02rem; }
.plan-out { font-size: .84rem; color: var(--muted); margin-top: .12rem; }
.plan-body { padding: .9rem 1.2rem 1.1rem; display: flex; flex-direction: column; gap: .85rem; }

/* Katlanabilir plan kartı: özet (başlık + kâr) tıklanır; detaylar açılır/kapanır */
.plan-summary { cursor: pointer; user-select: none; }
.plan-summary .plan-head { border-bottom: none; padding-bottom: .55rem; }
.plan-summary .profit-row { padding: 0 1.2rem 1rem; }
.plan-card.open > .plan-summary { border-bottom: 1px solid var(--border); }
.plan-summary:hover .plan-title { color: var(--accent-2); }
.chevron { flex-shrink: 0; color: var(--muted); transition: transform .18s; margin-top: .25rem; }
.plan-card.open .chevron { transform: rotate(180deg); }
/* MOD B kartında da özet dikey yerleşim */
.plan-summary > .row { padding: 1rem 1.2rem .2rem; }
.plan-summary > .row.between:not(:first-child) { padding: .2rem 1.2rem; }

.profit-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.profit-box {
  padding: .7rem .85rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.profit-box .k { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.profit-box .v { font-size: 1.25rem; font-weight: 750; margin-top: .2rem; letter-spacing: -.01em; }
.profit-box.econ { background: var(--surface); }

.kv { font-size: .86rem; color: var(--muted); }
.kv b { color: var(--text); font-weight: 600; }

.revenue-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .92rem; }

.shop-list, .used-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .28rem .55rem; border-radius: 7px; font-size: .8rem;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.pill b { color: var(--text); font-weight: 600; }

/* ---- Üretim akışı (craft flow) ---- */
.craft-flow { display: flex; flex-direction: column; gap: .45rem; }
.flow-step {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .5rem .6rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.flow-step.final { background: rgba(201,162,39,.08); border-color: rgba(201,162,39,.3); }
.flow-num {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-3); color: var(--muted); font-size: .72rem; font-weight: 700;
  display: grid; place-items: center;
}
.flow-step.final .flow-num { background: var(--accent); color: #1a1500; }
.flow-inputs { display: flex; flex-wrap: wrap; gap: .3rem; flex: 1; min-width: 140px; }
.flow-pill {
  display: inline-flex; align-items: center; gap: .28rem;
  padding: .18rem .45rem; border-radius: 6px; font-size: .78rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.flow-pill img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.flow-pill b { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.flow-arrow { color: var(--muted-2); flex-shrink: 0; }
.flow-out {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; color: var(--text);
  padding: .2rem .5rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--border);
}
.flow-out img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.flow-out b { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.flow-out.final { background: rgba(201,162,39,.14); border-color: rgba(201,162,39,.35); font-weight: 600; }
/* Ara ürün: marketten al vs üret maliyet karşılaştırması */
.flow-cost { flex-basis: 100%; display: flex; align-items: center; gap: .5rem; margin: .35rem 0 0 28px; font-size: .78rem; }
.cost-opt { color: var(--muted); }
.cost-opt b { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: .2rem; }
.cost-opt.best { color: var(--profit); font-weight: 600; }
.cost-opt.best b { color: var(--profit); }
.cost-vs { color: var(--muted-2); }

.warn-band {
  display: flex; align-items: center; gap: .55rem;
  padding: .6rem .8rem; border-radius: var(--radius-sm);
  background: var(--warn-bg); border: 1px solid rgba(224,168,60,.35);
  color: var(--accent-2); font-size: .86rem; font-weight: 500;
}

.section-label { font-size: .74rem; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; }

/* ============================================================ Likidite (market gerçekliği) */
.liq-badge {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .35rem;
  padding: .12rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600;
  border: 1px solid var(--border-2);
}
.liq-badge .liq-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.liq-badge.ok       { color: var(--profit); background: var(--profit-bg); border-color: rgba(76,175,125,.3); }
.liq-badge.thin     { color: var(--warn);   background: var(--warn-bg);   border-color: rgba(224,168,60,.35); }
.liq-badge.illiquid { color: var(--loss);   background: var(--loss-bg);   border-color: rgba(224,90,78,.35); }
.liq-badge.unknown  { color: var(--muted);  background: var(--surface-3); border-color: var(--border); }

.liq-band {
  padding: .55rem .8rem; border-radius: var(--radius-sm); margin-bottom: .3rem;
  background: var(--surface-3); border: 1px solid var(--border);
}
.liq-band.illiquid { background: var(--loss-bg); border-color: rgba(224,90,78,.35); }
.liq-notes { margin: .45rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.liq-notes li { margin: .1rem 0; }

/* Gerçekleştirilemez (ilikit) reçete kartı: soluk, dipte */
.plan-card.illiquid { opacity: .58; filter: saturate(.7); }
.plan-card.illiquid:hover { opacity: .82; }
.plan-card.illiquid.open { opacity: 1; filter: none; }

/* ============================================================ Eşya bilgi kartı (hover) */
/* Kart açıkken overflow serbest — yoksa hover popover kart kenarında kesilir. */
.plan-card.open { overflow: visible; position: relative; z-index: 1; }
.plan-card.open:hover { z-index: 2; }

.pill-wrap { position: relative; display: inline-flex; }
.pill-wrap > .flow-pill { cursor: help; }
.item-card {
  position: absolute; z-index: 60; bottom: calc(100% + 6px); left: 0;
  min-width: 230px; max-width: 300px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: .7rem .8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(5px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
  pointer-events: none;
  display: flex; flex-direction: column; gap: .55rem;
  white-space: normal; text-align: left;
}
.pill-wrap:hover > .item-card { opacity: 1; visibility: visible; transform: translateY(0); }
.ic-head { display: flex; align-items: center; gap: .55rem; }
.ic-head img { width: 34px; height: 34px; border-radius: 6px; background: var(--surface-3); flex-shrink: 0; }
.ic-title { display: flex; flex-direction: column; min-width: 0; }
.ic-name { font-weight: 700; color: var(--text); font-size: .9rem; line-height: 1.2; }
.ic-en { font-size: .72rem; color: var(--muted-2); }
.ic-rows { display: flex; flex-direction: column; gap: .22rem; }
.ic-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; color: var(--muted); }
.ic-row b { color: var(--text); font-weight: 600; white-space: nowrap; }
.ic-row.muted, .ic-row.muted b { color: var(--muted-2); }
.ic-row.warn b { color: var(--warn); }
.ic-tag { font-size: .64rem; padding: .05rem .3rem; border-radius: 4px; margin-left: .2rem; }
.ic-tag.ok { background: var(--profit-bg); color: var(--profit); }
.ic-hint { margin-top: .1rem; font-size: .76rem; color: var(--accent-soft); border-top: 1px solid var(--border); padding-top: .4rem; }
.ic-pos { color: var(--profit) !important; }

/* Reçete başlığında ürün ikonu */
.plan-title { display: flex; align-items: center; gap: .45rem; }
.title-ico { width: 22px; height: 22px; border-radius: 5px; background: var(--surface-3); object-fit: contain; flex-shrink: 0; }

/* Depo hücresinde eşya kartı — hücre üstünde ortalanmış */
.wh-cell.filled > .item-card { left: 50%; right: auto; transform: translateX(-50%) translateY(5px); }
.wh-cell.filled:hover > .item-card { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ============================================================ İmparatorluk sayfası */
.tabs { display: inline-flex; gap: .3rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .25rem; }
.tab { border: none; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .88rem; padding: .4rem .9rem; border-radius: 7px; cursor: pointer; }
.tab.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.3); }

.imp-list { display: flex; flex-direction: column; gap: .6rem; }
.imp-card { padding: .8rem 1rem; border-left: 3px solid var(--border-2); overflow: visible; position: relative; z-index: 1; }
.imp-card.open { z-index: 2; }
.imp-foot { cursor: pointer; }
.imp-toggle { color: var(--accent-soft); font-weight: 600; }
.imp-detail { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.imp-drow { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.imp-drow:last-child { border-bottom: none; }
.imp-drow-top { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.imp-cmp { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; margin-left: auto; }
.imp-cmp .imp-line { color: var(--text); margin-left: .3rem; }
.imp-recipe { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .4rem; padding-left: 1rem; }

/* Özyinelemeli reçete ağacı */
.rtree-node { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .25rem 0; }
.rtree-info { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; margin-left: auto; }
.rtree-stok { color: var(--muted-2); }
.rtree-exp { border: none; background: var(--surface-3); color: var(--accent-soft); font: inherit; font-size: .72rem; padding: .1rem .45rem; border-radius: 5px; cursor: pointer; margin-left: .2rem; }
.rtree-exp:hover { background: var(--surface); }
.rtree-children { margin-left: 16px; padding-left: 12px; border-left: 1px dashed var(--border-2); }
.imp-card.pos { border-left-color: var(--profit); }
.imp-card.neg { border-left-color: var(--loss); opacity: .82; }
.imp-head { display: flex; align-items: flex-start; gap: .8rem; }
.imp-box-ico { width: 44px; height: 44px; border-radius: 8px; background: var(--surface-3); flex-shrink: 0; object-fit: contain; }
.imp-name { font-weight: 700; font-size: .98rem; margin-bottom: .35rem; }
.imp-dishes { display: flex; flex-wrap: wrap; gap: .3rem; }
.imp-dish { display: inline-flex; align-items: center; gap: .3rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .1rem .5rem; font-size: .78rem; color: var(--muted); }
.imp-dish img { width: 18px; height: 18px; }
.imp-dish b { color: var(--text); }
.imp-price { display: flex; flex-direction: column; gap: .2rem; align-items: flex-end; flex-shrink: 0; }
.imp-price .input { width: 130px; }
.imp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; padding-top: .55rem; border-top: 1px solid var(--border); flex-wrap: wrap; gap: .5rem; }
.imp-profit { font-size: .9rem; }
.imp-profit.pos b { color: var(--profit); }
.imp-profit.neg b { color: var(--loss); }

/* Arama açılır listesinde fiyat + stok */
.cd-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin-left: auto; }
.cd-stock { font-size: .68rem; color: var(--muted-2); white-space: nowrap; }
.cd-stock.zero { color: var(--warn); }

/* ============================================================ Tablolar */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
  text-align: left; padding: .7rem .9rem; font-size: .74rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
table.data td { padding: .68rem .9rem; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { background: var(--surface); transition: background .1s; }
table.data tbody tr:hover { background: var(--surface-2); }
td.right, th.right { text-align: right; }

/* ============================================================ Formlar & butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .58rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .92rem; cursor: pointer;
  border: 1px solid transparent; transition: background .12s, border-color .12s, transform .05s;
  font-family: var(--font); text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1a1500; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); color: #1a1500; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: transparent; color: var(--loss); border-color: rgba(224,90,78,.4); }
.btn-danger:hover { background: var(--loss-bg); }
.btn-sm { padding: .38rem .7rem; font-size: .84rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--loss-bg); color: var(--loss); border-color: rgba(224,90,78,.3); }

label.field { display: block; margin-bottom: 1rem; }
label.field > .lbl { display: block; font-size: .84rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
label.field > .hint { font-size: .78rem; color: var(--muted-2); margin-top: .25rem; }

.input, .textarea, select.input {
  width: 100%; padding: .6rem .75rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text);
  font-family: var(--font); font-size: .92rem; transition: border-color .12s, box-shadow .12s;
}
.input:focus, .textarea:focus, select.input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,162,39,.15);
}
.textarea { min-height: 150px; resize: vertical; font-variant-numeric: tabular-nums; line-height: 1.6; }

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 40px; height: 23px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; transition: background .15s; }
.switch .track::after { content:""; position:absolute; top:2px; left:2px; width:17px; height:17px; border-radius:50%; background:var(--muted); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: rgba(201,162,39,.3); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(17px); background: var(--accent); }

.segment { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.segment button {
  padding: .5rem .95rem; border-radius: 7px; border: none; cursor: pointer;
  background: transparent; color: var(--muted); font-weight: 600; font-size: .9rem; font-family: var(--font);
  transition: background .12s, color .12s;
}
.segment button.active { background: var(--surface-3); color: var(--text); }
.segment button .cnt { color: var(--muted-2); font-weight: 500; margin-left: .3rem; font-size: .82em; }

/* ============================================================ Yardımcılar */
.row { display: flex; align-items: center; gap: .6rem; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; }
.gap-sm { gap: .5rem; } .gap-md { gap: 1rem; } .gap-lg { gap: 1.5rem; }
.mt-1{margin-top:.5rem} .mt-2{margin-top:1rem} .mt-3{margin-top:1.5rem} .mb-2{margin-bottom:1rem}
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.center { text-align: center; }
.flex1 { flex: 1; }

.empty {
  padding: 3rem 1.5rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--border-2); border-radius: var(--radius); background: var(--surface);
}
.empty .big { font-size: 2.2rem; margin-bottom: .6rem; opacity: .6; }

.page-head { margin-bottom: 1.4rem; }
.page-head p { color: var(--muted); margin: .2rem 0 0; font-size: .92rem; }

.alert { padding: .7rem .9rem; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 1rem; }
.alert-ok { background: var(--profit-bg); color: var(--profit); border: 1px solid rgba(76,175,125,.3); }
.alert-err { background: var(--loss-bg); color: var(--loss); border: 1px solid rgba(224,90,78,.3); }
.alert-info { background: rgba(91,155,213,.12); color: var(--info); border: 1px solid rgba(91,155,213,.3); }

/* ============================================================ Duyarlı */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .profit-row { grid-template-columns: 1fr; }
  .menu-toggle { display: grid !important; }
}
.menu-toggle { display: none; }

/* ============================================================ Auth (Identity) sayfaları */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background:
  radial-gradient(1200px 600px at 70% -10%, rgba(201,162,39,.08), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { border: none; justify-content: center; padding-bottom: .3rem; }

/* Bootstrap köprüleri (Identity Razor formları Bootstrap sınıfları kullanır) */
.form-control, .form-select {
  background: var(--surface-2) !important; border: 1px solid var(--border-2) !important;
  color: var(--text) !important; border-radius: var(--radius-sm) !important; padding: .6rem .75rem !important;
}
.form-control:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(201,162,39,.15) !important; }
.form-floating > label { color: var(--muted-2) !important; }
.btn-primary.bs, .w-100.btn-lg { }
.text-danger, .validation-message { color: var(--loss) !important; font-size: .82rem; }
h1, h2 { color: var(--text); }

/* Blazor hata arayüzü */
#blazor-error-ui {
  background: var(--warn); color: #1a1500; bottom: 0; box-shadow: 0 -1px 6px rgba(0,0,0,.4);
  display: none; left: 0; padding: .7rem 1.2rem; position: fixed; width: 100%; z-index: 1000; font-weight: 600;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .6rem; }
.blazor-error-boundary { background: var(--loss); padding: 1rem; color: white; border-radius: 8px; }
.blazor-error-boundary::after { content: "Bir hata oluştu."; }
.loading-progress-text { color: var(--muted); }

/* ============================================================ Bootstrap-uyumlu yardımcılar
   (Bootstrap kaldırıldı; Identity Manage sayfaları hâlâ bu sınıfları kullanıyor) */
.w-100 { width: 100%; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.btn-lg { padding: .7rem 1.1rem; font-size: 1rem; }
.row { }
[class^="col-"], [class*=" col-"] { }
.form-label, label { color: var(--text); }
.form-floating { position: relative; margin-bottom: 1rem; }
.form-floating > label { color: var(--muted-2); font-size: .84rem; margin-bottom: .35rem; display: block; }
.checkbox label { color: var(--text); }
.form-check-input { accent-color: var(--accent); }
h3, h4, p, span, div, td, th, label, li, a { }
.nav-scrollable, .navbar, .navbar-toggler { display: none; }  /* şablon kalıntısı gizle */
.status-message, .alert-info { color: var(--info); }
hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

/* ============================================================ Tasarım cilası */
/* Kart hover derinliği */
.plan-card { transition: border-color .15s, transform .1s; }
.plan-card:hover { border-color: var(--border-2); }
/* Panel stat kartlarında hafif iç ışık */
.stat { transition: border-color .15s; }
.stat:hover { border-color: var(--border-2); }
/* Sıralama rozeti — ilk 3 altın vurgulu */
.plan-rank { transition: background .15s; }
/* Bölüm başlıkları arası nefes */
.grid.gap-md > .plan-card { scroll-margin-top: 80px; }
/* Metin seçilebilirlik + kod stil */
code { background: var(--surface-2); border: 1px solid var(--border); padding: .05rem .35rem; border-radius: 5px; font-size: .85em; color: var(--accent-soft); font-family: ui-monospace, monospace; }
/* Boş metin düğmeleri (çıkış vb.) hover */
.sidebar-foot button:hover { color: var(--text); }
/* İnce ayrımlar */
.plan-title { color: var(--text); }
.stat-value { color: var(--text); }
/* ============================================================ Depo (BDO tarzı iki panel) */
.wh-shell { display: grid; grid-template-columns: 260px 1fr; gap: 1.25rem;
  height: calc(100vh - 188px); min-height: 420px; }
.wh-regions {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  height: 100%; overflow-y: auto;
}
.wh-region-head {
  display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; cursor: pointer;
  font-weight: 650; font-size: .9rem; color: var(--accent-soft);
  background: var(--surface-2); border-bottom: 1px solid var(--border); position: sticky; top: 0;
}
.wh-region-head .caret { transition: transform .15s; color: var(--muted); }
.wh-region-head.collapsed .caret { transform: rotate(-90deg); }
.wh-region-head .rcount { margin-left: auto; color: var(--muted-2); font-weight: 500; font-size: .82rem; }
.wh-item {
  display: flex; align-items: center; gap: .55rem; padding: .55rem .9rem .55rem 1.4rem;
  cursor: pointer; border-bottom: 1px solid var(--border); transition: background .1s;
}
.wh-item:hover { background: var(--surface-2); }
.wh-item.active { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--accent); }
.wh-item .wh-name { flex: 1; font-size: .9rem; }
.wh-item .wh-slots { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wh-item .wh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); flex-shrink: 0; }
.wh-item.has .wh-dot { background: var(--accent); }

.wh-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; height: 100%; }
.wh-panel-head {
  display: flex; align-items: center; gap: .8rem; padding: 0 1.1rem; height: 58px; flex-shrink: 0;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.wh-panel-head .wh-title { font-weight: 700; font-size: 1.05rem; }
.wh-panel-head .wh-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }

.wh-grid {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px;
  padding: 1.1rem; flex: 1; overflow-y: auto; overflow-x: hidden;
}
.wh-cell {
  position: relative; width: 54px; height: 54px; flex: 0 0 54px; box-sizing: border-box; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
/* NOT: global .empty (boş-durum) sınıfıyla çakışmayı sıfırla (padding:3rem hücreyi büyütüyordu) */
.wh-cell.empty { cursor: pointer; color: var(--muted-2); font-size: 1rem;
  padding: 0; margin: 0; border: 1px solid var(--border); background: var(--surface-2); }
.wh-cell.empty:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-3); }
.wh-cell.filled { cursor: pointer; }
.wh-cell.filled:hover { border-color: var(--border-2); }
/* İkon küçük, doğal (oyundaki gibi kenar boşluklu) */
.wh-cell.filled img { width: 38px; height: 38px; object-fit: contain; }
.wh-cell .cell-qty {
  position: absolute; right: 2px; bottom: 0; font-size: .7rem; font-weight: 800;
  color: #fff; text-shadow: 0 1px 2px #000, 0 1px 3px #000, 0 0 2px #000;
  font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
/* Hover: eşya bazlı değer bilgisi (ÜSTTE açılır) */
.cell-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 200px; z-index: 30; display: none; flex-direction: column; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px;
  box-shadow: var(--shadow); padding: .55rem .7rem; text-align: left; box-sizing: border-box;
}
.wh-cell.filled:hover .cell-tip { display: flex; }
.cell-tip .tip-name { font-weight: 650; font-size: .85rem; margin-bottom: .35rem; }
.cell-tip .tip-row, .cell-tip .tip-total { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cell-tip .tip-total { margin-top: .3rem; padding-top: .3rem; border-top: 1px solid var(--border); color: var(--text); }
.cell-tip b { color: var(--text); }
.wh-cell .cell-x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--loss); color: #fff; font-size: .7rem; display: none; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3; border: 2px solid var(--surface);
}
.wh-cell.filled:hover .cell-x { display: flex; }
.wh-cell .cell-move {
  position: absolute; top: -6px; left: -6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #1a1500; display: none; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3; border: 2px solid var(--surface);
}
.wh-cell.filled:hover .cell-move { display: flex; }

/* Özel depo (Yükseltme deposu) — sol panelde başlıksız, vurgulu */
.wh-item.special { margin-bottom: .4rem; border: 1px solid rgba(201,162,39,.3); border-radius: 8px; background: var(--surface-2); }
.wh-item.special:hover { background: var(--surface-3); }
.wh-item.special.active { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--accent); }
.wh-item.special .nav-ico { color: var(--accent); }
.wh-item.special .wh-name { font-weight: 600; }

/* Tekrarlananlar toggle (sol panel) */
.dupes-toggle { margin-bottom: .4rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.dupes-toggle:hover { background: var(--surface-3); }
.dupes-toggle.active { background: var(--surface-3); box-shadow: inset 3px 0 0 var(--accent); }
.dupes-toggle .nav-ico { color: var(--accent); }

/* Tekrarlananlar listesi */
.dupe-list { padding: .75rem; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; }
.dupe-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.dupe-row:hover { border-color: var(--border-2); }
.dupe-main { flex: 1; min-width: 0; }
.dupe-name { font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.dupe-locs { display: flex; flex-wrap: wrap; gap: .35rem; }
.dupe-loc { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .5rem; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; color: var(--muted); cursor: pointer; }
.dupe-loc:hover { border-color: var(--accent); color: var(--text); }
.dupe-loc b { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.dupe-tot { text-align: right; flex-shrink: 0; }

/* Taşıma modalı */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal-box { width: 100%; max-width: 440px; max-height: 80vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; }
.move-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.move-target { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--radius-sm); cursor: pointer; font-size: .92rem; }
.move-target:hover { background: var(--surface-3); }
.move-target .wh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.move-target .wh-slots { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wh-cell.editing { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201,162,39,.35); z-index: 10; overflow: visible; background: var(--surface-3); }
.cell-input { width: 100%; height: 100%; border: none; background: transparent; color: var(--text); text-align: center; font-size: .72rem; outline: none; }
.cell-qty-input { width: 100%; height: 100%; border: none; background: transparent; color: var(--accent-2); text-align: center; font-size: .8rem; font-weight: 700; outline: none; }
.cell-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; width: 260px; z-index: 20;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px;
  box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; padding: 4px; text-align: left;
}
.cell-dropdown .cd-hit { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem; border-radius: 6px; cursor: pointer; }
.cell-dropdown .cd-hit:hover, .cell-dropdown .cd-hit.on { background: var(--surface-3); }
.cell-dropdown .cd-hit .cd-name { flex: 1; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-dropdown .cd-hit .cd-price { font-size: .74rem; color: var(--muted); }
.cell-editing-hint { position: absolute; top: -4px; left: 0; transform: translateY(-100%); font-size: .68rem; color: var(--accent); white-space: nowrap; }

.wh-panel-foot {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .85rem 1.1rem; border-top: 1px solid var(--border); background: var(--surface-2);
  flex-shrink: 0;
}
/* Adet: sadece sayı (spinner gizli) */
.cell-qty-input::-webkit-outer-spin-button,
.cell-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cell-qty-input { -moz-appearance: textfield; appearance: textfield; }
@media (max-width: 820px) {
  .wh-shell { grid-template-columns: 1fr; }
  .wh-grid { grid-template-columns: repeat(auto-fill, 54px); }
}

/* Arama kutusu (hero) */
.search-box { position: relative; display: flex; align-items: center; }
.search-ico { position: absolute; left: .8rem; color: var(--muted-2); pointer-events: none; }
.search-input { padding-left: 2.4rem !important; font-size: 1.02rem; height: 46px; }
.search-clear { position: absolute; right: .6rem; background: none; border: none; color: var(--muted-2); cursor: pointer; font-size: 1rem; padding: .2rem .4rem; }
.search-clear:hover { color: var(--text); }
.search-results { margin-top: .6rem; display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.search-hit {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem .6rem; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.search-hit.hit-top { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(201,162,39,.25); }
.hit-name { flex: 1; min-width: 0; }
.hit-name > div:first-child { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-qty { width: 120px; padding: .35rem .5rem !important; text-align: right; }

/* Katlanır toplu yapıştır */
.paste-details { overflow: hidden; }
.paste-summary { list-style: none; cursor: pointer; padding: 1rem 1.25rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.paste-summary::-webkit-details-marker { display: none; }
.paste-summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details[open] .paste-summary::before { transform: rotate(90deg); }

/* Yeni eklenen satır vurgusu */
@keyframes flashRow { from { background: rgba(201,162,39,.22); } to { background: transparent; } }
tr.flash td { animation: flashRow 1.4s ease-out; }

/* Eşya ikonu (bdocodex gerçek ikon) */
.item-icon {
  width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0;
  background: var(--surface-3); border: 1px solid var(--border);
  object-fit: contain; vertical-align: middle; image-rendering: auto;
}
.item-icon.sm { width: 24px; height: 24px; }
.item-row { display: inline-flex; align-items: center; gap: .55rem; }

/* Dosya yükleme alanı */
.upload-zone {
  border: 1.5px dashed var(--border-2); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; background: var(--surface-2);
  transition: border-color .15s, background .15s; cursor: pointer;
}
.upload-zone:hover { border-color: var(--accent); background: var(--surface-3); }
.upload-zone input[type=file] { display: block; margin: .6rem auto 0; color: var(--muted); font-size: .85rem; }
.upload-preview img { max-width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-top: .6rem; }
/* Önizleme satırı düzeltme girişi */
.fix-input { width: 100%; padding: .3rem .5rem; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 6px; color: var(--text); font-size: .85rem; }

/* ============================================================================
   PREMIUM CİLA — marka logosu, serif display, auth ekranı, uyarılar, dokunuş
   ============================================================================ */

/* ---- Cinzel (yalnız Latin wordmark/monogram; Türkçe metin Inter'de kalır) ---- */
@font-face {
  font-family: 'Cinzel'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cinzel'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/cinzel-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}
:root { --font-serif: 'Cinzel', Georgia, 'Times New Roman', serif; }

/* ---- Marka logosu (SVG monogram + wordmark) ---- */
.brand-logo { display: inline-flex; align-items: center; gap: .7rem; }
.brand-logo.brand-lg { flex-direction: column; gap: .95rem; width: 100%; }
.brand-emblem { display: block; flex-shrink: 0; filter: drop-shadow(0 3px 10px rgba(201,162,39,.22)); }
.brand-sm .brand-emblem { width: 36px; height: 36px; }
.brand-lg .brand-emblem { width: 78px; height: 78px; }

.brand-word-wrap { display: flex; flex-direction: column; min-width: 0; }
.brand-lg .brand-word-wrap { align-items: center; }
.brand-word {
  font-family: var(--font-serif); font-weight: 600; line-height: 1;
  color: #ECE5D3; letter-spacing: .06em; white-space: nowrap;
}
.brand-word b { color: var(--accent-2); font-weight: 600; }
.brand-sm .brand-word { font-size: 1.04rem; }
.brand-lg .brand-word { font-size: 1.62rem; letter-spacing: .12em; }

.brand-tag {
  font-family: var(--font); text-transform: uppercase; color: var(--accent-soft);
}
.brand-sm .brand-tag { font-size: .58rem; letter-spacing: .13em; color: var(--muted-2); margin-top: 3px; }
.brand-lg .brand-tag {
  font-size: .66rem; letter-spacing: .32em; opacity: .82; margin-top: .55rem; padding-left: .32em;
  position: relative;
}
/* tagline'ı iki yanından ince altın çizgiyle çerçevele */
.brand-lg .brand-tag::before, .brand-lg .brand-tag::after {
  content: ""; position: absolute; top: 50%; width: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,.6));
}
.brand-lg .brand-tag::before { right: calc(100% + 10px); transform: scaleX(-1); }
.brand-lg .brand-tag::after  { left: calc(100% + 10px); }

/* ---- Auth ekranı (premium) ---- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem;
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(201,162,39,.11), transparent 60%),
    radial-gradient(680px 480px at 90% 112%, rgba(201,162,39,.06), transparent 58%),
    var(--bg);
}
/* logoyu yankılayan çok hafif merkezi ışıltı */
.auth-wrap::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(201,162,39,.05), transparent 42%);
}
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 410px;
  animation: authRise .5s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes authRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }

.auth-card .card {
  padding: 2.1rem 1.95rem 1.85rem;
  border-color: var(--border-2);
  background: linear-gradient(180deg, #191C22 0%, #131418 100%);
  box-shadow: 0 24px 60px -22px rgba(0,0,0,.72), 0 1px 0 rgba(255,255,255,.03) inset;
  position: relative; overflow: hidden;
}
/* üstte ince altın parıltı hattı */
.auth-card .card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,.55), transparent);
}
.auth-card .brand-logo.brand-lg { margin-bottom: 1.55rem; }
.auth-card h2 {
  font-size: 1.18rem; font-weight: 600; text-align: center;
  margin: 0 0 1.35rem; letter-spacing: -.01em;
}
.auth-card .btn-primary { margin-top: .25rem; }

/* ---- Uyarı / durum kutuları (ikon + tam çerçeve, yan-şerit yok) ---- */
.alert {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .75rem .9rem; border-radius: var(--radius-sm);
  font-size: .88rem; line-height: 1.45; margin-bottom: 1.1rem;
}
.alert .alert-ico { flex-shrink: 0; width: 18px; height: 18px; margin-top: .07rem; }
.alert-ok  { background: var(--profit-bg); color: #A7DCC1; border: 1px solid rgba(76,175,125,.32); }
.alert-ok  .alert-ico { color: var(--profit); }
.alert-err { background: var(--loss-bg);   color: #F0AAA2; border: 1px solid rgba(224,90,78,.34); }
.alert-err .alert-ico { color: var(--loss); }
.alert-info{ background: rgba(91,155,213,.12); color: #A9CBEC; border: 1px solid rgba(91,155,213,.3); }
.alert-info .alert-ico { color: var(--info); }

/* Blazor ValidationSummary'yi de aynı dile getir */
.validation-errors { list-style: none; margin: 0 0 1rem; padding: .7rem .9rem;
  background: var(--loss-bg); border: 1px solid rgba(224,90,78,.34); border-radius: var(--radius-sm); }
.validation-errors li { color: #F0AAA2; font-size: .85rem; }

/* ---- Premium buton dokunuşu + erişilebilir odak ---- */
.btn { transition: background .14s ease, border-color .14s ease, transform .06s ease, box-shadow .14s ease; }
.btn-primary {
  background: linear-gradient(180deg, #E4CE74 0%, #C9A227 64%);
  border-color: #C9A227;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 14px -6px rgba(201,162,39,.45);
}
.btn-primary:hover { background: linear-gradient(180deg, #EDDA8B 0%, #D2AC33 64%); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible { outline-offset: 3px; }
.input:focus-visible, .textarea:focus-visible { outline: none; }

/* sidebar aktif öğe: altın vurgu biraz daha belirgin + yumuşak */
.nav-item { transition: background .14s ease, color .14s ease, box-shadow .14s ease; }
.nav-item.active { box-shadow: inset 2px 0 0 var(--accent), inset 0 0 24px -12px rgba(201,162,39,.4); }

/* mobilde auth kartı biraz daralt */
@media (max-width: 480px) {
  .auth-wrap { padding: 1.2rem; }
  .auth-card .card { padding: 1.7rem 1.4rem 1.5rem; }
  .brand-lg .brand-word { font-size: 1.44rem; }
}

/* ---- Sağ-üst hesap menüsü (aile adı → Ayarlar / Çıkış) ---- */
.usermenu { position: relative; margin-left: .35rem; }
.usermenu > summary { list-style: none; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu-trigger {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  padding: .28rem .55rem .28rem .32rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); transition: border-color .14s ease, background .14s ease;
  user-select: none;
}
.usermenu-trigger:hover { border-color: var(--border-2); background: var(--surface-3); }
.usermenu[open] .usermenu-trigger { border-color: rgba(201,162,39,.45); background: var(--surface-3); }
.usermenu-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, var(--accent-2), var(--accent) 60%, #8a6f16);
  color: #1a1500; font-weight: 800; font-size: .82rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.usermenu-name {
  font-size: .86rem; font-weight: 600; max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.usermenu-chev { width: 15px; height: 15px; color: var(--muted-2); transition: transform .16s ease; }
.usermenu[open] .usermenu-chev { transform: rotate(180deg); }

.usermenu-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.65), 0 1px 0 rgba(255,255,255,.03) inset;
  animation: umPop .14s ease both;
}
@keyframes umPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .usermenu-pop { animation: none; } }
.usermenu-pop form { margin: 0; }
.usermenu-pop::before { /* çentik */
  content: ""; position: absolute; top: -5px; right: 16px; width: 9px; height: 9px;
  background: var(--surface); border-left: 1px solid var(--border-2); border-top: 1px solid var(--border-2);
  transform: rotate(45deg);
}
.usermenu-item {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .55rem .6rem; border-radius: 7px;
  color: var(--text); font: inherit; font-size: .9rem; font-weight: 500;
  background: none; border: none; text-align: left; cursor: pointer; text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.usermenu-item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--muted); }
.usermenu-item:hover { background: var(--surface-2); color: var(--text); }
.usermenu-item:hover svg { color: var(--accent); }
.usermenu-danger:hover { background: var(--loss-bg); color: var(--loss); }
.usermenu-danger:hover svg { color: var(--loss); }
.usermenu-sep { height: 1px; margin: 5px 4px; background: var(--border); }

/* ============================================================ Yönetim paneli */
.adm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.adm-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1rem; align-items: start; }

.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table th {
  text-align: left; font-size: .74rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted-2); padding: 0 .55rem .5rem; border-bottom: 1px solid var(--border);
}
.adm-table th.r, .adm-table td.r { text-align: right; }
.adm-table td { padding: .5rem .55rem; border-bottom: 1px solid var(--border); }
.adm-table tbody tr { cursor: pointer; transition: background .1s ease; }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-table tbody tr.sel { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--accent); }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-name { font-weight: 600; }

.adm-sub {
  font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted-2); margin: 1.3rem 0 .6rem;
}

/* mini günlük bar grafiği */
.adm-bars { display: flex; align-items: flex-end; gap: 4px; height: 56px; }
.adm-bar { flex: 1; height: 100%; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, transparent, var(--surface-2)); border-radius: 3px; }
.adm-bar > span { display: block; width: 100%; min-height: 0; border-radius: 3px 3px 2px 2px;
  background: var(--border-2); transition: height .3s cubic-bezier(.2,.7,.2,1); }
.adm-bar.on > span { background: linear-gradient(180deg, var(--accent-2), var(--accent)); }

/* aksiyon dökümü satırı */
.adm-ev { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.adm-ev-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.adm-ev-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.adm-ev .num { text-align: right; color: var(--muted); }

/* olay rozeti */
.adm-badge { display: inline-block; padding: .16rem .48rem; border-radius: 999px; font-size: .74rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.adm-badge.ev-login { color: var(--profit); border-color: rgba(76,175,125,.35); background: var(--profit-bg); }
.adm-badge.ev-register { color: var(--accent-soft); border-color: rgba(201,162,39,.4); background: var(--warn-bg); }
.adm-badge.ev-login_failed, .adm-badge.ev-lockout { color: var(--loss); border-color: rgba(224,90,78,.35); background: var(--loss-bg); }
.adm-badge.ev-settings_changed { color: var(--info); border-color: rgba(91,155,213,.35); background: rgba(91,155,213,.12); }

/* depo gözlemi */
.adm-wh { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .5rem; overflow: hidden; }
.adm-wh > summary { list-style: none; cursor: pointer; padding: .55rem .7rem; display: flex; align-items: center;
  justify-content: space-between; gap: .6rem; background: var(--surface-2); }
.adm-wh > summary::-webkit-details-marker { display: none; }
.adm-wh > summary:hover { background: var(--surface-3); }
.adm-wh[open] > summary { border-bottom: 1px solid var(--border); }
.adm-wh-name { font-weight: 600; font-size: .9rem; }
.adm-wh-entries { padding: .4rem .3rem; max-height: 260px; overflow-y: auto; }
.adm-wh-row { display: flex; justify-content: space-between; gap: .6rem; padding: .32rem .4rem; font-size: .86rem; border-radius: 6px; }
.adm-wh-row:hover { background: var(--surface-2); }
.adm-wh-row .num { color: var(--accent-soft); }

/* son aktiviteler tablosu */
.adm-log-wrap { max-height: 460px; overflow-y: auto; }
.adm-log th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.adm-log td { white-space: nowrap; }
.adm-log td:nth-child(4) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1000px) {
  .adm-tiles { grid-template-columns: repeat(2, 1fr); }
  .adm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .adm-tiles { grid-template-columns: 1fr 1fr; }
  .adm-ev { grid-template-columns: 110px 1fr 40px; }
}
