/**
 * INDY POS — Order Dashboard Styles
 * Based on indy-pos-orders-responsive-fullwidth.html
 */

@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;600;700;800&display=swap');

/* =========================================================
   RESET / TOKENS
========================================================= */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --line: #e8ebef;
  --border: #e8ebef;
  --border-dark: #dce1e8;
  --text: #172033;
  --text-2: #667085;
  --text-3: #8b95a5;
  --text-secondary: #7a8495;
  --text-muted: #7a8495;
  --muted: #7a8495;
  --orange: #ff5a14;
  --orange2: #ed4c08;
  --primary: #ff5a14;
  --primary-hover: #ed4c08;
  --primary-soft: #fff2eb;
  --soft: #fff2eb;
  --blue: #3567f0;
  --blue-hover: #2251d4;
  --blue-soft: #eff6ff;
  --red: #df3030;
  --red-soft: #fef2f2;
  --danger: #df3030;
  --green: #168a55;
  --green-soft: #ecfdf3;
  --radius: 12px;
}

/* =========================================================
   HEADER & TITLE
========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
  border-radius: 0;
}

.title {
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.title h1 {
  font-size: 19px;
  margin: 0;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.summary {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* =========================================================
   TABS
========================================================= */
.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 10px;
  gap: 4px;
  background: transparent;
  border: 0;
  margin: 0;
}

.tab {
  position: relative;
  min-width: 0;
  height: 50px;
  border: 0;
  background: none;
  padding: 0 8px;
  color: #717b8d;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab:active {
  background: #f3f5f8;
}

.tab.active {
  color: #111827;
  font-weight: 800;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--blue);
}

.badge,
.tab .badge,
.count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 6px;
  background: #eef1f5;
  font-size: 11px;
  font-weight: 700;
  color: #667085;
}

.tab.active .badge,
.active .badge,
.tab.active .count {
  background: #e7edff;
  color: #2859dd;
}

/* =========================================================
   TOOLBAR
========================================================= */
.toolbar {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  margin: 0;
}

.toolbar b,
.toolbar-title {
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}

.sort {
  height: 35px;
  border: 1px solid #dce1e8;
  background: #fff;
  border-radius: 9px;
  padding: 0 10px;
  color: #344054;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.late-alert {
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 12px;
  font-weight: 700;
}

/* =========================================================
   ORDERS LIST & CARDS
========================================================= */
.list,
.orders,
.order-list-mode {
  background: #fff;
  width: 100%;
}

.order {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background 0.15s ease;
  position: relative;
  align-items: start;
}

.order:hover {
  background: #fafbfc;
}

.type-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--orange);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.type-icon svg {
  width: 22px;
  height: 22px;
}

.type-icon.qr {
  background: #eef4ff;
  color: var(--blue);
}

.type-icon.takeaway {
  background: var(--soft);
  color: var(--orange);
}

.type-icon.bill {
  background: #f2f4f7;
  color: #667085;
}

.order-content {
  min-width: 0;
  flex: 1;
}

.head,
.order-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.type,
.order-name {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  white-space: nowrap;
}

.id,
.order-id,
.time,
.order-time {
  font-size: 12px;
  color: #8b95a5;
  font-weight: 500;
}

.time,
.order-time {
  margin-left: auto;
  white-space: nowrap;
}

.dots,
.more-btn {
  border: 0;
  background: transparent;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #8791a3;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  transition: background 0.1s ease;
}

.dots:active,
.more-btn:active {
  background: #f0f2f5;
}

.items,
.product {
  margin-top: 3px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.qty {
  font-size: 15px;
  color: #687386;
  margin-left: 5px;
  font-weight: 700;
}

.mail,
.customer {
  margin-top: 2px;
  font-size: 12px;
  color: #a14a26;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: #687386;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.note {
  margin-top: 3px;
  color: #b54708;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom,
.order-bottom {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wait {
  font-size: 12.5px;
  font-weight: 750;
  color: #697386;
  white-space: nowrap;
}

.wait.late,
.wait.long {
  color: var(--red);
}

.wait::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  vertical-align: 1px;
}

.done,
.done-btn {
  height: 40px;
  min-width: 100px;
  border: 0;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
  transition: transform 0.08s ease, background 0.12s ease;
}

.done:active,
.done-btn:active {
  background: var(--orange2);
  transform: scale(0.98);
}

.done.green {
  background: var(--green);
}

.done.green:active {
  background: #117346;
}

.empty {
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  grid-column: 1 / -1;
  width: 100%;
}

/* =========================================================
   BOTTOM SHEET DRAWER (FULL DETAIL)
========================================================= */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.scrim.show {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 0;
  width: min(100%, 500px);
  max-height: 86dvh;
  background: #fff;
  border-radius: 22px 22px 0 0;
  transform: translate(-50%, 105%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.sheet.show {
  transform: translate(-50%, 0);
}

.handle {
  width: 38px;
  height: 4px;
  background: #d8dde5;
  border-radius: 9px;
  margin: 9px auto 4px;
}

.sheet-head {
  padding: 12px 16px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.sheet-sub {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

.close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  font-size: 20px;
  color: #596273;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.close:active {
  background: #e2e6ea;
}

.section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.label {
  font-size: 11.5px;
  color: #8b95a5;
  margin-bottom: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.food {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
}

.food + .food {
  margin-top: 9px;
}

.food small {
  display: block;
  color: #8b95a5;
  font-weight: 500;
  font-size: 12.5px;
  margin-top: 2px;
}

.price {
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.meta div span {
  display: block;
  font-size: 11.5px;
  color: #8b95a5;
}

.meta div b {
  display: block;
  font-size: 13.5px;
  margin-top: 2px;
  color: var(--text);
  font-weight: 700;
}

.sheet .note {
  background: #fff8f2;
  border: 1px solid #ffe1d1;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  color: #744229;
  white-space: normal;
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total span {
  font-size: 14.5px;
  color: var(--text);
  font-weight: 600;
}

.total strong {
  font-size: 20px;
  color: var(--text);
  font-weight: 800;
}

.sheet-actions {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 9px;
  border-top: 1px solid var(--line);
}

.secondary,
.primary {
  height: 46px;
  border-radius: 11px;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary {
  border: 1px solid #dfe3e8;
  background: #fff;
  color: #3d4655;
}

.secondary:active {
  background: #f5f7fa;
}

.primary {
  border: 0;
  background: var(--orange);
  color: #fff;
}

.primary:active {
  background: var(--orange2);
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 20px);
  background: #182230;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.history-row {
  min-height: 88px;
  grid-template-columns: 48px minmax(250px, 1fr) 120px 120px 105px 32px;
}

.method {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 7px;
  color: #475467;
  background: #f2f4f7;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 650;
}

.history-price {
  justify-self: end;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 760;
  color: var(--text);
}

.closed {
  justify-self: end;
  text-align: right;
}

.closed strong {
  display: block;
  color: var(--green);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.closed span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  white-space: nowrap;
  font-size: 11.5px;
}

/* =========================================================
   ACCORDION DRAWER
========================================================= */
.order-accordion-body {
  grid-column: 1 / -1;
  display: none;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  margin: 3px -14px -14px;
  padding: 12px 14px;
  overflow: hidden;
}

.order-accordion-body.open {
  display: block;
  animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accordion-item-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  color: var(--text);
}

.accordion-item-name {
  font-weight: 500;
}

.accordion-item-note {
  font-size: 0.75rem;
  color: #ea580c;
  font-weight: 400;
  margin-left: 0.5rem;
}

.accordion-item-price {
  font-weight: 500;
  color: var(--text-2);
}

/* =========================================================
   KEBAB DROPDOWN MENU
========================================================= */
.kebab-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 100;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  min-width: 170px;
  padding: 0.35rem;
  display: none;
}

.kebab-dropdown-menu.show {
  display: block;
  animation: fadeIn 0.1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.kebab-menu-item {
  width: 100%;
  padding: 0.6rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
}

.kebab-menu-item:hover {
  background: #f8fafc;
}

.kebab-menu-item.danger {
  color: var(--red);
}

.kebab-menu-item.danger:hover {
  background: var(--red-soft);
}

/* =========================================================
   COMPACT GRID MODE
========================================================= */
.order-grid-compact-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.compact-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.15s ease;
}

.compact-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  border-color: var(--border-dark);
}

/* =========================================================
   VENDOR PAYMENT MODAL SYSTEM
========================================================= */
.vendor-payment-modal-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(16, 24, 40, .55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.18s ease-out;
}

.vendor-payment-modal-root[hidden] {
  display: none;
}

/* =========================================================
   PAYMENT MODAL
========================================================= */
.payment-modal {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  height: min(760px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) 76px;
  overflow: hidden;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(16, 24, 40, .22);
}

/* =========================================================
   HEADER
========================================================= */
.modal-header {
  padding: 0 28px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.header-title {
  margin-left: 0;
}

.header-title h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 760;
  color: var(--text);
}

.header-title p {
  margin: 3px 0 0;
  color: var(--text-2);
  font-size: 12px;
}

.close {
  width: 38px;
  height: 38px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s ease;
}

.close:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* =========================================================
   BODY
========================================================= */
.modal-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  background: #ffffff;
}

/* =========================================================
   LEFT / BILL PANEL
========================================================= */
.bill-panel {
  min-height: 0;
  padding: 24px 26px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fcfcfd;
}

.amount-label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.total {
  margin-top: 5px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--text);
}

.tax-label {
  margin-top: 5px;
  color: var(--text-3);
  font-size: 11px;
}

.detail-button {
  margin-top: 12px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.detail-button:hover {
  text-decoration: underline;
}

.order-info {
  margin-top: 20px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.order-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
}

.order-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.order-info-content {
  min-width: 0;
}

.order-info-title {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text);
}

.order-info-meta {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 10.5px;
}

.bill-divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
}

.bill-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.bill-heading span {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 650;
}

.bill-item {
  margin-bottom: 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bill-item-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 650;
}

.bill-item-qty {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 650;
}

.bill-item-price {
  min-width: 68px;
  text-align: right;
  font-weight: 750;
  color: var(--text);
}

.summary-row {
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 12.5px;
}

.summary-row strong {
  color: var(--text);
  font-weight: 650;
}

.discount {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.discount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.discount-label {
  color: var(--text-2);
  font-size: 11px;
}

.discount-button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.discount-button:hover {
  background: var(--surface-soft);
  color: var(--primary);
  border-color: var(--primary);
}

/* =========================================================
   RIGHT / PAYMENT PANEL
========================================================= */
.payment-panel {
  min-width: 0;
  min-height: 0;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.section-title {
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text);
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 230px));
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.payment-method {
  min-height: 54px;
  position: relative;
  padding: 9px 34px 9px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.payment-method>span:nth-child(2) {
  min-width: 0;
}

.payment-method:hover {
  background: #fff;
  border-color: var(--line);
}

.method-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f2f4f7;
  color: var(--text-2);
}

.method-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.method-name {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
}

.method-desc {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 10px;
}

.method-check {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.payment-method[data-method="cash"].active {
  border-color: #12b76a;
  background: var(--green-soft);
  box-shadow: 0 1px 3px rgba(21, 154, 102, .08);
}

.payment-method[data-method="cash"].active .method-icon {
  color: var(--green);
  background: #d1fadf;
}

.payment-method[data-method="cash"].active .method-check {
  display: grid;
  background: var(--green);
}

.payment-method[data-method="qr"].active {
  border-color: #528bff;
  background: var(--blue-soft);
  box-shadow: 0 1px 3px rgba(37, 99, 235, .08);
}

.payment-method[data-method="qr"].active .method-icon {
  color: var(--blue);
  background: #dbeafe;
}

.payment-method[data-method="qr"].active .method-check {
  display: grid;
  background: var(--blue);
}

/* =========================================================
   PAYMENT WORKSPACE
========================================================= */
.payment-workspace {
  min-height: 0;
  margin-top: 20px;
  flex: 1;
  min-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.payment-view {
  height: 100%;
  display: none;
}

.payment-view.active {
  display: flex;
}

/* =========================================================
   CASH VIEW
========================================================= */
.cash-view {
  padding: 22px 26px;
  flex-direction: column;
}

.view-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.view-heading-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
}

.view-heading-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.view-heading strong {
  font-size: 14.5px;
  color: var(--text);
}

.exact-button {
  height: 30px;
  margin-left: 12px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: all .12s ease;
}

.exact-button:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.cash-body {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 180px);
  gap: 12px;
  align-items: stretch;
}

.cash-input-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.cash-input-head {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.input-label {
  margin-bottom: 0;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
}

.money-input {
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  cursor: text;
}

.money-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .08);
}

.money-prefix {
  margin-right: 8px;
  color: var(--text-3);
  font-size: 18px;
  font-weight: 650;
}

.money-input input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  font-weight: 750;
}

.money-input input::placeholder {
  color: #c1c7d0;
}

.quick-cash {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quick-button {
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}

.quick-button:hover,
.quick-button.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.change-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: var(--green-soft);
  transition: all .15s ease;
}

.change-label {
  color: #067647;
  font-size: 12px;
  font-weight: 750;
}

.change-amount {
  margin-top: 3px;
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.cash-hint {
  margin-top: 10px;
  min-height: 22px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 650;
}

/* =========================================================
   QR VIEW
========================================================= */
.qr-view {
  padding: 24px 26px;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.qr-view:not(.active) {
  display: none;
}

.qr-layout {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: minmax(168px, 220px) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 32px);
  align-items: center;
  margin: auto;
}

.qr-card {
  padding: 14px;
  border: 1.5px solid var(--blue-line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
  box-shadow: 0 4px 16px rgba(37, 99, 235, .06);
}

.qr-code {
  width: clamp(150px, 18vw, 190px);
  height: clamp(150px, 18vw, 190px);
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.qr-code svg,
.qr-code img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.qr-info-label {
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
}

.qr-amount {
  margin-top: 3px;
  color: var(--text);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.qr-account {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  color: var(--text-2);
  font-size: 12px;
}

/* =========================================================
   FOOTER
========================================================= */
.modal-footer {
  padding: 14px 28px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #fff;
}

.back-button {
  height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 12px;
  transition: background .12s ease;
}

.back-button:hover {
  background: var(--surface-soft);
}

.back-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.back-text {
  text-align: left;
}

.back-text strong {
  display: block;
  font-size: 12px;
  color: var(--text);
}

.back-text span {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 9.5px;
}

.confirm-button {
  height: 50px;
  min-width: 0;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.25;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .18);
  cursor: pointer;
  transition: all .15s ease;
}

.confirm-button:hover {
  background: #4338ca;
}

.confirm-button:disabled {
  cursor: not-allowed;
  color: #98a2b3;
  background: #e4e7ec;
  box-shadow: none;
}

/* =========================================================
   KITCHEN PENDING WARNING
========================================================= */
.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.confirm-dialog {
  width: min(440px, 100%);
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, .3), 0 0 0 1px rgba(0, 0, 0, .04);
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.reason-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
}

.reason-chip {
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.reason-chip:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
  transform: translateY(-1px);
}

.reason-chip.selected {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.btn-secondary-action {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  height: 46px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-secondary-action:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-primary-action {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  height: 46px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-primary-action:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.btn-primary-action:active,
.btn-secondary-action:active {
  transform: translateY(0);
}

/* Edit Quantity Modal specific styling */
.edit-qty-dialog {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, .35), 0 0 0 1px rgba(0, 0, 0, .04);
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.qty-stepper-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 14px;
}

.qty-step-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #1e293b;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.qty-step-btn:hover:not(:disabled) {
  background: #ffffff;
  border-color: #f97316;
  color: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.18);
}

.qty-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.qty-number-input {
  width: 90px;
  height: 52px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.qty-number-input:focus {
  border-color: #f97316;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.qty-presets-wrap {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.qty-preset-chip {
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}

.qty-preset-chip:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.qty-preview-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.kitchen-warning-dialog {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid rgba(245, 158, 11, .32);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.kitchen-warning-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.kitchen-warning-icon svg {
  width: 28px;
  height: 28px;
}

.kitchen-warning-dialog h3 {
  margin: 16px 0 6px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
}

.kitchen-warning-copy {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 600;
}

.kitchen-warning-copy strong {
  color: #b45309;
  font-weight: 800;
}

.kitchen-warning-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 600;
}

.kitchen-warning-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.kitchen-warning-primary,
.kitchen-warning-secondary {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.kitchen-warning-primary svg,
.kitchen-warning-secondary svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.kitchen-warning-primary {
  border: 0;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(255, 107, 11, .18);
}

.kitchen-warning-primary:hover {
  background: var(--orange-hover);
}

.kitchen-warning-secondary {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: #fff;
}

.kitchen-warning-secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

/* =========================================================
   TABLET RESPONSIVE (1024-1280px & down to 900px)
========================================================= */
@media (max-width: 1024px) {
  .vendor-payment-modal-root {
    padding: 12px;
  }

  .payment-modal {
    width: 100%;
    height: min(760px, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
    grid-template-rows: 68px minmax(0, 1fr) 74px;
  }

  .modal-body,
  .content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .payment-panel,
  .payment {
    order: 1 !important;
    padding: 20px;
    border-bottom: 1px solid var(--line);
  }

  .bill-panel,
  .summary {
    order: 2 !important;
    padding: 20px;
    border-right: 0;
    border-bottom: 0;
  }

  .payment-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .payment-method {
    padding: 12px;
  }

  .payment-workspace {
    min-height: 300px;
  }

  .cash-body {
    grid-template-columns: 1fr;
  }

  .change-card {
    min-height: 0;
  }

  .qr-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .qr-card {
    width: min(100%, 220px);
    margin: 0 auto;
  }

  .qr-code {
    width: 170px;
    height: 170px;
  }
}

@media (max-width: 820px) and (min-width: 681px) {
  .payment-modal {
    grid-template-rows: 66px minmax(0, 1fr) 74px;
  }

  .modal-body,
  .content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #f8fafc;
  }

  .payment-panel,
  .payment {
    order: 1 !important;
    min-height: auto;
    border-bottom: 1px solid var(--line);
  }

  .bill-panel,
  .summary {
    order: 2 !important;
    display: flex;
    flex-direction: column;
    border-right: 0;
    border-bottom: 0;
    overflow: visible;
  }

  .order-info {
    margin-top: 0;
  }
}

/* =========================================================
   MOBILE RESPONSIVE (<= 680px)
========================================================= */
@media (max-width: 680px) {
  .vendor-payment-modal-root {
    padding: 0;
    align-items: stretch;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .payment-modal {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    height: auto;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    background: #f8fafc;
    overflow: visible;
  }

  .modal-header {
    height: 60px;
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 4px rgba(16, 24, 40, 0.04);
  }

  .header-title {
    margin-left: 0;
  }

  .header-title h1 {
    font-size: 16.5px;
  }

  .header-title p {
    font-size: 11px;
    margin-top: 1px;
  }

  .close {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .modal-body,
  .content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 14px 14px 86px;
    gap: 12px;
    background: transparent;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .payment-panel,
  .payment {
    order: 1 !important;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03);
    overflow: visible;
  }

  .bill-panel,
  .summary {
    order: 2 !important;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03);
    overflow: visible;
  }

  .amount-label {
    font-size: 11px;
    font-weight: 600;
  }

  .total {
    font-size: 28px;
    margin-top: 2px;
  }

  .tax-label {
    font-size: 10.5px;
    margin-top: 2px;
  }

  .detail-button {
    margin-top: 10px;
    font-size: 11.5px;
  }

  .order-info {
    margin-top: 12px;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 10px;
  }

  .order-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .order-icon svg {
    width: 17px;
    height: 17px;
  }

  .order-info-title {
    font-size: 12.5px;
  }

  .order-info-meta {
    font-size: 10px;
  }

  .bill-heading,
  .summary-row,
  .discount {
    display: none;
  }

  #vendorBillItems {
    display: block !important;
  }

  .section-title {
    margin: 0 0 12px;
    font-size: 13.5px;
    font-weight: 750;
  }

  .payment-methods {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  .payment-method {
    min-height: 56px;
    padding: 10px 30px 10px 12px;
    gap: 10px;
    border-radius: 12px;
  }

  .method-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .method-icon svg {
    width: 18px;
    height: 18px;
  }

  .method-name {
    font-size: 13px;
    font-weight: 750;
  }

  .method-desc {
    display: none;
  }

  .method-check {
    width: 18px;
    height: 18px;
    top: 6px;
    right: 6px;
    font-size: 10px;
  }

  .payment-workspace {
    margin-top: 12px;
    min-height: 0;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    overflow: visible;
  }

  .cash-view {
    padding: 14px;
  }

  .view-heading {
    margin-bottom: 12px;
    gap: 8px;
  }

  .view-heading strong {
    font-size: 13px;
  }

  .exact-button {
    height: 30px;
    max-width: 100%;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 7px;
    white-space: nowrap;
  }

  .cash-input-head {
    align-items: flex-start;
  }

  .cash-body {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .cash-input-card {
    padding: 14px;
    border-radius: 12px;
  }

  .input-label {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .money-input {
    height: 52px;
    padding: 0 12px;
    border-radius: 10px;
  }

  .money-prefix {
    font-size: 16px;
  }

  .money-input input {
    font-size: 22px;
  }

  .quick-cash {
    margin-top: 10px;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .quick-button {
    height: 36px;
    font-size: 11px;
    border-radius: 8px;
  }

  .change-card {
    padding: 12px 14px;
    border-radius: 12px;
    min-height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
  }

  .change-label {
    font-size: 11px;
  }

  .change-amount {
    margin-top: 0;
    text-align: right;
    font-size: 22px;
  }

  .cash-hint {
    margin-top: 10px;
    padding: 6px 9px;
    font-size: 10.5px;
  }

  .qr-view {
    padding: 20px 14px;
    min-height: 330px;
  }

  .qr-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    text-align: center;
  }

  .qr-card {
    padding: 14px;
    border-radius: 14px;
    width: min(100%, 230px);
  }

  .qr-code {
    width: clamp(170px, 54vw, 200px);
    height: clamp(170px, 54vw, 200px);
  }

  .qr-info-label {
    font-size: 11px;
  }

  .qr-amount {
    font-size: 28px;
    margin-top: 2px;
  }

  .qr-account {
    margin-top: 8px;
    font-size: 11.5px;
    justify-content: center;
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 30;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    height: auto;
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 10px rgba(16, 24, 40, 0.04);
  }

  .back-button {
    height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #ffffff;
  }

  .back-text {
    display: none;
  }

  .confirm-button {
    height: 48px;
    padding: 0 12px;
    font-size: 13.5px;
    border-radius: 12px;
  }
}

@media (max-width: 400px) {
  .modal-body {
    padding-left: 10px;
    padding-right: 10px;
  }

  .bill-panel,
  .payment-panel {
    padding: 12px;
    border-radius: 14px;
  }

  .payment-method {
    padding: 8px 10px;
    gap: 8px;
    align-items: center;
  }

  .method-icon {
    width: 30px;
    height: 30px;
  }

  .method-name {
    font-size: 12px;
  }

  .method-check {
    top: 7px;
    right: 7px;
  }

  .view-heading {
    align-items: flex-start;
  }

  .cash-input-head {
    flex-direction: column;
    gap: 7px;
  }

  .exact-button {
    width: 100%;
    margin-left: 0;
  }

  .qr-code {
    width: min(180px, 68vw);
    height: min(180px, 68vw);
  }

  .modal-footer {
    grid-template-columns: 42px 1fr;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .kitchen-warning-dialog {
    padding: 20px;
    border-radius: 18px;
  }

  .kitchen-warning-dialog h3 {
    font-size: 18px;
  }

  .kitchen-warning-actions {
    gap: 8px;
  }

  .kitchen-warning-primary,
  .kitchen-warning-secondary {
    min-height: 46px;
    font-size: 12.5px;
  }
}

/* =========================================================
   RESPONSIVE LAYOUT (MATCHING indy-pos-orders-responsive-fullwidth.html)
========================================================= */
@media (max-width: 680px) {
  .title {
    height: 56px;
    padding: 0 12px;
  }
  .title h1 {
    font-size: 19px;
  }
  .summary {
    font-size: 12px;
  }
  .tabs {
    padding: 0 4px;
    gap: 0;
  }
  .tab {
    height: 48px;
    padding: 0 4px;
    font-size: 12.5px;
  }
  .badge,
  .tab .badge,
  .count {
    min-width: 18px;
    height: 18px;
    margin-left: 3px;
    padding: 0 4px;
    font-size: 10px;
    border-radius: 5px;
  }
  .toolbar {
    height: 46px;
    padding: 0 12px;
  }
  .toolbar b,
  .toolbar-title {
    font-size: 13px;
  }
  .sort {
    height: 32px;
    padding: 0 8px;
    font-size: 11.5px;
  }
  .late-alert {
    padding: 3px 6px;
    font-size: 11px;
  }

  /* Order Card on Mobile (-7px to -9px from desktop) */
  .order {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .type-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .type-icon svg {
    width: 20px;
    height: 20px;
  }
  .type,
  .order-name {
    font-size: 14.5px;
  }
  .id,
  .order-id,
  .time,
  .order-time {
    font-size: 11px;
  }
  .dots,
  .more-btn {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .items,
  .product {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.3;
  }
  .qty {
    font-size: 13px;
    margin-left: 4px;
  }
  .mail,
  .customer {
    margin-top: 2px;
    font-size: 11px;
  }
  .sub {
    margin-top: 2px;
    font-size: 11.5px;
  }
  .note {
    margin-top: 3px;
    font-size: 11.5px;
  }
  .bottom,
  .order-bottom {
    margin-top: 8px;
    gap: 8px;
  }
  .wait {
    font-size: 11.5px;
  }
  .wait::before {
    width: 6px;
    height: 6px;
    margin-right: 4px;
  }
  .done,
  .done-btn {
    height: 36px;
    min-width: 90px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 9px;
  }
  .empty {
    padding: 40px 16px;
    font-size: 13.5px;
  }

  /* Sheet Drawer on Mobile */
  .sheet-head {
    padding: 10px 14px 12px;
  }
  .sheet-head h2 {
    font-size: 17px;
  }
  .sheet-sub {
    font-size: 11.5px;
  }
  .close {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .section {
    padding: 12px 14px;
  }
  .label {
    font-size: 11px;
    margin-bottom: 6px;
  }
  .food {
    font-size: 14px;
  }
  .food small {
    font-size: 11.5px;
  }
  .price {
    font-size: 14px;
  }
  .meta {
    gap: 10px;
  }
  .meta div span {
    font-size: 11px;
  }
  .meta div b {
    font-size: 13px;
  }
  .sheet .note {
    padding: 9px;
    font-size: 12px;
  }
  .total span {
    font-size: 14px;
  }
  .total strong {
    font-size: 19px;
  }
  .sheet-actions {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
  }
  .secondary,
  .primary {
    height: 44px;
    font-size: 13px;
    border-radius: 10px;
  }
}

@media (min-width: 700px) {
  .header,
  .toolbar,
  .list,
  .orders,
  .order-list-mode {
    width: 100%;
  }
  .title {
    padding-left: 24px;
    padding-right: 24px;
  }
  .tabs {
    padding: 0 18px;
  }
  .tab {
    height: 50px;
    font-size: 14px;
  }
  .toolbar {
    padding-left: 24px;
    padding-right: 24px;
  }
  .sheet {
    width: 500px;
  }
  .list,
  .orders,
  .order-list-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .order:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
}

@media (min-width: 1180px) {
  .list,
  .orders,
  .order-list-mode {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .order {
    border-right: 1px solid var(--line);
  }
  .order:nth-child(3n) {
    border-right: 0;
  }
  .title,
  .toolbar {
    padding-left: 28px;
    padding-right: 28px;
  }
  .tabs {
    padding-left: 22px;
    padding-right: 22px;
  }
}