/* ==========================================================================
   WHERZIT ENVANTER YÖNETİMİ - ANA CSS TEMASI (v1.8.1 - Modern Sepet & Tooltip)
   ========================================================================== */

:root {
  /* Ana Tema Değişkenleri */
  --bg-color: #121212;
  --surface-color: #1e1e1e;
  --primary-color: #4caf50;
  --primary-hover: #45a049;
  --amber-color: #ffc107;
  --text-main: #f5f5f5;
  --text-muted: #b0b0b0;
  --border-color: #333333;
  --danger-color: #f44336;

  /* WherZit Kontrol Merkezi & Vurgu Değişkenleri */
  --wherzit-yellow: #f59e0b;
  --wherzit-yellow-glow: rgba(245, 158, 11, 0.4);
  --panel-bg: rgba(26, 34, 50, 0.95);
}

html {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   1. HEADER / ÜST BAR VE INSTAGRAM TARZI HAMBURGER MENÜ
   ========================================================================== */

header, .app-header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.header-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.version-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0px;
  margin-left: 0.4rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.header-controls {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

/* --- Instagram Tarzı 3 Çizgili Hamburger Butonu --- */
.hamburger-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
  padding: 0;
  z-index: 101;
}

.hamburger-trigger .bar {
  height: 2px;
  width: 100%;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-trigger:hover .bar {
  background-color: var(--wherzit-yellow);
}

/* ==========================================================================
   2. ARAMA, FİLTRE VE KISAYOL ALANI
   ========================================================================== */

.search-and-shortcuts-container {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin: 0.8rem 1rem 0.5rem 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.search-bar-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  opacity: 0.6;
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.8rem 2.2rem 0.8rem 2.2rem;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--danger-color);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0 4px;
  z-index: 5;
  transition: transform 0.1s, color 0.1s;
}

.clear-search-btn:hover {
  color: #ff6b6b;
  transform: scale(1.15);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  display: none;
  z-index: 100;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.search-suggestions.active { display: block; }

.suggestion-header {
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background-color: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-color);
}

.suggestion-item {
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
  font-size: 0.9rem;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--primary-color);
}

.suggestion-meta { font-size: 0.75rem; color: var(--text-muted); }

.filter-toggle-btn {
  position: relative;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-toggle-btn:hover, .filter-toggle-btn.active {
  border-color: var(--primary-color);
  background-color: rgba(76, 175, 80, 0.15);
  color: var(--primary-color);
}

.filter-badge {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 2px;
}


.quick-filters-bar {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-filters-bar::-webkit-scrollbar { display: none; }

.q-filter-chip {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.q-filter-chip:hover {
  border-color: var(--primary-color);
  color: var(--text-main);
}

.q-filter-chip.active {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  font-weight: 600;
}

.shortcuts-wrapper {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border-color);
}

.shortcuts-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.shortcuts-title-green {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.shortcuts-scroll-area {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.shortcuts-scroll-area::-webkit-scrollbar { display: none; }

.shortcut-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.shortcut-chip:hover {
  transform: translateY(-1px);
  border-color: var(--primary-color);
}

.shortcut-chip.pinned {
  border-color: var(--amber-color);
  background-color: rgba(255, 193, 7, 0.08);
}

.shortcut-icon { font-size: 1.1rem; }
.shortcut-info { display: flex; flex-direction: column; }
.shortcut-name { font-size: 0.83rem; font-weight: 600; color: var(--text-main); }
.shortcut-loc { font-size: 0.7rem; color: var(--text-muted); }

.shortcut-pin-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0.5;
  padding: 2px;
  transition: opacity 0.2s;
}

.shortcut-pin-btn:hover, .shortcut-chip.pinned .shortcut-pin-btn { opacity: 1; }

.filter-trigger-btn {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.8rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-trigger-btn:hover {
  border-color: var(--primary-color);
  background-color: rgba(76, 175, 80, 0.1);
}

/* ==========================================================================
   3. ANA İÇERİK, LOKASYONLAR VE KARTLAR
   ========================================================================== */

main {
  flex: 1;
  padding: 1rem;
  padding-bottom: 120px;
}

.location-section {
  margin-bottom: 2rem;
  background-color: rgba(30, 30, 30, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.location-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-main);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s;
}

.location-title:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--primary-color);
}

.sub-location-title {
  margin: 1.2rem 0 0.8rem 0;
  font-size: 1rem;
  color: var(--primary-color);
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.3rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s;
}

.sub-location-title:hover { background-color: rgba(76, 175, 80, 0.1); }
.sub-location-title:first-child { margin-top: 0; }

.drawer-title {
  margin: 0.8rem 0 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: background 0.15s;
}

.drawer-title:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.delete-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0 0.5rem;
  box-shadow: none !important;
}

/* --- Kart Çevirme (Flip) Efekti --- */
.card-flip-container {
  perspective: 1000px;
  margin-bottom: 1rem;
  margin-left: 1rem;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.card-flip-inner.flipped { transform: rotateY(180deg); }

.item-card-front, .item-card-back {
  background-color: var(--surface-color);
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: relative;
}

.item-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.card-flip-container.recently-moved .item-card-front,
.card-flip-container.recently-moved .item-card-back { border-left-color: var(--amber-color); }

.card-flip-container.stock-warning .item-card-front,
.card-flip-container.stock-warning .item-card-back { border-left-color: var(--amber-color); }

.card-flip-container.stock-empty .item-card-front,
.card-flip-container.stock-empty .item-card-back { border-left-color: var(--danger-color); opacity: 0.85; }

.item-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  padding-right: 5.5rem;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  align-items: center;
}

.badge {
  background-color: #333;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--primary-color);
  border: 1px solid #444;
  cursor: pointer;
  transition: background 0.2s;
}

.badge:hover { background-color: #444; color: #fff; }

.badge-moved {
  background-color: rgba(255, 179, 0, 0.15);
  color: var(--amber-color);
  border-color: rgba(255, 179, 0, 0.3);
  cursor: default;
}

.badge-stock-warning {
  background-color: rgba(255, 193, 7, 0.15);
  color: var(--amber-color);
  border-color: rgba(255, 193, 7, 0.4);
  cursor: default;
}

.badge-stock-empty {
  background-color: rgba(244, 67, 54, 0.15);
  color: var(--danger-color);
  border-color: rgba(244, 67, 54, 0.4);
  cursor: default;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.qty-label { font-size: 0.8rem; color: var(--text-muted); margin-right: 0.2rem; }

.qty-btn {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: var(--primary-color);
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.qty-btn:hover { background: rgba(76, 175, 80, 0.2); }
.qty-btn:active { transform: scale(0.9); background: var(--primary-color); color: #fff; }

.qty-val {
  font-weight: bold;
  color: var(--text-main);
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  transition: background 0.15s;
}

.qty-val:hover { background-color: rgba(76, 175, 80, 0.2); color: var(--primary-color); }

.item-notes {
  font-size: 0.9rem;
  background-color: rgba(0,0,0,0.2);
  padding: 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.item-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.back-media-grid {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  height: 100%;
}

.back-photo-box {
  flex: 1;
  height: 90px;
  background-color: rgba(0,0,0,0.4);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.back-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.back-photo-box img:hover { transform: scale(1.08); }

.back-qr-box {
  flex: 1;
  height: 90px;
  background-color: rgba(255,255,255,0.02);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.3rem;
}

.flip-back-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.flip-back-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* ==========================================================================
   4. BUTON ÇERÇEVELERİ, TAŞIMA MODU VE BİLGİSAYAR EKRANI DÜZELTMELERİ
   ========================================================================== */

/* --- Kamera, Galeri ve Emanet Ver Buton Çerçeveleri --- */
.btn-camera, .btn-gallery, .btn-emanet, 
button[onclick*="camera"], button[onclick*="gallery"], button[onclick*="emanet"] {
  border: 1px solid var(--border-color) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  color: var(--text-main) !important;
  transition: all 0.2s ease !important;
}

.btn-camera:hover, .btn-gallery:hover, .btn-emanet:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--primary-color) !important;
}

/* --- Taşıma Modu Mantığı: Varsayılanda Taşı Butonlarını Gizle --- */
.btn-move, [data-action="move"], .card-move-btn {
  display: none !important;
}

/* Sadece Taşıma Modu (Sarı Çerçeve) Açıkken "Taşı" Butonlarını Göster */
body.bulk-move-active .btn-move,
body.bulk-move-active [data-action="move"],
body.bulk-move-active .card-move-btn {
  display: inline-flex !important;
}

/* --- PC Ekranlarında Uzayan "Teslim Al" Butonu Düzeltmesi --- */
.emanet-card-header, .emanet-person-header, .emanet-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.emanet-card-header button, 
.emanet-person-header button,
.btn-teslim, .btn-teslim-al {
  width: auto !important;
  max-width: fit-content !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 6px 14px !important;
}

/* Alt Lokasyon Kibar Taşı Butonu */
.btn-bulk-move-trigger {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-bulk-move-trigger:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

.btn-bulk-move-trigger:active { transform: scale(0.95); }

/* Yeni Modern QR Sepete Ekle Butonu & Tooltip Tasarımı (v1.8.1) */
.btn-qr-add-cart {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: none; /* Sadece QR Modülü aktifken JS ile inline-flex yapılır */
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-qr-add-cart:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

.btn-qr-add-cart:active { transform: scale(0.95); }

/* QR Modülü Şalteri Açıkken Butonu Göster */
body.qr-module-active .btn-qr-add-cart {
  display: inline-flex !important;
}

/* Tooltip (Bilgi İkonu) Sarmalayıcı */
.wz-tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.wz-tooltip-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-size: 10px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: background 0.2s, transform 0.2s;
}

.wz-tooltip-icon:hover {
  background: #38bdf8;
  color: #0f172a;
  transform: scale(1.1);
}

/* Tooltip Balonu (Glassmorphism & Temiz Konumlandırma) */
.wz-tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #f8fafc;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: normal;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  text-align: left;
}

.wz-tooltip-wrapper:hover .wz-tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wz-tooltip-content ul {
  margin: 0;
  padding-left: 15px;
}

.wz-tooltip-content li {
  margin-bottom: 3px;
}

.wz-tooltip-content li:last-child {
  margin-bottom: 0;
}

.wz-tooltip-note {
  margin-top: 6px;
  color: #38bdf8;
  font-style: italic;
  font-size: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 4px;
}


/* ==========================================================================
   5. BİLDİRİMLER, MODALLAR VE SEÇİCİLER
   ========================================================================== */

.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
  cursor: pointer;
  border: none;
  z-index: 100;
  transition: transform 0.2s, background-color 0.2s;
}

.fab:active { transform: scale(0.95); }

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 250px;
  padding: 12px 18px;
  color: #212121;
  background-color: #ffe082;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-left: 4px solid #ffa000;
}

.toast.show { opacity: 1; transform: translateY(0); }

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
  background-color: var(--surface-color);
  padding: 1.5rem;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.modal-title {
  margin-top: 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-row { display: flex; gap: 0.8rem; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; flex: 1; }
.form-row .form-group { margin-bottom: 0; }

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--bg-color) !important;
  border: 1px solid var(--border-color);
  color: var(--text-main) !important;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
  transition: opacity 0.2s, border-color 0.2s;
}

.form-control:focus { outline: none; border-color: var(--primary-color); }

.form-control:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: #2a2a2a;
}

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control option {
  background-color: var(--surface-color);
  color: var(--text-main);
}

.picker-trigger { cursor: pointer; caret-color: transparent; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.btn {
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-cancel {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-save { background-color: var(--primary-color); color: white; }

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.empty-state { text-align: center; color: var(--text-muted); padding: 2rem; font-style: italic; }

/* Custom Picker */
.custom-picker-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.custom-picker-overlay.active { display: flex; }

.custom-picker-content {
  background-color: var(--surface-color);
  width: 90%;
  max-width: 420px;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.9);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .custom-picker-overlay { align-items: flex-end; }
  .custom-picker-content { width: 100%; border-radius: 16px 16px 0 0; }
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.picker-header h3 { margin: 0; color: var(--text-main); font-size: 1.1rem; }
.picker-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }

.picker-add-btn {
  width: 100%;
  padding: 0.9rem;
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--primary-color);
  border: 1px dashed var(--primary-color);
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.picker-input-group { display: none; margin-bottom: 1rem; gap: 0.5rem; }
.picker-input-group.active { display: flex; }

.picker-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.picker-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  border: 1px solid transparent;
}

.picker-item-text {
  flex: 1;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.picker-item-actions { display: flex; gap: 0.8rem; }

.picker-action-delete {
  background: transparent !important;
  border: none !important;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
}

.filter-group-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 1rem 0 0.5rem 0;
  letter-spacing: 1px;
}

/* Emanet Alarm Butonu */
.lent-alert-btn {
  position: fixed !important;
  top: 115px !important;
  left: 16px !important;
  z-index: 9999 !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #ff9800, #f44336) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4) !important;
  cursor: pointer !important;
}

.lent-alert-btn.hidden { display: none !important; }

.alarm-icon-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: alarm-shake 1.5s infinite ease-in-out;
}

@keyframes alarm-shake {
  0% { transform: rotate(0deg); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-15deg); }
  30% { transform: rotate(12deg); }
  40% { transform: rotate(-12deg); }
  50% { transform: rotate(6deg); }
  60% { transform: rotate(-6deg); }
  70% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.lent-alert-badge {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  background: #ffffff !important;
  color: #d32f2f !important;
  font-weight: bold !important;
  font-size: 11px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #f44336 !important;
}

.hidden { display: none !important; }

/* ==========================================================================
   6. WHERZIT v1.2.9 - KONTROL MERKEZİ (HAMBURGER MENÜ) PANELİ VE TAŞIMA MODU
   ========================================================================== */

.hamburger-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hamburger-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hamburger-panel {
  width: 100%;
  max-width: 480px;
  background: var(--panel-bg);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  border: 1px solid var(--border-color);
  border-top: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hamburger-overlay.hidden .hamburger-panel {
  transform: translateY(-100%);
}

.menu-view { padding: 16px; }
.menu-view.hidden { display: none !important; }
.menu-view.active { display: block; animation: fadeInView 0.2s ease-in-out; }

@keyframes fadeInView {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.menu-title { font-size: 1rem; font-weight: 600; color: var(--text-main); margin: 0; }

.close-btn, .back-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.close-btn:hover, .back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
}

.menu-item.clickable { cursor: pointer; transition: background 0.2s ease; }
.menu-item.clickable:hover { background: rgba(255, 255, 255, 0.08); }

.item-info { display: flex; align-items: center; gap: 10px; }
.item-label { color: var(--text-main); font-weight: 500; font-size: 0.9rem; }

/* iOS Tarzı Uçak Modu Switch */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.ios-switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #374151;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: var(--wherzit-yellow);
  box-shadow: 0 0 10px var(--wherzit-yellow-glow);
}

input:checked + .slider:before { transform: translateX(20px); }

/* Parlayan Sarı Çerçeve (Taşıma Modu Aktifken) */
.bulk-move-glow-frame {
  position: fixed;
  inset: 0;
  border: 4px solid var(--wherzit-yellow);
  box-shadow: inset 0 0 18px var(--wherzit-yellow-glow), 0 0 18px var(--wherzit-yellow-glow);
  pointer-events: none;
  z-index: 1500;
  animation: pulseGlowFrame 2s infinite alternate;
}

.bulk-move-glow-frame.hidden { display: none !important; }

@keyframes pulseGlowFrame {
  0% { opacity: 0.5; box-shadow: inset 0 0 10px var(--wherzit-yellow-glow); }
  100% { opacity: 1; box-shadow: inset 0 0 22px var(--wherzit-yellow-glow), 0 0 12px var(--wherzit-yellow-glow); }
}

.action-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.action-stack .btn { width: 100%; }

.btn-primary { background: var(--wherzit-yellow); color: #000; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: var(--text-main); }

.sub-text { color: var(--text-muted); font-size: 0.82rem; line-height: 1.4; margin-bottom: 8px; }
.warning-text { color: #ef4444; font-size: 0.78rem; margin-top: 10px; text-align: center; }

/* Taşıma Modu Kapalıyken TÜM Taşı Butonlarını Kesin Olarak Gizle */
.btn-move, 
[data-action="move"], 
.card-move-btn,
.btn-bulk-move-trigger {
  display: none !important;
}

/* Sadece Taşıma Modu (Sarı Çerçeve) Açıkken "Taşı" Butonlarını Göster */
body.bulk-move-active .btn-move,
body.bulk-move-active [data-action="move"],
body.bulk-move-active .card-move-btn,
body.bulk-move-active .btn-bulk-move-trigger {
  display: inline-flex !important;
}

/* ==========================================================================
   7. WHERZIT QR KOD MODÜLÜ (v1.6.0)
   ========================================================================== */

/* --- Alt-Orta Shutter (Kamera Deklanşör) Butonu --- */
.qr-shutter-btn {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-shutter-btn:hover { transform: translateX(-50%) scale(1.05); }
.qr-shutter-btn:active { transform: translateX(-50%) scale(0.95); }

/* Dışarıdaki İnce Halka (Ring) */
.shutter-ring {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  background-color: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s;
}

/* İçerideki Canlı Buton ve İkon */
.shutter-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  font-size: 1.5rem;
  box-shadow: inset 0 -2px 5px rgba(0,0,0,0.2);
}

/* Telefonlardaki Yeni Ekle (+) FAB Butonunu Biraz Yana Kaydıralım Çakışmasın */
.fab { bottom: 2rem; right: 1.5rem; }

/* --- QR Scanner Kamera Çerçevesi (Modal İçi) --- */
#qr-reader {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  position: relative;
}

#qr-reader video {
  object-fit: cover !important;
  border-radius: 0 0 12px 12px;
}

/* --- Pill-Box Toggle Switch (İçerik Gör ↔ Hızlı Taşı) --- */
.qr-toggle-container {
  display: flex;
  justify-content: center;
  padding: 10px 15px;
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

.qr-pill-box {
  position: relative;
  display: flex;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 30px;
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.qr-pill-box input[type="radio"] { display: none; }

.qr-pill-box label {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

/* Switch Arka Plan Animasyonu (Yeşil Kapsül) */
.qr-pill-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--primary-color);
  border-radius: 30px;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.4);
}

#qr-mode-view:checked ~ .qr-pill-bg { transform: translateX(0%); }
#qr-mode-move:checked ~ .qr-pill-bg {
  transform: translateX(100%);
  background: var(--wherzit-yellow);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

#qr-mode-view:checked ~ label[for="qr-mode-view"],
#qr-mode-move:checked ~ label[for="qr-mode-move"] { color: #fff; }

/* --- QR Kod Detay Modal (Sıralı İçerik Dökümü) --- */
.qr-drawer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
}

.qr-drawer-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-drawer-item-date { font-size: 0.7rem; color: var(--text-muted); }

/* Çıktı Alınacak QR Kod Canvas Kutusu */
#qrcode-canvas {
  display: flex;
  justify-content: center;
  align-items: center;
}

#qrcode-canvas img { border-radius: 4px; }

@media (max-width: 768px) {
  .qr-shutter-btn { bottom: 20px; }
}


/* ==========================================================================
   8. WHERZIT TOPLU QR ETİKET MATBAASI STİLLERİ (YENİ - v1.8.0)
   ========================================================================== */

/* Sol Üst Yüzen Buton (Emanet Bildirim Alanı Altında) */
.qr-cart-fab {
  position: fixed;
  top: 170px; /* Emanet butonunun (115px + 48px + margin) hemen altı */
  left: 16px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid #334155;
  padding: 8px 14px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.qr-cart-fab:hover {
  background: #0f172a;
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.qr-cart-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 12px;
}

/* Modal UI Button Düzenlemeleri */
.btn-tmpl {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tmpl.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: bold;
}

.qr-cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 8px 12px;
  border-radius: 8px;
  gap: 10px;
}

.qr-cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.qr-cart-item-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed #64748b;
  color: #f8fafc;
  font-size: 13px;
  padding: 2px 0;
  width: 100%;
}

.qr-cart-item-input:focus {
  outline: none;
  border-bottom-color: #38bdf8;
}

.qr-cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-qty {
  width: 26px;
  height: 26px;
  background: #334155;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-num {
  font-size: 13px;
  font-weight: bold;
  width: 18px;
  text-align: center;
  color: #38bdf8;
}

/* ==========================================================================
   9. A4 MATBAA BASKI MOTORU STİLLERİ (@media print)
   ========================================================================== */

@media print {
  /* Uygulamanın normal arayüzünü tamamen gizle */
  body * {
    visibility: hidden;
  }
  
  /* Sadece Baskı Alanını ve içindekileri görünür yap */
  #wz-bulk-print-area, #wz-bulk-print-area * {
    visibility: visible;
  }

  /* Baskı Alanını A4 formatına zorla ve sıfıra sıfır yerleştir */
  #wz-bulk-print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 210mm; /* A4 Genişlik */
    padding: 10mm; /* Yazıcı kenar boşluğu payı */
    background: #ffffff;
    color: #000000;
  }

  .a4-page {
    page-break-after: always;
    display: grid;
    gap: 5mm; /* Etiketler arası tam 0.5 cm kesim boşluğu */
    justify-content: start;
    align-content: start;
  }

  /* 📐 Şablon Izgara Ayarları (CSS Grid Mucizesi) */
  .a4-page.standard {
    grid-template-columns: repeat(3, 50mm); /* 3 Sütun */
    grid-auto-rows: 60mm; /* 5 cm QR + 1 cm Metin Alanı */
  }

  .a4-page.mini {
    grid-template-columns: repeat(4, 35mm); /* 4 Sütun */
    grid-auto-rows: 45mm;
  }

  .a4-page.large {
    grid-template-columns: repeat(2, 75mm); /* 2 Sütun */
    grid-auto-rows: 85mm;
  }

  /* Tekil Etiket Kutusu */
  .print-label-box {
    border: 1px dashed #cbd5e1; /* Makasla Kesim (Crop) Çizgisi */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3mm;
    box-sizing: border-box;
    text-align: center;
  }

  .print-label-box img {
    width: 100%;
    height: auto;
    max-height: 80%;
    object-fit: contain;
  }

  .print-label-text {
    font-size: 10pt;
    font-weight: bold;
    color: #000;
    margin-top: 2mm;
    word-break: break-word;
    max-width: 100%;
  }

  /* Boş / Not Etiketi (Kalan Boşluk Doldurucu) Stili */
  .print-label-box.blank-label {
    border: 2px solid #000; /* Boş etiketler düz siyah çizgiyle basılır */
  }

  .blank-label-title {
    font-size: 9pt;
    font-weight: bold;
    color: #475569;
    border-bottom: 1px solid #000;
    width: 100%;
    padding-bottom: 2mm;
  }
}
