/* ===== order-edit.css (031): نافذة تعديل الطلب (التأكيد والمطبخ). ألوانها ثابتة (فاتحة) في الوضعين ===== */
.oe-wrap {
  --oe-ink: #0B2E1A; --oe-mut: #4D6357; --oe-line: #E3E8E4; --oe-soft: #F6F8F7; --oe-g: #00843F; --oe-g-ink: #00602F; --oe-g-soft: #E6F4EC;
  --oe-r: #C62828; --oe-r-soft: #FDECEC; --oe-a: #9A4B00; --oe-a-soft: #FFF3E0;
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px;
  font-family: 'Cairo', Tahoma, sans-serif; color: var(--oe-ink); line-height: 1.5;
}
.oe-dim { position: absolute; inset: 0; background: rgba(11,46,26,.5); }
.oe-panel { position: relative; width: 100%; max-width: 1040px; height: min(92dvh, 860px); background: #FFFFFF; border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; }
.oe-loading { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; font-size: 16px; }
.oe-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--oe-line); }
.oe-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.oe-title b { font-size: 20px; font-weight: 800; }
.oe-title span { font-size: 13px; color: var(--oe-mut); }
.oe-left { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--oe-g-soft); color: var(--oe-g-ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.oe-left.is-late { background: var(--oe-r-soft); color: var(--oe-r); }
.oe-x { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--oe-line); display: inline-flex; align-items: center; justify-content: center; color: var(--oe-ink); background: #FFFFFF; }
.oe-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; }
.oe-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.oe-cols h3 { font-size: 14px; font-weight: 700; color: var(--oe-mut); margin-bottom: 8px; }
.oe-lines { display: flex; flex-direction: column; gap: 8px; }
.oe-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--oe-line); border-radius: 14px; }
.oe-line.is-changed { border-color: #9FD3B5; background: #F7FBF8; }
.oe-line-main { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: right; min-width: 0; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; }
.oe-line-main b { font-size: 15px; }
.oe-line-main small { font-size: 12px; color: var(--oe-mut); }
.oe-adds { display: flex; flex-wrap: wrap; gap: 4px; }
.oe-adds i { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--oe-g-soft); color: var(--oe-g-ink); }
.oe-step { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--oe-line); border-radius: 12px; }
.oe-step button { width: 36px; height: 36px; border-radius: 9px; border: 0; background: var(--oe-soft); color: var(--oe-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.oe-step b { min-width: 26px; text-align: center; font-size: 16px; }
.oe-price { display: flex; flex-direction: column; align-items: flex-end; min-width: 76px; }
.oe-price b { font-size: 15px; white-space: nowrap; }
.oe-diff { font-size: 13px; font-weight: 800; white-space: nowrap; }
.oe-diff.is-up { color: var(--oe-a); }
.oe-diff.is-down { color: var(--oe-g-ink); }
.oe-tag { font-size: 12px; font-weight: 800; padding: 0 8px; border-radius: 10px; }
.oe-tag.is-new { background: var(--oe-g); color: #FFFFFF; }
.oe-del { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #F1B5B5; background: #FFFFFF; color: var(--oe-r); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.oe-removed { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--oe-r-soft); font-size: 13px; color: #8E1414; }
.oe-removed > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.oe-link { background: none; border: 0; color: var(--oe-g-ink); font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 32px; font-size: 13px; font-family: inherit; }
.oe-empty { padding: 14px; text-align: center; color: var(--oe-mut); font-size: 14px; }
.oe-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--oe-line); background: #FFFFFF; color: var(--oe-ink); font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.oe-btn:disabled { opacity: .5; cursor: not-allowed; }
.oe-primary { background: var(--oe-g); border-color: var(--oe-g); color: #FFFFFF; font-weight: 800; }
.oe-ghost { background: transparent; }
.oe-add { border: 1.5px dashed var(--oe-g); color: var(--oe-g-ink); background: #FFFFFF; }
.oe-cust { display: flex; flex-direction: column; gap: 10px; }
.oe-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--oe-mut); }
.oe-field input, .oe-field select, .oe-field textarea { width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--oe-line); background: var(--oe-soft); color: var(--oe-ink); font-family: inherit; font-size: 16px; font-weight: 600; outline: none; box-sizing: border-box; }
.oe-field textarea { resize: vertical; line-height: 1.5; }
.oe-field input:focus, .oe-field select:focus, .oe-field textarea:focus { border-color: var(--oe-g); }
.oe-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #E4E9E6; }
.oe-seg button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--oe-mut); font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.oe-seg button[aria-pressed="true"] { background: #FFFFFF; color: var(--oe-ink); font-weight: 800; box-shadow: 0 1px 4px rgba(11,46,26,.14); }
.oe-pick, .oe-opts { display: flex; flex-direction: column; gap: 12px; }
.oe-pick-head { display: flex; align-items: center; gap: 10px; }
.oe-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--oe-line); color: var(--oe-mut); }
.oe-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: inherit; font-size: 16px; outline: none; color: var(--oe-ink); }
.oe-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.oe-chips button { flex: none; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--oe-line); background: #FFFFFF; color: var(--oe-ink); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.oe-chips button[aria-pressed="true"] { background: var(--oe-ink); border-color: var(--oe-ink); color: #FFFFFF; }
.oe-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.oe-menu-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--oe-line); background: #FFFFFF; color: var(--oe-ink); font-family: inherit; text-align: right; cursor: pointer; }
.oe-menu-item b { font-size: 15px; }
.oe-menu-item span { font-size: 13px; color: var(--oe-mut); font-weight: 700; white-space: nowrap; }
.oe-menu-item:disabled { opacity: .5; cursor: not-allowed; }
.oe-opts-title { font-size: 18px; font-weight: 800; }
.oe-group { display: flex; flex-direction: column; gap: 8px; }
.oe-group > b { font-size: 15px; }
.oe-hint { font-size: 12px; color: var(--oe-mut); margin-top: -6px; }
.oe-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.oe-choice { display: inline-flex; flex-direction: column; align-items: center; min-height: 52px; min-width: 96px; padding: 6px 12px; border-radius: 14px; border: 1px solid var(--oe-line); background: #FFFFFF; color: var(--oe-ink); font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.oe-choice small { font-size: 12px; color: var(--oe-mut); font-weight: 600; }
.oe-choice[aria-pressed="true"] { border: 2px solid var(--oe-g); background: var(--oe-g-soft); color: var(--oe-g-ink); padding: 5px 11px; }
.oe-choice:disabled { opacity: .45; cursor: not-allowed; }
.oe-opts-foot { position: sticky; bottom: -16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; background: #FFFFFF; border-top: 1px solid var(--oe-line); }
.oe-opts-foot .oe-primary { flex: 1; max-width: 360px; }
.oe-foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 12px 18px 14px; border-top: 1px solid var(--oe-line); background: #FBFCFB; }
.oe-sums { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: 14px; color: var(--oe-mut); }
.oe-total { margin-inline-start: auto; font-size: 20px; font-weight: 800; color: var(--oe-ink); }
.oe-paybox { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--oe-soft); border: 1px solid var(--oe-line); font-size: 14px; }
.oe-paybox b { font-size: 15px; }
.oe-paybox.is-transfer { background: var(--oe-a-soft); border-color: #F3D9A4; color: #4A2A00; }
.oe-paybox small { color: var(--oe-mut); }
.oe-msg { color: var(--oe-r); font-weight: 700; font-size: 14px; }
.oe-acts { display: flex; gap: 10px; }
.oe-acts .oe-save { flex: 1; min-height: 54px; font-size: 18px; }
@media (max-width: 760px) {
  .oe-wrap { padding: 0; align-items: flex-end; }
  .oe-panel { height: 96dvh; border-radius: 22px 22px 0 0; }
  .oe-cols { grid-template-columns: minmax(0, 1fr); }
  .oe-line { grid-template-columns: minmax(0, 1fr) auto; }
  .oe-line .oe-price { grid-column: 1; flex-direction: row; gap: 6px; align-items: baseline; justify-content: flex-start; }
  .oe-head { padding: 12px; flex-wrap: wrap; }
  .oe-left { order: 3; width: 100%; justify-content: center; }
  .oe-body { padding: 12px; }
  .oe-foot { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
}
.oe-ask { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; margin-top: -4px; border-radius: 12px; background: var(--oe-g-soft); border: 1px solid #9FD3B5; }
.oe-ask b { font-size: 14px; }
.oe-ask small { font-size: 12px; color: var(--oe-mut); }
.oe-ask-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.oe-ask-acts .oe-btn { min-height: 42px; font-size: 14px; }

/* ===== 033: الشكاوي (مدير التأكيد والمطبخ) — بتمشي على ألوان الشاشة اللي هي فيها ===== */
.cp-wrap { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1100px; margin: 0 auto; }
.cp-head { display: flex; align-items: center; gap: 12px; }
.cp-head > div { flex: 1; display: flex; flex-direction: column; }
.cp-head h2 { font-size: 20px; font-weight: 800; }
.cp-head span { font-size: 13px; color: var(--muted, #4D6357); }
.cp-msg { color: var(--danger, #C62828); font-weight: 700; font-size: 14px; }
.cp-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; text-align: center; color: var(--muted, #4D6357); border: 1px dashed var(--line, #D8E5DC); border-radius: 16px; }
.cp-empty b { color: var(--text, #0F2418); font-size: 16px; }
.cp-good svg { color: var(--brand, #00843F); }
.cp-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--surface, #FFFFFF); border: 1px solid var(--line, #D8E5DC); border-inline-start: 5px solid var(--danger, #C62828); color: var(--text, #0F2418); }
.cp-card.is-done { border-inline-start-color: var(--brand, #00843F); opacity: .85; }
.cp-top { display: flex; align-items: center; gap: 8px; }
.cp-ref { font-size: 18px; font-weight: 800; }
.cp-reason { padding: 2px 10px; border-radius: 12px; background: var(--danger-soft, #FDECEC); color: var(--danger, #C62828); font-size: 13px; font-weight: 800; }
.cp-card.is-done .cp-reason { background: var(--open-soft, #E3F6EC); color: var(--open-text, #0B6B35); }
.cp-grow { flex: 1; }
.cp-ago { font-size: 13px; color: var(--muted, #4D6357); white-space: nowrap; }
.cp-who { font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cp-repeat { margin-inline-start: 6px; padding: 1px 8px; border-radius: 10px; background: var(--warn-soft, #FFF1D6); color: var(--warn, #9A5B00); font-size: 12px; font-weight: 800; }
.cp-text { font-size: 15px; line-height: 1.6; padding: 8px 12px; border-radius: 12px; background: var(--surface-2, #F6F8F7); overflow-wrap: anywhere; }
.cp-src { font-size: 12px; color: var(--muted, #4D6357); }
.cp-res { font-size: 13px; font-weight: 700; color: var(--open-text, #0B6B35); }
.cp-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line, #D8E5DC); background: var(--surface, #FFFFFF); color: var(--text, #0F2418); font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.cp-line { border: 1.5px solid var(--brand, #00843F); color: var(--brand-text, #00733A); }
.cp-green { background: var(--brand, #00843F); border-color: var(--brand, #00843F); color: #FFFFFF; }
.cp-dark { background: var(--text, #0F2418); border-color: var(--text, #0F2418); color: var(--bg, #FFFFFF); }
.cp-resolve { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.cp-resolve input { flex: 1 1 240px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line, #D8E5DC); background: var(--surface-2, #F6F8F7); color: var(--text, #0F2418); font-family: inherit; font-size: 15px; }
.cp-done summary { cursor: pointer; font-weight: 800; padding: 8px 0; color: var(--muted, #4D6357); }
.cp-done[open] { display: flex; flex-direction: column; gap: 10px; }
.cp-form { max-width: 560px; height: auto; max-height: 92dvh; }
/* علامة «اشتكى قبل كده» على الطلب */
.cp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 10px; background: var(--danger-soft, #FDECEC); color: var(--danger, #C62828); font-size: 13px; font-weight: 800; line-height: 1.4; }
.cp-badge svg { flex: none; }
/* الجزء 11: زبون مميز (من أهم 50) */
.top-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 10px; background: #FFF3D1; color: #8A5300; font-size: 13px; font-weight: 800; line-height: 1.4; }
.top-badge svg { flex: none; fill: #F2A900; stroke: #C98800; }
.cf-chips .top-badge, .cf-card-top .top-badge { font-size: 12px; padding: 2px 8px; }
.cf-table td .top-badge { margin-top: 4px; font-size: 11px; padding: 1px 6px; }
.sr-grow .top-badge { align-self: flex-start; margin-top: 4px; font-size: 12px; padding: 2px 8px; }

/* ===== 034: البحث برقم التليفون ===== */
.sr-panel { max-width: 900px; }
.sr-form { flex: none; display: flex; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--oe-line); }
.sr-form .oe-search { flex: 1; }
.sr-form .oe-search input { font-size: 18px; letter-spacing: .5px; }
.sr-body { display: flex; flex-direction: column; gap: 10px; }
.sr-note { font-size: 13px; color: var(--oe-mut); }
.sr-cust { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--oe-line); background: var(--oe-soft); }
.sr-cust .cp-btn { background: #FFFFFF; color: var(--oe-ink); border-color: var(--oe-line); }
.sr-cust .cp-btn.cp-line { border-color: var(--oe-g); color: var(--oe-g-ink); }
.sr-cust .cp-btn.cp-green { background: var(--oe-g); border-color: var(--oe-g); color: #FFFFFF; }
.sr-cust-top { display: flex; align-items: center; gap: 8px; }
.sr-cust-top .sr-grow { display: flex; flex-direction: column; }
.sr-cust-top b { font-size: 17px; }
.sr-grow { flex: 1; min-width: 0; }
.sr-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-stats span { padding: 2px 10px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--oe-line); font-size: 13px; font-weight: 700; }
.sr-stats .is-bad { color: var(--oe-r); }
.sr-h { font-size: 14px; color: var(--oe-mut); margin-top: 4px; }
.sr-order { border: 1px solid var(--oe-line); border-radius: 14px; overflow: hidden; }
.sr-order.is-open { border-color: #9FD3B5; }
.sr-order-head { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; background: #FFFFFF; border: 0; color: var(--oe-ink); font-family: inherit; text-align: right; cursor: pointer; }
.sr-day { display: flex; flex-direction: column; line-height: 1.2; min-width: 74px; }
.sr-day b { font-size: 13px; } .sr-day small { font-size: 12px; color: var(--oe-mut); }
.sr-ref { font-size: 16px; white-space: nowrap; }
.sr-st { padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 800; white-space: nowrap; background: #EEF1EF; }
.sr-st.is-ok { background: var(--oe-g-soft); color: var(--oe-g-ink); }
.sr-st.is-warn { background: var(--oe-a-soft); color: var(--oe-a); }
.sr-st.is-bad { background: var(--oe-r-soft); color: var(--oe-r); }
.sr-tag { padding: 2px 8px; border-radius: 10px; background: var(--oe-a-soft); color: var(--oe-a); font-size: 12px; font-weight: 800; }
.sr-items-short { font-size: 13px; color: var(--oe-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-total { white-space: nowrap; }
.sr-detail { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px 14px; background: var(--oe-soft); font-size: 14px; line-height: 1.6; }
.sr-items { list-style: none; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 12px; background: #FFFFFF; }
.sr-items li { display: flex; gap: 6px; }
.sr-who { color: var(--oe-mut); font-size: 13px; }
.sr-cp { align-self: flex-start; color: var(--oe-r); border-color: #F1B5B5; background: #FFFFFF; }
@media (max-width: 760px) { .sr-items-short { display: none; } .sr-form { padding: 10px 12px; } }
