/* ألوان خبزينو: أزرق فاتح #AEE5F0 للخلفيات والحدود، برتقالي #F5891A للأزرار، وكتابة #333 */
:root {
  --bg: #f3fbfd;
  --card: #ffffff;
  --ink: #333333;
  --muted: #5b6468;
  --line: #cde9f0;
  --primary: #F5891A;
  --primary-dark: #d9720c;
  --accent: #AEE5F0;
  --ok: #2f7d4f;
  --warn: #8a5a00;
  --bad: #b3261e;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(51, 51, 51, 0.08);
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Geeza Pro", "Arial", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 80px;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 14px;
}

h1, h2, h3 { line-height: 1.3; margin: 0; }

a { color: var(--ink); }

/* الهيدر */
.site-header {
  background: var(--primary);
  color: var(--ink);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
}
.brand-name { font-size: 22px; font-weight: 800; }
.header-note { font-size: 13px; opacity: 0.9; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 14px 0;
}

.section-title {
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--ink);
  font-size: 14px;
  flex: 0 0 auto;
}

.hint { color: var(--muted); font-size: 14px; margin: 6px 0; }

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 15px;
}
.alert-error { background: #fdecea; color: var(--bad); border: 1px solid #f5c2bd; }

/* الفروع */
.branch-list {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .branch-list { grid-template-columns: repeat(3, 1fr); }
}
.branch-option {
  position: relative;
  display: block;
  cursor: pointer;
}
.branch-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.branch-option span {
  display: block;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 700;
  background: #fff;
  min-height: 52px;
}
.branch-option input:checked + span {
  border-color: var(--primary);
  background: #fdf1ec;
  color: var(--primary-dark);
}
.branch-option input:focus-visible + span {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* التابات والمنيو */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
  margin-bottom: 4px;
  scrollbar-width: thin;
}
.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 42px;
}
.tab[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--ink);
}

.menu-category-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 14px 0 6px;
}
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding: 12px 0;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item-info { min-width: 0; flex: 1 1 auto; }
.menu-item-name { font-weight: 800; }
.menu-item-desc { color: var(--muted); font-size: 14px; }
.menu-item-price { font-weight: 800; white-space: nowrap; color: var(--ink); font-size: 15px; }
.menu-item.unavailable { opacity: 0.55; }
.unavailable-tag { font-size: 13px; color: var(--warn); font-weight: 700; }

/* عدّاد الكمية */
.qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.qty-btn:hover { background: #fdf1ec; }
.qty-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.qty-value {
  min-width: 30px;
  text-align: center;
  font-weight: 800;
  font-size: 17px;
}
.add-btn {
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  white-space: nowrap;
}
.add-btn:hover { background: var(--primary-dark); }
.add-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.add-btn:disabled { background: #bdb2a8; cursor: not-allowed; }

/* السلة */
.cart-lines { list-style: none; padding: 0; margin: 0; }
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: 0; }
.cart-line-name { font-weight: 700; flex: 1 1 auto; min-width: 0; }
.cart-line-price { font-weight: 700; white-space: nowrap; min-width: 70px; text-align: left; }
.remove-btn {
  border: 0;
  background: none;
  color: var(--bad);
  font: inherit;
  cursor: pointer;
  padding: 6px;
  min-height: 40px;
}

.totals { margin: 12px 0 0; }
.totals > div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 700; }
.totals .grand { border-top: 2px solid var(--line); margin-top: 6px; padding-top: 8px; }
.totals .grand dt, .totals .grand dd { color: var(--ink); font-size: 18px; font-weight: 800; }

/* الفورم */
.field { margin: 12px 0; border: 0; padding: 0; }
.field label, .field legend {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}
input[type="text"], input[type="tel"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid #cfc2b3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  min-height: 46px;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.method-list { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  font-weight: 700;
  min-height: 52px;
  background: #fff;
}
.choice:has(input:checked) {
  border-color: var(--primary);
  background: #fdf1ec;
}
.choice input { width: 20px; height: 20px; accent-color: var(--primary); }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 800;
  font-size: 17px;
  border-radius: 12px;
  padding: 12px 18px;
  min-height: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--ink); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #bdb2a8; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-block { width: 100%; margin-top: 6px; }
.btn-small { min-height: 42px; padding: 8px 14px; font-size: 15px; }
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* تأكيد الطلب */
.done-card { text-align: center; border: 2px solid var(--ok); }
.done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--ok);
  color: var(--ink);
  font-size: 34px;
  line-height: 64px;
  font-weight: 800;
}
.done-card .btn { margin-top: 10px; }

/* شريط السلة للموبايل */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
  padding: 10px 0;
  z-index: 20;
}
.cart-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 16px 0;
}

/* ===== الكول سنتر ===== */
.staff-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.staff-top .who { font-weight: 700; color: var(--muted); }
.toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  align-items: end;
}
@media (min-width: 620px) {
  .toolbar { grid-template-columns: 1fr 1fr auto auto; }
}
.toolbar .field { margin: 0; }
.toolbar label { font-size: 14px; }
.refresh-note { font-size: 13px; color: var(--muted); }

.orders { display: grid; gap: 12px; margin-top: 12px; }
.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-right: 6px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.order-card.is-delivery { border-right-color: #3b6ea8; }
.order-card.is-done { opacity: 0.7; }
.order-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.order-number { font-size: 18px; font-weight: 800; }
.order-time { color: var(--muted); font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
  background: #f1ebe3;
  color: var(--ink);
}
.badge-branch { background: #fdf1ec; color: var(--primary-dark); }
.badge-delivery { background: #e6eef8; color: #2b5a8a; }
.badge-pickup { background: #e9f4ec; color: var(--ok); }
.badge-phone { background: #fff4dd; color: var(--warn); }
.badge-new { background: #fdecea; color: var(--bad); }
.badge-cancelled { background: #ececec; color: #555; }
.order-body dl { margin: 0; display: grid; gap: 4px; }
.order-body dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.order-body dt { color: var(--muted); font-size: 14px; }
.order-body dd { margin: 0; word-break: break-word; }
.order-items { margin: 0; padding-right: 18px; }
.order-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.order-total { font-size: 18px; font-weight: 800; color: var(--ink); }
.status-control { display: flex; align-items: center; gap: 8px; }
.status-control select { width: auto; min-width: 170px; }
.status-control label { font-weight: 700; font-size: 14px; }

.empty-state { text-align: center; color: var(--muted); padding: 24px 0; }

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 30;
  max-width: 92%;
}

.login-card { max-width: 420px; margin: 40px auto; }
.login-card .btn-block { margin-top: 10px; }

.manual-items { display: grid; gap: 6px; }
.manual-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.manual-item input[type="number"] { width: 90px; min-height: 42px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


/* ===== إضافات الستايل الجديدة (لوجو، صور، نافذة الصنف، الفوتر) ===== */
.site-header {
  background: #ffffff;
  color: var(--ink);
  border-bottom: 3px solid var(--accent);
  box-shadow: none;
}
.brand-logo { width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; }
.brand-name { color: var(--ink); }
.login-logo { display: block; width: 120px; height: 120px; object-fit: contain; margin: 0 auto 8px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.menu-media {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #e6f8fb;
}
.menu-media img, .modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #AEE5F0, #e6f8fb);
  color: var(--ink);
  font-weight: 800;
  font-size: 26px;
}
.menu-item-en { color: var(--muted); font-size: 13px; }
.in-cart-tag {
  display: inline-block;
  margin-top: 4px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}
.tab[aria-selected="false"] { border-color: var(--accent); }
.branch-option input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.branch-option input:checked + span { box-shadow: inset 0 0 0 2px var(--primary); }

.item-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(51, 51, 51, 0.45); }
.modal-panel {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  padding: 16px;
  box-shadow: var(--shadow);
}
@media (min-width: 620px) {
  .item-modal { align-items: center; }
  .modal-panel { border-radius: 18px; }
}
body.modal-open { overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-title { font-size: 20px; font-weight: 800; }
.modal-close {
  border: 0;
  background: #eef6f8;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink);
}
.modal-media { width: 100%; height: 180px; border-radius: 14px; overflow: hidden; margin: 10px 0; background: #e6f8fb; }
.modal-media .img-placeholder { font-size: 56px; }
.modal-media-inner { width: 100%; height: 100%; }
.modal-name-en { color: var(--muted); font-size: 14px; }
.modal-sub { font-size: 16px; font-weight: 800; margin-top: 10px; }
.extras-list {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
}
.extra-option { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.extra-option:hover { background: #f0fafc; }
.extra-option input { width: 20px; height: 20px; accent-color: var(--primary); flex: 0 0 auto; }
.extra-name { flex: 1 1 auto; }
.extra-price { font-weight: 700; white-space: nowrap; font-size: 14px; }
.modal-qty-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; flex-wrap: wrap; }
.modal-total { margin-inline-start: auto; font-weight: 800; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1 1 0; }

.cart-line-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cart-line-extras { color: var(--muted); font-size: 13px; }

.site-footer {
  background: #ffffff;
  border-top: 3px solid var(--accent);
  color: var(--ink);
  padding: 18px 0;
}
.site-footer p { margin: 0; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.contact-links a { color: var(--ink); font-weight: 700; }

.manual-line { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 8px 0; }
.manual-line-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.manual-line-head select { flex: 1 1 200px; }
.manual-line-head input[type="number"] { width: 90px; }
.manual-extras { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.manual-extras label { display: inline-flex; gap: 4px; align-items: center; font-size: 14px; }
.order-extras { color: var(--muted); font-size: 13px; margin: 0; padding-inline-start: 0; list-style: none; }
