/* =====================================================
   AVENTURA CAFÉ — KASA & RAPOR PANELİ STİLLERİ
   Ferah, Aydınlık, İştah Açıcı & Dokunmatik POS Ergonomisi
   ===================================================== */

/* Web fontlar HTML üzerinden asenkron yüklenir; render engellemez */

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ☀️ FERAH KAFE TEMASI (Aydınlık, Temiz, İştah Açıcı - Varsayılan) */
  --bg-page:        #F3F4F6;  /* Yumuşak, gözü yormayan modern zemin */
  --bg-panel:       #FFFFFF;  /* Bembeyaz, ferah paneller */
  --bg-card:        #FFFFFF;  /* Net beyaz ürün kartları */
  --bg-card-hover:  #FFFDF5;  /* Sıcak fırın & krem ışıltısı */
  --bg-input:       #F8FAFC;  /* Açık gri/mavi temiz input alanı */
  --border:         #E2E8F0;  /* İnce, modern ayrım çizgileri */
  --border-active:  #D97706;  /* Canlı amber odak çerçevesi */

  --amber:          #D97706;  /* Sıcak bal & fırın kehribarı */
  --amber-light:    #B45309;  /* Okunabilir koyu amber metin */
  --amber-dim:      rgba(217, 119, 6, 0.10);
  --amber-glow:     rgba(217, 119, 6, 0.20);

  --green:          #059669;  /* Güven veren canlı zümrüt yeşili */
  --green-dim:      rgba(5, 150, 105, 0.12);
  --red:            #DC2626;  /* Net kırmızı */
  --red-dim:        rgba(220, 38, 38, 0.10);
  --blue:           #2563EB;
  --blue-dim:       rgba(37, 99, 235, 0.10);
  --purple:         #7C3AED;
  --purple-dim:     rgba(124, 58, 237, 0.10);

  --text-primary:   #0F172A;  /* Derin, son derece net okunabilir espresso */
  --text-secondary: #475569;  /* Okunabilir ikincil gri */
  --text-muted:     #64748B;  /* Destek metin rengi */

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  22px;
  --radius-full: 9999px;

  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 10px 25px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(217, 119, 6, 0.25);
  --shadow-glow: 0 4px 20px rgba(217, 119, 6, 0.2);

  --transition: 0.18s ease;
}

/* 🌙 KOYU GECE MODU (İsteyen kullanıcı için 1-tıkla geçiş desteği) */
[data-theme="dark"] {
  --bg-page:        #120D08;
  --bg-panel:       #1A130B;
  --bg-card:        #241A0E;
  --bg-card-hover:  #2F2213;
  --bg-input:       #1A130B;
  --border:         rgba(217, 119, 6, 0.22);
  --border-active:  rgba(245, 158, 11, 0.75);

  --amber:          #F59E0B;
  --amber-light:    #FCD34D;
  --amber-dim:      rgba(245, 158, 11, 0.15);
  --amber-glow:     rgba(245, 158, 11, 0.28);

  --green:          #10B981;
  --green-dim:      rgba(16, 185, 129, 0.15);
  --red:            #EF4444;
  --red-dim:        rgba(239, 68, 68, 0.15);

  --text-primary:   #FEF3C7;
  --text-secondary: #D1D5DB;
  --text-muted:     #9CA3AF;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(245, 158, 11, 0.35);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.25);
}

html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(217,119,6,0.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(217,119,6,0.5); }

/* =====================================================
   TOP NAVIGATION BAR
   ===================================================== */
.kasa-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  gap: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  width: 40px;
  height: 40px;
  background: var(--amber-dim);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.topbar-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.topbar-title span {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--amber);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.topbar-nav-btn:hover {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-1px);
}
.topbar-nav-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}
.topbar-nav-btn .nav-icon { font-size: 1.1rem; }

.topbar-clock {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(217, 119, 6, 0.25);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* =====================================================
   KASA — POS LAYOUT
   ===================================================== */
.kasa-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  height: calc(100vh - 65px);
  overflow: hidden;
}

/* ---- LEFT PANEL: ÜRÜNLER ---- */
.products-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.products-panel-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.products-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all var(--transition);
}
.products-search:focus-within {
  border-color: var(--border-active);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
.products-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.96rem;
  font-weight: 600;
  font-family: inherit;
}
.products-search input::placeholder { color: var(--text-muted); font-weight: 500; }
.products-search .search-ico { color: var(--amber); font-size: 1.15rem; }

/* Category Tabs (Büyük & Kolay Dokunmatik Butonlar) */
.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  background: var(--bg-panel);
}
.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.cat-tab:hover {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-1px);
}
.cat-tab.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

/* Products Grid (Geniş, Ferah, İştah Açıcı Kartlar) */
.products-grid-kasa {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  grid-auto-rows: max-content;
  gap: 16px;
  align-content: start;
}

.product-card-kasa {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  user-select: none;
  min-height: 195px;
  height: auto;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}
.product-card-kasa:hover {
  border-color: var(--border-active);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.product-card-kasa:active {
  transform: scale(0.97);
}

/* Card Thumbnail */
.product-card-kasa .pc-thumb {
  position: relative;
  width: 100%;
  height: 122px;
  min-height: 122px;
  flex-shrink: 0;
  background: var(--bg-input);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-kasa .pc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}
.product-card-kasa:hover .pc-img {
  transform: scale(1.08);
}
.product-card-kasa .pc-fallback {
  font-size: 2.6rem;
  line-height: 1;
  opacity: 0.9;
}
.product-card-kasa .pc-cat-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #1E293B;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-size: 0.8rem;
  padding: 3px 7px;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
[data-theme="dark"] .product-card-kasa .pc-cat-badge {
  background: rgba(26, 17, 12, 0.88);
  color: #FEF3C7;
  border-color: rgba(255, 255, 255, 0.15);
}

/* Card Content / Info */
.product-card-kasa .pc-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 0 auto;
  min-height: 64px;
}
.product-card-kasa .pc-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.product-card-kasa .pc-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  gap: 6px;
}
.product-card-kasa .pc-price {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
  letter-spacing: -0.01em;
}
.product-card-kasa .pc-unit {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Add to cart ripple */
.product-card-kasa.adding {
  animation: addPulse 0.3s ease;
}
@keyframes addPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); border-color: var(--amber); }
  100% { transform: scale(1); }
}

/* ---- RIGHT PANEL: SEPET ---- */
.cart-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  overflow: hidden;
}

.cart-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-count-badge {
  background: var(--amber);
  color: #1A1108;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.cart-clear-btn {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.cart-clear-btn:hover { background: var(--red-dim); border-color: var(--red); }

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  padding: 40px 20px;
}
.cart-empty .ce-icon { font-size: 2.5rem; opacity: 0.4; }
.cart-empty p { font-size: 0.85rem; text-align: center; }

.cart-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ci-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ci-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.ci-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-input);
}
.ci-emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
}
.ci-name {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ci-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition);
}
.ci-remove:hover { color: var(--red); }

.ci-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Qty stepper (Büyük ve Kolay Dokunmatik Butonlar) */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  background: transparent;
  border: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--amber);
  font-size: 1.15rem;
  font-weight: 800;
  transition: background var(--transition);
  font-family: inherit;
}
.qty-btn:hover { background: var(--amber-dim); }
.qty-btn:active { background: var(--amber); color: #FFF; }
.qty-display {
  min-width: 34px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 0 4px;
}

/* Discount input */
.discount-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.discount-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.discount-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex: 1;
  max-width: 140px;
  transition: border-color var(--transition);
}
.discount-input-wrap:focus-within { border-color: rgba(245,158,11,0.4); }
.discount-input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  padding: 4px 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  min-width: 0;
}
.discount-type-toggle {
  display: flex;
}
.disc-type-btn {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  padding: 4px 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.disc-type-btn.active {
  background: var(--amber-dim);
  color: var(--amber);
}

.ci-line-total {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--amber-light);
  white-space: nowrap;
}
.ci-line-total .original-price {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  display: block;
  text-align: right;
}

/* Cart Footer */
.cart-footer {
  border-top: 1px solid var(--border);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.total-row.grand {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.total-row.grand .grand-amount { color: var(--amber); }
.discount-saved {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
}

/* ── CART ADJUST BOX (ESNAF İKRAM / TUTAR DÜZELTME) ── */
.cart-adjust-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px dashed rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 6px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition);
}
.cart-adjust-box:focus-within {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.09);
}
.cab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cab-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-light);
  display: flex;
  align-items: center;
  gap: 4px;
}
.cab-tabs {
  display: flex;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cab-tab {
  background: transparent;
  border: none;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 3px 6px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.cab-tab:not(:last-child) {
  border-right: 1px solid var(--border);
}
.cab-tab.active {
  background: var(--amber);
  color: #1A0E0A;
}

.cab-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cab-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  transition: border-color var(--transition);
}
.cab-input-wrap:focus-within {
  border-color: var(--amber);
}
.cab-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--amber-light);
  padding: 5px 4px;
  font-family: inherit;
  width: 100%;
}
.cab-input::placeholder {
  color: rgba(245, 158, 11, 0.35);
  font-weight: 500;
}
.cab-unit {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.cab-reset-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all var(--transition);
}
.cab-reset-btn:hover {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-dim);
}

.cab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cab-chip-btn {
  background: var(--bg-panel);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--amber-light);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.cab-chip-btn:hover {
  background: var(--amber-dim);
  border-color: var(--amber);
  transform: translateY(-1px);
}

/* Payment Type */
.payment-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.payment-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pay-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  min-height: 70px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.pay-btn .pay-icon { font-size: 1.8rem; line-height: 1; }
.pay-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
  transform: translateY(-2px);
}
.pay-btn.selected {
  border-color: var(--amber);
  background: var(--amber-dim);
  color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-dim), 0 4px 10px rgba(217, 119, 6, 0.15);
}

/* Complete Sale Button (Büyük & Vurgulu POS Satış Tamamlama) */
.complete-sale-btn {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
  letter-spacing: 0.02em;
}
.complete-sale-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5);
}
.complete-sale-btn:active:not(:disabled) {
  transform: translateY(0);
}
.complete-sale-btn:disabled {
  background: #CBD5E1;
  color: #94A3B8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  opacity: 0.7;
}
[data-theme="dark"] .complete-sale-btn:disabled {
  background: var(--bg-card);
  color: var(--text-muted);
}

/* ── CART ACTION GROUP & PARK (AÇIK HESAP) BUTTON ── */
.cart-action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.park-sale-btn {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: rgba(217, 119, 6, 0.08);
  color: var(--amber);
  border: 2px dashed var(--amber);
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.park-sale-btn:hover:not(:disabled) {
  background: rgba(217, 119, 6, 0.16);
  border-color: var(--amber);
  transform: translateY(-1px);
}
.park-sale-btn:active:not(:disabled) {
  transform: translateY(0);
}
.park-sale-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-muted);
  background: transparent;
}

/* Topbar Parked Tabs Nav Button */
.parked-nav-btn {
  position: relative;
}
.parked-count-pill {
  background: #EF4444;
  color: #FFF;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: 2px;
  animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Park Modals */
.modal-box-wide {
  max-width: 440px;
  width: 92%;
  padding: 24px;
}
.modal-box-large {
  max-width: 540px;
  width: 94%;
  max-height: 85vh;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
}

.park-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.park-modal-icon {
  width: 44px;
  height: 44px;
  background: var(--amber-dim);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.park-summary-box {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.park-summary-total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--amber);
}

.park-input-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  margin-top: 10px;
}
.park-input-group label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.park-text-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.park-text-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber-dim);
}

.park-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.park-chip {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-full);
  color: var(--amber-light);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition);
}
.park-chip:hover {
  background: var(--amber);
  color: #1A1108;
}

.modal-btn-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
}
.btn-cancel {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-cancel:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.btn-confirm-park {
  flex: 1.5;
  padding: 12px;
  background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #1A1108;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(245,158,11,0.3);
}
.btn-confirm-park:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(245,158,11,0.45);
}

/* Parked Cards List Modal */
.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.modal-x-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.modal-x-btn:hover { color: var(--text-primary); border-color: var(--amber); }

.parked-search-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin: 12px 0 10px;
}
.parked-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
}

.parked-cards-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding-right: 4px;
}

.parked-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: border-color var(--transition);
}
.parked-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.parked-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.parked-card-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--amber-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
.parked-card-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.parked-card-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--amber);
  white-space: nowrap;
}

.parked-card-items {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  background: rgba(0,0,0,0.2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.parked-card-note {
  font-size: 0.75rem;
  color: #FBBF24;
  font-style: italic;
}

.parked-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.btn-park-settle {
  flex: 2;
  padding: 8px 12px;
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #FFF;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all var(--transition);
}
.btn-park-settle:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16,185,129,0.4);
}

.btn-park-restore {
  flex: 1.5;
  padding: 8px 12px;
  background: var(--amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  color: var(--amber-light);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all var(--transition);
}
.btn-park-restore:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--amber);
}

.btn-park-delete {
  padding: 8px 10px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #F87171;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-park-delete:hover {
  background: var(--red-dim);
  border-color: var(--red);
}

/* Quick Pay Popover for Park Settle */
.settle-pay-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.btn-quick-settle {
  padding: 12px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-quick-settle:hover {
  border-color: var(--amber);
  background: var(--amber-dim);
  transform: translateY(-2px);
}

/* ---- SUCCESS MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
}
.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-glow);
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.modal-check {
  width: 64px;
  height: 64px;
  background: var(--green-dim);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 2px solid rgba(16,185,129,0.3);
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--amber);
}
.modal-meta {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.modal-close-btn {
  width: 100%;
  padding: 12px;
  background: var(--amber-dim);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  color: var(--amber-light);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  margin-top: 6px;
}
.modal-close-btn:hover { background: var(--amber); color: #1A1108; }

/* =====================================================
   RAPOR — ANALYTICS DASHBOARD
   ===================================================== */
.rapor-layout {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Date filter bar */
.rapor-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.filter-btn:hover { background: var(--amber-dim); color: var(--text-primary); }
.filter-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #1A1108;
}
.filter-date-inputs { display: flex; align-items: center; gap: 6px; }
.filter-date-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 6px 10px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.filter-date-input:focus { border-color: var(--border-active); }
.filter-date-sep { font-size: 0.8rem; color: var(--text-muted); }

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
[data-theme="dark"] .kpi-card {
  background: linear-gradient(160deg, #1F1713 0%, #150E0A 100%);
  border-color: rgba(245, 158, 11, 0.12);
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; bottom: 0;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  box-shadow: var(--shadow-card-hover);
}

.kpi-card.amber::after  { background: linear-gradient(180deg, #F59E0B, #D97706); }
.kpi-card.green::after  { background: linear-gradient(180deg, #10B981, #059669); }
.kpi-card.blue::after   { background: linear-gradient(180deg, #3B82F6, #2563EB); }
.kpi-card.purple::after { background: linear-gradient(180deg, #8B5CF6, #7C3AED); }

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.05);
}
.kpi-icon.amber  { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.25); }
.kpi-icon.green  { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.25); }
.kpi-icon.blue   { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.25); }
.kpi-icon.purple { background: rgba(139, 92, 246, 0.15); border-color: rgba(139, 92, 246, 0.25); }

.kpi-info { flex: 1; min-width: 0; }
.kpi-label {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.kpi-value {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}
.kpi-value.amber  { color: #D97706; }
.kpi-value.green  { color: #059669; }
.kpi-value.blue   { color: #2563EB; }
.kpi-value.purple { color: #7C3AED; }
[data-theme="dark"] .kpi-value.amber  { color: #FBBF24; text-shadow: 0 0 16px rgba(245, 158, 11, 0.25); }
[data-theme="dark"] .kpi-value.green  { color: #34D399; text-shadow: 0 0 16px rgba(16, 185, 129, 0.25); }
[data-theme="dark"] .kpi-value.blue   { color: #60A5FA; text-shadow: 0 0 16px rgba(59, 130, 246, 0.25); }
[data-theme="dark"] .kpi-value.purple { color: #A78BFA; text-shadow: 0 0 16px rgba(139, 92, 246, 0.25); }
.kpi-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 3px;
  font-weight: 500;
}

/* Chart Grid */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.chart-grid-3 {
  display: grid;
  grid-template-columns: 1.7fr 1.3fr;
  gap: 16px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
[data-theme="dark"] .chart-card {
  background: linear-gradient(165deg, #1E1612 0%, #130D0A 100%);
  border-color: rgba(245, 158, 11, 0.14);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.chart-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-card-hover);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chart-card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}
.chart-card-title .ct-icon { font-size: 1.05rem; }
.chart-card-sub { font-size: 0.73rem; color: var(--text-muted); font-weight: 500; }
.chart-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 3px 8px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chart-wrap { position: relative; }
.chart-wrap canvas { width: 100% !important; }

/* ── TOP ITEMS LEADERBOARD (EN ÇOK SATANLAR) ── */
.top-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.top-items-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.top-items-empty .tie-icon { font-size: 2rem; opacity: 0.5; }

.top-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all var(--transition);
}
.top-item-row:hover {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
  transform: translateX(3px);
}
.top-item-row.gold   { border-left: 3px solid #F59E0B; background: rgba(245, 158, 11, 0.04); }
.top-item-row.silver { border-left: 3px solid #94A3B8; }
.top-item-row.bronze { border-left: 3px solid #D97706; }

.tir-rank {
  font-size: 1.15rem;
  font-weight: 900;
  min-width: 26px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tir-rank.normal {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  width: 22px;
  height: 22px;
  border-radius: 99px;
}

.tir-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.tir-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tir-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tir-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.tir-qty-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: #1A1108;
  background: #F59E0B;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.01em;
}
.tir-rev {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--amber-light);
}

.tir-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}
.tir-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, #D97706, #F59E0B);
}
.tir-bar-fill.gold {
  background: linear-gradient(90deg, #D97706, #FBBF24);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}
.tir-bar-fill.silver {
  background: linear-gradient(90deg, #64748B, #CBD5E1);
}
.tir-bar-fill.bronze {
  background: linear-gradient(90deg, #B45309, #F59E0B);
}
.tir-bar-fill.normal {
  background: linear-gradient(90deg, #57534E, #A8A29E);
}

/* ── ÖDEME DAĞILIMI (DONUT + LEGENDBOX) ── */
.pay-type-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}
@media (max-width: 900px) {
  .pay-type-wrapper { flex-direction: column; }
}

.donut-chart-box {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.donut-chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}
.donut-center-info {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dci-val {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.dci-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.pay-type-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}
.pt-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.pt-stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
.pt-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  flex-shrink: 0;
}
.pt-dot.nakit { background: #10B981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.pt-dot.kart  { background: #3B82F6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); }
.pt-dot.qr    { background: #8B5CF6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.4); }

.pt-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pt-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}
.pt-pct {
  font-weight: 800;
  font-size: 0.78rem;
}
.pt-stat-item.nakit .pt-pct { color: #34D399; }
.pt-stat-item.kart .pt-pct  { color: #60A5FA; }
.pt-stat-item.qr .pt-pct    { color: #A78BFA; }

.pt-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Sales Table */
.sales-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sales-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.sales-table-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  transition: border-color var(--transition);
}
.table-search:focus-within { border-color: var(--border-active); }
.table-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  width: 180px;
}
.table-search input::placeholder { color: var(--text-muted); }

.sales-table-wrap { overflow-x: auto; }
.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.sales-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sales-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(180,120,40,0.08);
  color: var(--text-secondary);
  vertical-align: middle;
}
.sales-table tr:last-child td { border-bottom: none; }
.sales-table tr:hover td { background: rgba(245,158,11,0.04); }
.sales-table .td-amount { color: var(--amber-light); font-weight: 700; }
.sales-table .td-id { font-family: monospace; font-size: 0.75rem; color: var(--text-muted); }

.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}
.pay-badge.nakit  { background: var(--green-dim);  color: var(--green); }
.pay-badge.kart   { background: var(--blue-dim);   color: var(--blue); }
.pay-badge.qr     { background: var(--purple-dim); color: var(--purple); }

.table-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.table-empty .te-icon { font-size: 2rem; display: block; margin-bottom: 8px; opacity: 0.4; }

/* Toast / Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-panel);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-light);
  box-shadow: var(--shadow-glow);
  animation: toastIn 0.3s ease forwards;
  white-space: nowrap;
}
.toast.error { border-color: rgba(239,68,68,0.5); color: #FCA5A5; }
.toast.success { border-color: rgba(16,185,129,0.5); color: #6EE7B7; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   MOBILE EXPANDABLE CART SHEET (MOBİL DOKUNUNCA GENİŞLEYEN SEPET)
   ===================================================== */
.mobile-sheet-bar { display: none !important; }
.mobile-cart-backdrop { display: none !important; }
.mobile-close-cart-btn { display: none !important; }

@media (max-width: 900px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .kasa-topbar {
    padding: 8px 14px;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .topbar-brand {
    gap: 8px;
  }
  .topbar-logo {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }
  .topbar-title {
    font-size: 0.95rem;
  }
  .topbar-title span {
    display: none;
  }
  .topbar-clock {
    display: none;
  }

  .topbar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    width: 100%;
    padding: 4px 0 2px;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }

  .topbar-nav-btn {
    padding: 7px 13px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .kasa-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 60px);
    overflow: visible;
    max-width: 100vw;
  }

  .products-panel {
    height: auto;
    min-height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border-right: none;
    border-bottom: 2px solid var(--border);
    flex-shrink: 0;
  }

  /* Alt bar ürünleri kapatmasın diye bol alt boşluk */
  .products-grid-kasa {
    overflow-y: visible !important;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: max-content;
    gap: 12px;
    padding: 12px 14px 100px !important;
    align-content: start;
  }

  .product-card-kasa {
    min-height: 175px;
    height: auto;
    border-radius: var(--radius-md);
  }

  .product-card-kasa .pc-thumb {
    height: 108px;
    min-height: 108px;
  }

  .product-card-kasa .pc-info {
    padding: 10px 10px 12px;
    min-height: 60px;
  }

  .product-card-kasa .pc-name {
    font-size: 0.86rem;
    font-weight: 700;
    min-height: 2.2em;
    line-height: 1.3;
  }

  .product-card-kasa .pc-price {
    font-size: 1.08rem;
    font-weight: 900;
  }

  /* ── MOBİL ARKA PLAN KARARTMASI (BACKDROP) ── */
  .mobile-cart-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 950 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .mobile-cart-backdrop.active {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* ── MOBİLDE AŞAĞIDA SABİT, DOKUNUNCA GENİŞLEYEN SEPET (BOTTOM SHEET) ── */
  .cart-panel {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 90vh !important;
    height: 90vh !important;
    z-index: 1000 !important;
    background: var(--bg-panel) !important;
    border-top-left-radius: 22px !important;
    border-top-right-radius: 22px !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.22) !important;
    /* Kapalıyken sadece üstteki 68px'lik tetikleyici bar görünür */
    transform: translateY(calc(100% - 68px - env(safe-area-inset-bottom, 0px))) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    border-top: 3px solid var(--amber) !important;
    overflow: hidden !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Dokununca Genişleyen Durum (Yukarı Fırlar, Tüm Sepet ve Ödeme Açılır) */
  .cart-panel.mobile-expanded {
    transform: translateY(0) !important;
    box-shadow: 0 -12px 50px rgba(0, 0, 0, 0.45) !important;
  }

  /* Mobil Çekmece Başlığı (Kapalıyken Görünen 68px Alt Bar) */
  .mobile-sheet-bar {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-panel);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 6px 14px 8px;
    height: 68px;
    min-height: 68px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
  }
  .mobile-sheet-bar.has-items {
    background: linear-gradient(90deg, var(--bg-panel) 0%, rgba(217, 119, 6, 0.1) 100%);
  }

  .msb-drag-handle {
    width: 38px;
    height: 4px;
    background: var(--border-active);
    border-radius: 99px;
    margin: 0 auto 6px;
    opacity: 0.8;
  }

  .msb-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  .msb-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .msb-badge-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--amber-dim);
    border: 1px solid rgba(217, 119, 6, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
  }
  .msb-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--amber);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  .msb-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .msb-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .msb-total {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--amber);
    line-height: 1.1;
  }

  .msb-toggle-btn {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-full);
    padding: 9px 15px;
    font-size: 0.88rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
  }
  .msb-toggle-btn .msb-arrow {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
  }

  /* Genişletilmiş panel içindeki header */
  .cart-panel .cart-header {
    padding: 10px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
  }
  .mobile-close-cart-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    cursor: pointer;
    font-family: inherit;
  }
  .mobile-close-cart-btn:hover {
    background: var(--red-dim);
    color: var(--red);
  }

  .cart-panel .cart-items {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 80px;
    padding: 12px 14px;
  }
  .cart-panel .cart-footer {
    flex-shrink: 0;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
  }

  @keyframes msbBump {
    0% { transform: scale(1); }
    40% { transform: scale(1.025); }
    100% { transform: scale(1); }
  }
  .mobile-sheet-bar.msb-bump {
    animation: msbBump 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  body.drawer-open {
    overflow: hidden !important;
  }

  .chart-grid { grid-template-columns: 1fr; }
  .chart-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .rapor-layout { padding: 12px; }
  
  .products-panel-header {
    padding: 10px 12px 8px;
  }
  .category-tabs {
    padding: 8px 12px;
  }
}

/* =====================================================
   PIN KILIT OVERLAY
   ===================================================== */
/* PIN koruması: sayfa açılırken kasanın veya raporun görünmesini engeller */
html.pin-pending body > *:not(#pin-lock-overlay) {
  visibility: hidden !important;
}

#pin-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 40%, #1F140A 0%, #0A0603 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
}
#pin-lock-overlay.hidden { display: none; }

.pin-lock-card {
  background: linear-gradient(145deg, #231808 0%, #1A1108 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 24px;
  padding: 44px 40px;
  width: min(380px, 90vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(245,158,11,0.08);
}

.pin-logo {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(245,158,11,0.5));
  animation: coffeePulse 2.5s ease-in-out infinite;
}
@keyframes coffeePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(245,158,11,0.4)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 22px rgba(245,158,11,0.7)); }
}

.pin-title {
  text-align: center;
  line-height: 1.3;
}
.pin-title h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--amber-light);
  letter-spacing: 0.01em;
}
.pin-title p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.pin-dots {
  display: flex;
  gap: 14px;
  align-items: center;
}
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(245,158,11,0.35);
  background: transparent;
  transition: all 0.2s ease;
}
.pin-dot.filled {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(245,158,11,0.6);
  transform: scale(1.15);
}
.pin-dot.error {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 8px rgba(239,68,68,0.6);
}

.pin-error-msg {
  font-size: 0.78rem;
  color: var(--red);
  text-align: center;
  font-weight: 600;
  min-height: 18px;
  letter-spacing: 0.01em;
  animation: pinShake 0.35s ease;
}
@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-6px); }
  80%  { transform: translateX(4px); }
}

.pin-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.pin-key {
  aspect-ratio: 1;
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 14px;
  background: rgba(245,158,11,0.06);
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pin-key:hover {
  background: rgba(245,158,11,0.14);
  border-color: var(--border-active);
  color: var(--amber);
  transform: translateY(-1px);
}
.pin-key:active {
  transform: scale(0.92);
  background: rgba(245,158,11,0.22);
}
.pin-key.del {
  font-size: 1rem;
  color: var(--text-secondary);
}
.pin-key.del:hover { color: var(--red); border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.08); }
.pin-key.zero { grid-column: 2 / 3; }

