:root {
  --brand: #e85d04;
  --brand-dark: #c2410c;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --card: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, textarea, select { font: inherit; }

.app-shell { max-width: 1320px; margin: 0 auto; padding: 16px; }
.mobile-shell { max-width: 520px; margin: 0 auto; min-height: 100vh; background: linear-gradient(180deg, #fff7ed 0%, #fff 25%); }
.glass-card { background: rgba(255,255,255,.88); border: 1px solid rgba(231,229,228,.9); box-shadow: 0 18px 60px rgba(28,25,23,.08); backdrop-filter: blur(14px); }
.soft-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 12px 35px rgba(28,25,23,.06); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 16px; padding: .8rem 1rem; font-weight: 800; transition: .18s ease; border: 1px solid transparent; cursor: pointer; }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(232,93,4,.25); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 12px 25px rgba(232,93,4,.22); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { background: #fafaf9; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }
.btn-blue { background: #2563eb; color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; transition: .18s ease; }
.icon-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(28,25,23,.08); }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: .85rem 1rem; color: var(--ink); }
.textarea { min-height: 92px; resize: vertical; }
.badge { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .32rem .68rem; font-size: .82rem; font-weight: 800; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-stone { background: #f5f5f4; color: #57534e; }
.nav-pill { border-radius: 16px; padding: .75rem .9rem; color: #57534e; font-weight: 800; display: flex; align-items: center; gap: .55rem; }
.nav-pill.active, .nav-pill:hover { background: #fff7ed; color: var(--brand-dark); }
.category-chip { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: .65rem .95rem; font-weight: 800; background: #fff; color: #57534e; }
.category-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 25px rgba(232,93,4,.25); }
.product-image { width: 112px; min-width: 112px; height: 112px; object-fit: cover; border-radius: 22px; background: #f5f5f4; }
.admin-image { width: 56px; height: 56px; object-fit: cover; border-radius: 14px; }
.cart-bar { position: sticky; bottom: 12px; z-index: 20; margin: 18px 12px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(28,25,23,.5); z-index: 60; display: grid; place-items: end center; padding: 12px; }
.modal-card { width: min(100%, 560px); max-height: 92vh; overflow: auto; border-radius: 28px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.2); animation: slideUp .18s ease-out; }
.toast-region { position: fixed; top: 14px; left: 14px; z-index: 80; display: grid; gap: 10px; width: min(92vw, 360px); }
.toast { background: #1c1917; color: #fff; padding: 14px 16px; border-radius: 18px; box-shadow: 0 18px 45px rgba(28,25,23,.2); animation: toastIn .2s ease-out; }
.kitchen-card { border-radius: 28px; border: 2px solid transparent; box-shadow: 0 16px 45px rgba(28,25,23,.09); }
.status-pending { border-color: #fed7aa; background: #fff7ed; }
.status-approved { border-color: #fdba74; background: #fff7ed; }
.status-preparing { border-color: #93c5fd; background: #eff6ff; }
.status-ready { border-color: #86efac; background: #f0fdf4; }
.status-rejected { border-color: #fecaca; background: #fef2f2; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 16px; }
.table-wrap { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px; text-align: right; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #57534e; font-size: .9rem; background: #fafaf9; }
.print-card { width: 360px; background: white; color: #1c1917; border: 1px dashed #d6d3d1; border-radius: 26px; padding: 24px; text-align: center; }

@keyframes slideUp { from { transform: translateY(24px); opacity: .7; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 768px) {
  .modal-backdrop { place-items: center; }
  .product-image { width: 136px; min-width: 136px; height: 136px; }
}

@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { position: absolute; inset: 0; display: grid; place-items: start center; padding-top: 24px; }
  .no-print { display: none !important; }
}
