@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap);

:root {
  --bg-color: #f5f5f7;
  --nav-color: #1d1d1f;
  --category-bg: #ffffff;
  --category-border: #e5e5e7;
  --item-bg: #6e5de7;
  --item-hover: #5a4ad1;
  --register-bg: #ffffff;
  --product-bg: #ffffff;
  --selected-bg: #007aff;
  --pay-btn-bg: #34c759;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --danger: #ff3b30;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--bg-color); font-family: 'Inter', -apple-system, sans-serif; }
a, a:hover { text-decoration: none; }
input:focus { outline: none; }

/* Login */
.login-container { height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 50%, #0a1628 100%); }
.login-box { background: #fff; padding: 48px; border-radius: 24px; text-align: center; box-shadow: 0 25px 80px rgba(0,0,0,0.4); width: 380px; }
.login-logo { margin-bottom: 16px; }
.login-title { color: #1e3a5f; font-size: 32px; font-weight: 700; letter-spacing: 4px; margin-bottom: 4px; }
.login-subtitle { color: #6b7280; font-size: 14px; margin-bottom: 32px; }
.login-input { width: 100%; height: 56px; padding: 0 20px; border: 2px solid #e5e7eb; border-radius: var(--radius-md); font-size: 18px; text-align: center; margin-bottom: 20px; }
.login-input:focus { border-color: #1e3a5f; }
.login-btn { width: 100%; padding: 18px; background: #1e3a5f; color: #fff; border: none; border-radius: var(--radius-md); font-size: 17px; font-weight: 600; cursor: pointer; }
.login-btn:hover { background: #2d5a8a; }
.login-error { color: var(--danger); margin-top: 16px; font-size: 14px; }

/* Main container */
#pos-screen { display: none; flex-direction: column; height: 100vh; overflow: hidden; }
#pos-screen.active { display: flex; }

/* Navigation */
nav { display: flex; justify-content: space-between; background: #1e3a5f; flex-shrink: 0; height: 48px; align-items: center; padding: 0 8px; }
nav ul { display: flex; align-items: center; margin: 0; }
nav ul li { list-style: none; }
.nav-brand { color: #4da6ff; font-weight: 700; font-size: 14px; letter-spacing: 2px; padding: 0 16px; border-right: 1px solid rgba(255,255,255,0.1); }
nav ul li a { color: rgba(255,255,255,0.8); padding: 14px 18px; display: block; font-weight: 500; font-size: 13px; }
nav ul li a:hover { background: rgba(255,255,255,0.1); }
.nav-right { display: flex; align-items: center; gap: 8px; padding-right: 16px; }
.nav-clock { color: #fff; font-size: 14px; font-weight: 600; }
.search input { width: 150px; height: 36px; padding: 0 12px; border: none; border-radius: 6px; font-size: 13px; background: rgba(255,255,255,0.1); color: #fff; }
.nav-action-btn { padding: 8px 14px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; color: #fff; font-size: 12px; cursor: pointer; }
.nav-order-info { color: #fff; font-size: 14px; font-weight: 600; padding: 8px 16px; background: rgba(255,255,255,0.1); border-radius: 20px; }
.nav-back-btn, .nav-cancel-btn { background: transparent; border: none; color: #fff; font-size: 12px; cursor: pointer; padding: 8px 12px; }
.nav-back-btn:hover, .nav-cancel-btn:hover { background: rgba(255,255,255,0.1); border-radius: 6px; }
.nav-cancel-btn { background: var(--danger); border-radius: 6px; }
.nav-actions { display: flex; gap: 8px; }

/* Views */
.view { display: none; flex: 1; flex-direction: column; overflow: hidden; padding: 16px; box-sizing: border-box; }
.view.active { display: flex; }
.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.view-header h2 { font-size: 20px; font-weight: 600; }

/* Cash view needs scroll */
#view-cash { overflow-y: auto; }

/* Tables Grid */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; overflow-y: auto; padding: 8px; }
.table-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 12px; border-radius: 12px; background: #fff; color: var(--text-primary); cursor: pointer; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.08); min-height: 120px; position: relative; transition: all 0.2s; }
.table-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.table-card.occupied { background: linear-gradient(135deg, #ffebee, #ffcdd2); border: 2px solid #ef5350; }
.table-card-number { font-size: 32px; font-weight: 700; color: #333; margin-bottom: 4px; }
.table-card-status { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin-bottom: 6px; }
.status-occupied { background: #ef5350; color: #fff; }
.status-free { background: #66bb6a; color: #fff; }
.table-card-total { font-size: 13px; font-weight: 600; color: #333; margin-top: 4px; }
.table-card-badge { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 6px; margin-top: 4px; width: 90%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.badge-customer { background: #e3f2fd; color: #1565c0; justify-content: center; }
.badge-reservation { background: #fff3e0; color: #e65100; justify-content: center; }
.table-card-empty { font-size: 10px; color: #999; margin-top: 4px; }

/* Bar Orders */
.btn-new-order-small { padding: 10px 20px; background: var(--pay-btn-bg); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; }
.btn-new-order-small:hover { opacity: 0.9; }

/* ORDER VIEW - THE LAYOUT YOU WANT */
.order-view { display: none; flex-direction: column; position: absolute; top: 48px; left: 0; right: 0; bottom: 0; background: var(--bg-color); z-index: 10; }
.order-view.active { display: flex; }

/* Categories - TOP, full width */
.order-categories { display: flex; gap: 8px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--category-border); flex-wrap: wrap; flex-shrink: 0; }
.category { padding: 10px 20px; border-radius: var(--radius-sm); background: #f5f5f7; color: var(--text-primary); cursor: pointer; font-weight: 500; font-size: 13px; }
.category:hover { background: #e8e8ed; }
.category.active { background: var(--item-bg); color: #fff; }

/* Order Layout - Products LEFT, Order RIGHT */
.order-layout { display: flex; flex: 1; overflow: hidden; }

/* Products Panel - LEFT */
.products-panel { flex: 1; padding: 16px; overflow-y: auto; background: var(--bg-color); display: flex; flex-direction: column; }
.items-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-content: start; min-height: 300px; width: 100%; box-sizing: border-box; }
.items-grid .item { padding: 20px 12px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--item-bg), #8b7cf7); color: #fff; font-weight: 600; font-size: 12px; text-align: center; cursor: pointer; min-height: 60px; display: flex; align-items: center; justify-content: center; word-break: break-word; }
.items-grid .item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(110,93,231,0.4); }

/* Menu Items Pagination Container */
.menu-items-pagination-container { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 16px; 
  gap: 20px; 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  border-radius: 12px; 
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}
.menu-items-pagination-container .pagination-btn { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  width: 50px; 
  height: 50px; 
  border-radius: 50%; 
  border: none; 
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); 
  color: #fff; 
  font-size: 20px; 
  cursor: pointer; 
  transition: all 0.2s ease; 
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.menu-items-pagination-container .pagination-btn:hover:not(.disabled) { 
  transform: scale(1.1); 
  box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
}
.menu-items-pagination-container .pagination-btn.disabled { 
  opacity: 0.4; 
  cursor: not-allowed; 
  background: #999;
}
.menu-items-pagination-container .pagination-info { 
  color: #fff; 
  font-size: 18px; 
  font-weight: 700; 
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  min-width: 80px; 
  text-align: center; 
}

/* Order Panel - RIGHT */
.order-panel { width: 360px; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--category-border); flex-shrink: 0; }
.order-lines { flex: 1; overflow-y: auto; min-height: 150px; }
.list-header { display: flex; padding: 8px 16px; background: #f0f0f0; font-weight: 600; font-size: 11px; color: #666; }
.list-header .col-qty { width: 60px; }
.list-header .col-name { flex: 1; }
.list-header .col-price { width: 70px; text-align: right; }

/* Order Lines - Zebra Style */
.product-bar { display: flex; align-items: center; padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.product-bar:nth-child(odd) { background: #ffffff; }
.product-bar:nth-child(even) { background: #f8f9fa; }
.product-bar:hover { background: #e3f2fd !important; }
.product-bar .col-qty { width: 60px; display: flex; align-items: center; gap: 4px; }
.qty-btn-mini { width: 22px; height: 22px; border-radius: 4px; border: 1px solid #ddd; background: #fff; cursor: pointer; font-weight: bold; font-size: 14px; }
.qty-btn-mini:hover { background: var(--item-bg); color: #fff; border-color: var(--item-bg); }
.product-bar .col-name { flex: 1; font-weight: 500; font-size: 12px; padding: 0 8px; }
.product-bar .col-price { font-weight: 600; font-size: 12px; }
.delete-btn-small { width: 18px; height: 18px; border-radius: 4px; border: none; background: transparent; color: #ccc; cursor: pointer; font-size: 11px; }
.delete-btn-small:hover { background: var(--danger); color: #fff; }
.empty-order { padding: 40px; text-align: center; color: var(--text-secondary); }

/* Order Totals - Compact */
.order-totals { padding: 6px 16px; border-top: 1px solid var(--category-border); background: #f8f9fa; }
.summary-row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 11px; }
.summary-row.total { font-size: 13px; font-weight: 700; color: var(--item-bg); border-top: 1px solid var(--category-border); padding-top: 4px; margin-top: 2px; }

/* Order Items Pagination - Inline */
.order-pagination-inline { display: flex; align-items: center; justify-content: center; padding: 8px; gap: 12px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.order-pagination-inline .pagination-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: none; background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); color: #fff; font-size: 12px; cursor: pointer; flex-shrink: 0; }
.order-pagination-inline .pagination-btn:hover:not(.disabled) { transform: scale(1.1); }
.order-pagination-inline .pagination-btn.disabled { opacity: 0.4; cursor: not-allowed; background: #999; }
.order-pagination-inline .pagination-info { color: #fff; font-size: 11px; font-weight: 700; min-width: 40px; text-align: center; }

/* PAY BAR - BOTTOM RIGHT */
.pay-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #1d1d1f; color: #fff; }
.pay-total { font-size: 18px; font-weight: 700; }
.pay-bar button { padding: 12px 24px; border-radius: var(--radius-md); background: var(--pay-btn-bg); color: #fff; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
.pay-bar button:hover { background: #28a745; }

/* Cash View Layout */
.cash-view-layout { 
  display: flex; 
  gap: 20px; 
  padding: 20px; 
  width: 100%; 
  min-height: 100%; 
  box-sizing: border-box; 
}
.cash-main { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  min-width: 0; 
}
.cash-sidebar { 
  width: 380px; 
  flex-shrink: 0; 
  display: flex; 
  flex-direction: column; 
  background: #f9fafb; 
  border-radius: 16px; 
  padding: 20px; 
}
.cash-sidebar h3 { 
  font-size: 18px; 
  margin-bottom: 16px; 
  color: #374151; 
  font-weight: 700; 
}
.cash-sessions-list { 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
  overflow-y: auto; 
}
.cash-session-card { 
  padding: 16px; 
  background: #fff; 
  border-radius: 12px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.08); 
  cursor: pointer; 
  transition: all 0.15s; 
  border: 1px solid #eee; 
}
.cash-session-card:hover { 
  box-shadow: 0 4px 16px rgba(0,0,0,0.12); 
  transform: translateY(-1px); 
}
.cash-session-card.selected { 
  border: 2px solid var(--item-bg); 
}
.cash-session-card.open { 
  border-left: 4px solid #10b981; 
}
.cash-session-card.closed { 
  border-left: 4px solid #6b7280; 
}
.session-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 8px; 
}
.session-code { 
  font-size: 16px; 
  font-weight: 700; 
  color: #1f2937; 
}
.session-status { 
  font-size: 11px; 
  padding: 4px 10px; 
  border-radius: 12px; 
  font-weight: 600; 
}
.cash-session-card.open .session-status { 
  background: #dcfce7; 
  color: #16a34a; 
}
.cash-session-card.closed .session-status { 
  background: #f3f4f6; 
  color: #6b7280; 
}
.session-time { 
  font-size: 13px; 
  color: #6b7280; 
  margin-bottom: 10px; 
}
.session-amounts { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
}
.amount-row { 
  display: flex; 
  justify-content: space-between; 
  font-size: 13px; 
  color: #4b5563; 
}
.amount-row.highlight { 
  color: var(--item-bg); 
  font-weight: 600; 
}
.session-actions { 
  margin-top: 12px; 
  display: flex; 
  gap: 8px; 
}
.session-actions button { 
  flex: 1; 
  padding: 10px; 
  border: none; 
  border-radius: 8px; 
  font-weight: 600; 
  cursor: pointer; 
  font-size: 13px; 
}
.session-actions .btn-close { 
  background: #ef4444; 
  color: #fff; 
}
.session-actions .btn-close:hover { 
  background: #dc2626; 
}
.cash-main { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

/* Cash View */
.cash-status-panel { 
  padding: 24px; 
  background: #fff; 
  border-radius: 16px; 
  margin-bottom: 16px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); 
}
.cash-status-display { 
  text-align: center; 
  padding: 16px; 
  font-size: 20px; 
  font-weight: 700; 
}
.cash-buttons { 
  display: flex; 
  gap: 12px; 
  justify-content: center; 
  margin-top: 16px; 
}
.cash-buttons button { 
  padding: 14px 32px; 
  border: none; 
  border-radius: 10px; 
  font-size: 15px; 
  font-weight: 600; 
  cursor: pointer; 
}
#cash-open-btn { 
  background: var(--pay-btn-bg); 
  color: #fff; 
}
#cash-open-btn:hover { 
  opacity: 0.9; 
}
.cash-sales-panel { 
  padding: 24px; 
  background: #fff; 
  border-radius: 16px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); 
}
.cash-sales-panel h4 { 
  font-size: 16px; 
  margin-bottom: 16px; 
  color: #374151; 
  font-weight: 700; 
}
.sales-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.sales-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 12px;
}
.sales-card-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.sales-card-value {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}
.sales-card-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}
.sales-card.total {
  background: #ecfdf5;
  grid-column: span 3;
}
.sales-card.total .sales-card-value {
  color: #059669;
} 
}
.sales-value { 
  color: #1f2937; 
  font-weight: 600; 
}

/* Modals */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.show { display: flex; }
.modal-content { background: #fff; padding: 20px; border-radius: var(--radius-lg); width: 95vw; height: 95vh; display: flex; flex-direction: column; }
.modal-content.huge { max-width: 100%; max-height: 100%; }
.modal-content.huge > * { flex-shrink: 0; }
.modal-content.huge .modal-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

.modal-content.huge h3 { font-size: 24px; margin: 0 0 8px 0; }
.payment-total-small { font-size: 36px; font-weight: 700; text-align: center; margin: 0 0 12px 0; color: var(--item-bg); }
.payment-methods { display: flex; gap: 8px; margin-bottom: 12px; }
.payment-method { flex: 1; padding: 12px 8px; border: 2px solid #e5e5e7; border-radius: 8px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px; background: #fff; }
.payment-method.active { border-color: var(--item-bg); background: var(--item-bg); color: #fff; }

.cash-section-full { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.cash-section-full .denom-section { margin-bottom: 10px; }
.cash-section-full .denom-label { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.cash-section-full .denom-row { display: flex; gap: 6px; }
.denom-btn { flex: 1; padding: 12px 4px; border: none; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; }

/* Billetes - full width, same size */
.b200, .b100, .b50, .b20, .b10 { height: 44px; }
.b200 { background: #4a1942; color: #ffd700; }
.b100 { background: #1a7c4c; color: #fff; }
.b50 { background: #e8a935; color: #1a1a1a; }
.b20 { background: #4a4aad; color: #fff; }
.b10 { background: #c9302c; color: #fff; }

/* Monedas */
.c2, .c1, .c50c, .c20c, .c10c, .c5c, .c1c { height: 44px; }
.c2 { background: #c0c0c0; color: #222; }
.c1 { background: #d4af37; color: #222; }
.c50c { background: #c0c0c0; color: #222; }
.c20c { background: #d4af37; color: #222; }
.c10c { background: #c0c0c0; color: #222; }
.c5c { background: #c8b89a; color: #222; }
.c1c { background: #d8a890; color: #222; }

.calc-row { display: flex; gap: 8px; margin: 10px 0; }
.cash-received-display, .change-display { flex: 1; padding: 12px; border-radius: 8px; text-align: center; }
.cash-received-display { background: #e8f5e9; }
.cash-received-display span { font-size: 13px; font-weight: 600; color: #2e7d32; }
.cash-received-display span:last-child { font-size: 20px; display: block; }
.change-display { background: #e3f2fd; }
.change-display span { font-size: 13px; font-weight: 600; color: #1565c0; }
.change-display span:last-child { font-size: 20px; display: block; }

.btn-clear-cash-wrapper { text-align: center; margin-top: 8px; }
.btn-clear-cash { padding: 10px 20px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; }

/* Modal buttons */
.modal-buttons { display: flex; gap: 8px; margin-top: 10px; }
.modal-buttons button { flex: 1; padding: 14px; font-size: 14px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-cancel { background: #e5e5e7; color: #333; }
.btn-confirm { background: var(--pay-btn-bg); color: #fff; }

/* Quick Cash Buttons (open cash) */
.quick-amounts { display: flex; gap: 8px; margin: 12px 0; justify-content: center; }
.quick-btn { padding: 12px 20px; background: var(--item-bg); color: #fff; border: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; }
.quick-btn:hover { opacity: 0.9; }

/* Toast - notifications */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 14px 24px; border-radius: 12px; color: #fff; font-weight: 600; font-size: 14px; opacity: 0; transition: all 0.3s; z-index: 2000; }
.toast.show { opacity: 1; }
.toast.success { background: #34c759; }
.toast.error { background: #ff3b30; }
.toast.warning { background: #ff9500; }

/* Current Customer/Reservation Display */
.current-person-display { display: flex; align-items: center; padding: 14px; background: linear-gradient(135deg, #34c759, #28a745); color: #fff; border-radius: 12px; margin-bottom: 12px; }
.current-icon { font-size: 28px; margin-right: 12px; }
.current-info { flex: 1; }
.current-name { font-weight: 700; font-size: 16px; }
.current-detail { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.btn-remove-current { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); background: transparent; color: #fff; font-size: 16px; cursor: pointer; }
.btn-remove-current:hover { background: rgba(255,255,255,0.2); }

/* People Modals - Cliente/Reserva */
.people-modal { max-width: 500px; }
.search-box { margin-bottom: 12px; }
.search-box input { width: 100%; padding: 14px 16px; border: 2px solid #e5e5e7; border-radius: 10px; font-size: 15px; }
.search-box input:focus { border-color: var(--item-bg); }

.people-results { max-height: 300px; overflow-y: auto; }
.person-item { display: flex; align-items: center; padding: 14px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: all 0.15s; }
.person-item:hover { background: #f8f9fa; }
.person-item.selected { background: #e8f5e9; border-left: 3px solid #34c759; }
.person-icon { font-size: 24px; margin-right: 12px; }
.person-info { flex: 1; }
.person-name { font-weight: 600; font-size: 15px; }
.person-detail { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.person-select-btn { padding: 8px 16px; background: var(--item-bg); color: #fff; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; }

/* Notifications Modal */
.notif-modal { max-width: 450px; }
.notif-list { max-height: 350px; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; padding: 14px; border-bottom: 1px solid #f0f0f0; }
.notif-icon-large { font-size: 28px; margin-right: 12px; }
.notif-content { flex: 1; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-message { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.notif-time { font-size: 10px; color: #999; margin-top: 4px; }
.notif-table { font-size: 11px; padding: 4px 8px; background: #f0f0f0; border-radius: 6px; display: inline-block; }
.notif-status { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.notif-status.pending { background: #fef3c7; color: #92400e; }
.notif-status.completed { background: #dcfce7; color: #166534; }

/* Mobile */
@media (max-width: 768px) {
  nav ul { display: none; }
  .order-layout { flex-direction: column; }
  .order-panel { width: 100%; height: 40%; }
  .products-panel { height: 60%; }
}

/* Views */
.view { display: none; flex: 1; flex-direction: column; overflow: hidden; padding: 16px; }
.view.active { display: flex; }
.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* Tables Grid */

/* Invoices */
.invoices-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { padding: 16px; background: #fff; border-radius: var(--radius-md); text-align: center; box-shadow: var(--shadow-sm); }
.stat-num { font-size: 28px; font-weight: 700; color: var(--item-bg); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.invoices-filters { display: flex; gap: 12px; margin-bottom: 16px; }
.invoices-filters select { padding: 10px; border: 1px solid var(--category-border); border-radius: var(--radius-sm); font-size: 13px; }
.invoices-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.invoice-card { padding: 16px; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.invoice-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.invoice-series { background: #e0e7ff; color: #4338ca; padding: 4px 8px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.invoice-number { font-weight: 600; }
.invoice-status { font-size: 11px; padding: 4px 10px; border-radius: 12px; font-weight: 500; }
.invoice-status.pending { background: #fef3c7; color: #92400e; }
.invoice-status.sent { background: #dbeafe; color: #1e40af; }
.invoice-status.accepted { background: #dcfce7; color: #166534; }
.invoice-status.rejected { background: #fee2e2; color: #dc2626; }
.invoice-total { font-size: 18px; font-weight: 700; text-align: right; margin-top: 8px; }

/* Orders List */
.orders-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.order-card { padding: 16px; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); cursor: pointer; }
.order-card:hover { box-shadow: var(--shadow-md); }
.order-card-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.order-card-number { font-weight: 600; }
.order-card-table { color: var(--text-secondary); }
.order-card-meta { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.order-card-customer { font-size: 11px; padding: 2px 8px; background: #fef3c7; color: #92400e; border-radius: 10px; }
.order-card-reservation { font-size: 11px; padding: 2px 8px; background: #dbeafe; color: #1e40af; border-radius: 10px; }
.order-card-status { font-size: 11px; padding: 4px 8px; border-radius: 12px; }
.order-card-status.open { background: #dcfce7; color: #166534; }
.order-card-status.paid { background: #dbeafe; color: #1e40af; }
.order-card-total { font-size: 18px; font-weight: 700; text-align: right; }

/* Cash History */
.cash-history-section { margin-top: 24px; }
.cash-history-controls { display: flex; gap: 12px; margin-bottom: 16px; }
.cash-date-input { flex: 1; padding: 12px; border: 1px solid var(--category-border); border-radius: var(--radius-sm); }
.btn-search { padding: 12px 24px; background: var(--item-bg); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; }
.cash-history-list { display: flex; flex-direction: column; gap: 12px; }
.cash-history-item { padding: 16px; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); cursor: pointer; }
.cash-history-item:hover { box-shadow: var(--shadow-md); }
.cash-history-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.cash-history-date { font-weight: 600; }

/* Notifications */
.notifications-list { max-height: 400px; overflow-y: auto; }
.notif-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid #eee; cursor: pointer; }
.notif-item:hover { background: #f5f5f5; }
.notif-icon { font-size: 24px; }
.notif-content { flex: 1; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-message { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.notif-time { font-size: 10px; color: #999; }

/* Nav Buttons */
#waiter-btn, #bill-btn { background: var(--item-bg); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 16px; font-weight: 600; cursor: pointer; font-size: 13px; }
#waiter-btn:hover, #bill-btn:hover { opacity: 0.9; }

/* Invoice Detail Modal */
.invoice-detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.invoice-detail-row span:first-child { color: #666; font-weight: 500; }
.invoice-detail-row span:last-child { color: #333; font-weight: 600; }
.invoice-detail-row .total { color: #059669; font-size: 18px; }
.status-accepted { color: #059669; }
.status-rejected { color: #dc2626; }
.status-sent { color: #2563eb; }
.status-pending { color: #d97706; }