/* Abdelhadi Phone — Global Styles */

:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fff7ed;
  --dark: #0f172a;
  --gray: #64748b;
  --bg: #f8fafc;
}

* { box-sizing: border-box; }

html, body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: #0f172a;
}

/* Hide scrollbars but keep functional */
.scroll-hide::-webkit-scrollbar { display: none; }
.scroll-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Sidebar transitions */
.sidebar { transition: transform .2s ease-out; }

/* GAB-like sidebar item */
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  color: #475569;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.menu-item:hover { background: #fff7ed; color: var(--primary); }
.menu-item.active { background: #fff7ed; color: var(--primary); }
.menu-item.active::before {
  content: ''; width: 3px; height: 24px; background: var(--primary); border-radius: 2px;
}
[dir="rtl"] .menu-item.active::before { margin-left: -0.4rem; }
[dir="ltr"] .menu-item.active::before { margin-right: -0.4rem; }

/* KPI Cards */
.kpi {
  background: white;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  border: 1px solid #e2e8f0;
  transition: all .2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all .15s;
  border: none;
}
.btn-primary {
  background: var(--primary); color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }

/* Inputs */
.input, .select, .textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: white;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,.1);
}

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-progress { background: #dbeafe; color: #1e40af; }
.badge-ready { background: #dcfce7; color: #166534; }
.badge-delivered { background: #f3e8ff; color: #6b21a8; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: white;
  border-radius: 0.75rem;
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
}

/* Toasts */
#toasts {
  position: fixed; bottom: 1rem;
  z-index: 100;
}
[dir="rtl"] #toasts { left: 1rem; }
[dir="ltr"] #toasts { right: 1rem; }
.toast {
  background: #0f172a; color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  animation: slideIn .2s;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Print */
@media print {
  body { background: white; }
  .no-print, aside, header { display: none !important; }
  .print-only { display: block !important; }
  main { padding: 0 !important; margin: 0 !important; }
}
.print-only { display: none; }

/* Loading spinner */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid #fed7aa;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* Responsive sidebar */
@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 40; height: 100vh; }
  [dir="rtl"] .sidebar.closed { transform: translateX(100%); }
  [dir="ltr"] .sidebar.closed { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}
