:root {
  --primary: #FF5722;
  --dark: #1a1a1a;
  --light: #f4f4f4;
  --white: #fff;
  --gray: #666;
  --border: #ddd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  background: var(--light);
  height: 100vh;
  overflow: hidden;
}

/* Login */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--dark);
}

.login-container {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-header h1 {
  color: var(--primary);
  margin-bottom: 10px;
}

.login-header p {
  color: var(--gray);
  margin-bottom: 30px;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  contain: layout style;
}

.logo {
  padding: 14px 16px;
  font-size: 1.1rem;
  font-weight: bold;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-menu {
  flex: 1;
  padding: 12px 0;
}

.nav-link {
  display: block;
  padding: 10px 16px;
  color: #aaa;
  text-decoration: none;
  transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary);
  color: var(--white);
}

.nav-link i {
  margin-left: 10px;
  width: 20px;
}

.user-info {
  padding: 14px 16px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-title {
  font-size: 1.3rem;
  color: var(--dark);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--white);
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-card i {
  font-size: 1.6rem;
  color: var(--primary);
  opacity: 0.8;
}

.stat-info h3 {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 5px;
}

.stat-info span {
  font-size: 1.25rem;
  font-weight: bold;
}

/* Stat Card Color Variants */
.stat-card.stat-profit {
  border-right: 4px solid #10B981;
}

.stat-card.stat-profit i {
  color: #10B981;
}

.stat-card.stat-margin {
  border-right: 4px solid #8B5CF6;
}

.stat-card.stat-margin i {
  color: #8B5CF6;
}

.stat-card.stat-completed {
  border-right: 4px solid #22c55e;
}

.stat-card.stat-completed i {
  color: #22c55e;
}

.stat-card.stat-cancelled {
  border-right: 4px solid #EF4444;
}

.stat-card.stat-cancelled i {
  color: #EF4444;
}

.stat-card.stat-avg {
  border-right: 4px solid #3B82F6;
}

.stat-card.stat-avg i {
  color: #3B82F6;
}

/* Dashboard Chart Wrapper */
.dashboard-chart-wrapper {
  position: relative;
  height: 250px;
}

/* Peak Hours Badges */
.peak-hours-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.peak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #FEF2F2;
  color: #EF4444;
  font-size: 0.85rem;
  font-weight: 500;
}

.peak-badge i {
  color: #EF4444;
  font-size: 0.8rem;
}

/* Profit Products Table */
.profit-products-table {
  margin-top: 15px;
  overflow-x: auto;
}

.profit-products-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.profit-products-table th,
.profit-products-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--light);
}

.profit-products-table th {
  background: var(--light);
  font-weight: 600;
  color: var(--dark);
  font-size: 0.82rem;
}

.profit-products-table tr:hover {
  background: #f9fafb;
}

.profit-products-table .positive {
  color: #10B981;
  font-weight: 600;
}

.profit-products-table .negative {
  color: #EF4444;
  font-weight: 600;
}

.profit-products-table .rank-cell {
  width: 36px;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 768px) {
  .dashboard-chart-wrapper {
    height: 200px;
  }

  .peak-hours-badges {
    justify-content: center;
  }
}

/* Tables */
.table-container {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--light);
}

.data-table th {
  background: #f9f9f9;
  font-weight: 600;
}

.table-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 5px;
}

/* Forms & Buttons */
.form-group {
  margin-bottom: 14px;
  text-align: right;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}

.btn-secondary {
  background: var(--gray);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}

.custom-file-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  transition: filter 0.2s;
}
.custom-file-upload:hover {
  filter: brightness(1.1);
}
.custom-file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.custom-file-upload .file-name {
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
  margin-top: 4px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  will-change: transform, opacity;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  width: 460px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3 {
  margin-bottom: 14px;
}

.error-msg {
  color: #dc3545;
  margin-top: 10px;
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   Orders Management - Enhanced Styles
   ═══════════════════════════════════════════════════════════════ */

/* Orders Header */
.refresh-countdown {
  position: fixed;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(8px);
  color: #94a3b8;
  font-size: 12px;
  font-family: 'Tajawal', monospace;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  z-index: 999;
  direction: ltr;
  user-select: none;
  transition: opacity 0.3s;
}

.refresh-countdown i {
  font-size: 10px;
  opacity: 0.6;
}

.refresh-countdown:hover {
  opacity: 0.5;
}

.orders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.orders-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Filter Buttons */
.order-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Sound Toggle */
.sound-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #22c55e;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.sound-toggle-btn:hover {
  transform: scale(1.1);
}

.sound-toggle-btn.muted {
  background: #ef4444;
}

/* Orders Stats */
.orders-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.order-stat {
  background: var(--white);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-right: 4px solid var(--gray);
  transition: all 0.3s ease;
}

.order-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.order-stat.new {
  border-color: #3b82f6;
}

.order-stat.preparing {
  border-color: #f97316;
}

.order-stat.ready {
  border-color: #22c55e;
}

.order-stat.revenue {
  border-color: #d4a853;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--dark);
}

/* Batch Actions */
.batch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.btn-batch {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.1s;
}

.btn-batch:hover {
  background: #e64a19;
  transform: translateY(-1px);
}

.btn-batch:active {
  transform: translateY(0);
}

.btn-batch:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.batch-count {
  color: var(--gray);
  font-size: 0.85rem;
}

/* Orders Grid */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
  contain: layout style;
}

/* Order Card */
.order-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-right: 5px solid var(--gray);
  transition: all 0.3s ease;
  contain: layout style paint;
}

.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.order-card.new {
  border-color: #3b82f6;
}

.order-card.preparing {
  border-color: #f97316;
}

.order-card.ready {
  border-color: #22c55e;
}

.order-card.delivered {
  border-color: #7c3aed;
  opacity: 0.8;
}

.order-card.cancelled {
  border-color: #ef4444;
  opacity: 0.6;
}

/* Card Header */
.card-header {
  padding: 10px 12px;
  background: #f9f9f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-id {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.1rem;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.new {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-badge.preparing {
  background: #ffedd5;
  color: #c2410c;
}

.status-badge.ready {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.delivered {
  background: #f3e8ff;
  color: #7c3aed;
}

.status-badge.cancelled {
  background: #fee2e2;
  color: #dc2626;
}

/* Card Body */
.card-body {
  padding: 12px;
}

.customer-info {
  margin-bottom: 10px;
}

/* حالة التوصيل */
.order-driver-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.85rem;
  border: 1px solid #bae6fd;
}

.order-driver-status i {
  color: #0284c7;
}

.driver-name {
  font-weight: 600;
  color: #0369a1;
}

.delivery-status-badge {
  margin-right: auto;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.delivery-status-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.delivery-status-badge.driver_accepted {
  background: #dbeafe;
  color: #1d4ed8;
}

.delivery-status-badge.picked_up {
  background: #d1fae5;
  color: #065f46;
}

.delivery-status-badge.delivered {
  background: #a7f3d0;
  color: #047857;
}

.customer-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.customer-phone {
  color: #22c55e;
  font-weight: 500;
}

.customer-phone i {
  margin-left: 5px;
}

.order-type {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.order-type i {
  margin-left: 5px;
}

.order-address,
.order-car {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 5px;
}

.order-address i,
.order-car i {
  margin-left: 5px;
}

.order-items {
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.order-notes {
  padding: 10px;
  background: #fff3cd;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #856404;
  border-right: 3px solid #ffc107;
}

.order-notes i {
  margin-left: 5px;
  color: #ffc107;
}

/* Card Footer */
.card-footer {
  padding: 10px 12px;
  background: #fafafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.order-total {
  font-size: 1.2rem;
  font-weight: bold;
  color: #22c55e;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.btn-action i {
  margin-left: 5px;
}

.btn-next {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #22c55e;
}

.btn-next:hover {
  background: #22c55e;
  color: white;
}

.btn-cancel {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #ef4444;
}

.btn-cancel:hover {
  background: #ef4444;
  color: white;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 15px 25px;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease;
  pointer-events: auto;
}

.toast.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.toast.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast.info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.toast.warning {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.hide {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray);
  grid-column: 1 / -1;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
  display: block;
}

.empty-state h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--gray);
  grid-column: 1 / -1;
}

.loading-spinner i {
  margin-left: 10px;
}

/* New Order Animation */
@keyframes newOrderPulse {

  0%,
  100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
  }
}

.order-card.new-arrival {
  animation: newOrderPulse 1s ease 3;
}

/* Stat Highlight Animation */
@keyframes statPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.order-stat.highlight {
  animation: statPulse 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .orders-grid {
    grid-template-columns: 1fr;
  }

  .orders-header {
    flex-direction: column;
    align-items: stretch;
  }

  .orders-controls {
    justify-content: space-between;
  }

  .order-filters {
    flex-wrap: wrap;
    justify-content: center;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .orders-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Inventory Management
   ═══════════════════════════════════════════════════════════════ */

.inventory-category-section {
  margin-bottom: 30px;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.inventory-category-header {
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inventory-category-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.inventory-list {
  padding: 0;
}

.inventory-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--light);
  gap: 14px;
  transition: background 0.2s;
}

.inventory-item:last-child {
  border-bottom: none;
}

.inventory-item:hover {
  background: #fdfdfd;
}

.inv-item-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.inv-item-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}

.inv-item-details h4 {
  margin-bottom: 5px;
  color: var(--dark);
}

.inv-item-price {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Toggle Switch */
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch input {
  display: none;
}

.slider {
  position: relative;
  width: 46px;
  height: 24px;
  background-color: #ccc;
  border-radius: 24px;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}

input:checked+.slider {
  background-color: #22c55e;
}

input:checked+.slider:before {
  transform: translateX(22px);
}

/* Search Box */
.search-box {
  position: relative;
  width: 300px;
}

.search-box i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
}

.search-box input {
  width: 100%;
  padding: 10px 35px 10px 15px;
  border: 1px solid var(--border);
  border-radius: 20px;
  outline: none;
  transition: border-color 0.3s;
}

.search-box input:focus {
  border-color: var(--primary);
}



/* ═══════════════════════════════════════════════════════════════
   Dashboard Sections - Best Sellers & Low Stock
   ═══════════════════════════════════════════════════════════════ */

.dashboard-section {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-top: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-section.warning-section {
  border-right: 4px solid #f97316;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--light);
}

.section-header h3 {
  font-size: 1.1rem;
  color: var(--dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h3 i {
  color: var(--primary);
}

.warning-section .section-header h3 i {
  color: #f97316;
}

/* Period Filter */
.period-filter {
  display: flex;
  gap: 8px;
}

.period-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.period-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.period-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Best Sellers List */
.best-sellers-list {
  max-height: 350px;
  overflow-y: auto;
}

.best-seller-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--light);
  transition: background 0.2s;
}

.best-seller-item:last-child {
  border-bottom: none;
}

.best-seller-item:hover {
  background: #f9f9f9;
  padding-right: 10px;
  margin-right: -10px;
  padding-left: 10px;
  margin-left: -10px;
}

.best-seller-item .rank {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), #ff7043);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  margin-left: 12px;
}

.best-seller-item:nth-child(1) .rank {
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.best-seller-item:nth-child(2) .rank {
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}

.best-seller-item:nth-child(3) .rank {
  background: linear-gradient(135deg, #c2883f, #a16207);
}

.best-seller-item .name {
  flex: 1;
  font-weight: 500;
}

.best-seller-item .quantity {
  color: var(--gray);
  font-size: 0.9rem;
  margin-left: 15px;
}

.best-seller-item .revenue {
  font-weight: bold;
  color: #22c55e;
  min-width: 70px;
  text-align: left;
}

/* Low Stock List */
.low-stock-list {
  max-height: 250px;
  overflow-y: auto;
}

.low-stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #fff7ed;
  border-radius: 8px;
  margin-bottom: 8px;
  border-right: 3px solid #fb923c;
}

.low-stock-item:last-child {
  margin-bottom: 0;
}

.low-stock-item.critical {
  background: #fef2f2;
  border-right-color: #ef4444;
}

.low-stock-item .name {
  font-weight: 500;
}

.low-stock-item .stock {
  background: #fff;
  padding: 4px 12px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 0.85rem;
  color: #f97316;
}

.low-stock-item.critical .stock {
  color: #ef4444;
}

/* Resource Alerts (Dashboard) */
#resourceAlertsList {
  max-height: 300px;
  overflow-y: auto;
}

.resource-alert-section {
  margin-bottom: 12px;
}

.resource-alert-section:last-child {
  margin-bottom: 0;
}

.resource-alert-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.resource-alert-title i {
  margin-left: 6px;
}

.resource-alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.resource-alert-item:last-child {
  margin-bottom: 0;
}

.resource-alert-item.low-unused {
  background: #fef3c7;
  border-right: 3px solid #f59e0b;
}

.resource-alert-item.surplus {
  background: #ecfdf5;
  border-right: 3px solid #10b981;
}

.resource-alert-item .name {
  font-weight: 500;
}

.resource-alert-item .stock {
  background: #fff;
  padding: 4px 12px;
  border-radius: 15px;
  font-weight: bold;
  font-size: 0.85rem;
}

.resource-alert-item.low-unused .stock {
  color: #f59e0b;
}

.resource-alert-item.surplus .stock {
  color: #10b981;
}

/* Inventory - Unused Stock & Schedule Modals */
.inv-stat-mini {
  flex: 1;
  text-align: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 8px;
}

.inv-stat-mini label {
  display: block;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 2px;
}

.inv-stat-mini strong {
  font-size: 0.95rem;
  color: #333;
}

.unused-tab-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.unused-tab-btn {
  flex: 1;
  padding: 8px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: center;
  transition: all 0.2s;
}

.unused-tab-btn.active {
  border-color: var(--primary);
  background: #fff5f2;
  color: var(--primary);
  font-weight: 600;
}

.schedule-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.85rem;
}

.schedule-item-actions {
  display: flex;
  gap: 6px;
}

.schedule-item-actions button {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
}

/* Material card unused stock row */
.inv-unused-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: #f0fdf4;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-top: 4px;
}

.inv-card-schedule-btn,
.inv-card-warehouse-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: opacity 0.2s;
}

.inv-card-warehouse-btn {
  background: #e0f2fe;
  color: #0284c7;
}

.inv-card-schedule-btn {
  background: #f3e8ff;
  color: #7c3aed;
}

.inv-card-warehouse-btn:hover,
.inv-card-schedule-btn:hover {
  opacity: 0.8;
}

/* Empty State for Dashboard Sections */
.dashboard-section .empty-state {
  padding: 30px;
  font-size: 0.95rem;
}

.dashboard-section .empty-state i {
  font-size: 2rem;
  margin-bottom: 10px;
}

.dashboard-section .empty-state.success {
  color: #22c55e;
}

.dashboard-section .empty-state.success i {
  color: #22c55e;
}

/* Loading Spinner for Dashboard Sections */
.dashboard-section .loading-spinner {
  padding: 30px;
}

@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .period-filter {
    width: 100%;
    justify-content: center;
  }

  .best-seller-item {
    flex-wrap: wrap;
    gap: 5px;
  }

  .best-seller-item .quantity,
  .best-seller-item .revenue {
    font-size: 0.8rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Customers Management Styles
   ═══════════════════════════════════════════════════════════════ */

/* Stats Grid للزبائن */
.customers-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.customer-stat {
  background: var(--white);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 15px;
}

.customer-stat i {
  font-size: 1.5rem;
  color: var(--primary);
  opacity: 0.8;
}

/* Controls */
.customers-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Filters */
.customers-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--white);
  padding: 15px;
  border-radius: 10px;
}

.customers-filters .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customers-filters label {
  color: var(--gray);
  font-size: 0.9rem;
}

.customers-filters select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
}

/* Customer Table Specific */
.customer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #ff7043);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}

.customer-info-cell {
  display: flex;
  flex-direction: column;
}

.customer-name {
  font-weight: 600;
  color: var(--dark);
}

.customer-id {
  font-size: 11px;
  color: var(--gray);
  font-family: monospace;
}

/* Status Badge */
.customer-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.customer-status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.customer-status-badge.blocked {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.customer-status-badge.suspicious {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

/* Action Buttons */
.customer-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn-success {
  background: #22c55e;
  color: white;
}

.btn-warning {
  background: #f97316;
  color: white;
}

.btn-info {
  background: #3b82f6;
  color: white;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.text-success {
  color: #22c55e;
}

/* Pagination */
.customers-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.customers-pagination .page-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.customers-pagination .page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.customers-pagination .page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.customers-pagination .page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.customers-pagination .page-info {
  color: var(--gray);
  font-size: 0.9rem;
  padding: 0 10px;
}

/* Modal Large */
.modal-large {
  width: 640px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray);
  cursor: pointer;
}

.btn-close:hover {
  color: #ef4444;
}

/* Customer Detail Modal */
.customer-detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--light);
  margin-bottom: 20px;
}

.customer-detail-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #ff7043);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 28px;
  flex-shrink: 0;
}

.customer-detail-info h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.customer-id-detail {
  font-size: 11px;
  color: var(--gray);
  font-family: monospace;
  margin-top: 5px;
}

/* Customer Stats in Detail */
.customer-stats-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.customer-stats-detail .stat-item {
  background: var(--light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.customer-stats-detail .stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 5px;
}

.customer-stats-detail .stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
}

/* Tabs */
.customer-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--light);
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: var(--light);
  color: var(--dark);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.customer-tab-content {
  display: none;
}

.customer-tab-content.active {
  display: block;
}

/* Customer Order Item */
.customer-order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--light);
  border-radius: 8px;
  margin-bottom: 8px;
}

.customer-order-item .order-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-order-item .order-id {
  font-weight: bold;
  color: var(--primary);
}

.customer-order-item .order-date {
  font-size: 0.8rem;
  color: var(--gray);
}

.customer-order-item .order-total {
  font-size: 1.1rem;
  font-weight: bold;
  color: #22c55e;
}

/* Notes List */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-item {
  background: var(--light);
  padding: 15px;
  border-radius: 8px;
  border-right: 3px solid var(--primary);
}

.note-content {
  margin-bottom: 10px;
  line-height: 1.6;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray);
}

/* Block History */
.block-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-item {
  background: var(--light);
  padding: 15px;
  border-radius: 8px;
  border-right: 4px solid;
}

.block-item.blocked {
  border-color: #ef4444;
}

.block-item.unblocked {
  border-color: #22c55e;
}

.block-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 10px;
}

/* Warning Text */
.warning-text {
  color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Empty Message */
.empty-message {
  text-align: center;
  color: var(--gray);
  padding: 20px;
}

/* Responsive for Customers */
@media (max-width: 768px) {
  .customers-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .customers-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .customers-filters .filter-group {
    width: 100%;
  }

  .customers-filters select {
    flex: 1;
  }

  .customer-avatar {
    display: none;
  }

  .customer-actions {
    flex-wrap: wrap;
  }

  .customers-table th:nth-child(2),
  .customers-table td:nth-child(2),
  .customers-table th:nth-child(6),
  .customers-table td:nth-child(6) {
    display: none;
  }

  .customer-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .customer-stats-detail {
    grid-template-columns: repeat(2, 1fr);
  }

  .customer-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   📊 Reports Section - قسم التقارير
   ════════════════════════════════════════════════════════════════════════════ */

/* بطاقات التقارير السريعة */
.reports-quick-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}

.report-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px 20px;
  min-height: 140px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.report-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.report-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFF3E0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.report-card-icon i {
  font-size: 24px;
  color: #FF5722;
}

.report-card-icon.profit {
  background: #E8F5E9;
}

.report-card-icon.profit i {
  color: #4CAF50;
}

.report-card-icon.inventory {
  background: #ECEFF1;
}

.report-card-icon.inventory i {
  color: #607D8B;
}

.report-card-icon.customers {
  background: #F3E5F5;
}

.report-card-icon.customers i {
  color: #8E24AA;
}

.report-card-icon.bestsellers {
  background: #FFF8E1;
}

.report-card-icon.bestsellers i {
  color: #FF9800;
}

.report-card-icon.monthly {
  background: #ECEFF1;
}

.report-card-icon.monthly i {
  color: #607D8B;
}

.report-card-icon.weekly {
  background: #E0F7FA;
}

.report-card-icon.weekly i {
  color: #00BCD4;
}

.report-card-icon.yearly {
  background: #E8EAF6;
}

.report-card-icon.yearly i {
  color: #3F51B5;
}

.report-card-icon.salaries {
  background: #F3E5F5;
}

.report-card-icon.salaries i {
  color: #8E24AA;
}

.report-card h4 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: 17px;
  font-weight: 700;
}

.report-card p {
  margin: 0;
  color: #888;
  font-size: 13px;
  line-height: 1.5;
}

.report-card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

/* أزرار فلتر الفترة في تقرير الطلبيات */
.btn-period-filter {
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #555;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-period-filter:hover {
  background: #f5f5f5;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-period-filter.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-period-filter:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* بادجات الحالة في تقرير الطلبيات */
.status-badge-info {
  background: #e3f2fd;
  color: #1565C0;
}

.status-badge-warning {
  background: #fff3e0;
  color: #E65100;
}

.status-badge-success {
  background: #e8f5e9;
  color: #2E7D32;
}

.status-badge-primary {
  background: #ede7f6;
  color: #4527A0;
}

.status-badge-danger {
  background: #ffebee;
  color: #C62828;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: #f5f5f5;
  color: var(--gray);
}

.btn-icon:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

/* قسم التقرير المخصص */
.custom-report-section {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.custom-report-section h3 {
  margin: 0 0 20px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-report-section h3 i {
  color: var(--primary);
}

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.filter-group {
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--gray);
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary);
}

/* منطقة عرض التقرير */
.report-preview {
  background: var(--white);
  border-radius: 12px;
  padding: 25px;
  min-height: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.report-placeholder {
  text-align: center;
  padding: 100px 20px;
  color: #ccc;
}

.report-placeholder i {
  font-size: 80px;
  margin-bottom: 20px;
}

.report-placeholder p {
  font-size: 18px;
}

.report-loading {
  text-align: center;
  padding: 100px 20px;
  color: var(--primary);
  font-size: 18px;
}

.report-loading i {
  font-size: 40px;
  margin-bottom: 15px;
  display: block;
}

.report-error {
  text-align: center;
  padding: 60px 20px;
  color: #C62828;
  font-size: 16px;
}

.report-error i {
  font-size: 50px;
  margin-bottom: 15px;
  display: block;
}

/* ═══ تحليل مفصل ═══ */
.detailed-analysis-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  padding: 20px;
  margin-top: 20px;
}

.detailed-analysis-section h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detailed-analysis-section h3 i {
  color: var(--primary, #FF5722);
}

.analysis-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
}

.analysis-tab {
  padding: 8px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analysis-tab:hover {
  border-color: var(--primary, #FF5722);
  color: var(--primary, #FF5722);
}

.analysis-tab.active {
  background: var(--primary, #FF5722);
  border-color: var(--primary, #FF5722);
  color: #fff;
}

.analysis-controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.analysis-controls .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analysis-controls .filter-group label {
  font-size: 0.82rem;
  color: #666;
  font-weight: 600;
}

.analysis-controls .filter-group input[type="date"] {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}

.hourly-table .empty-hour td {
  color: #bbb;
}

.hour-bar-container {
  width: 100%;
  height: 18px;
  background: #f3f4f6;
  border-radius: 9px;
  overflow: hidden;
  min-width: 80px;
}

.hour-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary, #FF5722), #ff8a65);
  border-radius: 9px;
  transition: width 0.3s;
  min-width: 0;
}

@media (max-width: 600px) {
  .analysis-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .analysis-tabs {
    flex-direction: column;
  }
}

/* محتوى التقرير */
.report-content {
  direction: rtl;
}

.report-title {
  text-align: center;
  color: #2E7D32;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #2E7D32;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
}

.summary-item {
  text-align: center;
  min-width: 0;
  flex: 1 1 120px;
  padding: 10px;
  overflow: hidden;
}

.summary-item.highlight {
  background: #E8F5E9;
  border-radius: 8px;
}

.summary-label {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 5px;
}

.summary-value {
  font-size: clamp(13px, 1.6vw, 22px);
  font-weight: bold;
  color: #2E7D32;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

.summary-value.positive {
  color: #2E7D32;
}

.summary-value.negative {
  color: #C62828;
}

.summary-value.warning {
  color: #F57C00;
}

/* جداول التقارير */
.report-content h4 {
  margin: 25px 0 15px;
  color: var(--dark);
  font-size: 16px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.report-table th {
  background: #2E7D32;
  color: white;
  padding: 12px 10px;
  text-align: right;
  font-weight: 500;
  font-size: 13px;
}

.report-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.report-table tr:nth-child(even) {
  background: #f9f9f9;
}

.report-table tr:hover {
  background: #f0f0f0;
}

.report-table .positive {
  color: #2E7D32;
  font-weight: 500;
}

.report-table .negative {
  color: #C62828;
  font-weight: 500;
}

.report-table .rank {
  font-weight: bold;
  color: #D4AF37;
}

.status-available {
  color: #2E7D32;
  font-weight: bold;
}

.status-low {
  color: #F57C00;
  font-weight: bold;
}

.status-out {
  color: #C62828;
  font-weight: bold;
}

/* بادج الفترة الزمنية */
.period-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  color: white;
}

.period-daily {
  background: linear-gradient(135deg, #FF5722, #FF9800);
}

.period-weekly {
  background: linear-gradient(135deg, #00BCD4, #0097A7);
}

.period-monthly {
  background: linear-gradient(135deg, #607D8B, #78909C);
}

.period-yearly {
  background: linear-gradient(135deg, #3F51B5, #5C6BC0);
}

/* بادج حالة الراتب */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.status-badge.positive {
  background: #2E7D32;
  color: white;
}

.status-badge.warning {
  background: #F57C00;
  color: white;
}

.status-badge.negative {
  background: #C62828;
  color: white;
}

/* ملاحظة تقرير فارغ */
.report-empty-note {
  text-align: center;
  padding: 30px 20px;
  background: #FFF3E0;
  border: 1px solid #FFE0B2;
  border-radius: 12px;
  color: #E65100;
  margin: 20px 0;
}

.report-empty-note i {
  font-size: 30px;
  margin-bottom: 10px;
  display: block;
}

.report-empty-note p {
  font-size: 14px;
  line-height: 1.8;
}

/* تحسين جدول التقرير - tfoot */
.report-table tfoot td {
  border-top: 2px solid #2E7D32;
  padding: 12px;
}

/* إحصائيات نوع الطلب */
.order-type-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.type-stat {
  flex: 1;
  text-align: center;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 8px;
}

.type-stat i {
  font-size: 28px;
  color: #2E7D32;
  margin-bottom: 10px;
  display: block;
}

.type-label {
  display: block;
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 5px;
}

.type-count {
  font-size: 20px;
  font-weight: bold;
  color: var(--dark);
  display: block;
}

.type-revenue {
  font-size: 14px;
  color: #2E7D32;
}

/* أزرار التصدير */
.report-export-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.btn-success {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-success:hover {
  background: #43A047;
  transform: translateY(-2px);
}

.btn-danger {
  background: #F44336;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #E53935;
  transform: translateY(-2px);
}

/* Responsive للتقارير */
@media (max-width: 768px) {
  .reports-quick-cards {
    grid-template-columns: 1fr;
  }

  .report-filters {
    flex-direction: column;
  }

  .filter-group {
    min-width: 100%;
  }

  .report-summary {
    flex-direction: column;
  }

  .summary-item {
    min-width: 100%;
  }

  .order-type-stats {
    flex-direction: column;
  }

  .report-export-actions {
    flex-direction: column;
  }

  .report-table {
    font-size: 11px;
  }

  .report-table th,
  .report-table td {
    padding: 8px 5px;
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* Accounting Section - قسم الحسابات */
/* ═══════════════════════════════════════════════════════════════ */

/* تبويبات التحليل */
.accounting-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  background: var(--white);
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.acc-tab-btn {
  padding: 10px 20px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-tab-btn:hover {
  background: var(--light);
  color: var(--dark);
}

.acc-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

.acc-tab-content {
  display: none;
}

.acc-tab-content.active {
  display: block;
}

/* بطاقة معلومات نطاق الطلبيات */
.order-range-info {
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  border: 1px solid #C7D2FE;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
}

.range-info-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4338CA;
  font-weight: 500;
  font-size: 0.95rem;
}

.range-info-content i {
  font-size: 1.2rem;
}

/* تمييز عمود الذروة في الرسم البياني */
.peak-bar-highlight {
  background: rgba(239, 68, 68, 0.8) !important;
}

/* فلاتر التحليل */
.accounting-filters {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-group label {
  font-weight: 500;
  color: var(--dark);
}

.filter-select,
.filter-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
}

/* بطاقات الملخص */
.accounting-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.accounting-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 15px;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.accounting-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.accounting-card.revenue {
  border-right: 4px solid #10B981;
}

.accounting-card.cost {
  border-right: 4px solid #F59E0B;
}

.accounting-card.profit {
  border-right: 4px solid #6366F1;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
}

.accounting-card.profit .card-icon,
.accounting-card.profit .card-label {
  color: white;
  opacity: 0.9;
}

.accounting-card.margin {
  border-right: 4px solid #8B5CF6;
}

.card-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.card-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.card-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 5px;
}

.card-value {
  font-size: 1.5rem;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.card-trend {
  font-size: 0.85rem;
  margin-top: 5px;
}

.card-trend.positive {
  color: #10B981;
}

.card-trend.negative {
  color: #EF4444;
}

/* قسم الرسوم البيانية */
.charts-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.chart-container {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-container h3 {
  margin-bottom: 15px;
  color: var(--dark);
  font-size: 1.1rem;
}

.chart-container canvas {
  max-height: 300px;
}

/* أزرار تبديل أوقات الذروة */
.peak-times-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.peak-toggle-btn {
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--gray);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.peak-toggle-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.peak-toggle-btn:hover:not(.active) {
  background: var(--light);
}

/* نطاق الطلبيات */
.order-range-filter input[type="number"] {
  width: 120px;
}

/* تحليل أنواع الطلبات */
.order-types-analysis {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.order-types-analysis h3 {
  margin-bottom: 20px;
  color: var(--dark);
}

.order-types-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.order-type-card {
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s;
  cursor: pointer;
}

.order-type-card:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.order-type-card.most-popular {
  background: linear-gradient(135deg, #FCD34D, #F59E0B);
  border-color: #D97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.order-type-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.order-type-card.most-popular i {
  color: #78350F;
}

.type-name {
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--dark);
}

.type-count {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--dark);
}

.type-percentage {
  color: var(--gray);
  margin-top: 5px;
  font-size: 0.9rem;
}

.most-popular {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  border-right: 4px solid #F59E0B;
}

.most-popular i {
  color: #F59E0B;
  margin-left: 8px;
}

.most-popular strong {
  color: var(--primary);
  font-size: 1.1rem;
}

/* جدول الربحية */
.profitability-table-section {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profitability-table-section h3 {
  margin-bottom: 15px;
}

.profitability-table-section .text-center {
  text-align: center;
  color: var(--gray);
  padding: 30px;
}

/* صف الإجمالي في جدول الربحية */
.profitability-totals-row {
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF) !important;
  font-weight: bold;
  border-top: 2px solid #6366F1;
}

.profitability-totals-row td {
  color: #4338CA;
  font-weight: 700;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* صف أعلى ربح */
.best-period-row {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5) !important;
}

.best-period-row td:first-child::before {
  content: '⭐ ';
}

/* بطاقتا عدد الطلبات ومتوسط القيمة */
.accounting-card.orders-count {
  border-right: 4px solid #3B82F6;
}

.accounting-card.avg-order {
  border-right: 4px solid #F97316;
}

/* ملخص أوقات الذروة */
.peak-summary-section {
  margin-bottom: 20px;
}

.peak-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.peak-summary-card {
  background: var(--white);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border-right: 3px solid transparent;
}

.peak-card-rush {
  border-right-color: #EF4444;
}

.peak-card-busiest {
  border-right-color: #F59E0B;
}

.peak-card-quietest {
  border-right-color: #6B7280;
}

.peak-card-avg {
  border-right-color: #6366F1;
}

.peak-card-icon {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
}

.peak-card-rush .peak-card-icon {
  color: #EF4444;
}

.peak-card-busiest .peak-card-icon {
  color: #F59E0B;
}

.peak-card-quietest .peak-card-icon {
  color: #6B7280;
}

.peak-card-avg .peak-card-icon {
  color: #6366F1;
}

.peak-card-content {
  flex: 1;
}

.peak-card-label {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 3px;
}

.peak-card-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
}

/* مصادر الطلبات */
.source-breakdown-section {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.source-breakdown-section h3 {
  margin-bottom: 15px;
  color: var(--dark);
}

.source-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.source-card {
  background: var(--light);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-right: 3px solid var(--gray);
  transition: transform 0.2s;
}

.source-card:hover {
  transform: translateY(-2px);
}

.source-icon {
  font-size: 1.5rem;
}

.source-info {
  flex: 1;
}

.source-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 2px;
}

.source-count {
  font-size: 0.85rem;
  color: var(--gray);
}

.source-revenue {
  font-size: 0.85rem;
  font-weight: 600;
  color: #10B981;
  margin-top: 2px;
}

/* شاشة التحميل */
.accounting-loading-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  margin-bottom: 20px;
}

.accounting-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-size: 1rem;
}

.accounting-loading-spinner i {
  font-size: 2rem;
}

/* شريط حالة الكاش */
.accounting-cache-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--dark);
  border-radius: 8px;
  padding: 8px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #ccc;
  gap: 12px;
}

.cache-status-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.cache-status-content i {
  font-size: 1rem;
  transition: color 0.3s;
}

.cache-status-content i.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cache-status-content.from-server i {
  color: #10B981;
}

.cache-status-content.from-cache i {
  color: #F59E0B;
}

.cache-countdown {
  color: #999;
  font-size: 0.8rem;
  margin-right: auto;
}

.cache-refresh-btn {
  background: none;
  border: 1px solid #555;
  color: #ccc;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.cache-refresh-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Responsive - بطاقات الملخص 6 أعمدة */
@media (max-width: 1200px) {
  .accounting-summary-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .peak-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .peak-summary-cards {
    grid-template-columns: 1fr;
  }

  .source-cards {
    grid-template-columns: 1fr;
  }
}

/* أزرار التصدير */
.export-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s;
}

.btn i {
  margin-left: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-success {
  background: #10B981;
  color: white;
}

.btn-danger {
  background: #EF4444;
  color: white;
}

.btn-secondary {
  background: var(--gray);
  color: white;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive - Accounting */
@media (max-width: 768px) {
  .accounting-tabs {
    flex-direction: column;
  }

  .acc-tab-btn {
    justify-content: center;
  }

  .accounting-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-section {
    grid-template-columns: 1fr;
  }

  .accounting-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }

  .export-actions {
    flex-direction: column;
  }

  .order-types-cards {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ملاحظات الطلب - Voice Notes & Text Notes
   ═══════════════════════════════════════════════════════════════════ */

.order-notes {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-soft, #f9fafb);
  border-radius: 8px;
}

.order-notes strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-primary, #111827);
}

/* مشغل الملاحظة الصوتية */
.voice-note-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.voice-note-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #d97706) 0%, #b45309 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-note-icon i {
  font-size: 1.1rem;
}

.voice-note-player audio {
  flex: 1;
  height: 36px;
  max-width: 300px;
}

.voice-note-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.voice-note-duration {
  font-size: 0.85rem;
  color: var(--primary, #f59e0b);
  font-weight: 600;
}

.voice-note-size {
  font-size: 0.75rem;
  color: var(--text-secondary, #6b7280);
  flex-shrink: 0;
  font-weight: 500;
}

/* رسالة تحميل الصوت */
.audio-loading-msg {
  width: 100%;
  text-align: center;
  padding: 6px 10px;
  margin-top: 8px;
  background: #fef3cd;
  color: #856404;
  border-radius: 6px;
  font-size: 0.82rem;
  animation: fadeIn 0.3s ease;
}

.audio-loading-msg.error {
  background: #f8d7da;
  color: #721c24;
}

.audio-loading-msg i {
  margin-left: 6px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ملاحظات نصية */
.text-notes {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: white;
  border-radius: 8px;
  align-items: flex-start;
}

.text-notes i {
  color: var(--primary, #d97706);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.text-notes span {
  color: var(--text-primary, #111827);
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Responsive - Voice Notes */
@media (max-width: 480px) {
  .voice-note-player {
    flex-wrap: wrap;
  }

  .voice-note-player audio {
    width: 100%;
    max-width: 100%;
  }

  .voice-note-size {
    width: 100%;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════
   Cashier Page Styles
   ═══════════════════════════════════════════════════════════*/

.cashier-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--light);
}

.cashier-header {
  background: var(--dark);
  color: var(--white);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cashier-header .logo {
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cashier-header .logo i {
  color: var(--accent);
  font-size: 1.5rem;
}

.cashier-header .user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cashier-header .user-info span {
  font-size: 0.95rem;
  font-weight: 500;
}

.cashier-header .user-info button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cashier-header .user-info button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cashier-main {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

/* إخفاء زر حذف السجل في صفحة الكاشير */
.cashier-container .btn-danger[onclick*="clearAllOrders"] {
  display: none !important;
}


/* Responsive - Cashier */
@media (max-width: 768px) {
  .cashier-main {
    padding: 15px;
  }

  .cashier-header {
    padding: 12px 15px;
  }

  .cashier-header .logo {
    font-size: 1rem;
  }

  .cashier-header .logo i {
    font-size: 1.2rem;
  }

  .cashier-header .user-info {
    gap: 10px;
  }

  .cashier-header .user-info span {
    display: none;
  }

  .cashier-header .user-info button {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .cashier-header .logo span {
    font-size: 0.85rem;
  }

  .orders-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .orders-controls {
    flex-direction: column;
    gap: 10px;
  }

  .order-filters {
    width: 100%;
    justify-content: space-between;
  }

  .filter-btn {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}

/* ═══════════════════════════════════════════════════════════════ */
/* أزرار التصدير - طباعة وExcel                                   */
/* ═══════════════════════════════════════════════════════════════ */

.btn-export {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Tajawal', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 500;
}

.btn-export:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-export.btn-print {
  background: #6366F1;
}

.btn-export.btn-print:hover {
  background: #4F46E5;
}

.btn-export.btn-excel {
  background: #10B981;
}

.btn-export.btn-excel:hover {
  background: #059669;
}

.btn-export i {
  font-size: 15px;
}

@media (max-width: 768px) {
  .report-export-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-export {
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Offers Management - إدارة العروض والخصومات
   ═══════════════════════════════════════════════════════════════ */

/* إحصائيات العروض */
.offers-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.offer-stat {
  background: var(--white);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-right: 4px solid var(--gray);
  transition: all 0.3s ease;
}

.offer-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.offer-stat.active-stat {
  border-color: #22c55e;
}

.offer-stat.upcoming-stat {
  border-color: #3b82f6;
}

.offer-stat.expired-stat {
  border-color: #9ca3af;
}

/* أزرار الفلترة */
.offers-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.offer-filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
}

.offer-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.offer-filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* شبكة العروض */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* بطاقة العرض */
.offer-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.offer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.offer-card-image {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: #f3f4f6;
}

.offer-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-card-image .discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 2;
}

.discount-badge.small {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.discount-badge.medium {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.discount-badge.big {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: discountPulse 2s ease-in-out infinite;
}

@keyframes discountPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

.offer-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.offer-status-badge.status-active {
  background: #dcfce7;
  color: #15803d;
}

.offer-status-badge.status-upcoming {
  background: #dbeafe;
  color: #1d4ed8;
}

.offer-status-badge.status-expired {
  background: #f3f4f6;
  color: #6b7280;
}

.offer-card-body {
  padding: 15px;
}

.offer-card-body h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--dark);
}

.offer-prices {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.original-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.95rem;
}

.discounted-price {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.15rem;
}

.offer-dates {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 10px;
}

.offer-dates i {
  margin-left: 4px;
}

.offer-card-actions {
  display: flex;
  gap: 6px;
  padding: 10px 15px;
  border-top: 1px solid var(--light);
  background: #fafafa;
}

.offer-card-actions button {
  flex: 1;
  padding: 6px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.offer-card-actions .btn-toggle-offer {
  background: #dcfce7;
  color: #15803d;
}

.offer-card-actions .btn-toggle-offer.disabled-offer {
  background: #fee2e2;
  color: #dc2626;
}

.offer-card-actions .btn-edit-offer {
  background: #e0f2fe;
  color: #0369a1;
}

.offer-card-actions .btn-remove-offer {
  background: #fee2e2;
  color: #dc2626;
}

.offer-card-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* مودال اختيار المنتجات */
.product-select-search {
  margin-bottom: 10px;
}

.product-select-search input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.product-select-container {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}

.product-select-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.product-select-item:hover {
  background: var(--light);
}

.product-select-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.product-select-item img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.product-select-item .product-select-info {
  flex: 1;
}

.product-select-item .product-select-info .name {
  font-weight: 500;
  font-size: 0.9rem;
}

.product-select-item .product-select-info .price {
  font-size: 0.8rem;
  color: var(--gray);
}

/* مؤشر مستوى الخصم */
.discount-level-indicator {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.discount-level-indicator.level-small {
  background: #dcfce7;
  color: #15803d;
}

.discount-level-indicator.level-medium {
  background: #ffedd5;
  color: #c2410c;
}

.discount-level-indicator.level-big {
  background: #fee2e2;
  color: #dc2626;
}

/* مبدل نوع الخصم */
.discount-type-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border, #e5e7eb);
}
.discount-type-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: var(--white, #fff);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s;
    color: #666;
}
.discount-type-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}
.discount-type-btn:hover:not(.active) {
    background: #f3f4f6;
}

/* معاينة العرض */
.offer-preview {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.offer-preview h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--dark);
}

.offer-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.offer-preview-item:last-child {
  border-bottom: none;
}

.offer-preview-item .preview-name {
  font-weight: 500;
}

.offer-preview-item .preview-prices {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Responsive للعروض */
@media (max-width: 768px) {
  .offers-grid {
    grid-template-columns: 1fr;
  }

  .offers-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Addons Management - إدارة الإضافات
   ═══════════════════════════════════════════════════════════════ */

.addons-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.addons-filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.addons-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.addons-filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.addons-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.addons-product-card {
  background: var(--white);
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.addons-product-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.addons-product-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.2);
}

.addons-product-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}

.addons-product-name {
  padding: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.addon-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.addon-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.addon-card-image {
  height: 140px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.addon-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.addon-card-placeholder {
  color: #ccc;
  font-size: 2.5rem;
}

.addon-card-body {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.addon-card-body h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--dark);
}

.addon-card-price {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.05rem;
}

.addon-card-status {
  font-size: 0.8rem;
  font-weight: 600;
}

.addon-card-status.available {
  color: #22c55e;
}

.addon-card-status.unavailable {
  color: #ef4444;
}

.addon-card-actions {
  padding: 10px 15px;
  border-top: 1px solid var(--light);
  display: flex;
  gap: 8px;
  background: #fafafa;
}

.addon-card-actions button {
  flex: 1;
}

.addon-image-preview {
  margin-top: 10px;
  text-align: center;
}

.addon-image-preview img {
  max-width: 150px;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .addons-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .addons-product-img {
    height: 80px;
  }

  .addons-filter-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .addons-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ═══════════════════════════════════════════════════════════════
   Order View Modes & History Styles
   ═══════════════════════════════════════════════════════════════ */

.orders-view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.orders-view-modes {
  display: flex;
  gap: 4px;
  background: #f0f0f0;
  border-radius: 8px;
  padding: 3px;
}

.view-mode-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
  font-size: 1rem;
  transition: all 0.2s;
}

.view-mode-btn:hover {
  background: #e0e0e0;
}

.view-mode-btn.active {
  background: var(--primary);
  color: white;
}

.orders-date-range {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.orders-date-range input[type="date"] {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
}

/* Compact Table */
.compact-orders-table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.compact-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compact-orders-table th,
.compact-orders-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.compact-orders-table th {
  background: #f8f8f8;
  font-weight: 600;
  color: #555;
  position: sticky;
  top: 0;
}

.compact-orders-table tbody tr:hover {
  background: #f5f5f5;
}

.compact-row.delivered {
  opacity: 0.7;
}

.compact-row.cancelled {
  opacity: 0.5;
  text-decoration: line-through;
}

/* Grouped View */
.grouped-section {
  margin-bottom: 16px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
}

.grouped-date-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary), #ff7043);
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

.grouped-date-summary {
  margin-right: auto;
  font-size: 0.9rem;
  opacity: 0.9;
}

.grouped-type {
  padding: 10px 18px;
  border-bottom: 1px solid #f0f0f0;
}

.grouped-type:last-child {
  border-bottom: none;
}

.grouped-type-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

/* Print View */
.print-controls {
  padding: 10px 0;
  text-align: left;
}

.print-order-page {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #eee;
  page-break-after: always;
}

.print-order-page h4 {
  margin-bottom: 12px;
  color: #888;
  font-size: 0.9rem;
}

.print-items {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sales Breakdown */
.sales-breakdown {
  padding: 15px 0;
}

.breakdown-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.breakdown-card {
  flex: 1;
  min-width: 140px;
  background: white;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  border: 1px solid #eee;
  transition: transform 0.2s;
}

.breakdown-card:hover {
  transform: translateY(-2px);
}

.breakdown-card.total {
  background: linear-gradient(135deg, var(--primary), #ff7043);
  color: white;
  border: none;
}

.breakdown-card.discount {
  background: #fef2f2;
  border-color: #fecaca;
}

.breakdown-card i {
  font-size: 1.5rem;
  margin-bottom: 8px;
  opacity: 0.8;
}

.breakdown-value {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.breakdown-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Delete button in card */
.btn-delete {
  background: transparent !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.btn-delete:hover {
  background: #fef2f2 !important;
}

@media print {

  .orders-header,
  .orders-controls,
  .orders-view-controls,
  .orders-stats,
  .sidebar,
  .print-controls,
  .sales-breakdown {
    display: none !important;
  }

  .print-order-page {
    border: none;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .orders-view-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .orders-date-range {
    flex-wrap: wrap;
  }

  .breakdown-cards {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   إدارة الطلبيات - Order Management Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* البطاقات الإحصائية */
.om-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.om-stat-card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
}

.om-stat-card i {
  font-size: 1.6rem;
  color: #d97706;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff7ed;
  border-radius: 12px;
}

.om-stat-info h4 {
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
  margin-bottom: 4px;
}

.om-stat-info span {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.om-stat-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* شريط الفلاتر */
.om-filters {
  background: white;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
}

.om-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.om-filter-group {
  flex: 1;
  min-width: 140px;
}

.om-filter-group label {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 4px;
  font-weight: 500;
}

.om-filter-group input,
.om-filter-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fafafa;
  transition: border-color 0.2s;
}

.om-filter-group input:focus,
.om-filter-group select:focus {
  border-color: #d97706;
  outline: none;
  background: white;
}

/* فلاتر متقدمة */
.om-advanced-toggle-row {
  margin-bottom: 10px;
}

.btn-om-text {
  background: none;
  border: none;
  color: #d97706;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: color 0.2s;
}

.btn-om-text:hover {
  color: #b45309;
}

.om-toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.om-advanced-filters {
  padding-top: 8px;
  border-top: 1px dashed #eee;
  margin-bottom: 8px;
}

.om-filter-actions {
  display: flex;
  gap: 10px;
}

.btn-om {
  padding: 8px 20px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-om-primary {
  background: #d97706;
  color: white;
}

.btn-om-primary:hover {
  background: #b45309;
}

.btn-om-secondary {
  background: #f0f0f0;
  color: #555;
}

.btn-om-secondary:hover {
  background: #e0e0e0;
}

.btn-om-success {
  background: #10b981;
  color: white;
}

.btn-om-success:hover {
  background: #059669;
}

/* جدول الطلبات */
.om-table-wrapper {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  margin-bottom: 20px;
}

.om-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.om-table thead {
  background: #f8f8f8;
}

.om-table th {
  padding: 8px 12px;
  text-align: right;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #eee;
  white-space: nowrap;
}

.om-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f5f5f5;
  color: #333;
  vertical-align: middle;
}

.om-table td strong {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.om-table tbody tr:hover {
  background: #fffbf0;
}

.om-items-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: #666;
}

.btn-om-detail {
  background: #f0f0f0;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-om-detail:hover {
  background: #d97706;
  color: white;
}

/* بطاقة خصومات */
.om-stat-discount i {
  color: #16a34a;
  background: #f0fdf4;
}

/* خلية الكاشير */
.om-cashier-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.om-cashier-icon {
  font-size: 0.72rem;
  color: #aaa;
}

/* خلية الخصم */
.om-discount-cell {
  color: #16a34a;
  font-weight: 600;
  font-size: 0.88rem;
}

/* شارات الحالة */
.om-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
}

.om-badge-info {
  background: #e0f2fe;
  color: #0284c7;
}

.om-badge-warning {
  background: #fff7ed;
  color: #d97706;
}

.om-badge-success {
  background: #f0fdf4;
  color: #16a34a;
}

.om-badge-primary {
  background: #ede9fe;
  color: #7c3aed;
}

.om-badge-danger {
  background: #fef2f2;
  color: #dc2626;
}

.om-badge-secondary {
  background: #f0f0f0;
  color: #888;
}

/* شارات المصدر */
.om-source-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.om-src-manual {
  background: #fef3c7;
  color: #92400e;
}

.om-src-smart {
  background: #dbeafe;
  color: #1d4ed8;
}

.om-src-ai {
  background: #ede9fe;
  color: #6d28d9;
}

.om-src-phone {
  background: #d1fae5;
  color: #065f46;
}

/* ترقيم الصفحات */
.om-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}

.om-page-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  color: #555;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.om-page-btn:hover:not(:disabled) {
  background: #d97706;
  color: white;
  border-color: #d97706;
}

.om-page-btn.active {
  background: #d97706;
  color: white;
  border-color: #d97706;
}

.om-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.om-page-dots {
  padding: 0 4px;
  color: #aaa;
}

/* حالات فارغة وتحميل */
.om-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px;
  color: #888;
  font-size: 1.1rem;
}

.om-loading i {
  font-size: 1.5rem;
  color: #d97706;
}

.om-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: #aaa;
}

.om-empty i {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.om-empty p {
  font-size: 1.1rem;
}

/* إحصائيات الموظفين */
.om-employee-stats {
  margin-top: 8px;
}

.om-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.om-section-title i {
  color: #d97706;
}

/* Modal تفاصيل الطلب */
.om-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.om-modal.active {
  display: flex;
}

.om-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  animation: omFadeIn 0.2s;
}

@keyframes omFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.om-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: omSlideIn 0.3s ease-out;
}

@keyframes omSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.om-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
}

.om-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.om-modal-header h3 i {
  color: #d97706;
}

.om-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 8px;
  cursor: pointer;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.om-modal-close:hover {
  background: #ef4444;
  color: white;
}

.om-modal-body {
  padding: 16px;
}

.om-detail-info {
  margin-bottom: 20px;
}

.om-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}

.om-detail-label {
  font-weight: 600;
  color: #888;
  min-width: 100px;
}

.om-detail-subtitle {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #333;
}

.om-detail-table {
  margin-bottom: 16px;
}

/* سعر أصلي مشطوب */
.om-price-original {
  text-decoration: line-through;
  color: #aaa;
  font-size: 0.85em;
  margin-left: 4px;
}

/* شارة خصم */
.om-price-discount {
  display: inline-block;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  margin-right: 4px;
}

/* إضافات المنتج */
.om-addons-wrap {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.om-addon-tag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #fde68a;
}

/* تفصيل المجموع */
.om-total-breakdown {
  background: #fafafa;
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid #f0f0f0;
}

.om-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.95rem;
  color: #555;
  border-bottom: 1px dashed #eee;
}

.om-breakdown-discount span:last-child {
  color: #16a34a;
  font-weight: 600;
}

.om-breakdown-fee span:last-child {
  color: #d97706;
}

.om-breakdown-total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 2px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #d97706;
  border-top: 2px solid #fed7aa;
  margin-top: 4px;
}

.om-breakdown-total strong {
  font-size: 1.3rem;
}

/* Responsive */
@media (max-width: 768px) {
  .om-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .om-filter-row {
    flex-direction: column;
  }

  .om-filter-group {
    min-width: 100%;
  }

  .om-filter-actions {
    flex-wrap: wrap;
  }

  .om-table {
    font-size: 0.8rem;
  }

  .om-table th,
  .om-table td {
    padding: 8px 10px;
  }

  .om-items-cell {
    max-width: 120px;
  }

  .om-modal-content {
    width: 95%;
    max-height: 90vh;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   📦 Inventory — واجهة واحدة بدون تابات
   ════════════════════════════════════════════════════════════════════════════ */

/* Page Header + Toolbar */
.inv-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.inv-page-header .page-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.inv-toolbar .search-box {
  min-width: 200px;
}

/* Section Container (movements log, etc.) */
.inv-section {
  background: var(--white, #fff);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.inv-section h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Material Cards ── */
.inv-material-card {
  background: var(--white, #fff);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border-right: 4px solid var(--primary, #FF5722);
  transition: box-shadow 0.2s;
}

.inv-material-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.inv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.inv-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-card-title strong {
  font-size: 1.05rem;
  color: var(--dark, #1a1a1a);
}

/* Formula Badge */
.inv-formula-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e3f2fd;
  color: #1976d2;
  white-space: nowrap;
}

/* Category Badge */
.inv-category-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f5f5f5;
  color: var(--gray, #666);
  white-space: nowrap;
}

/* Stock Info */
.inv-stock-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.inv-stock-main {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark, #1a1a1a);
}

.inv-stock-pieces {
  font-size: 0.9rem;
  color: var(--primary, #FF5722);
  font-weight: 600;
}

/* Stock Bar */
.inv-stock-bar {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.inv-stock-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s;
}

.inv-stock-bar-fill.ok { background: #27ae60; }
.inv-stock-bar-fill.warning { background: #f39c12; }
.inv-stock-bar-fill.critical { background: #e74c3c; }

/* Depletion Forecast */
.inv-depletion {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-depletion i { font-size: 0.85rem; }
.inv-depletion small { opacity: 0.75; margin-right: 4px; }

.inv-depletion.dep-green {
  background: #e6f4ea;
  color: #27ae60;
}

.inv-depletion.dep-yellow {
  background: #fff8e1;
  color: #e6a700;
}

.inv-depletion.dep-red {
  background: #fdecea;
  color: #e74c3c;
}

/* Linked Products */
.inv-linked-products {
  font-size: 0.82rem;
  color: var(--gray, #666);
  padding: 6px 0;
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.inv-linked-products i {
  color: var(--primary, #FF5722);
  margin-left: 4px;
}

.inv-linked-products span {
  background: #f5f5f5;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* Action Buttons Row */
.inv-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.inv-actions .btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  transition: opacity 0.2s;
}

.inv-actions .btn-sm:hover { opacity: 0.85; }

.inv-actions .btn-sm.btn-success { background: #27ae60; color: #fff; }
.inv-actions .btn-sm.btn-danger { background: #e74c3c; color: #fff; }
.inv-actions .btn-sm.btn-primary { background: var(--primary, #FF5722); color: #fff; }
.inv-actions .btn-sm.btn-secondary { background: #6c757d; color: #fff; }

/* Movements Table (reused) */
.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.inv-table th,
.inv-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid #eee;
}

.inv-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--gray, #666);
  white-space: nowrap;
}

.inv-table tr:hover {
  background: #f5f5f5;
}

/* ── Inventory Tabs ── */
.inv-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border, #e5e7eb);
  padding-bottom: 10px;
}

.inv-tab-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray, #6b7280);
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
  margin-bottom: -12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Tajawal', sans-serif;
}

.inv-tab-btn:hover {
  color: var(--primary, #FF5722);
}

.inv-tab-btn.active {
  color: var(--primary, #FF5722);
  border-bottom-color: var(--primary, #FF5722);
}

.inv-tab-btn i {
  font-size: 1.1rem;
}

/* ── Movements Tab ── */
.inv-movements-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.inv-movements-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inv-filter-select,
.inv-filter-input {
  padding: 6px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.85rem;
  min-width: 130px;
}

.inv-mv-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Movements Pagination ── */
.inv-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.inv-pagination .btn-sm {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.inv-pagination .btn-sm:hover:not(.active):not(.disabled) {
  background: #f5f5f5;
  border-color: var(--primary, #FF5722);
}

.inv-pagination .btn-sm.active {
  background: var(--primary, #FF5722);
  color: #fff;
  border-color: var(--primary, #FF5722);
}

.inv-pagination .btn-sm.disabled {
  opacity: 0.4;
  cursor: default;
}

.inv-pagination-info {
  font-size: 0.8rem;
  color: var(--gray, #888);
  margin-right: 10px;
}

/* ── Physical Count Modal ── */
.inv-physical-count-info {
  background: #e8f4fd;
  border: 1px solid #b8daff;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.inv-pc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.inv-physical-count-diff {
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inv-physical-count-diff.positive {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.inv-physical-count-diff.negative {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.inv-physical-count-diff.neutral {
  background: #e8f4fd;
  color: #0c5460;
  border: 1px solid #b8daff;
}

/* ── Product Grid in Link Modal ── */
.inv-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.inv-product-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  border: 2px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.inv-product-card.linked {
  border-color: var(--primary, #FF5722);
  background: #fff5f2;
}

.inv-product-card img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 6px;
}

.inv-product-placeholder {
  width: 70px;
  height: 70px;
  margin: 0 auto 6px;
  background: #e9ecef;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 1.4rem;
}

.inv-product-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-product-qty-row {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.inv-product-qty-row input {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid var(--border, #ddd);
  border-radius: 4px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.82rem;
  text-align: center;
}

.inv-product-unit {
  font-size: 0.75rem;
  color: var(--gray, #666);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .inv-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .inv-toolbar {
    flex-direction: column;
  }

  .inv-toolbar .search-box { min-width: unset; width: 100%; }

  .inv-actions { justify-content: center; }

  .inv-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }

  .inv-product-card img,
  .inv-product-placeholder {
    width: 55px;
    height: 55px;
  }

  .inv-stock-main { font-size: 1.1rem; }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay .modal {
  display: block;
  position: static;
  height: auto;
  background: var(--white, #fff);
  border-radius: 12px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray, #666);
  line-height: 1;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #eee;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--gray, #666);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.btn-primary {
  padding: 8px 16px;
  background: var(--primary, #FF5722);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  padding: 8px 16px;
  background: #e9ecef;
  color: var(--dark, #333);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-danger {
  padding: 8px 16px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
}

/* Toast Styles */
.toast {
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-success {
  background: #d4edda;
  color: #155724;
}

.toast-error {
  background: #f8d7da;
  color: #721c24;
}

.toast-warning {
  background: #fff3cd;
  color: #856404;
}

.toast-info {
  background: #d1ecf1;
  color: #0c5460;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .inv-tabs {
    gap: 4px;
    overflow-x: auto;
  }

  .inv-tab-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .inv-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inv-meals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inv-toolbar {
    flex-direction: column;
  }

  .inv-movements-header {
    flex-direction: column;
  }

  .inv-movements-filters {
    width: 100%;
  }

  .inv-filter-select,
  .inv-filter-input {
    min-width: unset;
    flex: 1;
  }

  .inv-ingredient-row {
    flex-direction: column;
  }

  .form-row {
    flex-direction: column;
  }

  .inv-table {
    font-size: 0.75rem;
  }

  .inv-table th,
  .inv-table td {
    padding: 6px 6px;
  }
}

/* ════════════════════════════════════════════════════════════════
   خصائص المنيو الذكي — Menu Settings
   ════════════════════════════════════════════════════════════════ */

.menu-settings-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  padding: 4px;
}

/* ═══ فواصل الأقسام ═══ */
.settings-section-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 6px 6px;
  margin-top: 8px;
  border-bottom: 2px solid var(--primary, #FF5722);
}

.settings-section-divider:first-child {
  margin-top: 0;
}

.settings-section-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary, #FF5722);
  color: #fff;
  border-radius: 10px;
  font-size: 1rem;
  flex-shrink: 0;
}

.settings-section-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-section-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1c1917;
}

.settings-section-desc {
  font-size: 0.8rem;
  color: #78716c;
  font-weight: 400;
}

/* ═══ البطاقات الفرعية ═══ */
.settings-card-sub {
  border-right: 3px solid var(--primary, #FF5722);
  position: relative;
}

.settings-card-sub .settings-card-header {
  background: #fefce8;
  font-size: 0.92rem;
  padding: 10px 16px;
}

.settings-card-sub .settings-card-header::before {
  content: '↳';
  margin-left: 6px;
  color: var(--primary, #FF5722);
  font-weight: 700;
}

.settings-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.settings-card-header {
  background: #f8f8f8;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.settings-card-header i {
  color: var(--primary, #FF5722);
}

.settings-card-body {
  padding: 18px;
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3f3f3;
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #444;
}

.toggle-label i {
  width: 20px;
  text-align: center;
  color: #888;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 26px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  right: 3px;
  transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary, #FF5722);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(-22px);
}

/* Settings Input */
.settings-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  direction: rtl;
  box-sizing: border-box;
}

.settings-input:focus {
  border-color: var(--primary, #FF5722);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

/* Store Name Preview */
.store-name-preview {
  margin-top: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #1a1a1a, #333);
  color: #fff;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

/* Color Picker */
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-picker-wrapper input[type="color"] {
  width: 50px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.color-hex {
  font-family: monospace;
  font-size: 0.95rem;
  color: #666;
}

.color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.color-preset {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s;
}

.color-preset:hover {
  transform: scale(1.2);
  border-color: #333;
}

.color-preview-bar {
  height: 8px;
  border-radius: 4px;
  margin-top: 12px;
}

/* Background Type Selector */
.bg-type-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.radio-option {
  flex: 1;
  padding: 10px;
  border: 2px solid #eee;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option.active {
  border-color: var(--primary, #FF5722);
  background: rgba(255, 87, 34, 0.05);
  color: var(--primary, #FF5722);
}

/* Image Upload Area */
.image-upload-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-preview {
  position: relative;
  display: inline-block;
}

.image-preview img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.image-preview .btn-danger-sm {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* Layout Grid Selector (30 layouts) */
.layout-grid-selector {
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.layout-grid-selector::-webkit-scrollbar {
  width: 4px;
}

.layout-grid-selector::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.layout-category-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555;
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}

.layout-category-title:first-child {
  margin-top: 0;
}

.layout-category-title i {
  margin-left: 6px;
  color: var(--primary, #FF5722);
  font-size: 0.8rem;
}

.layout-category-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.layout-option {
  padding: 10px 6px;
  border: 2px solid #eee;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}

.layout-option i {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 4px;
  color: #888;
}

.layout-option span {
  font-size: 0.75rem;
  color: #666;
  display: block;
  line-height: 1.2;
}

.layout-option.active {
  border-color: var(--primary, #FF5722);
  background: rgba(255, 87, 34, 0.07);
}

.layout-option.active i {
  color: var(--primary, #FF5722);
}

.layout-option.active span {
  color: var(--primary, #FF5722);
  font-weight: 600;
}

.layout-option:hover {
  border-color: #ccc;
  background: #fafafa;
}

/* Emoji Selector */
.emoji-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emoji-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 2px solid #eee;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
  min-width: 60px;
}

.emoji-option span {
  font-size: 1.8rem;
  line-height: 1;
}

.emoji-option small {
  font-size: 0.7rem;
  color: #888;
}

.emoji-option.active {
  border-color: var(--primary, #FF5722);
  background: rgba(255, 87, 34, 0.06);
}

.emoji-option.active small {
  color: var(--primary, #FF5722);
  font-weight: 600;
}

.emoji-option:hover {
  border-color: #ccc;
  transform: scale(1.05);
}

/* Emoji Quick Insert Bar */
.emoji-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.emoji-quick-bar span {
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: 0.15s;
  line-height: 1;
}

.emoji-quick-bar span:hover {
  background: rgba(255, 87, 34, 0.08);
  border-color: #eee;
  transform: scale(1.2);
}

.emoji-quick-bar span:active {
  transform: scale(0.9);
}

/* Audio Upload Area */
.audio-upload-area {
  margin-top: 12px;
}

.audio-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.audio-file-info i:first-child {
  color: var(--primary, #FF5722);
}

.audio-file-info span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sm {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}

.btn-sm:hover {
  background: #059669;
}

.btn-danger-sm {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}

.btn-danger-sm:hover {
  background: #dc2626;
}

.audio-file-info .btn-sm,
.audio-file-info .btn-danger-sm {
  flex-shrink: 0;
}

/* ═══ Button Loading State ═══ */
button.is-loading,
.btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
  color: transparent !important;
}

button.is-loading>*,
.btn.is-loading>* {
  visibility: hidden;
}

button.is-loading::after,
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin-top: -9px;
  margin-left: -9px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

/* Dark buttons (danger, etc.) keep white spinner; light/outline buttons use dark spinner */
button.is-loading.btn-secondary::after,
button.is-loading.btn-outline::after,
.btn.is-loading.btn-secondary::after,
.btn.is-loading.btn-outline::after {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #333;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ═══ Upload Progress Bar ═══ */
.upload-progress-container {
  margin-top: 10px;
  padding: 10px 14px;
  background: #f8f8f8;
  border-radius: 8px;
}

.upload-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 6px;
  font-weight: 600;
}

.upload-progress-bar {
  height: 10px;
  background: #e5e5e5;
  border-radius: 5px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary, #FF5722), #10b981);
  border-radius: 5px;
  transition: width 0.3s ease;
}

/* ═══ Sound Preset Selector Grid ═══ */
.sound-preset-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}

.sound-preset-section h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #333;
  font-weight: 600;
}

.sound-category-group {
  margin-bottom: 12px;
}

.sound-category-label {
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 6px;
  font-weight: 600;
}

.sound-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sound-preset-btn {
  width: 40px;
  height: 36px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sound-preset-btn:hover {
  border-color: var(--primary, #FF5722);
  background: #fff;
  transform: scale(1.05);
}

.sound-preset-btn.active {
  border-color: var(--primary, #FF5722);
  background: var(--primary, #FF5722);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

.random-preset-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.random-preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

.random-preset-card i {
  font-size: 1.2rem;
  color: var(--card-color, #6366f1);
}

.random-preset-card .rpc-name {
  line-height: 1.2;
}

.random-preset-card:hover {
  border-color: var(--card-color, #6366f1);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.random-preset-card.active {
  border-color: var(--card-color, #6366f1);
  background: var(--card-color, #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--card-color, #6366f1) 40%, transparent);
}

.random-preset-card.active i {
  color: #fff;
}

@media (max-width: 480px) {
  .random-preset-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══ Marquee Speed Slider ═══ */
.speed-slider-row {
  margin-top: 12px;
}

.speed-slider-row label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #444;
}

.speed-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.speed-slider-wrapper input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #e5e7eb;
  border-radius: 3px;
  outline: none;
  direction: ltr;
}

.speed-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary, #FF5722);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.speed-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary, #FF5722);
  min-width: 50px;
  text-align: center;
}

/* Announcement Preview */
.announcement-preview {
  margin-top: 12px;
  background: linear-gradient(90deg, var(--primary, #FF5722), #ff8a50);
  border-radius: 8px;
  padding: 10px 0;
  overflow: hidden;
  color: #fff;
  font-weight: 600;
}

.announcement-marquee {
  white-space: nowrap;
  animation: settings-marquee var(--marquee-speed, 8s) linear infinite;
  display: inline-block;
  padding: 0 100%;
}

@keyframes settings-marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ═══ Icon Grid ═══ */
.icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-pick-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  color: #57534e;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-pick-btn:hover {
  border-color: var(--primary-color, #FF5722);
  background: #fff5f0;
}

.icon-pick-btn.active {
  border-color: var(--primary-color, #FF5722);
  background: var(--primary-color, #FF5722);
  color: #fff;
}

/* ═══ Animation Type Grid ═══ */
.animation-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.anim-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 0.7rem;
  color: #57534e;
  transition: all 0.2s;
  text-align: center;
}

.anim-type-card i {
  font-size: 1.1rem;
  color: #78716c;
}

.anim-type-card:hover {
  border-color: var(--primary-color, #FF5722);
  background: #fff5f0;
}

.anim-type-card.active {
  border-color: var(--primary-color, #FF5722);
  background: var(--primary-color, #FF5722);
  color: #fff;
}

.anim-type-card.active i {
  color: #fff;
}

@media (max-width: 480px) {
  .animation-type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .menu-settings-content {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   👷 Workers Section - قسم العمال
   ════════════════════════════════════════════════════════════════════════════ */

.workers-layout {
  display: flex;
  gap: 20px;
  height: calc(100vh - 220px);
  min-height: 400px;
}

.workers-sidebar {
  width: 300px;
  min-width: 260px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workers-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.workers-sidebar-header h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--dark);
}

.workers-search-box {
  position: relative;
}

.workers-search-box input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  box-sizing: border-box;
}

.workers-search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.workers-search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 13px;
}

.workers-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.worker-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
  position: relative;
}

.worker-card:hover {
  background: #f5f5f5;
}

.worker-card.selected {
  background: rgba(255, 87, 34, 0.08);
  border-right: 3px solid var(--primary);
}

.worker-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.worker-card-info {
  flex: 1;
  min-width: 0;
}

.worker-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-card-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px;
}

.worker-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.worker-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.worker-status-dot.active {
  background: #4caf50;
}

.worker-status-dot.on-leave {
  background: #ff9800;
}

.worker-status-dot.terminated {
  background: #f44336;
}

/* Main Content */
.workers-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.workers-main::-webkit-scrollbar {
  width: 6px;
}

.workers-main::-webkit-scrollbar-track {
  background: transparent;
}

.workers-main::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.workers-main::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.worker-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--gray);
  font-size: 16px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.worker-detail-placeholder i {
  font-size: 60px;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* Worker Profile Section */
.worker-profile-section {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

.worker-profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.worker-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.worker-profile-info h2 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--dark);
}

.worker-profile-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.worker-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.worker-badge.role {
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary);
}

.worker-badge.dept {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
}

.worker-badge.position {
  background: rgba(156, 39, 176, 0.1);
  color: #9c27b0;
}

.worker-badge.status-active {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.worker-badge.status-on-leave {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.worker-badge.status-terminated {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.worker-profile-rate {
  margin-top: 6px;
  font-size: 13px;
  color: var(--gray);
}

/* Timeline Container */
.timeline-container {
  padding: 0;
}

.timeline-filters {
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.timeline-filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-filter-group label {
  font-size: 13px;
  color: var(--gray);
  white-space: nowrap;
}

.timeline-filter-group input,
.timeline-filter-group select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px;
}

/* Timeline Employee Card */
.timeline-employee-card {
  background: var(--white);
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.timeline-employee-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.15s;
  gap: 12px;
}

.timeline-employee-header:hover {
  background: #f9f9f9;
}

.timeline-employee-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.timeline-employee-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.timeline-employee-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.timeline-start-time {
  font-size: 12px;
  color: var(--gray);
}

.timeline-start-time i {
  color: #4caf50;
  margin-left: 4px;
}

.timeline-employee-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--gray);
  flex-shrink: 0;
}

.timeline-employee-summary i {
  margin-left: 4px;
}

.timeline-chevron {
  transition: transform 0.2s;
  color: var(--gray);
  font-size: 12px;
}

.timeline-chevron.expanded {
  transform: rotate(180deg);
}

.timeline-employee-body {
  padding: 0 18px 18px;
  border-top: 1px solid #f0f0f0;
}

/* Work Period */
.timeline-period {
  margin-top: 12px;
  border-right: 3px solid #4caf50;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  background: #fafffe;
}

.timeline-period.active {
  border-right-color: #ff9800;
  background: #fffaf5;
}

.timeline-period.timeline-unattached {
  border-right-color: #ff9800;
  background: #fff8f0;
}

.timeline-period-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-period-header i {
  margin-left: 6px;
  color: var(--primary);
}

.timeline-period-totals {
  font-size: 12px;
  color: var(--gray);
  font-weight: 400;
}

.timeline-period-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e0e0e0;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-align: left;
}

/* Order Rows */
.timeline-orders-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  transition: background 0.1s;
}

.timeline-order-row:hover {
  background: rgba(0, 0, 0, 0.03);
}

.timeline-order-time {
  font-family: 'Courier New', monospace;
  color: var(--primary);
  font-weight: 600;
  min-width: 48px;
  flex-shrink: 0;
}

.timeline-order-id {
  font-weight: 600;
  color: var(--dark);
  min-width: 50px;
  flex-shrink: 0;
}

.timeline-order-items {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--gray);
  min-width: 0;
}

.timeline-order-total {
  font-weight: 600;
  color: var(--dark);
  min-width: 60px;
  text-align: left;
  flex-shrink: 0;
}

.timeline-order-status {
  font-size: 11px;
  min-width: 80px;
  flex-shrink: 0;
}

.timeline-order-status.delivered { color: #4caf50; }
.timeline-order-status.ready { color: #2196F3; }
.timeline-order-status.preparing { color: #ff9800; }
.timeline-order-status.new { color: var(--primary); }

.first-order-badge {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-sm {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.15s;
}

.btn-sm.btn-edit {
  background: transparent;
  color: var(--primary);
}

.btn-sm.btn-edit:hover {
  background: rgba(255, 87, 34, 0.1);
}

.btn-sm.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-sm.btn-primary:hover {
  opacity: 0.9;
}

.worker-no-data {
  color: var(--gray);
  font-size: 12px;
  font-style: italic;
}

/* Activity Section */
.worker-activity-section {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.worker-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.worker-activity-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--dark);
}

.worker-activity-header h3 i {
  color: var(--primary);
  margin-left: 6px;
}

.worker-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.worker-date-filter label {
  font-size: 13px;
  color: var(--gray);
}

.worker-date-filter input[type="date"] {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
}

.worker-date-filter input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
}

/* Stats Grid */
.worker-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.worker-stat-card {
  background: #fafafa;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #eee;
}

.worker-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.worker-stat-icon.manual {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.worker-stat-icon.smart {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
}

.worker-stat-info {
  display: flex;
  flex-direction: column;
}

.worker-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}

.worker-stat-label {
  font-size: 11px;
  color: var(--gray);
}

/* Sessions */
#workerSessionsContainer h4,
#workerOrdersContainer h4 {
  font-size: 15px;
  color: var(--dark);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#workerSessionsContainer h4 i,
#workerOrdersContainer h4 i {
  color: var(--primary);
}

.worker-count-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.worker-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.worker-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f9fafb;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.worker-accordion-header:hover {
  background: #f3f4f6;
}
.worker-accordion-header h4 {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.worker-accordion-chevron {
  transition: transform 0.3s ease;
  color: #6b7280;
  font-size: 0.85rem;
}
.worker-accordion-badge {
  background: var(--primary);
  color: white;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}
.worker-accordion-body {
  padding: 12px 16px;
}

.sessions-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.session-card {
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #eee;
  overflow: hidden;
}

.session-card.active {
  border-right: 3px solid #4caf50;
}

.session-card.closed {
  border-right: 3px solid var(--gray);
}

.session-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f0f0f0;
  font-size: 13px;
}

.session-type {
  font-weight: 600;
  color: var(--dark);
}

.session-type i {
  margin-left: 4px;
  color: var(--primary);
}

.session-date {
  color: var(--gray);
  margin-right: auto;
}

.session-status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.session-status-badge.active {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

.session-status-badge.closed {
  background: rgba(158, 158, 158, 0.15);
  color: #666;
}

.session-card-body {
  padding: 12px 14px;
}

.session-time-row,
.session-details-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--dark);
}

.session-time-row {
  margin-bottom: 8px;
}

.session-time-row span i,
.session-details-row span i {
  color: var(--primary);
  margin-left: 4px;
  width: 14px;
}

.session-reason {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ddd;
  font-size: 12px;
  color: var(--gray);
}

.session-reason i {
  color: var(--primary);
  margin-left: 4px;
}

/* Orders Table */
.worker-orders-table-wrap {
  overflow-x: auto;
  margin-bottom: 10px;
}

.worker-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.worker-orders-table th {
  background: #f5f5f5;
  padding: 10px 12px;
  text-align: right;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
}

.worker-orders-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #eee;
  color: var(--dark);
}

.worker-orders-table tbody tr:hover {
  background: #fafafa;
}

.worker-order-items {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-source-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.worker-source-badge.Manual {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.worker-source-badge.Smart_Menu {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
}

.worker-order-status {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.worker-order-status.new {
  background: rgba(33, 150, 243, 0.1);
  color: #2196f3;
}

.worker-order-status.preparing {
  background: rgba(255, 152, 0, 0.1);
  color: #ff9800;
}

.worker-order-status.ready {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.worker-order-status.delivered {
  background: rgba(76, 175, 80, 0.2);
  color: #2e7d32;
}

.worker-order-status.cancelled {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

/* Empty States */
.workers-empty,
.workers-empty-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  padding: 30px;
  text-align: center;
}

.workers-empty i {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.3;
}

.workers-empty-sm {
  padding: 16px;
  font-size: 13px;
}

/* ── Workers Responsive ── */
@media (max-width: 1100px) {
  .worker-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline-employee-summary {
    gap: 10px;
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .workers-layout {
    flex-direction: column;
    height: auto;
  }

  .workers-sidebar {
    width: 100%;
    max-height: 250px;
  }

  .workers-main {
    max-height: calc(100vh - 350px);
  }

  .wp-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .worker-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-employee-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-employee-summary {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .timeline-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  .worker-profile-header {
    flex-direction: column;
    text-align: center;
  }

  .worker-profile-meta {
    justify-content: center;
  }

  .worker-stats-grid {
    grid-template-columns: 1fr;
  }

  .timeline-order-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  .timeline-order-items {
    width: 100%;
    order: 5;
  }

  .session-time-row,
  .session-details-row {
    flex-direction: column;
    gap: 6px;
  }

  .worker-date-filter {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Workers Tabs + Shifts Report ── */

.workers-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border, #ddd);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.workers-tab-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--gray, #666);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'Tajawal', sans-serif;
}

.workers-tab-btn:hover {
  color: var(--primary, #FF5722);
}

.workers-tab-btn.active {
  color: var(--primary, #FF5722);
  border-bottom-color: var(--primary, #FF5722);
}

.workers-tab-btn i {
  font-size: 1.1rem;
}

.shifts-report-section {
  padding: 10px 0;
}

.shifts-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.shifts-report-header h3 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shifts-report-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shift-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.shift-status-badge.completed {
  background: #d1fae5;
  color: #065f46;
}

.shift-status-badge.active {
  background: #fef3c7;
  color: #92400e;
}

.shift-active-badge {
  color: #d97706;
  font-weight: 600;
  font-size: 0.85rem;
}

.shift-active-badge i {
  font-size: 0.55rem;
  animation: shiftPulse 1.5s infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes shiftPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.shifts-table {
  width: 100%;
}

.shift-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.shift-type-badge.individual {
  background: #f0fdf4;
  color: #16a34a;
}

.shift-type-badge.global {
  background: #eff6ff;
  color: #2563eb;
}

.shift-type-badge i {
  font-size: 0.7rem;
}

.shift-row-global {
  background: #f8faff;
}

.shift-card-global {
  border-right: 3px solid #3b82f6;
}

.shifts-summary-mini {
  display: flex;
  gap: 20px;
  padding: 10px 0;
  margin-bottom: 12px;
  color: var(--gray, #666);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.shifts-summary-mini span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shifts-summary-mini i {
  color: var(--primary, #FF5722);
}

@media (max-width: 900px) {
  .workers-tabs {
    gap: 4px;
    overflow-x: auto;
  }

  .workers-tab-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .shifts-report-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Worker Profile v2 - ملف العامل المحسّن
   ═══════════════════════════════════════════════════════════════ */

/* Profile Container */
.wp-profile-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Date Filter Bar */
.wp-date-filter-bar {
  background: var(--white);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wp-date-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wp-date-filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}

.wp-date-filter-label i {
  color: var(--primary);
  margin-left: 6px;
}

/* Section containers */
.wp-section {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wp-section-global {
  border: 2px solid rgba(59, 130, 246, 0.2);
}

.wp-section-header {
  margin-bottom: 14px;
}

.wp-section-header.collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  margin-bottom: 0;
  user-select: none;
  transition: margin-bottom 0.2s;
}

.wp-section-header.collapsible.open {
  margin-bottom: 14px;
}

.wp-section-collapse-icon {
  font-size: 14px;
  color: var(--gray);
  transition: transform 0.2s;
}

.wp-section-collapse-icon.collapsed {
  transform: rotate(-90deg);
}

.wp-section-body {
  transition: none;
}

.wp-section-body.collapsed {
  display: none;
}

.wp-section-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-section-header h3 i {
  color: var(--primary);
}

.wp-section-global .wp-section-header h3 i {
  color: #3b82f6;
}

/* Info Card */
.wp-info-card {
  position: relative;
}

.wp-info-card .worker-profile-header {
  position: relative;
}

.wp-info-card .btn-edit {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 14px;
}

.wp-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.wp-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 10px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.wp-info-label {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wp-info-label i {
  color: var(--primary);
  width: 14px;
  text-align: center;
  font-size: 12px;
}

.wp-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.wp-notes-section {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fffbeb;
  border-radius: 8px;
  border: 1px solid #fef3c7;
}

.wp-notes-text {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--dark);
  line-height: 1.6;
}

/* Shift History */
.wp-shift-row {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.wp-shift-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wp-shift-row.active {
  border-color: #fbbf24;
}

.wp-shift-row.expanded {
  border-color: var(--primary);
}

.wp-shift-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
  flex-wrap: wrap;
}

.wp-shift-header:hover {
  background: #f9fafb;
}

.wp-shift-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  min-width: 120px;
}

.wp-shift-date i {
  color: var(--primary);
  margin-left: 6px;
}

.wp-shift-time {
  font-size: 13px;
  color: var(--gray);
  min-width: 120px;
}

.wp-shift-time i {
  color: #6b7280;
  margin-left: 4px;
}

.wp-shift-duration {
  font-size: 13px;
  color: var(--dark);
  font-weight: 500;
  min-width: 70px;
}

.wp-shift-chevron {
  transition: transform 0.2s;
  color: var(--gray);
  font-size: 12px;
  margin-right: auto;
}

.wp-shift-chevron.expanded {
  transform: rotate(180deg);
}

.wp-shift-details {
  padding: 14px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
}

.wp-shift-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.wp-shift-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid #eee;
}

.wp-shift-detail-item.highlight {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.wp-shift-detail-label {
  font-size: 11px;
  color: var(--gray);
}

.wp-shift-detail-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}

.wp-shift-detail-value.positive {
  color: #16a34a;
}

.wp-shift-notes {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fffbeb;
  border-radius: 6px;
  font-size: 12px;
  color: #92400e;
}

.wp-shift-notes i {
  margin-left: 6px;
  color: #d97706;
}

/* Global Shifts */
.wp-global-shift-card {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #f8faff;
}

.wp-global-shift-card.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.wp-global-shift-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.06);
  border-bottom: 1px solid #e0eaff;
}

.wp-global-shift-date {
  font-size: 13px;
  font-weight: 600;
  color: #1e40af;
}

.wp-global-shift-date i {
  margin-left: 6px;
  color: #3b82f6;
}

.wp-global-shift-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px 14px;
}

.wp-global-shift-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wp-global-shift-item .label {
  font-size: 11px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wp-global-shift-item .label i {
  color: #3b82f6;
  font-size: 11px;
}

.wp-global-shift-item .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}

.wp-global-shift-item.highlight .value {
  color: #16a34a;
}

.wp-global-shift-item .value.positive {
  color: #16a34a;
}

/* Activity Trigger */
.wp-activity-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
}

.wp-activity-hint {
  font-size: 12px;
  color: var(--gray);
}

/* Edit Form */
.wp-edit-form {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.wp-edit-form h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-edit-form h4 i {
  color: var(--primary);
}

.wp-edit-field {
  margin-bottom: 12px;
}

.wp-edit-field label {
  display: block;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 6px;
}

.wp-edit-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Tajawal', sans-serif;
  resize: vertical;
  box-sizing: border-box;
}

.wp-edit-field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.wp-edit-actions {
  display: flex;
  gap: 8px;
}

/* Responsive */
@media (max-width: 1200px) {
  .wp-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wp-shift-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .worker-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .wp-date-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .wp-shift-header {
    gap: 8px;
  }
  .wp-shift-date, .wp-shift-time {
    min-width: auto;
  }
  .wp-global-shift-body {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .wp-info-grid {
    grid-template-columns: 1fr;
  }
  .wp-shift-details-grid {
    grid-template-columns: 1fr;
  }
  .wp-global-shift-body {
    grid-template-columns: 1fr;
  }
  .wp-shift-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .wp-activity-trigger {
    flex-direction: column;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Settings Section - قسم الإعدادات
   ═══════════════════════════════════════════════════════════════ */

.settings-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}

.settings-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray);
  border-radius: 5px 5px 0 0;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-tab-btn:hover {
  background: var(--light);
  color: var(--dark);
}

.settings-tab-btn.active {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.settings-tab-btn i {
  font-size: 1.1rem;
}

/* Security Section */
.security-section {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.security-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.security-card-header {
  background: var(--light);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.security-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.security-card-header h3 i {
  color: var(--primary);
}

.security-card-body {
  padding: 20px;
}

/* Cashier Employees Grid */
.cashier-employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.cashier-employee-card {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s;
}

.cashier-employee-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.emp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.emp-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
}

.emp-info h4 {
  margin: 0 0 5px 0;
  font-size: 1rem;
  color: var(--dark);
}

.emp-username {
  font-size: 0.85rem;
  color: var(--gray);
  direction: ltr;
  display: block;
}

.emp-actions {
  display: flex;
  gap: 8px;
}

.emp-actions button {
  flex: 1;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--gray);
  font-size: 1.2rem;
}

.loading-spinner i {
  margin-left: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .cashier-employees-grid {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    flex-direction: column;
    border-bottom: none;
  }

  .settings-tab-btn {
    border-radius: 5px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Ratings Management Section - إدارة التقييمات
   ═══════════════════════════════════════════════════════════════ */

.ratings-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.ratings-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
}

.ratings-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ratings-filters .filter-group label {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 0;
}

.ratings-filters .filter-group select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  min-width: 140px;
}

.ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.rating-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border-right: 4px solid #f59e0b;
  transition: all 0.3s ease;
}

.rating-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.rating-card.rating-hidden {
  border-right-color: #d1d5db;
  opacity: 0.65;
}

.rating-card.rating-hidden:hover {
  opacity: 0.85;
}

.rating-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.rating-product-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.rating-product-info strong {
  font-size: 0.95rem;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rating-order-id {
  font-size: 0.75rem;
  color: var(--gray);
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.rating-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--gray);
  font-size: 0.9rem;
}

.btn-icon:hover {
  background: #f0f0f0;
  color: var(--dark);
}

.btn-icon.btn-delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

.visibility-toggle:hover {
  background: #e0f2fe;
  color: #3b82f6;
}

.rating-card-body {
  padding: 12px 16px;
}

.rating-stars-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.rating-stars i {
  color: #f59e0b;
  font-size: 0.95rem;
}

.rating-stars i.far {
  color: #d1d5db;
}

.rating-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
}

.rating-comment {
  font-size: 0.9rem;
  color: var(--dark);
  line-height: 1.6;
  margin: 0;
  word-break: break-word;
}

.rating-comment .no-comment {
  color: var(--gray);
  font-style: italic;
  font-size: 0.85rem;
}

.rating-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  font-size: 0.8rem;
  color: var(--gray);
}

.rating-customer i,
.rating-date i {
  margin-left: 4px;
}

/* Pagination */
.ratings-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  direction: ltr;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  background: var(--light);
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination-dots {
  color: var(--gray);
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
  .ratings-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ratings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .ratings-stats-grid {
    grid-template-columns: 1fr;
  }

  .ratings-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .ratings-filters .filter-group select {
    min-width: auto;
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   زر اختيار نمط عرض المنتجات — Collapsible Layout Picker
   ═══════════════════════════════════════════════════════════════ */

.layout-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 2px solid var(--border, #e5e7eb);
  border-radius: 14px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark, #1c1917);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.layout-toggle-btn:hover {
  border-color: var(--primary, #d97706);
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.12);
  transform: translateY(-1px);
}

.layout-toggle-btn.active {
  border-color: var(--primary, #d97706);
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.15);
}

.layout-toggle-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary, #d97706), #b45309);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}

.layout-toggle-label {
  flex: 1;
  text-align: right;
  font-size: 1.05rem;
}

.layout-toggle-chevron {
  font-size: 0.85rem;
  color: var(--gray, #78716c);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: auto;
}

/* القائمة المنبثقة */
.layout-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    margin 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.layout-dropdown.open {
  max-height: 400px;
  opacity: 1;
  margin-top: 14px;
}

.layout-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 4px;
}

.layout-pick-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: #f9fafb;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.layout-pick-option i {
  font-size: 1.4rem;
  color: var(--gray, #78716c);
  transition: color 0.25s, transform 0.25s;
}

.layout-pick-option span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark, #1c1917);
}

.layout-pick-option:hover {
  background: #fff;
  border-color: var(--primary, #d97706);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.layout-pick-option:hover i {
  color: var(--primary, #d97706);
  transform: scale(1.15);
}

.layout-pick-option.active {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: var(--primary, #d97706);
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.18);
}

.layout-pick-option.active i {
  color: var(--primary, #d97706);
}

.layout-pick-option.active span {
  color: var(--primary, #d97706);
}

@media (max-width: 500px) {
  .layout-dropdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .layout-toggle-btn {
    padding: 12px 14px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Stats Tab - إحصائيات العمال (gs-*)
   ═══════════════════════════════════════════════════════════════ */

.gs-stats-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Live Section */
.gs-live-section {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.gs-live-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.gs-live-header h3 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gs-pulse-dot {
  color: #4caf50;
  font-size: 0.6rem;
  animation: gsPulse 1.5s ease-in-out infinite;
}

@keyframes gsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.gs-elapsed {
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: bold;
  letter-spacing: 1px;
}

.gs-no-active {
  text-align: center;
  color: var(--gray);
  padding: 40px 20px;
  font-size: 1rem;
}

.gs-no-active i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* Divider */
.gs-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

/* Summary Bar */
.gs-summary-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.gs-summary-bar-sm {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 12px;
}

.gs-summary-item {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: #f8f9fa;
}

.gs-summary-item .value {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--dark);
  display: block;
}

.gs-summary-item .label {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 4px;
  display: block;
}

.gs-summary-bar-sm .gs-summary-item .value {
  font-size: 1rem;
}

/* Global Shift Card */
.gs-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--white);
}

.gs-card-header {
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background 0.2s;
}

.gs-card-header:hover {
  background: #f8f9fa;
}

.gs-date {
  font-weight: bold;
  min-width: 120px;
}

.gs-time {
  color: var(--gray);
  font-size: 0.9rem;
}

.gs-duration {
  color: var(--gray);
  font-size: 0.85rem;
}

.gs-total {
  font-weight: bold;
  color: var(--primary);
  margin-right: auto;
}

.gs-chevron {
  transition: transform 0.3s;
  color: var(--gray);
}

.gs-card.expanded .gs-chevron {
  transform: rotate(-90deg);
}

.gs-card-body {
  padding: 16px;
  display: none;
  border-top: 1px solid var(--border);
}

.gs-card.expanded .gs-card-body {
  display: block;
}

.gs-card-footer {
  margin-top: 12px;
  text-align: center;
}

/* Status Badges */
.gs-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.gs-badge.active {
  background: #e8f5e9;
  color: #2e7d32;
}

.gs-badge.completed {
  background: #e3f2fd;
  color: #1565c0;
}

.gs-badge.cancelled {
  background: #ffebee;
  color: #c62828;
}

.gs-badge.delivered {
  background: #e8f5e9;
  color: #2e7d32;
}

.gs-badge.new {
  background: #fff3e0;
  color: #e65100;
}

.gs-badge.preparing {
  background: #e3f2fd;
  color: #1565c0;
}

.gs-badge.ready {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* Employee Card */
.gs-employees-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gs-employee-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.gs-employee-card.active {
  border-color: #4caf50;
  border-width: 2px;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.15);
}

.gs-employee-header {
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}

.gs-employee-header:hover {
  background: #fafafa;
}

.gs-employee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.gs-employee-info {
  flex: 1;
  min-width: 0;
}

.gs-employee-name {
  font-weight: bold;
  font-size: 0.95rem;
}

.gs-employee-time {
  color: var(--gray);
  font-size: 0.85rem;
}

.gs-emp-chevron {
  color: var(--gray);
  transition: transform 0.3s;
  font-size: 0.8rem;
}

.gs-emp-chevron.expanded {
  transform: rotate(180deg);
}

/* Cash Info Bar */
.gs-cash-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 12px 12px;
}

.gs-cash-item {
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background: #f5f5f5;
}

.gs-cash-item .cash-label {
  font-size: 0.78rem;
  color: var(--gray);
  margin-bottom: 4px;
  display: block;
}

.gs-cash-item .cash-value {
  font-size: 1.05rem;
  font-weight: bold;
  display: block;
}

.gs-cash-item.starting .cash-value {
  color: #666;
}

.gs-cash-item.sales .cash-value {
  color: #2e7d32;
}

.gs-cash-item.cumulative {
  background: rgba(255, 87, 34, 0.08);
}

.gs-cash-item.cumulative .cash-value {
  color: var(--primary);
  font-size: 1.15rem;
}

/* Employee Summary */
.gs-employee-summary {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--gray);
  border-top: 1px solid #f0f0f0;
}

/* Orders Table */
.gs-orders-section {
  padding: 0 12px 12px;
  display: none;
}

.gs-employee-card.orders-expanded .gs-orders-section {
  display: block;
}

.gs-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.gs-orders-table th {
  padding: 8px;
  background: #f5f5f5;
  text-align: right;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}

.gs-orders-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
}

.gs-order-row.cancelled {
  opacity: 0.5;
}

.gs-order-row.cancelled td {
  text-decoration: line-through;
}

.gs-order-row.cancelled .gs-badge {
  text-decoration: none;
}

/* History Section */
.gs-history-section {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.gs-history-header {
  margin-bottom: 12px;
}

.gs-history-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.gs-history-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.gs-history-filters label {
  font-size: 0.9rem;
  color: var(--gray);
}

.gs-history-filters input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.9rem;
}

/* Unattached Orders */
.gs-unattached-section {
  margin-top: 12px;
  padding: 12px;
  background: #fff3e0;
  border-radius: 8px;
  border: 1px dashed #ff9800;
}

.gs-unattached-title {
  font-weight: bold;
  color: #e65100;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* Print Button */
.gs-print-btn {
  background: #2196F3;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gs-print-btn:hover {
  background: #1976D2;
}

/* Responsive */
@media (max-width: 768px) {
  .gs-summary-bar {
    grid-template-columns: repeat(3, 1fr);
  }

  .gs-summary-bar-sm {
    grid-template-columns: repeat(2, 1fr);
  }

  .gs-cash-info {
    grid-template-columns: 1fr;
  }

  .gs-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .gs-total {
    margin-right: 0;
  }

  .gs-history-filters {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .gs-summary-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Backup & Danger Zone Styles
   ═══════════════════════════════════════════════════════════════ */

.backup-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
    font-size: 0.88rem;
    line-height: 1.5;
}

.backup-preview-card {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.backup-preview-card h4 {
    margin: 0 0 12px;
    color: var(--dark);
}

.backup-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 12px 16px;
    color: #991b1b;
    margin-bottom: 16px;
}

.danger-zone-card {
    border: 2px solid #fca5a5 !important;
    background: #fff5f5 !important;
}

.danger-zone-warning {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: #991b1b;
    line-height: 1.6;
}

.danger-zone-warning strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.danger-zone-warning p {
    margin: 0;
    font-size: 0.88rem;
    opacity: 0.9;
}

.danger-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #991b1b;
    font-weight: 500;
}

.danger-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #dc2626;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-family: 'Tajawal', sans-serif;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}