/* ===============================
   RESET & BASE
================================ */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

html, body {
  margin: 0;
  background: #F8FAFC;   /* الخلفية الأساسية */
  color: #0F172A;
  touch-action: manipulation;
}
/* ===============================
   TOP BAR
================================ */
.topbar {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 2000;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* العنوان بالنص */
.topbar-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 800;
  color: #FBBF24;
  white-space: nowrap;
}

/* اللوقو يسار */
.topbar-logo {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* زر القائمة يمين */
.menu-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  background: none;
  border: none;
  color: #FBBF24;
  cursor: pointer;
}
/* ===============================
   LAYOUT
================================ */
.cashier-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  padding: 16px;
  min-height: calc(100vh - 80px);
}

/* ===============================
   CARDS
================================ */
.card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
}

/* ===============================
   CATEGORIES
================================ */
.categories {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.cat {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: #E5E7EB;
  font-weight: 700;
  cursor: pointer;
}

.cat.active {
  background: #FBBF24;
  color: #0F172A;
}

/* ===============================
   ITEMS GRID (🔥 مجنون)
================================ */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.item {
  height: 230px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E5E7EB;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .15s ease, box-shadow .15s ease;
}

.item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

.cashier-item-img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.item strong {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  min-height: 2.6em;
  text-align: center;
}

.item span {
  font-size: 14px;
  font-weight: 700;
  color: #16A34A;
  text-align: center;
}

/* ===============================
   INVOICE
================================ */
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.invoice-table th,
.invoice-table td {
  padding: 6px;
  border-bottom: 1px solid #E5E7EB;
  font-size: 14px;
}

.total-box,
.change-box {
  font-size: 16px;
  font-weight: 900;
  margin: 10px 0;
}

#paid {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid #CBD5E1;
}

/* ===============================
   BUTTONS
================================ */
.btn {
  padding: 12px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.btn.success {
  background: linear-gradient(135deg, #16A34A, #22C55E);
  color: white;
}

.btn.danger {
  background: linear-gradient(135deg, #DC2626, #EF4444);
  color: white;
}

.btn.secondary {
  background: #1E293B;
  color: #FBBF24;
}

/* ===============================
   ACTIVE ORDERS
================================ */
.card.orders {
  overflow-y: auto;
}

.orders-list {
  display: grid;
  gap: 10px;
}

.order-box {
  background: #FFFFFF;              /* بدون لون */
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #E5E7EB;        /* إطار محايد */
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  transition: all .2s ease;
}


.order-box strong {
  font-size: 14px;
  font-weight: 900;
}

.order-box button {
  margin-top: 6px;
  margin-left: 4px;
}
/* ===== Overlay (إغلاق القائمة عند الضغط خارجها) ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2500;
  display: none;
  pointer-events: none;
}

.overlay.show {
  display: block;
  pointer-events: auto;
}
/* ===============================
   SIDE MENU
================================ */
.side-menu {
  position: fixed;
  top: 0;
  right: -240px;
  width: 240px;
  height: 100%;
  background: #0F172A;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: right .25s ease;
  z-index: 3000;
}

.side-menu.open {
  right: 0;
}

.side-menu button {
  background: #1E293B;
  color: #FBBF24;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-weight: 800;
}

/* ===============================
   OVERLAY
================================ */

.overlay.show {
  display: block;
}

/* ===============================
   VARIANT POPUP
================================ */
.variant-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}

.variant-box {
  background: white;
  padding: 20px;
  border-radius: 16px;
  width: 90%;
  max-width: 320px;
  text-align: center;
}

.variant-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  margin: 6px 0;
  background: #FBBF24;
  font-weight: 800;
}

.variant-cancel {
  background: #E5E7EB;
  padding: 10px;
  border-radius: 10px;
  border: none;
  margin-top: 10px;
}
.employee-mode {
  background: #f9fafb;
}

.variant-box input {
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}

.variant-box input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124,58,237,0.2);
}
/* ===============================
   MOBILE MODE
================================ */
@media (max-width: 768px) {
  .cashier-layout {
    grid-template-columns: 1fr;
  }

  .card.products { order: 1; }
  .card.invoice  { order: 2; }
  .card.orders   { order: 3; }
}

/* ===============================
   SCROLL STYLE
================================ */
.items-grid::-webkit-scrollbar,
.orders-list::-webkit-scrollbar {
  width: 6px;
}

.items-grid::-webkit-scrollbar-thumb,
.orders-list::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}

/* ===============================
   REPORT PAGE (FINAL PRO)
================================ */
.report-page {
  background: #F1F5F9;
  min-height: 100vh;
}

/* ===== Header ===== */
.report-header {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: #FBBF24;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  position: relative;        /* ✅ أضف */
  z-index: 100;              /* ✅ أضف */
}

.report-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.report-header .store-name {
  font-size: 14px;
  opacity: .9;
  margin-top: 4px;
}

.report-header .close-time {
  margin-top: 8px;
  font-size: 13px;
  opacity: .85;
}

/* ✅ أضف هالـ الكود الجديد */
.back-to-cashier {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  pointer-events: auto !important;
  z-index: 101 !important;
}

.back-to-cashier:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) translateX(-4px);
}

.back-to-cashier:active {
  transform: translateY(-50%) scale(0.95);
}

/* ===== Container ===== */
.report-container {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 16px;
}

/* ===== Summary Cards ===== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.summary-cards .card {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.summary-cards span {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}

.summary-cards strong {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
  color: #0F172A;
}

/* ===== Table ===== */
.table-box {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

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

.table-box thead {
  background: #F1F5F9;
}

.table-box th {
  padding: 10px;
  font-size: 14px;
  font-weight: 900;
  border-bottom: 2px solid #E5E7EB;
}

.table-box td {
  padding: 10px;
  font-size: 14px;
  border-bottom: 1px solid #E5E7EB;
}

/* ===== Actions ===== */
.report-page .actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ===== Footer ===== */
.report-footer {
  text-align: center;
  font-size: 12px;
  color: #64748B;
  margin: 24px 0;
}


.overlay {
  pointer-events: none;
}

.overlay.show {
  pointer-events: auto;
}
.order-box button {
  pointer-events: auto;
  position: relative;
  z-index: 5;
}
.fixed-back {
  position: fixed;
  bottom: 20px;
  left: 20px;        /* لو تبيه يمين غيّرها right */
  z-index: 9999;
  padding: 12px 18px;
  font-size: 16px;
  border-radius: 10px;
}
/* ===============================
   PROFESSIONAL RECEIPT (POS STYLE)
================================ */
@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  body * {
    visibility: hidden;
  }

  #printArea,
  #printArea * {
    visibility: visible;
  }

  #printArea {
    position: absolute;
    top: 0;
    right: 0;
    width: 80mm;
  }
}

.receipt {
  width: 80mm;
  padding: 6mm 4mm;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  direction: rtl;
  text-align: center;   /* 🔥 هذا يخلي كل شي بالنص */
}

/* اسم المحل */
.title {
  font-size: 28px;      /* 🔥 أكبر */
  font-weight: 900;
  margin-bottom: 6px;
}

/* رقم الفاتورة */
.receipt-no {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* الأصناف */
#printItems {
  text-align: center;
}

/* كل صنف */
.receipt-line {
  font-size: 20px;      /* 🔥 واضح جداً */
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* الإجمالي */
.total {
  margin-top: 12px;
  font-size: 24px;      /* 🔥 بارز */
  font-weight: 900;
}

/* الخط الفاصل */
hr {
  border: none;
  border-top: 2px dashed #000;
  margin: 10px 0;
}
/* إخفاء الفاتورة في الوضع العادي */
#printArea {
  display: none;
}
/* ===============================
   PRINT – REPORT FIX
================================ */
@media print {

  /* تقرير الإقفال */
  body.report-page * {
    visibility: visible !important;
  }

  body.report-page {
    background: white;
  }

  body.report-page .no-print {
    display: none !important;
  }

}
/* ===== Side Panel ===== */
.side-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 15px rgba(0,0,0,0.15);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.side-panel.open {
  right: 0;
}

.side-panel-header {
  padding: 15px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-panel-body {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
}

.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
  display: none;
}

.panel-overlay.show {
  display: block;
}

/* زر التقرير */
.side-report-btn {
  background: #111827;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.side-panel {
  transition: right 0.35s cubic-bezier(.4,0,.2,1);
}
/* ===== Employee Mode Banner ===== */
#employeeBanner {
  position: fixed;
  top: 60px; /* تحت الـ topbar مباشرة */
  right: 0;
  left: 0;
  z-index: 1500;
  background: #14532d;
  color: #fff;
  padding: 10px;
  font-weight: 800;
  text-align: center;
}

/* نزّل المحتوى تحت البانر */
.employee-mode main {
  margin-top: 60px;
}
@media (max-width: 768px) {
  .topbar {
    padding: 12px;
    font-size: 18px;
  }

  .topbar-logo {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    height: 42px;
    width: auto;
    object-fit: contain;
  }
}

.kitchen-card {
  background: #020617;
  border: 2px solid #334155;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

/* الهيدر */
.k-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}

/* رقم الفاتورة */
.k-invoice {
  font-size: 20px;
}

/* الوقت */
.k-time {
  background: #0f172a;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
}

/* عناصر الطلب */
.k-item {
  border-bottom: 1px dashed #334155;
  padding: 6px 0;
}

.k-name {
  font-size: 18px;
  font-weight: 700;
}

.k-qty {
  font-size: 15px;
  color: #cbd5e1;
}

.k-extras {
  font-size: 13px;
  color: #f87171;
}

/* زر جاهز */
.k-ready-btn {
  margin-top: 8px;
  padding: 12px;
  font-size: 18px;
  border: none;
  border-radius: 12px;
  background: #22c55e;
  color: #052e16;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s;
}

.k-ready-btn:active {
  transform: scale(0.96);
}
body.employee-mode .topbar {
  background: #7c3aed;
}

.flash {
  animation: flashBg 0.4s alternate 6;
}

@keyframes flashBg {
  from { background: #0f172a; }
  to { background: #facc15; }
}
/* ===============================
   🧀 PAID ADDONS STYLING
================================ */

.addon-label {
  display: block;
  padding: 8px;
  margin: 8px 0;
  border-radius: 6px;
  background: #F9F9F9;
  border-left: 3px solid #22C55E;
  cursor: pointer;
  text-align: right;
}

.addon-label:hover {
  background: #F0F0F0;
}

.addon-label input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.addon-price {
  color: #16A34A;
  font-weight: 700;
  margin-right: 8px;
}

.cart-extras {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  font-style: italic;
  display: block;
}
/* ===============================================
   🎨 REPORTS PAGE - PROFESSIONAL STYLING
   =============================================== */

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* =============== REPORTS CONTAINER =============== */
.reports-container {
  animation: slideDown 0.5s ease-out;
}

/* =============== HEADER =============== */
.header {
  animation: slideDown 0.6s ease-out;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.15);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.header h1 {
  position: relative;
  z-index: 1;
  letter-spacing: 1px;
}

/* =============== FILTERS SECTION =============== */
.filters-section {
  animation: slideDown 0.7s ease-out;
  transition: all 0.3s ease;
}

.filters-section:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.filters-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group input,
.filter-group select {
  transition: all 0.3s ease;
  background: white;
}

.filter-group input:focus,
.filter-group select:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* =============== BUTTONS =============== */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active::before {
  width: 300px;
  height: 300px;
}

.btn-secondary {
  transition: all 0.3s ease;
}

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

/* =============== SUMMARY CARDS =============== */
.summary-section {
  animation: fadeIn 0.8s ease-out;
}

.summary-card {
  animation: slideDown 0.8s ease-out;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.summary-card:hover::before {
  opacity: 1;
}

.summary-value {
  animation: fadeIn 1s ease-out;
  font-variant-numeric: tabular-nums;
}

/* =============== TABLE SECTION =============== */
.table-section {
  animation: slideDown 0.9s ease-out;
  transition: all 0.3s ease;
}

.table-section:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.table-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

table tbody tr {
  animation: fadeIn 0.5s ease-out;
  transition: all 0.2s ease;
}

table tbody tr:hover {
  background: #F1F5F9;
  box-shadow: inset 0 0 0 1px #E2E8F0;
}

table thead th {
  background: linear-gradient(135deg, #F1F5F9, #F8FAFC);
  position: sticky;
  top: 0;
  z-index: 10;
}

table td {
  transition: color 0.2s ease;
}

table tbody tr:hover td {
  color: #0F172A;
}

/* =============== ACTION BUTTONS =============== */
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-action {
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
}

.btn-action:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: scale(1.15) rotate(5deg);
}

.btn-action.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.15) rotate(-5deg);
}

.btn-action.print:hover {
  background: rgba(16, 185, 129, 0.2);
}

.btn-action.view:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* =============== EMPTY STATE =============== */
.empty-state {
  animation: fadeIn 0.5s ease-out;
  color: #94A3B8;
}

/* =============== RESPONSIVE DESIGN =============== */
@media (max-width: 1024px) {
  .summary-section {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .reports-container {
    padding: 12px;
  }
  
  .header {
    padding: 20px;
  }
  
  .header h1 {
    font-size: 22px;
  }
  
  .filters-section,
  .summary-card,
  .table-section {
    padding: 16px;
  }
  
  .filter-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-buttons {
    flex-wrap: wrap;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .summary-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .summary-card {
    padding: 16px;
  }
  
  .summary-value {
    font-size: 24px;
  }
  
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table th,
  table td {
    padding: 8px;
    font-size: 12px;
  }
  
  .actions {
    gap: 4px;
  }
  
  .btn-action {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .reports-container {
    padding: 8px;
  }
  
  .header {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .header h1 {
    font-size: 18px;
    margin: 0;
  }
  
  .filters-section {
    padding: 12px;
    margin-bottom: 16px;
  }
  
  .filters-section h2 {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .filter-grid {
    gap: 10px;
  }
  
  .filter-group input,
  .filter-group select {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  .filter-buttons {
    gap: 8px;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
  }
  
  .summary-section {
    gap: 10px;
  }
  
  .summary-card {
    padding: 12px;
    border-radius: 8px;
  }
  
  .summary-label {
    font-size: 11px;
  }
  
  .summary-value {
    font-size: 20px;
  }
  
  .table-title {
    padding: 12px;
    font-size: 14px;
  }
  
  table {
    font-size: 11px;
  }
  
  table th {
    padding: 6px;
  }
  
  table td {
    padding: 6px;
  }
  
  .actions {
    justify-content: center;
  }
  
  .btn-action {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}

/* =============== PRINT STYLES =============== */
@media print {
  body {
    background: white;
  }
  
  .reports-container {
    max-width: 100%;
  }
  
  .filters-section,
  .filter-buttons {
    display: none;
  }
  
  .header {
    background: white !important;
    color: black !important;
    border-bottom: 2px solid black;
    box-shadow: none;
  }
  
  .summary-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #E2E8F0;
  }
  
  .table-section {
    page-break-inside: avoid;
    box-shadow: none;
  }
  
  table {
    border-collapse: collapse;
  }
  
  table th,
  table td {
    border: 1px solid #E2E8F0;
    padding: 8px;
  }
  
  .btn-action {
    display: none;
  }
}

/* =============== DARK MODE (Optional) =============== */
@media (prefers-color-scheme: dark) {
  .filters-section,
  .summary-card,
  .table-section {
    background: #1E293B;
    color: #E2E8F0;
  }
  
  .summary-label {
    color: #94A3B8;
  }
  
  .summary-value {
    color: #F1F5F9;
  }
  
  table thead {
    background: #0F172A;
  }
  
  table th {
    color: #CBD5E1;
  }
  
  table td {
    color: #E2E8F0;
  }
  
  table tbody tr:hover {
    background: #0F172A;
  }
}
/* =============== DAY DETAIL MODAL =============== */
.day-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

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

.modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  direction: rtl;
  animation: slideDown 0.4s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #E2E8F0;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: white;
  border-radius: 16px 16px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

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

.modal-body {
  padding: 24px;
}

.detail-summary {
  margin-bottom: 20px;
  padding: 16px;
  background: #F8FAFC;
  border-radius: 8px;
  border-right: 4px solid #3B82F6;
}

.detail-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}

.detail-date .label {
  font-weight: 600;
  color: #475569;
}

.detail-date .value {
  font-weight: 700;
  color: #0F172A;
  font-size: 18px;
}

.detail-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.detail-card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  text-align: center;
  transition: all 0.2s ease;
}

.detail-card:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.card-label {
  font-size: 12px;
  color: #64748B;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
}

.card-unit {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #0F172A;
  font-weight: 700;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white !important;
  border: 1px solid #E2E8F0 !important;
}

.detail-table thead {
  background: #F1F5F9 !important;
}

.detail-table th {
  padding: 12px !important;
  text-align: right !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  border-bottom: 2px solid #E2E8F0 !important;
  border: 1px solid #E2E8F0 !important;
  background: #F1F5F9 !important;
}

.detail-table td {
  padding: 12px !important;
  border-bottom: 1px solid #E2E8F0 !important;
  border: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
  background: white !important;
}

.detail-table tbody tr {
  background: white !important;
}

.detail-table tbody tr:hover {
  background: #F8FAFC !important;
}
.detail-table tbody tr:hover {
  background: #F8FAFC;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  padding: 16px 24px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 0 0 16px 16px;
}

.modal-footer button {
  flex: 1;
}

@media print {
  .day-detail-modal {
    display: block;
    background: white;
  }
  
  .modal-backdrop {
    display: none;
  }
  
  .modal-content {
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
  }
  
  .modal-footer {
    display: none;
  }
}
/* ===============================================
   🔥 FORCE TABLE VISIBILITY - NO TRANSPARENCY
   =============================================== */

/* جميع الجداول */
table {
  background: white !important;
  border-collapse: collapse !important;
  width: 100% !important;
}

/* رؤوس الجداول */
table thead,
table thead th,
table th {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  padding: 12px !important;
  font-weight: 700 !important;
  text-align: right !important;
}

/* خلايا الجداول */
table tbody,
table tbody tr,
table tbody td,
table td {
  background: white !important;
  color: #0F172A !important;
  border: 1px solid #E2E8F0 !important;
  padding: 10px 12px !important;
}

/* عند الـ Hover */
table tbody tr:hover {
  background: #F8FAFC !important;
}

/* إزالة أي شفافية */
table * {
  opacity: 1 !important;
  visibility: visible !important;
}

/* الفاتورة تحديداً */
.invoice-table,
.invoice-table * {
  background: white !important;
  color: #0F172A !important;
  opacity: 1 !important;
}

/* جدول التقرير */
.table-box table,
.table-box table * {
  background: white !important;
  color: #0F172A !important;
  opacity: 1 !important;
}

/* جدول تفاصيل اليوم */
.detail-table,
.detail-table * {
  background: white !important;
  color: #0F172A !important;
  opacity: 1 !important;
}
/* =============== BACK TO CASHIER BUTTON =============== */
.back-to-cashier {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.back-to-cashier:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) translateX(-4px);
}

.back-to-cashier:active {
  transform: translateY(-50%) scale(0.95);
}
