/* ═══ SHELL — Kabuk (sol menü, üst bar, watermark, breadcrumb, footer, mobil) ═══ */
/* ═══ RESET / BODY ═══ */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 13px;
}

/* ═══ APP SHELL — ana iskelet ═══ */
.app-shell {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  max-width: 100%;
  border-right: 3px solid #aaa;
  border-top: 3px solid #aaa;
  border-bottom: 3px solid #aaa;
  box-sizing: border-box;
}

/* ═══ WATERMARK — arka planda CEE logosu ═══ */
.app-watermark {
  position: fixed;
  top: 50%;
  left: calc(50% + var(--side-w) / 2);
  transform: translate(-50%, -50%);
  width: 38vmin;
  height: 38vmin;
  background-image: url('https://www.xn--ceemimarlk-5ub.com/logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  filter: grayscale(100%);
}

/* ═══ SOL MENÜ ═══ */
.app-side {
  width: var(--side-w);
  background: var(--side-bg);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #bbb;
  z-index: 10;
  position: relative;
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #ccc;
  background: var(--side-bg-2);
}
.side-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: none;
}
.side-brand .sb-txt {
  flex: 1;
  min-width: 0;
}
.side-brand .sb-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  white-space: nowrap;
}
.side-brand .sb-sub {
  font-size: 10px;
  color: var(--side-text-2);
  margin-top: 2px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Sol menü ana linkler */
.side-nav {
  padding: 12px 0 8px;
  flex-shrink: 0;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--side-text);
  border-left: 3px solid transparent;
  user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.side-link:hover { background: var(--side-hover); color: #222; }
.side-link.on {
  background: #fff;
  color: #fff;
  border-left-color: var(--side-active);background:#fff;
}
.side-link .ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}
.side-link.on .ico { opacity: 1; }

/* Sol menü ağaç başlığı */
.side-tree-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--side-text-2);
  text-transform: uppercase;
  border-top: 1px solid #ccc;
  margin-top: 6px;
}
.side-tree-h .tcount {
  background: rgba(0,0,0,0.06);
  color: var(--side-text);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 9px;
}

/* Sol menü ağaç (Yandex klasör listesi) */
.side-tree {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: #bbb transparent;
}
.side-tree::-webkit-scrollbar { width: 6px; }
.side-tree::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }
.side-tree::-webkit-scrollbar-track { background: transparent; }

.tree-node {
  user-select: none;
}
.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 18px;
  cursor: pointer;
  font-size: 12px;
  color: var(--side-text);
  border-left: 3px solid transparent;
  transition: background .12s;
}
.tree-row:hover { background: var(--side-hover); color: #fff; }
.tree-row.on {
  background: var(--side-hover);
  color: #fff;
  border-left-color: var(--side-active);background:#fff;
}
.tree-row.bound { color: #fbbf24; }
.tree-row.bound:hover { color: #fcd34d; }
.tree-row .twist {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--side-text-2);
  transition: transform .15s;
}
.tree-row .twist.open { transform: rotate(90deg); }
.tree-row .twist.empty { visibility: hidden; }
.tree-row .ficon {
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0.8;
}
.tree-row .fname {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-row .fdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--side-active);
  flex-shrink: 0;
}
.tree-children {
  padding-left: 14px;
}

/* Sol menü alt — depo durumu */
.side-foot {
  border-top: 1px solid #ccc;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--side-bg-2);
  flex-shrink: 0;
}
.side-foot .sf-bar {
  flex: 1;
  height: 4px;
  background: #000;
  border-radius: 2px;
  overflow: hidden;
}
.side-foot .sf-fill {
  height: 100%;
  background: var(--side-active);
  transition: width .3s;
}
.side-foot .sf-txt {
  font-size: 10px;
  color: var(--side-text-2);
  white-space: nowrap;
}

/* ═══ ANA İÇERİK ALANI ═══ */
.app-main {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  
  box-sizing: border-box;
  min-width: 0; max-width: none;
  overflow-x: hidden;
}

/* Üst bar */
.app-top {
  height: var(--top-h);
  background: var(--top-bg);
  border-bottom: 1px solid var(--top-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 5;
}
.app-top .at-burger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  flex-shrink: 0;
}
.app-top .at-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.app-top .at-search input {
  width: 100%;
  height: 36px;
  background: var(--c-bg-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 0 12px 0 36px;
  font-size: 13px;
  color: var(--c-text);
  outline: none;
  transition: all .15s;
  font-family: var(--font);
}
.app-top .at-search input:focus {
  background: var(--c-surface);
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(194,65,12,0.08);
}
.app-top .at-search .si {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--c-text-3);
  pointer-events: none;
}
.app-top .at-spacer { flex: 1; }
.app-top .at-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.at-btn {
  height: 36px;
  padding: 0 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
  font-family: var(--font);
}
.at-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.at-btn.primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.at-btn.primary:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }

/* Üst bar zil/bildirim */
.at-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all .15s;
}
.at-bell:hover { border-color: var(--c-accent); }
.at-bell .bdot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 14px;
  height: 14px;
  background: var(--c-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 7px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Kullanıcı dropdown */
.at-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  height: 36px;
  flex-shrink: 0;
  transition: all .15s;
  position: relative;
}
.at-user:hover { border-color: var(--c-accent); }
.at-user .av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.at-user .un {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text);
}
.at-user .uc {
  font-size: 9px;
  color: var(--c-text-3);
  margin-left: 4px;
}
.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  display: none;
  z-index: 100;
}
.user-menu.open { display: block; }
.user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--c-text);
  text-decoration: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-weight: 500;
}
.user-menu a:hover { background: var(--c-bg-2); }
.user-menu a.danger { color: var(--c-danger); }
.user-menu .sep { height: 1px; background: var(--c-border); margin: 4px 0; }

/* Breadcrumb */
.app-crumb {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--c-text-2);
  flex-shrink: 0;
}
.app-crumb a, .app-crumb span.cb {
  color: var(--c-text-2);
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}
.app-crumb a:hover { color: var(--c-accent); }
.app-crumb .sep { color: var(--c-text-3); }
.app-crumb .now { color: var(--c-text); font-weight: 600; }

/* Üst yükleme çubuğu (Oturum 2'de aktif) */
.app-progress {
  position: absolute;
  top: var(--top-h);
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}
.app-progress .pbar {
  position: absolute;
  height: 100%;
  background: var(--c-accent);
  width: 0;
  transition: width .3s;
}
.app-progress.loading .pbar {
  animation: indet 1.4s ease-in-out infinite;
}
@keyframes indet {
  0% { left: -30%; width: 30%; }
  50% { left: 40%; width: 40%; }
  100% { left: 100%; width: 30%; }
}

/* Body — kaydiribilir icerik (SCROLL BURADA) */
.app-body {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 20px 24px;
  scroll-behavior: smooth;
}

/* Footer */
.app-foot {
  height: var(--foot-h);
  background: var(--foot-bg);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 10px;
  color: var(--c-text-3);
  flex-shrink: 0;
}
.app-foot .ff-l { display: flex; align-items: center; gap: 14px; }
.app-foot .ff-r { display: flex; align-items: center; gap: 14px; }
.app-foot .ff-tag {
  padding: 2px 8px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-weight: 600;
  color: var(--c-text-2);
}

/* ═══ MEVCUT .shell ÜZERİNE OVERRIDE ═══ */
/* Eski .shell tam genişlik kaplasın, padding kalksın çünkü .app-body veriyor */
.shell {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Eski .topbar (mevcut karttaki) — gizleme YAPMA, çünkü içinde Yedekle/Yeni Proje butonları var.
   Sadece görsel olarak yumuşat. */
.topbar {
  border-radius: var(--r-lg) !important;
  border: 1px solid var(--c-border) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* ═══ MOBİL ═══ */
@media (max-width: 900px) {
  :root { --side-w: 240px; }
  .app-side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform .25s;
  }
  .app-side.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .app-top .at-burger { display: flex; }
  .app-watermark { left: 50%; }
  .app-body { padding: 14px 12px; }
}

/* Modal/diyalog overlay'leri kabuk içinde kalsın */
.app-shell { isolation: isolate; }



    *{box-sizing:border-box;margin:0;padding:0}
    body{font-family:Arial,sans-serif;font-size:10.5px;color:#222;padding:10px 20px}
    .fiyat-inp{display:none}.fiyat-val{display:inline!important}
    .taraf-wrap,.add-row-link,.del-row-btn{display:none!important}
/* ═══════════════════════════════════════════════════
   OTURUM 2 ÖN-DÜZELTME: Eski UI elemanlarını gizle
   (Refactor sonrası temizlik)
   ═══════════════════════════════════════════════════ */

/* Eski büyük topbar tamamen gizle (yeni .app-top var) */
.shell > .topbar { display: none !important; }

/* Eski arama+sort kutusu gizle (yeni .at-search var) */
.shell > div:has(> #searchBox) { display: none !important; }

/* Eski city-tabs, .notif-mbar görünür kalsın ama kompakt */
.shell .city-tabs { margin: 8px 0 12px !important; }
.shell .notif-mbar:empty { display: none !important; }

/* Çıkış butonu zaten kullanıcı dropdown'da */
.btn-logout { display: none !important; }

/* Logo: <img> görünmezse arkaplanda zaten CEE harfi var */
.side-brand img[src*="logo"] {
  width: 38px;
  height: 38px;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
}
.side-brand img[src*="logo"]:not([src=""]):not([src*="error"]) {
  background: transparent;
}

/* Scroll fix — KOKTEN COZUM */
