/* ממשקי צוות: בעל העסק (טאבלט) ושליחים (טלפון) */
.staff-main { max-width: 1280px; margin: 0 auto; padding: 16px 16px 48px; }
.tab { margin-top: 16px; }
.pad { padding: 18px 20px; }
.pad h2 { margin: 0 0 14px; font-size: 20px; }
.orders.grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.two-col { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }

/* מתג מצב פעילות */
.status-switch { display: flex; gap: 6px; padding: 4px; background: #f3e8df; border-radius: 14px; }
.status-switch button {
  min-width: 84px; min-height: 48px; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent;
  font-weight: 800; font-size: 17px; color: var(--muted); cursor: pointer;
}
.status-switch button.on.st-open { background: var(--ok); color: #fff; }
.status-switch button.on.st-busy { background: #d97706; color: #fff; }
.status-switch button.on.st-closed { background: #57534e; color: #fff; }

.notice { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--warn-soft); color: #7a3e06; font-weight: 600; text-align: center; }
.notice.danger { background: var(--danger-soft); color: var(--danger); }

.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.history-head h2 { margin: 0 0 12px; font-size: 20px; }
.order.done { opacity: .92; }
.delivered-line { color: var(--ok); font-weight: 600; font-size: 14px; }

.courier-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f5ede7; flex-wrap: wrap; }
.courier-row .info { flex: 1; min-width: 140px; }
.courier-row .info b { display: block; }

.order-actions { display: flex; gap: 10px; margin-top: 12px; }
.order-actions .btn { flex: 1; }
.btn.deliver { min-height: 56px; font-size: 19px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 10px; background: #f6ebe3; font-weight: 700; font-size: 15px; text-decoration: none; }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .status-switch { width: 100%; }
  .status-switch button { flex: 1; min-width: 0; }
  .orders.grid { grid-template-columns: 1fr; }
}

/* ---------- עורך התפריט ---------- */
.menu-editor { display: grid; gap: 14px; max-width: 900px; }
.menu-bar {
  position: sticky; top: 84px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; font-weight: 600; color: var(--muted);
}
.menu-bar.dirty { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.menu-bar-actions { display: flex; gap: 8px; }
.menu-h2 { margin: 18px 0 0; font-size: 22px; }
.menu-editor > p.muted { margin: 0; }
.fee-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.inline-field { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.menu-cat { display: grid; gap: 8px; }
.cat-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cat-name { flex: 1; min-width: 160px; min-height: 46px; padding: 8px 12px; font-size: 19px; font-weight: 800; border: 1.5px solid transparent; border-radius: 10px; background: #fdf7f2; }
.menu-editor input:focus, .menu-editor select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(194 65 12 / 15%); }
.menu-editor select { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.mi { border-bottom: 1px solid #f5ede7; padding: 6px 0; }
.mi.is-off .mi-name { color: var(--muted); text-decoration: line-through; }
.mi-row { display: flex; align-items: center; gap: 8px; }
.mi-name { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; }
.money-input { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--muted); }
.money-input input { width: 76px; min-height: 44px; padding: 8px; border: 1.5px solid var(--line); border-radius: 10px; text-align: center; font-weight: 700; color: var(--text); }
.mi-more { padding: 10px 4px 4px; }
.mi-more .field { margin-bottom: 10px; }
.mi-more select { width: 100%; }
.mi-actions { display: flex; gap: 8px; align-items: center; }
.mi-actions .btn { margin-inline-start: auto; }
.icon-btn { width: 44px; height: 44px; flex: none; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 18px; cursor: pointer; color: var(--brand-dark); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--danger); border-color: #f3c9c9; }
.avail { flex: none; min-width: 72px; min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 0; font-weight: 800; cursor: pointer; }
.avail.on { background: var(--ok-soft); color: var(--ok); }
.avail.off { background: var(--danger-soft); color: var(--danger); }
.add-btn { justify-self: start; }
@media (max-width: 640px) {
  .menu-bar { top: 128px; }
  .money-input input { width: 62px; }
}


/* ---------- קופונים ---------- */
.coupons-layout { grid-template-columns: minmax(300px, 1fr) minmax(300px, 1.2fr); }
@media (max-width: 760px) { .coupons-layout { grid-template-columns: 1fr; } }
.coupon-form .check { display: flex; margin: 4px 0 10px; }
.code-row { display: flex; gap: 8px; align-items: center; }
.code-row input { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.field small { display: block; margin-top: 4px; font-size: 13px; }
.seg { display: flex; gap: 6px; padding: 4px; background: #f6ebe3; border-radius: 12px; }
.seg label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 9px; font-weight: 600; cursor: pointer; }
.seg label:has(input:checked) { background: #fff; box-shadow: var(--shadow); }
.seg input { accent-color: var(--brand); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.coupon {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 14px; margin-bottom: 12px; border: 2px dashed #e6cbb7; border-radius: 16px; background: #fffdf8;
}
.coupon.on { border-color: var(--brand); background: #fff8f2; }
.coupon.off, .coupon.expired { opacity: .7; }
.coupon-main { flex: 1; min-width: 180px; }
.coupon-top { display: flex; align-items: center; gap: 10px; }
.coupon-code { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: 1.5px; }
.coupon-label { font-weight: 700; color: var(--brand-dark); margin: 2px 0; }
.coupon-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill.on { background: var(--ok-soft); color: var(--ok); }
.pill.off { background: #eee8e4; color: #5d524b; }
.pill.expired { background: var(--danger-soft); color: var(--danger); }

/* נגיעה של המיתוג החדש בממשקי הצוות */
.tabs button { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.status-switch button { font-family: var(--font-display); font-weight: 600; }
.order-num { color: var(--brand); }
/* תיקוני טופס הקופון: כללי .field input לא חלים על רדיו ועל שורת הקוד */
.seg input { width: auto; min-height: 0; padding: 0; flex: none; }
.code-row input { width: auto; }
.code-row .btn { flex: none; }
.field > .code-row { display: flex; margin-bottom: 0; font-weight: 400; }

/* ---------- הזמנה שבוטלה ---------- */
.order.cancelled { opacity: .85; border-style: dashed; }
.order.cancelled .order-num { text-decoration: line-through; color: var(--muted); }
.cancelled-line { color: var(--danger); font-weight: 600; font-size: 14px; }
.refund-note { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: #7a3e06; font-weight: 500; }
.refund { margin-top: 8px; padding: 7px 11px; border-radius: 10px; background: #f6efe9; color: #5d524b; font-weight: 500; font-size: 14px; }
.refund.ok { background: var(--ok-soft); color: var(--ok); }
.refund.bad { background: var(--danger-soft); color: var(--danger); }
.refund-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.refund .ltr { white-space: nowrap; }

/* ---------- חיבור סליקה ---------- */
.pay-status { padding: 10px 12px; border-radius: 12px; background: #f6efe9; margin-bottom: 12px; }
.pay-status.ok { background: var(--ok-soft); color: #1d5e32; }
.pay-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.field select { width: 100%; min-height: 46px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.field input[type=color] { padding: 4px; min-height: 46px; }
.license-bar { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; font-weight: 600; text-align: center; }
.license-bar.warn { background: var(--warn-soft); color: #7a3e06; }
.license-bar.bad { background: var(--danger); color: #fff; }
.purge { margin-bottom: 16px; border-color: #f3c9c9; }
.purge h2 { color: var(--danger); }
.del-order { color: var(--muted); }
