* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --background: #f4f5f7;
  --white: #ffffff;
  --text: #222222;
  --muted: #777777;
  --border: #eeeeee;
  --dark: #181818;
  --success: #198754;
  --danger: #b00020;
  --accent: #d94f00;
  --accent-light: #fff7f1;

  --pending-bg: #fff3cd;
  --pending-text: #664d03;

  --awaiting-whatsapp-bg: #dcf8c6;
  --awaiting-whatsapp-text: #075e54;

  --confirmed-bg: #dbeafe;
  --confirmed-text: #1d4ed8;

  --preparing-bg: #ffedd5;
  --preparing-text: #c2410c;

  --ready-bg: #dcfce7;
  --ready-text: #166534;

  --completed-bg: #e5e7eb;
  --completed-text: #374151;

  --cancelled-bg: #fee2e2;
  --cancelled-text: #991b1b;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

html[dir="rtl"] body {
  text-align: right;
}

#email,
#password {
  direction: ltr;
  text-align: left;
}


/* ======================================================
   LANGUAGE SWITCHER
====================================================== */

.admin-language-switcher {
  display: inline-flex;
  direction: ltr;
  border: 2px solid var(--accent);
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
}

.admin-language-switcher button {
  min-width: 48px;
  border: none;
  background: var(--white);
  color: var(--text);
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-language-switcher button.active {
  background: var(--accent);
  color: var(--white);
}

.login-language-switcher {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-sync-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.admin-sync-button {
  min-height: 38px;
  border: 2px solid var(--accent);
  background: var(--white);
  color: var(--accent);
  padding: 7px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-sync-button:hover:not(:disabled) {
  background: var(--accent-light);
}

.admin-sync-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.admin-sync-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}


/* ======================================================
   LOGIN
====================================================== */

.login-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  padding: 35px 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.login-card h1 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 8px;
}

.login-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 30px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}

.form-group input {
  width: 100%;
  height: 46px;
  border: 1px solid #d7d7d7;
  border-radius: 9px;
  padding: 0 12px;
  outline: none;
  background: var(--white);
}

.form-group input:focus {
  border-color: var(--dark);
}

#loginButton {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 9px;
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  margin-top: 5px;
}

#loginButton:hover {
  opacity: 0.9;
}

#loginButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-message {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  min-height: 18px;
  color: var(--danger);
}


/* ======================================================
   GOOGLE AUTHENTICATOR MFA
====================================================== */

.mfa-card {
  max-width: 460px;
}

.mfa-setup-panel {
  margin-bottom: 20px;
}

.mfa-qr-wrap {
  width: 220px;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 12px;
  border: 1px solid #e1e1e1;
  border-radius: 14px;
  background: #fff;
}

.mfa-qr-code {
  display: block;
  width: 100%;
  height: auto;
}

.mfa-secret-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.mfa-secret-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  direction: ltr;
}

.mfa-secret {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dedede;
  border-radius: 9px;
  background: #f7f7f7;
  color: #222;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  user-select: all;
}

.mfa-copy-button,
.mfa-secondary-button {
  border: 1px solid #cfcfcf;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.mfa-copy-button {
  min-width: 74px;
  padding: 0 12px;
}

#mfaVerifyButton {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 9px;
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  margin-top: 5px;
}

#mfaVerifyButton:disabled,
.mfa-copy-button:disabled,
.mfa-secondary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mfa-secondary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
}

#mfaCode {
  text-align: center;
  direction: ltr;
  letter-spacing: 0.34em;
  font-size: 22px;
  font-weight: 800;
}

html[dir="rtl"] #mfaCode {
  text-align: center;
}


/* ======================================================
   DASHBOARD
====================================================== */

.dashboard-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 25px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  background: var(--white);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.admin-header h1 {
  font-size: 26px;
}

.admin-header p {
  color: var(--muted);
  margin-top: 4px;
}

#logoutButton {
  border: none;
  background: var(--dark);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

#logoutButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ======================================================
   ADMIN RESTAURANT BRAND / LOGO
====================================================== */

.admin-header-brand {
  min-width: 0;
}

.admin-restaurant-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.admin-restaurant-logo {
  width: 50px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.admin-header .admin-restaurant-identity p {
  margin-top: 0;
}

@media (max-width: 700px) {

  .admin-restaurant-logo {
    width: 44px;
    height: 28px;
  }

}

/* ======================================================
   MAIN NAVIGATION
====================================================== */

.admin-navigation {
  width: 100%;
  max-width: 1150px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.admin-nav-btn {
  border: 2px solid #cfcfcf;
  background: var(--white);
  color: var(--text);
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.admin-nav-btn:hover {
  border-color: var(--accent);
}

.admin-nav-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.admin-nav-icon {
  font-size: 19px;
}


/* ======================================================
   CONTENT PANEL
====================================================== */

#ordersContainer {
  width: 100%;
}

.admin-page-panel {
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.admin-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.admin-page-heading h2 {
  font-size: 24px;
}

.admin-page-heading p {
  color: var(--muted);
  margin-top: 4px;
}


/* ======================================================
   ORDER FILTERS
====================================================== */

.order-type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.order-type-filter-btn {
  border: 1px solid #d8d8d8;
  background: var(--white);
  color: var(--text);
  border-radius: 20px;
  padding: 8px 13px;
  font-weight: 700;
  cursor: pointer;
}

.order-type-filter-btn:hover {
  border-color: var(--accent);
}

.order-type-filter-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.order-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.order-filter-btn {
  border: 1px solid #d8d8d8;
  background: var(--white);
  color: var(--text);
  border-radius: 20px;
  padding: 8px 13px;
  font-weight: 700;
  cursor: pointer;
}

.order-filter-btn:hover {
  border-color: var(--accent);
}

.order-filter-btn.active {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

.orders-list {
  width: 100%;
}


/* ======================================================
   STATES
====================================================== */

.admin-state-card {
  background: #fafafa;
  padding: 25px;
  border-radius: 14px;
  text-align: center;
  margin-top: 18px;
  border: 1px solid var(--border);
}

.admin-state-card p {
  color: var(--muted);
  margin-top: 8px;
}

.admin-state-error {
  color: var(--danger);
  font-weight: 700;
}


/* ======================================================
   ORDER CARD
====================================================== */

.order-card {
  background: var(--white);
  padding: 22px;
  border: 1px solid #ececec;
  border-radius: 14px;
  margin-top: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.order-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  flex-wrap: wrap;
}

.order-card-top h2 {
  font-size: 22px;
}

.order-date {
  color: var(--muted);
  margin-top: 5px;
}

.order-number-value,
.ltr-value,
.money-value {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

.status-badge {
  padding: 7px 12px;
  border-radius: 20px;
  font-weight: bold;
}

.status-pending {
  background: var(--pending-bg);
  color: var(--pending-text);
}

.status-awaiting_whatsapp {
  background: var(--awaiting-whatsapp-bg);
  color: var(--awaiting-whatsapp-text);
}

.status-confirmed {
  background: var(--confirmed-bg);
  color: var(--confirmed-text);
}

.status-preparing {
  background: var(--preparing-bg);
  color: var(--preparing-text);
}

.status-ready {
  background: var(--ready-bg);
  color: var(--ready-text);
}

.status-completed {
  background: var(--completed-bg);
  color: var(--completed-text);
}

.status-cancelled {
  background: var(--cancelled-bg);
  color: var(--cancelled-text);
}

.order-divider {
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.order-details {
  display: grid;
  gap: 9px;
}

.payment-detail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.payment-display {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid #e3e3e3;
  border-radius: 9px;
  background: #fafafa;
  font-weight: 600;
}

.payment-icon {
  width: 34px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}


/* ======================================================
   ORDER ITEMS
====================================================== */

.order-items-section {
  margin-top: 20px;
}

.order-items-section h3 {
  font-size: 18px;
}

.order-items-list {
  margin-top: 8px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.order-item-name {
  min-width: 0;
}

.order-item-secondary {
  color: var(--muted);
  margin-top: 3px;
  font-size: 14px;
}

.order-item-price {
  text-align: end;
  white-space: nowrap;
}

.order-item-price span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}


/* ======================================================
   TOTAL + CONFIRM
====================================================== */

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px solid var(--border);
}

.order-total-values {
  text-align: end;
}

.order-total-values strong {
  display: block;
  font-size: 21px;
}

.order-total-values span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.confirm-order-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px 18px;
  border: none;
  border-radius: 9px;
  background: var(--success);
  color: var(--white);
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}

.confirm-order-btn:hover {
  filter: brightness(0.94);
}

.confirm-order-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ======================================================
   RTL
====================================================== */

html[dir="rtl"] .payment-display {
  direction: rtl;
}

html[dir="rtl"] .order-date {
  text-align: right;
}

html[dir="rtl"] .order-item-secondary {
  direction: ltr;
  text-align: right;
}

html[dir="ltr"] .order-item-secondary {
  direction: rtl;
  text-align: left;
}


/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 700px) {

  .login-card {
    padding: 28px 22px;
  }

  .dashboard-section {
    padding: 14px;
  }

  .admin-header {
    padding: 16px;
    align-items: flex-start;
  }

  .admin-header-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  html[dir="rtl"]
  .admin-header-actions {
    align-items: flex-start;
  }

  .admin-sync-control {
    align-items: flex-end;
  }

  html[dir="rtl"]
  .admin-sync-control {
    align-items: flex-start;
  }

  .admin-navigation {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-nav-btn {
    justify-content: flex-start;
  }

  html[dir="rtl"]
  .admin-nav-btn {
    justify-content: flex-start;
  }

  .admin-page-panel {
    padding: 14px;
  }

  .order-type-filters,
  .order-status-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
  }

  .order-type-filter-btn {
    white-space: nowrap;
  }

  .order-filter-btn {
    white-space: nowrap;
  }

  .order-card {
    padding: 17px;
  }

  .payment-detail {
    align-items: flex-start;
  }

  .order-item {
    gap: 10px;
  }

  .payment-icon {
    width: 30px;
    height: 26px;
  }
}


/* ======================================================
   COMPACT ORDERS + SEARCH + PAGINATION
====================================================== */

.orders-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.orders-search-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.orders-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 17px;
}

html[dir="rtl"] .orders-search-icon {
  left: auto;
  right: 14px;
}

.orders-search-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 44px;
  border: 1px solid #d7d7d7;
  border-radius: 11px;
  background: var(--white);
  color: var(--text);
  outline: none;
  font-size: 15px;
}

html[dir="rtl"] .orders-search-input {
  padding: 0 44px 0 14px;
}

.orders-search-input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px
    rgba(217, 79, 0, 0.10);
}

.orders-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.compact-order {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
  box-shadow:
    0 2px 9px
    rgba(0, 0, 0, 0.035);
}

.compact-order.expanded {
  border-color: #d5d5d5;
  box-shadow:
    0 4px 15px
    rgba(0, 0, 0, 0.055);
}

.compact-order-summary {
  width: 100%;
  min-height: 64px;
  border: none;
  background: var(--white);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;

  display: grid;
  grid-template-columns:
    70px
    minmax(150px, 1.5fr)
    minmax(145px, 1fr)
    minmax(110px, 0.9fr)
    90px
    minmax(105px, auto)
    28px;

  gap: 12px;
  align-items: center;
  text-align: start;
}

.compact-order-summary:hover {
  background: #fafafa;
}

.compact-order-number {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
  direction: ltr;
  unicode-bidi: embed;
}

.compact-order-customer {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.compact-order-customer strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-order-customer span {
  color: var(--muted);
  font-size: 13px;
}

.compact-order-date {
  color: var(--muted);
  font-size: 13px;
}

.compact-order-type {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin-top: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-order-type.order-type-delivery {
  background: #e0f2fe;
  color: #075985;
}

.compact-order-type.order-type-takeaway {
  background: #fff4d6;
  color: #9a6700;
}

.compact-order-type.order-type-dine_in {
  background: #ede9fe;
  color: #5b21b6;
}

.compact-order-type.order-type-drive_thru {
  background: #dcfce7;
  color: #166534;
}


.compact-order-payment {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 600;
}

.compact-payment-icon {
  width: 30px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.compact-order-total {
  font-weight: 800;
  text-align: end;
}

.compact-status {
  justify-self: start;
  white-space: nowrap;
  font-size: 13px;
}

.compact-order-chevron {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.compact-order-details {
  padding: 18px;
  border-top: 1px solid var(--border);
  background: #fcfcfc;
}

.compact-details-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 11px 20px;
}

.admin-order-location-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #d95d12;
  border-radius: 8px;
  color: #b84500;
  background: #fff8f3;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.admin-order-location-link:hover {
  background: #fff0e4;
}

.details-full-row {
  grid-column: 1 / -1;
}

.compact-order-details
.order-items-section {
  margin-top: 18px;
}

.compact-order-details
.order-total-row {
  margin-top: 16px;
}

.orders-pagination {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.pagination-count {
  color: var(--muted);
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-btn {
  border: 1px solid #d8d8d8;
  background: var(--white);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination-page {
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
}

/* Desktop retains the original date and status columns. */
.compact-order-mobile-meta {
  display: none;
}

@media (max-width: 950px) {

  .compact-order-summary {
    grid-template-columns:
      65px
      minmax(140px, 1.3fr)
      minmax(110px, 0.9fr)
      80px
      minmax(100px, auto)
      24px;
  }

  .compact-order-payment {
    display: none;
  }

}

@media (max-width: 700px) {

  .orders-search-wrap {
    max-width: none;
  }

  .compact-order-summary {
    grid-template-columns:
      62px
      minmax(0, 1fr)
      auto
      22px;

    gap: 8px;
    padding: 11px;
  }

  .compact-order-date,
  .compact-order-payment,
  .compact-status {
    display: none;
  }

  /* BATCH 228: Never hide date and status from the mobile order list. */
  .compact-order-mobile-meta {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
    flex-wrap: wrap;
    min-width: 0;
    border-top: 1px solid #eeeeee;
    padding-top: 7px;
    margin-top: 2px;
  }

  .compact-order-mobile-date {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
  }

  .compact-order-mobile-status {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 800;
    white-space: nowrap;
    padding: 5px 9px;
    margin-inline-start: auto;
  }

  .compact-order-type {
    font-size: 11px;
    padding: 4px 7px;
  }

  .compact-order-total {
    font-size: 14px;
  }

  .compact-order-customer strong {
    font-size: 14px;
  }

  .compact-order-customer span {
    font-size: 12px;
  }

  .compact-order-details {
    padding: 14px;
  }

  .compact-details-grid {
    grid-template-columns: 1fr;
  }

  .details-full-row {
    grid-column: auto;
  }

  .orders-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-count {
    text-align: center;
  }

  .pagination-controls {
    justify-content: space-between;
  }

  .pagination-page {
    text-align: center;
  }

}

@media (max-width: 430px) {

  .pagination-controls {
    display: grid;
    grid-template-columns:
      1fr
      auto
      1fr;
  }

  .pagination-btn {
    padding: 8px;
    font-size: 12px;
  }

}


/* ======================================================
   ORDER DATE FILTERS
====================================================== */

.order-date-filters {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
}

.date-preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.date-filter-btn {
  border: 1px solid #d8d8d8;
  background: var(--white);
  color: var(--text);
  border-radius: 20px;
  padding: 8px 13px;
  font-weight: 700;
  cursor: pointer;
}

.date-filter-btn:hover {
  border-color: var(--accent);
}

.date-filter-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.custom-date-range {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.date-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 160px;
}

.date-input-group span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.date-input-group input {
  height: 40px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--white);
  color: var(--text);
  outline: none;
}

.date-input-group input:focus {
  border-color: var(--accent);
}

.clear-date-btn {
  height: 40px;
  border: 1px solid #d8d8d8;
  background: var(--white);
  color: var(--text);
  border-radius: 8px;
  padding: 0 13px;
  font-weight: 700;
  cursor: pointer;
}

.clear-date-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

html[dir="rtl"] .date-input-group input {
  direction: ltr;
  text-align: left;
}

@media (max-width: 700px) {

  .date-preset-buttons {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .date-filter-btn {
    white-space: nowrap;
  }

  .custom-date-range {
    align-items: stretch;
  }

  .date-input-group {
    flex: 1 1 145px;
  }

  .clear-date-btn {
    width: 100%;
  }

}


/* ======================================================
   CUSTOMERS PAGE
====================================================== */

.customer-add-btn {
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: var(--white);
  min-height: 40px;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.customer-add-btn:hover {
  filter: brightness(0.95);
}

.customer-form-card {
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fffaf5;
}

.customer-form-heading {
  margin-bottom: 14px;
}

.customer-form-heading h3 {
  margin: 0;
  font-size: 18px;
}

.customer-form-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.customer-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-form-field > span,
.customer-address-section-title {
  font-size: 13px;
  font-weight: 800;
}

.customer-form-field input,
.customer-form-field textarea {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  padding: 0 11px;
  outline: none;
  color: var(--text);
  font: inherit;
}

.customer-form-field input {
  height: 43px;
}

.customer-form-field textarea {
  min-height: 82px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
}

.customer-form-field input:focus,
.customer-form-field textarea:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px
    rgba(217, 79, 0, 0.08);
}

.customer-form-field small {
  color: var(--muted);
  font-size: 11px;
}

.customer-address-section {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid #eadfd7;
}

.customer-address-grid {
  display: grid;
  grid-template-columns:
    minmax(160px, 0.7fr)
    minmax(260px, 1.6fr);
  gap: 14px;
  margin-top: 8px;
}

.customer-form-message {
  min-height: 18px;
  margin-top: 11px;
  font-size: 13px;
}

.customer-form-message.error {
  color: var(--danger);
  font-weight: 700;
}

.customer-form-actions {
  display: flex;
  gap: 9px;
  margin-top: 8px;
}

.customer-save-btn,
.customer-cancel-btn {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
}

.customer-save-btn {
  border: none;
  background: var(--success);
  color: var(--white);
}

.customer-cancel-btn {
  border: 1px solid #d7d7d7;
  background: var(--white);
  color: var(--text);
}

.customer-save-btn:disabled,
.customer-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.customers-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.customers-search-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.customers-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 17px;
}

html[dir="rtl"] .customers-search-icon {
  left: auto;
  right: 14px;
}

.customers-search-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 44px;
  border: 1px solid #d7d7d7;
  border-radius: 11px;
  background: var(--white);
  color: var(--text);
  outline: none;
  font-size: 15px;
}

html[dir="rtl"] .customers-search-input {
  padding: 0 44px 0 14px;
}

.customers-search-input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px
    rgba(217, 79, 0, 0.10);
}

.customers-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: var(--white);
}

.customers-table-header,
.customer-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.5fr)
    minmax(145px, 1.1fr)
    90px
    80px
    110px
    minmax(145px, 1fr);

  gap: 12px;
  align-items: center;
}

.customers-table-header {
  padding: 12px 14px;
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

html[dir="rtl"] .customers-table-header {
  text-transform: none;
}

.customer-row {
  min-height: 66px;
  padding: 10px 14px;
  border-bottom: 1px solid #eeeeee;
}

.customer-row:last-child {
  border-bottom: none;
}

.customer-row:hover {
  background: #fcfcfc;
}

.customer-name-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-name-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-secondary-name {
  color: var(--muted);
  font-size: 13px;
}

.customer-phone-cell {
  font-weight: 600;
  font-size: 14px;
}

.customer-stat-cell {
  text-align: center;
}

.customer-purchases-cell {
  font-weight: 800;
}

.customer-last-order-cell {
  color: var(--muted);
  font-size: 13px;
}

.customer-mobile-label {
  display: none;
}

@media (max-width: 900px) {

  .customer-form-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .customer-form-grid .customer-form-field:last-child {
    grid-column:
      1 / -1;
  }

  .customers-table {
    border: none;
    background: transparent;
    overflow: visible;
  }

  .customers-table-header {
    display: none;
  }

  .customers-table-body {
    display: grid;
    gap: 10px;
  }

  .customer-row {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 13px 18px;

    min-height: 0;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 11px;
    background: var(--white);
  }

  .customer-row:last-child {
    border-bottom: 1px solid #e5e5e5;
  }

  .customer-name-cell,
  .customer-phone-cell {
    grid-column: span 1;
  }

  .customer-stat-cell,
  .customer-purchases-cell,
  .customer-last-order-cell {
    text-align: start;
  }

  .customer-mobile-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

}

@media (max-width: 560px) {

  .customers-search-wrap {
    max-width: none;
  }

  .customer-row {
    grid-template-columns: 1fr;
  }

  .customer-name-cell,
  .customer-phone-cell {
    grid-column: auto;
  }

}


/* ======================================================
   EXPANDABLE CUSTOMER ROWS
====================================================== */

.customer-record {
  border-bottom: 1px solid #eeeeee;
}

.customer-record:last-child {
  border-bottom: none;
}

.customer-record.expanded {
  background: #fffdfa;
}

.customer-row {
  width: 100%;
  border: none;
  background: var(--white);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: start;
}

.customer-row:hover {
  background: #fcfcfc;
}

.customer-record.expanded
.customer-row {
  background: #fffaf5;
}

.customer-last-order-cell {
  position: relative;
  padding-inline-end: 22px;
}

.customer-expand-chevron {
  position: absolute;
  inset-inline-end: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 10px;
}

.customer-details-wrap {
  padding: 0 14px 16px;
  background: #fffdfa;
}

.customer-details-panel {
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: var(--white);
  padding: 18px;
}

.customer-details-state {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
}

.customer-details-error {
  color: var(--danger);
}

.customer-details-heading {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.customer-details-heading h3 {
  font-size: 18px;
}

.customer-details-heading p {
  margin-top: 4px;
  color: var(--muted);
}

.customer-profile-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.customer-profile-item {
  min-width: 0;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  background: #fafafa;
  padding: 11px;
}

.customer-profile-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 5px;
}

.customer-profile-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.customer-detail-section {
  margin-top: 20px;
}

.customer-detail-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

.customer-detail-section-title h4 {
  font-size: 16px;
}

.customer-detail-section-title small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  font-size: 11px;
}

.customer-detail-section-title > span {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.saved-addresses-list {
  display: grid;
  gap: 8px;
}

.saved-address-card {
  border: 1px solid #eeeeee;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fafafa;
}

.saved-address-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.default-address-badge {
  padding: 4px 8px;
  border-radius: 12px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
}

.saved-address-text {
  color: #555555;
  line-height: 1.45;
}

.customer-detail-empty {
  border: 1px dashed #dddddd;
  border-radius: 9px;
  padding: 13px;
  color: var(--muted);
  background: #fafafa;
  text-align: center;
}

.customer-history-list {
  display: grid;
  gap: 7px;
}

.customer-history-order {
  display: grid;
  grid-template-columns:
    60px
    minmax(145px, 1.2fr)
    minmax(90px, 0.8fr)
    minmax(100px, 0.9fr)
    minmax(100px, auto)
    80px;

  gap: 10px;
  align-items: center;

  border: 1px solid #eeeeee;
  border-radius: 10px;
  background: #fafafa;
  padding: 9px 11px;
}

.history-order-number {
  color: var(--accent);
  font-weight: 900;
  direction: ltr;
  unicode-bidi: embed;
}

.history-order-date {
  color: var(--muted);
  font-size: 12px;
}

.history-order-type {
  font-size: 13px;
}

.history-order-payment {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.history-order-payment img {
  width: 25px;
  height: 20px;
  object-fit: contain;
}

.history-order-status {
  justify-self: start;
  font-size: 11px;
  padding: 5px 8px;
}

.history-order-total {
  font-weight: 900;
  text-align: end;
}


/* ======================================================
   EXPANDABLE CUSTOMERS - TABLET / MOBILE
====================================================== */

@media (max-width: 1000px) {

  .customer-profile-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .customer-history-order {
    grid-template-columns:
      55px
      minmax(120px, 1fr)
      minmax(90px, auto)
      75px;
  }

  .history-order-type,
  .history-order-payment {
    display: none;
  }

}

@media (max-width: 900px) {

  .customer-record {
    border-bottom: none;
  }

  .customer-record.expanded {
    background: transparent;
  }

  .customer-row {
    border: 1px solid #e5e5e5;
    border-radius: 11px;
  }

  .customer-record.expanded
  .customer-row {
    border-radius: 11px 11px 0 0;
    border-bottom-color: #eadfd7;
  }

  .customer-details-wrap {
    padding: 0;
  }

  .customer-details-panel,
  .customer-details-state {
    border-radius: 0 0 11px 11px;
    border-top: none;
  }

  .customers-table-body {
    gap: 10px;
  }

}

@media (max-width: 620px) {

  .customer-profile-grid {
    grid-template-columns: 1fr;
  }

  .customer-details-panel {
    padding: 13px;
  }

  .customer-history-order {
    grid-template-columns:
      50px
      minmax(0, 1fr)
      auto;

    gap: 7px;
  }

  .history-order-type,
  .history-order-payment,
  .history-order-status {
    display: none;
  }

  .history-order-date {
    font-size: 11px;
  }

}


/* ======================================================
   CUSTOMER - VIEW ALL ORDERS
====================================================== */

.view-all-customer-orders-btn {
  width: 100%;
  margin-top: 12px;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.view-all-customer-orders-btn:hover {
  background: var(--accent);
  color: var(--white);
}



/* ======================================================
   DRIVERS
====================================================== */

.driver-add-btn {
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: var(--white);
  min-height: 40px;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.driver-add-btn:hover {
  filter: brightness(0.95);
}

.driver-form-card {
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fffaf5;
}

.driver-form-heading {
  margin-bottom: 14px;
}

.driver-form-heading h3 {
  font-size: 18px;
}

.driver-form-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.driver-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.driver-field > span,
.driver-field-label {
  font-size: 13px;
  font-weight: 800;
}

.driver-field input {
  width: 100%;
  height: 43px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  padding: 0 11px;
  outline: none;
}

.driver-field input:focus {
  border-color: var(--accent);
}

.driver-field small {
  color: var(--muted);
  font-size: 11px;
}

.driver-branches-field {
  margin-top: 15px;
}

.driver-branches-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.driver-branch-option {
  min-height: 52px;
  border: 1px solid #e1e1e1;
  border-radius: 9px;
  background: var(--white);
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.driver-branch-option:hover {
  border-color: var(--accent);
}

.driver-branch-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.driver-branch-option span {
  min-width: 0;
}

.driver-branch-option strong,
.driver-branch-option small {
  display: block;
}

.driver-branch-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.driver-form-message {
  min-height: 18px;
  margin-top: 11px;
  font-size: 13px;
}

.driver-form-message.error {
  color: var(--danger);
  font-weight: 700;
}

.driver-form-actions {
  display: flex;
  gap: 9px;
  margin-top: 8px;
}

.driver-save-btn,
.driver-cancel-btn {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
}

.driver-save-btn {
  border: none;
  background: var(--success);
  color: var(--white);
}

.driver-cancel-btn {
  border: 1px solid #d7d7d7;
  background: var(--white);
  color: var(--text);
}

.driver-save-btn:disabled,
.driver-cancel-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.drivers-list {
  width: 100%;
}

.drivers-table {
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: var(--white);
}

.drivers-table-header,
.driver-row {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.1fr)
    minmax(135px, 1fr)
    minmax(220px, 1.7fr)
    90px
    minmax(155px, auto);
  gap: 12px;
  align-items: center;
}

.drivers-table-header {
  padding: 11px 13px;
  border-bottom: 1px solid #e8e8e8;
  background: #fafafa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

html[dir="rtl"] .drivers-table-header {
  text-transform: none;
}

.driver-row {
  min-height: 64px;
  padding: 10px 13px;
  border-bottom: 1px solid #eeeeee;
}

.driver-row:last-child {
  border-bottom: none;
}

.driver-row:hover {
  background: #fcfcfc;
}

.driver-row.inactive {
  opacity: 0.68;
}

.driver-phone-cell {
  font-weight: 700;
}

.driver-branches-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.driver-branch-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 13px;
  padding: 3px 9px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.driver-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
}

.driver-status-badge.active {
  background: #dcfce7;
  color: #166534;
}

.driver-status-badge.inactive {
  background: #e5e7eb;
  color: #4b5563;
}

.driver-actions-cell {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

html[dir="rtl"] .driver-actions-cell {
  justify-content: flex-start;
}

.driver-action-btn {
  border: 1px solid #d8d8d8;
  border-radius: 7px;
  background: var(--white);
  color: var(--text);
  min-height: 33px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.driver-edit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.driver-deactivate-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.driver-activate-btn {
  border-color: var(--success);
  color: var(--success);
}

@media (max-width: 900px) {

  .driver-form-grid {
    grid-template-columns: 1fr;
  }

  .driver-branches-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .drivers-table {
    border: none;
    background: transparent;
  }

  .drivers-table-header {
    display: none;
  }

  .drivers-table-body {
    display: grid;
    gap: 10px;
  }

  .driver-row {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: var(--white);
  }

  .driver-row:last-child {
    border-bottom: 1px solid #e5e5e5;
  }

  .driver-branches-cell,
  .driver-actions-cell {
    grid-column: 1 / -1;
  }

}

@media (max-width: 560px) {

  .admin-page-heading {
    align-items: flex-start;
  }

  .driver-branches-grid {
    grid-template-columns: 1fr;
  }

  .driver-row {
    grid-template-columns: 1fr;
  }

  .driver-branches-cell,
  .driver-actions-cell {
    grid-column: auto;
  }

  .driver-actions-cell {
    justify-content: stretch;
  }

  html[dir="rtl"] .driver-actions-cell {
    justify-content: stretch;
  }

  .driver-action-btn {
    flex: 1;
  }

}


/* ======================================================
   DELIVERY DRIVER CONTROLS IN ORDERS
====================================================== */

.delivery-driver-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #eadfd7;
  border-radius: 11px;
  background: #fffaf5;
}

.delivery-driver-title {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 11px;
}

.delivery-driver-state {
  color: var(--muted);
  font-size: 13px;
}

.delivery-driver-error {
  color: var(--danger);
  font-weight: 700;
}

.delivery-current-driver {
  display: grid;
  grid-template-columns:
    auto
    minmax(120px, 1fr)
    auto;
  gap: 9px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #eeeeee;
  border-radius: 9px;
  background: var(--white);
}

.delivery-current-driver > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-current-driver > strong {
  font-size: 14px;
}

.delivery-current-driver > small {
  color: var(--muted);
  font-size: 12px;
}

.delivery-no-driver {
  color: var(--muted);
  font-weight: 600 !important;
}

.delivery-driver-assign-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    auto;
  gap: 8px;
  margin-top: 10px;
}

.delivery-driver-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.delivery-driver-select:focus {
  border-color: var(--accent);
}

.delivery-assign-btn {
  min-height: 42px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.delivery-assign-btn:hover:not(:disabled) {
  filter: brightness(0.95);
}

.delivery-assign-btn:disabled,
.mark-delivered-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.delivery-driver-hint {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mark-delivered-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 11px;
  border: none;
  border-radius: 9px;
  background: var(--success);
  color: var(--white);
  font-weight: 900;
  cursor: pointer;
}

.mark-delivered-btn:hover:not(:disabled) {
  filter: brightness(0.95);
}

.delivery-completed-badge {
  margin-top: 10px;
  min-height: 38px;
  border-radius: 9px;
  background: #dcfce7;
  color: #166534;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}



/* ======================================================
   DRIVER WHATSAPP BUTTON
====================================================== */

.driver-whatsapp-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 11px;

  border: none;
  border-radius: 9px;

  background: #25d366;
  color: #ffffff;

  font-weight: 900;
  cursor: pointer;

  transition:
    filter 0.15s ease,
    transform 0.15s ease;
}

.driver-whatsapp-btn:hover {
  filter: brightness(0.94);
}

.driver-whatsapp-btn:active {
  transform: translateY(1px);
}


html[dir="rtl"] .delivery-driver-select {
  text-align: right;
}

@media (max-width: 620px) {

  .delivery-current-driver {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .delivery-driver-assign-row {
    grid-template-columns: 1fr;
  }

  .delivery-assign-btn {
    width: 100%;
  }

}


/* ======================================================
   ORDER BRANCH FILTER
====================================================== */

.order-branch-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  max-width: 520px;
}

.order-branch-filter-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(217, 79, 0, 0.14);
}

.order-branch-select {
  flex: 0 1 370px;
  width: auto;
  min-width: 240px;
  max-width: 370px;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.order-branch-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 0, 0.08);
}

html[dir="rtl"] .order-branch-filter {
  justify-content: flex-start;
}

html[dir="rtl"] .order-branch-select {
  text-align: right;
}

@media (max-width: 560px) {

  .order-branch-filter {
    display: block;
    max-width: none;
  }

  .order-branch-filter-label {
    margin-bottom: 8px;
  }

  .order-branch-select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

}

/* ======================================================
   STOCK MANAGEMENT
====================================================== */

.stock-page-panel {
  overflow: visible;
}

.stock-view-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  margin-bottom: 18px;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  background: #fafafa;
}

.stock-view-tab {
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  padding: 10px 15px;
  font-weight: 800;
  cursor: pointer;
}

.stock-view-tab.active {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(217, 79, 0, 0.18);
}

.stock-view-section {
  width: 100%;
}

.stock-toolbar,
.stock-history-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.stock-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.stock-filter-group label {
  font-size: 13px;
  font-weight: 800;
  color: #444444;
}

.stock-branch-wrap {
  min-width: 210px;
}

.stock-category-wrap {
  min-width: 190px;
}

.stock-search-wrap {
  flex: 1 1 300px;
  min-width: 240px;
}

.stock-control,
.stock-search-box input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 0 11px;
  outline: none;
}

.stock-control:focus,
.stock-search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 0, 0.08);
}

.stock-search-box {
  position: relative;
}

.stock-search-box span {
  position: absolute;
  inset-inline-start: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.stock-search-box input {
  padding-inline-start: 38px;
}

.stock-date-group {
  min-width: 155px;
}

.stock-order-wrap {
  min-width: 165px;
  flex: 0 1 190px;
}

.stock-order-wrap input {
  direction: ltr;
  text-align: left;
}

.stock-clear-dates-btn {
  min-height: 42px;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 0 13px;
  font-weight: 700;
  cursor: pointer;
}

.stock-clear-dates-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.stock-table,
.stock-history-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
}

.stock-table-header,
.stock-table-row {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.45fr)
    minmax(120px, 0.95fr)
    92px
    118px
    100px
    108px
    minmax(210px, 1.45fr);
  gap: 10px;
  align-items: center;
}

.stock-table-header {
  padding: 12px 14px;
  background: #f6f6f6;
  border-bottom: 1px solid var(--border);
  color: #555555;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stock-table-row {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.stock-table-row:last-child {
  border-bottom: none;
}

.stock-table-row:hover {
  background: #fffdfa;
}

.stock-product-cell {
  min-width: 0;
}

.stock-product-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stock-product-thumb-wrap {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.stock-product-thumb {
  display: block;
  width: 44px;
  height: 44px;
  border: 1px solid #e2e2e2;
  border-radius: 9px;
  background: #f7f7f7;
  object-fit: cover;
}

.stock-product-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 17px;
}

.stock-product-copy {
  min-width: 0;
}

.stock-product-cell strong {
  display: block;
  line-height: 1.3;
}

.stock-product-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-branch-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.stock-qty-cell strong {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f2f2f2;
  font-size: 16px;
}


.stock-qty-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stock-qty-cell strong.low {
  background: #fff4d6;
  color: #9a6700;
}

.stock-qty-cell strong.out {
  background: #ffe1e1;
  color: #b42318;
}

.stock-level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.stock-level-badge.low {
  background: #fff4d6;
  color: #9a6700;
}

.stock-level-badge.out {
  background: #ffe1e1;
  color: #b42318;
}

.stock-table-row.stock-low {
  background: #fffdf5;
}

.stock-table-row.stock-out {
  background: #fff8f8;
}

.stock-table-row.stock-low:hover {
  background: #fff9e8;
}

.stock-table-row.stock-out:hover {
  background: #fff0f0;
}

.stock-total-cell strong {
  display: inline-flex;
  min-width: 58px;
  justify-content: center;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
}

.stock-table-row.stock-product-group-start {
  border-top: 2px solid #d8d8d8;
}

.stock-tracking-toggle {
  min-width: 72px;
  min-height: 34px;
  border: none;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.stock-tracking-toggle.on {
  background: var(--success);
}

.stock-tracking-toggle.off {
  background: #777777;
}

.stock-tracking-toggle:disabled {
  opacity: 0.55;
  cursor: wait;
}

.stock-availability-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.stock-availability-pill.available {
  background: #dcfce7;
  color: #166534;
}

.stock-availability-pill.unavailable {
  background: #fee2e2;
  color: #991b1b;
}


.stock-availability-pill.out-of-stock {
  background: #fee2e2;
  color: #991b1b;
}

.stock-actions-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.stock-action-btn {
  min-height: 34px;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.stock-action-btn.add {
  border: 1px solid #198754;
  background: #f1fff7;
  color: #146c43;
}

.stock-action-btn.remove {
  border: 1px solid #b00020;
  background: #fff4f5;
  color: #9d001c;
}

.stock-action-btn.set {
  border: 1px solid #555555;
  background: var(--white);
  color: #333333;
}

.stock-action-btn:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.stock-pagination {
  margin-top: 16px;
}

.stock-history-header,
.stock-history-row {
  display: grid;
  grid-template-columns:
    minmax(155px, 1.2fr)
    minmax(120px, 1fr)
    minmax(160px, 1.4fr)
    minmax(125px, 1fr)
    78px
    72px
    minmax(150px, 1.3fr);
  gap: 10px;
  align-items: center;
}

.stock-history-header {
  padding: 12px 14px;
  background: #f6f6f6;
  border-bottom: 1px solid var(--border);
  color: #555555;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stock-history-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.stock-history-row:last-child {
  border-bottom: none;
}

.stock-history-row:hover {
  background: #fffdfa;
}

.stock-history-product,
.stock-history-note {
  min-width: 0;
  overflow-wrap: anywhere;
}

.stock-movement-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eeeeee;
  color: #444444;
  font-size: 11px;
  font-weight: 800;
}

.stock-movement-pill.sale,
.stock-movement-pill.manual_remove {
  background: #fee2e2;
  color: #991b1b;
}

.stock-movement-pill.cancel_return,
.stock-movement-pill.manual_add {
  background: #dcfce7;
  color: #166534;
}

.stock-movement-pill.adjustment {
  background: #dbeafe;
  color: #1d4ed8;
}

.stock-change-value {
  font-size: 15px;
  font-weight: 900;
}

.stock-change-value.positive {
  color: var(--success);
}

.stock-change-value.negative {
  color: var(--danger);
}

.stock-change-value.neutral {
  color: var(--muted);
}

.stock-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.52);
}

.stock-modal-card {
  width: 100%;
  max-width: 470px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--white);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
}

.stock-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.stock-modal-header h3 {
  font-size: 21px;
}

.stock-modal-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.stock-modal-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f1f1f1;
  color: #333333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.stock-current-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
}

.stock-current-box span {
  font-weight: 700;
}

.stock-current-box strong {
  font-size: 21px;
}

.stock-modal-field {
  margin-bottom: 15px;
}

.stock-modal-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
}

.stock-modal-field input,
.stock-modal-field textarea {
  width: 100%;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 10px 11px;
  outline: none;
  resize: vertical;
}

.stock-modal-field input {
  min-height: 44px;
}

.stock-modal-field input:focus,
.stock-modal-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 0, 0.08);
}

.stock-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}

.stock-modal-cancel,
.stock-modal-save {
  min-height: 42px;
  border-radius: 9px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

.stock-modal-cancel {
  border: 1px solid #d1d1d1;
  background: var(--white);
  color: var(--text);
}

.stock-modal-save {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--white);
}

.stock-modal-save:disabled {
  opacity: 0.6;
  cursor: wait;
}

html[dir="rtl"] .stock-control,
html[dir="rtl"] .stock-search-box input,
html[dir="rtl"] .stock-modal-field input,
html[dir="rtl"] .stock-modal-field textarea {
  text-align: right;
}


@media (max-width: 1050px) {

  .stock-table-header {
    display: none;
  }

  .stock-table {
    border: none;
    overflow: visible;
    background: transparent;
  }

  .stock-table-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .stock-table-row {
    display: block;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
  }

  .stock-table-row > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #ececec;
  }

  .stock-table-row > div:last-child {
    border-bottom: none;
  }

  .stock-table-row > div::before {
    content: attr(data-stock-label);
    flex: 0 0 105px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .stock-product-cell {
    align-items: flex-start !important;
  }

  .stock-product-cell > strong,
  .stock-product-cell > small {
    margin-inline-start: auto;
    text-align: end;
  }

  .stock-product-cell small {
    display: none;
  }

  .stock-actions-cell {
    justify-content: flex-end !important;
  }

  .stock-history-header {
    display: none;
  }

  .stock-history-table {
    border: none;
    background: transparent;
    overflow: visible;
  }

  .stock-history-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .stock-history-row {
    display: block;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
  }

  .stock-history-row > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #ececec;
  }

  .stock-history-row > div:last-child {
    border-bottom: none;
  }

  .stock-history-row > div::before {
    content: attr(data-stock-label);
    flex: 0 0 95px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }
}

@media (max-width: 700px) {

  .stock-view-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .stock-view-tab {
    padding: 10px 8px;
    font-size: 13px;
  }

  .stock-toolbar,
  .stock-history-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stock-filter-group,
  .stock-branch-wrap,
  .stock-search-wrap,
  .stock-order-wrap,
  .stock-date-group {
    width: 100%;
    min-width: 0;
  }

  .stock-clear-dates-btn {
    width: 100%;
  }

  .stock-table-body,
  .stock-history-body {
    grid-template-columns: 1fr;
  }

  .stock-actions-cell {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
  }

  .stock-action-btn {
    width: 100%;
  }

  .stock-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}



/* ======================================================
   SETTINGS
====================================================== */

.settings-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 900px);
  gap: 18px;
  margin-top: 18px;
}

.settings-card {
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: var(--white);
  padding: 20px;
}

.settings-card-heading h3 {
  margin: 0;
  font-size: 19px;
}

.settings-card-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.exchange-rate-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff7f0;
  border: 1px solid #ffd8bd;
}

.exchange-rate-current > span {
  color: var(--muted);
  font-weight: 700;
}

.exchange-rate-current strong {
  font-size: 18px;
  color: var(--accent);
  text-align: end;
}

.exchange-rate-form {
  display: grid;
  gap: 15px;
}

.exchange-rate-field {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.exchange-rate-input-wrap {
  display: grid;
  grid-template-columns:
    auto minmax(140px, 240px) auto;
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.exchange-rate-input-wrap input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
  direction: ltr;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.exchange-rate-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(217, 79, 0, 0.1);
}

.exchange-rate-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f7f7;
}

.exchange-rate-example > span {
  color: var(--muted);
  font-weight: 700;
}

.exchange-rate-example strong {
  text-align: end;
}

.exchange-rate-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.settings-message {
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
}

.settings-message.success {
  color: var(--success);
}

.settings-message.error {
  color: var(--danger);
}

.settings-save-button {
  width: fit-content;
  min-width: 180px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.settings-save-button:hover {
  opacity: 0.92;
}

.settings-save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

html[dir="rtl"] .exchange-rate-input-wrap input {
  direction: ltr;
  text-align: left;
}

.delivery-hours-card {
  display: grid;
  gap: 18px;
}

.delivery-hours-days {
  display: grid;
  gap: 12px;
}

.delivery-day-card {
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.delivery-day-card.disabled {
  background: #fafafa;
}

.delivery-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.delivery-day-title {
  font-size: 16px;
  font-weight: 800;
}

.delivery-day-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.delivery-day-toggle-wrap input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.delivery-day-card.enabled
.delivery-day-toggle-wrap {
  color: var(--accent);
}

.delivery-period-list {
  display: grid;
  gap: 9px;
}

.delivery-period-row {
  display: grid;
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(150px, 1fr)
    auto;
  align-items: end;
  gap: 10px;
}

.delivery-period-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.delivery-period-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8d8d8;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.delivery-period-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(217, 79, 0, 0.1);
}

.delivery-period-field select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.delivery-period-remove,
.delivery-add-period {
  min-height: 42px;
  border-radius: 9px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.delivery-period-remove {
  border: 1px solid #e0c8bb;
  background: #fff7f0;
  color: var(--accent);
  padding: 0 13px;
}

.delivery-add-period {
  width: fit-content;
  margin-top: 10px;
  border: 1px dashed #d8a17d;
  background: #fffaf6;
  color: var(--accent);
  padding: 0 14px;
}

.delivery-period-remove:disabled,
.delivery-add-period:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

html[dir="rtl"] .delivery-period-field select {
  text-align: right;
}

@media (max-width: 700px) {
  .exchange-rate-current,
  .exchange-rate-example {
    align-items: flex-start;
    flex-direction: column;
  }

  .exchange-rate-current strong,
  .exchange-rate-example strong {
    text-align: start;
  }

  .exchange-rate-input-wrap {
    grid-template-columns:
      auto minmax(0, 1fr) auto;
    width: 100%;
  }

  .delivery-day-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .delivery-period-row {
    grid-template-columns: 1fr 1fr;
  }

  .delivery-period-remove {
    grid-column: 1 / -1;
    width: 100%;
  }

  .delivery-add-period {
    width: 100%;
  }

  .settings-save-button {
    width: 100%;
  }
}


@media (max-width: 620px) {
  .customer-form-grid,
  .customer-address-grid {
    grid-template-columns:
      1fr;
  }

  .customer-form-grid .customer-form-field:last-child {
    grid-column:
      auto;
  }

  .customer-form-actions {
    flex-direction: column;
  }

  .customer-save-btn,
  .customer-cancel-btn {
    width: 100%;
  }
}


/* ======================================================
   MENU / PRODUCTS
====================================================== */

.product-add-btn {
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: var(--white);
  min-height: 40px;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.product-add-btn:hover {
  filter: brightness(0.95);
}

.products-toolbar {
  display: grid;
  grid-template-columns:
    minmax(160px, 0.8fr)
    minmax(150px, 0.7fr)
    minmax(260px, 1.7fr);
  gap: 10px;
  padding: 13px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fafafa;
}

.products-filter-field,
.products-search-field,
.product-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.products-filter-field > span,
.products-search-field > span,
.product-form-field > span {
  font-size: 12px;
  font-weight: 800;
}

.products-filter-field select,
.products-search-field input,
.product-form-field input,
.product-form-field select,
.product-form-field textarea {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  outline: none;
}

.products-filter-field select,
.products-search-field input,
.product-form-field input,
.product-form-field select {
  min-height: 42px;
  padding: 0 10px;
}

.product-form-field textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

.products-filter-field select:focus,
.products-search-field input:focus,
.product-form-field input:focus,
.product-form-field select:focus,
.product-form-field textarea:focus,
.product-branch-field input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(217, 79, 0, 0.08);
}

.products-list-container {
  min-height: 80px;
}

.products-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.products-table-header,
.products-table-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.7fr)
    minmax(120px, 1fr)
    minmax(90px, 0.75fr)
    minmax(180px, 1.45fr)
    minmax(95px, 0.8fr)
    minmax(150px, 1.15fr);
  align-items: center;
}

.products-table-header {
  min-height: 43px;
  background: #f5f5f5;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.products-table-header > div,
.products-table-row > div {
  padding: 10px 11px;
}

.products-table-row {
  min-height: 58px;
  border-bottom: 1px solid var(--border);
}

.products-table-row:last-child {
  border-bottom: none;
}

.products-table-row:hover {
  background: #fffaf6;
}

.product-name-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-list-thumb-wrap {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.product-list-thumb {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid #e2e2e2;
  border-radius: 9px;
  background: #f7f7f7;
  object-fit: cover;
}

.product-list-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 18px;
}

.product-name-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-name-cell strong {
  font-size: 14px;
}

.product-name-cell small {
  color: var(--muted);
  font-size: 11px;
}

.product-price-cell {
  font-weight: 800;
}

.product-branches-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.product-branch-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff2e8;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.product-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.product-status-pill.active {
  background: #dcfce7;
  color: #166534;
}

.product-status-pill.inactive {
  background: #eeeeee;
  color: #555555;
}

.product-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-edit-btn,
.product-status-btn {
  min-height: 31px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.product-edit-btn {
  border: 1px solid var(--accent);
  background: var(--white);
  color: var(--accent);
}

.product-status-btn.active {
  border: 1px solid #dc2626;
  background: var(--white);
  color: #b91c1c;
}

.product-status-btn.inactive {
  border: 1px solid #15803d;
  background: var(--white);
  color: #15803d;
}

.products-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.products-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.products-pagination-actions button {
  min-height: 34px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 700;
}

.products-pagination-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.products-empty-state {
  padding: 25px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.products-empty-state.error {
  color: var(--danger);
}

.muted-text {
  color: var(--muted);
}

/* Product form */

.product-form-card {
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fffaf5;
}

.product-form-heading {
  margin-bottom: 14px;
}

.product-form-heading-with-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-form-actions-top {
  margin-top: 0;
}

.product-form-heading h3 {
  margin: 0;
  font-size: 18px;
}

.product-form-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.product-form-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.product-form-wide {
  grid-column: span 1;
}

.product-form-full {
  grid-column: 1 / -1;
}

.product-active-field {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  min-height: 42px;
  font-size: 13px;
  font-weight: 800;
}

.product-active-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.product-branches-section {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid #eadfd7;
}

.product-branches-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 10px;
}

.product-branches-heading h4 {
  margin: 0;
  font-size: 15px;
}

.product-branches-heading small {
  color: var(--muted);
  text-align: end;
}

.product-branch-form-list {
  display: grid;
  gap: 8px;
}

.product-branch-form-row {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.35fr)
    minmax(110px, 0.85fr)
    minmax(110px, 0.85fr)
    minmax(85px, 0.6fr)
    minmax(95px, 0.7fr)
    minmax(105px, 0.75fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dddddd;
  border-radius: 10px;
  background: #f7f7f7;
  opacity: 0.7;
}

.product-branch-form-row.selected {
  border-color: #f0bf9d;
  background: var(--white);
  opacity: 1;
}

.product-branch-assign,
.product-branch-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.product-branch-assign input,
.product-branch-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.product-branch-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-branch-field span {
  font-size: 10px;
  font-weight: 800;
}

.product-branch-field input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d7d7d7;
  border-radius: 7px;
  background: var(--white);
  padding: 0 8px;
  outline: none;
  font: inherit;
  direction: ltr;
}


.product-stock-field input[data-stock-read-only="true"]:disabled {
  opacity: 1;
  background: #f1f1f1;
  color: #555555;
  border-color: #dddddd;
  cursor: not-allowed;
  -webkit-text-fill-color: #555555;
}

.product-stock-readonly-note {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.product-form-message {
  min-height: 18px;
  margin-top: 11px;
  font-size: 13px;
  font-weight: 700;
}

.product-form-message.error {
  color: var(--danger);
}

.product-form-message.success {
  color: var(--success);
}

/* Keep save validation visible beside the top action buttons, too. */
.product-form-message-top:not([hidden]) {
  min-height: 0;
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #f2bfbc;
  border-radius: 8px;
  background: #fff1f0;
  line-height: 1.45;
}

.product-form-actions {
  display: flex;
  gap: 9px;
  margin-top: 8px;
}

.product-save-btn,
.product-cancel-btn {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 15px;
  font-weight: 800;
  cursor: pointer;
}

.product-save-btn {
  border: none;
  background: var(--success);
  color: var(--white);
}

.product-cancel-btn {
  border: 1px solid #d7d7d7;
  background: var(--white);
  color: var(--text);
}

.product-save-btn:disabled,
.product-cancel-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 1050px) {
  .products-table-header {
    display: none;
  }

  .products-table {
    border: none;
    display: grid;
    gap: 10px;
  }

  .products-table-row {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 8px 15px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
  }

  .products-table-row > div {
    padding: 0;
  }

  .products-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .product-branch-form-row {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .product-branch-assign {
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  .products-toolbar,
  .product-form-grid {
    grid-template-columns:
      1fr;
  }

  .product-form-wide,
  .product-form-full {
    grid-column: auto;
  }

  .product-branches-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-branches-heading small {
    text-align: start;
  }
}

@media (max-width: 620px) {
  .product-form-heading-with-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .products-table-row {
    grid-template-columns:
      1fr;
  }

  .product-branch-form-row {
    grid-template-columns:
      1fr;
  }

  .product-branch-assign {
    grid-column: auto;
  }

  .products-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .products-pagination-actions {
    justify-content: space-between;
  }

  .product-form-actions {
    flex-direction: column;
  }

  .product-save-btn,
  .product-cancel-btn {
    width: 100%;
  }
}


/* ======================================================
   PRODUCT IMAGE UPLOAD
====================================================== */

.product-image-upload-card {
  display: grid;
  grid-template-columns:
    180px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e1e1e1;
  border-radius: 11px;
  background: var(--white);
}

.product-image-preview-box {
  width: 180px;
  height: 130px;
  border: 1px solid #dedede;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f7f7;
}

.product-image-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-preview[hidden] {
  display: none;
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 28px;
  text-align: center;
}

.product-image-placeholder[hidden] {
  display: none;
}

.product-image-placeholder span {
  font-size: 11px;
  font-weight: 700;
}

.product-image-upload-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.product-image-choose-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--white);
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.product-image-choose-btn:hover {
  background: #fff5ee;
}

.product-image-choose-btn input {
  display: none;
}

.product-image-selection-label {
  min-height: 16px;
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}

.product-image-upload-controls small {
  max-width: 520px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .product-image-upload-card {
    grid-template-columns:
      1fr;
  }

  .product-image-preview-box {
    width: 100%;
    max-width: 320px;
    height: 190px;
  }

  .product-image-upload-controls {
    width: 100%;
  }

  .product-image-choose-btn {
    width: 100%;
  }
}


/* ======================================================
   PRODUCTS / CATEGORIES SUBTABS
====================================================== */

.products-subtabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
}

.products-subtabs button {
  min-height: 38px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.products-subtabs button.active {
  background: var(--accent);
  color: var(--white);
}

.products-subtab-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.products-subtab-heading h3 {
  margin: 0;
  font-size: 18px;
}

.products-subtab-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.category-form-card {
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fffaf5;
}

.category-form-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.categories-admin-list {
  display: grid;
  gap: 8px;
}

.category-admin-row {
  display: grid;
  grid-template-columns:
    minmax(190px, 1.6fr)
    minmax(90px, 0.65fr)
    minmax(90px, 0.65fr)
    minmax(90px, 0.7fr)
    minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}

.category-admin-row:hover {
  background: #fffaf6;
}

.category-admin-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-admin-name small {
  color: var(--muted);
}

.category-admin-sort,
.category-admin-count {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-admin-sort span,
.category-admin-count span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.category-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 900px) {
  .category-form-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .category-admin-row {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .category-admin-name {
    grid-column:
      1 / -1;
  }
}

@media (max-width: 620px) {
  .products-subtabs {
    display: grid;
    width: 100%;
    grid-template-columns:
      1fr 1fr;
  }

  .products-subtab-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .product-add-btn {
    width: 100%;
  }

  .category-form-grid,
  .category-admin-row {
    grid-template-columns:
      1fr;
  }

  .category-admin-name {
    grid-column: auto;
  }
}


/* ======================================================
   CUSTOMER FILTERS + AVERAGE ORDER VALUE
====================================================== */

.customer-filters-card {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
}

.customer-filters-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.customer-filters-heading h3 {
  margin: 0;
  font-size: 15px;
}

.customer-filters-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.customer-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.customer-filter-label {
  color: #444444;
  font-size: 12px;
  font-weight: 800;
}

.customer-filter-pair {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.customer-filter-group input,
.customer-filter-group select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  padding: 0 9px;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.customer-filter-group input:focus,
.customer-filter-group select:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(217, 79, 0, 0.08);
}

.customer-filter-group input[type="date"],
html[dir="rtl"] .customer-filter-group input[type="number"] {
  direction: ltr;
  text-align: left;
}

.customer-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e7e7e7;
}

.customer-filter-apply,
.customer-filter-clear,
.customer-filter-export {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

.customer-filter-export {
  margin-inline-end: auto;
  border: 1px solid var(--success);
  background: #f1fff7;
  color: #146c43;
}

.customer-filter-export:hover:not(:disabled) {
  background: var(--success);
  color: var(--white);
}

.customer-filter-export:disabled {
  opacity: 0.6;
  cursor: wait;
}

.customer-filter-apply {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--white);
}

.customer-filter-clear {
  border: 1px solid #d5d5d5;
  background: var(--white);
  color: var(--text);
}

.customer-filter-apply:hover,
.customer-filter-clear:hover {
  filter: brightness(0.97);
}

.customer-average-cell {
  font-weight: 800;
}

/* Seven customer summary columns after adding Avg. Order. */
.customers-table-header,
.customer-row {
  grid-template-columns:
    minmax(165px, 1.5fr)
    minmax(135px, 1.05fr)
    92px
    76px
    98px
    94px
    minmax(135px, 1fr);
  gap: 12px;
}

@media (max-width: 1000px) {
  .customer-filters-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .customer-average-cell {
    text-align: start;
  }
}

@media (max-width: 620px) {
  .customer-filters-grid {
    grid-template-columns: 1fr;
  }

  .customer-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .customer-filter-export {
    grid-column: 1 / -1;
    margin-inline-end: 0;
  }

  .customer-filter-apply,
  .customer-filter-clear,
  .customer-filter-export {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .customer-filter-pair {
    grid-template-columns: 1fr;
  }

  .customer-filter-actions {
    grid-template-columns: 1fr;
  }
}

.customer-date-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.customer-date-filter small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}


/* ======================================================
   ADMIN MODIFY ORDER
====================================================== */

.modify-order-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 11px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 900;
  cursor: pointer;
}

.modify-order-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--white);
}

.modify-order-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.order-edit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
}

.order-edit-modal-card {
  width: 100%;
  max-width: 780px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.25);
}

.order-edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}


.order-edit-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.admin-popup-language-switcher {
  flex: 0 0 auto;
}

.admin-popup-language-switcher button {
  min-width: 44px;
  padding: 6px 10px;
  font-size: 12px;
}

.order-edit-modal-header h3 {
  margin: 0;
  font-size: 22px;
}

.order-edit-modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.order-edit-close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: none;
  border-radius: 50%;
  background: #f1f1f1;
  color: #333333;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.order-edit-close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.order-edit-loading {
  padding: 35px 10px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.order-edit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fafafa;
  font-size: 13px;
}

.order-edit-section {
  margin-top: 19px;
}

.order-edit-section h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.order-edit-items-list,
.order-edit-products-list {
  display: grid;
  gap: 8px;
}

.order-edit-products-list {
  max-height: 300px;
  overflow: auto;
  padding-inline-end: 3px;
}

.order-edit-item-row,
.order-edit-add-product-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(76px, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #e8e8e8;
  border-radius: 11px;
  background: #ffffff;
}

.order-edit-add-product-row {
  grid-template-columns:
    minmax(0, 1fr)
    auto;
}

.order-edit-product-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.order-edit-product-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid #e2e2e2;
  border-radius: 9px;
  background: #f7f7f7;
  object-fit: cover;
}

.order-edit-product-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.order-edit-product-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

html[dir="rtl"] .order-edit-product-copy {
  align-items: flex-start;
}

.order-edit-product-copy strong {
  overflow-wrap: anywhere;
}

.order-edit-product-copy small {
  color: var(--muted);
  font-size: 11px;
}

.order-edit-product-copy > span.money-value {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.order-edit-stock-note {
  color: var(--muted);
}

.order-edit-unavailable-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
  font-weight: 800;
}

.order-edit-quantity-control {
  display: inline-grid;
  grid-template-columns: 34px 38px 34px;
  align-items: center;
  gap: 5px;
  direction: ltr;
}

.order-edit-quantity-control button {
  width: 34px;
  height: 34px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.order-edit-quantity-control button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.order-edit-quantity-control button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-edit-quantity-control strong {
  text-align: center;
}

.order-edit-line-total {
  text-align: end;
  white-space: nowrap;
}

.order-edit-item-group {
  overflow: hidden;
  border: 1px solid #e8e8e8;
  border-radius: 11px;
  background: #ffffff;
}

.order-edit-item-group > .order-edit-item-row {
  border: 0;
  border-radius: 0;
}

.order-edit-subline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 12px 8px 70px;
  border-top: 1px solid #f0e7e1;
  background: #fffaf6;
  font-size: 12px;
  font-weight: 800;
}

html[dir="rtl"] .order-edit-subline-row {
  padding-right: 70px;
  padding-left: 12px;
}

.order-edit-subline-row .money-value {
  white-space: nowrap;
}

.order-edit-subline-removal {
  color: #666666;
}

.order-edit-search {
  width: 100%;
  min-height: 43px;
  margin-bottom: 10px;
  border: 1px solid #d7d7d7;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.order-edit-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 0, 0.08);
}

.order-edit-add-btn {
  min-width: 84px;
  min-height: 38px;
  border: 1px solid var(--success);
  border-radius: 8px;
  background: #f1fff7;
  color: #146c43;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.order-edit-add-btn:hover:not(:disabled) {
  background: var(--success);
  color: var(--white);
}

.order-edit-add-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.order-edit-empty {
  padding: 16px;
  border: 1px dashed #dddddd;
  border-radius: 10px;
  background: #fafafa;
  color: var(--muted);
  text-align: center;
}

.order-edit-total {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin-top: 20px;
  padding: 15px 0;
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.order-edit-total > div:first-child span {
  display: block;
  font-weight: 900;
}

.order-edit-total > div:first-child small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.order-edit-total-values {
  text-align: end;
}

.order-edit-total-values strong {
  display: block;
  font-size: 20px;
}

.order-edit-total-values span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.order-edit-message {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
}

.order-edit-message.error {
  color: var(--danger);
}

.order-edit-actions {
  display: grid;
  grid-template-columns:
    minmax(120px, 0.7fr)
    minmax(190px, 1.3fr);
  gap: 9px;
  margin-top: 12px;
}

.order-edit-cancel-btn,
.order-edit-save-btn {
  min-height: 44px;
  border-radius: 9px;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.order-edit-cancel-btn {
  border: 1px solid #d6d6d6;
  background: var(--white);
  color: var(--text);
}

.order-edit-save-btn {
  border: none;
  background: var(--success);
  color: var(--white);
}

.order-edit-cancel-btn:disabled,
.order-edit-save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.stock-movement-pill.order_edit_add {
  background: #fee2e2;
  color: #991b1b;
}

.stock-movement-pill.order_edit_remove {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 620px) {

  .order-edit-modal-overlay {
    align-items: stretch;
    padding: 8px;
  }

  .order-edit-modal-card {
    max-height: calc(100vh - 16px);
    padding: 14px;
    border-radius: 13px;
  }

  .order-edit-modal-header h3 {
    font-size: 19px;
  }

  .order-edit-item-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .order-edit-line-total {
    grid-column: 1 / -1;
    padding-top: 5px;
    border-top: 1px dashed #ececec;
  }

  .order-edit-add-product-row {
    grid-template-columns: 1fr;
  }

  .order-edit-add-btn {
    width: 100%;
  }

  .order-edit-actions {
    grid-template-columns: 1fr;
  }

}


/* Category label inside Admin → Modify Order → Add Items */
.order-edit-category-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}


/* ======================================================
   ADMIN MODIFY ORDER - ADD ITEMS CATEGORY FILTER
====================================================== */

.order-edit-category-filters {
  display: flex;
  gap: 7px;
  width: 100%;
  margin-bottom: 10px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.order-edit-category-filter {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.order-edit-category-filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.order-edit-category-filter.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

@media (max-width: 620px) {
  .order-edit-category-filters {
    margin-inline: -2px;
    padding-inline: 2px;
  }
}

/* ======================================================
   BRANCH MANAGEMENT
   ====================================================== */

.branch-add-btn,
.branch-save-btn {
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.branch-add-btn:hover,
.branch-save-btn:hover {
  opacity: .9;
}

.branch-add-btn:disabled,
.branch-save-btn:disabled,
.branch-action-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.branch-initial-stock-note {
  margin: 14px 0 18px;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #fafafa;
  padding: 12px 14px;
  color: #555;
  font-size: .92rem;
  line-height: 1.45;
}

.branch-form-card {
  margin: 0 0 18px;
  border: 1px solid #e4e4e4;
  border-radius: 16px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 4px 18px rgba(0,0,0,.035);
}

.branch-form-heading {
  margin-bottom: 14px;
}

.branch-form-heading h3 {
  margin: 0;
}

.branch-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.branch-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.branch-field-wide {
  grid-column: span 2;
}

.branch-field > span {
  font-size: .9rem;
  font-weight: 800;
  color: #333;
}

.branch-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
  padding: 9px 11px;
  color: #111;
  font: inherit;
  box-sizing: border-box;
}

.branch-field input:focus {
  outline: none;
  border-color: #d46a18;
  box-shadow: 0 0 0 3px rgba(212,106,24,.10);
}

.branch-field input:disabled {
  background: #f5f5f5;
  color: #777;
}

.branch-field small {
  color: #777;
  line-height: 1.35;
}

.branch-form-message,
.branch-page-message {
  min-height: 0;
  margin-top: 12px;
  font-size: .92rem;
  font-weight: 700;
}

.branch-form-message.error,
.branch-page-message.error {
  color: #a11919;
}

.branch-form-message.success,
.branch-page-message.success {
  color: #16803a;
}

.branch-page-message {
  margin: 0 0 12px;
  border-radius: 10px;
  background: #f1fbf4;
  padding: 10px 12px;
}

.branch-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.branch-cancel-btn {
  border: 1px solid #d5d5d5;
  border-radius: 12px;
  background: #fff;
  color: #333;
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.branches-list {
  display: grid;
  gap: 14px;
}

.branch-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e2e2e2;
  border-radius: 16px;
  background: #fff;
  padding: 17px;
  box-shadow: 0 4px 18px rgba(0,0,0,.03);
}

.branch-card.inactive {
  background: #fafafa;
  opacity: .82;
}

.branch-card-main {
  flex: 1 1 auto;
  min-width: 0;
}

.branch-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.branch-card h3 {
  margin: 0 0 4px;
  font-size: 1.03rem;
}

.branch-card-ar {
  margin: 0;
  color: #666;
  font-size: .94rem;
}

.branch-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .78rem;
  font-weight: 800;
}

.branch-status.active {
  background: #eaf8ee;
  color: #19713a;
}

.branch-status.inactive {
  background: #f1f1f1;
  color: #666;
}

.branch-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px 14px;
}

.branch-meta-grid > div {
  min-width: 0;
}

.branch-meta-grid span {
  display: block;
  margin-bottom: 3px;
  color: #777;
  font-size: .78rem;
  font-weight: 700;
}

.branch-meta-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .88rem;
}

.branch-addresses {
  margin-top: 12px;
  border-top: 1px solid #eee;
  padding-top: 10px;
  color: #555;
}

.branch-addresses p {
  margin: 3px 0;
}

.branch-card-actions {
  flex: 0 0 125px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.branch-action-btn {
  width: 100%;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.branch-action-btn.edit {
  border: 1px solid #d6d6d6;
  background: #fff;
  color: #222;
}

.branch-action-btn.deactivate {
  border: 1px solid #efc7c7;
  background: #fff7f7;
  color: #9a2020;
}

.branch-action-btn.activate {
  border: 1px solid #bde3c7;
  background: #f3fff6;
  color: #167139;
}

@media (max-width: 840px) {
  .branch-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .branch-form-grid {
    grid-template-columns: 1fr;
  }

  .branch-field-wide {
    grid-column: auto;
  }

  .branch-card {
    flex-direction: column;
  }

  .branch-card-actions {
    flex: 0 0 auto;
    flex-direction: row;
  }

  .branch-action-btn {
    width: auto;
    flex: 1 1 0;
  }
}


/* ======================================================
   2026-09-10 ADMIN REFRESH — عالحطب product controls
====================================================== */

.admin-login-logo {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin: -6px auto 10px;
}

.admin-restaurant-identity {
  margin-top: 2px;
}

.admin-restaurant-logo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
}

.product-feature-section,
.product-recommendations-section {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #eadfd7;
}

.product-feature-heading,
.product-recommendations-heading {
  margin-bottom: 10px;
}

.product-feature-heading h4,
.product-recommendations-heading h4 {
  margin: 0;
  font-size: 15px;
}

.product-feature-heading small,
.product-recommendations-heading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.product-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.product-toggle-card {
  min-height: 76px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: var(--white);
  padding: 10px;
}

.product-toggle-card > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}

.product-toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 700;
}

.product-toggle-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.product-toggle-line select {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: var(--white);
  padding: 0 8px;
}

.product-toggle-line select:disabled {
  opacity: 0.55;
  background: #f5f5f5;
}

.product-recommendations-list-admin {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 250px;
  overflow: auto;
  padding: 2px;
}

.product-recommendation-option-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  background: var(--white);
  padding: 7px 9px;
  cursor: pointer;
}

.product-recommendation-option-admin:hover {
  border-color: var(--accent);
}

.product-recommendation-option-admin input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.product-recommendation-copy-admin {
  min-width: 0;
}

.product-recommendation-copy-admin strong,
.product-recommendation-copy-admin small {
  display: block;
}

.product-recommendation-copy-admin strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.product-recommendation-copy-admin small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.product-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.product-feature-pill,
.category-offers-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff2e8;
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
}

.category-offers-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 800;
}

.category-offers-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

@media (max-width: 800px) {
  .product-feature-grid,
  .product-recommendations-list-admin {
    grid-template-columns: 1fr;
  }
}


/* ======================================================
   ABOUT / STORE INFO
====================================================== */

.admin-navigation {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.about-admin-card {
  width: 100%;
  max-width: 920px;
  border: 1px solid #e7dfd8;
  border-radius: 14px;
  background: #fffaf6;
  padding: 18px;
}

.about-admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eadfd7;
}

.about-admin-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  flex: 0 0 84px;
}

.about-admin-brand small {
  color: var(--muted);
  line-height: 1.45;
}

.about-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.about-admin-field > span {
  font-size: 12px;
  font-weight: 800;
}

.about-admin-field input,
.about-admin-field textarea {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  padding: 10px 11px;
  font: inherit;
  outline: none;
}

.about-admin-field input {
  min-height: 43px;
}

.about-admin-field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.45;
}

.about-admin-field input:focus,
.about-admin-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 0, 0.08);
}

.about-admin-wide {
  grid-column: 1 / -1;
}

html[dir="rtl"] .about-admin-field input,
html[dir="rtl"] .about-admin-field textarea {
  text-align: right;
}

@media (max-width: 700px) {
  .about-admin-grid {
    grid-template-columns: 1fr;
  }

  .about-admin-wide {
    grid-column: auto;
  }

  .about-admin-brand {
    align-items: flex-start;
  }

  .about-admin-logo {
    width: 70px;
    height: 70px;
    flex-basis: 70px;
  }
}

/* ======================================================
   PRODUCT INGREDIENT CUSTOMIZATION - 2026-09-10
====================================================== */

.product-ingredients-section-admin {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid #eadfd7;
}

.product-ingredients-heading-admin {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.product-ingredients-heading-admin h4 {
  margin: 0;
  font-size: 15px;
}

.product-ingredients-heading-admin small {
  display: block;
  max-width: 700px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.product-ingredient-add-admin {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.product-ingredient-add-admin:hover:not(:disabled) {
  background: var(--accent);
  color: var(--white);
}

.product-ingredient-list-admin {
  display: grid;
  gap: 8px;
}

.product-ingredient-empty-admin {
  border: 1px dashed #ddd4cc;
  border-radius: 9px;
  background: #fafafa;
  color: var(--muted);
  padding: 12px;
  text-align: center;
  font-size: 12px;
}

.product-ingredient-row-admin {
  display: grid;
  grid-template-columns:
    minmax(145px, 1.25fr)
    minmax(145px, 1.25fr)
    minmax(92px, .72fr)
    minmax(92px, .72fr)
    minmax(105px, .75fr)
    auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #fff;
}

.product-ingredient-name-field,
.product-ingredient-price-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.product-ingredient-name-field > span,
.product-ingredient-price-field > span {
  color: #444;
  font-size: 10px;
  font-weight: 800;
}

.product-ingredient-name-field input,
.product-ingredient-price-field input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d7d7d7;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 0 8px;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.product-ingredient-name-field input:focus,
.product-ingredient-price-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 0, 0.08);
}

.product-ingredient-price-field > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}

.product-ingredient-price-field > div > span {
  color: var(--accent);
  font-weight: 900;
}

.product-ingredient-check-admin {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.product-ingredient-check-admin input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.product-ingredient-remove-admin {
  min-height: 36px;
  border: 1px solid #e6bcbc;
  border-radius: 7px;
  background: #fff7f7;
  color: #a11919;
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.product-ingredient-remove-admin:hover:not(:disabled) {
  border-color: #a11919;
  background: #fff0f0;
}

.product-ingredient-add-admin:disabled,
.product-ingredient-remove-admin:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 1080px) {
  .product-ingredient-row-admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-ingredient-check-admin,
  .product-ingredient-price-field,
  .product-ingredient-remove-admin {
    min-width: 0;
  }
}

@media (max-width: 650px) {
  .product-ingredients-heading-admin {
    flex-direction: column;
  }

  .product-ingredient-add-admin {
    width: 100%;
  }

  .product-ingredient-row-admin {
    grid-template-columns: 1fr;
  }

  .product-ingredient-check-admin {
    padding-bottom: 0;
  }

  .product-ingredient-remove-admin {
    width: 100%;
  }
}

/* 2026-09-11 delivery pricing + offer drink display */
.delivery-pricing-card .exchange-rate-form {
  margin-top: 12px;
}

.order-item-drink {
  margin-top: 4px;
  color: #9a651a;
  font-weight: 700;
}

.order-price-breakdown {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.025);
}

.order-price-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.order-price-breakdown span {
  color: #6f6961;
}

#productOfferDrinksSection[hidden] {
  display: none !important;
}


/* 2026-09-12 reusable Ingredient Library */
.ingredient-library-summary-admin {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #ead8c8;
  border-radius: 12px;
  background: #fffaf6;
}
.ingredient-library-summary-admin > strong { display: block; margin-bottom: 3px; }
.ingredient-library-summary-admin > span { display: block; font-size: 12px; color: #6d6259; margin-bottom: 9px; }
.ingredient-library-chips-admin { display: flex; flex-wrap: wrap; gap: 6px; }
.ingredient-library-chips-admin span { padding: 5px 8px; border: 1px solid #efc49e; border-radius: 999px; background: #fff; font-size: 12px; }
.product-ingredient-library-add-admin {
  align-self: end;
  min-height: 38px;
  border: 1px solid #d95a00;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff7f0;
  color: #b94b00;
  font-weight: 700;
  cursor: pointer;
}
.product-ingredient-library-add-admin:hover:not(:disabled) { background: #ffead9; }
.product-ingredient-library-add-admin:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) {
  .product-ingredient-library-add-admin { width: 100%; }
}

/* ======================================================
   INGREDIENT LIBRARY ADMIN - 2026-09-12
====================================================== */
.ingredient-library-form-card h4 {
  margin: 0 0 13px;
  font-size: 16px;
}

.ingredient-library-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.ingredient-library-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.ingredient-library-form-grid input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 9px;
  background: #fff;
  padding: 0 11px;
  font: inherit;
  outline: none;
}

.ingredient-library-form-grid input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 79, 0, 0.08);
}

.ingredients-admin-list {
  display: grid;
  gap: 8px;
}

.ingredient-admin-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(150px, .55fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}

.ingredient-admin-row:hover {
  background: #fffaf6;
}

.ingredient-admin-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ingredient-admin-name span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.ingredient-admin-name strong {
  overflow-wrap: anywhere;
}

.ingredient-library-form-grid label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.ingredient-admin-price {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ingredient-admin-price span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.ingredient-admin-price strong {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .products-subtabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .products-subtabs button {
    padding: 0 8px;
    font-size: 12px;
  }

  .ingredient-library-form-grid,
  .ingredient-admin-row {
    grid-template-columns: 1fr;
  }

  .ingredient-admin-row .category-admin-actions {
    width: 100%;
  }

  .ingredient-admin-row .category-admin-actions button {
    width: 100%;
  }
}


/* Orders CSV export */
.orders-export-csv-btn {
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #fff;
  border-radius: 12px;
  min-height: 42px;
  padding: 9px 15px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(226, 80, 0, 0.14);
}

.orders-export-csv-btn:hover {
  filter: brightness(0.96);
}

.orders-export-csv-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 640px) {
  .admin-page-heading {
    align-items: flex-start;
  }

  .orders-export-csv-btn {
    padding: 8px 11px;
    min-height: 38px;
    font-size: 13px;
  }
}


/* Orders CSV button contrast fix */
.orders-export-csv-btn {
  background: #e65000 !important;
  color: #ffffff !important;
  border-color: #e65000 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.orders-export-csv-btn:hover:not(:disabled),
.orders-export-csv-btn:focus-visible:not(:disabled) {
  background: #cc4700 !important;
  border-color: #cc4700 !important;
  color: #ffffff !important;
}

.orders-export-csv-btn:disabled {
  background: #f29a6a !important;
  border-color: #f29a6a !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: wait;
}

/* ======================================================
   Ingredient Stock — separate inventory section
   2026-09-13
   ====================================================== */
.ingredient-stock-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 16px;
  padding: 12px 14px;
  border: 1px solid #f0dccb;
  border-radius: 12px;
  background: #fffaf5;
}
.ingredient-stock-intro strong { font-size: 18px; }
.ingredient-stock-intro span { color: #745f50; font-size: 13px; }
.ingredient-stock-toolbar { grid-template-columns: minmax(190px, 240px) minmax(300px, 1fr); }
.ingredient-stock-table,
.ingredient-history-table {
  overflow: hidden;
  border: 1px solid #e8e2dd;
  border-radius: 12px;
  background: #fff;
}
.ingredient-stock-header,
.ingredient-stock-row {
  display: grid;
  grid-template-columns: 1.25fr .9fr .6fr .8fr .7fr 1.25fr;
  gap: 12px;
  align-items: center;
}
.ingredient-stock-header {
  padding: 14px;
  background: #f7f7f7;
  color: #5b514b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.ingredient-stock-row {
  padding: 12px 14px;
  border-top: 1px solid #eee8e3;
}
.ingredient-stock-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ingredient-stock-row > div:first-child small,
.ingredient-unit-label {
  color: #8b8179;
  font-size: 10px;
}
.ingredient-history-toolbar {
  grid-template-columns: 180px 220px 160px 160px 160px auto;
}
.ingredient-history-header,
.ingredient-history-row {
  display: grid;
  grid-template-columns: 1fr .85fr 1fr .9fr .6fr .7fr .55fr 1.5fr;
  gap: 10px;
  align-items: center;
}
.ingredient-history-header {
  padding: 12px 14px;
  background: #f7f7f7;
  color: #5b514b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.ingredient-history-row {
  padding: 11px 14px;
  border-top: 1px solid #eee8e3;
  font-size: 12px;
}
.ingredient-change { font-weight: 900; }
.ingredient-change.negative { color: #c91f35; }
.ingredient-change.positive { color: #0b8b4c; }
.ingredient-movement-pill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f1f1;
  font-size: 10px;
  font-weight: 900;
}
.ingredient-movement-pill.usage { background: #ffe0e3; color: #a9172d; }
.ingredient-movement-pill.cancel_return { background: #d8f7e5; color: #087541; }
.ingredient-movement-pill.manual_add { background: #dcf7e7; color: #087541; }
.ingredient-movement-pill.manual_remove { background: #ffe4e4; color: #a9172d; }
.ingredient-movement-pill.adjustment { background: #fff0d2; color: #8d5d00; }

@media (max-width: 900px) {
  .ingredient-stock-toolbar,
  .ingredient-history-toolbar { grid-template-columns: 1fr; }
  .ingredient-stock-header,
  .ingredient-history-header { display: none; }
  .ingredient-stock-row,
  .ingredient-history-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ingredient-stock-row > div,
  .ingredient-history-row > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }
  .ingredient-stock-row > div::before,
  .ingredient-history-row > div::before {
    content: attr(data-label);
    color: #776b62;
    font-size: 11px;
    font-weight: 800;
  }
  .ingredient-stock-row > div:first-child {
    align-items: flex-end;
  }
  .ingredient-stock-row > div:first-child::before {
    align-self: center;
  }
  .ingredient-stock-row .stock-actions-cell {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}


/* ======================================================
   Bulk stock selection/actions — products + ingredients
   2026-09-13
   ====================================================== */
.stock-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #f0c9aa;
  border-radius: 11px;
  background: #fff7ef;
}
.stock-bulk-bar > strong {
  color: #6e3a13;
  font-size: 13px;
  white-space: nowrap;
}
.stock-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.stock-bulk-btn {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d8d1cb;
  border-radius: 8px;
  background: #fff;
  color: #24201d;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.stock-bulk-btn:hover:not(:disabled) { border-color: var(--accent); }
.stock-bulk-btn:disabled { opacity: .55; cursor: wait; }
.stock-bulk-btn.tracking-on,
.stock-bulk-btn.add { border-color: #149357; color: #087541; background: #f4fff8; }
.stock-bulk-btn.tracking-off,
.stock-bulk-btn.remove { border-color: #d7263d; color: #b1132e; background: #fff7f8; }
.stock-bulk-btn.set { border-color: #555; }

.stock-table.stock-table-with-select .stock-table-header,
.stock-table.stock-table-with-select .stock-table-row {
  grid-template-columns:
    84px
    minmax(170px, 1.45fr)
    minmax(120px, .95fr)
    82px
    108px
    96px
    104px
    minmax(210px, 1.45fr);
}
.ingredient-stock-table-with-select .ingredient-stock-header,
.ingredient-stock-table-with-select .ingredient-stock-row {
  grid-template-columns: 84px 1.25fr .9fr .6fr .8fr .7fr 1.25fr;
}
.stock-select-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.stock-select-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.stock-row-checkbox,
.stock-select-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

@media (max-width: 1050px) {
  .stock-bulk-bar { align-items: flex-start; flex-direction: column; }
  .stock-bulk-actions { width: 100%; justify-content: flex-start; }
  .stock-table-row .stock-select-cell {
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .ingredient-stock-row .stock-select-cell {
    justify-content: flex-end;
  }
}

/* ======================================================
   ADMIN MOBILE RESPONSIVE HARDENING — 2026-09-13
   Keeps stock tables swipeable; prevents customer/admin overflow.
====================================================== */

/* Never allow a wide child to stretch the entire admin page. */
.dashboard-section,
.admin-page-panel,
#ordersContainer,
.stock-page-panel,
.customers-table,
.products-table,
.drivers-table,
.branches-admin-list,
.settings-grid,
.about-admin-card {
  min-width: 0;
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

.order-workflow-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #e5ddd6;
  border-radius: 12px;
  background: #fffaf6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.order-workflow-panel .delivery-driver-title {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font-weight: 900;
}

.order-workflow-panel .modify-order-btn,
.order-workflow-panel .driver-deactivate-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 0;
}

/* Keep the workflow button the same width/height as the other order actions. */
.order-workflow-panel .confirm-order-btn {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin-top: 0;
  padding: 10px 14px;
  justify-self: stretch;
  align-self: stretch;
  font-size: 14px;
}

.order-terminal-notice {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.order-terminal-notice.cancelled {
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.order-terminal-notice.completed {
  border: 1px solid #d8dadd;
  background: #f7f7f8;
  color: #4b5563;
}

/* Stock Management: on tablet/mobile preserve the desktop row and make it swipe horizontally. */
@media (max-width: 1050px) {
  .stock-table,
  .stock-history-table {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    background: var(--white) !important;
  }

  .stock-table-header,
  .stock-table-row {
    display: grid !important;
    min-width: 1080px;
  }

  .stock-table.stock-table-with-select .stock-table-header,
  .stock-table.stock-table-with-select .stock-table-row {
    min-width: 1160px;
  }

  .stock-table-header {
    padding: 12px 14px !important;
  }

  .stock-table-body {
    display: block !important;
    min-width: 1080px;
  }

  .stock-table.stock-table-with-select .stock-table-body {
    min-width: 1160px;
  }

  .stock-table-row {
    padding: 13px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    background: var(--white) !important;
  }

  .stock-table-row:last-child {
    border-bottom: 0 !important;
  }

  .stock-table-row > div {
    padding: 0 !important;
    border-bottom: 0 !important;
  }

  .stock-table-row > div::before {
    content: none !important;
    display: none !important;
  }

  .stock-product-cell {
    display: block !important;
    min-width: 0;
  }

  .stock-product-cell small {
    display: block !important;
  }

  .stock-select-cell {
    display: flex !important;
    justify-content: center !important;
  }

  .stock-actions-cell {
    display: flex !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
  }

  .stock-action-btn {
    width: auto !important;
    flex: 0 0 auto;
  }

  .stock-history-header,
  .stock-history-row {
    display: grid !important;
    min-width: 1040px;
  }

  .stock-history-body {
    display: block !important;
    min-width: 1040px;
  }

  .stock-history-row {
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    background: var(--white) !important;
  }

  .stock-history-row > div {
    padding: 0 !important;
    border-bottom: 0 !important;
  }

  .stock-history-row > div::before {
    content: none !important;
    display: none !important;
  }
}

/* Ingredient Stock / History follow the same swipe model as Current Stock. */
@media (max-width: 900px) {
  .ingredient-stock-table,
  .ingredient-history-table {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  .ingredient-stock-header,
  .ingredient-stock-row {
    display: grid !important;
    min-width: 900px;
  }

  .ingredient-stock-table-with-select .ingredient-stock-header,
  .ingredient-stock-table-with-select .ingredient-stock-row {
    min-width: 980px;
  }

  .ingredient-stock-header {
    padding: 14px !important;
  }

  .ingredient-stock-row {
    padding: 12px 14px !important;
  }

  .ingredient-stock-row > div,
  .ingredient-history-row > div {
    display: block;
  }

  .ingredient-stock-row > div::before,
  .ingredient-history-row > div::before {
    content: none !important;
    display: none !important;
  }

  .ingredient-stock-row > div:first-child {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
  }

  .ingredient-stock-row .stock-select-cell {
    display: flex !important;
    justify-content: center !important;
  }

  .ingredient-stock-row .stock-actions-cell {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
  }

  .ingredient-history-header,
  .ingredient-history-row {
    display: grid !important;
    min-width: 1080px;
  }
}

/* Customer list must become cards on mobile. A later desktop column rule used to override this. */
@media (max-width: 900px) {
  .customers-table {
    width: 100% !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  .customers-table-header {
    display: none !important;
  }

  .customers-table-body {
    display: grid !important;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .customer-record,
  .customer-row,
  .customer-details-wrap,
  .customer-details-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .customer-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 14px !important;
    padding: 14px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 11px !important;
  }

  .customer-row > div,
  .customer-name-cell,
  .customer-phone-cell,
  .customer-stat-cell,
  .customer-purchases-cell,
  .customer-average-cell,
  .customer-last-order-cell {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .customer-mobile-label {
    display: block !important;
  }

  .customer-last-order-cell {
    padding-inline-end: 22px;
  }

  .customer-filters-card,
  .customers-toolbar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .customer-row {
    grid-template-columns: 1fr !important;
  }
}

/* General admin mobile improvements. */
@media (max-width: 700px) {
  .dashboard-section {
    width: 100%;
    max-width: 100%;
    padding: 10px;
  }

  .admin-header {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
    padding: 14px;
  }

  .admin-header-actions,
  html[dir="rtl"] .admin-header-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .admin-sync-control,
  html[dir="rtl"] .admin-sync-control {
    align-items: center;
  }

  .admin-navigation {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 1px 1px 7px;
    margin-bottom: 12px;
    scroll-snap-type: x proximity;
  }

  .admin-nav-btn {
    flex: 0 0 auto;
    min-width: 146px;
    min-height: 48px;
    justify-content: center !important;
    scroll-snap-align: start;
  }

  .admin-page-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px;
    overflow: hidden;
  }

  .admin-page-heading {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .admin-page-heading h2 {
    font-size: 21px;
  }

  .orders-toolbar,
  .products-toolbar,
  .stock-toolbar,
  .stock-history-toolbar,
  .ingredient-stock-toolbar,
  .ingredient-history-toolbar {
    width: 100%;
    min-width: 0;
  }

  .compact-order-details {
    min-width: 0;
    overflow: hidden;
  }

  .order-workflow-panel {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .order-workflow-panel .delivery-driver-title {
    grid-column: auto;
  }

  .order-workflow-panel .confirm-order-btn {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .order-item {
    align-items: flex-start;
  }

  .order-item-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .order-item-price {
    flex: 0 0 auto;
  }

  .stock-view-tabs,
  .products-subtabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .stock-view-tab,
  .products-subtabs button {
    white-space: nowrap;
  }

  .settings-card,
  .about-admin-card,
  .branch-form-card,
  .customer-form-card,
  .product-form-card {
    max-width: 100%;
    overflow: hidden;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  .admin-language-switcher button {
    min-width: 42px;
    padding: 7px 9px;
  }

  .admin-sync-button,
  #logoutButton {
    padding-inline: 11px;
  }
}

/* ======================================================
   MOST ORDERED ADMIN SETTINGS
   ====================================================== */
.most-ordered-settings-card {
  grid-column: 1 / -1;
}

.most-ordered-settings-form {
  gap: 16px;
}

.most-ordered-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ead8c8;
  border-radius: 12px;
  background: #fffaf5;
  font-weight: 800;
  cursor: pointer;
}

.most-ordered-toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: #e65300;
}

.most-ordered-settings-two-col {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 14px;
}

.most-ordered-settings-card input[type="number"],
.most-ordered-settings-card input[type="search"],
.most-ordered-settings-card select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  background: #fff;
  color: #171717;
  font: inherit;
}

.most-ordered-settings-card input[type="number"],
.most-ordered-settings-card input[type="search"],
.most-ordered-settings-card select:not([size]) {
  min-height: 44px;
  padding: 9px 11px;
}

.most-ordered-settings-card select[size] {
  min-height: 148px;
  padding: 6px;
}

.most-ordered-settings-card select[size] option {
  padding: 8px 9px;
  border-radius: 7px;
}

.most-ordered-manual-block {
  padding: 14px;
  border: 1px solid #ead8c8;
  border-radius: 14px;
  background: #fffaf5;
}

.most-ordered-manual-block h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.most-ordered-search-input {
  margin: 10px 0;
}

.most-ordered-add-button {
  margin-top: 10px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #e65300;
  border-radius: 10px;
  background: #fff;
  color: #c84600;
  font-weight: 800;
  cursor: pointer;
}

.most-ordered-add-button:hover {
  background: #fff2e8;
}

.most-ordered-pinned-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.most-ordered-pinned-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #ead8c8;
  border-radius: 10px;
  background: #fff;
}

.most-ordered-pinned-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff0df;
  color: #c84600;
  font-weight: 900;
}

.most-ordered-pinned-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.most-ordered-pinned-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.most-ordered-mini-button,
.most-ordered-remove-button {
  min-height: 34px;
  border: 1px solid #d3d3d3;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 800;
  cursor: pointer;
}

.most-ordered-mini-button {
  min-width: 34px;
  padding: 4px 8px;
}

.most-ordered-mini-button:disabled {
  opacity: .35;
  cursor: default;
}

.most-ordered-remove-button {
  padding: 5px 10px;
  border-color: #dc3545;
  color: #b8202e;
}

.most-ordered-pinned-empty {
  padding: 10px 12px;
  border: 1px dashed #d8c7b8;
  border-radius: 10px;
  color: #6f6258;
  background: #fff;
}

html[dir="rtl"] .most-ordered-settings-card,
body[dir="rtl"] .most-ordered-settings-card {
  text-align: right;
}

@media (max-width: 720px) {
  .most-ordered-settings-two-col {
    grid-template-columns: 1fr;
  }

  .most-ordered-pinned-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .most-ordered-pinned-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

/* =========================================================
   PRODUCT INVENTORY / SIZE / RECIPE EDITOR
   ========================================================= */

.product-inventory-section-admin {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #ead8c8;
  border-radius: 16px;
  background: #fffaf5;
}

.product-inventory-heading-admin,
.product-sizes-heading-admin,
.product-size-recipe-heading-admin {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.product-inventory-heading-admin h4,
.product-sizes-heading-admin strong,
.product-size-recipe-heading-admin strong {
  margin: 0;
}

.product-inventory-heading-admin small,
.product-sizes-heading-admin small,
.product-size-recipe-heading-admin small {
  display: block;
  margin-top: 4px;
  color: #74665c;
  line-height: 1.45;
}

.product-inventory-mode-field-admin {
  max-width: 520px;
  margin-top: 16px;
}

.product-sizes-heading-admin {
  margin-top: 22px;
  margin-bottom: 10px;
  flex-direction: column;
  gap: 0;
}

.product-sizes-grid-admin {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-size-card-admin {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e0c9b5;
  border-radius: 14px;
  background: #fff;
}

.product-size-card-heading-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-size-card-heading-admin h5 {
  margin: 0;
  font-size: 1rem;
}

.product-size-card-heading-admin small {
  color: #8a786b;
}

.product-size-active-admin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  cursor: pointer;
}

.product-size-active-admin input {
  width: 18px;
  height: 18px;
}

.product-size-price-admin {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.product-size-price-admin > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.product-size-price-admin input,
.product-recipe-row-admin input,
.product-recipe-row-admin select {
  width: 100%;
  box-sizing: border-box;
}

.product-size-recipe-admin {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eee1d6;
}

.product-size-recipe-heading-admin {
  align-items: center;
}

.product-size-recipe-heading-admin button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #e65300;
  border-radius: 9px;
  background: #fff;
  color: #c84600;
  font-weight: 800;
  cursor: pointer;
}

.product-size-recipe-heading-admin button:disabled {
  opacity: .5;
  cursor: default;
}

.product-recipe-list-admin {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.product-recipe-row-admin {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #eee1d6;
  border-radius: 10px;
  background: #fffaf7;
  overflow: hidden;
}

.product-recipe-row-admin label,
.product-recipe-cost-admin {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.product-recipe-row-admin label > span,
.product-recipe-cost-admin > span {
  color: #77685d;
  font-size: .78rem;
  font-weight: 700;
}

.product-recipe-ingredient-field-admin {
  width: 100%;
}

.product-recipe-controls-admin {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) minmax(70px, .72fr) minmax(86px, .9fr) auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.product-recipe-unit-field-admin select {
  min-height: 40px;
}

.product-recipe-cost-admin {
  align-self: stretch;
}

.product-recipe-cost-admin strong {
  min-height: 22px;
  display: flex;
  align-items: center;
  font-size: .93rem;
  white-space: nowrap;
}

.product-recipe-cost-admin small {
  color: #8a786b;
  font-size: .68rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.product-recipe-remove-admin {
  min-height: 40px;
  min-width: 92px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 7px 12px;
  border: 1px solid #dc3545;
  border-radius: 8px;
  background: #fff;
  color: #b8202e;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.product-recipe-total-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff2e9;
  color: #5f493d;
  font-size: .84rem;
  font-weight: 700;
}

.product-recipe-total-admin strong {
  color: #b74300;
  font-size: .95rem;
  white-space: nowrap;
}

.product-recipe-empty-admin {
  padding: 10px;
  border: 1px dashed #d8c7b8;
  border-radius: 9px;
  color: #75685f;
  background: #fff;
  font-size: .88rem;
}

html[dir="rtl"] .product-inventory-section-admin,
body[dir="rtl"] .product-inventory-section-admin {
  text-align: right;
}

@media (min-width: 1051px) and (max-width: 1500px) {
  .product-recipe-controls-admin {
    grid-template-columns: minmax(78px, 1fr) minmax(96px, auto);
  }

  .product-recipe-cost-admin,
  .product-recipe-remove-admin {
    width: 100%;
  }
}

@media (max-width: 1050px) {
  .product-sizes-grid-admin {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .product-inventory-section-admin {
    padding: 13px;
  }

  .product-size-card-admin {
    padding: 12px;
  }

  .product-size-recipe-heading-admin {
    align-items: stretch;
    flex-direction: column;
  }

  .product-size-recipe-heading-admin button {
    width: 100%;
  }

  .product-recipe-controls-admin {
    grid-template-columns: 1fr 90px;
  }

  .product-recipe-cost-admin,
  .product-recipe-remove-admin {
    width: 100%;
  }

  .product-recipe-remove-admin {
    min-height: 38px;
  }
}


/* ======================================================
   INGREDIENT INVENTORY ADMIN — BATCH 6 (2026-09-16)
   ====================================================== */
.ingredient-setup-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.ingredient-setup-guide > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px;
  border: 1px solid #f0dccb;
  border-radius: 12px;
  background: #fffaf5;
}
.ingredient-setup-guide strong { font-size: 14px; }
.ingredient-setup-guide span { color: #745f50; font-size: 12px; line-height: 1.45; }
.ingredient-setup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ingredient-setup-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, .9fr) minmax(150px, .9fr) minmax(160px, .8fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #eadfd6;
  border-radius: 12px;
  background: #fff;
}
.ingredient-setup-row > div:not(.category-admin-actions) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ingredient-setup-row span { color: #7b6c62; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ingredient-setup-row strong { font-size: 13px; overflow-wrap: anywhere; }
.ingredient-setup-row small { color: #8b8179; font-size: 11px; }

.ingredient-inventory-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 15, 12, .58);
  overflow-y: auto;
}
.ingredient-inventory-modal {
  width: min(780px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  border: 1px solid #ead7c7;
}
.ingredient-inventory-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #fff8f1;
  border-bottom: 1px solid #eedfd2;
}
.ingredient-inventory-modal-head h3 { margin: 0; font-size: 19px; }
.ingredient-inventory-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid #ddcabc;
  border-radius: 10px;
  background: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.ingredient-inventory-modal-body { padding: 18px; }
.ingredient-inventory-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ingredient-inventory-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 800;
  font-size: 12px;
}
.ingredient-inventory-form-grid input,
.ingredient-inventory-form-grid select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #d9cdc4;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}
.ingredient-inventory-form-grid small { color: #7e7168; font-weight: 500; line-height: 1.4; }
.ingredient-extra-price-field { grid-column: 1 / -1; }
.ingredient-inventory-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.ingredient-purchase-context {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8f0;
  border: 1px solid #f0dccb;
}
.ingredient-purchase-context strong { font-size: 16px; }
.ingredient-purchase-context span { color: #694f40; font-weight: 800; }
.ingredient-purchase-context small { width: 100%; color: #7b6c62; }
.ingredient-purchase-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f8f5;
  border: 1px solid #dbe8dc;
}
.ingredient-purchase-summary strong { font-size: 18px; color: #12713f; }

.ingredient-stock-intro-actions {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ingredient-stock-intro-actions > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ingredient-stock-intro-actions small { color: #8b6a54; font-size: 11px; }
.ingredient-stock-table-v2 .ingredient-stock-header,
.ingredient-stock-table-v2 .ingredient-stock-row {
  grid-template-columns: 72px minmax(170px, 1.35fr) minmax(125px,.85fr) minmax(120px,.8fr) minmax(115px,.8fr) minmax(110px,.75fr) minmax(105px,.7fr) 90px minmax(250px,1.6fr);
}
.ingredient-stock-table-v2 .ingredient-stock-row > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ingredient-inline-edit {
  align-self: flex-start;
  border: 0;
  padding: 0;
  background: transparent;
  color: #d7540a;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.ingredient-type-pill {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: #fff0db;
  color: #a84c00;
}
.ingredient-type-pill.manual { background: #e9eef9; color: #3a527e; }
.ingredient-type-pill.recipe { background: #e8f6ed; color: #17663d; }
.ingredient-stock-actions-v2 { display: flex; flex-wrap: wrap; gap: 6px; }
.stock-action-btn.purchase {
  background: #0f7c48 !important;
  border-color: #0f7c48 !important;
  color: #fff !important;
}
.ingredient-movement-pill.purchase { background: #dcefe5; color: #0b7141; }
.ingredient-movement-pill.waste { background: #ffe0e3; color: #a9172d; }
.ingredient-movement-pill.stock_count_adjustment { background: #e7e9f7; color: #41498f; }
.ingredient-history-table-v2 .ingredient-history-header,
.ingredient-history-table-v2 .ingredient-history-row {
  grid-template-columns: .9fr .8fr 1fr .85fr .8fr .8fr .85fr .55fr 1.35fr;
}

@media (max-width: 1100px) {
  .ingredient-setup-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingredient-setup-row .category-admin-actions { grid-column: 1 / -1; }
  .ingredient-stock-table-v2 { overflow-x: auto; }
  .ingredient-stock-table-v2 .ingredient-stock-header,
  .ingredient-stock-table-v2 .ingredient-stock-row { min-width: 1260px; }
}
@media (max-width: 760px) {
  .ingredient-setup-guide,
  .ingredient-inventory-form-grid { grid-template-columns: 1fr; }
  .ingredient-extra-price-field { grid-column: auto; }
  .ingredient-setup-row { grid-template-columns: 1fr; }
  .ingredient-stock-intro-actions { flex-direction: column; align-items: stretch; }
  .ingredient-stock-intro-actions .product-add-btn { width: 100%; }
  .ingredient-inventory-modal-overlay { padding: 8px; align-items: flex-start; }
  .ingredient-inventory-modal { max-height: calc(100vh - 16px); }
  .ingredient-inventory-modal-body { padding: 14px; }
  .ingredient-inventory-modal-actions { flex-direction: column-reverse; }
  .ingredient-inventory-modal-actions button { width: 100%; }
}

/* ======================================================
   INGREDIENT INVENTORY ADMIN — BATCH 7 (2026-09-16)
   ====================================================== */
.ingredient-setup-row-v7 {
  grid-template-columns: minmax(180px, 1.35fr) minmax(130px,.85fr) minmax(110px,.7fr) minmax(110px,.7fr) minmax(150px,.85fr) auto;
}

.manual-count-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.manual-count-info-grid > div {
  padding: 12px 14px;
  border: 1px solid #e5d8ce;
  border-radius: 10px;
  background: #fffaf5;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.manual-count-info-grid span {
  color: #7b6c62;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.manual-count-info-grid strong { font-size: 16px; }
.manual-count-note-field { grid-column: 1 / -1; }
.manual-count-explanation {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #e3dfc4;
  background: #fffdf0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.manual-count-explanation strong { color: #6d561c; font-size: 13px; }
.manual-count-explanation span { color: #756c56; font-size: 11px; line-height: 1.45; }

.stock-action-btn.manual-count {
  background: #4657a6 !important;
  border-color: #4657a6 !important;
  color: #fff !important;
}

.manual-consumption-history-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eadfd6;
}
.manual-consumption-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.manual-consumption-heading > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.manual-consumption-heading strong { font-size: 16px; }
.manual-consumption-heading span { color: #786a61; font-size: 12px; }
.manual-consumption-filters {
  display: grid;
  grid-template-columns: minmax(180px,1.2fr) minmax(150px,.7fr) minmax(150px,.7fr);
  gap: 10px;
  margin-bottom: 12px;
}
.manual-consumption-filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
}
.manual-consumption-table { overflow-x: auto; }
.manual-consumption-header,
.manual-consumption-row {
  min-width: 1120px;
  display: grid;
  grid-template-columns: 1.05fr .85fr 1.1fr .75fr .75fr .85fr .8fr .8fr .8fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.manual-consumption-header {
  background: #fff8f1;
  border: 1px solid #eadfd6;
  border-radius: 10px 10px 0 0;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #6f5e52;
}
.manual-consumption-row {
  border-left: 1px solid #eadfd6;
  border-right: 1px solid #eadfd6;
  border-bottom: 1px solid #eadfd6;
  background: #fff;
  font-size: 12px;
}
.manual-consumption-row:last-child { border-radius: 0 0 10px 10px; }
.manual-consumption-row > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.manual-consumption-row > div:first-child span { color: #7b6c62; font-size: 10px; }

@media (max-width: 1100px) {
  .ingredient-setup-row-v7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingredient-setup-row-v7 .category-admin-actions { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .manual-count-info-grid,
  .manual-consumption-filters { grid-template-columns: 1fr; }
  .manual-count-note-field { grid-column: auto; }
  .manual-consumption-heading { flex-direction: column; align-items: stretch; }
  .manual-consumption-heading .admin-inline-actions > * { flex: 1 1 0; }
}

/* ======================================================
   ADMIN STICKY LIST / TABLE HEADERS — BATCH 9 (2026-09-16)
   Keeps column labels visible while vertically scrolling.
   Applies across Admin list/table screens.
====================================================== */

.customers-table-header,
.drivers-table-header,
.products-table-header,
.stock-table-header,
.stock-history-header,
.ingredient-stock-header,
.ingredient-history-header,
.manual-consumption-header {
  position: sticky;
  top: 0;
  z-index: 35;
  box-shadow: 0 3px 10px rgba(36, 27, 20, 0.08);
}

/*
  Several desktop list containers previously used overflow:hidden.
  overflow:clip preserves rounded clipping without becoming a vertical
  scroll container, allowing the header above to stick to the viewport.
*/
@media (min-width: 1101px) {
  .customers-table,
  .drivers-table,
  .products-table,
  .stock-table,
  .stock-history-table,
  .ingredient-stock-table,
  .ingredient-history-table,
  .manual-consumption-table {
    overflow: clip;
  }
}

/* Keep sticky headers visually solid above scrolling rows. */
.customers-table-header,
.drivers-table-header,
.products-table-header,
.stock-table-header,
.stock-history-header,
.ingredient-stock-header,
.ingredient-history-header,
.manual-consumption-header {
  background-clip: padding-box;
}


/* ======================================================
   INGREDIENT USAGE REPORT + CSV — BATCH 11 (2026-09-17)
====================================================== */
.admin-inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.stock-export-csv-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #e55300;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.stock-export-csv-btn:disabled { opacity: .6; cursor: wait; }
.stock-export-csv-btn:hover:not(:disabled) {
  background: #c94700;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(229, 83, 0, .2);
}
.stock-refresh-btn {
  border: 1.5px solid #e55300;
  border-radius: 10px;
  padding: 9px 14px;
  background: #fff;
  color: #b84300;
  font: inherit;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(42, 29, 20, .06);
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.stock-refresh-btn:hover:not(:disabled) {
  background: #fff2e9;
  color: #963700;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(229, 83, 0, .14);
}
.stock-refresh-btn:active:not(:disabled) { transform: translateY(0); }
.stock-refresh-btn:disabled { opacity: .6; cursor: wait; }
.ingredient-report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.ingredient-report-heading > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ingredient-report-heading strong { font-size: 18px; }
.ingredient-report-heading span { color: #75695f; font-size: 12px; line-height: 1.45; }
.ingredient-report-filters {
  display: grid;
  grid-template-columns: minmax(170px,.8fr) minmax(220px,1.2fr) minmax(150px,.65fr) minmax(150px,.65fr);
  gap: 10px;
  margin-bottom: 16px;
}
.ingredient-report-filters label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 900;
}
.ingredient-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.ingredient-report-card {
  border: 1px solid #ecd9c9;
  background: #fffaf6;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ingredient-report-card span { color: #75665c; font-size: 11px; font-weight: 800; }
.ingredient-report-card strong { font-size: 21px; color: #1f1c19; }
.ingredient-report-section { margin-top: 18px; }
.ingredient-report-section h3 { margin: 0 0 10px; font-size: 15px; }
.ingredient-report-table { overflow-x: auto; }
.ingredient-report-header,
.ingredient-report-row {
  min-width: 760px;
  display: grid;
  grid-template-columns: 1.5fr .7fr .8fr .9fr .8fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.ingredient-report-detail-header,
.ingredient-report-detail-row {
  min-width: 1200px;
  display: grid;
  grid-template-columns: .8fr 1fr .65fr 1.35fr .65fr .75fr 1fr .85fr .75fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}
.ingredient-report-header,
.ingredient-report-detail-header {
  position: sticky;
  top: 0;
  z-index: 35;
  background: #fff8f1;
  border: 1px solid #eadfd6;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 3px 10px rgba(36, 27, 20, 0.08);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  color: #6f5e52;
}
.ingredient-report-row,
.ingredient-report-detail-row {
  border-left: 1px solid #eadfd6;
  border-right: 1px solid #eadfd6;
  border-bottom: 1px solid #eadfd6;
  background: #fff;
  font-size: 12px;
}
.ingredient-report-row:last-child,
.ingredient-report-detail-row:last-child { border-radius: 0 0 10px 10px; }
.ingredient-report-return { color: #b42318; font-weight: 800; }

@media (min-width: 1101px) {
  .ingredient-report-table { overflow: clip; }
}
@media (max-width: 900px) {
  .ingredient-report-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ingredient-report-filters { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .ingredient-report-heading { flex-direction: column; align-items: stretch; }
  .ingredient-report-heading .admin-inline-actions { width: 100%; }
  .ingredient-report-heading .admin-inline-actions > * { flex: 1 1 0; }
  .ingredient-report-summary,
  .ingredient-report-filters { grid-template-columns: 1fr; }
  .manual-consumption-heading .admin-inline-actions { width: 100%; }
  .manual-consumption-heading .admin-inline-actions > * { flex: 1 1 0; }
}

/* ======================================================
   MANUAL CONSUMPTION HISTORY QUICK JUMP — BATCH 13
====================================================== */
.ingredient-stock-intro-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.ingredient-stock-history-jump-btn {
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13px;
  white-space: nowrap;
}
.manual-consumption-history-section {
  scroll-margin-top: 92px;
}
@media (max-width: 760px) {
  .ingredient-stock-intro-buttons {
    width: 100%;
    justify-content: stretch;
  }
  .ingredient-stock-intro-buttons > * {
    flex: 1 1 0;
    width: auto !important;
  }
}


/* Batch 16: polished ingredient Edit actions */
.ingredient-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #e46a22 !important;
  border-radius: 10px !important;
  background: #fff8f2 !important;
  color: #bd4d0a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(127, 55, 13, 0.08);
  transition: background .16s ease, color .16s ease, border-color .16s ease,
              box-shadow .16s ease, transform .16s ease;
}
.ingredient-edit-btn::before {
  content: "✎";
  font-size: 14px;
  line-height: 1;
}
.ingredient-edit-btn:hover,
.ingredient-edit-btn:focus-visible {
  background: #df5708 !important;
  border-color: #df5708 !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(196, 74, 5, 0.18);
  transform: translateY(-1px);
  outline: none;
}
.ingredient-edit-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(127, 55, 13, 0.14);
}
.ingredient-edit-btn-inline {
  align-self: flex-start;
  margin-top: 2px;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 8px !important;
  font-size: 10px !important;
}
.ingredient-edit-btn-inline::before { font-size: 12px; }
html[dir="rtl"] .ingredient-edit-btn { flex-direction: row-reverse; }

/* ======================================================
   FINANCE / OVERHEAD — BATCH 17
====================================================== */
.finance-page-panel {
  display: grid;
  gap: 16px;
}

.finance-page-heading {
  gap: 14px;
}

.finance-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #eadfd7;
  padding-bottom: 10px;
}

.finance-tab {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #decfc4;
  border-radius: 10px;
  background: #fff;
  color: #5f5148;
  font-weight: 800;
  cursor: pointer;
}

.finance-tab.active {
  border-color: #e65300;
  background: #fff3eb;
  color: #bd4807;
  box-shadow: 0 2px 8px rgba(120, 59, 23, .08);
}

.finance-primary-btn,
.finance-secondary-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.finance-primary-btn {
  border: 1px solid #d9550a;
  background: #d9550a;
  color: #fff;
  box-shadow: 0 3px 10px rgba(153, 67, 20, .14);
}

.finance-primary-btn:hover,
.finance-primary-btn:focus-visible {
  background: #bf4704;
  border-color: #bf4704;
}

.finance-secondary-btn {
  border: 1px solid #d8c9be;
  background: #fff;
  color: #5f5148;
}

.finance-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fffaf7;
}

.finance-toolbar .stock-filter-group {
  min-width: 150px;
}

.finance-summary-grid,
.finance-overhead-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.finance-summary-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(73, 47, 30, .05);
}

.finance-summary-card span {
  color: #75675e;
  font-size: .78rem;
  font-weight: 750;
}

.finance-summary-card strong {
  color: #30251f;
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.finance-summary-card.emphasis {
  border-color: #e8a16f;
  background: #fff4ec;
}

.finance-summary-card.emphasis strong {
  color: #b44100;
}

.finance-message {
  min-height: 0;
  font-size: .9rem;
  font-weight: 700;
}

.finance-message.success {
  color: #27723b;
}

.finance-message.error {
  color: #a92935;
}

.finance-expense-form-card {
  padding: 16px;
  border: 1px solid #e5d7cc;
  border-radius: 14px;
  background: #fffaf7;
  box-shadow: 0 4px 18px rgba(72, 49, 34, .06);
}

.finance-expense-form-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.finance-expense-form-heading h3 {
  margin: 0 0 4px;
}

.finance-expense-form-heading p {
  margin: 0;
  color: #75675e;
  font-size: .83rem;
}

.finance-expense-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.finance-expense-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #5f5148;
  font-size: .8rem;
  font-weight: 750;
}

.finance-expense-form-grid input,
.finance-expense-form-grid select,
.finance-expense-form-grid textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d9ccc2;
  border-radius: 9px;
  background: #fff;
  color: #30251f;
  font: inherit;
}

.finance-expense-form-grid textarea {
  min-height: 68px;
  resize: vertical;
}

.finance-expense-wide-field {
  grid-column: span 2;
}

.finance-money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.finance-expense-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.finance-expenses-list {
  min-width: 0;
}

.finance-expenses-table {
  overflow: auto;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fff;
}

.finance-expenses-header,
.finance-expense-row {
  display: grid;
  grid-template-columns: 110px minmax(140px, 1.1fr) minmax(130px, 1fr) 105px minmax(180px, 1.4fr) 110px 170px;
  gap: 0;
  min-width: 1050px;
}

.finance-expenses-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7eee8;
  color: #5d4b40;
  font-size: .76rem;
  font-weight: 850;
}

.finance-expenses-header > div,
.finance-expense-row > div {
  padding: 11px 10px;
  border-bottom: 1px solid #f0e6df;
  min-width: 0;
  overflow-wrap: anywhere;
}

.finance-expense-row {
  align-items: center;
  color: #40332b;
  font-size: .84rem;
}

.finance-expense-row:last-child > div {
  border-bottom: 0;
}

.finance-amount-cell {
  font-weight: 850;
  color: #8f3707;
  white-space: nowrap;
}

.finance-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #ddd0c6;
  background: #f8f3ef;
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}

.finance-type-badge.monthly {
  background: #eef6ff;
  border-color: #bed7f1;
  color: #315d86;
}

.finance-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.finance-edit-btn,
.finance-delete-btn {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.finance-edit-btn {
  border: 1px solid #e46a22;
  background: #fff8f2;
  color: #bd4d0a;
}

.finance-delete-btn {
  border: 1px solid #d45762;
  background: #fff7f8;
  color: #ad2935;
}

.finance-overhead-intro {
  margin-bottom: 12px;
}

.finance-overhead-intro h3 {
  margin: 0 0 5px;
}

.finance-overhead-intro p,
.finance-overhead-note {
  margin: 0;
  color: #75675e;
  font-size: .84rem;
  line-height: 1.45;
}

.finance-overhead-note {
  margin-top: 10px;
}

.product-recipe-cost-summary-admin {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #eadfd7;
}

.product-recipe-cost-summary-admin .product-recipe-total-admin {
  margin-top: 0;
}

.product-recipe-total-admin.overhead {
  background: #f7f4f1;
}

.product-recipe-total-admin.overhead strong {
  color: #63564e;
}

.product-recipe-total-admin.fully-loaded {
  background: #fff0e4;
  border: 1px solid #f1c49f;
}

.product-recipe-total-admin.fully-loaded strong {
  color: #a83f04;
  font-size: 1.02rem;
}

.product-recipe-overhead-note-admin {
  color: #807067;
  font-size: .7rem;
  line-height: 1.35;
  padding: 0 3px;
}

html[dir="rtl"] .finance-expense-form-grid,
html[dir="rtl"] .finance-summary-card,
html[dir="rtl"] .finance-overhead-intro,
html[dir="rtl"] .finance-expenses-table {
  text-align: right;
}

@media (max-width: 1100px) {
  .finance-summary-grid,
  .finance-overhead-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-expense-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-expense-wide-field {
    grid-column: span 1;
  }
}

@media (max-width: 700px) {
  .finance-page-heading,
  .finance-expense-form-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .finance-page-heading .finance-primary-btn,
  .finance-expense-form-heading .finance-secondary-btn {
    width: 100%;
  }
  .finance-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .finance-toolbar .stock-filter-group {
    min-width: 0;
  }
  .finance-toolbar button {
    width: 100%;
  }
  .finance-summary-grid,
  .finance-overhead-cards,
  .finance-expense-form-grid {
    grid-template-columns: 1fr;
  }
  .finance-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .finance-tab {
    width: 100%;
  }
  .finance-expense-wide-field {
    grid-column: span 1;
  }
}

/* ======================================================
   OVERHEAD RATE + OPTIONAL PRICING HELPER — BATCH 20
   ====================================================== */

.pricing-helper-toggle-admin {
  min-height: 34px;
  border: 1px solid #d94f00;
  border-radius: 9px;
  background: #fff7f0;
  color: #b74300;
  padding: 7px 12px;
  font: inherit;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
  justify-self: start;
}

.pricing-helper-toggle-admin:hover:not(:disabled) {
  background: #d94f00;
  color: #fff;
}

.pricing-helper-toggle-admin:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.pricing-helper-panel-admin {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
  margin-top: 4px;
  padding: 11px 42px 11px 11px;
  border: 1px solid #ead8ca;
  border-radius: 10px;
  background: #fffaf6;
}

.pricing-helper-panel-admin[hidden] {
  display: none !important;
}

.pricing-helper-panel-admin label,
.pricing-helper-rate-admin,
.pricing-helper-suggested-admin {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pricing-helper-panel-admin label > span,
.pricing-helper-rate-admin span,
.pricing-helper-suggested-admin span {
  color: #6e5b50;
  font-size: .68rem;
  font-weight: 800;
}

.pricing-helper-rate-admin strong,
.pricing-helper-suggested-admin strong {
  min-height: 36px;
  display: flex;
  align-items: center;
  color: #9f3d07;
  font-size: .92rem;
}

.pricing-percent-input-admin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.pricing-percent-input-admin input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d9cec6;
  border-radius: 8px;
  padding: 0 9px;
  font: inherit;
  background: #fff;
}

.pricing-percent-input-admin > span {
  color: #b74300;
  font-weight: 900;
}

.pricing-helper-use-admin {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #198754;
  border-radius: 8px;
  background: #f2fbf6;
  color: #146c43;
  padding: 7px 9px;
  font: inherit;
  font-size: .72rem;
  line-height: 1.15;
  font-weight: 850;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  cursor: pointer;
}

.pricing-helper-use-admin:hover:not(:disabled) {
  background: #198754;
  color: #fff;
}

.pricing-helper-use-admin:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pricing-helper-close-admin {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9c5b7;
  border-radius: 8px;
  background: #fff;
  color: #8d5d43;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.pricing-helper-close-admin:hover {
  border-color: #d94f00;
  color: #b74300;
  background: #fff7f0;
}

.pricing-helper-explanation-admin {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #ead8ca;
  border-radius: 8px;
  background: #fff;
  color: #5f5149;
  font-size: .69rem;
  line-height: 1.45;
}

.pricing-helper-explanation-admin[hidden] {
  display: none !important;
}

.pricing-helper-explanation-admin strong {
  color: #8e3909;
  font-size: .72rem;
}

.pricing-helper-explanation-admin span {
  display: block;
}

.pricing-helper-panel-admin > small {
  grid-column: 1 / -1;
  color: #7a6a60;
  font-size: .68rem;
  line-height: 1.35;
}

.pricing-helper-warning-admin {
  color: #a11919 !important;
  font-weight: 800;
}

.product-extra-usage-admin {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(105px, .7fr) minmax(90px, .55fr) repeat(3, minmax(145px, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding-top: 8px;
  border-top: 1px solid #eee3db;
}

.product-extra-usage-admin[hidden] {
  display: none !important;
}

.product-extra-usage-admin label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-extra-usage-admin label > span,
.product-extra-cost-chip-admin span {
  color: #6e5b50;
  font-size: .66rem;
  font-weight: 800;
}

.product-extra-usage-admin input,
.product-extra-usage-admin select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d7d7d7;
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  font: inherit;
  font-size: .75rem;
}

.product-extra-cost-chip-admin {
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #faf7f4;
}

.product-extra-cost-chip-admin strong {
  color: #6c574b;
  font-size: .88rem;
}

.product-extra-cost-chip-admin.fully-loaded {
  background: #fff0e4;
  border: 1px solid #f1c49f;
}

.product-extra-cost-chip-admin.fully-loaded strong {
  color: #a83f04;
}

.product-extra-pricing-helper-admin {
  grid-column: 1 / -1;
  margin-top: 0;
}

@media (max-width: 1200px) {
  .product-extra-usage-admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .pricing-helper-panel-admin,
  .product-extra-usage-admin {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .pricing-helper-panel-admin,
  .product-extra-usage-admin {
    grid-template-columns: 1fr;
  }

  .pricing-helper-toggle-admin,
  .pricing-helper-use-admin {
    width: 100%;
  }
}

/* ======================================================
   LOCKED PRICING OVERHEAD SETTINGS — BATCH 21
   ====================================================== */

.finance-toolbar[hidden],
.finance-summary-grid[hidden],
.finance-view-section[hidden],
#financeAddExpense[hidden] {
  display: none !important;
}

.pricing-overhead-settings-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #e5d7cc;
  border-radius: 14px;
  background: #fffaf7;
  box-shadow: 0 4px 18px rgba(72, 49, 34, .06);
}

.pricing-overhead-settings-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pricing-overhead-settings-heading h3 {
  margin: 0 0 5px;
  color: #30251f;
}

.pricing-overhead-settings-heading p {
  margin: 0 0 4px;
  color: #75675e;
  font-size: .86rem;
  line-height: 1.45;
}

.pricing-overhead-settings-heading small {
  color: #9a6a4f;
  font-weight: 750;
}

.pricing-overhead-source-badge {
  min-width: 190px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #f0c7a8;
  border-radius: 10px;
  background: #fff2e8;
}

.pricing-overhead-source-badge span {
  color: #7d6759;
  font-size: .7rem;
  font-weight: 800;
}

.pricing-overhead-source-badge strong {
  color: #a53e05;
  font-size: .9rem;
}

.pricing-overhead-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pricing-overhead-settings-grid > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #5f5148;
  font-size: .8rem;
  font-weight: 800;
}

.pricing-overhead-settings-grid input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d9ccc2;
  border-radius: 9px;
  background: #fff;
  color: #30251f;
  font: inherit;
}

.pricing-overhead-main-rate {
  padding: 11px;
  border: 1px solid #efb88f;
  border-radius: 11px;
  background: #fff3ea;
}

.pricing-overhead-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pricing-overhead-suggestion-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #eadfd7;
  border-radius: 12px;
  background: #fff;
}

.pricing-overhead-suggestion-card > span {
  color: #75675e;
  font-size: .76rem;
  font-weight: 800;
}

.pricing-overhead-suggestion-card > strong {
  color: #aa4106;
  font-size: 1.25rem;
}

.pricing-overhead-suggestion-card > small {
  min-height: 34px;
  color: #78685f;
  font-size: .72rem;
  line-height: 1.45;
}

.pricing-overhead-suggestion-card .finance-secondary-btn {
  justify-self: start;
}

.pricing-overhead-lock-note {
  padding: 11px 13px;
  border: 1px solid #c9d9cc;
  border-radius: 10px;
  background: #f5fbf6;
  color: #405b46;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.45;
}

.pricing-overhead-settings-actions {
  display: flex;
  justify-content: flex-end;
}

html[dir="rtl"] .pricing-overhead-settings-card,
html[dir="rtl"] .pricing-overhead-source-badge,
html[dir="rtl"] .pricing-overhead-suggestion-card {
  text-align: right;
}

@media (max-width: 900px) {
  .pricing-overhead-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .finance-tabs {
    grid-template-columns: 1fr;
  }

  .pricing-overhead-settings-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .pricing-overhead-source-badge {
    min-width: 0;
  }

  .pricing-overhead-suggestions-grid {
    grid-template-columns: 1fr;
  }

  .pricing-overhead-suggestion-card .finance-secondary-btn,
  .pricing-overhead-settings-actions .finance-primary-btn {
    width: 100%;
  }
}

/* Batch 22: Base Price Pricing Helper + finance clarity */
.product-base-price-field-admin .pricing-helper-toggle-admin {
  align-self: flex-start;
  margin-top: 2px;
}

.product-base-pricing-helper-panel-admin {
  margin-top: 2px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-base-pricing-helper-panel-admin > small,
.product-base-pricing-helper-panel-admin > button {
  grid-column: 1 / -1;
}

.finance-secondary-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: #f3efec;
  color: #9a8d85;
}

@media (max-width: 760px) {
  .product-base-pricing-helper-panel-admin {
    grid-template-columns: 1fr;
  }
}

/* Batch 27: Pricing calculation info popup */
.pricing-helper-label-with-info-admin {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
}

.pricing-helper-info-admin {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d9b89f;
  border-radius: 50%;
  background: #fff;
  color: #b74300;
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.pricing-helper-info-admin:hover:not(:disabled) {
  border-color: #d94f00;
  background: #fff4eb;
}

.pricing-helper-info-admin:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.pricing-info-modal-admin {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(35, 24, 18, .48);
}

.pricing-info-modal-admin[hidden] {
  display: none !important;
}

.pricing-info-modal-card-admin {
  position: relative;
  width: min(560px, 100%);
  max-height: min(82vh, 720px);
  overflow: auto;
  border: 1px solid #e1c6b3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(39, 24, 14, .22);
  padding: 22px;
  color: #3f332d;
}

.pricing-info-modal-card-admin h3 {
  margin: 0 36px 8px 0;
  color: #9f3d07;
  font-size: 1rem;
}

[dir="rtl"] .pricing-info-modal-card-admin h3 {
  margin: 0 0 8px 36px;
}

.pricing-info-modal-intro-admin,
.pricing-info-modal-note-admin,
.pricing-info-modal-block-admin p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
}

.pricing-info-modal-block-admin {
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid #ead8ca;
  border-radius: 10px;
  background: #fffaf6;
}

.pricing-info-modal-block-admin strong {
  display: block;
  margin-bottom: 7px;
  color: #73442b;
  font-size: .78rem;
}

.pricing-info-modal-block-admin code {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff;
  color: #8f3507;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.45;
}

.pricing-info-modal-note-admin {
  margin-top: 14px;
  color: #6f6158;
}

.pricing-info-modal-x-admin {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddc9bb;
  border-radius: 8px;
  background: #fff;
  color: #7f5540;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}

[dir="rtl"] .pricing-info-modal-x-admin {
  right: auto;
  left: 10px;
}

.pricing-info-modal-close-admin {
  width: 100%;
  margin-top: 16px;
  min-height: 40px;
  border: 1px solid #d94f00;
  border-radius: 9px;
  background: #fff4eb;
  color: #a73e06;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.pricing-info-modal-close-admin:hover {
  background: #d94f00;
  color: #fff;
}


/* Batch 28: make Pricing Helper info control clearer on desktop and remove obstructive native tooltips */
@media (min-width: 761px) {
  .pricing-helper-info-admin {
    width: 27px;
    height: 27px;
    min-width: 27px;
    border: 2px solid #d94f00;
    background: #fff7f1;
    color: #c34700;
    font-size: .98rem;
    box-shadow: 0 1px 3px rgba(140, 62, 12, .14);
  }

  .pricing-helper-info-admin:hover:not(:disabled),
  .pricing-helper-info-admin:focus-visible:not(:disabled) {
    background: #d94f00;
    color: #fff;
    border-color: #d94f00;
    outline: 2px solid rgba(217, 79, 0, .18);
    outline-offset: 2px;
  }

  .pricing-helper-label-with-info-admin {
    gap: 8px;
  }
}


/* Batch 29: Pricing info is always available + clearer desktop size-helper layout */
.pricing-helper-info-admin {
  opacity: 1 !important;
  cursor: pointer !important;
}

.product-size-card-admin .pricing-helper-panel-admin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-size-card-admin .pricing-helper-info-admin {
  flex: 0 0 auto;
}

@media (min-width: 761px) {
  .pricing-helper-info-admin {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border: 2px solid #d94f00;
    background: #fff;
    color: #b74300;
    font-size: 1rem;
    box-shadow: 0 1px 4px rgba(140, 62, 12, .18);
  }

  .pricing-helper-label-with-info-admin {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
}

/* ======================================================
   INGREDIENT SEARCH — BATCH 30 (2026-09-19)
   ====================================================== */
.ingredient-setup-search-admin {
  display: block;
  margin: 0 0 14px;
}
.ingredient-setup-search-admin > span {
  display: block;
  margin: 0 0 6px;
  color: #2f241d;
  font-size: 13px;
  font-weight: 800;
}
.ingredient-setup-search-box-admin,
.ingredient-library-search-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1.5px solid #e6c8b0;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ingredient-setup-search-box-admin:focus-within,
.ingredient-library-search-admin:focus-within {
  border-color: #df5700;
  box-shadow: 0 0 0 3px rgba(223, 87, 0, .10);
}
.ingredient-setup-search-box-admin > span,
.ingredient-library-search-admin > span {
  flex: 0 0 auto;
  color: #b84b08;
  font-size: 20px;
  line-height: 1;
}
.ingredient-setup-search-box-admin input,
.ingredient-library-search-admin input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #231b16;
  font: inherit;
  font-size: 14px;
}
.ingredient-library-search-admin {
  margin: 8px 0 10px;
  min-height: 38px;
  padding-inline: 10px;
}
.ingredient-library-search-admin input { font-size: 13px; }
.ingredient-search-empty-admin,
.ingredient-library-search-empty-admin {
  color: #7b6c62;
  font-size: 12px;
}
.ingredient-library-search-empty-admin {
  display: block;
  margin-top: 7px;
}
@media (max-width: 760px) {
  .ingredient-setup-search-box-admin,
  .ingredient-library-search-admin { min-height: 44px; }
}

/* Batch 32: make stock adjustment states explicit and add EN/AR switch in pricing info popup. */
.stock-action-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.pricing-info-language-switch-admin {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0 0 12px;
  border: 1px solid #e85a0c;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.pricing-info-language-switch-admin button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8a3b12;
  font: inherit;
  font-weight: 700;
  min-width: 52px;
  padding: 7px 12px;
  cursor: pointer;
}

.pricing-info-language-switch-admin button.active {
  background: #e85a0c;
  color: #fff;
}

[dir="rtl"] .pricing-info-language-switch-admin {
  direction: ltr;
}

/* ======================================================
   INGREDIENT INVENTORY UX — BATCH 34 (2026-09-20)
   ====================================================== */
.ingredient-modal-language-switch {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}
.ingredient-modal-language-switch button {
  min-width: 54px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1.5px solid #df5700;
  background: #fff;
  color: #8f3904;
  font-weight: 800;
  cursor: pointer;
}
.ingredient-modal-language-switch button:first-child {
  border-radius: 999px 0 0 999px;
}
.ingredient-modal-language-switch button:last-child {
  margin-inline-start: -1.5px;
  border-radius: 0 999px 999px 0;
}
.ingredient-modal-language-switch button.active {
  background: #e35400;
  color: #fff;
}
.ingredient-inventory-modal[dir="rtl"] .ingredient-modal-language-switch {
  justify-content: flex-start;
}
.ingredient-inventory-modal[dir="rtl"] .ingredient-modal-language-switch button:first-child {
  border-radius: 0 999px 999px 0;
}
.ingredient-inventory-modal[dir="rtl"] .ingredient-modal-language-switch button:last-child {
  border-radius: 999px 0 0 999px;
}
.ingredient-purpose-help {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid #edd1bb;
  border-radius: 10px;
  background: #fff8f1;
  color: #5f493a;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
}
.ingredient-setup-filter-row-admin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.ingredient-setup-filter-row-admin .ingredient-setup-search-admin {
  margin: 0;
}
.ingredient-setup-type-filter-admin {
  display: block;
}
.ingredient-setup-type-filter-admin > span {
  display: block;
  margin: 0 0 6px;
  color: #2f241d;
  font-size: 13px;
  font-weight: 800;
}
.ingredient-setup-type-filter-admin select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid #e6c8b0;
  border-radius: 10px;
  background: #fff;
  color: #231b16;
  font: inherit;
  font-weight: 700;
}
.ingredient-setup-row-v7 {
  grid-template-columns: minmax(190px, 1.35fr) minmax(130px,.85fr) minmax(120px,.75fr) minmax(110px,.7fr) auto;
}
@media (max-width: 760px) {
  .ingredient-setup-filter-row-admin {
    grid-template-columns: 1fr;
  }
  .ingredient-purpose-help {
    font-size: 13px;
  }
}

/* Batch 35: contextual info buttons for extra-cost fields */
.product-extra-cost-chip-admin > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.product-extra-cost-chip-admin .extra-cost-info-admin {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  font-size: .78rem !important;
  border-width: 1.5px !important;
  box-shadow: none !important;
  flex: 0 0 22px;
}
@media (max-width: 760px) {
  .product-extra-cost-chip-admin .extra-cost-info-admin {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
  }
}

/* ======================================================
   COMBINED UX + PURCHASE CORRECTION — BATCH 36
   ====================================================== */

/* Ingredient Stock: add Total All Branches and keep table readable. */
.ingredient-stock-table-v2 .ingredient-stock-header,
.ingredient-stock-table-v2 .ingredient-stock-row {
  grid-template-columns:
    72px
    minmax(165px, 1.3fr)
    minmax(110px, .8fr)
    minmax(120px, .8fr)
    minmax(105px, .72fr)
    minmax(125px, .82fr)
    minmax(115px, .78fr)
    minmax(105px, .72fr)
    90px
    minmax(250px, 1.55fr);
}

/* Ingredient History: extra Actions column for Correct Purchase. */
.ingredient-history-table-correction .ingredient-history-header,
.ingredient-history-table-correction .ingredient-history-row {
  grid-template-columns: .82fr .78fr .92fr .82fr .72fr .76fr .82fr .52fr 1.18fr .9fr;
}

.ingredient-history-correct-purchase-btn {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #d94f00;
  border-radius: 8px;
  background: #fff8f2;
  color: #b44305;
  font: inherit;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.15;
  cursor: pointer;
  white-space: normal;
}

.ingredient-history-correct-purchase-btn:hover {
  background: #d94f00;
  color: #fff;
}

.purchase-correction-help-admin {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #efd5c2;
  border-radius: 10px;
  background: #fff8f2;
  color: #5d4436;
}
.purchase-correction-help-admin strong { color: #a43f08; }
.purchase-correction-help-admin span { font-size: .82rem; line-height: 1.45; }
.purchase-correction-help-admin small { color: #7f6a5e; line-height: 1.4; }
.ingredient-form-wide { grid-column: 1 / -1; }

/* The margin-limit info icon sits directly beside the validation text. */
.pricing-helper-warning-admin {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pricing-margin-info-admin {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid #b81f1f;
  border-radius: 50%;
  background: #fff;
  color: #a11919;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.pricing-margin-info-admin:hover,
.pricing-margin-info-admin:focus-visible {
  background: #a11919;
  color: #fff;
  outline: none;
}

@media (max-width: 1100px) {
  .ingredient-stock-table-v2 .ingredient-stock-header,
  .ingredient-stock-table-v2 .ingredient-stock-row { min-width: 1420px; }
  .ingredient-history-table-correction { overflow-x: auto; }
  .ingredient-history-table-correction .ingredient-history-header,
  .ingredient-history-table-correction .ingredient-history-row { min-width: 1320px; }
}

/* ======================================================
   INGREDIENT STOCK ACTION CLARITY — BATCH 37
   Keep all action buttons fully visible and clarify that
   Add / Remove / Set operate on quantity.
   ====================================================== */
.ingredient-stock-table-v2 .ingredient-stock-header,
.ingredient-stock-table-v2 .ingredient-stock-row {
  grid-template-columns:
    62px
    minmax(155px, 1.25fr)
    minmax(95px, .72fr)
    minmax(110px, .78fr)
    minmax(90px, .68fr)
    minmax(110px, .78fr)
    minmax(110px, .78fr)
    minmax(95px, .7fr)
    80px
    minmax(220px, 1.45fr);
}

.ingredient-stock-actions-v2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  align-items: stretch;
}

.ingredient-stock-actions-v2 .stock-action-btn {
  width: 100%;
  min-width: 0;
  padding-inline: 7px;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 1100px) {
  .ingredient-stock-table-v2 .ingredient-stock-header,
  .ingredient-stock-table-v2 .ingredient-stock-row {
    min-width: 1280px;
  }
}

/* ======================================================
   PROMOTIONS / COUPONS — BATCH 39
   ====================================================== */
.promotions-page{padding:18px 0 34px}.coupon-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.coupon-form-card{background:#fff;border:1px solid #e2e5e9;border-radius:14px;padding:18px;margin:14px 0;box-shadow:0 5px 16px rgba(0,0,0,.05)}.coupon-form-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.coupon-form-head h3{margin:0}.coupon-close-btn{width:36px;height:36px;border:1px solid #d9dde3;border-radius:10px;background:#fff;font-size:22px;line-height:1;cursor:pointer}.coupon-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.coupon-form-grid label{display:flex;flex-direction:column;gap:6px;font-weight:700}.coupon-form-grid input,.coupon-form-grid select{width:100%;min-height:42px;border:1px solid #cfd5dc;border-radius:9px;padding:9px 10px;font:inherit;background:#fff}.coupon-form-grid small{font-weight:400;color:#68717d;line-height:1.35}.coupon-active-row{display:flex;gap:8px;align-items:center;margin:14px 0;font-weight:700}.coupon-form-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.coupon-form-message,.coupon-page-message{margin:10px 0;color:#177245;font-weight:700}.coupon-table-wrap{overflow:auto;border:1px solid #e1e4e8;border-radius:12px;background:#fff}.coupon-table{width:100%;border-collapse:collapse;min-width:980px}.coupon-table th,.coupon-table td{padding:12px;border-bottom:1px solid #eceff2;text-align:start;vertical-align:middle}.coupon-table th{background:#f7f8fa;position:sticky;top:0;z-index:2}.coupon-table td small{display:block;color:#69717c;margin-top:3px}.coupon-status{white-space:nowrap;font-weight:700}.coupon-status.active{color:#1f7a42}.coupon-status.inactive{color:#8a4a4a}.coupon-actions-cell{display:flex;gap:7px;flex-wrap:wrap}.coupon-edit-btn,.coupon-toggle-btn{border:1px solid #d2d7dd;background:#fff;border-radius:9px;padding:7px 10px;font-weight:700;cursor:pointer}.coupon-edit-btn{border-color:#efa461;color:#a6510a;background:#fff8f1}.coupon-empty{text-align:center!important;color:#6e7680;padding:24px!important}
@media(max-width:900px){.coupon-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.coupon-form-grid{grid-template-columns:1fr}.coupon-form-actions>*{flex:1}.coupon-toolbar>*{flex:1}}

/* Batch 43: Dine-in table + seat visibility */
.compact-order-seating {
  display: block;
  font-weight: 700;
  line-height: 1.25;
}

.dine-in-seating-detail {
  padding: 10px 12px;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
  background: #f5f3ff;
  color: #4c1d95;
}

.dine-in-seating-detail strong {
  font-size: 15px;
}


/* ======================================================
   BATCH 46 — DINING TABLES / TABLE QR
   ====================================================== */
.dining-table-toolbar {
  display: flex;
  gap: 14px;
  align-items: end;
  margin: 14px 0 18px;
}
.dining-table-toolbar label {
  display: grid;
  gap: 6px;
  min-width: min(100%, 320px);
  font-weight: 700;
}
.dining-table-toolbar select,
.dining-table-form-card input {
  min-height: 44px;
  border: 1px solid #d3d3d3;
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
  color: #171717;
}
.dining-table-form-card {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 14px;
  background: #fffaf5;
}
.dining-table-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 220px);
  gap: 12px;
}
.dining-table-form-grid label { display: grid; gap: 6px; font-weight: 700; }
.dining-table-form-actions,
.dining-table-actions,
.dining-table-qr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.dining-table-form-message { min-height: 20px; margin-top: 8px; color: #a12717; }
.dining-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}
.dining-table-card {
  border: 1px solid #dedede;
  border-radius: 16px;
  padding: 15px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.dining-table-card.inactive { opacity: .72; }
.dining-table-card-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.dining-table-card-main > div { display: grid; gap: 2px; }
.dining-table-card-main strong { font-size: 27px; line-height: 1.1; }
.dining-table-card-main small { opacity: .7; }
.dining-table-kicker { font-size: 12px; opacity: .6; text-transform: uppercase; }
.dining-table-order { font-size: 12px; opacity: .65; }
.dining-table-status-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.dining-table-pill {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.dining-table-pill.on { background: #e8f7ea; color: #20652a; }
.dining-table-pill.off { background: #f1f1f1; color: #666; }
.dining-table-actions button,
.dining-table-qr-actions button {
  border: 1px solid #cfcfcf;
  border-radius: 9px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}
.dining-table-actions button:hover,
.dining-table-qr-actions button:hover { background: #f7f7f7; }
.dining-table-actions .danger-light { color: #9a2f22; }
.dining-table-qr-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.58);
  display: grid;
  place-items: center;
  padding: 18px;
}
.dining-table-qr-modal {
  position: relative;
  width: min(100%, 520px);
  max-height: 92vh;
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  padding: 24px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
.dining-table-qr-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f0f0f0;
  font-size: 24px;
  cursor: pointer;
}
html[dir="rtl"] .dining-table-qr-close { right: auto; left: 12px; }
.dining-table-qr-logo { width: 135px; max-width: 45%; }
.dining-table-qr-modal h2 { margin: 6px 0 4px; }
.dining-table-qr-modal h3 { margin: 0 0 12px; font-weight: 600; }
.dining-table-qr-code {
  min-height: 280px;
  display: grid;
  place-items: center;
  margin: 14px auto;
}
.dining-table-qr-code canvas,
.dining-table-qr-code img { max-width: 100%; height: auto; }
.dining-table-qr-scan { font-size: 17px; font-weight: 800; margin: 4px 0 14px; }
.dining-table-qr-url { display: grid; gap: 6px; text-align: start; font-size: 12px; }
.dining-table-qr-url input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
}
.dining-table-qr-warning {
  background: #fff4dd;
  border: 1px solid #e7c77f;
  border-radius: 10px;
  padding: 9px 11px;
  margin: 10px 0;
  font-size: 13px;
}
@media (max-width: 640px) {
  .dining-table-form-grid { grid-template-columns: 1fr; }
  .dining-table-grid { grid-template-columns: 1fr; }
  .dining-table-qr-modal { padding: 20px 14px; }
}


/* ======================================================
   BATCH 47 — UNIFIED QR CODES TABS
   ====================================================== */
.qr-page-heading { margin-bottom: 14px; }

.qr-admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  margin: 0 0 18px;
  border: 1px solid #e2e2e2;
  border-radius: 14px;
  background: #f7f7f7;
}

.qr-admin-tab {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #333;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.qr-admin-tab:hover { background: #fff; }
.qr-admin-tab.active {
  background: #111;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.qr-tab-intro { margin: 2px 0 16px; }
.qr-tab-intro.compact { margin-bottom: 0; }
.qr-tab-intro h3 { margin: 0 0 5px; font-size: 20px; }
.qr-tab-intro p { margin: 0; color: #6c6c6c; line-height: 1.45; }

.qr-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.qr-overview-grid.one-card { grid-template-columns: minmax(0, 620px); }

.qr-overview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #dedede;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

.qr-overview-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff3e9;
  font-size: 22px;
}

.qr-overview-card-copy { min-width: 0; }
.qr-overview-card-copy h3 { margin: 0 0 4px; font-size: 18px; }
.qr-overview-card-copy p { margin: 0 0 8px; color: #666; line-height: 1.4; }
.qr-overview-card-copy code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #777;
}

.qr-view-btn {
  border: 0;
  border-radius: 11px;
  background: #e95800;
  color: #fff;
  padding: 10px 13px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.qr-view-btn:hover { filter: brightness(.96); }

.qr-table-tab-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dining-table-form-actions .primary-action-btn,
.dining-table-form-actions .secondary-action-btn {
  min-width: 104px;
  min-height: 42px;
  border-radius: 11px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.dining-table-form-actions .primary-action-btn {
  border: 1px solid #111;
  background: #111;
  color: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

.dining-table-form-actions .secondary-action-btn {
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #222;
}

.dining-table-form-actions .primary-action-btn:hover,
.dining-table-form-actions .secondary-action-btn:hover {
  transform: translateY(-1px);
}

.dining-table-form-actions .secondary-action-btn:hover { background: #f5f5f5; }
.dining-table-form-actions button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.dining-table-form-card input::placeholder {
  color: #a0a0a0;
  opacity: 1;
  font-weight: 400;
}

@media (max-width: 700px) {
  .qr-overview-card { grid-template-columns: auto minmax(0, 1fr); }
  .qr-overview-card .qr-view-btn { grid-column: 1 / -1; width: 100%; }
  .qr-table-tab-heading { align-items: stretch; flex-direction: column; }
  .qr-table-tab-heading .branch-add-btn { width: 100%; }
  .qr-admin-tabs { display: grid; grid-template-columns: 1fr; }
  .qr-admin-tab { width: 100%; }
}


/* ======================================================
   BATCH 55 — PUBLIC QR MENU SETTINGS
   ====================================================== */
.qr-public-settings-card {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #e3d7ca;
  border-radius: 16px;
  background: #fffaf5;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}

.qr-public-settings-heading h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.qr-public-settings-heading p {
  margin: 0 0 14px;
  color: #6b625c;
  line-height: 1.45;
}

.qr-public-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qr-public-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.qr-public-mode-option.selected {
  border-color: #e95800;
  background: #fff6ef;
  box-shadow: 0 0 0 2px rgba(233,88,0,.08);
}

.qr-public-mode-option input {
  margin-top: 3px;
  accent-color: #e95800;
}

.qr-public-mode-option span {
  display: grid;
  gap: 4px;
}

.qr-public-mode-option strong { font-size: 15px; }
.qr-public-mode-option small { color: #6d6d6d; line-height: 1.35; }

.qr-public-branch-settings {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e4e4e4;
  border-radius: 13px;
  background: #fff;
  transition: opacity .15s ease;
}

.qr-public-branch-settings.is-disabled {
  opacity: .45;
}

.qr-public-branch-label {
  margin-bottom: 10px;
  font-weight: 800;
}

.qr-public-branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
}

.qr-public-branch-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #fafafa;
  font-weight: 700;
}

.qr-public-branch-option input {
  width: 17px;
  height: 17px;
  accent-color: #e95800;
}

.qr-public-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.qr-public-settings-actions .primary-action-btn {
  min-height: 42px;
  border: 1px solid #111;
  border-radius: 11px;
  padding: 9px 16px;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.qr-public-settings-actions .primary-action-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 700px) {
  .qr-public-mode-grid { grid-template-columns: 1fr; }
  .qr-public-settings-actions .primary-action-btn { width: 100%; }
}


/* ==========================================================
   LOYALTY & REWARDS — BATCH 71
   ========================================================== */
.loyalty-page { display: grid; gap: 16px; }
.loyalty-tabs { display:flex; gap:8px; flex-wrap:wrap; padding:8px; background:#f5f5f5; border:1px solid #e1e1e1; border-radius:14px; }
.loyalty-tab { border:1px solid transparent; background:transparent; border-radius:10px; padding:10px 14px; font:inherit; font-weight:800; cursor:pointer; color:#333; }
.loyalty-tab.active { background:#111; color:#fff; border-color:#111; }
.loyalty-panel { display:grid; gap:14px; }
.loyalty-card { background:#fff; border:1px solid #e1e1e1; border-radius:15px; padding:16px; box-shadow:0 3px 12px rgba(0,0,0,.035); }
.loyalty-card h3 { margin:0 0 13px; }
.loyalty-toolbar { display:flex; justify-content:flex-end; gap:8px; }
.loyalty-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.loyalty-field { display:grid; gap:6px; font-weight:700; }
.loyalty-field span { font-size:14px; }
.loyalty-field small { color:#737373; line-height:1.35; font-weight:500; }
.loyalty-field input,.loyalty-field select,.loyalty-field textarea,.loyalty-search-row input { width:100%; box-sizing:border-box; border:1px solid #cfcfcf; border-radius:10px; background:#fff; min-height:42px; padding:9px 11px; font:inherit; color:#111; }
.loyalty-field textarea { min-height:78px; resize:vertical; }
.loyalty-field select[multiple] { min-height:170px; }
.loyalty-span-2 { grid-column:1 / -1; }
.loyalty-disabled-field { opacity:.65; max-width:420px; margin-top:13px; }
.loyalty-switch-row { display:flex; align-items:flex-start; gap:11px; padding:12px 0; border-bottom:1px solid #eee; }
.loyalty-switch-row.compact { border:0; }
.loyalty-switch-row input { width:18px; height:18px; margin-top:2px; accent-color:#e95800; }
.loyalty-switch-row span { display:grid; gap:3px; }
.loyalty-switch-row small { color:#737373; }
.loyalty-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.loyalty-message { min-height:20px; margin-top:9px; font-size:14px; font-weight:700; }
.loyalty-message.success { color:#147a3f; }.loyalty-message.error { color:#b42318; }
.loyalty-table-wrap { overflow:auto; border:1px solid #e5e5e5; border-radius:13px; background:#fff; }
.loyalty-table { width:100%; border-collapse:collapse; min-width:720px; }
.loyalty-table th,.loyalty-table td { padding:11px 12px; border-bottom:1px solid #ececec; text-align:start; vertical-align:middle; }
.loyalty-table th { background:#f8f8f8; font-size:13px; white-space:nowrap; }
.loyalty-table td small { display:block; margin-top:4px; color:#777; }
.loyalty-table tbody tr:last-child td { border-bottom:0; }
.loyalty-row-actions { display:flex; gap:6px; flex-wrap:wrap; }
.loyalty-row-actions button { min-height:34px; padding:6px 10px; }
.loyalty-status { display:inline-flex; padding:5px 9px; border-radius:999px; font-weight:800; font-size:12px; white-space:nowrap; }
.loyalty-status.active { background:#eaf7ef; color:#146c3a; }.loyalty-status.inactive { background:#f1f1f1; color:#666; }
.loyalty-empty { text-align:center !important; color:#777; padding:22px !important; }
.loyalty-search-row { display:grid; grid-template-columns:1fr auto; gap:9px; margin-bottom:14px; }
.loyalty-search-input-wrap { position:relative; min-width:0; }
.loyalty-search-input-wrap input { padding-inline-end:42px; }
.loyalty-search-clear { position:absolute; top:50%; inset-inline-end:8px; transform:translateY(-50%); width:30px; height:30px; border:0; border-radius:50%; background:#efefef; color:#222; font-size:22px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.loyalty-search-clear:hover { background:#dedede; }
.loyalty-search-clear[hidden] { display:none; }
.loyalty-customer-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); gap:14px; }
.loyalty-balance-card { margin-top:12px; padding:15px; border-radius:13px; background:#111; color:#fff; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.loyalty-balance-card strong { font-size:28px; }
.loyalty-positive { color:#147a3f; font-weight:900; }.loyalty-negative { color:#b42318; font-weight:900; }
[dir="rtl"] .loyalty-field input,[dir="rtl"] .loyalty-field textarea,[dir="rtl"] .loyalty-field select,[dir="rtl"] .loyalty-search-row input { text-align:right; }
@media (max-width:760px) {
  .loyalty-form-grid,.loyalty-customer-grid { grid-template-columns:1fr; }
  .loyalty-span-2 { grid-column:auto; }
  .loyalty-toolbar .finance-primary-btn,.loyalty-actions .finance-primary-btn { width:100%; }
  .loyalty-actions { flex-direction:column-reverse; }
  .loyalty-search-row { grid-template-columns:1fr; }
  .loyalty-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .loyalty-tab { width:100%; }
}


/* ==========================================================
   PROMOTIONS HUB — BATCH 72
   Coupons + Rewards under one Admin section
   ========================================================== */
.promotions-hub-page { display:grid; gap:16px; }
.promotions-hub-tabs {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:8px;
  background:#f5f5f5;
  border:1px solid #e1e1e1;
  border-radius:14px;
}
.promotions-hub-tab {
  border:1px solid transparent;
  background:transparent;
  color:#333;
  border-radius:10px;
  padding:11px 18px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.promotions-hub-tab.active {
  background:#111;
  color:#fff;
  border-color:#111;
}
.promotions-section-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin:2px 0 12px;
}
.promotions-section-heading h3 { margin:0 0 4px; font-size:20px; }
.promotions-section-heading p { margin:0; color:#737373; line-height:1.45; }
@media (max-width:620px) {
  .promotions-hub-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .promotions-hub-tab { width:100%; }
  .promotions-section-heading { flex-direction:column; }
  .promotions-section-heading > button { width:100%; }
}

/* BATCH 73 — Coupon Transactions + clearer Loyalty labels */
.coupon-transactions-section{margin-top:24px}
.coupon-transactions-section h3{margin:0 0 10px;font-size:18px}
.coupon-transactions-table{min-width:820px}

/* Batch 79 — Rewards transaction type filter */
.loyalty-card-heading-row { display:flex; align-items:end; justify-content:space-between; gap:14px; margin-bottom:12px; }
.loyalty-card-heading-row h3 { margin:0; }
.loyalty-transaction-filter { display:grid; gap:5px; min-width:190px; font-weight:700; }
.loyalty-transaction-filter span { font-size:13px; }
.loyalty-transaction-filter select { width:100%; min-height:38px; box-sizing:border-box; border:1px solid #cfcfcf; border-radius:10px; background:#fff; padding:7px 10px; font:inherit; color:#111; }
[dir="rtl"] .loyalty-transaction-filter select { text-align:right; }
@media (max-width:700px) { .loyalty-card-heading-row { align-items:stretch; flex-direction:column; } .loyalty-transaction-filter { min-width:0; width:100%; } }


/* Batch 81: Awaiting WhatsApp workflow */

.awaiting-whatsapp-btn,
.return-pending-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.awaiting-whatsapp-btn {
  border: 2px solid #25d366;
  background: #ecfdf3;
  color: #075e54;
}

.awaiting-whatsapp-btn:hover {
  background: #dcf8c6;
}

.return-pending-btn {
  border: 2px solid #d4a514;
  background: #fffbea;
  color: #6b5200;
}

.return-pending-btn:hover {
  background: #fff3cd;
}

.awaiting-whatsapp-btn:disabled,
.return-pending-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.awaiting-whatsapp-workflow {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1050px) {
  .awaiting-whatsapp-workflow {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   BATCH83 — STAFF IDENTITY / ACTIVITY / STAFF MANAGEMENT
   ===================================================== */

.admin-employee-context {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-width: 145px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: var(--dark);
  color: var(--white);
  line-height: 1.2;
}

.admin-employee-context strong {
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-employee-context span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
}

html[dir="rtl"] .admin-employee-context {
  align-items: flex-start;
}

.order-branch-fixed {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #f7f7f7;
  font-weight: 800;
}

.order-activity-panel {
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  background: #fafafa;
}

.order-activity-title {
  margin-bottom: 12px;
  font-weight: 900;
  font-size: 0.98rem;
}

.order-activity-state {
  color: #666;
  font-size: 0.9rem;
}

.order-activity-error {
  color: #a23d32;
}

.order-activity-timeline {
  display: grid;
  gap: 0;
}

.order-activity-entry {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 14px;
}

.order-activity-entry:last-child {
  padding-bottom: 0;
}

.order-activity-entry::before {
  content: '';
  position: absolute;
  top: 13px;
  bottom: -2px;
  left: 6px;
  width: 2px;
  background: #dfdfdf;
}

.order-activity-entry:last-child::before {
  display: none;
}

.order-activity-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 3px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #333;
  box-shadow: 0 0 0 1px #cfcfcf;
}

.order-activity-entry-title {
  font-weight: 800;
  line-height: 1.35;
}

.order-activity-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
  color: #777;
  font-size: 0.78rem;
}

.order-activity-entry-meta strong {
  color: #333;
}

html[dir="rtl"] .order-activity-entry::before {
  left: auto;
  right: 6px;
}

.staff-management-security-note,
.staff-management-global-message {
  margin: 14px 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f6f7f8;
  color: #4c4c4c;
  font-size: 0.88rem;
}

.staff-management-global-message {
  background: #edf8f2;
  color: #176d50;
  font-weight: 700;
}

.staff-management-form-card {
  margin: 16px 0 20px;
  padding: 18px;
  border: 1px solid #dfdfdf;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.04);
}

.staff-management-form-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.staff-management-form-heading h3 {
  margin: 0 0 5px;
}

.staff-management-form-heading p {
  margin: 0;
  color: #6b6b6b;
  font-size: 0.88rem;
}

.staff-management-close-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f2f2f2;
  font-size: 1.3rem;
  cursor: pointer;
}

.staff-management-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.staff-management-form-grid label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.staff-management-form-grid input,
.staff-management-form-grid select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}

.staff-management-form-grid small {
  color: #777;
  font-weight: 500;
  font-size: 0.76rem;
}

.staff-active-toggle-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
}

.staff-active-toggle-row input {
  width: auto;
  min-height: auto;
}

.staff-management-form-message {
  min-height: 20px;
  margin-top: 10px;
  color: #a23d32;
  font-size: 0.86rem;
}

.staff-management-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.staff-management-primary-btn,
.staff-management-secondary-btn,
.staff-management-edit-btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}

.staff-management-primary-btn {
  border: 1px solid #181818;
  background: #181818;
  color: #fff;
}

.staff-management-secondary-btn,
.staff-management-edit-btn {
  border: 1px solid #d1d1d1;
  background: #fff;
  color: #222;
}

.staff-management-primary-btn:disabled,
.staff-management-secondary-btn:disabled,
.staff-management-edit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.staff-management-table {
  display: grid;
  gap: 8px;
}

.staff-management-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.7fr) minmax(90px, 0.7fr) minmax(150px, 1fr) minmax(95px, 0.7fr) minmax(135px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e3e3e3;
  border-radius: 11px;
  background: #fff;
}

.staff-management-head {
  border: 0;
  background: #f5f5f5;
  color: #666;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-management-person {
  display: grid;
  gap: 3px;
}

.staff-management-person span {
  color: #666;
  font-size: 0.82rem;
}

.staff-role-badge,
.staff-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.staff-role-badge.admin {
  background: #efe9ff;
  color: #5a3b91;
}

.staff-role-badge.staff {
  background: #e8f2ff;
  color: #275e8e;
}

.staff-status-badge.active {
  background: #e9f7ef;
  color: #176d50;
}

.staff-status-badge.inactive {
  background: #f8ecea;
  color: #a23d32;
}

.staff-delivery-driver-panel .delivery-current-driver {
  margin-bottom: 10px;
}

@media (max-width: 1100px) {
  .staff-management-head {
    display: none;
  }

  .staff-management-row {
    grid-template-columns: 1fr 1fr;
  }

  .staff-management-person {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .admin-employee-context {
    width: 100%;
    align-items: center;
    order: -1;
  }

  html[dir="rtl"] .admin-employee-context {
    align-items: center;
  }

  .staff-management-form-grid,
  .staff-management-row {
    grid-template-columns: 1fr;
  }
}


/* ======================================================
   BATCH84 — COMING SOON SETTINGS
   ====================================================== */

.coming-soon-settings-card {
  border-top: 3px solid #d87312;
}

.coming-soon-toggle-row {
  align-items: flex-start;
}

.coming-soon-current-status {
  margin-top: 2px;
  padding: 11px 13px;
  border: 1px solid #ddd7d2;
  border-radius: 10px;
  background: #f7f5f3;
  color: #5b514b;
  font-size: 0.92rem;
  font-weight: 700;
}

.coming-soon-current-status.is-on {
  border-color: #edb66f;
  background: #fff5e8;
  color: #9a4c00;
}


/* Customer edit session controls — Batch108 */
.customer-edit-control { display:flex; flex-direction:column; gap:7px; padding:11px; margin:8px 0; border-radius:14px; background:#fff8ef; border:1px solid rgba(226,126,44,.28); }
.customer-edit-control.grace-active { background:#fff4dd; }
.customer-edit-control.session-open { background:#eef8ef; border-color:rgba(46,125,50,.28); }
.customer-edit-control small { opacity:.82; }
.customer-edit-open-btn,.customer-edit-revoke-btn { border:0; border-radius:10px; padding:10px 12px; font-weight:800; cursor:pointer; }
.customer-edit-open-btn { background:#ef7f1a; color:#fff; }
.customer-edit-revoke-btn { background:#6f2c22; color:#fff; }
.customer-edit-session-overlay { position:fixed; inset:0; z-index:10050; display:flex; align-items:center; justify-content:center; padding:18px; background:rgba(0,0,0,.58); }
.customer-edit-session-card { position:relative; width:min(470px,100%); display:flex; flex-direction:column; gap:13px; background:#fff; color:#241a14; border-radius:20px; padding:24px; box-shadow:0 22px 70px rgba(0,0,0,.32); }
.customer-edit-session-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-inline-end:32px; }
.customer-edit-session-heading h3 { flex:1 1 auto; }
.customer-edit-session-heading .admin-popup-language-switcher { flex:0 0 auto; }

.customer-edit-session-card h3,.customer-edit-session-card p { margin:0; }
.customer-edit-session-card label { display:flex; align-items:flex-start; gap:9px; padding:10px 12px; border:1px solid #eadbcf; border-radius:12px; }
.customer-edit-session-close { position:absolute; top:9px; right:11px; border:0; background:transparent; font-size:28px; cursor:pointer; }
html[dir=rtl] .customer-edit-session-close { right:auto; left:11px; }
.customer-edit-session-submit { border:0; border-radius:12px; padding:12px; background:#ef7f1a; color:#fff; font-weight:800; cursor:pointer; }
.customer-edit-cancel-option { margin-top:3px; background:#fff8f5; }

/* Batch110 — popup language switchers */
@media (max-width: 560px) {
  .order-edit-modal-header {
    gap: 10px;
  }

  .order-edit-modal-header-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 7px;
  }

  html[dir="rtl"] .order-edit-modal-header-actions {
    align-items: flex-start;
  }

  .customer-edit-session-heading {
    align-items: flex-start;
    flex-direction: column;
    padding-inline-end: 32px;
  }
}


/* Batch112 — keep core order workflow buttons consistent on desktop */
@media (min-width: 901px) {
  .order-workflow-panel .modify-order-btn,
  .order-workflow-panel .confirm-order-btn,
  .order-workflow-panel .driver-deactivate-btn,
  .order-workflow-panel .return-pending-btn {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    height: 34px;
    margin-top: 0;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.1;
  }

  .order-workflow-panel .modify-order-btn,
  .order-workflow-panel .confirm-order-btn {
    align-self: auto;
    justify-self: auto;
  }
}


/* ======================================================
   BATCH113 — ITEMIZED ORDER LINES
   Product, paid extras and included offer drink each receive a separate
   price-aligned row, matching the customer Tracking presentation.
   ====================================================== */
.order-item-subline {
  padding-top: 7px;
  padding-bottom: 7px;
  padding-inline-start: 18px;
  background: rgba(0, 0, 0, 0.018);
}

.order-item-subline .order-item-name strong {
  font-weight: 600;
}

.order-item-removal-line .order-item-name strong,
.order-item-removal-line .money-value {
  color: var(--muted);
}

/* ======================================================
   ADMIN MODIFY ORDER V3 — BATCH115
   ====================================================== */
.order-edit-subline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-inline-start: auto;
}

.order-edit-extra-quantity-control {
  grid-template-columns: 30px 34px 30px;
  gap: 3px;
}

.order-edit-extra-quantity-control button {
  width: 30px;
  height: 30px;
  font-size: 17px;
}

.order-edit-unit-label {
  padding: 7px 12px;
  border-top: 1px solid #f0e7e1;
  background: #f8f8f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.order-edit-customization-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 8px 70px;
  border-top: 1px solid #f0e7e1;
  background: #fffdfb;
}

html[dir="rtl"] .order-edit-customization-actions {
  padding-right: 70px;
  padding-left: 12px;
}

.order-edit-chip,
.order-edit-inline-action {
  border: 1px solid #e2c7b6;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.order-edit-chip-remove {
  color: #8a3b26;
  border-color: #e5c2b7;
}

.order-edit-chip:disabled,
.order-edit-inline-action:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.order-edit-option-row {
  align-items: center;
}

.order-edit-inline-select {
  min-width: 135px;
  max-width: 230px;
  min-height: 34px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 4px 8px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .order-edit-subline-row {
    padding-left: 12px;
  }

  html[dir="rtl"] .order-edit-subline-row {
    padding-right: 12px;
  }

  .order-edit-customization-actions,
  html[dir="rtl"] .order-edit-customization-actions {
    padding-inline: 12px;
  }

  .order-edit-extra-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-edit-subline-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ======================================================
   ADMIN MODIFY ORDER BATCH119 — customer-like customization
   ====================================================== */
.order-edit-size-row {
  background: #fffdfb;
}

.order-edit-customer-section {
  border-top: 1px solid #f0e7e1;
  background: #fffdfb;
}

.order-edit-customer-section > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 70px;
  color: var(--text);
}

html[dir="rtl"] .order-edit-customer-section > summary {
  padding-right: 70px;
  padding-left: 12px;
}

.order-edit-customer-section > summary::-webkit-details-marker {
  display: none;
}

.order-edit-customer-section > summary span {
  display: grid;
  gap: 2px;
}

.order-edit-customer-section > summary strong {
  font-size: 13px;
  font-weight: 900;
}

.order-edit-customer-section > summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.order-edit-customer-section > summary b {
  color: var(--accent);
  font-size: 18px;
  transition: transform .15s ease;
}

.order-edit-customer-section[open] > summary b {
  transform: rotate(180deg);
}

.order-edit-customer-section-body {
  display: grid;
  gap: 7px;
  padding: 0 12px 10px 70px;
}

html[dir="rtl"] .order-edit-customer-section-body {
  padding-right: 70px;
  padding-left: 12px;
}

.order-edit-customer-choice {
  width: 100%;
  border: 1px solid #ead8cc;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  min-height: 38px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: start;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.order-edit-customer-choice:hover:not(:disabled) {
  border-color: var(--accent);
}

.order-edit-customer-choice em {
  color: var(--accent);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.order-edit-customer-choice-remove {
  color: #7f3827;
}

.order-edit-customer-choice:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.order-edit-required-mark {
  color: var(--accent);
}

.order-edit-drink-row .order-edit-inline-select {
  border-color: #efc3a9;
}

@media (max-width: 640px) {
  .order-edit-customer-section > summary,
  html[dir="rtl"] .order-edit-customer-section > summary,
  .order-edit-customer-section-body,
  html[dir="rtl"] .order-edit-customer-section-body {
    padding-inline: 12px;
  }
}

/* ======================================================
   ADMIN MODIFY ORDER BATCH120 — drink image picker
   ====================================================== */
.order-edit-drink-row-rich {
  align-items: flex-start;
}

.order-edit-drink-picker {
  width: min(330px, 100%);
  margin-inline-start: auto;
  position: relative;
}

.order-edit-drink-picker > summary {
  list-style: none;
}

.order-edit-drink-picker > summary::-webkit-details-marker {
  display: none;
}

.order-edit-drink-summary,
.order-edit-drink-selected-static {
  min-height: 46px;
  border: 1px solid #efc3a9;
  border-radius: 10px;
  background: #fff;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}

.order-edit-drink-summary {
  cursor: pointer;
}

.order-edit-drink-summary strong,
.order-edit-drink-selected-static strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
}

.order-edit-drink-summary em {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.order-edit-drink-thumb {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.order-edit-drink-thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid #f0e7e1;
}

.order-edit-drink-options {
  margin-top: 7px;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid #ead8cc;
  border-radius: 10px;
  background: #fffaf6;
  max-height: 245px;
  overflow-y: auto;
  box-shadow: 0 8px 22px rgba(58, 31, 15, .10);
}

.order-edit-drink-option {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: start;
  font: inherit;
  cursor: pointer;
}

.order-edit-drink-option:hover:not(:disabled),
.order-edit-drink-option.is-selected {
  border-color: var(--accent);
}

.order-edit-drink-option > span:not(.order-edit-drink-thumb) {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
}

.order-edit-drink-option b {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
}

.order-edit-drink-option:disabled {
  opacity: .5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .order-edit-drink-row-rich {
    flex-direction: column;
    gap: 7px;
  }

  .order-edit-drink-picker {
    width: 100%;
    margin-inline-start: 0;
  }
}

/* ======================================================
   Batch121 — Driver Delivery Status report
   ====================================================== */

.driver-report-panel {
  margin: 14px 0 4px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.driver-report-panel-title {
  margin-bottom: 10px;
  font-weight: 800;
  font-size: .95rem;
}

.driver-report-latest {
  display: grid;
  gap: 7px;
  font-size: .9rem;
  line-height: 1.45;
}

.driver-report-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.driver-report-delivered {
  border-color: rgba(35, 183, 103, .38);
}

.driver-report-not-delivered {
  border-color: rgba(224, 71, 71, .42);
}

.driver-report-returned {
  border-color: rgba(232, 151, 45, .48);
}

.driver-report-finalized {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(35, 183, 103, .12);
  font-weight: 800;
}

.driver-report-empty {
  font-size: .9rem;
  opacity: .78;
}

.driver-report-error .driver-report-empty {
  opacity: 1;
}

.driver-report-history {
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 10px;
}

.driver-report-history summary {
  cursor: pointer;
  font-weight: 750;
  font-size: .9rem;
}

.driver-report-history-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.driver-report-history-row {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.16);
  border-left: 3px solid rgba(255,255,255,.16);
}

html[dir="rtl"] .driver-report-history-row {
  border-left: 0;
  border-right: 3px solid rgba(255,255,255,.16);
}

.driver-report-history-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.driver-report-history-main span,
.driver-report-history-note {
  font-size: .82rem;
  opacity: .82;
}

.driver-report-history-note {
  margin-top: 5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .driver-report-panel {
    padding: 12px;
  }

  .driver-report-history-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

.driver-report-old-assignment {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: .7rem;
  font-weight: 700;
  opacity: .72;
}

/* Batch 122: driver-delivered order state + driver filter */
.status-driver_delivered {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.delivered-driver-filter {
  margin-top: -2px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #dfe7df;
  border-radius: 12px;
  background: #f7fbf7;
}

.delivered-driver-filter[hidden] {
  display: none !important;
}

.delivered-driver-filter-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 800;
}

.delivered-driver-filter-select {
  min-width: 220px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #cfd8cf;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

html[dir="rtl"] .delivered-driver-filter-label {
  flex-direction: row;
}

@media (max-width: 620px) {
  .delivered-driver-filter-label {
    align-items: stretch;
    flex-direction: column;
  }

  .delivered-driver-filter-select {
    width: 100%;
    min-width: 0;
  }
}
\n\n/* BATCH131 — coupon checkout visibility setting */\n.coupon-checkout-setting-card{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:12px;align-items:center;padding:14px 16px;margin:0 0 14px;border:1px solid #e1e4e8;border-radius:12px;background:#fff8f1}\n.coupon-checkout-setting-copy{display:flex;flex-direction:column;gap:4px}\n.coupon-checkout-setting-copy strong{font-size:16px}\n.coupon-checkout-setting-copy small{color:#69717c;line-height:1.35}\n.coupon-checkout-setting-toggle{display:flex;align-items:center;gap:8px;font-weight:700;white-space:nowrap}\n.coupon-checkout-setting-toggle input{width:18px;height:18px}\n.coupon-checkout-setting-message{grid-column:1/-1;min-height:18px;font-size:13px;font-weight:700}\n.coupon-checkout-setting-message.success{color:#177245}\n.coupon-checkout-setting-message.error{color:#b42318}\n@media(max-width:760px){.coupon-checkout-setting-card{grid-template-columns:1fr}.coupon-checkout-setting-toggle{white-space:normal}.coupon-checkout-setting-card .finance-primary-btn{width:100%}}\n
/* =====================================================
   SOLD ITEMS REPORT — BATCH 133
   ===================================================== */
.sold-items-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.sold-items-heading > div {
  display: grid;
  gap: 4px;
}
.sold-items-heading strong {
  font-size: 1.08rem;
}
.sold-items-heading span {
  color: #6f665f;
  font-size: 0.92rem;
}
.sold-items-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.sold-items-summary:empty { display: none; }
.sold-items-summary-card {
  border: 1px solid #eadfd6;
  border-radius: 12px;
  background: #fffaf6;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.sold-items-summary-card span {
  color: #6d6259;
  font-size: 0.84rem;
  font-weight: 700;
}
.sold-items-summary-card strong {
  color: #111;
  font-size: 1.3rem;
}
.sold-items-table {
  border: 1px solid #e7ddd5;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.sold-items-header,
.sold-items-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) minmax(170px, 1fr) minmax(130px, .7fr) minmax(110px, .6fr);
  gap: 12px;
  align-items: center;
}
.sold-items-header {
  padding: 12px 14px;
  background: #f7f4f1;
  color: #675b52;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.sold-items-row {
  padding: 13px 14px;
  border-top: 1px solid #eee7e2;
}
.sold-items-row:first-child { border-top: 0; }
.sold-items-row:hover { background: #fffaf6; }
.sold-items-qty strong {
  color: #e45100;
  font-size: 1.08rem;
}

@media (max-width: 820px) {
  .sold-items-summary { grid-template-columns: 1fr; }
  .sold-items-header { display: none; }
  .sold-items-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .sold-items-row > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }
  .sold-items-row > div::before {
    content: attr(data-label);
    color: #76695f;
    font-size: 0.78rem;
    font-weight: 800;
  }
}


/* =====================================================
   SOLD ITEMS SEARCH + CATEGORY FILTER — BATCH 134
   ===================================================== */
.sold-items-toolbar .sold-items-product-search-group {
  min-width: 220px;
  flex: 1 1 240px;
}
.sold-items-toolbar #soldItemsProductSelect {
  min-width: 180px;
}
.sold-items-toolbar #soldItemsCategorySelect {
  min-width: 170px;
}
@media (max-width: 820px) {
  .sold-items-toolbar .stock-filter-group,
  .sold-items-toolbar .sold-items-product-search-group {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
  .sold-items-toolbar .stock-control,
  .sold-items-toolbar .stock-search-box,
  .sold-items-toolbar #soldItemsProductSelect,
  .sold-items-toolbar #soldItemsCategorySelect {
    width: 100%;
    min-width: 0;
  }
}


/* =====================================================
   SOLD INGREDIENTS + COMPLETED ORDERS LABEL — BATCH 135
   ===================================================== */
.sold-ingredients-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eadfd6;
}
.sold-ingredients-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.sold-ingredients-heading strong {
  font-size: 1.05rem;
  color: #16110e;
}
.sold-ingredients-heading span {
  color: #6f665f;
  font-size: 0.9rem;
}
.sold-ingredients-table .sold-items-qty strong {
  white-space: nowrap;
}

/* =====================================================
   SOLD STOCK SUB-TABS + INDEPENDENT INGREDIENT FILTERS — BATCH 136
   ===================================================== */
.sold-stock-subtabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  background: #fffaf6;
}
.sold-stock-subtab {
  appearance: none;
  border: 1px solid #dfd3c9;
  border-radius: 11px;
  background: #fff;
  color: #1a1511;
  font: inherit;
  font-weight: 800;
  padding: 10px 18px;
  cursor: pointer;
}
.sold-stock-subtab:hover {
  border-color: #e45100;
}
.sold-stock-subtab.active {
  background: #e45100;
  border-color: #e45100;
  color: #fff;
  box-shadow: 0 5px 14px rgba(228,81,0,.16);
}
.sold-stock-panel[hidden] {
  display: none !important;
}
.sold-stock-panel-heading {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
}
.sold-stock-panel-heading strong {
  font-size: 1.05rem;
  color: #16110e;
}
.sold-stock-panel-heading span {
  color: #6f665f;
  font-size: .9rem;
}
.sold-ingredients-toolbar #soldIngredientsSelect {
  min-width: 190px;
}
@media (max-width: 820px) {
  .sold-stock-subtabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .sold-stock-subtab {
    width: 100%;
    padding-inline: 10px;
  }
  .sold-ingredients-toolbar #soldIngredientsSelect {
    width: 100%;
    min-width: 0;
  }
}

/* Batch137: multiple customer portion sizes for ingredient extras */
.product-ingredient-row-admin {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.product-ingredient-row-actions-admin {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.product-ingredient-row-actions-admin > button {
  flex: 1 1 0;
  min-width: 0;
}
.product-ingredient-size-add-admin {
  min-height: 36px;
  border: 1px solid #e65300;
  border-radius: 7px;
  background: #fff7f1;
  color: #b64200;
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.product-ingredient-size-add-admin:hover:not(:disabled) {
  background: #fff0e5;
}
.product-ingredient-size-add-admin:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.product-ingredient-portion-help-admin {
  grid-column: 1 / -1;
  color: #715f53;
  font-size: .68rem;
  line-height: 1.35;
  padding: 1px 2px 2px;
}
.product-ingredient-portion-help-admin[hidden] {
  display: none !important;
}
@media (max-width: 1080px) {
  .product-ingredient-row-admin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .product-ingredient-row-admin { grid-template-columns: 1fr; }
  .product-ingredient-row-actions-admin { flex-direction: column; }
  .product-ingredient-row-actions-admin > button { width: 100%; }
}


/* Batch143: cleaner ingredient customization actions */
.product-ingredient-remove-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
  min-height: 42px;
  height: auto;
  padding: 6px 10px;
  box-sizing: border-box;
  overflow: hidden;
}
.product-ingredient-row-actions-admin {
  min-width: 0;
}
.product-ingredient-row-actions-admin > button {
  min-width: 0;
  max-width: 100%;
}

/* Batch154: visible delivery lifecycle */
.status-out_for_delivery {
  background: #fff3cd;
  color: #7a4b00;
  border: 1px solid #f6d477;
}


/* Batch167 — make Finance/Pricing save confirmation unmistakable */
.finance-message.success{
  display:block;
  width:fit-content;
  max-width:100%;
  margin:12px 0 14px;
  padding:10px 14px;
  border:1px solid #9bcfa8;
  border-radius:10px;
  background:#eef9f1;
  color:#176b35;
  box-shadow:0 3px 10px rgba(23,107,53,.08);
  line-height:1.4;
}
.finance-message.success:empty{display:none}

/* Batch169 — Gross Margin / Markup pricing method selector */
.pricing-helper-panel-admin select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #d9cec6;
  border-radius: 8px;
  padding: 0 32px 0 9px;
  font: inherit;
  font-weight: 750;
  color: #3e3028;
  background: #fff;
}

html[dir="rtl"] .pricing-helper-panel-admin select {
  padding: 0 9px 0 32px;
}

.pricing-helper-panel-admin select:focus,
.pricing-percent-input-admin input:focus {
  outline: none;
  border-color: #e45a00;
  box-shadow: 0 0 0 3px rgba(228, 90, 0, .10);
}

/* Batch170 — slightly larger Pricing Helper explanation text */
.pricing-info-modal-card-admin h3 {
  font-size: 1.15rem;
  line-height: 1.45;
}

.pricing-info-modal-intro-admin,
.pricing-info-modal-note-admin,
.pricing-info-modal-block-admin p {
  font-size: .95rem;
  line-height: 1.7;
}

.pricing-info-modal-block-admin strong {
  font-size: .9rem;
  line-height: 1.5;
}

.pricing-info-modal-block-admin code {
  font-size: .9rem;
  line-height: 1.6;
}

.pricing-info-language-switch-admin button,
.pricing-info-modal-close-admin {
  font-size: .95rem;
}

/* ======================================================
   BATCH171 — ETA SETTINGS + PER-ORDER ETA OVERRIDE
   ====================================================== */
.eta-settings-form{
  display:grid;
  gap:14px;
}
.eta-settings-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.eta-settings-grid .exchange-rate-input-wrap{
  width:100%;
}
.eta-settings-grid input{
  width:100%;
  min-width:0;
}
.admin-order-eta-panel{
  margin:14px 0 18px;
  padding:13px;
  border:1px solid #efd2bd;
  border-radius:12px;
  background:#fffaf6;
}
.admin-order-eta-heading{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-bottom:10px;
}
.admin-order-eta-heading strong{
  color:#5a2e16;
  font-size:14px;
}
.admin-order-eta-heading span{
  color:#756960;
  font-size:12px;
  line-height:1.35;
}
.admin-order-eta-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}
.admin-order-eta-grid label{
  display:grid;
  gap:5px;
  min-width:0;
  color:#4a403a;
  font-size:11.5px;
  font-weight:700;
}
.admin-order-eta-grid input{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  min-height:39px;
  padding:8px 9px;
  border:1px solid #d8c6b9;
  border-radius:8px;
  background:#fff;
  font:inherit;
}
.admin-order-eta-grid input:focus{
  outline:2px solid rgba(230,82,0,.15);
  border-color:#d94f00;
}
.admin-order-eta-save{
  margin-top:10px;
  min-height:39px;
  padding:8px 14px;
  border:1px solid #d94f00;
  border-radius:9px;
  background:#d94f00;
  color:#fff;
  font:inherit;
  font-size:12.5px;
  font-weight:800;
  cursor:pointer;
}
.admin-order-eta-save:disabled{
  opacity:.65;
  cursor:wait;
}
.admin-order-eta-message{
  min-height:17px;
  margin-top:8px;
  font-size:12px;
  font-weight:700;
}
.admin-order-eta-message.success{
  color:#247039;
}
.admin-order-eta-message.error{
  color:#a42828;
}
@media (max-width:760px){
  .eta-settings-grid,
  .admin-order-eta-grid{
    grid-template-columns:1fr;
  }
  .admin-order-eta-save{
    width:100%;
  }
}
.eta-settings-grid .exchange-rate-input-wrap{
  grid-template-columns:minmax(0,1fr);
  justify-content:stretch;
}

/* Batch172 — saved customer Google Maps location visibility */
.customer-address-map-box{
  margin:12px 0 14px;
  padding:12px;
  border:1px solid #ead6c7;
  border-radius:12px;
  background:#fffaf5;
}
.customer-address-map-label{
  margin-bottom:6px;
  font-weight:800;
}
.customer-address-map-value{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  color:#555;
}
.customer-address-map-open{
  display:inline-flex;
  margin-top:9px;
  text-decoration:none;
}
.saved-address-map-link{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
  font-size:12px;
}
.saved-address-map-link span{font-weight:800}
.saved-address-map-link a{
  color:#c84b00;
  font-weight:800;
  text-decoration:none;
}
.saved-address-map-link a:hover{text-decoration:underline}


/* Batch173 — Admin saved-address Google Maps editing */
.customer-address-map-edit{
  grid-column:1 / -1;
  display:grid;
  gap:8px;
  margin-top:12px;
  padding:12px;
  border:1px solid #ead6c7;
  border-radius:12px;
  background:#fffaf5;
}
.customer-address-map-edit .customer-form-field{
  margin:0;
}
.customer-address-map-edit input{
  width:100%;
  box-sizing:border-box;
}
.customer-address-map-edit .customer-address-map-open{
  width:max-content;
  margin-top:0;
}


/* =========================================================
   External Sales
   ========================================================= */
.external-sales-page{
  display:grid;
  gap:16px;
}
.external-sales-page-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.external-sales-page-heading h2{
  margin:0 0 4px;
}
.external-sales-page-heading p{
  margin:0;
  color:var(--muted, #6f635b);
}
.external-sales-heading-actions,
.external-sales-actions,
.external-sales-section-head{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.external-sales-section-head{
  justify-content:space-between;
}
.external-sales-section-head h3{
  margin:0;
}
.external-sales-panel{
  background:#fff;
  border:1px solid rgba(89,62,43,.14);
  border-radius:18px;
  padding:16px;
  box-shadow:0 8px 26px rgba(62,40,26,.05);
}
.external-sales-editor-panel{
  border-color:rgba(213,116,35,.35);
}
.external-sales-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
.external-sales-grid.compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.external-sales-grid label,
.external-sales-notes-field{
  display:grid;
  gap:6px;
  min-width:0;
}
.external-sales-grid label > span,
.external-sales-notes-field > span{
  font-size:12px;
  font-weight:800;
  color:#59483d;
}
.external-sales-grid input,
.external-sales-grid select,
.external-sales-notes-field input,
.external-sales-notes-field textarea,
.external-sales-channel-form input{
  width:100%;
  min-width:0;
  border:1px solid rgba(92,65,47,.2);
  border-radius:11px;
  background:#fff;
  color:#2c211b;
  padding:10px 11px;
  font:inherit;
  box-sizing:border-box;
}
.external-sales-notes-field{
  margin-top:12px;
}
.external-sales-primary-btn,
.external-sales-outline-btn,
.external-sales-danger-btn,
.external-sales-text-btn{
  border-radius:10px;
  padding:9px 12px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.external-sales-primary-btn{
  border:1px solid #b55d1f;
  background:#c96b27;
  color:#fff;
}
.external-sales-outline-btn{
  border:1px solid rgba(153,91,46,.35);
  background:#fff8f1;
  color:#6c3a1b;
}
.external-sales-danger-btn{
  border:1px solid #b43c33;
  background:#fff1ef;
  color:#9c271f;
}
.external-sales-text-btn{
  border:0;
  background:transparent;
  color:#704729;
  padding:6px 8px;
}
.external-sales-text-btn.danger{
  color:#a42c24;
  font-size:18px;
}
.external-sales-primary-btn:disabled,
.external-sales-outline-btn:disabled,
.external-sales-danger-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.external-sales-channel-form{
  display:grid;
  grid-template-columns:140px 1fr 1fr auto auto auto;
  gap:10px;
  align-items:center;
  margin-top:14px;
  padding:12px;
  border-radius:13px;
  background:#fff8f1;
}
.external-sales-channel-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.external-sales-channel-chip{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(89,62,43,.14);
  border-radius:12px;
  padding:8px 10px;
  background:#fff;
}
.external-sales-channel-chip > span:first-child{
  display:grid;
}
.external-sales-channel-chip small{
  color:#806f64;
}
.external-sales-channel-chip.inactive{
  opacity:.65;
}
.external-sales-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:4px 8px;
  font-size:11px;
  font-weight:900;
}
.external-sales-status.draft{
  background:#fff0d9;
  color:#8c5200;
}
.external-sales-status.posted{
  background:#e7f7eb;
  color:#236f36;
}
.external-sales-batch-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.external-sales-batch-row{
  width:100%;
  display:grid;
  grid-template-columns:minmax(220px,1.4fr) minmax(100px,.7fr) minmax(90px,.55fr) auto;
  gap:12px;
  align-items:center;
  text-align:inherit;
  border:1px solid rgba(89,62,43,.14);
  border-radius:12px;
  background:#fff;
  color:#2f241d;
  padding:11px 12px;
  cursor:pointer;
}
.external-sales-batch-row:hover{
  background:#fffaf5;
  border-color:rgba(196,104,38,.32);
}
.external-sales-batch-main{
  display:grid;
  gap:2px;
}
.external-sales-batch-main small{
  color:#77675c;
}
.external-sales-items-heading{
  margin-top:18px;
}
.external-sales-items-list{
  display:grid;
  gap:12px;
  margin-top:10px;
}
.external-sales-item-card{
  border:1px solid rgba(103,74,54,.16);
  border-radius:14px;
  padding:13px;
  background:#fffaf6;
}
.external-sales-item-head,
.external-sales-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.external-sales-groups{
  display:grid;
  gap:10px;
  margin:12px 0 10px;
}
.external-sales-group-card{
  border:1px dashed rgba(111,79,58,.28);
  border-radius:12px;
  padding:11px;
  background:#fff;
}
.external-sales-custom-block{
  margin-top:10px;
}
.external-sales-custom-block > strong{
  display:block;
  margin-bottom:7px;
  font-size:12px;
}
.external-sales-ingredient-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
}
.external-sales-ingredient-control{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:1px solid rgba(92,65,47,.13);
  border-radius:9px;
  padding:7px 9px;
}
.external-sales-ingredient-control input{
  width:64px !important;
  padding:6px 7px !important;
}
/* BATCH236 — explicit per-item extras and live group totals. */
.external-sales-extra-heading-hint{
  font-weight:600;
  color:#746456;
}
.external-sales-extra-help{
  display:block;
  color:#75675e;
  font-size:11px;
  line-height:1.45;
  margin:-2px 0 8px;
}
.external-sales-extra-name{
  min-width:0;
  flex:1;
  font-size:12px;
  overflow-wrap:anywhere;
}
.external-sales-extra-name small{
  display:block;
  color:#75675e;
  font-weight:600;
  font-size:10px;
  margin-top:2px;
}
.external-sales-extra-input-wrap{
  display:flex;
  align-items:flex-end;
  flex-direction:column;
  flex-shrink:0;
  gap:3px;
  max-width:60%;
}
.external-sales-group-extra-total{
  display:block;
  color:#735a46;
  font-size:10px;
  font-weight:600;
  line-height:1.35;
  text-align:end;
  white-space:normal;
}
@media(max-width:620px){
  .external-sales-extra-input-wrap{ max-width:58%; }
}
.external-sales-check-grid{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.external-sales-check-control{
  display:inline-flex !important;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:700;
}
.external-sales-check-control input{
  width:auto !important;
}
.external-sales-help{
  display:block;
  color:#7c6c61;
  font-size:11px;
  line-height:1.45;
  margin-top:6px;
}
.external-sales-message{
  min-height:18px;
  margin-top:12px;
  font-weight:800;
  font-size:12px;
}
.external-sales-message.success{
  color:#24753a;
}
.external-sales-message.error{
  color:#aa2e25;
}
.external-sales-actions{
  justify-content:flex-end;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid rgba(89,62,43,.12);
}
@media(max-width:900px){
  .external-sales-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .external-sales-channel-form{
    grid-template-columns:1fr 1fr;
  }
  .external-sales-batch-row{
    grid-template-columns:1fr auto;
  }
}
@media(max-width:620px){
  .external-sales-page-heading,
  .external-sales-section-head{
    align-items:stretch;
    flex-direction:column;
  }
  .external-sales-heading-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .external-sales-grid,
  .external-sales-grid.compact,
  .external-sales-channel-form,
  .external-sales-ingredient-grid{
    grid-template-columns:1fr;
  }
  .external-sales-batch-row{
    grid-template-columns:1fr;
  }
  .external-sales-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .external-sales-primary-btn,
  .external-sales-outline-btn,
  .external-sales-danger-btn{
    width:100%;
  }
}

.compact-order-number{
  display:flex;
  align-items:baseline;
  gap:7px;
  flex-wrap:wrap;
}
.compact-order-permanent-ref{
  font-size:10px;
  font-weight:700;
  color:#8b786c;
}

/* ======================================================
   INGREDIENT STOCK MANUAL QTY + BUYING PRICE EDIT — BATCH 192
   ====================================================== */
.stock-action-btn.edit-stock {
  border: 1px solid #b86b27;
  background: #fff8f0;
  color: #8d4b13;
}
.stock-action-btn.edit-stock:hover {
  background: #fff1e2;
}

/* ======================================================
   BATCH 194 — RECIPE PRODUCTS USE INGREDIENT INVENTORY
   Hide direct finished-product stock controls for recipe items.
====================================================== */
.stock-recipe-managed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff3e8;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.stock-recipe-managed-badge.recipe {
  background: #eef7ff;
  color: #1f5f8f;
}

.stock-recipe-total-placeholder,
.stock-recipe-select-placeholder {
  color: var(--muted);
  font-weight: 800;
}

.stock-recipe-help {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid #e3c6aa;
  background: #fffaf5;
  color: #70431d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}


/* ======================================================
   BATCH 197 — PRODUCTS/CATEGORIES/INGREDIENTS NAV BUTTON
   Give the longer Products navigation label enough room
   on desktop so it never overlaps neighboring buttons.
====================================================== */

@media (min-width: 801px) {
  .admin-nav-btn[data-admin-page="products"] {
    grid-column: span 2;
    white-space: nowrap;
  }
}

@media (max-width: 800px) {
  .admin-nav-btn[data-admin-page="products"] {
    min-width: 235px;
    white-space: nowrap;
  }
}

/* BATCH 219 — independent WhatsApp sender verification before Saved PIN activation */
.admin-pin-verification-page { min-width: 0; }
.admin-pin-security-note { border: 1px solid #ecd3a7; background: #fff8e9; padding: 13px 15px; border-radius: 11px; font-size: 14px; font-weight: 750; line-height: 1.65; color: #74430d; }
.admin-pin-security-detail { color: var(--muted); font-size: 13px; margin: 9px 0 18px; line-height: 1.5; }
.admin-pin-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; min-width: 0; }
.admin-pin-item { border: 1px solid #e8ddd2; border-radius: 13px; background: #fff; padding: 16px; min-width: 0; box-shadow: 0 2px 10px rgba(25,25,25,.035); }
.admin-pin-item-top strong { font-size: 17px; }
.admin-pin-status { display: inline-block; background: #fff3e7; color: #a84c04; border-radius: 99px; padding: 3px 8px; margin-inline-start: 8px; font-size: 12px; font-weight: 750; }
.admin-pin-details { margin: 14px 0; display: grid; gap: 9px; }
.admin-pin-details > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.admin-pin-details dt { color: var(--muted); font-size: 13px; }
.admin-pin-details dd { margin: 0; font-size: 13px; font-weight: 750; min-width: 0; overflow-wrap: anywhere; }
.admin-pin-field-label { display: block; font-size: 13px; font-weight: 750; margin: 12px 0 7px; }
.admin-pin-sender { box-sizing: border-box; width: 100%; border: 1px solid #c8bfb4; border-radius: 9px; padding: 11px 12px; min-height: 44px; font: inherit; font-size: 15px; text-align: left; }
.admin-pin-sender:focus-visible { outline: 2px solid #dc5b17; outline-offset: 1px; }
.admin-pin-confirm-check { display: flex; align-items: flex-start; gap: 9px; margin: 15px 0; cursor: pointer; font-size: 13px; line-height: 1.45; }
.admin-pin-confirm-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #bd520b; }
.admin-pin-activate, .admin-pin-refresh { border: none; border-radius: 10px; background: #c85010; color: white; padding: 12px 15px; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; min-height: 44px; }
.admin-pin-activate { width: 100%; }
.admin-pin-activate:disabled, .admin-pin-refresh:disabled { opacity: .6; cursor: wait; }
.admin-pin-empty { padding: 20px; text-align: center; border: 1px dashed #d9cfc4; border-radius: 12px; color: var(--muted); }
.admin-pin-feedback { white-space: pre-wrap; font-size: 13px; overflow-wrap: anywhere; }
.admin-pin-feedback:empty { display: none; }
.admin-pin-feedback.error { color: #9c2525; }
.admin-pin-feedback.success { color: #246c37; }
@media (max-width: 640px) { .admin-pin-verification-page .admin-page-heading { align-items: stretch; flex-direction: column; } .admin-pin-verification-page .admin-page-heading button { width: 100%; } }

/* ======================================================
   BATCH 220 — Saved PIN verification under Orders + Customers
   ====================================================== */
.admin-pin-customer-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 15px 0 19px;
  border-bottom: 1px solid #e7dfd7;
  padding-bottom: 12px;
}
.admin-pin-customer-tab {
  border: 1px solid #d9cec1;
  border-radius: 9px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  background: #fff;
  color: #4c4036;
  min-height: 42px;
}
.admin-pin-customer-tab.active,
.admin-pin-customer-tab[aria-selected="true"] {
  background: #ce5306;
  border-color: #ce5306;
  color: white;
}
.admin-pin-customer-panel { margin: 5px 0 15px; }
.admin-pin-customer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-pin-customer-heading h3 { margin: 0; font-size: 18px; }
[data-customer-all-panel][hidden],
#customerPendingPinPanel[hidden],
#addCustomerButton[hidden] { display: none !important; }
.admin-pin-order-badge { white-space: nowrap; }
.admin-pin-order-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #edcfac;
  border-radius: 13px;
  background: #fffcf8;
}
.admin-pin-order-panel > h3 { font-size: 16px; margin: 0 0 10px; }
.admin-pin-order-panel .admin-pin-item { box-shadow: none; }
.admin-pin-order-panel .admin-pin-security-note { font-size: 12px; margin: 0 0 10px; }
.admin-pin-order-item { width: 100%; box-sizing: border-box; }
.admin-pin-verified-state {
  background: #f0f7ee;
  border: 1px solid #d0e3c9;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #2c6136;
  margin: 12px 0;
  padding: 10px 12px;
}
@media (max-width: 640px) {
  .admin-pin-customer-tabs { display: grid; grid-template-columns: 1fr; }
  .admin-pin-customer-tab { width: 100%; }
  .admin-pin-customer-heading .admin-pin-refresh { width: 100%; }
  .admin-pin-order-panel { padding: 10px; }
}


/* BATCH 221 — Test Order manual classification */
.admin-test-order-panel { margin-top: 14px; padding: 13px 14px; border: 1px dashed #ad8055; border-radius: 12px; background: #fcf8f3; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-test-order-button { min-height: 42px; padding: 10px 16px; border: 1px solid #946638; background: #fff; color: #71471f; border-radius: 10px; font: inherit; font-weight: 800; cursor: pointer; }
.admin-test-order-button:hover:not(:disabled) { background: #f6eadb; }
.admin-test-order-button:disabled { opacity: .55; cursor: wait; }
.admin-test-order-hint { font-size: 12px; line-height: 1.55; color: #785e49; flex: 1; min-width: 190px; }
.admin-test-order-active { font-weight: 800; color: #72451c; font-size: 13px; }
/* BATCH 229: The Test Order badge belongs to the flexible customer column,
   never the 62-70px order-number column. Keep labels separated on narrow screens. */
.compact-order-customer .admin-test-order-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  margin: 4px 0 0;
  padding: 4px 9px;
  border: 1px solid #d6b78f;
  border-radius: 999px;
  background: #f4e9db;
  color: #69441f;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 800;
  white-space: nowrap;
  text-align: center;
}

.test-order-card { border-color: #d6b78f; }

/* ===== Batch 222: manual WhatsApp sender verification hint ===== */
.admin-pin-sender-hint {
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 3px 0 7px;
  color: #74552d;
}

/* BATCH 224 — manual rejection of unverified PIN requests */
.admin-pin-reject-box { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid #efe5e0; }
.admin-pin-reject-box .admin-pin-field-label { margin-top: 0; }
.admin-pin-reject-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 9px; }
.admin-pin-reject-reason { flex: 2 1 210px; min-width: 0; padding: 10px 12px; border: 1px solid #c8bfb4; border-radius: 9px; background: #fff; color: #26211b; font: inherit; font-size: 13px; min-height: 44px; }
.admin-pin-reject { flex: 1 1 180px; border: 1px solid #a9362f; background: #a9362f; color: white; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; min-height: 44px; }
.admin-pin-reject:hover:not(:disabled) { background: #892b24; }
.admin-pin-reject:disabled { opacity: .6; cursor: wait; }

/* BATCH 225 — Saved PIN rejected tab and safe undo */
.admin-pin-rejected-status { background: #fde8e8; color: #8d2828; border-color: #f4d0d0; }
.admin-pin-expired-note { margin: 12px 0 0; color: #a13939; font-weight: 650; }
.admin-pin-undo { margin: 12px 0 0; padding: 11px 17px; border-radius: 10px; background: #257c52; color: #fff; border: 1px solid #257c52; font-weight: 750; font: inherit; cursor: pointer; min-height: 44px; }
.admin-pin-undo:hover:not(:disabled) { background: #1c6743; }
.admin-pin-undo:disabled { opacity: .6; cursor: wait; }

/* BATCH230 — External Sales correction/history layouts */
.external-sales-history-family{border:1px solid rgba(125,125,125,.19);border-radius:12px;padding:6px;margin-bottom:9px;min-width:0}
.external-sales-history-tools{padding:5px 12px 10px}
.external-sales-history-children{margin:0 8px 8px 18px;padding-left:13px;border-left:3px solid rgba(245,133,45,.5)}
.external-sales-batch-child{margin:6px 0;min-width:0;background:rgba(125,125,125,.045)}
.external-sales-correction-intro{border:1px solid rgba(230,141,49,.42);background:rgba(255,168,63,.09);padding:12px 15px;border-radius:12px;margin:12px 0}
.external-sales-correction-intro p{margin:6px 0 0;font-size:.88rem}
.external-sales-correction-preview{border:1px solid rgba(125,125,125,.25);border-radius:12px;padding:12px 14px;margin:12px 0}
.external-sales-correction-preview>strong{display:block;margin-bottom:9px}
.external-sales-correction-comparison{display:flex;gap:16px;justify-content:space-between;align-items:flex-start;padding:7px 3px;border-bottom:1px solid rgba(120,120,120,.13);font-size:.88rem;min-width:0}
.external-sales-correction-comparison:last-child{border-bottom:0}
.external-sales-correction-comparison span{overflow-wrap:anywhere;min-width:0}
.external-sales-correction-comparison strong{white-space:nowrap}
@media(max-width:540px){.external-sales-history-children{margin-left:4px;padding-left:8px}.external-sales-history-family{padding:4px}.external-sales-correction-comparison{gap:6px;flex-wrap:wrap}}

/* BATCH232: net correction first, technical reversal/repost details on request */
.external-sales-net-row b{font-weight:600}
.external-sales-net-row span small,.external-sales-net-row strong small{display:block;font-size:.78rem;font-weight:400;opacity:.8;margin-top:3px}
.external-sales-net-row strong{text-align:end}
.external-sales-technical-delta{margin-top:12px;padding:10px 12px;background:rgba(120,120,120,.045);border:1px solid rgba(120,120,120,.15);border-radius:8px}
.external-sales-technical-delta summary{cursor:pointer;font-size:.85rem;font-weight:600}
.external-sales-technical-delta>p{margin:8px 0}
@media(max-width:540px){.external-sales-net-row strong{white-space:normal;text-align:start}}

/* BATCH233 — explain extra portion deltas per customization group */
.external-sales-net-item{border-bottom:1px solid rgba(120,120,120,.13)}
.external-sales-net-item:last-of-type{border-bottom:0}
.external-sales-net-item>.external-sales-net-row{border-bottom:0}
.external-sales-extra-breakdown{margin:0 4px 9px 10px;padding:6px 10px;border-left:2px solid rgba(220,135,52,.48);background:rgba(120,120,120,.035);border-radius:0 7px 7px 0;font-size:.81rem}
.external-sales-extra-group-line{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;justify-content:space-between;padding:4px 0}
.external-sales-extra-group-line:not(:last-child){border-bottom:1px dashed rgba(120,120,120,.12)}
.external-sales-extra-group-line span{overflow-wrap:anywhere}
.external-sales-extra-group-line small{opacity:.82;font-size:.8rem}
.external-sales-extra-structure-note{display:block;margin-bottom:6px;opacity:.8}
.external-sales-extra-snapshot-label{font-weight:700;font-size:.82rem;margin-top:9px}
@media(max-width:540px){.external-sales-extra-breakdown{margin-left:3px;padding:6px 8px}.external-sales-extra-group-line{display:block}.external-sales-extra-group-line small{display:block;margin-top:3px}}

.external-sales-extra-heading{font-size:.88rem;padding:10px 3px 5px;overflow-wrap:anywhere}
.external-sales-net-extra>.external-sales-extra-breakdown{margin-top:3px;margin-bottom:5px}
.external-sales-extra-total{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;align-items:baseline;padding:6px 4px 10px;font-size:.86rem}
.external-sales-extra-total>span{font-weight:600}
.external-sales-extra-total strong{text-align:end;white-space:nowrap}
.external-sales-extra-total strong small{display:block;font-weight:400;opacity:.8;font-size:.78rem;margin-top:2px}
/* BATCH235: allow fully descriptive correction stock-action labels to wrap. */
.external-sales-extra-total strong{white-space:normal;overflow-wrap:anywhere;max-width:75%}
.external-sales-net-row strong{white-space:normal;overflow-wrap:anywhere;max-width:70%}
@media(max-width:540px){.external-sales-extra-total strong,.external-sales-net-row strong{max-width:100%}}

/* BATCH 260 — small product photos in Admin → Orders → Items. */
.admin-order-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.admin-order-item-thumb {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff8ef;
}
.admin-order-item-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.admin-order-item-thumb img[hidden],
.admin-order-item-thumb-fallback[hidden] { display: none; }
.admin-order-item-thumb-fallback {
  font-size: 23px;
  line-height: 1;
}


/* BATCH 275 — Admin Orders-only Test Order visibility toggle */
.admin-exclude-test-orders-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 15px;
}
.admin-exclude-test-orders-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #e0d0c1;
  border-radius: 999px;
  background: #fffaf5;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.admin-exclude-test-orders-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 36px;
  height: 20px;
  margin: 0;
  border: 1px solid #a5a5a5;
  border-radius: 999px;
  background: #d1d1d1;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.admin-exclude-test-orders-toggle::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px #0003;
  transition: transform .15s;
}
.admin-exclude-test-orders-toggle:checked {
  background: #db5400;
  border-color: #db5400;
}
.admin-exclude-test-orders-toggle:checked::before {
  transform: translateX(16px);
}
.admin-exclude-test-orders-toggle:focus-visible {
  outline: 3px solid #ffb36d;
  outline-offset: 3px;
}
.admin-test-orders-pagination-note {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

/* BATCH 282 — Smart Cancellation modal */
.smart-cancel-overlay{position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,.76);display:flex;align-items:center;justify-content:center;padding:12px}
.smart-cancel-dialog{width:min(740px,100%);max-height:94vh;overflow:auto;background:#fff;color:#171717;border-radius:14px;padding:20px;box-shadow:0 20px 70px rgba(0,0,0,.45)}
.smart-cancel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:1.15rem;margin-bottom:10px}
.smart-cancel-heading button{font-size:1.6rem;background:transparent;border:0;color:#333;cursor:pointer}
.smart-cancel-info,.smart-cancel-test,.smart-cancel-empty,.smart-cancel-cost-note{font-size:.85rem;color:#5d5d5d}
.smart-cancel-test{border:1px solid #e0c278;background:#fff7d6;padding:7px;border-radius:7px}
.smart-cancel-unit-list{display:grid;gap:10px;max-height:48vh;overflow:auto;margin:14px 0;padding-right:4px}
.smart-cancel-unit{border:1px solid #ddd;border-radius:10px;padding:10px;background:#fff}
.smart-cancel-unit.is-unselected{opacity:.65}
.smart-cancel-unit-title{display:flex;gap:10px;align-items:center;font-size:.9rem;cursor:pointer}
.smart-cancel-unit-title span:nth-child(2){flex:1}
.smart-cancel-unit-title small{font-size:.75rem;color:#777}
.smart-cancel-unit-body{padding-top:10px;display:grid;gap:8px}
.smart-cancel-unit-body>label{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:.85rem}
.smart-cancel-unit-body select{flex:1;min-width:160px;padding:7px;background:#fff;color:#111;border:1px solid #bbb;border-radius:7px}
.smart-cancel-allocations{display:grid;gap:5px}
.smart-cancel-allocation{display:grid;grid-template-columns:1.1fr 1fr 1fr 1fr;align-items:center;gap:8px;background:#f5f5f5;padding:8px;border-radius:6px;font-size:.78rem}
.smart-cancel-allocation label{display:flex;align-items:center;gap:4px}
.smart-cancel-allocation input{width:70px;min-width:0;padding:6px 4px;border:1px solid #aaa;border-radius:5px}
.smart-cancel-ingredient-label{overflow-wrap:anywhere}
.smart-cancel-totals{display:grid;gap:7px;border-top:1px solid #ddd;padding-top:12px}
.smart-cancel-totals>div{display:flex;justify-content:space-between;gap:14px;font-size:.9rem}
.smart-cancel-reason{display:block;margin:12px 0;font-weight:600;font-size:.9rem}
.smart-cancel-reason textarea{width:100%;box-sizing:border-box;margin-top:5px;border:1px solid #aaa;border-radius:8px;padding:9px;font:inherit;background:white;color:#111}
.smart-cancel-actions{display:flex;gap:10px;justify-content:flex-end}
.smart-cancel-actions button{border:1px solid #bbb;padding:10px 13px;border-radius:8px;cursor:pointer}
.smart-cancel-actions [data-smart-confirm]{background:#ab4928;color:#fff;border-color:#ab4928;font-weight:700}
.smart-cancel-actions button:disabled{opacity:.6;cursor:wait}
@media(max-width:620px){.smart-cancel-dialog{padding:12px;max-height:96vh}.smart-cancel-allocation{grid-template-columns:1fr 1fr}.smart-cancel-unit-list{max-height:50vh}}

/* BATCH 282 UX — unified cancellation control and per-ingredient explanation */
.smart-cancel-selector{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:9px 11px;border-radius:8px;background:#fff6ee;border:1px solid #efcfb4;font-size:.87rem}
.smart-cancel-selector label{display:flex;align-items:center;gap:7px;cursor:pointer}
.smart-cancel-hint{margin:0;font-size:.8rem;color:#63523c;line-height:1.4}
@media(max-width:620px){.smart-cancel-selector{align-items:flex-start;flex-direction:column}}

/* BATCH 282 recipe snapshot preview: informational only; never a stock-restock input */
.smart-cancel-no-stock{display:grid;gap:7px}
.smart-cancel-no-stock .smart-cancel-empty{margin:0}
.smart-cancel-snapshot{display:grid;gap:8px;padding:10px 12px;border-radius:8px;border:1px solid #d6dce1;background:#f6f8fa;font-size:.83rem}
.smart-cancel-snapshot>strong{font-size:.86rem;color:#283f4b}
.smart-cancel-snapshot-list{display:grid;gap:5px}
.smart-cancel-snapshot-list>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px solid #e2e6e9}
.smart-cancel-snapshot-list>div:last-child{border-bottom:0}
.smart-cancel-snapshot-list>div span{overflow-wrap:anywhere}
.smart-cancel-snapshot-list>div strong{white-space:nowrap;align-self:center}
.smart-cancel-snapshot small{color:#6d7379;line-height:1.45}
.smart-cancel-unit-body option:disabled{color:#888}
@media(max-width:620px){.smart-cancel-snapshot-list>div{align-items:flex-start}.smart-cancel-snapshot-list>div strong{font-size:.78rem}}

/* BATCH 282: ingredient-by-ingredient allocation (real movements / preview) */
.smart-cancel-breakdown-title{font-size:.92rem;margin-top:5px}
.smart-cancel-preview-warning{margin:0;line-height:1.5;padding:10px 12px;border:1px solid #e3c893;background:#fff8e9;border-radius:8px;font-size:.83rem;color:#5c4220}
.smart-cancel-allocation{display:grid;grid-template-columns:minmax(125px,1.5fr) minmax(85px,1fr) minmax(85px,1fr) minmax(85px,1fr) auto;gap:10px;align-items:center;padding:12px;background:#f8f8f8}
.smart-cancel-allocation.is-preview{background:#fffaf1;border:1px dashed #d6bd8d}
.smart-cancel-ingredient-label{display:flex;flex-direction:column;gap:2px}
.smart-cancel-ingredient-label small{font-weight:400;color:#666}
.smart-cancel-preview-tag{font-size:.68rem;color:#935c08!important;font-weight:600!important}
.smart-cancel-allocation label{display:flex;flex-direction:column;align-items:stretch;gap:4px}
.smart-cancel-allocation input{width:100%;box-sizing:border-box;min-width:68px;text-align:center}
.smart-cancel-stock-amount,.smart-cancel-returned{line-height:1.5}
.smart-cancel-stock-amount strong,.smart-cancel-returned strong{display:block}
.smart-cancel-shortcuts{display:flex;flex-direction:column;gap:5px}
.smart-cancel-shortcuts button{font-size:.73rem;border:1px solid #bd927d;border-radius:5px;padding:5px 7px;cursor:pointer;background:white;color:#743b1b;white-space:nowrap}
.smart-cancel-shortcuts button:hover{background:#fff0e7}
@media(max-width:800px){.smart-cancel-allocation{grid-template-columns:1fr 1fr 1fr}.smart-cancel-shortcuts{flex-direction:row;grid-column:1/-1}.smart-cancel-ingredient-label{grid-column:1/-1}}
@media(max-width:420px){.smart-cancel-allocation{grid-template-columns:1fr 1fr}.smart-cancel-ingredient-label{grid-column:1/-1}.smart-cancel-stock-amount{grid-column:1/-1}.smart-cancel-shortcuts{grid-column:1/-1}}


/* BATCH 282 UI polish — Dark red cancellation button only.
   This selector applies exclusively to Admin Smart Cancellation,
   preserving the existing workflow, permissions and inventory logic. */
.order-workflow-panel button[data-smart-cancel-order] {
  background: #8b1e24;
  color: #ffffff;
  border-color: #8b1e24;
  font-weight: 800;
}
.order-workflow-panel button[data-smart-cancel-order]:hover:not(:disabled) {
  background: #71181e;
  color: #ffffff;
  border-color: #71181e;
}
.order-workflow-panel button[data-smart-cancel-order]:focus-visible {
  outline: 3px solid #e9a6aa;
  outline-offset: 2px;
}
.order-workflow-panel button[data-smart-cancel-order]:disabled {
  background: #8b1e24;
  color: #ffffff;
  border-color: #8b1e24;
  opacity: .55;
}

/* BATCH 282 — Cancelled order display only. Stock and historical amounts are unchanged. */
.cancelled-order-notice { display:flex; flex-direction:column; gap:5px; padding:12px 14px; margin:12px 0; border-radius:9px; border:1px solid #e8b8ba; background:#fff1f1; color:#8b1e24; line-height:1.45; }
.cancelled-order-notice strong { font-weight:800; }
.cancelled-order-notice span { font-size:12px; color:#6f4748; }
.cancelled-history-items { opacity:.75; }
.cancelled-history-items .order-item-name strong, .cancelled-history-items .track-item-name, .cancelled-history-items .digital-receipt-item strong { text-decoration:line-through; text-decoration-thickness:1px; }
.cancelled-history-items .order-item-price, .cancelled-history-items .track-item-price, .cancelled-history-items .digital-receipt-item .money-value { color:#806a6a; }
.cancelled-order-financials { display:grid; gap:10px; margin:12px 0; }
.cancelled-order-history-row { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #e9dddd; color:#766565; font-size:13px; }
.cancelled-order-history-row strong { flex-shrink:0; }
.cancelled-zero-due { color:#8b1e24; font-weight:800; }
.cancelled-refund-disclaimer { font-size:12px; line-height:1.45; margin:2px 0 8px; color:#6e6060; }
.cancelled-amount-due-caption { display:block; margin-top:2px; font-size:10px; font-weight:600; white-space:normal; }

/* BATCH 283 — Draft-only Combo Builder. Regular products are unaffected. */
.combo-draft-builder-admin { margin: 18px 0 24px; padding: 20px; border: 1px solid var(--line, #d6dce2); border-radius: 14px; background: var(--card, #fff); }
.combo-draft-title-admin {display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:14px}
.combo-draft-title-admin h4 {margin:0 0 6px; font-size:1.08rem}
.combo-draft-title-admin p {margin:0; opacity:.78; font-size:.9rem}
.combo-component-row-admin {display:grid; grid-template-columns:minmax(135px,1.1fr) minmax(135px,1fr) minmax(190px,1.6fr) minmax(95px,.8fr) 78px auto; gap:10px; margin:10px 0; padding:12px; border-radius:12px; border:1px solid #dde3e9; align-items:end; background:rgba(144,150,160,.04)}
.combo-component-row-admin label {display:flex; flex-direction:column; gap:5px; min-width:0; font-size:.83rem}
.combo-component-row-admin input, .combo-component-row-admin select {box-sizing:border-box; width:100%; min-height:40px; padding:8px 10px; border:1px solid #aab2bd; border-radius:8px; font:inherit; color:inherit; background:var(--card,#fff)}
.combo-component-remove-admin {min-height:40px; border:1px solid #b94f4f; border-radius:8px; color:#ac2626; background:transparent; cursor:pointer; padding:7px 12px; font-weight:600}
.combo-draft-warning-admin {padding:12px 14px; margin-top:14px; background:#fff4e3; color:#854800; border-radius:9px; font-size:.88rem; line-height:1.5}
#productEditForm[data-combo-draft="true"] .product-inventory-section-admin,
#productEditForm[data-combo-draft="true"] .product-ingredients-section-admin,
#productEditForm[data-combo-draft="true"] #productOfferDrinksSection,
#productEditForm[data-combo-draft="true"] [data-product-direct-stock-control] { display:none !important; }
#productEditForm[data-combo-draft="true"] .product-active-field {opacity:.65}
#productEditForm[data-combo-draft="true"] #productActiveInput {pointer-events:none}
@media(max-width:900px){.combo-component-row-admin{grid-template-columns:repeat(2,minmax(0,1fr))}.combo-component-remove-admin{align-self:end}}
@media(max-width:520px){.combo-component-row-admin{grid-template-columns:minmax(0,1fr)}.combo-draft-builder-admin{padding:12px}}

#productEditForm[data-combo-draft="true"] .product-feature-section,
#productEditForm[data-combo-draft="true"] .product-recommendations-section {display:none !important;}

/* BATCH 283 — Optional customer-selectable drink component (draft only). */
.combo-builder-actions-admin {display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.combo-drink-choice-button-admin {border-color:#167cb3!important;color:#116b9b!important}
.combo-drink-choice-row-admin {grid-template-columns:minmax(200px,1fr) 90px auto;border-color:#98cbe0;background:#eff8fc}
.combo-drink-choice-description-admin {display:flex;flex-direction:column;gap:5px;line-height:1.4}
.combo-drink-choice-description-admin strong {color:#104e73}
.combo-drink-choice-description-admin span,.combo-drink-choice-description-admin small {font-size:.81rem;color:#405a66}
@media(max-width:520px){.combo-builder-actions-admin{justify-content:flex-start}.combo-drink-choice-row-admin{grid-template-columns:1fr}}

/* BATCH 283 / Step 4 — per-Combo allowed drink checklist. */
.combo-drink-choice-row-admin {grid-template-columns:minmax(200px,1fr) 90px auto}
.combo-allowed-drinks-admin{grid-column:1/-1;border:1px solid #b5dbe8;border-radius:8px;padding:10px 12px;margin:0;min-width:0;background:#fff}
.combo-allowed-drinks-admin legend{font-size:.87rem;font-weight:700;color:#104e73;padding:0 5px}
.combo-allowed-drinks-list-admin{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px 12px;margin-top:3px}
.combo-allowed-drink-option-admin{display:flex;align-items:center;gap:8px;font-size:.9rem;cursor:pointer;min-height:28px}
.combo-allowed-drink-option-admin input{width:17px;height:17px;accent-color:#167cb3;flex-shrink:0}
@media(max-width:520px){.combo-drink-choice-row-admin{grid-template-columns:1fr}.combo-allowed-drinks-list-admin{grid-template-columns:1fr 1fr}}

/* BATCH 284 — Admin-only Combo dry-run preview. */
.combo-order-preview-overlay-admin{position:fixed;inset:0;z-index:100000;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;padding:18px}
.combo-order-preview-panel-admin{width:min(750px,100%);max-height:90vh;overflow:auto;background:#fff;color:#222;border-radius:15px;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.22)}
.combo-order-preview-header-admin{display:flex;align-items:center;justify-content:space-between;gap:16px}
.combo-order-preview-header-admin h3{margin:0 0 10px;font-size:20px}
.combo-order-preview-header-admin button{font-size:24px;border:0;background:transparent;cursor:pointer}
.combo-preview-draft-note-admin{padding:10px;border-radius:7px;background:#fff1d9;color:#7b4100;font-size:13px}
.combo-order-preview-inputs-admin{display:grid;grid-template-columns:2fr 1fr 2fr;gap:12px;margin:16px 0}
.combo-order-preview-inputs-admin label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:13px}
.combo-order-preview-inputs-admin select,.combo-order-preview-inputs-admin input{min-width:0;width:100%;padding:9px;border:1px solid #cbd1da;border-radius:7px;background:white;color:#222}
.combo-order-preview-check-admin,.combo-preview-action-admin{cursor:pointer}
.combo-order-preview-check-admin{background:#ba4b0a;border:0;color:white;border-radius:7px;padding:10px 16px;font-weight:700}
.combo-order-preview-result-admin{margin-top:12px}
.combo-order-preview-result-admin h4{margin:13px 0 5px;font-size:14px}
.combo-order-preview-result-admin ul{margin:5px 0 10px;padding-inline-start:22px}
.combo-order-preview-result-admin li{margin:5px 0}
.combo-order-preview-result-admin li small{color:#555;margin-inline-start:10px}
.combo-preview-price-admin{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #eee;padding:8px 0}
.combo-preview-status-admin{font-weight:700;margin:10px 0}
.combo-preview-status-admin.has-issues{color:#a31c19}
.combo-preview-status-admin.all-ok{color:#126e37}
.combo-preview-errors-admin{color:#a31c19}
.combo-preview-disclaimer-admin{font-size:12px;color:#555;border-top:1px solid #eee;padding-top:10px}
@media(max-width:640px){.combo-order-preview-inputs-admin{grid-template-columns:1fr}}


/* BATCH 284 Step 4 — Admin-only, read-only physical unit plan preview. */
.combo-physical-plan-admin {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #dccdbf;
  border-radius: 10px;
  background: #fffcf8;
}
.combo-physical-plan-admin h4 { margin: 0 0 8px; }
.combo-physical-plan-admin p { margin: 7px 0; font-size: 13px; }
.combo-plan-totals-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 8px 0;
  font-size: 13px;
}
.combo-plan-totals-admin ul, .combo-physical-plan-admin ul { margin: 6px 0 8px; padding-inline-start: 22px; }
.combo-physical-plan-admin li { margin: 4px 0; font-size: 13px; }
.combo-physical-plan-admin .combo-plan-safe-admin { color: #8a5312; font-size: 12px; }

/* BATCH 284 Step 5 — shared checkout contract smoke-test feedback */
.combo-shared-contract-admin{margin-top:12px;padding:12px 14px;border:1px solid #d8dee5;border-radius:9px;background:#fbfcff;font-size:13px;}
.combo-shared-contract-admin h4{margin:0 0 7px;font-size:14px;}
.combo-shared-contract-admin p{margin:6px 0;}
.combo-contract-passed-admin{color:#136a35;font-weight:700;}
.combo-contract-failed-admin{color:#a71f23;font-weight:700;}

/* BATCH 284 Step 11 — grouped Smart Cancellation for paid Combos. */
.smart-cancel-combo-unit{border-inline-start:3px solid #cc5a13;}
.smart-cancel-unit-title .smart-cancel-combo-label{color:#964000;font-weight:700;line-height:1.5;}

/* BATCH284 Step12: explicit Admin-only Combo Test Order action */
.combo-admin-test-order-btn {display:block; margin:12px 0 6px; border:1px solid #166534; border-radius:7px; padding:10px 14px; color:white; background:#166534; font-weight:700; cursor:pointer;}
.combo-admin-test-order-btn:disabled {opacity:.65; cursor:wait;}

/* BATCH 285: isolated Admin-only mixed Combo QA controls */
.combo-qa-mixed-admin{border-top:1px solid #dbcbbb;margin-top:12px;padding-top:12px;display:grid;gap:9px}
.combo-qa-mixed-admin label{display:grid;gap:5px;font-size:12px;font-weight:600}
.combo-qa-extra-drink-admin{width:100%;min-height:34px;padding:6px 9px;border:1px solid #c7b8aa;border-radius:7px;background:white;color:#241810}
.combo-qa-mixed-admin .combo-admin-test-order-btn{justify-self:start}

/* BATCH 290 — One Combo cancellation checkbox, individual physical stock decisions. */
.smart-cancel-parent-unit {
  background: #fff7ef;
  border-color: #dcaa80;
  border-inline-start: 4px solid #c55b14;
}
.smart-cancel-parent-unit .smart-cancel-unit-title {font-weight:800;}
.smart-cancel-parent-unit .smart-cancel-unit-title input {width:18px;height:18px;accent-color:#bc5214;flex-shrink:0;}
.smart-cancel-combo-help {font-size:.82rem;line-height:1.45;color:#68452e;margin:8px 0;}
.smart-cancel-price-only {font-size:.75rem;color:#735b4d;margin:7px 0 0;}
.smart-cancel-combo-bulk {display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;}
.smart-cancel-combo-bulk button {font-size:.8rem;font-weight:700;cursor:pointer;border-radius:7px;background:#fff;border:1px solid #af764d;padding:9px 12px;color:#743b19;}
.smart-cancel-combo-bulk button:first-child {border-color:#188058;color:#116746;}
.smart-cancel-combo-bulk button:hover {background:#fff1e4;}
.smart-cancel-included-unit {margin-inline-start:18px;background:#fff;border-inline-start:3px solid #e2cbb8;}
.smart-cancel-included-unit .smart-cancel-unit-title {cursor:default;}
.smart-cancel-child-arrow {width:16px;flex-shrink:0;color:#9f653b;font-weight:800;font-size:18px;}
.smart-cancel-included-unit .smart-cancel-combo-label {color:#756557;}
.smart-cancel-pending,.smart-cancel-decision-needed {padding:8px 10px;margin:6px 0;background:#fff3df;color:#75401c;border:1px solid #e7bd80;border-radius:7px;font-size:.8rem;font-weight:700;line-height:1.4;}
.smart-cancel-totals .smart-cancel-pending {display:block;}
.smart-cancel-shortcuts button:disabled {opacity:.45;cursor:not-allowed;}
.smart-cancel-unit-body input:disabled {background:#f3f3f3;color:#777;}
@media (max-width:520px) {.smart-cancel-included-unit {margin-inline-start:8px}.smart-cancel-combo-bulk button{flex:1;min-width:130px}}

/* BATCH 291: exact, separately labeled branch ingredient cost breakdown */
.recipe-exact-branch-costs { display:grid; gap:3px; margin-top:6px; font-size:.72rem; font-weight:500; color:#655246; overflow-wrap:anywhere; min-width:0; }
.recipe-exact-branch-line { display:block; font-variant-numeric:tabular-nums; line-height:1.35; }
.recipe-exact-branch-line strong {display:inline; white-space:normal; font-size:inherit; color:#903e09; font-weight:700;}
.product-recipe-controls-admin .product-recipe-cost-admin {min-width:0;}
.product-recipe-cost-admin > strong {white-space:normal;}
.recipe-branch-totals {padding:6px 10px; border:1px solid #eedfce; border-radius:8px; background:#fffaf5;}

/* BATCH 295 — original subtotal and explicit coupon/loyalty discount audit rows */
.admin-order-discount-breakdown {
  gap: 9px;
}
.admin-order-discount-breakdown > div {
  align-items: baseline;
}
.admin-order-discount-breakdown .admin-order-discount-line strong {
  color: #246f43;
}
.admin-order-discount-breakdown .admin-order-discount-line span {
  color: #245e3c;
}
.admin-order-discount-breakdown > div > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-order-discount-breakdown > div > strong {
  white-space: nowrap;
}
