/* الطلبات: the staff orders site's look (navy, gold, white) inside the accounting program. */
.ord {
  --o-page: #f4f5f7; --o-card: #ffffff; --o-raised: #eef0f4; --o-border: #e3e6eb; --o-text: #22324b; --o-muted: #4a5466;
  --o-navy: #22324b; --o-gold: #a98e65; --o-gold-text: #6e5a39; --o-gold-tint: #f3eee6; --o-on-gold: #1b283c;
  --o-head-1: #2b3d5c; --o-head-2: #1b283c;
  background: var(--o-page); color: var(--o-text); border-radius: 14px; overflow: hidden; min-height: 70vh;
  display: flex; flex-direction: column;
}
.ord-layer, #ord-print { --o-page: #f4f5f7; --o-card: #ffffff; --o-raised: #eef0f4; --o-border: #e3e6eb; --o-text: #22324b; --o-muted: #4a5466;
  --o-navy: #22324b; --o-gold: #a98e65; --o-gold-text: #6e5a39; --o-gold-tint: #f3eee6; --o-on-gold: #1b283c; --o-head-1: #2b3d5c; --o-head-2: #1b283c; }
.ord-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ord-row-gap { display: flex; align-items: center; gap: 8px; }
.ord-grow { flex: 1; min-width: 0; }
.ord-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ord-muted { color: var(--o-muted); font-size: 13px; line-height: 1.55; margin: 0; }
small.ord-muted { font-size: 12px; display: block; }
.ord-body { color: var(--o-text); font-size: 14px; line-height: 1.6; margin: 0; }
.ord-gold-text { color: var(--o-gold-text); font-size: 12px; font-weight: 700; }
.ord-section { color: var(--o-gold-text); font-size: 13px; font-weight: 800; display: block; }
.ord-divider { border: 0; height: 1px; background: var(--o-border); margin: 4px 0; }
.ord-input { background: #fff; border: 1px solid #cfd4dc; border-radius: 12px; padding: 0 14px; min-height: 46px; color: var(--o-text); font: inherit; font-size: 15px; width: 100%; box-sizing: border-box; }
.ord-input:focus { outline: 2px solid var(--o-gold); outline-offset: 0; border-color: var(--o-gold); }

/* header */
.ord-header { background: linear-gradient(180deg, var(--o-head-1), var(--o-head-2)); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 2px solid var(--o-gold); }
.ord-header-title { color: #fff; font-size: 21px; font-weight: 800; margin: 0; display: block; }
.ord-header-sub { color: #d6c5a6; font-size: 12px; display: block; }
.ord-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(169,142,101,0.7); border-radius: 12px; padding: 0 12px; min-height: 44px; background: transparent; color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.ord-search { background: #fff; border-color: #fff; color: #22324b; }

/* stages */
.ord-filters { display: flex; gap: 8px; padding: 10px 16px; background: var(--o-card); border-bottom: 1px solid var(--o-border); overflow-x: auto; }
.ord-filter { border-radius: 18px; border: 1px solid #cfd4dc; padding: 0 14px; min-height: 36px; background: var(--o-card); color: var(--o-text); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ord-filter.on { background: var(--o-navy); border-color: var(--o-navy); color: #fff; }
.ord-bottombar { display: none; }

/* cards */
.ord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 16px; align-content: start; flex: 1; }
.ord-loading, .ord-empty { grid-column: 1 / -1; }
.ord-empty { color: var(--o-muted); text-align: center; padding: 32px; margin: 0; }
.ord-card { display: flex; flex-direction: column; gap: 8px; text-align: start; background: var(--o-card); border: 1px solid var(--o-border); border-radius: 14px; padding: 12px; font: inherit; color: inherit; cursor: pointer; }
.ord-card:hover { border-color: var(--o-gold); }
.ord-card.is-new { border: 1.5px solid var(--o-gold); }
.ord-card.active { border: 2.5px solid var(--o-gold); }
.ord-number { font-size: 16px; font-weight: 800; color: var(--o-text); }
.ord-name { font-size: 15px; font-weight: 700; color: var(--o-text); }
.ord-total { font-size: 15px; font-weight: 800; color: var(--o-text); white-space: nowrap; }
.ord-line { min-height: 1em; }
.ord-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.ord-thumb { border-radius: 10px; background: #fff; border: 1px solid var(--o-border); object-fit: cover; flex: 0 0 auto; }
.ord-thumb.empty { display: inline-flex; align-items: center; justify-content: center; background: var(--o-raised); color: var(--o-muted); font-size: 12px; }
.ord-thumb.s44 { width: 44px; height: 44px; }
.ord-thumb.s64 { width: 64px; height: 64px; font-size: 22px; }
.ord-track { flex: 1; height: 6px; border-radius: 3px; background: var(--o-raised); overflow: hidden; display: block; }
.ord-fill { display: block; height: 6px; background: var(--o-gold); width: 0; }
.ord-fill.w5 { width: 5%; } .ord-fill.w10 { width: 10%; } .ord-fill.w15 { width: 15%; } .ord-fill.w20 { width: 20%; } .ord-fill.w25 { width: 25%; }
.ord-fill.w30 { width: 30%; } .ord-fill.w35 { width: 35%; } .ord-fill.w40 { width: 40%; } .ord-fill.w45 { width: 45%; } .ord-fill.w50 { width: 50%; }
.ord-fill.w55 { width: 55%; } .ord-fill.w60 { width: 60%; } .ord-fill.w65 { width: 65%; } .ord-fill.w70 { width: 70%; } .ord-fill.w75 { width: 75%; }
.ord-fill.w80 { width: 80%; } .ord-fill.w85 { width: 85%; } .ord-fill.w90 { width: 90%; } .ord-fill.w95 { width: 95%; } .ord-fill.w100 { width: 100%; }
.ord-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ord-badge { display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; border-radius: 12px; padding: 2px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ord-badge.gold { background: var(--o-gold); color: var(--o-on-gold); border-color: var(--o-gold); }
.ord-badge.navy { background: var(--o-navy); color: #fff; }
.ord-badge.outline { color: var(--o-text); border-color: var(--o-text); }
.ord-badge.soft { background: var(--o-raised); color: var(--o-text); }
.ord-badge.dashed { color: var(--o-gold-text); border: 1px dashed var(--o-gold); }
.ord-badge.muted { background: var(--o-gold-tint); color: var(--o-gold-text); }
.ord-error { color: #22324b; background: var(--o-gold-tint); padding: 10px 16px; margin: 0; font-size: 14px; }
.ord-error-btn { border: 0; width: 100%; text-align: start; font: inherit; cursor: pointer; }

/* sign in */
.ord-login-page { background: linear-gradient(180deg, var(--o-head-1), var(--o-head-2)); flex: 1; padding: 60px 16px; display: flex; justify-content: center; }
.ord-login { width: 100%; max-width: 420px; background: var(--o-card); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--o-gold); align-self: flex-start; }
.ord-login h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--o-text); }
.ord-login-brand { color: var(--o-gold-text); font-size: 14px; }
.ord-login .ord-error { border-radius: 10px; }

/* buttons */
.ord-gold { min-height: 50px; border-radius: 14px; background: var(--o-gold); border: 1px solid #c2a77d; color: var(--o-on-gold); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: 0 2px 4px rgba(143,118,79,0.35); width: 100%; }
.ord-gold.off, .ord-gold:disabled { background: transparent; border-color: var(--o-gold); color: var(--o-gold-text); box-shadow: none; cursor: default; }
.ord-navy-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--o-navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; text-decoration: none; }
.ord-gold-icon { display: inline-flex; align-items: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--o-gold); color: var(--o-text); font-size: 12px; font-weight: 700; text-decoration: none; box-sizing: border-box; }
.ord-gold-icon i { color: var(--o-gold-text); font-size: 18px; }
.ord-soft-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; background: var(--o-raised); color: var(--o-text); font-weight: 700; font-size: 14px; text-decoration: none; }
.ord-outline-gold { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--o-gold); background: #fff; color: var(--o-text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; width: 100%; }
.ord-outline-gold i { color: var(--o-gold-text); }
.ord-navy-small { min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--o-navy); color: #fff; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.ord-navy-small:disabled { opacity: 0.5; cursor: default; }
.ord-cancel { min-height: 44px; border-radius: 12px; border: 1px solid var(--o-border); background: transparent; color: var(--o-muted); font: inherit; cursor: pointer; width: 100%; margin-top: 4px; }

/* the open order: a side panel (left in Arabic), a full sheet on the phone */
.ord-layer { position: fixed; inset: 0; z-index: 80; }
.ord-backdrop { position: absolute; inset: 0; border: 0; background: rgba(10,16,28,0.45); opacity: 0; transition: opacity 0.2s; cursor: pointer; }
.ord-panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(560px, 90vw); background: var(--o-page); color: var(--o-text); display: flex; flex-direction: column;
  box-shadow: 0 0 18px rgba(0,0,0,0.35); transform: translateX(-100%); transition: transform 0.2s ease; }
[dir="ltr"] .ord-panel { transform: translateX(100%); }
.ord-layer.open .ord-backdrop { opacity: 1; }
.ord-layer.open .ord-panel { transform: none; }
.ord-layer.busy .ord-panel { cursor: progress; }
.ord-layer.busy .ord-panel button { pointer-events: none; }
.ord-detail-head { background: var(--o-head-1); padding: 12px; padding-top: calc(env(safe-area-inset-top) + 12px); display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--o-gold); }
.ord-hicon { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(169,142,101,0.7); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; flex: 0 0 auto; }
.ord-hicon.dim { opacity: 0.5; }
[dir="ltr"] .ord-hicon .fa-arrow-right { transform: scaleX(-1); }
.ord-detail-body { flex: 1; overflow-y: auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.ord-box { background: var(--o-card); border: 1px solid var(--o-border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ord-box.dashed { border: 1px dashed var(--o-gold); }
.ord-confirm { display: flex; flex-direction: column; gap: 8px; }
.ord-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--o-border); }
.ord-item-name { color: var(--o-text); font-size: 13px; font-weight: 700; display: block; }
.ord-item-name.done { text-decoration: line-through; text-decoration-color: var(--o-gold); }
.ord-stepper { display: flex; align-items: center; gap: 4px; }
.ord-stepper button { width: 34px; height: 44px; border-radius: 10px; background: var(--o-raised); border: 0; color: var(--o-text); cursor: pointer; }
.ord-stepper button:disabled { opacity: 0.4; }
.ord-stepper b { min-width: 24px; text-align: center; font-weight: 800; }
.ord-check { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid #cfd4dc; background: #fff; color: var(--o-on-gold); font-size: 20px; cursor: pointer; flex: 0 0 auto; }
.ord-check.on { background: var(--o-gold); border-color: var(--o-gold); }
.ord-footer { background: var(--o-card); border-top: 1px solid var(--o-border); padding: 12px; padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }

/* phone: one card per row, the stages in a bar at the bottom, the order as a full sheet */
body.mob .ord { border-radius: 0; overflow: visible; margin: 0 -12.8px; min-height: calc(100vh - 140px); }
body.mob .ord-filters { display: none; }
body.mob .ord-grid { grid-template-columns: 1fr; padding: 12px; }
body.mob .ord-bottombar { display: flex; position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); background: var(--o-card); border-top: 1px solid var(--o-border); padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px); margin-top: auto; z-index: 2; }
.ord-btab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; justify-content: center; border: 0; background: none; color: var(--o-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ord-btab-ico { width: 52px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ord-btab.on { color: var(--o-gold-text); font-weight: 800; }
.ord-btab.on .ord-btab-ico { background: var(--o-gold); color: var(--o-on-gold); }
body.mob .ord-panel { width: 100vw; transform: translateY(100%); }
body.mob .ord-layer.open .ord-panel { transform: none; }

/* the printed order receipt: only it prints while it is open */
#ord-print { display: none; }
@media print {
  body.ord-printing > *:not(#ord-print) { display: none !important; }
  body.ord-printing #ord-print { display: block; }
  @page { size: A4; margin: 12mm; }
}
.ord-receipt { direction: rtl; font-family: Tahoma, "Segoe UI", Arial, sans-serif; color: #111; font-size: 12.5px; line-height: 1.55; }
.ord-receipt .r-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #a98e65; padding-bottom: 10px; margin-bottom: 12px; }
.ord-receipt .r-head img { height: 110px; max-width: 260px; object-fit: contain; }
.ord-receipt .r-brand { font-size: 22px; color: #22324b; }
.ord-receipt .r-meta { text-align: left; font-size: 12px; }
.ord-receipt .r-meta h1 { margin: 0 0 4px; font-size: 22px; color: #22324b; }
.ord-receipt .r-meta b { font-size: 16px; color: #22324b; }
.ord-receipt .r-boxes { display: flex; gap: 10px; margin-bottom: 12px; }
.ord-receipt .r-box { flex: 1; border: 1px solid #cfd4dc; border-radius: 6px; padding: 8px 10px; }
.ord-receipt .r-box h2 { margin: 0 0 4px; font-size: 13px; color: #6e5a39; }
.ord-receipt table.r-items { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.ord-receipt table.r-items th { background: #22324b; color: #fff; font-weight: 700; padding: 6px; border: 1px solid #22324b; }
.ord-receipt table.r-items td { padding: 6px; border: 1px solid #cfd4dc; vertical-align: top; }
.ord-receipt table.r-items tr:nth-child(even) td { background: #f6f3ee; }
.ord-receipt .c { text-align: center; white-space: nowrap; }
.ord-receipt .r-bottom { display: flex; gap: 10px; align-items: flex-start; }
.ord-receipt table.r-totals { border-collapse: collapse; min-width: 260px; }
.ord-receipt table.r-totals th, .ord-receipt table.r-totals td { padding: 5px 10px; border: 1px solid #cfd4dc; text-align: right; }
.ord-receipt table.r-totals tr.grand th, .ord-receipt table.r-totals tr.grand td { background: #22324b; color: #fff; font-size: 15px; }
.ord-receipt .r-pay { flex: 1; border: 1px solid #a98e65; border-radius: 6px; padding: 8px 10px; }
.ord-receipt .r-collect { margin-top: 6px; font-size: 15px; font-weight: 700; }
.ord-receipt .r-fee { margin-top: 10px; padding: 7px 10px; background: #f6f3ee; border-right: 4px solid #a98e65; font-weight: 700; }
.ord-receipt .r-note { margin-top: 10px; border: 1px dashed #a98e65; border-radius: 6px; padding: 8px 10px; }
.ord-receipt .r-signs { display: flex; gap: 18px; margin-top: 28px; }
.ord-receipt .r-signs div { flex: 1; border-top: 1px solid #555; padding-top: 4px; text-align: center; font-size: 12px; }
.ord-receipt .r-foot { margin-top: 18px; display: flex; justify-content: space-between; font-size: 11px; color: #555; border-top: 1px solid #cfd4dc; padding-top: 6px; }
