/* ============================================================================
   B4B PORTAL EYE-FRIENDLY SOFT WARM LIGHT DESIGN SYSTEM
   ============================================================================ */

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Color Palette (Soft Warm Eye-Friendly Light Palette) */
  --bg-primary: #edf2f7;         /* Yumuşak dinlendirici gri zemin */
  --bg-surface: #ffffff;         /* Beyaz kartlar */
  --bg-surface-hover: #f1f5f9;   /* Yumuşak satır vurgusu */
  --bg-card: #ffffff;
  
  --border-color: #cbd5e1;       /* Belirgin ama göz yormayan kenarlıklar */
  --border-glow: rgba(2, 132, 199, 0.3);
  
  --text-main: #1e293b;          /* Yüksek kontrastlı slate metin */
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-danger: #ef4444;
  --accent-warning: #f59e0b;
  --accent-orange: #ea580c;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.09);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.2);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  --transition-fast: all 0.15s ease-out;
  --transition-normal: all 0.25s ease-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism Soft Effect */
.glass {
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 6px 24px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.navbar-brand span {
  color: var(--accent-blue);
}

/* Modern Sleek Currency Pill */
.currency-pill {
  display: inline-flex;
  align-items: center;
  height: 38px;
  gap: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-bottom: 2px solid #94a3b8;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 0.775rem;
  font-weight: 700;
  color: #475569;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
}

.currency-pill .curr-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.currency-pill .curr-item i {
  color: #64748b;
  font-size: 0.75rem;
}

.currency-pill .curr-item span {
  color: #0f172a;
}

.curr-divider {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Compact Non-Overflowing User Profile Card */
.user-profile-card {
  display: flex;
  align-items: center;
  height: 38px;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-bottom: 2px solid #94a3b8;
  padding: 0 12px;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  max-width: 320px;
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.user-profile-card:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-color: #94a3b8;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-company {
  font-size: 0.825rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.user-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.725rem;
  color: var(--text-dim);
  margin-top: 1px;
  white-space: nowrap;
}

.user-rep-text {
  color: var(--accent-blue);
  font-weight: 700;
}

.user-bal-text {
  color: #059669;
  font-weight: 700;
}

.meta-sep {
  color: #94a3b8;
}

/* ============================================================================
   PREMIUM 3D TACTILE NAVBAR BUTTONS (Rich Colored & High-Contrast Style)
   ============================================================================ */
.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  font-size: 0.825rem;
  font-weight: 700;
  border-radius: 9px;
  border: 1.5px solid #cbd5e1;
  border-bottom: 3px solid #94a3b8;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.btn-nav i {
  font-size: 0.86rem;
  transition: transform 0.15s ease;
}

.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.btn-nav:hover i {
  transform: scale(1.12);
}

.btn-nav:active {
  transform: translateY(2px);
  border-bottom-width: 1.5px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Equal width for standard navigation buttons */
.btn-nav-equal {
  min-width: 116px;
  padding: 0 8px;
  justify-content: center;
  text-align: center;
}

/* Primary Cart Button (Standout Solid Blue) */
.btn-nav-cart, .btn-nav.btn-primary, .btn-primary.btn-nav {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 55%, #075985 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #0284c7 !important;
  border-bottom: 3px solid #082f49 !important;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  padding: 0 15px !important;
}
.btn-nav-cart i, .btn-nav.btn-primary i { color: #ffffff !important; }
.btn-nav-cart:hover, .btn-nav.btn-primary:hover {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%) !important;
  border-color: #0369a1 !important;
  border-bottom-color: #052e47 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

/* Active page state in navbar (Rich Emerald Green 3D Tactile) */
.btn-nav.nav-active {
  background: linear-gradient(180deg, #10b981 0%, #059669 55%, #047857 100%) !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  border-bottom: 3px solid #064e3b !important;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
.btn-nav.nav-active i {
  color: #ffffff !important;
}
.btn-nav.nav-active:hover {
  background: linear-gradient(180deg, #059669 0%, #047857 100%) !important;
  border-color: #047857 !important;
  border-bottom-color: #022c22 !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), #0284c7);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--accent-blue-hover);
}

.btn-outline {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #e2e8f0;
}

.btn-search {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Main Container */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 24px;
  flex: 1;
}

.container.container-full {
  max-width: 100%;
  padding: 20px 32px;
}

/* Hero Banner Area */
.hero-banner {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
}

.hero-overlay h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0f172a;
}

.hero-overlay p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Prominent Search Section (Sticky Header: Only Search Bar) */
.search-box-wrapper {
  position: sticky;
  top: 62px;
  z-index: 900;
  margin-bottom: 12px;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.3), var(--shadow-lg);
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 2px solid var(--accent-blue); /* Aktif olmasa bile daima canlı mavi çerçeve */
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.search-input-group:focus-within {
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2), var(--shadow-lg);
}

.search-input {
  flex: 1;
  padding: 14px 20px 14px 50px;
  font-size: 1.05rem;
  font-family: var(--font-main);
  background: transparent;
  color: var(--text-main);
  border: none;
  outline: none;
}

.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-blue);
  font-size: 1.2rem;
  pointer-events: none;
}

.btn-search-stock-toggle {
  width: 125px;
  min-width: 125px;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 12px 6px;
  border: none;
  border-left: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
}

.btn-search-stock-toggle i {
  color: #94a3b8;
  font-size: 0.95rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.btn-search-stock-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-search-stock-toggle:hover i {
  color: #059669;
  transform: scale(1.1);
}

.btn-search-stock-toggle.active {
  background: #ecfdf5;
  color: #047857;
}

.btn-search-stock-toggle.active i {
  color: #059669;
}

.mobile-stock-filter-pill {
  display: none !important;
}

.btn-search-clear {
  width: 125px;
  min-width: 125px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 6px;
  border: none;
  border-left: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: var(--transition-fast);
  white-space: nowrap;
  box-sizing: border-box;
}

.btn-search-clear:hover {
  background: #fee2e2;
  color: var(--accent-danger);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent-blue), #0284c7);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 26px;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-search:hover {
  background: var(--accent-blue-hover);
}

/* Search Filters & Meta Bar (Compact gap between search box and results) */
.search-filters-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
  margin-bottom: 6px;
  padding: 0 4px;
}

.search-meta-text {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* Results Card (Clean, unified desktop container) */
.results-card {
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  background: #ffffff;
  margin-bottom: 24px;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.results-table > thead > tr > th,
.results-table > thead > th {
  position: sticky;
  top: 114px; /* Arama sayfasında sticky search bar altında */
  z-index: 850;
  background: #f1f5f9;
  padding: 12px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #334155;
  border-top: 2px solid var(--accent-blue);
  border-bottom: 2px solid var(--accent-blue);
  border-left: none;
  border-right: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.results-table > thead > tr > th:first-child,
.results-table > thead > th:first-child {
  border-left: 2px solid var(--accent-blue);
  border-top-left-radius: 8px;
}

.results-table > thead > tr > th:last-child,
.results-table > thead > th:last-child {
  border-right: 2px solid var(--accent-blue);
  border-top-right-radius: 8px;
}

.results-table > thead > tr > th div,
.results-table > thead > th div {
  color: #64748b !important;
}

.cart-table thead th {
  top: 58px !important; /* Sepet sayfasında navbar'ın tam altında */
}

.aging-table thead th {
  position: static !important;
  top: auto !important;
  box-shadow: none !important;
}

.results-table > tbody > tr > td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  vertical-align: middle;
  background: #ffffff;
  transition: background 0.15s ease;
}

.results-table > tbody > tr.product-history-drawer-row > td {
  padding: 0 !important;
  background: #f8fafc !important;
}

.results-table > tbody > tr {
  transition: background 0.15s ease;
}

.results-table > tbody > tr:hover > td:not(.product-history-drawer-row td) {
  background: #f8fafc;
}

.results-table tbody tr.cart-row-unselected td {
  opacity: 0.55;
  background: #f8fafc !important;
}

/* Colored Group Code Badge in Tables */
.table-group-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  margin-top: 3px;
}

/* Status Indicator Dots (🟢 / 🔴) */
.status-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.dot-green {
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.dot-red {
  background-color: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Material & Producer Codes */
.item-code {
  font-weight: 800;
  color: var(--accent-blue);
  font-size: 0.95rem;
}

.item-producer {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 2px;
  font-family: monospace;
}

.item-desc {
  font-weight: 600;
  color: var(--text-main);
}

.item-meta {
  font-size: 0.775rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Stock Texts (Font size reduced by ~1pt / 0.9rem) */
.stock-text-ok {
  font-weight: 800;
  font-size: 0.9rem;
  color: #059669;
}

.stock-text-plus {
  font-weight: 800;
  font-size: 0.95rem;
  color: #0284c7;
}

.stock-stack-plus {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.05;
}

.stock-stack-plus .stock-num {
  font-weight: 800;
  font-size: 0.92rem;
  color: #0284c7;
}

.stock-stack-plus .stock-sub {
  font-weight: 700;
  font-size: 0.68rem;
  color: #0284c7;
  letter-spacing: 0.2px;
  margin-top: 1px;
}

.stock-text-none {
  font-weight: 700;
  font-size: 0.85rem;
  color: #dc2626;
}

/* Customer Discount Text (Font size reduced by ~1pt / 0.9rem) */
.disc-text {
  font-weight: 800;
  font-size: 0.9rem;
  color: #7e22ce;
}

/* Campaign Column (Centered: Minimum Quantity on Top, Price on Bottom - Perfectly Aligned) */
.camp-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.camp-min-tag {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 3px;
  line-height: 1.1;
}

.camp-price-tag {
  font-weight: 800;
  color: var(--accent-orange);
  font-size: 1.05rem; /* Net fiyat ile tam eşit */
  line-height: 1.2;
}

/* Pricing Display (Right Aligned - Perfectly Aligned with Campaign) */
.price-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
}

.price-list {
  text-decoration: line-through;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.1;
  margin-bottom: 3px;
}

.price-net {
  font-weight: 800;
  color: #047857;
  font-size: 1.05rem; /* Kampanya fiyatı ile tam eşit */
  line-height: 1.2;
}

/* Quantity Inputs with Permanent Up/Down Spinners */
.qty-input {
  width: 56px;
  text-align: center;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  opacity: 1 !important;
  display: block !important;
  cursor: pointer;
  height: 22px;
}

.qty-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* Responsive Grid / Breakpoints */
@media (max-width: 992px) {
  .user-badge {
    display: none;
  }
  .currency-badge {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    height: 130px;
  }
  .hero-overlay h1 {
    font-size: 1.2rem;
  }
  .navbar-brand span {
    display: none;
  }
  .btn-clear {
    padding: 10px 12px;
  }
  .btn-search {
    padding: 10px 16px;
  }
  .results-table th:nth-child(5),
  .results-table td:nth-child(5),
  .results-table th:nth-child(6),
  .results-table td:nth-child(6) {
    display: none;
  }
}

/* ============================================================================
   B4B CART / SEPET PAGE DESIGN SYSTEM
   ============================================================================ */

.cart-page-wrapper {
  padding: 16px 0 40px 0;
}

.cart-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.cart-page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.cart-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.cart-main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-sidebar-col {
  position: sticky;
  top: 76px;
  z-index: 860;
  align-self: start;
  height: fit-content;
}

.summary-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1.5px solid #1e293b;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.cart-table th {
  white-space: nowrap;
  padding: 12px 14px;
}

.cart-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.cart-table .item-code {
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.3px;
}

.cart-table .item-producer {
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Cart Table Stepper Quantity Control */
.cart-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
}

.btn-stepper {
  background: var(--bg-surface-hover);
  border: none;
  width: 30px;
  height: 32px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-stepper:hover {
  background: var(--border-color);
  color: var(--accent-blue);
}

.cart-qty-val {
  width: 48px;
  height: 32px;
  text-align: center;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  background: transparent;
}

.cart-qty-val:focus {
  outline: none;
}

.btn-delete-row {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.cart-custom-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.cart-row-unselected {
  opacity: 0.5;
  background: #f8fafc !important;
}

.cart-row-unselected .item-code {
  color: var(--text-dim) !important;
}

.stock-pill-in {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

.stock-pill-out {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
  white-space: nowrap;
}

.campaign-applied-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
}

.campaign-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px dashed rgba(22, 163, 74, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.campaign-hint-badge:hover {
  background: #dcfce7;
  border-color: #16a34a;
}

/* Empty Cart State */
.cart-empty-box {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.08);
  color: var(--accent-blue);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.cart-empty-box h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.cart-empty-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
}

/* Order & Shipping Notes Box */
.order-notes-card {
  padding: 20px 24px;
  border-radius: var(--radius-md);
}

.notes-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.notes-card-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.order-note-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.9rem;
  resize: vertical;
  line-height: 1.4;
  transition: var(--transition-fast);
}

.order-note-textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.cart-sidebar-col {
  height: fit-content;
}

/* Sticky Summary Card */
.summary-card {
  position: sticky;
  top: 76px;
  z-index: 100;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.summary-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.summary-label {
  color: var(--text-muted);
}

.summary-val {
  font-weight: 700;
  color: var(--text-main);
}

.discount-row .summary-val {
  color: var(--accent-green);
  font-weight: 800;
}

.summary-divider {
  height: 1px;
  background: var(--border-color);
  margin: 16px 0;
}

.summary-grand-total-box {
  background: var(--bg-surface-hover);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  text-align: center;
  margin-bottom: 20px;
}

.grand-total-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.grand-total-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1.2;
  margin: 4px 0;
}

.grand-total-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.customer-status-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.btn-checkout-submit {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
  transition: var(--transition-fast);
}

.btn-checkout-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

.btn-checkout-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.trust-guarantees {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-item {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-green {
  color: var(--accent-green) !important;
}

.text-blue {
  color: var(--accent-blue) !important;
}

/* ============================================================================
   RESPONSIVE DUAL-VIEW (TABLE ON DESKTOP, NATIVE CARDS ON MOBILE)
   ============================================================================ */

.desktop-table-wrapper {
  display: block;
  width: 100%;
}

.mobile-cards-wrapper {
  display: none;
}

.mobile-sticky-bottom-bar {
  display: none;
}

/* Mobile Hamburger Button */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-blue);
}

/* Mobile Slide-in Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  max-width: 85vw;
  background: #ffffff;
  z-index: 1201;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.drawer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.drawer-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.drawer-company {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.drawer-meta {
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  gap: 5px;
  align-items: center;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-menu {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-fast);
}

.drawer-nav-item:hover,
.drawer-nav-item:active {
  background: #f1f5f9;
  color: var(--accent-blue);
}

.drawer-nav-item i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: var(--accent-blue);
}

.drawer-counter-badge {
  margin-left: auto;
  background: var(--accent-blue);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.drawer-footer {
  padding: 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-currency-row {
  display: flex;
  gap: 8px;
}

.drawer-curr-box {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

.drawer-curr-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 700;
}

.drawer-curr-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-blue);
}

.drawer-system-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Mobile Card Base (High-Contrast Border & Distinct Layered Shadow) */
.mobile-card {
  background: #ffffff;
  border: 1.5px solid #1e293b; /* İnce net siyah/koyu çizgi */
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06); /* Şık derinlik gölgesi */
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition-fast);
}

.mobile-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14), 0 2px 4px rgba(0, 0, 0, 0.08);
}

.mobile-card.cart-row-unselected {
  opacity: 0.5;
  background: #f8fafc !important;
  border-color: #94a3b8;
}

.mobile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-card-code-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mobile-card-code {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.mobile-card-producer {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.2px;
}

.mobile-card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-card-group-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mobile-card-stock-label {
  font-size: 0.8rem;
  font-weight: 700;
}

.mobile-card-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-card-desc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.mobile-card-meta {
  font-size: 0.775rem;
  color: var(--text-dim);
}

.mobile-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  margin-top: 2px;
  gap: 10px;
}

.mobile-card-price-box {
  display: flex;
  flex-direction: column;
}

.mobile-card-list-price {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.mobile-card-net-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-blue);
}

.mobile-card-action-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-stepper {
  height: 36px;
}

.mobile-stepper .btn-stepper {
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
}

.mobile-stepper .cart-qty-val {
  width: 44px;
  height: 34px;
  font-size: 16px; /* iOS auto-zoom engellemek için 16px */
}

.mobile-add-btn {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-sizing: border-box;
}

.mobile-card-ctrl-col,
.mobile-card-price-col,
.mobile-card-total-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mobile-card-col-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.3px;
}

.mobile-card-unit-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ca8a04;
}

.mobile-card-line-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.mobile-delete-btn {
  padding: 6px 8px;
  font-size: 1.2rem;
  color: #ef4444;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-empty-hint {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

/* Mobile Fixed Sticky Bottom Action Bar (Hidden on PC desktop) */
.mobile-sticky-bottom-bar {
  display: none !important;
}

.mobile-bottom-total-group {
  display: flex;
  flex-direction: column;
}

.mobile-bottom-qty-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}

.mobile-bottom-total-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.15;
}

.btn-mobile-checkout {
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* ============================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ============================================================================ */

@media (max-width: 992px) {
  .cart-grid {
    grid-template-columns: 1fr;
  }
  .summary-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .container,
  .container.container-full {
    padding: 8px 12px;
  }

  .cart-page-wrapper {
    padding: 4px 0 95px 0; /* Bottom bar payı */
  }

  .desktop-table-wrapper {
    display: none !important;
  }

  .mobile-cards-wrapper {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 6px 0;
  }

  .mobile-sticky-bottom-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
    padding: 10px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .summary-card {
    display: none !important; /* Mobilde alt sticky bar aktif */
  }

  /* Remove outer box from mobile cards so they sit directly on the background */
  .results-card,
  .results-card.glass {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* Compact Cart Header & Actions on Mobile */
  .cart-header-row {
    margin-bottom: 8px;
    gap: 8px;
    align-items: center;
  }

  .cart-page-title {
    font-size: 1.15rem;
    font-weight: 800;
    gap: 6px;
    margin-bottom: 0;
  }

  .cart-page-subtitle {
    display: none !important; /* Dikey alan tasarrufu */
  }

  .btn-cart-back {
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
  }

  .cart-table-header {
    background: transparent !important;
    border: none !important;
    padding: 2px 2px 8px 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .cart-count-badge {
    padding: 4px 10px;
    gap: 1px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .cart-count-line-1 {
    font-size: 0.78rem;
    font-weight: 700;
  }

  .cart-count-line-2 {
    font-size: 0.72rem;
    font-weight: 600;
  }

  .btn-clear-cart-stacked {
    padding: 4px 8px;
    border-radius: 8px;
    gap: 5px;
    white-space: nowrap;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .btn-clear-cart-stacked i {
    font-size: 0.85rem;
  }

  .btn-clear-stacked-text {
    font-size: 0.68rem;
    line-height: 1.05;
  }

  /* Compact Mobile Navbar (No Overflows) */
  .navbar {
    padding: 6px 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  .navbar-brand {
    font-size: 1.15rem;
    font-weight: 800;
    gap: 6px;
    white-space: nowrap;
  }

  .navbar-brand span {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
  }

  .desktop-only-inline {
    display: none !important;
  }

  .navbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .user-profile-card {
    display: none !important;
  }

  .btn-nav {
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    gap: 5px;
  }

  /* Compact Hero Banner */
  .hero-banner {
    height: 90px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
  }

  .hero-overlay {
    padding: 12px;
  }

  .hero-overlay h1 {
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  .hero-overlay p {
    font-size: 0.72rem;
  }

  /* Sticky Search Bar (Always 100% visible buttons) */
  .search-box-wrapper {
    top: 48px;
    padding: 4px 0;
    margin-bottom: 6px;
  }

  .search-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    border-radius: var(--radius-md);
  }

  .search-input {
    font-size: 16px; /* iOS auto-zoom engellemek için */
    padding: 9px 8px 9px 34px;
    min-width: 0;
    flex: 1;
  }

  .search-icon {
    left: 11px;
    font-size: 0.95rem;
  }

  .btn-search-stock-toggle {
    display: none !important;
  }

  .btn-search-clear {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .btn-search-clear .btn-search-text {
    display: none !important;
  }

  .btn-search {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.85rem;
    gap: 4px;
    white-space: nowrap;
  }

  /* Mobil Arama Sonuçları Alt Barı & Stok Filtresi */
  .search-filters-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 10px;
    padding: 0 2px;
  }

  .search-filters-bar[style*="display: none"] {
    display: none !important;
  }

  .mobile-stock-filter-pill {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .mobile-stock-filter-pill.active {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #047857 !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
  }

  .mobile-stock-filter-pill i {
    font-size: 0.82rem;
    color: #64748b;
  }

  .mobile-stock-filter-pill.active i {
    color: #ffffff !important;
  }

  .filter-checkbox-label {
    white-space: nowrap;
    padding: 5px 12px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .search-meta-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-left: 2px;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .btn-search-clear .btn-search-text {
    display: none;
  }
  .btn-search-clear {
    padding: 8px 12px;
  }
  .cart-back-btn-text {
    display: none;
  }
  .btn-cart-back::after {
    content: "Parça Ara";
  }
}

/* ============================================================================
   B4B DEBT AGING & UNCLOSED INVOICES (BORÇ YAŞLANDIRMA) DESIGN SYSTEM
   ============================================================================ */

.aging-page-wrapper {
  padding: 16px 0 50px 0;
}

.aging-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.aging-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.aging-page-subtitle {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.aging-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 4-Column KPI Grid */
.aging-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.aging-kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aging-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.aging-kpi-card.kpi-overdue {
  border-left: 4px solid #ef4444;
  background: #fffafa;
}

.aging-kpi-card.kpi-upcoming {
  border-left: 4px solid #10b981;
  background: #f8fafc;
}

.aging-kpi-card.kpi-total {
  border-left: 4px solid var(--accent-blue);
}

.aging-kpi-card.kpi-meta {
  border-left: 4px solid #8b5cf6;
}

.kpi-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.icon-blue {
  background: rgba(2, 132, 199, 0.1);
  color: var(--accent-blue);
}

.icon-red {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.icon-green {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.icon-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.kpi-content {
  min-width: 0;
  flex: 1;
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aging-section-title-row {
  margin-bottom: 16px;
}

.aging-section-title-row h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.aging-section-hint {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* Accordion Container */
.aging-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aging-month-accordion {
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition: opacity 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.aging-month-accordion.has-overdue {
  border-color: rgba(239, 68, 68, 0.3);
}

.aging-month-accordion:hover {
  box-shadow: var(--shadow-md);
}

/* 🌟 Aktif Açık Ay Kartı: Belirgin 2.5px Mavi Çerçeve, Açık Mavi Başlık ve Yükselme Gölgesi */
.aging-month-accordion.is-open {
  opacity: 1 !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -4px rgba(2, 132, 199, 0.25), 0 6px 14px -2px rgba(0, 0, 0, 0.06) !important;
  border: 2.5px solid #0284c7 !important;
  border-radius: var(--radius-md) !important;
  z-index: 5;
}

.aging-month-accordion.is-open.has-overdue {
  border: 2.5px solid #0284c7 !important;
}

.aging-month-header.desktop-month-header.active {
  background: #f0f9ff !important;
  border-bottom: 1.5px dashed #bae6fd !important;
}

/* 🎯 Odak Modu: Bir ay açıkken diğer kapalı ayları soluklaştır */
.aging-accordion-container.has-focus .aging-month-accordion:not(.is-open) {
  opacity: 0.28 !important;
  filter: grayscale(35%) !important;
  transform: scale(0.995);
  transition: all 0.25s ease-in-out !important;
}

.aging-accordion-container.has-focus .aging-month-accordion:not(.is-open):hover {
  opacity: 0.85 !important;
  filter: grayscale(0%) !important;
  transform: scale(1);
}

/* Button styling for Header Actions (Ekstre & Ödeme Yap) */
.btn-header-action {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  transition: all 0.2s ease;
  min-height: 42px;
  min-width: 155px; /* PC Web'de buton kutuları eşit genişlikte */
}

.btn-green-action {
  background: #059669;
  color: #ffffff;
  border: 1px solid #047857;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.btn-green-action:hover {
  background: #047857;
  color: #ffffff;
  border-color: #065f46;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

/* Accordion Header Bar (Base) */
.aging-month-header {
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  border-bottom: 1px solid transparent;
}

.aging-month-header:hover {
  background: #f8fafc;
}

.aging-month-header.active {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

/* 1. Desktop Month Header: Clean Horizontal Single Row */
.desktop-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.aging-month-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.month-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.circle-blue {
  background: rgba(2, 132, 199, 0.1);
  color: var(--accent-blue);
}

.circle-red {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.month-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-blue);
}

.month-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.aging-month-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aging-month-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.month-amount-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.month-amount-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.month-amount-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.month-chevron-box {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  flex-shrink: 0;
}

.toggle-chevron {
  transition: transform 0.25s ease;
}

.toggle-chevron.rotated {
  transform: rotate(180deg);
}

/* 2. Mobile Month Header (Android App Style, Hidden on PC) */
.mobile-month-header {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
}

.aging-month-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aging-month-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aging-month-title-wrap i {
  font-size: 1.15rem;
}

.icon-blue-text {
  color: var(--accent-blue);
}

.icon-red-text {
  color: #dc2626;
}

.month-count-pill {
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  display: inline-block;
}

.aging-month-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
}

.month-metric-col {
  display: flex;
  flex-direction: column;
}

.month-metric-col.col-left {
  align-items: flex-start;
  text-align: left;
}

.month-metric-col.col-right {
  align-items: flex-end;
  text-align: right;
}

.month-metric-col.metric-total {
  align-items: flex-end;
}

.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.metric-val {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.metric-val.text-red {
  color: #dc2626;
}

.metric-val.text-green {
  color: #059669;
}

.metric-val.text-dim {
  color: #64748b;
}

.metric-val.text-main {
  color: #0f172a;
}

/* Collapsible Content */
.aging-month-content {
  display: none;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  padding: 14px 16px;
}

.aging-month-content.open {
  display: block;
}

.aging-month-content .desktop-table-wrapper {
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Status Pills */
.aging-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill-red {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.pill-green {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #86efac;
}

.pill-orange {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
}

/* Mobile Aging Cards */
.aging-mobile-card {
  background: #ffffff;
  border: 1.5px solid #1e293b;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aging-mob-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
}

.aging-mob-inv-code {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-blue);
}

.aging-mob-desc {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.aging-mob-dates-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.aging-mob-date-item {
  display: flex;
  flex-direction: column;
}

.aging-mob-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
}

.aging-mob-val {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.aging-mob-inv-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aging-mob-type-text {
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 20px;
}

.aging-mob-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: 2px;
}

.aging-mob-price-col {
  display: flex;
  flex-direction: column;
}

.aging-mob-price-col.col-left {
  align-items: flex-start;
  text-align: left;
}

.aging-mob-price-col.col-right {
  align-items: flex-end;
  text-align: right;
}

.aging-mob-total-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.aging-mob-inv-val {
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
}

.aging-mob-net-val {
  font-size: 1.02rem;
  font-weight: 800;
}

.text-red {
  color: #dc2626 !important;
}

.text-green {
  color: #059669 !important;
}

/* Aging Empty Box */
.aging-empty-box {
  text-align: center;
  padding: 40px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: #ffffff;
}

.aging-empty-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.aging-empty-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.aging-loading-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
}

/* Aging Responsive Breakpoints */
@media (max-width: 992px) {
  .aging-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .aging-kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .aging-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .aging-header-actions {
    width: 100%;
  }
  .aging-header-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .desktop-month-header {
    display: none !important;
  }
  .mobile-month-header {
    display: flex !important;
  }
  .aging-month-header {
    padding: 12px 14px;
    gap: 8px;
  }
  .month-title {
    font-size: 0.95rem;
  }
  .month-count-pill {
    font-size: 0.72rem;
    padding: 2px 8px;
  }
  .aging-month-metrics-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 10px;
  }
  .month-metric-col.metric-total {
    grid-column: span 2;
    align-items: flex-start;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
    margin-top: 2px;
    flex-direction: row;
    justify-content: space-between;
  }
  .aging-month-content {
    padding: 10px 8px;
  }
}

/* ============================================================================
   CARİ HESAP EKSTRESİ (LEDGER) STYLES
   ============================================================================ */

.ledger-page-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ledger-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ledger-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px 0;
}

.ledger-page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.ledger-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Smart Filter & Action Bar */
.ledger-filter-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.ledger-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ledger-date-inputs {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.ledger-date-fields-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
}

.ledger-date-fields-row .date-input-group {
  flex: 1;
  min-width: 0;
}

.date-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-input-group label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
  pointer-events: none;
}

.input-with-icon input[type="date"] {
  width: 100%;
  padding-left: 34px;
  height: 38px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.input-with-icon input[type="date"]:focus {
  border-color: var(--accent-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.btn-filter-submit {
  height: 38px;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Quick Filter Buttons - 4 Equal Columns, Tangible Pressable Button Style */
.ledger-quick-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  min-width: 280px;
}

.quick-filter-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 7px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.quick-filter-btn:hover {
  color: var(--text-main);
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.quick-filter-btn:active {
  transform: translateY(1px);
}

.quick-filter-btn.active,
.ledger-quick-filters .quick-filter-btn.active {
  background: var(--accent-blue) !important;
  color: #ffffff !important;
  border: 2px solid #0284c7 !important;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35) !important;
  font-weight: 800 !important;
}

/* Export Actions */
.ledger-export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export {
  height: 38px;
  padding: 0 14px;
  font-size: 0.825rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 4 Financial KPI Cards */
.ledger-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ledger-kpi-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ledger-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ledger-kpi-card.kpi-borc {
  border-left: 4px solid #dc2626;
}

.ledger-kpi-card.kpi-alacak {
  border-left: 4px solid #059669;
}

.ledger-kpi-card.kpi-devir {
  border-left: 4px solid #8b5cf6;
}

.ledger-kpi-card.kpi-kapanis {
  border-left: 4px solid var(--accent-blue);
  background: linear-gradient(to bottom right, #ffffff, #f0f9ff);
}

.kpi-icon-box.icon-teal {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
}

/* Section Title */
.ledger-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ledger-section-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ledger-section-title-row h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ledger-badge-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.ledger-period-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(2, 132, 199, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Ledger Table & Container */
.ledger-table-container {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.ledger-loading-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
}

.ledger-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ledger-table thead {
  position: static !important;
  z-index: 1;
}

.ledger-table thead th {
  position: static !important;
  background: #f1f5f9 !important;
  color: #1e293b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #cbd5e1;
  padding: 12px 14px;
  z-index: 1;
  box-shadow: none !important;
}

.ledger-table tbody td {
  padding: 12px 14px;
  font-size: 0.875rem;
  border-bottom: 1px solid #f1f5f9;
}

.ledger-table tbody tr.ledger-row {
  transition: background 0.15s ease;
}

.ledger-table tbody tr.ledger-row:hover {
  background: #f8fafc;
}

/* Ledger Table Spotlight Dimming */
.ledger-table-container.has-active-history .ledger-table tbody tr.ledger-row:not(.active-history-row):not(.active-row),
.ledger-table-container.has-active-history .ledger-table tbody tr.ledger-devir-row:not(.active-history-row):not(.active-row),
.desktop-table-wrapper.has-active-history .ledger-table tbody tr.ledger-row:not(.active-history-row):not(.active-row),
.desktop-table-wrapper.has-active-history .ledger-table tbody tr.ledger-devir-row:not(.active-history-row):not(.active-row),
.ledger-table.has-active-history tbody tr.ledger-row:not(.active-history-row):not(.active-row),
.ledger-table.has-active-history tbody tr.ledger-devir-row:not(.active-history-row):not(.active-row) {
    opacity: 0.28 !important;
    filter: grayscale(35%) !important;
    transition: all 0.25s ease-in-out !important;
}

.ledger-table-container.has-active-history .ledger-table tbody tr.ledger-row:not(.active-history-row):not(.active-row):hover,
.ledger-table-container.has-active-history .ledger-table tbody tr.ledger-devir-row:not(.active-history-row):not(.active-row):hover,
.desktop-table-wrapper.has-active-history .ledger-table tbody tr.ledger-row:not(.active-history-row):not(.active-row):hover,
.desktop-table-wrapper.has-active-history .ledger-table tbody tr.ledger-devir-row:not(.active-history-row):not(.active-row):hover,
.ledger-table.has-active-history tbody tr.ledger-row:not(.active-history-row):not(.active-row):hover,
.ledger-table.has-active-history tbody tr.ledger-devir-row:not(.active-history-row):not(.active-row):hover {
    opacity: 0.85 !important;
    filter: grayscale(0%) !important;
}

/* Explicit Full Opacity & No Filter for Active Rows */
.ledger-table tbody tr.active-history-row,
.ledger-table tbody tr.active-row,
.ledger-table tbody tr.ledger-detail-row.active-row,
.ledger-table tbody tr.ledger-detail-row.active-history-row {
    opacity: 1 !important;
    filter: none !important;
}

/* Unified Prominent Blue Frame for Active Ledger Row & Detail Drawer */
.ledger-table tbody tr.ledger-row.active-history-row > td,
.ledger-table tbody tr.ledger-row.active-row > td,
.ledger-table tbody tr.ledger-devir-row.active-row > td,
.ledger-table tbody tr.ledger-devir-row.active-history-row > td {
    background: #f0f9ff !important;
    border-top: 2.5px solid #0284c7 !important;
    border-bottom: 1px dashed #bae6fd !important;
    opacity: 1 !important;
    filter: none !important;
}

.ledger-table tbody tr.ledger-row.active-history-row > td:first-child,
.ledger-table tbody tr.ledger-row.active-row > td:first-child,
.ledger-table tbody tr.ledger-devir-row.active-row > td:first-child {
    border-left: 3.5px solid #0284c7 !important;
    border-top-left-radius: 6px;
}

.ledger-table tbody tr.ledger-row.active-history-row > td:last-child,
.ledger-table tbody tr.ledger-row.active-row > td:last-child,
.ledger-table tbody tr.ledger-devir-row.active-row > td:last-child {
    border-right: 3.5px solid #0284c7 !important;
    border-top-right-radius: 6px;
}

.ledger-devir-row {
  background: #faf5ff !important;
  border-bottom: 1.5px solid #e9d5ff !important;
}

.ledger-devir-row td {
  font-weight: 600;
}

.ledger-total-row {
  background: #f8fafc;
  border-top: 2px solid #cbd5e1;
}

.ledger-total-row td {
  padding: 14px 16px !important;
}

/* Ledger Accordion Detail Rows */
.ledger-detail-row td {
  padding: 0 !important;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0 !important;
}

.ledger-table tbody tr.ledger-detail-row.active-row > td,
.ledger-table tbody tr.ledger-detail-row.active-history-row > td {
    border-bottom: 3.5px solid #0284c7 !important;
    border-left: 3.5px solid #0284c7 !important;
    border-right: 3.5px solid #0284c7 !important;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background: #f8fafc !important;
    box-shadow: 0 14px 28px -6px rgba(2, 132, 199, 0.25), 0 4px 10px rgba(0, 0, 0, 0.06) !important;
    opacity: 1 !important;
    filter: none !important;
}

.ledger-detail-box {
  padding: 14px 18px;
  background: #f8fafc;
}

.ledger-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.detail-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-vade-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(2, 132, 199, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.detail-subnote {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
}

.detail-desc-bar {
  font-size: 0.825rem;
  color: #1e293b;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.ledger-detail-note-box {
  font-size: 0.85rem;
  color: #334155;
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.ledger-detail-note-box p {
  margin: 4px 0;
}

/* Embedded Subtable for Line Items */
.ledger-subtable-wrapper {
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-top: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ledger-sub-table {
  width: 100%;
  border-collapse: collapse;
}

.ledger-sub-table thead th {
  background: #f1f5f9;
  font-size: 0.7rem;
  font-weight: 800;
  color: #475569;
  padding: 8px 12px;
  border-bottom: 1px solid #cbd5e1;
}

.ledger-sub-table tbody td {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-bottom: 1px solid #f8fafc;
}

/* Ledger Status & Type Pills (Canlı ve Net Renk Grupları) */
.ledger-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.ledger-pill.pill-blue {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.ledger-pill.pill-pink {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #f472b6;
}

.ledger-pill.pill-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.ledger-pill.pill-teal {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #2dd4bf;
}

.ledger-pill.pill-amber {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.ledger-pill.pill-orange {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.ledger-pill.pill-red {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.ledger-pill.pill-purple {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.ledger-pill.pill-slate {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #94a3b8;
}

/* Mobile Ledger Cards */
.ledger-mobile-wrapper {
  padding: 12px;
  display: none !important;
  flex-direction: column;
  gap: 10px;
}

.ledger-mobile-card {
  background: #ffffff;
  border: 1.5px solid #1e293b;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ledger-mobile-card:hover {
  border-color: var(--accent-blue);
}

.ledger-mobile-card.active-card {
  border-color: var(--accent-blue);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.15);
}

.ledger-mob-devir-card {
  border-color: #8b5cf6;
  background: #faf5ff;
}

.ledger-mob-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.ledger-mob-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.ledger-mob-evrak {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-all;
}

.ledger-mob-type-tag {
  display: flex;
  align-items: center;
}

.ledger-mob-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 2px;
}

.ledger-mob-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.ledger-mob-detail-box {
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  margin-top: 4px;
}

/* Invoice Drawer Styles */
.ledger-invoice-drawer {
  padding: 14px 20px !important;
  background: linear-gradient(to right, #f8fafc, #f0fdf4) !important;
  border: 1.5px solid #86efac !important;
  border-radius: 10px !important;
}

.ledger-invoice-drawer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.invoice-drawer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.invoice-drawer-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.invoice-drawer-meta {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
}

.btn-view-invoice {
  background: #0284c7;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-view-invoice:hover {
  background: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* Mobile Invoice Drawer */
.ledger-mob-invoice-drawer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px !important;
  background: #f0fdf4 !important;
  border: 1px solid #86efac !important;
}

.btn-mob-view-invoice {
  width: 100%;
  height: 44px;
  background: #0284c7;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

.btn-mob-view-invoice:hover {
  background: #0369a1;
}

.mob-invoice-vade {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

.mob-detail-note {
  font-size: 0.825rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.mob-detail-subnote {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mob-detail-vade {
  font-size: 0.75rem;
  color: #475569;
  margin-bottom: 8px;
}

.ledger-mob-lines-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin: 6px 0 4px 0;
  border-top: 1px dashed #cbd5e1;
  padding-top: 6px;
}

.ledger-mob-line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.75rem;
}

.mob-line-left {
  display: flex;
  flex-direction: column;
}

.mob-line-code {
  font-family: monospace;
  font-weight: 700;
  color: var(--accent-blue);
}

.mob-line-name {
  color: #334155;
  font-weight: 500;
}

.mob-line-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.mob-line-qty {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.mob-line-price {
  font-weight: 800;
  color: #0f172a;
}

.ledger-mob-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.ledger-mob-amounts {
  display: flex;
  align-items: center;
  gap: 16px;
}

.amount-col {
  display: flex;
  flex-direction: column;
}

.amount-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-dim);
}

.amount-val {
  font-size: 0.875rem;
  font-weight: 800;
}

.amount-val.text-dim {
  color: #94a3b8;
}

.ledger-mob-bakiye-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.bakiye-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-dim);
}

.bakiye-val {
  font-size: 0.95rem;
  font-weight: 900;
}

.ledger-mob-cum-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-dim);
}

.ledger-mob-cum-val {
  font-size: 1.05rem;
  font-weight: 900;
}

.ledger-mob-summary-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.mob-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.mob-summary-row.total-row {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  margin-top: 2px;
  color: var(--text-main);
  font-weight: 800;
}

/* Ledger Responsive Breakpoints */
@media (max-width: 992px) {
  .ledger-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-table-wrapper {
    display: none !important;
  }
  .mobile-cards-wrapper,
  .ledger-mobile-wrapper {
    display: flex !important;
  }
  .ledger-kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ledger-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ledger-header-actions {
    width: 100%;
    display: flex;
    gap: 10px;
  }
  .ledger-header-actions .btn {
    flex: 1;
    height: 44px;
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
  }
  .ledger-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .ledger-date-inputs {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .ledger-date-fields-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
  }
  .ledger-date-fields-row .date-input-group {
    flex: 1;
    min-width: 0;
  }
  .ledger-date-fields-row .input-with-icon input[type="date"] {
    width: 100%;
    height: 40px;
    font-size: 0.85rem;
  }
  .btn-filter-submit {
    width: 100%;
    height: 42px;
    font-size: 0.9rem;
    justify-content: center;
  }
  .ledger-quick-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding: 4px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
  }
  .quick-filter-btn {
    padding: 8px 2px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  .ledger-export-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .ledger-export-actions .btn {
    flex: 1;
    height: 40px;
    justify-content: center;
  }
  .ledger-section-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }
  .ledger-section-title-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .ledger-section-title-row h2 {
    font-size: 1.1rem;
    white-space: nowrap;
  }
  .ledger-period-text {
    width: 100%;
    text-align: left;
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: normal;
    word-break: break-word;
    box-sizing: border-box;
  }
}

/* ============================================================================
   LEDGER INITIAL STATE
   ============================================================================ */

.ledger-initial-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.ledger-initial-state i {
  display: block;
}

.ledger-initial-state h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.ledger-initial-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ============================================================================
   PRODUCT PURCHASE & RETURN HISTORY (SPOTLIGHT & ACCORDION)
   ============================================================================ */

.btn-history-circle-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
    padding: 0;
}

.btn-history-circle-toggle:hover {
    background: #0369a1;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.45);
}

.btn-history-circle-toggle.active {
    background: #0f172a !important;
    color: #ffffff !important;
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.4) !important;
}

.clickable-history-row {
    cursor: pointer;
}

.clickable-history-row:hover td {
    background-color: #f0f9ff !important;
}

.clickable-history-card {
    cursor: pointer;
}

/* Desktop Search Table Spotlight & Focus Dimming */
.desktop-table-wrapper.has-active-history .results-table:not(.ledger-table) > tbody > tr:not(.active-history-row):not(.product-history-drawer-row),
.results-card.has-active-history .results-table:not(.ledger-table) > tbody > tr:not(.active-history-row):not(.product-history-drawer-row),
.results-table.has-active-history:not(.ledger-table) > tbody > tr:not(.active-history-row):not(.product-history-drawer-row) {
    opacity: 0.28 !important;
    filter: grayscale(35%) !important;
    transition: all 0.25s ease-in-out !important;
}

.desktop-table-wrapper.has-active-history .results-table:not(.ledger-table) > tbody > tr:not(.active-history-row):not(.product-history-drawer-row):hover,
.results-card.has-active-history .results-table:not(.ledger-table) > tbody > tr:not(.active-history-row):not(.product-history-drawer-row):hover,
.results-table.has-active-history:not(.ledger-table) > tbody > tr:not(.active-history-row):not(.product-history-drawer-row):hover {
    opacity: 0.85 !important;
    filter: grayscale(0%) !important;
}

/* Active Row + Drawer Unified Prominent Blue Frame on Desktop */
.results-table tbody tr.active-history-row,
tr.active-history-row {
    opacity: 1 !important;
    filter: none !important;
}

.results-table tbody tr.active-history-row:not(.product-history-drawer-row) > td,
tr.active-history-row:not(.product-history-drawer-row) > td {
    background: #f0f9ff !important;
    border-top: 2.5px solid #0284c7 !important;
    border-bottom: 1px dashed #bae6fd !important;
    opacity: 1 !important;
    filter: none !important;
}

.results-table tbody tr.active-history-row:not(.product-history-drawer-row) > td:first-child,
tr.active-history-row:not(.product-history-drawer-row) > td:first-child {
    border-left: 3.5px solid #0284c7 !important;
    border-top-left-radius: 6px;
}

.results-table tbody tr.active-history-row:not(.product-history-drawer-row) > td:last-child,
tr.active-history-row:not(.product-history-drawer-row) > td:last-child {
    border-right: 3.5px solid #0284c7 !important;
    border-top-right-radius: 6px;
}

.results-table tbody tr.product-history-drawer-row.active-history-row > td,
tr.product-history-drawer-row.active-history-row > td {
    border-bottom: 3.5px solid #0284c7 !important;
    border-left: 3.5px solid #0284c7 !important;
    border-right: 3.5px solid #0284c7 !important;
    border-top: 1px dashed #bae6fd !important;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background: #f8fafc !important;
    box-shadow: 0 14px 28px -6px rgba(2, 132, 199, 0.25), 0 4px 10px rgba(0, 0, 0, 0.06) !important;
    opacity: 1 !important;
    filter: none !important;
}

/* Mobile Card Spotlight */
#mobile-results-cards.has-active-history .mobile-card:not(.active-history-card) {
    opacity: 0.38 !important;
    filter: grayscale(25%) !important;
    transition: all 0.25s ease-in-out !important;
}

#mobile-results-cards.has-active-history .mobile-card:not(.active-history-card):hover {
    opacity: 0.85 !important;
    filter: grayscale(0%) !important;
}

.mobile-card.active-history-card {
    opacity: 1 !important;
    filter: none !important;
    border-left: 4px solid var(--accent-blue) !important;
    border-top: 1.5px solid #bae6fd !important;
    border-right: 1.5px solid #bae6fd !important;
    border-bottom: 1.5px solid #bae6fd !important;
    background: #f0f9ff !important;
    box-shadow: 0 10px 25px -4px rgba(2, 132, 199, 0.22), 0 3px 8px rgba(0, 0, 0, 0.05) !important;
}

/* History Drawer Container */
.product-history-container {
    padding: 12px 16px;
    background: #f8fafc;
}

.mobile-history-container {
    margin-top: 10px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* Mobile Scroll Indicator Rule - Hidden on Desktop, Pulsing on Mobile */
.mobile-only {
    display: none !important;
}

.mobile-scroll-indicator {
    display: none !important;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.775rem;
    font-weight: 700;
    margin-bottom: 10px;
    align-items: center;
    gap: 6px;
    animation: pulseSoft 2s infinite ease-in-out;
}

@media (max-width: 860px) {
    .mobile-only {
        display: block !important;
    }
    .mobile-scroll-indicator {
        display: inline-flex !important;
    }
}

.history-table-wrap {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.825rem;
    text-align: left;
    white-space: nowrap;
    background: #ffffff;
}

.history-table thead th {
    position: static !important;
    top: auto !important;
    z-index: 1 !important;
    background: #f1f5f9 !important;
    padding: 9px 14px !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}

.history-table tbody td {
    padding: 9px 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: var(--text-main) !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: #ffffff !important;
    font-size: 0.835rem !important;
}

.history-table tbody tr:hover td {
    background: #f8fafc !important;
}

.history-table tr:last-child td {
    border-bottom: none !important;
}

.badge-fatura-satis {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-fatura-iade {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================================
   BACKORDER (BAKİYE SİPARİŞİ) & CART ACTION BUTTON EQUALIZATION
   ============================================================================ */

.results-table td .btn-primary.btn-sm,
.results-table td .btn-action-backorder {
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    line-height: 1 !important;
    padding: 0 10px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: var(--radius-sm) !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.results-table td .btn-primary.btn-sm {
    background: linear-gradient(135deg, var(--accent-blue), #0284c7) !important;
    border: 1px solid #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.3) !important;
}

.results-table td .btn-primary.btn-sm:hover {
    background: var(--accent-blue-hover) !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.45) !important;
    transform: translateY(-1px);
}

.results-table td .btn-action-backorder {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border: 1px solid #c2410c !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(234, 88, 12, 0.3) !important;
}

.results-table td .btn-action-backorder:hover {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%) !important;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.45) !important;
    transform: translateY(-1px);
}

.results-table td .btn-primary.btn-sm:active,
.results-table td .btn-action-backorder:active {
    transform: translateY(1px);
}

.btn-mobile-bo-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #ffffff !important;
    border-color: #c2410c !important;
    box-shadow: 0 2px 5px rgba(234, 88, 12, 0.25) !important;
}

.btn-cart-backorder-tag {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.725rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================================
   RESTOCK PULSING NOTIFICATION ANIMATIONS
   ============================================================================ */
@keyframes pulseGreenText {
    0% {
        color: var(--text-main);
    }
    50% {
        color: #059669;
        font-weight: 800;
        text-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
    }
    100% {
        color: var(--text-main);
    }
}

@keyframes pulseGreenGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        border-color: var(--border-color);
        background: transparent;
    }
    50% {
        box-shadow: 0 0 8px 1px rgba(16, 185, 129, 0.4);
        border-color: #059669;
        background: rgba(16, 185, 129, 0.08);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        border-color: var(--border-color);
        background: transparent;
    }
}

.pulse-green-highlight {
    animation: pulseGreenText 1.6s infinite ease-in-out !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transform: none !important;
    display: inline !important;
}

.btn-nav-bo-pulsing {
    animation: pulseGreenGlow 1.6s infinite ease-in-out !important;
    border-color: #059669 !important;
    color: #047857 !important;
    transform: none !important;
}

.btn-cart-backorder-tag:hover {
    background: #fde68a;
    color: #92400e;
}

.mobile-bo-tag-btn {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mobile-bo-tag-btn:hover {
    background: #fde68a;
}

/* ============================================================================
   GLOBAL MODAL SYSTEM (PERFECT CENTERING & BACKDROP)
   ============================================================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    animation: fadeInModal 0.2s ease-out;
}

.modal-backdrop[style*="display: none"] {
    display: none !important;
}

.modal-backdrop[style*="display: flex"] {
    display: flex !important;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
    margin: auto !important;
    animation: popModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popModal {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-dim);
    transition: color 0.15s ease;
    padding: 4px;
}

.modal-close-btn:hover {
    color: #dc2626;
}

/* ============================================================================
   NOTIFICATION CENTER & BLUE GLOWING ENVELOPE DESIGN SYSTEM
   ============================================================================ */

.nav-notification-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    user-select: none;
}

/* 3D Tactile Blue Notification Envelope Button */
.btn-nav-envelope {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 9px;
    border: 1.5px solid #0284c7;
    border-bottom: 3px solid #0369a1;
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0284c7;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
}

.btn-nav-envelope .envelope-icon {
    font-size: 1.05rem;
    color: #0284c7;
    transition: transform 0.2s ease;
}

.btn-nav-envelope:hover {
    background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #0284c7;
    border-bottom-color: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.btn-nav-envelope:hover .envelope-icon {
    transform: scale(1.15);
}

.btn-nav-envelope:active {
    transform: translateY(2px);
    border-bottom-width: 1.5px;
    box-shadow: 0 1px 2px rgba(2, 132, 199, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Eye-Catching Soft Blue Glowing & Pulsing Animation (Bildirim Geldiğinde) */
.btn-nav-envelope.has-unread,
.btn-nav-envelope-pulsing {
    animation: blueGlowPulse 1.8s infinite ease-in-out !important;
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
    border-color: #38bdf8 !important;
    border-bottom-color: #082f49 !important;
    color: #ffffff !important;
}

.btn-nav-envelope.has-unread .envelope-icon,
.btn-nav-envelope-pulsing .envelope-icon {
    color: #ffffff !important;
    animation: envelopeWiggle 2.8s infinite ease-in-out !important;
    display: inline-block;
    transform-origin: center center;
}

/* Dikkat Çekici Zarf Sallanma Hareketi */
@keyframes envelopeWiggle {
    0%, 75%, 100% {
        transform: rotate(0deg) scale(1);
    }
    80% {
        transform: rotate(-12deg) scale(1.12);
    }
    85% {
        transform: rotate(12deg) scale(1.12);
    }
    90% {
        transform: rotate(-8deg) scale(1.08);
    }
    95% {
        transform: rotate(6deg) scale(1.04);
    }
}

/* Yumuşak Mavi Dış Işık Parlaması */
@keyframes blueGlowPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4), 0 2px 4px rgba(15, 23, 42, 0.1);
        border-color: #38bdf8;
    }
    50% {
        box-shadow: 0 0 14px 4px rgba(2, 132, 199, 0.75), 0 2px 8px rgba(2, 132, 199, 0.4);
        border-color: #7dd3fc;
    }
}

/* Tümünü Temizle Butonu */
.btn-clear-notifs {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-clear-notifs:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Tıklanabilir Bildirim Kartı */
.notif-item-card.clickable {
    cursor: pointer;
    transition: all 0.18s ease;
}

.notif-item-card.clickable:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.12);
}

/* Badge Count on Envelope (Sabit ve Net) */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    line-height: 1;
    z-index: 2;
    transform: none !important;
}

/* Notification Dropdown Popover */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 390px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.22), 0 4px 14px rgba(0, 0, 0, 0.08);
    z-index: 1200;
    overflow: hidden;
    animation: slideDownNotif 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes slideDownNotif {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notif-dropdown-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}

.notif-header-badge {
    font-size: 0.725rem;
    font-weight: 800;
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
}

.notif-dropdown-body {
    max-height: 390px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual Notification Item Card */
.notif-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 11px 12px;
    display: flex;
    gap: 11px;
    align-items: flex-start;
    transition: all 0.15s ease;
    position: relative;
    border-left: 4px solid var(--accent-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.notif-item-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    border-left-color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.notif-item-card.type-restock {
    border-left-color: #059669;
}
.notif-item-card.type-restock .notif-item-icon {
    background: #dcfce7;
    color: #059669;
}

.notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    gap: 6px;
}

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.notif-item-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #dcfce7;
    color: #166534;
    white-space: nowrap;
}

.notif-item-msg {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.35;
    margin-bottom: 6px;
}

.notif-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.notif-btn-action {
    background: #0284c7;
    color: #ffffff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.notif-btn-action:hover {
    background: #0369a1;
    transform: translateY(-1px);
    color: #ffffff;
}

.notif-btn-action.btn-action-green {
    background: #059669;
}
.notif-btn-action.btn-action-green:hover {
    background: #047857;
}

.notif-btn-outline {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.notif-btn-outline:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Empty State in Dropdown */
.notif-empty-state {
    padding: 36px 16px;
    text-align: center;
    color: var(--text-dim);
}

.notif-empty-state i {
    font-size: 2.2rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    display: block;
}

.notif-empty-state p {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
}

.notif-dropdown-footer {
    background: #f8fafc;
    padding: 8px 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.notif-footer-btn-clear {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.775rem;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.notif-footer-btn-clear:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: 64px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
}

/* ============================================================================
   B4B TOAST NOTIFICATION SYSTEM (KARE / 3 SATIRLI ZÜMRÜT YEŞİLİ TASARIM)
   ============================================================================ */

.b4b-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999999;
    width: 250px;
    min-height: 120px;
    background: linear-gradient(145deg, #059669 0%, #047857 100%);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 18px 40px -4px rgba(5, 150, 105, 0.5), 0 8px 16px -4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.b4b-toast.toast-error {
    background: linear-gradient(145deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 18px 40px -4px rgba(220, 38, 38, 0.5), 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

.b4b-toast.toast-info {
    background: linear-gradient(145deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 18px 40px -4px rgba(2, 132, 199, 0.5), 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

.b4b-toast.toast-warning {
    background: linear-gradient(145deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 18px 40px -4px rgba(217, 119, 6, 0.5), 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

.b4b-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.b4b-toast .toast-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.b4b-toast .toast-header-row i {
    font-size: 1.3rem;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
}

.b4b-toast .toast-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.b4b-toast .toast-code-row {
    font-size: 1.06rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    word-break: break-word;
    margin-top: 2px;
    letter-spacing: 0.2px;
}

.b4b-toast .toast-qty-row {
    font-size: 0.96rem;
    font-weight: 700;
    color: #f0fdf4;
    line-height: 1.2;
    opacity: 0.95;
}

@media (max-width: 640px) {
    .b4b-toast {
        bottom: 24px;
        right: 20px;
        left: auto;
        width: 230px;
        min-height: 110px;
        padding: 14px 16px;
    }
    .b4b-toast .toast-title {
        font-size: 1.05rem;
    }
    .b4b-toast .toast-code-row {
        font-size: 0.98rem;
    }
    .b4b-toast .toast-qty-row {
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .b4b-toast {
        bottom: 24px;
        right: 20px;
        left: auto;
        width: 230px;
        min-height: 100px;
        padding: 12px 16px;
    }
}










