/* Matgary dashboard layout */
.dash { display: flex; min-height: 100vh; }
.side { width: 230px; background: #0f172a; color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.side h2 { margin: 0 0 10px; font-size: 1.1rem; }
.side button { text-align: start; background: transparent; border: 0; color: #cbd5e1; padding-inline: 12px; padding-block: 10px; border-radius: var(--radius-md); cursor: pointer; font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: background 0.15s ease, color 0.15s ease; }
.side button.active, .side button:hover { background: #1e293b; color: #fff; }
.main { flex: 1; padding: 20px; max-width: 1200px; width: 100%; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-block: 14px; }
.stat { padding: 14px; }
.stat b { font-size: 1.4rem; display: block; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 94vw); padding: 22px; }

/* Modals */
.modal { position: fixed; inset: 0; display: none; place-items: center; padding: 16px; z-index: 1100; }
.modal.open { display: grid; }
.modal::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.modal-card { position: relative; background: #fff; border-radius: var(--radius-lg); padding: 22px; width: min(680px, 94vw); max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-pop); }
.modal-card-lg { width: min(800px, 95vw); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border); }
.modal-header h2 { margin: 0; font-size: 1.3rem; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.thumb { width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--color-border); }

/* Badges */
.badge, .status-badge, .role-badge, .addr-badge, .fin-sub-badge, .coupon-code-badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-preparing { background: #dbeafe; color: #1e40af; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

/* Filter & Search Toolbars */
.toolbar-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-block: 14px; }
.search-input { flex: 1; min-width: 240px; max-width: 380px; padding-inline: 12px; padding-block: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; font-size: 0.9rem; }
.select-filter { min-width: 160px; padding-inline: 10px; padding-block: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; font-size: 0.9rem; }

/* Pills */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: #f1f5f9; border: 1px solid var(--color-border); color: var(--color-muted); border-radius: 999px; padding-inline: 12px; padding-block: 5px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.pill:hover { background: #e2e8f0; color: var(--color-text); }
.pill.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Stock Quick Modifier */
.stock-inline { display: inline-flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 2px 4px; }
.stock-val { min-width: 24px; text-align: center; font-weight: 700; font-size: 0.9rem; }
.btn-stock { width: 24px; height: 24px; border: 1px solid var(--color-border); background: #fff; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem; line-height: 1; transition: background 0.15s, color 0.15s; user-select: none; }
.btn-stock:hover:not(:disabled) { background: var(--color-primary-soft); color: var(--color-primary); border-color: var(--color-primary); }
.btn-stock:disabled { opacity: 0.4; cursor: not-allowed; }

/* Category Table Items & Modal Icon Picker */
.cat-icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: var(--color-primary-soft); color: var(--color-primary); border-radius: var(--radius-sm); font-size: 1.15rem; overflow: hidden; }
.cat-icon-badge svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.cat-icon-badge img, .cat-table-thumb { width: 32px; height: 32px; object-fit: contain; display: block; }
.cat-modal-preview-box { width: 44px; height: 44px; min-width: 44px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; overflow: hidden; }
.cat-modal-preview-box img { width: 36px; height: 36px; object-fit: contain; }
.cat-icon-picker { display: flex; flex-wrap: wrap; gap: 6px; max-height: 96px; overflow-y: auto; padding: 6px; background: #f8fafc; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.cat-icon-btn { width: 32px; height: 32px; border: 1px solid var(--color-border); background: #fff; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; transition: all 0.15s ease; user-select: none; }
.cat-icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.cat-icon-btn:hover { background: var(--color-primary-soft); border-color: var(--color-primary); transform: scale(1.08); }
.cat-icon-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cat-icon-btn.active svg { stroke: #fff; }

/* Order Line Items & Invoice */
.invoice-card { background: #fff; }
.invoice-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; background: #f8fafc; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px; margin-block-end: 16px; font-size: 0.88rem; }
.invoice-meta p { margin: 0 0 6px; }
.invoice-meta p:last-child { margin-bottom: 0; }
.order-items-table { width: 100%; border-collapse: collapse; margin-block: 14px; font-size: 0.88rem; }
.order-items-table th, .order-items-table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--color-border); }
.order-items-table th { background: #f1f5f9; color: var(--color-muted); font-size: 0.8rem; }
.item-thumb-box { width: 44px; height: 44px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--color-border); background: #f8fafc; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.item-thumb-box img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb-box svg { width: 22px; height: 22px; color: var(--color-muted); }
.item-prod-cell { display: flex; align-items: center; gap: 10px; }
.invoice-summary { margin-top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 0.95rem; }
.invoice-summary-row { display: flex; justify-content: space-between; width: 220px; }
.invoice-summary-total { font-weight: 800; font-size: 1.15rem; color: var(--color-primary); border-top: 2px solid var(--color-border); padding-top: 6px; margin-top: 4px; }
.order-actions-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--color-border); flex-wrap: wrap; }

/* CRM & Customers Management */
.cust-name-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-badge { font-size: 0.75rem; padding: 2px 7px; border-radius: 999px; font-weight: 600; text-transform: capitalize; }
.role-admin { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.role-customer { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

.cust-profile-card { display: flex; gap: 18px; background: #f8fafc; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; margin-bottom: 20px; align-items: flex-start; }
.cust-avatar-box { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), #0d9488); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.cust-profile-info { flex: 1; min-width: 0; }
.cust-profile-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cust-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; font-size: 0.88rem; margin-bottom: 14px; }
.cust-stats-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cust-stat-pill { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 6px 14px; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.cust-stat-pill b { color: var(--color-primary); font-size: 1rem; }

.cust-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cust-section-title h4 { margin: 0; font-size: 1.05rem; color: #1e293b; }
.cust-addresses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cust-address-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px 14px; font-size: 0.88rem; box-shadow: 0 1px 3px rgba(0,0,0,0.03); transition: border-color 0.15s ease; }
.cust-address-card:hover { border-color: var(--color-primary); }
.cust-address-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cust-address-body strong { color: var(--color-primary); font-size: 0.95rem; }
.cust-address-body p { margin: 4px 0 0; color: #334155; line-height: 1.4; }
.addr-badge { font-size: 0.72rem; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.addr-home { background: #e0f2fe; color: #0284c7; }
.addr-work { background: #fef3c7; color: #b45309; }
.addr-default { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.cust-empty-box { background: #f8fafc; border: 1px dashed var(--color-border); border-radius: var(--radius-md); padding: 20px; text-align: center; }

/* Coupons & Promotional Engine Styles */
.coupon-code-badge-wrap { display: inline-flex; align-items: center; }
.coupon-code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #f1f5f9;
  color: var(--color-primary);
  border: 1px dashed rgba(15, 76, 92, 0.4);
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: all;
}
.coupon-code-badge:hover {
  background: #e0eef2;
  border-color: var(--color-primary);
}
.coupon-stats .stat b { color: var(--color-primary); }
.badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.badge-active { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-inactive { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.badge-expired { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger { background: #fff; border: 1px solid #fecaca; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.icon-xs { width: 14px; height: 14px; }
.text-danger { color: #dc2626; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Settings Page & Modular Configuration Cards */
.settings-container { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.settings-card { padding: 20px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.settings-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--color-border); }
.settings-card-header .icon { width: 24px; height: 24px; color: var(--color-primary); flex-shrink: 0; margin-top: 2px; }
.settings-card-header h3 { margin: 0 0 4px; font-size: 1.05rem; color: #1e293b; }
.settings-card-header p { margin: 0; font-size: 0.85rem; }

/* Theme Color Picker */
.theme-picker-wrap { display: flex; flex-direction: column; gap: 14px; }
.color-input-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-picker-input { -webkit-appearance: none; -moz-appearance: none; appearance: none; width: 44px; height: 44px; border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; padding: 2px; background: #fff; }
.color-picker-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker-input::-webkit-color-swatch { border: none; border-radius: 4px; }
.color-hex-input { width: 120px; padding: 8px 12px; font-family: monospace; font-size: 0.95rem; font-weight: 700; border: 1px solid var(--color-border); border-radius: var(--radius-md); text-transform: lowercase; }
.theme-swatch-badge { color: #fff; font-family: monospace; font-weight: 700; font-size: 0.82rem; padding: 6px 12px; border-radius: var(--radius-sm); text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

.theme-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.theme-preset-btn { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--color-border); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.theme-preset-btn:hover { transform: scale(1.15); box-shadow: 0 0 0 2px var(--color-primary); }

.settings-actions-bar { display: flex; justify-content: flex-end; margin-top: 10px; }
.settings-alert { padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 14px; font-size: 0.9rem; font-weight: 600; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* Promotional Banners Management Grid */
.banners-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.banner-slot-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.banner-slot-card:hover {
  border-color: var(--color-primary-soft, #94a3b8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.banner-slot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.banner-slot-header h4 {
  margin: 0;
  font-size: 0.98rem;
  color: #1e293b;
}
.slot-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.slot-badge-main {
  background: var(--color-primary-soft, #e0f2fe);
  color: var(--color-primary, #0f4c5c);
  font-weight: 800;
}
.banner-preview-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #e2e8f0;
  position: relative;
}
.banner-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.banner-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 600;
  transition: all 0.15s ease;
}
.banner-upload-btn:hover {
  background: var(--color-primary-soft, #f1f5f9);
  border-color: var(--color-primary, #0f4c5c);
  color: var(--color-primary, #0f4c5c);
}
.banner-upload-note {
  font-size: 0.75rem;
  color: var(--color-muted);
}
.banner-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.btn-save-banner {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--color-primary, #0f4c5c);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-save-banner:hover {
  background: var(--color-primary-hover, #0b3742);
}
.banner-slot-status {
  font-size: 0.8rem;
  font-weight: 600;
}
.banner-slot-status.success {
  color: #16a34a;
}
.banner-slot-status.error {
  color: #dc2626;
}

/* Low Stock Items on Overview & Products Table */
.low-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 0.88rem; }
.low-row:last-child { margin-bottom: 0; }
.low-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-quick-restock { font-size: 0.76rem; padding: 2px 8px; border-radius: 4px; background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; cursor: pointer; font-weight: 700; transition: background 0.15s; }
.btn-quick-restock:hover { background: #bae6fd; color: #075985; }

/* Print-friendly Stylesheet */
@media print {
  @page { margin: 12mm; size: auto; }
  body * { visibility: hidden !important; }
  #orderModal, #orderModal *, #poViewModal, #poViewModal * { visibility: visible !important; }
  #orderModal, #poViewModal {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
  }
  #orderModal::before, #poViewModal::before { display: none !important; }
  #orderModal .modal-card, #poViewModal .modal-card {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .no-print, .order-actions-bar, #orderClose, #printInvoiceBtn, #poViewClose, #printPoInvoiceBtn, #printPoInvoiceBottomBtn, #poViewBottomClose {
    display: none !important;
  }
  .order-items-table th {
    background: #e2e8f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .invoice-summary-total {
    color: #000 !important;
  }
  .print-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid #0f4c5c !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
  }
}

/* 4-Slot Multi-Image Product Uploader */
.img-slots-container {
  margin-block: 16px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.img-slots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.img-slots-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.img-slots-guidance {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 14px;
  line-height: 1.45;
  font-weight: 600;
}
.img-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .img-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 440px) {
  .img-slots-grid {
    grid-template-columns: 1fr;
  }
}
.img-slot-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
}
.img-slot-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.img-slot-card.slot-primary {
  border-color: #93c5fd;
  background: #f8fafc;
}
.img-slot-card.slot-primary:hover {
  border-color: #3b82f6;
}
.img-slot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 4px;
}
.img-slot-tag {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 700;
}
.img-slot-tag.tag-req {
  background: #fee2e2;
  color: #b91c1c;
}
.img-slot-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  padding: 8px;
  user-select: none;
}
.img-slot-preview:hover {
  border-color: var(--color-primary);
  background: #f1f5f9;
}
.img-slot-preview.dragover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: scale(1.02);
}
.img-slot-card.has-image .img-slot-preview {
  border-style: solid;
  border-color: #e2e8f0;
  background: #0f172a;
}
.img-slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: var(--radius-sm);
}
.img-slot-card.has-image .img-slot-img {
  display: block;
}
.img-slot-card.has-image .img-slot-placeholder {
  display: none;
}
.img-slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #94a3b8;
}
.img-slot-placeholder svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
}
.img-slot-empty-text {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}
.img-slot-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.88);
  color: #38bdf8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-align: center;
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.img-slot-card.has-image .img-slot-badge {
  display: block;
}
.img-slot-badge.savings {
  color: #4ade80;
}
.img-slot-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  z-index: 10;
}
.img-slot-card.loading .img-slot-loading-overlay {
  display: flex;
}
.img-slot-actions {
  display: flex;
  gap: 6px;
}
.img-slot-btn {
  flex: 1;
  font-size: 0.74rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  font-weight: 600;
  color: var(--color-text);
}
.img-slot-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.img-slot-btn-del {
  flex: 0 0 auto;
  color: var(--color-danger);
  border-color: #fecaca;
  background: #fff;
  padding: 6px 8px;
  font-size: 0.74rem;
  border-radius: var(--radius-sm);
  border: 1px solid #fecaca;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.img-slot-btn-del:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #f87171;
}
.img-slot-btn-del:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--color-border);
  color: var(--color-muted);
  background: #f8fafc;
}

/* Financials & Operating Expenses Styling */
.fin-stats {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.fin-stats .stat b {
  font-size: 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.fin-sub-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}
.badge-profit-pos {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-profit-neg {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.fin-breakdown-card {
  padding: 18px 20px;
  margin-block: 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.fin-breakdown-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}
.fin-breakdown-header .icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.fin-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.fin-cat-card {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.fin-cat-card:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
}
.fin-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}
.fin-cat-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fin-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.fin-cat-pct {
  font-size: 0.78rem;
  color: var(--color-muted);
  font-weight: 700;
}
.fin-cat-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
}
.fin-cat-bar-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}
.fin-cat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Product Modal Live Margin Box */
.prod-margin-box {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.prod-margin-box .margin-label {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 600;
}
.prod-margin-box strong {
  font-size: 1rem;
}

/* Order Invoice Profit Highlight */
.invoice-profit-row {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 6px;
  width: 100% !important;
  max-width: 280px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #15803d;
}

/* Purchases & Suppliers UI Styles */
.po-stats {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 20px;
}
.po-qty-input, .po-cost-input {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-weight: 600;
}
.po-prod-select, .po-var-select {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.badge-draft { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-ordered { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-received { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* Mobile Header & Overlay Defaults (Desktop) */
.admin-mobile-header {
  display: none;
}
#sidebarOverlay {
  display: none;
}

/* Mobile Responsiveness (<= 768px) */
@media (max-width: 768px) {
  .dash {
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
  }

  .admin-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #0f172a;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }

  .admin-mobile-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
  }

  #sidebarToggleBtn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
  }

  #sidebarToggleBtn:hover,
  #sidebarToggleBtn:focus {
    background: #1e293b;
  }

  .admin-sidebar,
  .side {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
  }

  html[dir="ltr"] .admin-sidebar,
  html[dir="ltr"] .side {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.25);
  }

  .admin-sidebar.show,
  .side.show {
    transform: translateX(0);
  }

  html[dir="ltr"] .admin-sidebar.show,
  html[dir="ltr"] .side.show {
    transform: translateX(0);
  }

  #sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  #sidebarOverlay.show {
    display: block;
    opacity: 1;
  }

  .main-content,
  .main {
    margin-right: 0;
    margin-left: 0;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
  }

  /* Tables & Data Grids */
  .table-wrap,
  .data-grid-wrap,
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    border-radius: 8px;
  }

  .table-wrap table.data {
    min-width: 720px;
  }

  #variantTable {
    min-width: 620px;
  }

  #poTable,
  #supplierTable,
  #tabPurchases table.data {
    min-width: 800px;
  }

  .order-items-table {
    min-width: 500px;
  }

  table.data th,
  table.data td {
    word-break: normal;
  }

  table.data th {
    white-space: nowrap;
  }

  /* Reviews Mobile Cards Transformation */
  #tabReviews .table-wrap {
    background: transparent;
    border: none;
    overflow-x: visible;
  }

  #tabReviews table.data {
    display: block;
    width: 100%;
    min-width: 0 !important;
    border: none;
  }

  #tabReviews thead {
    display: none;
  }

  #tabReviews tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  #tabReviews tr {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px;
    gap: 8px;
    margin-bottom: 0;
  }

  #tabReviews td {
    display: block;
    padding: 0;
    border: none;
    width: 100%;
  }

  #tabReviews td div[style*="max-width"] {
    max-width: 100% !important;
  }

  #tabReviews td:last-child {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
  }

  #tabReviews td:last-child .btn {
    width: 100%;
    justify-content: center;
  }

  /* Balance KPI Grids & Horizontal Filter Pills */
  .stats,
  .fin-stats,
  .po-stats,
  .coupon-stats,
  .review-stats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stat {
    padding: 10px 12px;
  }

  .stat b,
  .fin-stats .stat b,
  .po-stats .stat b {
    font-size: 1.15rem !important;
    word-break: break-word;
  }

  .stat-top {
    font-size: 0.8rem;
  }

  .pills {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .pills::-webkit-scrollbar {
    display: none;
  }

  .pill {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Action bars, filter inputs */
  .toolbar-filter,
  .order-actions-bar,
  .cust-stats-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .search-input,
  .select-filter {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .grid2 {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* Modals Layout & Z-Index Layering */
  .modal-content,
  .modal-card,
  .modal-card-lg {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
  }

  .modal-actions,
  .modal-card form > div:last-child,
  .modal form > div:last-child,
  .modal-actions-bar,
  .order-actions-bar {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px !important;
    width: 100%;
  }

  .modal-actions .btn,
  .modal-card form > div:last-child .btn,
  .modal form > div:last-child .btn,
  .modal-actions-bar .btn,
  .order-actions-bar .btn {
    width: 100%;
    justify-content: center;
  }

  #variantBuilderSection {
    width: 100%;
    box-sizing: border-box;
  }

  #variantBuilderSection .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    border-radius: 6px;
  }
}

/* ==========================================================================
   Kitchen Display System (KDS) & Thermal KOT Printing & Modifier Builder
   ========================================================================== */

/* KDS Header & Live Controls */
.kds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.kds-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.kds-refresh-indicator {
  font-size: 0.85rem;
  color: var(--color-muted);
  background: var(--color-surface);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.kds-btn-active {
  background: rgba(217, 119, 6, 0.12) !important;
  color: #b45309 !important;
  border: 1px solid rgba(217, 119, 6, 0.3) !important;
  font-weight: 700 !important;
}
.kds-err-msg {
  color: #dc2626;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* KDS Kanban 3 Columns Board */
.kds-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: flex-start;
}
@media (max-width: 1024px) {
  .kds-board {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.kds-col {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
}
.kds-col-header {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  background: var(--color-surface);
}
.kds-col-new .kds-col-header {
  border-bottom-color: #f59e0b;
}
.kds-col-cooking .kds-col-header {
  border-bottom-color: #2563eb;
}
.kds-col-ready .kds-col-header {
  border-bottom-color: #10b981;
}

.kds-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.kds-col-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.kds-badge-count {
  font-size: 0.82rem;
  padding: 3px 9px;
  border-radius: 12px;
  background: var(--color-border);
  font-weight: 800;
}
.kds-col-new .kds-badge-count {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}
.kds-col-cooking .kds-badge-count {
  background: rgba(37, 99, 235, 0.15);
  color: #1d4ed8;
}
.kds-col-ready .kds-badge-count {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.kds-cards-container {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.kds-empty-col {
  text-align: center;
  padding: 40px 16px;
  color: var(--color-muted);
  font-size: 0.9rem;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  margin: 10px 0;
  background: var(--color-surface);
}

/* KDS Order Card */
.kds-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kds-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.kds-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}
.kds-card-id-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.kds-order-id {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text);
}

/* Dining Mode Badge */
.kds-badge {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 700;
  white-space: nowrap;
}
.kds-mode-dine-in {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.25);
}
.kds-mode-pickup {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.kds-mode-delivery {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Elapsed Timer with Alert States */
.kds-elapsed-timer {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-family: monospace;
}
.kds-timer-normal {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}
.kds-timer-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
  border: 1px solid #f59e0b;
  animation: kdsPulse 2s infinite;
}
.kds-timer-alert {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
  border: 1px solid #ef4444;
  animation: kdsFastPulse 1s infinite;
}

@keyframes kdsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes kdsFastPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.kds-card-cust {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Items List */
.kds-card-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 0;
}
.kds-item-row {
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 6px;
}
.kds-item-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.kds-item-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.kds-item-qty {
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.kds-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.3;
}
.kds-item-sub {
  font-weight: normal;
  color: var(--color-muted);
  font-size: 0.8rem;
  margin-inline-start: 4px;
}

/* Modifiers Pills */
.kds-item-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  margin-inline-start: 28px;
}
.kds-mod-pill {
  font-size: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--color-text);
  font-weight: 600;
}

/* Chef Warning Instructions Box */
.kds-chef-warning {
  margin-top: 6px;
  margin-inline-start: 28px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 0.82rem;
  font-weight: 700;
}
.kds-order-notes {
  background: rgba(217, 119, 6, 0.08);
  border: 1px dashed #d97706;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #92400e;
}

/* Footer & Touch Bump Button */
.kds-card-footer {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}
.kds-print-btn {
  flex-shrink: 0;
  border: 1px solid var(--color-border) !important;
  font-weight: 700;
}
.kds-bump-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s ease, transform 0.1s ease;
  user-select: none;
}
.kds-bump-btn:active {
  transform: scale(0.98);
}
.kds-bump-start {
  background: #f59e0b;
  color: #fff;
}
.kds-bump-start:hover {
  background: #d97706;
}
.kds-bump-ready {
  background: #2563eb;
  color: #fff;
}
.kds-bump-ready:hover {
  background: #1d4ed8;
}
.kds-bump-done {
  background: #10b981;
  color: #fff;
}
.kds-bump-done:hover {
  background: #059669;
}
.kds-bump-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* 86 Sold Out Quick Toggle Button in Products Table */
.btn-avail-toggle {
  font-size: 0.78rem !important;
  padding: 4px 9px !important;
  border-radius: 20px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
.btn-avail-on {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
.btn-avail-on:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
.btn-avail-off {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}
.btn-avail-off:hover {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #047857 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* Modifiers Builder Cards */
.mod-groups-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mod-group-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
}
.mod-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 10px;
}
.mod-opt-row td {
  padding: 6px 8px !important;
}
.mod-opt-disabled {
  opacity: 0.6;
  background: rgba(0,0,0,0.02);
}

/* ==========================================================================
   Thermal POS Receipt (80mm / 58mm KOT) Stylesheet
   ========================================================================== */
.thermal-kot-receipt {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  .thermal-kot-receipt,
  .thermal-kot-receipt * {
    visibility: visible;
  }
  .thermal-kot-receipt {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 76mm;
    max-width: 80mm;
    margin: 0 auto;
    padding: 2mm;
    background: #fff;
    color: #000;
    font-family: "Courier New", Courier, monospace, "Cairo", sans-serif;
    font-size: 11pt;
    line-height: 1.25;
    direction: rtl;
  }

  .kot-ticket {
    width: 100%;
  }
  .kot-center {
    text-align: center;
  }
  .kot-brand {
    font-size: 14pt;
    font-weight: 900;
    margin: 0 0 2mm 0;
  }
  .kot-sub {
    font-size: 9pt;
    font-weight: bold;
  }
  .kot-divider {
    font-size: 9pt;
    letter-spacing: -1px;
    margin: 2mm 0;
    text-align: center;
    overflow: hidden;
  }
  .kot-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 10pt;
    margin-bottom: 2mm;
  }
  .kot-mode-banner {
    border: 2px solid #000;
    padding: 2mm;
    text-align: center;
    font-size: 13pt;
    font-weight: 900;
    margin: 2mm 0;
    background: #f0f0f0;
  }
  .kot-cust-info {
    font-size: 10pt;
    margin-bottom: 2mm;
  }
  .kot-items-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 10pt;
  }
  .kot-item-row {
    margin-bottom: 2mm;
    page-break-inside: avoid;
  }
  .kot-item-main {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 11pt;
  }
  .kot-item-qty {
    margin-inline-end: 2mm;
  }
  .kot-item-name {
    flex: 1;
  }
  .kot-item-price {
    margin-inline-start: 2mm;
  }
  .kot-mod-line {
    font-size: 9.5pt;
    padding-inline-start: 4mm;
  }
  .kot-chef-note {
    font-size: 9.5pt;
    font-weight: bold;
    padding-inline-start: 4mm;
  }
  .kot-special-box {
    border: 1px dashed #000;
    padding: 2mm;
    margin: 2mm 0;
  }
  .kot-special-title {
    font-weight: bold;
    font-size: 10pt;
    text-align: center;
  }
  .kot-special-text {
    font-size: 11pt;
    font-weight: bold;
    text-align: center;
    margin-top: 1mm;
  }
  .kot-summary {
    font-size: 10pt;
  }
  .kot-sum-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1mm;
  }
  .kot-sum-total {
    font-size: 12pt;
    font-weight: bold;
    border-top: 1px solid #000;
    padding-top: 1mm;
    margin-top: 1mm;
  }
  .kot-footer {
    font-size: 9pt;
    margin-top: 2mm;
    padding-bottom: 5mm;
  }
}
