/* POS System - Professional Light Theme */
:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #dcfce7;
  --primary-glow: rgba(22, 163, 74, 0.1);

  --danger: #dc2626;
  --danger-light: #fef2f2;

  --warning: #d97706;
  --warning-light: #fffbeb;

  --success: #16a34a;
  --success-light: #f0fdf4;

  --info: #2563eb;
  --info-light: #eff6ff;

  --text: #111827;
  --text-light: #374151;
  --text-muted: #6b7280;

  --bg: #f8fafc;
  --bg-gradient: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 0 3px rgba(22, 163, 74, 0.15);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* Header - Dark Theme (Matching Main Site) */
.pos-header {
  background: #1a1a1a;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pos-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 200px;
}

.pos-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

.pos-logo span {
  font-weight: 700;
  font-size: 1.2rem;
  color: #ffffff;
}

/* Center Clock - Horizontal */
.pos-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.clock-time {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  color: #ffffff;
  letter-spacing: 1px;
}

.clock-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.pos-waiter {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 200px;
  justify-content: flex-end;
}

.waiter-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.waiter-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.waiter-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.waiter-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logout-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.logout-btn:active {
  transform: scale(0.95);
}

/* Mobile Header */
@media (max-width: 768px) {
  .pos-header {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .pos-logo {
    min-width: auto;
  }

  .pos-logo img {
    height: 28px;
  }

  .pos-clock {
    flex: 1;
    gap: 0.5rem;
  }

  .clock-time {
    font-size: 0.9rem;
  }

  .clock-date {
    font-size: 0.7rem;
    padding-left: 0.5rem;
  }

  .pos-waiter {
    min-width: auto;
    gap: 0.375rem;
  }

  .waiter-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .waiter-info {
    display: none;
  }

  .logout-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .logout-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* Section Tabs */
.section-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.section-tab {
  flex-shrink: 0;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  color: var(--text-light);
}

.section-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.section-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.section-tab .count {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: var(--surface-2);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.section-tab.active .count {
  background: rgba(255,255,255,0.2);
}

/* Tables Grid */
.tables-container {
  padding: 1rem 1.25rem;
  padding-bottom: 70px;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 0.625rem;
}

.table-card {
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: 10px;
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  padding: 0.5rem;
}

.table-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.table-card:active {
  transform: scale(0.97);
}

.table-card.empty {
  border-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.table-card.occupied {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}


.table-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.table-status {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 0.2rem;
  font-weight: 600;
}

.table-card.empty .table-status { color: #16a34a; }
.table-card.occupied .table-status { color: #dc2626; }

.table-total {
  font-weight: 700;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: var(--text);
}

.table-time {
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Status Legend - Gradient Footer */
.status-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-top: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: 0 -4px 20px rgba(22, 163, 74, 0.2);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: white;
  font-weight: 500;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
}

.legend-dot.empty {
  background: #4ade80;
}
.legend-dot.occupied {
  background: #f87171;
}

/* Modal Base */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  margin: auto;
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlide 0.25s ease-out;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.modal-header {
  padding: 1rem 1.25rem;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title svg {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* Ticket Modal */
.ticket-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ticket-info-item {
  text-align: center;
  padding: 0.625rem 0.5rem;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.ticket-info-item label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ticket-info-item span {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.ticket-info-item.highlight {
  background: linear-gradient(135deg, var(--primary-light) 0%, #bbf7d0 100%);
  border-color: var(--primary);
}

.ticket-info-item.highlight span {
  color: var(--primary-dark);
}

/* Ticket Modal - 2 Column Layout for Touch */
#ticketModal .modal-content {
  max-width: 800px;
  width: 95vw;
}

.ticket-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .ticket-layout {
    flex-direction: row;
    gap: 1.25rem;
  }
}

.ticket-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ticket-right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: 12px;
}

@media (min-width: 640px) {
  .ticket-right {
    width: 240px;
    flex-shrink: 0;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* POS Action Buttons - Touch Friendly */
.pos-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 70px;
}

@media (min-width: 640px) {
  .pos-action-btn {
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.875rem 1rem;
    min-height: 50px;
    gap: 0.625rem;
  }
}

.pos-action-btn svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 640px) {
  .pos-action-btn svg {
    width: 20px;
    height: 20px;
  }
}

.pos-action-btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  grid-column: span 2;
}

@media (min-width: 640px) {
  .pos-action-btn.primary {
    grid-column: span 1;
  }
}

.pos-action-btn.primary:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.pos-action-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.pos-action-btn.secondary:hover {
  background: var(--surface-2);
  border-color: var(--primary);
}

.pos-action-btn.success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}

.pos-action-btn.success:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.pos-action-btn.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.pos-action-btn.info:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pos-payment-divider {
  grid-column: span 2;
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

@media (min-width: 640px) {
  .pos-payment-divider {
    grid-column: span 1;
  }
}

/* Ticket Items List */
.ticket-items {
  margin-bottom: 0.75rem;
  flex: 1;
  overflow-y: auto;
  max-height: 250px;
}

@media (min-width: 640px) {
  .ticket-items {
    max-height: 300px;
  }
}

.ticket-items-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ticket-items-header svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.ticket-items-header span {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  margin-bottom: 0.375rem;
  transition: all 0.15s;
}

.ticket-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.ticket-item.cancelled {
  opacity: 0.4;
  background: var(--surface-2);
}

.ticket-item.cancelled .item-name {
  text-decoration: line-through;
}

.item-qty {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

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

.item-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-portion {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.item-notes {
  font-size: 0.7rem;
  color: var(--primary);
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.item-notes::before {
  content: "→";
  opacity: 0.6;
}

.item-price {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
}

.item-actions {
  display: flex;
  gap: 0.375rem;
}

.item-action-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.item-action-btn svg {
  width: 14px;
  height: 14px;
}

.item-action-btn.print {
  background: var(--info-light);
  color: var(--info);
}

.item-action-btn.print:hover {
  background: var(--info);
  color: white;
}

.item-action-btn.cancel {
  background: var(--danger-light);
  color: var(--danger);
}

.item-action-btn.cancel:hover {
  background: var(--danger);
  color: white;
}

/* Ticket Summary */
.ticket-summary {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border-radius: 10px;
  padding: 0.875rem;
  margin-top: 0.75rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.8rem;
  color: var(--text-light);
}

.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  padding-top: 0.625rem;
  border-top: 2px solid var(--border);
  margin-top: 0.5rem;
}

.summary-row.discount {
  color: var(--success);
}

.summary-row.discount .value {
  font-weight: 600;
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.action-btn {
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s;
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.action-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.action-btn.secondary:hover {
  background: var(--surface-2);
  border-color: var(--text-muted);
}

.action-btn.danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid transparent;
}

.action-btn.danger:hover {
  background: var(--danger);
  color: white;
}

/* Payment Buttons */
.payment-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.payment-btn {
  padding: 0.875rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: all 0.15s;
}

.payment-btn:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

.payment-btn.selected {
  background: linear-gradient(135deg, var(--primary-light) 0%, #bbf7d0 100%);
  border-color: var(--primary);
}

.payment-btn svg {
  width: 22px;
  height: 22px;
}

.payment-btn .label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.payment-btn.cash svg { color: var(--success); }
.payment-btn.card svg { color: var(--info); }

/* Products Grid (for adding items) - Fullscreen Modal */
#addItemModal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9998 !important;
  display: none !important;
  background: var(--bg) !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  max-height: none !important;
}

/* Product Detail Modal - addItemModal üstünde */
#productDetailModal {
  z-index: 9999 !important;
}

#productDetailModal.active {
  display: flex !important;
}

#addItemModal.active {
  display: block !important;
}

#addItemModal .add-item-modal {
  position: relative;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  background: var(--bg);
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
}

/* Header - POS tarzı koyu */
.add-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: #1a1a1a;
  flex-shrink: 0;
}

.add-item-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.add-item-title svg {
  opacity: 0.8;
}

.add-item-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.add-item-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Kategoriler - header'a bitişik */
.add-item-categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.add-item-categories::-webkit-scrollbar {
  display: none;
}

.add-item-categories .category-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.add-item-categories .category-btn:hover {
  border-color: var(--primary);
}

.add-item-categories .category-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* PC'de kategoriler wrap olsun */
@media (min-width: 768px) {
  .add-item-categories {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* Arama */
.add-item-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.add-item-search svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.add-item-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  padding: 0.5rem 0;
  min-width: 0;
}

.add-item-search input::placeholder {
  color: var(--text-muted);
}

/* Body - ürünler */
.add-item-body {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
}

#addItemModal .products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

@media (min-width: 480px) {
  #addItemModal .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  #addItemModal .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  #addItemModal .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

#addItemModal .product-card {
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  border: 2px solid var(--border);
  min-height: 200px;
}

#addItemModal .product-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

#addItemModal .product-card:active {
  transform: scale(0.98);
}

#addItemModal .product-card .product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
}

#addItemModal .product-card .product-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
}

#addItemModal .product-card .product-info {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#addItemModal .product-card .name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#addItemModal .product-card .price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.product-card.out-of-stock {
  opacity: 0.5;
  pointer-events: none;
}

.product-card.out-of-stock::after {
  content: 'Tükendi';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: var(--danger);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Input Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--surface);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Quantity Selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 1.25rem;
  cursor: pointer;
}

.qty-value {
  width: 50px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-weight: 500;
  z-index: 2000;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state .title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 480px) {
  .tables-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .table-card {
    padding: 0.25rem;
  }

  .table-number {
    font-size: 1.25rem;
  }
}

@media (min-width: 768px) {
  .tables-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .modal-content {
    max-width: 600px;
  }
}

/* Product Detail Modal - 3 Column Layout */
.product-detail-modal {
  max-width: 95vw !important;
  width: 1100px;
  max-height: 95vh;
  overflow: hidden;
}

.product-detail-modal .modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
}

.product-detail-modal .modal-close:hover {
  background: #333333;
}

.product-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  padding-bottom: 1.5rem;
  max-height: calc(95vh - 40px);
  overflow-y: auto;
  background: var(--surface);
}

/* Mobilde tüm alanları göster */
.product-detail-layout > * {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .product-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr 200px;
    gap: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
  }

  .product-detail-layout > * {
    flex-shrink: unset;
  }
}

/* Sol: Ürün Görseli */
.product-detail-image {
  width: 100%;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--border) 100%);
}

@media (min-width: 768px) {
  .product-detail-image {
    height: auto;
    max-height: 300px;
  }

  .product-detail-placeholder {
    font-size: 4rem;
  }
}

/* Orta: Bilgi ve Ekstralar */
.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.product-detail-price-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-detail-base-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.product-detail-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Ekstralar Container */
.product-extras-container {
  overflow-y: auto;
  max-height: 200px;
}

@media (min-width: 768px) {
  .product-extras-container {
    flex: 1;
    max-height: 400px;
  }
}

.extras-section {
  margin-bottom: 1rem;
}

.extras-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.extras-section-title .required {
  font-size: 0.7rem;
  color: var(--danger);
  font-weight: normal;
}

.extras-section-title .optional {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: normal;
}

.extras-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.extra-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.extra-item:hover {
  border-color: var(--primary);
}

.extra-item.selected {
  background: var(--primary-light);
  border-color: var(--primary);
}

.extra-item input[type="checkbox"],
.extra-item input[type="radio"] {
  display: none;
}

.extra-item .extra-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: transparent;
  transition: all 0.2s;
}

.extra-item.selected .extra-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.extra-item .extra-name {
  flex: 1;
}

.extra-item .extra-price {
  font-weight: 600;
  color: var(--primary);
}

/* Sağ: Seçenekler */
.product-detail-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface-2);
  padding: 1rem;
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .product-detail-options {
    max-height: 100%;
    overflow-y: auto;
  }
}

.product-detail-options .form-group {
  margin-bottom: 0;
}

.product-detail-options .form-label {
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.product-detail-options .qty-selector {
  justify-content: center;
}

.product-detail-options .qty-btn {
  width: 36px;
  height: 36px;
}

.product-detail-options .qty-value {
  width: 40px;
  font-size: 1.2rem;
}

.product-detail-options .form-input {
  padding: 0.6rem;
  font-size: 0.9rem;
}

.add-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.add-to-ticket-btn {
  padding: 0.875rem !important;
  font-size: 0.9rem !important;
  width: 100%;
}

.add-to-ticket-btn span {
  font-weight: 700;
}

.add-buttons-group .action-btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.add-buttons-group .action-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.add-buttons-group .action-btn.secondary:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

/* Premium Confirm Modal */
.confirm-modal-content {
  max-width: 340px !important;
  text-align: center;
  padding: 2rem 1.5rem !important;
  border-radius: 20px !important;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.confirm-icon svg {
  width: 32px;
  height: 32px;
  color: #d97706;
}

.confirm-icon.success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.confirm-icon.success svg {
  color: #16a34a;
}

.confirm-icon.danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.confirm-icon.danger svg {
  color: #dc2626;
}

.confirm-icon.info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.confirm-icon.info svg {
  color: #2563eb;
}

.confirm-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.confirm-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.confirm-buttons {
  display: flex;
  gap: 0.75rem;
}

.confirm-btn {
  flex: 1;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.confirm-btn.cancel {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.confirm-btn.cancel:hover {
  background: var(--surface-3);
}

.confirm-btn.ok {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.confirm-btn.ok:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

.confirm-btn.ok.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.confirm-btn.ok.danger:hover {
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.confirm-btn.ok.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.confirm-btn.ok.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* =====================================================
   DISCOUNT MODAL - PREMIUM DESIGN
   ===================================================== */
.discount-modal-content {
  width: 420px;
  max-width: 95vw;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.discount-header {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.discount-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.discount-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

.discount-header h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}

.discount-header .modal-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s;
}

.discount-header .modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.discount-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Type Selector */
.discount-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.discount-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
}

.discount-type-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.discount-type-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.discount-type-btn .type-icon {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.discount-type-btn .type-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Quick Options */
.discount-quick-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.quick-option {
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.quick-option:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.quick-option.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Input Group */
.discount-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.discount-input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.discount-input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.15s;
}

.discount-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.discount-prefix {
  padding: 0.875rem 1rem;
  background: var(--surface-2);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  border-right: 2px solid var(--border);
}

.discount-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: none;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
  background: transparent;
}

.discount-input::placeholder {
  color: var(--text-muted);
}

/* Preview */
.discount-preview {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.preview-row.discount-row {
  color: var(--primary);
  font-weight: 600;
}

.preview-row.total-row {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px dashed var(--border);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* Footer */
.discount-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  background: var(--surface-2);
}

.discount-btn {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s;
}

.discount-btn svg {
  width: 18px;
  height: 18px;
}

.discount-btn.cancel {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.discount-btn.cancel:hover {
  background: var(--surface-2);
}

.discount-btn.apply {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.discount-btn.apply:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

/* Fix Menu Styles */
.category-btn.fix-menu-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  border-color: #059669;
}

.category-btn.fix-menu-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.category-btn.fix-menu-btn.active {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.fix-menu-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.fix-menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
}

/* Fix menu detail in product modal */
.fix-menu-category {
  margin-bottom: 0.75rem;
}

.fix-menu-category:last-child {
  margin-bottom: 0;
}

.fix-menu-category-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.375rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

.fix-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 0.85rem;
  color: var(--text-light);
}

.fix-menu-item-name {
  flex: 1;
}

.fix-menu-item-optional {
  font-size: 0.7rem;
  padding: 0.125rem 0.5rem;
  background: var(--warning-light);
  color: var(--warning);
  border-radius: 4px;
  font-weight: 500;
}

/* ===== İçerik Çıkarma (Ingredients) ===== */
.product-ingredients-container {
  margin-top: 1rem;
}

.ingredients-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.ingredients-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.ingredients-hint {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

.ingredients-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ingredient-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.ingredient-icon {
  font-size: 0.9rem;
}

.ingredient-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.ingredient-check {
  font-size: 0.75rem;
  color: var(--primary);
  opacity: 1;
  transition: opacity 0.15s;
}

/* Çıkarılan içerik - kırmızı ve üstü çizili */
.ingredient-item.removed {
  background: var(--danger-light);
  border-color: var(--danger);
  text-decoration: line-through;
}

.ingredient-item.removed .ingredient-name {
  color: var(--danger);
}

.ingredient-item.removed .ingredient-check {
  opacity: 0;
}

.ingredient-item.removed::after {
  content: '✕';
  font-size: 0.75rem;
  color: var(--danger);
  margin-left: 0.25rem;
}

/* Sipariş detaylarında çıkarılan içerikler */
.item-removed-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.removed-ingredient-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  background: var(--danger-light);
  color: var(--danger);
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: line-through;
}
