/* ===== Restaurant Manager — Frontend CSS v1.0.6 (RTL/فارسی) ===== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap');

:root {
  --rm-primary: #e65c00;
  --rm-green:   #27ae60;
  --rm-blue:    #1565c0;
  --rm-red:     #c0392b;
  --rm-addon:   #ff6f00;
}

.rm-sc *, .rm-sc *::before, .rm-sc *::after {
  box-sizing: border-box;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* ─── Base panel ─── */
.rm-sc {
  direction: rtl;
  background: #f4f5f7;
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
}

/* ─── Header ─── */
.rm-sc__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #e65c00, #f9a825);
  color: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.rm-sc--delivery .rm-sc__header { background: linear-gradient(135deg,#1565c0,#42a5f5); }
.rm-sc--cashier  .rm-sc__header { background: linear-gradient(135deg,#1b5e20,#43a047); }
.rm-sc--waiter   .rm-sc__header { background: linear-gradient(135deg,#4a148c,#9c27b0); }

.rm-sc__header h2 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; flex: 1; }
.rm-sc__clock { font-size: 16px; font-weight: 500; letter-spacing: 1px; }
.rm-sc__badge {
  background: rgba(255,255,255,.25);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.rm-sc__refresh {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.5);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.rm-sc__refresh:hover { background: rgba(255,255,255,.35); }

/* ─── Orders grid ─── */
.rm-sc__orders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.rm-sc__loading, .rm-sc__empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: #888;
}

/* ══════════════════════════════════════
   کارت سفارش
══════════════════════════════════════ */
.rm-sc__card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.09);
  overflow: hidden;
  transition: transform .15s;
  border: 2px solid transparent;
}
.rm-sc__card:hover { transform: translateY(-2px); }

.rm-sc__card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}
.rm-sc__card-num   { font-weight: 700; color: #e65c00; font-size: 15px; }
.rm-sc__card-table {
  background: #fff9c4;
  color: #5d4037;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.rm-sc__card-time  { margin-right: auto; font-size: 12px; color: #999; }
.rm-sc__card-total { font-weight: 700; color: #2e7d32; font-size: 14px; }

.rm-sc__card-items { list-style: none; margin: 0; padding: 10px 14px; }
.rm-sc__card-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  font-size: 13px;
}
.rm-sc__card-items li:last-child { border: none; }
.rm-item-name { flex: 1; }
.rm-sc__item-note { color: var(--rm-primary); font-size: 11px; font-style: italic; }

.rm-sc__card-actions { padding: 10px 14px; background: #fafafa; border-top: 1px solid #eee; }

/* ─── Buttons ─── */
.rm-sc__btn {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  margin-bottom: 4px;
}
.rm-sc__btn:last-child { margin-bottom: 0; }
.rm-sc__btn:disabled { opacity: .5; cursor: not-allowed; }
.rm-sc__btn--kitchen  { background: #e65c00; color: #fff; }
.rm-sc__btn--delivery { background: #1565c0; color: #fff; }
.rm-sc__btn--print    { background: #546e7a; color: #fff; }
.rm-sc__btn--settle   { background: #2e7d32; color: #fff; }
.rm-sc__btn--close    { background: #bdbdbd; color: #333; }

/* ─── Notice ─── */
.rm-sc-notice {
  background: #fff3e0;
  border-right: 4px solid #e65c00;
  padding: 14px 18px;
  border-radius: 8px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* ══════════════════════════════════════
   قیمت / تعداد + diff الحاقیه
══════════════════════════════════════ */
.rm-item-qty-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.qty {
  background: var(--rm-primary);
  color: #fff;
  border-radius: 50%;
  min-width: 26px; height: 26px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.qty--old { background: #9e9e9e; }
.qty--new { background: var(--rm-green); }
.rm-qty-plus { font-size: 14px; font-weight: 700; color: #666; }
li.rm-item-new { background: #f1f8f1; border-radius: 6px; padding: 6px 8px; }

/* ── بنرهای الحاقیه ── */
.rm-sc__addon-banner {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rm-addon-icon { font-size: 14px; }
.rm-addon-meta {
  margin-right: auto;
  font-size: 11px;
  font-weight: 400;
  opacity: .85;
  background: rgba(0,0,0,.15);
  padding: 2px 8px;
  border-radius: 10px;
}
.rm-sc__addon-banner--only { background: var(--rm-addon); color: #fff; }
.rm-sc__card--only-addon { border-color: var(--rm-addon); box-shadow: 0 0 0 3px rgba(255,111,0,.15); }
.rm-sc__card--only-addon .rm-sc__card-num { color: var(--rm-addon); }
.rm-sc__card--only-addon .rm-sc__btn--kitchen  { background: var(--rm-addon); }
.rm-sc__card--only-addon .rm-sc__btn--delivery { background: #d84315; }

.rm-sc__addon-banner--diff { background: #e3f2fd; color: #1565c0; }
.rm-sc__card--diff { border-color: #90caf9; box-shadow: 0 0 0 3px rgba(33,150,243,.12); }

/* ── انیمیشن‌ها ── */
@keyframes rm-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(230,92,0,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(230,92,0,0); }
}
.rm-sc__card--new { animation: rm-pulse 1.5s ease-in-out 3; }

@keyframes rm-addon-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(255,111,0,.15); }
  50%      { box-shadow: 0 0 0 8px rgba(255,111,0,.3); }
}
.rm-sc__card--only-addon { animation: rm-addon-pulse 1.2s ease-in-out 4; }

@keyframes rm-diff-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(33,150,243,.12); }
  50%      { box-shadow: 0 0 0 8px rgba(33,150,243,.25); }
}
.rm-sc__card--diff { animation: rm-diff-pulse 1.2s ease-in-out 4; }

/* ══════════════════════════════════════
   مودال صندوق — دو ستونه
══════════════════════════════════════ */
.rm-sc__modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.rm-sc__modal-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  direction: rtl;
}
.rm-sc__modal-box h3 { margin: 0 0 14px; font-size: 16px; }
.rm-sc__modal-body { margin-bottom: 14px; }
.rm-sc__modal-footer { display: flex; flex-direction: column; gap: 8px; }

/* مودال صندوق دو ستونه */
.rm-sc__modal-box--wide {
  max-width: 860px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.rm-sc__modal-cols { display: flex; flex: 1; overflow: hidden; }

.rm-sc__modal-preview { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.rm-sc__modal-preview-header {
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #555;
}
.rm-sc__modal-preview .rm-sc__modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fafafa;
  margin: 0;
}
.rm-sc__modal-preview .rm-sc__modal-body .invoice {
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.rm-sc__modal-edit {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rm-sc__modal-edit-header {
  background: linear-gradient(135deg,#1e7e34,#43a047);
  color: #fff;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
}
.rm-sc__modal-edit-body { flex: 1; overflow-y: auto; padding: 14px; }

.rm-sc__modal-box--wide .rm-sc__modal-footer {
  flex-direction: row;
  padding: 12px 16px;
  background: #fafafa;
  border-top: 1px solid #e0e0e0;
  gap: 8px;
}
.rm-sc__modal-box--wide .rm-sc__btn { width: auto; flex: 1; margin: 0; }

/* ── جدول ویرایش ── */
.rm-edit-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px; }
.rm-edit-table th {
  background: #f5f5f5;
  padding: 7px 8px;
  text-align: right;
  font-weight: 700;
  font-size: 12px;
  color: #555;
  border-bottom: 2px solid #e0e0e0;
}
.rm-edit-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.rm-edit-name { font-size: 13px; line-height: 1.4; }
.rm-edit-price { font-size: 12px; color: #666; white-space: nowrap; }

.rm-qty-ctrl { display: flex; align-items: center; gap: 4px; }
.rm-qty-step {
  width: 26px; height: 26px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background .1s;
  flex-shrink: 0;
}
.rm-qty-step:hover { background: #e0e0e0; }
.rm-qty-input {
  width: 44px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px;
  font-family: inherit;
  font-size: 13px;
}
.rm-qty-input:focus { outline: none; border-color: var(--rm-green); }

/* ── فیلدها ── */
.rm-field-group { margin-bottom: 12px; }
.rm-field-group label { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 5px; }
.rm-field-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  direction: rtl;
  transition: border-color .15s;
}
.rm-field-group input:focus { outline: none; border-color: var(--rm-green); box-shadow: 0 0 0 3px rgba(39,174,96,.1); }

.rm-total-display {
  background: #f1f8f1;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #2e7d32;
  margin-top: 10px;
  line-height: 1.8;
}
.rm-total-display strong { font-size: 15px; }
.rm-discount-tag { color: var(--rm-red); font-size: 12px; }

.rm-btn--apply {
  width: 100%;
  padding: 10px;
  background: var(--rm-green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 12px;
}
.rm-btn--apply:hover { opacity: .88; }
.rm-btn--apply:disabled { opacity: .5; cursor: not-allowed; }

/* ══════════════════ WAITER PANEL ══════════════════ */

/* ─── Tabs ─── */
.rm-wt__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  background: #f4f5f7;
  z-index: 10;
  padding-top: 2px;
}
.rm-wt__tab {
  padding: 10px 18px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #666;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 6px 6px 0 0;
  transition: color .15s;
}
.rm-wt__tab--active { color: #6a0dad; border-bottom-color: #6a0dad; background: rgba(106,13,173,.06); }
.rm-wt__tab:hover:not(.rm-wt__tab--active) { color: #333; }

/* ─── Table select ─── */
.rm-wt__table-select {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.rm-wt__table-select label { display: block; font-weight: 700; margin-bottom: 10px; font-size: 14px; }
.rm-wt__table-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rm-wt__table-btn {
  padding: 9px 18px;
  border: 2px solid #e0e0e0;
  background: #fafafa;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  color: #333;
  min-height: 42px; /* touch-friendly */
}
.rm-wt__table-btn:hover { border-color: #6a0dad; color: #6a0dad; }
.rm-wt__table-btn--selected { background: #6a0dad; border-color: #6a0dad; color: #fff; }
.rm-wt__selected-table { font-size: 13px; color: #888; min-height: 22px; }
.rm-wt__selected-table.has-table { color: #2e7d32; font-weight: 700; }

/* ─── Search ─── */
.rm-wt__search-wrap { margin-bottom: 12px; position: sticky; top: 44px; z-index: 9; }
.rm-wt__search {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  direction: rtl;
  background: #fff;
}
.rm-wt__search:focus { outline: none; border-color: #6a0dad; box-shadow: 0 0 0 3px rgba(106,13,173,.1); }

/* ─── Menu ─── */
.rm-wt__menu { margin-bottom: 14px; }
.rm-wt__cat-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  padding: 8px 0 6px;
  border-bottom: 2px solid #6a0dad;
  margin-bottom: 10px;
}
.rm-wt__products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.rm-wt__product {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 5px rgba(0,0,0,.09);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s;
}
.rm-wt__product:hover { box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.rm-wt__product-img { width: 100%; height: 120px; object-fit: cover; }
.rm-wt__product-img-placeholder {
  width: 100%; height: 120px;
  background: linear-gradient(135deg,#f3e5f5,#e8eaf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.rm-wt__product-body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; }
.rm-wt__product-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: #222; }
.rm-wt__product-desc {
  font-size: 11px; color: #888; margin-bottom: 6px; flex: 1; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rm-wt__product-price { font-size: 13px; font-weight: 700; color: #2e7d32; margin-bottom: 8px; }
.rm-wt__product-note {
  width: 100%; padding: 8px 10px;
  border: 1px solid #e0e0e0; border-radius: 6px;
  font-family: inherit; font-size: 13px;
  margin-bottom: 8px; direction: rtl;
  min-height: 38px; /* touch-friendly */
}
.rm-wt__product-note:focus { outline: none; border-color: #6a0dad; }
.rm-wt__add-btn {
  width: 100%; padding: 11px;
  background: #6a0dad; color: #fff;
  border: none; border-radius: 7px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .15s;
  min-height: 42px; /* touch-friendly */
}
.rm-wt__add-btn:hover { background: #4a0080; }
.rm-wt__add-btn--added { background: #2e7d32; }

/* ─── Cart ─── */
.rm-wt__cart-wrap {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 5px rgba(0,0,0,.08);
  margin-bottom: 14px;
  scroll-margin-top: 90px;
}
.rm-wt__cart-wrap h3 { margin: 0 0 12px; font-size: 15px; }
.rm-wt__cart { min-height: 50px; }
.rm-wt__cart-empty { color: #aaa; font-size: 13px; padding: 10px 0; }
.rm-wt__cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed #eee;
  font-size: 13px;
}
.rm-wt__cart-item:last-child { border: none; }
.rm-wt__cart-item-name { flex: 1; font-weight: 500; min-width: 0; word-break: break-word; }
.rm-wt__cart-item-note { font-size: 11px; color: #e65c00; }
.rm-wt__cart-item-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rm-wt__qty-btn {
  width: 30px; height: 30px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.rm-wt__qty-btn:hover { background: #e0e0e0; }
.rm-wt__cart-item-qty { font-weight: 700; min-width: 24px; text-align: center; }
.rm-wt__cart-item-del {
  background: none; border: none; color: #e53935;
  cursor: pointer; font-size: 18px; padding: 4px 6px;
  line-height: 1; flex-shrink: 0;
}
.rm-wt__cart-total { font-size: 15px; font-weight: 700; color: #2e7d32; margin-top: 10px; text-align: left; }
.rm-wt__submit-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg,#2e7d32,#43a047);
  color: #fff; border: none; border-radius: 10px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.rm-wt__submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.rm-wt__submit-btn:not(:disabled):hover { opacity: .9; }

/* ─── Active orders (edit tab) ─── */
.rm-wt__active-orders { display: flex; flex-direction: column; gap: 10px; }
.rm-wt__order-row {
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 1px 5px rgba(0,0,0,.09);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rm-wt__order-info { flex: 1; min-width: 140px; }
.rm-wt__order-info strong { display: block; font-size: 14px; }
.rm-wt__order-info small { font-size: 12px; color: #888; }
.rm-wt__order-status {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  background: #fff3e0;
  color: #e65c00;
  font-weight: 700;
  white-space: nowrap;
}
.rm-wt__order-total { font-weight: 700; color: #2e7d32; white-space: nowrap; }
.rm-wt__order-edit {
  padding: 9px 16px;
  background: #6a0dad;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
}

/* ─── Toast ─── */
.rm-wt__toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #2e7d32;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  z-index: 99999;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  direction: rtl;
  max-width: 90vw;
}
.rm-wt__toast--error { background: #c62828; }

/* ─── Menu compact (مودال ویرایش) ─── */
.rm-wt__menu--compact .rm-wt__products { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.rm-wt__menu--compact .rm-wt__product-img,
.rm-wt__menu--compact .rm-wt__product-img-placeholder { height: 80px; }

/* ══════════════════════════════════════
   نوار شناور سبد خرید (موبایل)
══════════════════════════════════════ */
.rm-wt__cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg,#2e7d32,#43a047);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  z-index: 9998;
  box-shadow: 0 -2px 12px rgba(0,0,0,.18);
  transform: translateY(110%);
  transition: transform .25s ease;
  cursor: pointer;
  direction: rtl;
}
.rm-wt__cart-bar--visible { transform: translateY(0); }
.rm-wt__cart-bar--flash { animation: rm-bar-flash .35s ease; }
@keyframes rm-bar-flash {
  0%   { transform: translateY(0) scale(1); }
  40%  { transform: translateY(0) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}
.rm-wt__cart-bar-icon { font-size: 18px; }
.rm-wt__cart-bar-count { background: rgba(255,255,255,.25); padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.rm-wt__cart-bar-total { margin-right: auto; }
.rm-wt__cart-bar-action { font-size: 12px; opacity: .9; font-weight: 500; }

/* فضای پایین برای جلوگیری از پوشاندن محتوا توسط نوار */
.rm-sc--waiter { padding-bottom: 70px; }

/* ══════════════════════════════════════
   📱 ریسپانسیو
══════════════════════════════════════ */
@media (max-width: 768px) {
  .rm-sc { padding: 12px; margin: 12px 0; border-radius: 10px; }

  .rm-sc__header { padding: 10px 14px; gap: 8px; }
  .rm-sc__header h2 { font-size: 16px; flex: 1 1 100%; order: 1; }
  .rm-sc__clock { order: 2; font-size: 14px; }
  .rm-sc__badge { order: 3; font-size: 11px; }
  .rm-sc__refresh { order: 4; font-size: 11px; }

  .rm-sc__orders { grid-template-columns: 1fr; gap: 10px; }

  .rm-sc__card-head { padding: 9px 12px; }
  .rm-sc__card-items { padding: 8px 12px; }
  .rm-sc__card-items li { font-size: 13px; }
  .rm-sc__card-actions { padding: 9px 12px; }
  .rm-sc__btn { padding: 13px 14px; font-size: 14px; }

  /* مودال صندوق تمام‌صفحه */
  .rm-sc__modal { padding: 0; }
  .rm-sc__modal-box--wide {
    width: 100vw; max-width: 100vw;
    height: 100vh; max-height: 100vh;
    border-radius: 0;
  }
  .rm-sc__modal-cols { flex-direction: column; }
  .rm-sc__modal-edit { width: 100%; border-left: none; border-top: 1px solid #e0e0e0; order: 2; max-height: 45vh; }
  .rm-sc__modal-preview { order: 1; }
  .rm-sc__modal-box--wide .rm-sc__modal-footer { flex-wrap: wrap; }
  .rm-sc__modal-box--wide .rm-sc__btn { flex: 1 1 100%; }

  /* مودال ساده (افزودن آیتم گارسون) */
  .rm-sc__modal-box:not(.rm-sc__modal-box--wide) {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  /* ─── Waiter: موبایل ─── */
  .rm-wt__tabs { top: -12px; padding: 12px 0 0; margin: -12px -12px 12px; padding-right: 12px; padding-left: 12px; }
  .rm-wt__search-wrap { top: 50px; }

  .rm-wt__products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rm-wt__product-img,
  .rm-wt__product-img-placeholder { height: 90px; }
  .rm-wt__product-name { font-size: 13px; }
  .rm-wt__product-desc { display: none; } /* صرفه‌جویی فضا در موبایل */
  .rm-wt__product-body { padding: 8px 10px; }

  .rm-wt__menu--compact .rm-wt__products { grid-template-columns: repeat(2, 1fr); }

  .rm-wt__table-grid { gap: 6px; }
  .rm-wt__table-btn { padding: 10px 14px; font-size: 13px; flex: 1 1 auto; min-width: 60px; text-align: center; }

  .rm-wt__order-row { flex-direction: column; align-items: stretch; }
  .rm-wt__order-edit { width: 100%; }

  .rm-wt__toast { left: 12px; right: 12px; bottom: 80px; text-align: center; }
}

@media (max-width: 420px) {
  .rm-sc__addon-banner { font-size: 11px; padding: 7px 10px; }
  .rm-addon-meta { width: 100%; margin-right: 0; text-align: center; }
  .rm-wt__products { grid-template-columns: 1fr; }
}

/* ── چاپ ── */
@media print {
  body > *:not(.rm-sc__modal) { display: none !important; }
  .rm-sc__modal { position: static; background: none; padding: 0; }
  .rm-sc__modal-box { box-shadow: none; max-height: none; overflow: visible; height: auto; }
  .rm-sc__modal-edit,
  .rm-sc__modal-preview-header,
  .rm-sc__modal-footer { display: none !important; }
  .rm-sc__modal-preview { display: block; overflow: visible; }
  .rm-sc__modal-body { overflow: visible; padding: 0; background: #fff; }
}
