/* Modern Order Page Styles */
.order-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 12px;
}

.order-page-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  flex: 1;
  min-width: 200px;
}

.btn-order-save {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}

.btn-order-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-order-save:active {
  transform: translateY(0);
}

.order-layout-new {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
}

.order-main-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.order-sidebar {
  display: none;
}

.card-modern {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
  width: 100%;
}

.card-modern:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-modern-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.card-modern-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.cart-total-badge {
  background: rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  color: white;
  display: inline-block;
}

.card-modern-body {
  padding: 16px;
}

/* Sepet Kompakt Liste Tasarımı - Satır Satır */
.cart-cards-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 600px;
  min-height: 400px;
  overflow-y: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  background: #f3f4f6;
  border-radius: 8px;
}

/* Mobil için daha yüksek scroll alanı */
@media (max-width: 768px) {
  .cart-cards-container {
    max-height: 70vh;
    min-height: 300px;
  }
}

/* Custom scrollbar for cart */
.cart-cards-container::-webkit-scrollbar {
  width: 8px;
}

.cart-cards-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.cart-cards-container::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 4px;
}

.cart-cards-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.cart-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 12px;
  padding: 16px 12px;
  min-height: 200px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  align-items: start;
  transition: all 0.2s;
}

/* Mobil için daha geniş ve okunabilir */
@media (max-width: 768px) {
  .cart-row {
    padding: 20px 12px;
    min-height: 220px;
    gap: 14px;
  }
}

.cart-row:nth-child(odd) {
  background: #f0f9ff;
}

.cart-row:nth-child(even) {
  background: #ffffff;
}

.cart-row:hover {
  background: #dbeafe;
  box-shadow: inset 0 0 0 2px #3b82f6;
}

.cart-row-num {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-row-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

/* Mobil için daha geniş gap */
@media (max-width: 768px) {
  .cart-row-main {
    gap: 14px;
  }
}

.cart-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.cart-row-product {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.cart-row-code {
  font-size: 11px;
  font-weight: 700;
  color: #667eea;
  font-family: 'Courier New', monospace;
}

.cart-row-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
}

/* Mobil için daha büyük fontlar */
@media (max-width: 768px) {
  .cart-row-code {
    font-size: 13px;
  }
  
  .cart-row-name {
    font-size: 15px;
  }
}

.cart-row-line1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.cart-row-discounts {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cart-row-line2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.cart-row-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cart-row-field label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

.cart-row-price {
  font-size: 16px;
  font-weight: 700;
  color: #374151;
}

.cart-row-net {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.cart-row-total {
  font-size: 15px;
  font-weight: 700;
  color: #10b981;
  white-space: nowrap;
  padding: 4px 8px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 6px;
  border: 2px solid #10b981;
}

.cart-row-input {
  width: 50px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  min-height: 36px;
}

.cart-row-input:focus {
  outline: none;
  border-color: #667eea;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.cart-row-qty-field {
  min-width: 0;
}

.cart-row-qty {
  width: 80px;
  padding: 8px;
  background: #ecfdf5;
  border: 2px solid #10b981;
  color: #059669;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
}

/* Mobil için daha büyük input alanları */
@media (max-width: 768px) {
  .cart-row-input {
    width: 60px;
    padding: 8px 10px;
    font-size: 15px;
    min-height: 44px;
  }
  
  .cart-row-qty {
    width: 90px;
    padding: 10px;
    font-size: 16px;
    min-height: 48px;
  }
}

.cart-row-qty:focus {
  background: #d1fae5;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.cart-row-delete {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-row-delete:hover {
  background: #dc2626;
  transform: scale(1.1) rotate(90deg);
}

.cart-row-delete:active {
  transform: scale(0.9);
}

.cart-table-wrapper {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Custom scrollbar */
.cart-table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.cart-table-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.cart-table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
}

.cart-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

.table-modern-order {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.table-modern-order tbody tr {
  transition: all 0.2s;
  border-bottom: 1px solid #e5e7eb;
}

.table-modern-order tbody tr:nth-child(odd) {
  background: #f9fafb;
}

.table-modern-order tbody tr:nth-child(even) {
  background: #ffffff;
}

.table-modern-order tbody tr:hover {
  background: #e0f2fe;
  box-shadow: inset 0 0 0 1px #3b82f6;
  transform: scale(1.01);
}

.table-modern-order thead {
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table-modern-order tbody tr {
  transition: all 0.2s;
  border-bottom: 1px solid #e5e7eb;
}

.table-modern-order tbody tr:nth-child(odd) {
  background: #f0f9ff;
}

.table-modern-order tbody tr:nth-child(even) {
  background: #ffffff;
}

.table-modern-order th {
  padding: 12px 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-right: 1px solid rgba(255,255,255,0.2);
  white-space: nowrap;
}

.table-modern-order th:last-child {
  border-right: none;
}

.table-modern-order td {
  padding: 12px 8px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  font-size: 14px;
}

.table-modern-order td:last-child {
  border-right: none;
}

.table-modern-order td input.in {
  width: 60px;
  padding: 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  background: white;
  transition: all 0.2s;
}

.table-modern-order td input.in:focus {
  outline: none;
  border-color: #667eea;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.table-modern-order td.num {
  text-align: right;
  font-weight: 500;
}

.table-modern-order tbody tr:hover {
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 1px #3b82f6;
  transform: scale(1.005);
}

.table-modern-order .btn.danger {
  padding: 6px 12px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.table-modern-order .btn.danger:hover {
  background: #dc2626;
  transform: scale(1.05);
}

.table-modern-order .btn.danger:active {
  transform: scale(0.95);
}

.empty-cart-msg {
  padding: 60px 20px;
  text-align: center;
  color: #9ca3af;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.search-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.search-group-single {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.input-search {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.input-search:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-search {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  white-space: nowrap;
}

.btn-search:hover {
  background: #5568d3;
  transform: translateY(-1px);
}

.btn-search:active {
  transform: translateY(0);
}

.btn-add {
  padding: 12px 20px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  white-space: nowrap;
  display: none; /* Başlangıçta gizli - kartlardan direkt ekleme yapılacak */
}

.btn-add:hover {
  background: #059669;
  transform: scale(1.05);
}

.btn-add:active {
  transform: scale(1);
}

.select-modern {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 12px;
  background: white;
  max-height: 280px;
  overflow-y: auto;
}

.select-modern option {
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
}

/* Kart Tabanlı Seçim Listesi (Dropdown yerine) */
.selection-card-list {
  margin-top: 12px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 2px solid #667eea;
  border-radius: 12px;
  background: #f9fafb;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.selection-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.selection-card:hover {
  border-color: #667eea;
  background: #f0f9ff;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.selection-card:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.selection-card:active .selection-card-code,
.selection-card:active .selection-card-name,
.selection-card:active .selection-card-price {
  color: white;
}

.selection-card:last-child {
  margin-bottom: 0;
}

/* Ürün kartı için ekleme badge */
.product-card {
  position: relative;
  border-left: 4px solid #10b981;
}

.product-card:hover {
  border-left-color: #059669;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.card-add-badge {
  margin-top: 8px;
  padding: 6px 12px;
  background: #10b981;
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s;
}

.product-card:hover .card-add-badge {
  background: #059669;
  transform: scale(1.05);
}

.product-card:active .card-add-badge {
  background: white;
  color: #10b981;
}

/* Eklendi animasyonu */
.card-added {
  animation: cardAddedPulse 0.6s ease-out;
  border-color: #10b981 !important;
  background: #d1fae5 !important;
}

@keyframes cardAddedPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  }
  100% {
    transform: scale(1);
  }
}

.selection-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.selection-card-code {
  font-size: 13px;
  font-weight: 700;
  color: #667eea;
  font-family: 'Courier New', monospace;
}

.selection-card-name {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 🆕 Müşteri stok kodu badge */
.musteri-stok-badge {
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  background: #ede9fe;
  padding: 4px 10px;
  border-radius: 12px;
  margin-top: 6px;
  display: inline-block;
}

.selection-card-price {
  font-size: 14px;
  font-weight: 700;
  color: #10b981;
  white-space: nowrap;
}

.product-selected {
  margin-top: 12px;
  padding: 12px;
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 14px;
  color: #1e40af;
}

.customer-info-box {
  margin-top: 12px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-height: 80px;
}

.placeholder-text {
  color: #9ca3af;
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

.form-field-modern {
  margin-bottom: 14px;
}

.form-field-modern label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.input-modern {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.input-modern:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea-modern {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
}

.textarea-modern:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-input {
  width: 100%;
  padding: 8px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.attachments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-small {
  padding: 8px 14px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-small:hover {
  background: #e5e7eb;
}

.btn-small:active {
  background: #d1d5db;
}

.btn-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-danger:hover {
  background: #fee2e2;
}

.info-text {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
}

.card-modern.collapsed .card-modern-body {
  display: none;
}

.collapse-icon {
  transition: transform 0.2s;
}

.card-modern.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

@media (max-width: 1024px) {
  .order-layout-new {
    grid-template-columns: 1fr;
  }
  
  .order-sidebar {
    display: none;
  }
  
  .attachments-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  
  .order-page-header {
    padding-bottom: 12px;
    margin-bottom: 16px;
  }
  
  .order-page-header h2 {
    font-size: 18px;
    min-width: auto;
    width: 100%;
  }
  
  /* Hide top save button on mobile */
  .btn-order-save-top {
    display: none;
  }
  
  /* Show bottom save button on mobile */
  .order-save-bottom {
    display: block;
  }
  
  .search-group,
  .search-group-single {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-group button,
  .btn-search,
  .btn-add {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }
  
  .input-search {
    min-width: 100%;
    font-size: 16px;
  }
  
  .cart-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
  }
  
  .table-modern-order {
    font-size: 12px;
    min-width: 1000px;
    table-layout: auto;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .table-modern-order th,
  .table-modern-order td {
    padding: 10px 6px;
    white-space: nowrap;
  }
  
  .table-modern-order th {
    font-size: 11px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 2;
  }
  
  .table-modern-order tbody tr:nth-child(odd) {
    background: #f0f9ff;
  }
  
  .table-modern-order tbody tr:nth-child(even) {
    background: #ffffff;
  }
  
  .table-modern-order tbody tr:hover {
    background: #dbeafe !important;
    transform: none;
  }
  
  .table-modern-order td input.in {
    width: 55px;
    padding: 6px;
    font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  text-align: center;
  transition: all 0.2s;
}

.table-modern-order td input.in:focus {
  outline: none;
  border-color: #667eea;
  background: #f0f9ff;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.table-modern-order td input.in-miktar {
  width: 70px;
  padding: 8px;
  font-size: 15px;
  font-weight: 600;
  background: #ecfdf5;
  border: 2px solid #10b981;
}

.table-modern-order td input.in-miktar:focus {
  background: #d1fae5;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  }
  
  .form-field-modern label {
    font-size: 14px;
    font-weight: 600;
  }
  
  .input-modern,
  .textarea-modern {
    font-size: 16px !important;
    padding: 12px;
  }
  
  .select-modern {
    font-size: 16px !important;
    padding: 14px;
    min-height: 48px;
    line-height: 1.5;
    max-height: 320px;
    overflow-y: auto;
    border: 2px solid #667eea;
  }
  
  .select-modern option {
    padding: 14px;
    font-size: 16px;
    line-height: 1.8;
    min-height: 48px;
    background: white;
  }
  
  .select-modern option:checked,
  .select-modern option:focus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
  }
  
  /* Mobil için kart listesi optimize edildi */
  .selection-card-list {
    max-height: 350px;
    padding: 10px;
    border-width: 3px;
  }
  
  .selection-card {
    padding: 16px;
    margin-bottom: 10px;
    min-height: 60px;
  }
  
  .selection-card-code {
    font-size: 14px;
  }
  
  .selection-card-name {
    font-size: 16px;
    font-weight: 500;
  }
  
  .selection-card-price {
    font-size: 15px;
  }
  
  .card-add-badge {
    font-size: 14px;
    padding: 8px 14px;
    margin-top: 10px;
  }
  
  .btn-small {
    padding: 12px 14px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .file-input {
    padding: 12px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .card-modern-body {
    padding: 14px;
  }
  
  .customer-info-box {
    padding: 14px;
    min-height: 70px;
  }
  
  /* Mobil için sepet satırları */
  .cart-cards-container {
    max-height: 450px;
    gap: 1px;
  }
  
  .cart-row {
    grid-template-columns: 32px 1fr 36px;
    gap: 8px;
    padding: 10px;
  }
  
  .cart-row-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .cart-row-main {
    gap: 6px;
  }
  
  .cart-row-code {
    font-size: 10px;
  }
  
  .cart-row-name {
    font-size: 13px;
  }
  
  .cart-row-line1 {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .cart-row-line2 {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  .cart-row-field {
    min-width: 0;
  }
  
  .cart-row-field label {
    font-size: 9px;
  }
  
  .cart-row-price,
  .cart-row-net {
    font-size: 12px;
  }
  
  .cart-row-total {
    font-size: 14px;
  }
  
  .cart-row-input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
  }
  
  .cart-row-qty-field {
    min-width: calc(50% - 6px);
    flex: 1 1 calc(50% - 6px);
  }
  
  .cart-row-qty {
    width: 100%;
    padding: 10px;
    font-size: 15px;
  }
  
  .cart-row-total-field {
    min-width: 100%;
    flex: 1 1 100%;
  }
  
  .cart-row-delete {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .cart-qty-group {
    grid-column: 1;
  }
  
  .cart-input {
    padding: 12px;
    font-size: 16px;
  }
  
  .cart-input-qty {
    font-size: 18px;
  }
  
  .cart-totals-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .cart-label {
    font-size: 12px;
  }
  
  .cart-value {
    font-size: 16px;
  }
  
  .cart-net {
    font-size: 18px;
  }
  
  .cart-amount {
    font-size: 20px;
  }

  audio {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .order-page-header h2 {
    font-size: 16px;
  }
  
  .btn-order-save-bottom {
    padding: 14px;
    font-size: 16px;
  }
  
  .cart-table-wrapper {
    max-height: 350px;
  }
  
  .table-modern-order {
    font-size: 11px;
    min-width: 950px;
  }
  
  .table-modern-order th {
    font-size: 10px;
    padding: 8px 4px;
  }
  
  .table-modern-order td {
    padding: 8px 4px;
  }
  
  .table-modern-order tbody tr:nth-child(odd) {
    background: #fef3c7;
  }
  
  .table-modern-order tbody tr:nth-child(even) {
    background: #ffffff;
  }
  
  .table-modern-order tbody tr:hover {
    background: #bfdbfe !important;
    transform: none;
  }
  
  .table-modern-order td input.in {
    width: 48px;
    padding: 5px;
    font-size: 12px;
  }
  
  .table-modern-order td input.in-miktar {
    width: 65px;
    padding: 8px 6px;
    font-size: 14px;
    font-weight: 700;
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    text-align: center;
  }
  
  .cart-total-badge {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .card-modern-header {
    padding: 12px 14px;
  }
  
  .card-modern-body {
    padding: 12px;
  }
  
  /* Mobil küçük ekran için kart optimize */
  .selection-card {
    padding: 14px;
    min-height: 56px;
  }
  
  .selection-card-code {
    font-size: 13px;
  }
  
  .selection-card-name {
    font-size: 15px;
  }
  
  .selection-card-price {
    font-size: 14px;
  }
  
  .card-add-badge {
    font-size: 13px;
    padding: 7px 12px;
  }
  
  /* Küçük mobil için sepet satırları */
  .cart-cards-container {
    max-height: 400px;
    gap: 1px;
  }
  
  .cart-row {
    grid-template-columns: 28px 1fr 32px;
    gap: 6px;
    padding: 8px;
  }
  
  .cart-row-num {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  
  .cart-row-main {
    gap: 6px;
  }
  
  .cart-row-code {
    font-size: 9px;
  }
  
  .cart-row-name {
    font-size: 12px;
  }
  
  .cart-row-line1 {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  
  .cart-row-line2 {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  
  .cart-row-field {
    min-width: 0;
  }
  
  .cart-row-field label {
    font-size: 8px;
  }
  
  .cart-row-price,
  .cart-row-net {
    font-size: 11px;
  }
  
  .cart-row-total {
    font-size: 13px;
    padding: 3px 6px;
  }
  
  .cart-row-input {
    width: 100%;
    padding: 7px;
    font-size: 13px;
  }
  
  .cart-row-qty {
    width: 100%;
    padding: 9px;
    font-size: 14px;
  }
  
  .cart-row-delete {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .cart-card-body {
    padding: 12px;
  }
  
  .cart-input {
    padding: 10px;
    font-size: 15px;
  }
  
  .cart-input-qty {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .order-page-header h2 {
    font-size: 15px;
  }
  
  .btn-order-save {
    font-size: 15px;
    padding: 12px;
  }
  
  .table-modern-order {
    font-size: 9px;
  }
  
  .table-modern-order tbody tr:nth-child(odd) {
    background: #fef3c7;
  }
  
  .table-modern-order tbody tr:nth-child(even) {
    background: #ffffff;
  }
  
  .table-modern-order tbody tr:hover {
    background: #bae6fd !important;
  }
  
  .table-modern-order td input.in {
    width: 40px;
    font-size: 10px;
  }
  
  .table-modern-order td input.in-miktar {
    width: 60px;
    padding: 7px 5px;
    font-size: 13px;
    font-weight: 700;
  }
  
  .select-modern {
    font-size: 15px !important;
    padding: 12px;
  }
  
  .select-modern option {
    font-size: 15px;
    padding: 12px;
    line-height: 1.7;
  }
  
  /* Çok küçük ekran için kart optimize */
  .selection-card-list {
    max-height: 300px;
    padding: 8px;
  }
  
  .selection-card {
    padding: 12px;
    min-height: 52px;
  }
  
  .selection-card-code {
    font-size: 12px;
  }
  
  .selection-card-name {
    font-size: 14px;
  }
  
  .selection-card-price {
    font-size: 13px;
  }
  
  .card-add-badge {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  /* Çok küçük ekran için sepet satırları */
  .cart-cards-container {
    max-height: 350px;
  }
  
  .cart-row {
    grid-template-columns: 24px 1fr 30px;
    gap: 5px;
    padding: 6px;
  }
  
  .cart-row-num {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  
  .cart-row-main {
    gap: 5px;
  }
  
  .cart-row-code {
    font-size: 8px;
  }
  
  .cart-row-name {
    font-size: 11px;
  }
  
  .cart-row-details {
    gap: 4px;
  }
  
  .cart-row-field label {
    font-size: 7px;
  }
  
  .cart-row-price,
  .cart-row-net {
    font-size: 10px;
  }
  
  .cart-row-total {
    font-size: 12px;
  }
  
  .cart-row-input {
    padding: 6px;
    font-size: 12px;
  }
  
  .cart-row-qty {
    padding: 8px;
    font-size: 13px;
  }
  
  .cart-row-delete {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  
  .cart-card-body {
    padding: 10px;
  }
  
  .cart-input {
    padding: 8px;
    font-size: 14px;
  }
  
  .cart-input-qty {
    font-size: 15px;
  }
  
  .cart-value {
    font-size: 14px;
  }
  
  .cart-amount {
    font-size: 16px;
  }
}

/* ==================== VERİLEN SİPARİŞLER MODERN TASARIM ==================== */

/* Filtreler */
.orders-hist-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.filter-row-search {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: flex-start; /* Sola hizala */
}

.filter-row-search .form-field-modern {
  max-width: 500px; /* Maksimum genişlik */
  min-width: 300px; /* Minimum genişlik */
}

/* Sipariş Listesi Tablosu */
.orders-hist-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.table-modern-orders-hist {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

.table-modern-orders-hist thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 5;
}

.table-modern-orders-hist th {
  padding: 14px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  white-space: nowrap;
}

/* Kolon genişlikleri - kompakt görünüm */
.table-modern-orders-hist th:nth-child(1),
.table-modern-orders-hist td:nth-child(1) {
  width: 90px;
  max-width: 90px;
}

.table-modern-orders-hist th:nth-child(2),
.table-modern-orders-hist td:nth-child(2) {
  width: 120px;
  max-width: 120px;
}

.table-modern-orders-hist th:nth-child(3),
.table-modern-orders-hist td:nth-child(3) {
  width: 110px;
  max-width: 110px;
}

.table-modern-orders-hist th:nth-child(4),
.table-modern-orders-hist td:nth-child(4) {
  width: auto;
  min-width: 200px;
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-modern-orders-hist th:nth-child(5),
.table-modern-orders-hist td:nth-child(5) {
  width: 130px;
  max-width: 130px;
  text-align: center;
}

.table-modern-orders-hist th:nth-child(6),
.table-modern-orders-hist td:nth-child(6) {
  width: 100px;
  max-width: 100px;
}

.table-modern-orders-hist th:nth-child(7),
.table-modern-orders-hist td:nth-child(7) {
  width: 130px;
  max-width: 130px;
  text-align: right;
}

.table-modern-orders-hist tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.table-modern-orders-hist tbody tr:nth-child(odd) {
  background: #f9fafb;
}

.table-modern-orders-hist tbody tr:nth-child(even) {
  background: white;
}

.table-modern-orders-hist tbody tr:hover {
  background: #dbeafe !important;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.table-modern-orders-hist td {
  padding: 12px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-modern-orders-hist .action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.btn-view {
  padding: 8px 14px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-view:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(79, 172, 254, 0.4);
}

.btn-update {
  padding: 8px 14px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-update:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(240, 147, 251, 0.4);
}

/* Sipariş Detay Modal */
.order-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

/* Ürün Ekleme Alanı */
.order-add-product {
  padding: 16px 24px;
  background: #f0f9ff;
  border-bottom: 2px solid #e5e7eb;
}

/* Mobilde ürün ekleme alanını gizle veya çok küçült */
@media (max-width: 768px) {
  .order-add-product {
    padding: 8px 12px;
  }
  
  .order-add-product h4 {
    font-size: 12px !important;
    margin: 0 0 8px 0 !important;
  }
  
  .order-add-product .form-field-modern {
    margin-bottom: 8px !important;
  }
  
  .order-add-product .btn {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
}

/* Edit Mode Stilleri */
.edit-mode-input {
  width: 70px;
  padding: 6px 8px;
  border: 2px solid #667eea;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #f0f9ff;
}

.edit-mode-input:focus {
  outline: none;
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-delete-line {
  padding: 6px 10px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete-line:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

.btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn.success:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.order-detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  /* backdrop-filter: blur(4px); - FPS düşürüyor, kaldırıldı */
}

.order-detail-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 95%;
  max-width: 95%;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

/* Mobilde header'ı minimal yap */
@media (max-width: 768px) {
  .order-detail-header {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  
  .order-detail-header > div:first-child {
    flex: 1;
  }
  
  .order-detail-header > div:last-child {
    width: 100%;
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .order-detail-header .btn {
    font-size: 11px !important;
    padding: 6px 10px !important;
    white-space: nowrap;
  }
}

.order-detail-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

/* Mobilde başlığı küçült */
@media (max-width: 768px) {
  .order-detail-header h3 {
    font-size: 16px;
  }
}

.order-detail-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 12px;
}

/* Mobilde badge'i küçült */
@media (max-width: 768px) {
  .order-detail-badge {
    padding: 4px 8px;
    font-size: 10px;
    margin-left: 6px;
  }
}

.order-detail-info {
  padding: 20px 24px;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

/* Mobilde info alanını minimal yap */
@media (max-width: 768px) {
  .order-detail-info {
    padding: 10px 12px;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* Mobilde 2 sütun, daha kompakt */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Mobilde info item'ları daha küçük yap */
@media (max-width: 768px) {
  .info-item {
    gap: 2px;
  }
}

.info-item label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

/* Mobilde label'ları daha küçük yap */
@media (max-width: 768px) {
  .info-item label {
    font-size: 9px;
  }
}

.info-item span {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

/* Mobilde span'ları daha küçük yap */
@media (max-width: 768px) {
  .info-item span {
    font-size: 12px;
  }
}

.order-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Mobilde body'yi maksimize et - en önemli alan */
@media (max-width: 768px) {
  .order-detail-body {
    padding: 12px;
    max-height: calc(100vh - 280px) !important;
    overflow-y: auto !important;
  }
}

.order-detail-body h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: #374151;
}

/* Mobilde başlığı daha küçük ve kompakt yap */
@media (max-width: 768px) {
  .order-detail-body h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
  }
}

.orders-hist-lines-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
  -webkit-overflow-scrolling: touch;
}

/* Mobilde ürün listesini maksimize et */
@media (max-width: 768px) {
  .orders-hist-lines-wrap {
    max-height: calc(100vh - 320px) !important;
    min-height: 50vh !important;
  }
}

.order-detail-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #f9fafb;
  border-top: 2px solid #e5e7eb;
}

/* Mobilde footer'ı minimal ve kompakt yap */
@media (max-width: 768px) {
  .order-detail-footer {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    align-items: stretch;
  }
}

.order-note {
  flex: 1;
  font-size: 13px;
  color: #6b7280;
  font-style: italic;
}

/* Mobilde notu gizle veya çok küçült */
@media (max-width: 768px) {
  .order-note {
    font-size: 10px;
    max-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.order-total-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 10px;
  font-weight: 700;
}

/* Mobilde total box'ları çok daha küçük yap */
@media (max-width: 768px) {
  .order-total-box {
    padding: 6px 12px;
    gap: 8px;
    font-size: 12px;
    justify-content: space-between;
  }
}

.order-total-amount {
  font-size: 24px;
}

/* Mobilde tutar fontunu küçült */
@media (max-width: 768px) {
  .order-total-amount {
    font-size: 16px;
  }
}

.btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn.danger:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .filter-row-top {
    grid-template-columns: 1fr;
  }
  
  .filter-row-search {
    flex-direction: column;
  }
  
  .order-detail-content {
    width: 98%;
    max-height: 98vh;
    margin: 1vh auto;
  }
  
  /* Mobil için grid yapılarını responsive yap - Sepet kartları */
  .cart-row-main > div[style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
    font-size: 14px !important;
  }
  
  /* Grid içindeki label ve değerleri daha büyük yap */
  .cart-row-main label {
    font-size: 11px !important;
  }
  
  .cart-row-main input,
  .cart-row-main div[style*="font-size"] {
    font-size: 14px !important;
    min-height: 44px !important;
  }
  
  /* Toplam tutar alanını tam genişlik yap */
  .cart-row-main > div[style*="grid-template-columns"] > div:last-child {
    grid-column: 1 / -1;
    margin: 8px 0 0 0 !important;
  }
  
  /* Checkbox ve KG aktif alanlarını ayarla */
  .cart-row-main label[style*="cursor: pointer"] {
    padding: 10px !important;
    min-height: 48px !important;
  }
  
  .cart-row-main input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
  }
  
  /* Tüm tablo yapılarını mobilde scroll yapılabilir yap */
  table {
    font-size: 12px !important;
  }
  
  table th,
  table td {
    padding: 8px 6px !important;
    font-size: 12px !important;
  }
}
    padding: 8px 6px !important;
    font-size: 12px !important;
  }
  
  /* Modal içeriğini mobilde tam yükseklik yap */
  .order-detail-content > div {
    max-height: 80vh !important;
  }
}
  }
  
  .order-detail-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .order-detail-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .table-modern-orders-hist {
    font-size: 12px;
  }
  
  .table-modern-orders-hist th,
  .table-modern-orders-hist td {
    padding: 8px 6px;
  }
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
}

.pagination-info {
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-pagination {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #374151;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 44px;
}

.btn-pagination:hover:not(.active) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-pagination.active {
  background: #FF8F00;
  color: white;
  border-color: #FF8F00;
  cursor: default;
}

.btn-pagination:active:not(.active) {
  transform: scale(0.95);
}

@media (max-width: 640px) {
  .pagination-buttons {
    gap: 6px;
  }
  
  .btn-pagination {
    padding: 6px 12px;
    font-size: 13px;
    min-width: 38px;
  }
}

/* =========================================
   MOBILE CART HORIZONTAL SCROLL (Task 9)
   ========================================= */
@media (max-width: 768px) {
  /* Sepet container scroll */
  .cart-cards-container {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 12px;
  }

  /* Sepet satırları min-width */
  .cart-row {
    min-width: 600px;
    scroll-snap-align: start;
  }

  /* Scrollbar görünümü */
  .cart-cards-container::-webkit-scrollbar {
    height: 6px;
  }
  .cart-cards-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
  }
  .cart-cards-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 3px;
  }

  /* Teklif sepeti için de aynı stil */
  #teklifCartContainer,
  #teklifCartItems {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
  }
  
  /* Sipariş history satırları da scroll */
  #ordersHistLinesContainer {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ========================================
   MOBİL SİPARİŞ LİSTESİ KART GÖRÜNÜMÜ
======================================== */
@media (max-width: 768px) {
  /* Masaüstü tabloyu gizle */
  .table-modern-orders-hist {
    display: none !important;
  }
  
  /* Mobil kart container */
  .orders-hist-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  /* Sipariş kartı */
  .order-card-mobile {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
  }
  
  .order-card-mobile:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  
  /* Kart başlığı */
  .order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
  }
  
  .order-card-info {
    flex: 1;
    min-width: 0;
  }
  
  .order-card-id {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
  }
  
  .order-card-customer {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .order-card-code {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
  }
  
  /* Durum badge */
  .order-card-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    color: white;
    flex-shrink: 0;
  }
  
  .order-card-status.status-done {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  }
  
  .order-card-status.status-kalan {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  }
  
  .order-card-status.status-wait {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  }
  
  .order-card-status.status-draft {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  }
  
  .order-card-status.status-default {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  }
  
  /* Kart detay satırı */
  .order-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
  }
  
  .order-card-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .order-card-detail-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
  }
  
  .order-card-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
  }
  
  .order-card-detail-value.highlight {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
  }
  
  /* Aksiyon butonları */
  .order-card-actions {
    display: flex;
    gap: 10px;
  }
  
  .order-card-actions .btn-view {
    flex: 1;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  .order-card-actions .btn-print {
    width: 52px;
    height: 52px;
    padding: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .order-card-actions .btn-print:active {
    transform: scale(0.95);
  }
  
  /* Filtre kartı mobil */
  .orders-hist-filters-card .filter-row-dates,
  .orders-hist-filters-card .filter-row-search {
    flex-direction: column;
    gap: 10px;
  }
  
  .orders-hist-filters-card .form-field-modern {
    width: 100%;
  }
  
  .orders-hist-filters-card .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Kart header mobil düzenlemesi */
  .card-modern-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start !important;
  }
  
  .card-modern-header > div {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  #btnDusulmeyiBekleyen {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
  
  /* ========================================
     TEKLİF MOBİL KART GÖRÜNÜMÜ
  ======================================== */
  
  /* Masaüstü tabloyu gizle */
  .teklif-desktop-table {
    display: none !important;
  }
  
  /* Mobil kartları göster */
  .teklif-mobile-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .teklif-card-mobile {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
  }
  
  .teklif-card-mobile:active {
    transform: scale(0.98);
  }
  
  .teklif-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
  }
  
  .teklif-card-info {
    flex: 1;
    min-width: 0;
  }
  
  .teklif-card-id {
    font-size: 18px;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 4px;
  }
  
  .teklif-card-customer {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .teklif-card-code {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
  }
}

/* Teklif mobil kartlar - varsayılan gizli */
.teklif-mobile-cards {
  display: none;
}

/* ========================================
   BAĞLANTILAR MOBİL UYUMLULUK
======================================== */

/* Bağlantı sayfası mobil düzenlemesi */
@media (max-width: 768px) {
  /* Modern page header mobil */
  .modern-page-header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    align-items: stretch;
  }
  
  .page-title-section {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .title-icon {
    font-size: 32px;
  }
  
  .page-title {
    font-size: 20px !important;
  }
  
  .page-subtitle {
    font-size: 13px;
  }
  
  .page-actions {
    width: 100%;
  }
  
  .page-actions .btn-modern {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
  }
  
  /* Filtre alanı mobil */
  #connectionList {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 8px;
  }
  
  /* Bağlantı kartları mobil */
  .connection-card, .modern-card {
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  
  /* Filtre butonları scroll edilebilir */
  .status-filters-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    flex-wrap: nowrap !important;
    display: flex !important;
  }
  
  .filter-chip {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px !important;
  }
  
  /* Arama kutusu mobil */
  .search-box {
    width: 100% !important;
    min-width: 100% !important;
  }
  
  /* Bağlantı modal mobil */
  .baglanti-modal .modal-content,
  #baglantiModal .modal-content,
  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
  }
  
  .modal-body {
    padding: 16px !important;
  }
  
  .modal-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 12px 16px !important;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
  }
  
  .modal-footer button {
    flex: 1;
    padding: 14px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }
  
  /* Form alanları mobil */
  .baglanti-form-grid,
  .form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  
  .baglanti-form-field,
  .form-field {
    width: 100% !important;
  }
  
  .baglanti-form-field label,
  .form-field label {
    font-size: 14px !important;
    margin-bottom: 6px !important;
  }
  
  .baglanti-form-field input,
  .baglanti-form-field select,
  .baglanti-form-field textarea,
  .form-field input,
  .form-field select,
  .form-field textarea {
    padding: 14px 12px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Çek/Senet/Ödeme kartları mobil */
  .payment-card,
  .cek-card,
  .senet-card {
    padding: 14px !important;
    border-radius: 12px !important;
  }
  
  .payment-card-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start !important;
  }
  
  /* Ürün grubu satırları mobil */
  .edit-line-row,
  .baglanti-line-row {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: 12px !important;
  }
  
  .edit-line-row select,
  .edit-line-row input {
    width: 100% !important;
    padding: 12px !important;
    font-size: 15px !important;
  }
  
  .btn-remove-line {
    width: 100% !important;
    padding: 12px !important;
    margin-top: 8px !important;
  }
}

/* ========================================
   SİPARİŞ DETAY/GÜNCELLEME MOBİL
======================================== */

@media (max-width: 768px) {
  /* Sipariş detay modal mobil */
  .order-detail-modal .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  
  /* Sipariş bilgi kartı mobil */
  .order-info-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .order-info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
  }
  
  /* Sipariş ürün tablosu mobil karta dönüştür */
  .order-detail-table {
    display: none;
  }
  
  .order-detail-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }
  
  .order-detail-card-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  
  .order-detail-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .order-detail-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .order-detail-card-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .order-detail-card-field label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
  }
  
  .order-detail-card-field span {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
  }
  
  /* Sipariş güncelleme inputları mobil */
  .order-update-input {
    width: 100% !important;
    padding: 12px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
  }
  
  /* Onay butonları mobil */
  .order-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }
  
  .order-action-buttons button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: 12px;
  }
}

/* ========================================
   TEKLİF DETAY/GÜNCELLEME MOBİL
======================================== */

@media (max-width: 768px) {
  /* Teklif detay modal mobil */
  .teklif-detail-modal .modal-content,
  #teklifDetailModal .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  
  /* Teklif bilgi kartı */
  .teklif-info-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .teklif-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
  }
  
  .teklif-info-label {
    color: #6b7280;
  }
  
  .teklif-info-value {
    font-weight: 600;
    color: #1f2937;
  }
  
  /* Teklif ürün listesi mobil kart */
  .teklif-products-table {
    display: none;
  }
  
  .teklif-products-cards {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }
  
  .teklif-product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
  }
  
  .teklif-product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
  }
  
  .teklif-product-code {
    font-size: 12px;
    color: #8b5cf6;
    font-weight: 700;
    font-family: monospace;
  }
  
  .teklif-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2px;
  }
  
  .teklif-product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .teklif-product-field {
    display: flex;
    flex-direction: column;
  }
  
  .teklif-product-field label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 2px;
  }
  
  .teklif-product-field span {
    font-size: 14px;
    font-weight: 600;
  }
}

/* ========================================
   GENEL GLASS UI MOBİL İYİLEŞTİRMELER
======================================== */

@media (max-width: 768px) {
  /* Modern card header mobil */
  .modern-card-header,
  .card-header-modern {
    flex-direction: column;
    gap: 12px;
    padding: 14px !important;
  }
  
  /* Tab butonları mobil scroll */
  .tab-buttons,
  .tabBtn-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 8px;
  }
  
  .tabBtn {
    flex-shrink: 0;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  
  /* Glass input mobil */
  .glass-input {
    padding: 14px 12px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
  }
  
  /* Butonlar mobil */
  .btn-modern,
  .btn-primary,
  .btn-secondary {
    padding: 14px 20px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    min-height: 48px;
  }
  
  /* Badge mobil */
  .badge,
  .status-badge {
    font-size: 11px !important;
    padding: 4px 10px !important;
  }
  
  /* Tablo gizle, kart göster genel kuralı */
  .desktop-only-table {
    display: none !important;
  }
  
  .mobile-only-cards {
    display: flex !important;
  }
}

/* Varsayılan mobil kart gizli */
.mobile-only-cards {
  display: none;
}

/* ========================================
   BAĞLANTI FİYAT İKONU
======================================== */

.connection-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 6px;
  cursor: help;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.connection-price-badge.ihracat {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.connection-price-badge.liste2024 {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.connection-alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  border-radius: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.connection-alert.expired {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
}

.connection-alert-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.connection-alert-content {
  flex: 1;
  min-width: 0;
}

.connection-alert-title {
  font-weight: 700;
  font-size: 14px;
  color: #047857;
  margin-bottom: 6px;
}

.connection-alert.expired .connection-alert-title {
  color: #dc2626;
}

.connection-alert-text {
  font-size: 13px;
  color: #065f46;
  line-height: 1.5;
}

.connection-alert.expired .connection-alert-text {
  color: #7f1d1d;
}

.connection-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.connection-alert-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.connection-alert-badge:active {
  transform: scale(0.97);
}

@media (max-width: 768px) {
  .connection-alert {
    flex-direction: column;
    padding: 12px;
    gap: 10px;
  }
  
  .connection-alert-badge {
    width: 100%;
    justify-content: center;
  }
}

