/* منيو براندوريكس — الأساس المشترك */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bx: #FF7A21;
  --bx-gold: #DDA127;
  --ok: #2E9E5B;
  --warn: #E05A4E;
  --info: #3E7BC0;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ====== شاشات الطاقم (مطبخ/جرسون/إدارة) — غامق احترافي ====== */
body.app {
  background: #14171C;
  color: #E9EDF2;
  min-height: 100vh;
}
.app a { color: var(--bx); }
.app .panel { background: #1C2129; border: 1px solid #2A313B; border-radius: 14px; }
.app .muted { color: #8D97A5; }
.app input, .app select, .app textarea {
  width: 100%; background: #232A34; color: #E9EDF2;
  border: 1px solid #333D4A; border-radius: 10px;
  padding: 10px 12px; font: inherit;
}
.app input:focus, .app select:focus, .app textarea:focus { outline: 2px solid var(--bx); border-color: var(--bx); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 10px 18px;
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--bx); color: #fff; transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid #3A4450; color: #C7CFD9; }
.btn.ok { background: var(--ok); }
.btn.warn { background: var(--warn); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }

.badge { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge.new { background: #3E2A15; color: #FFB067; }
.badge.preparing { background: #16324A; color: #7CC0F5; }
.badge.ready { background: #14382A; color: #6FDCA8; }
.badge.gold { background: #3A2F12; color: #EFC96A; }

/* شاشة الدخول */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; padding: 28px; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card .field { margin-top: 14px; }
.login-card label { font-size: 13px; color: #A7B0BC; display: block; margin-bottom: 4px; }

/* ترويسة الشاشات */
.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; background: #1A1F26; border-bottom: 1px solid #2A313B;
  position: sticky; top: 0; z-index: 20;
}
.topbar .title { font-weight: 800; font-size: 17px; }
.topbar .grow { flex: 1; }

/* التوست */
#toast {
  position: fixed; bottom: 24px; right: 50%; transform: translateX(50%);
  background: #262E39; color: #fff; border: 1px solid #3A4450;
  padding: 10px 20px; border-radius: 12px; font-weight: 700;
  z-index: 200; opacity: 0; transition: opacity .25s; pointer-events: none;
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }

/* الشيت السفلي (خيارات صنف / سلة) */
.sheet-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 100; display: none; align-items: flex-end; justify-content: center;
}
.sheet-back.open { display: flex; }
.sheet {
  width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 20px;
}
.app .sheet { background: #1C2129; }
.sheet h3 { font-size: 19px; font-weight: 800; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.qty-btn {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  font-size: 20px; font-weight: 800; cursor: pointer;
  background: var(--bx); color: #fff;
}
.opt-group { margin-top: 14px; }
.opt-group .g-name { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.opt-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; gap: 8px;
}
.opt-row input { width: auto; accent-color: var(--bx); }
.opt-row .d { font-size: 13px; opacity: .75; white-space: nowrap; }

.spin {
  width: 34px; height: 34px; margin: 40px auto; display: block;
  border: 4px solid #3a4450; border-top-color: var(--bx);
  border-radius: 50%; animation: sp 0.8s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }

.num { font-variant-numeric: tabular-nums; }
