.extra-modal-flex {
  display: flex;
  min-width: 600px;
  min-height: 420px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.extra-preset-col {
  background: white;
  padding: var(--px-24) 0 var(--px-24) 0;
  display: flex;
  flex-direction: column;
  gap: var(--px-16);
  align-items: stretch;
  min-width: 160px;
  border-right: 1px solid var(--bs-border-color);
}

.extra-preset-col .extra-preset-btn {
  background: #fff;
  border: 1.5px solid var(--bs-border-color);
  border-radius: var(--px-8);
  font: normal normal 600 var(--s-20);
  color: var(--bs-text);
  padding: var(--px-12) 0;
  margin: 0 var(--px-16);
  cursor: pointer;
  transition:
    border 0.2s,
    background 0.2s;
}

.extra-preset-btn:hover,
.extra-preset-btn.selected {
  border-color: var(--bs-main);
  background: var(--bs-main-50, #ecfdf3);
  color: var(--bs-main);
}

.extra-keypad-col {
  flex: 1;
  padding: 32px 32px 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.extra-price-switch-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--px-12);
  position: relative;
}

.extra-price-type {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--px-8);
  border-radius: var(--px-12);
  padding: var(--px-16);
  font: normal normal 600 var(--s-14);
  color: var(--bs-text);
  background: var(--bs-surface-bg);
  transition:
    border 0.2s,
    background 0.2s;
  cursor: pointer;
  border: 1px solid var(--bs-border-color);
}

.extra-price-type.active {
  border: 2px solid var(--bs-main);
  background: var(--bs-main-50, #ecfdf3);
  color: var(--bs-text);
}

.extra-price-swap {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--px-28);
  height: var(--px-28);
  border-radius: 50%;
  background: var(--bs-surface-bg);
  border: 1px solid var(--bs-border-color);
  color: var(--bs-text-muted);
  font-size: 12px;
  z-index: 1;
  pointer-events: none;
}

.extra-price-icon img {
  vertical-align: middle;
}

.extra-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.extra-price-label {
  font: normal normal 600 var(--s-11);
  letter-spacing: 0.04em;
  color: var(--bs-text-muted);
  margin: 0;
}

.extra-price-value {
  font: normal normal 700 var(--s-16);
  color: var(--bs-heading-color);
  margin: 0;
}

.extra-amount-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--px-4);
  margin-bottom: var(--px-12);
}

.extra-amount-label {
  font: normal normal 600 var(--s-11);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-text-muted);
}

.extra-keypad-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
}

.extra-keypad-amount {
  font-size: 2rem;
  color: #f59e0b;
  font-weight: 700;
  margin-bottom: 12px;
}

.extra-keypad-grid {
  display: grid;
  grid-auto-rows: 72px;
  gap: var(--px-12);
  grid-template-columns: repeat(3, 1fr);
}

.extra-keypad-grid .extra-key-btn {
  width: 124px;
  height: 64px;
  border: 1.5px solid var(--bs-border-color);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: normal normal 600 var(--s-24);
  color: var(--bs-text);
  transition: all 0.2s;
}

.extra-keypad-grid .extra-key-btn:hover,
.extra-keypad-grid .extra-key-btn:active {
  border-color: var(--qs-cash-btn-hover-border);
  background: var(--qs-cash-btn-hover-border);
  color: var(--bs-main);
}

.extra-keypad-grid .extra-key-btn--clear,
.extra-keypad-grid .extra-key-btn--clear:hover,
.extra-keypad-grid .extra-key-btn--clear:active {
  background: #fee2e2;
  border-color: #fecaca;
  color: #ef4444;
}

.extra-card-fee-info {
  margin-top: var(--px-12);
  font: normal normal 400 var(--s-14);
  color: var(--bs-text-muted);
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--px-6);
}

.extra-card-fee-icon {
  display: inline-flex;
  color: #3b82f6;
}

.extra-card-fee-info .card-fee-info-text {
  font: normal normal 400 var(--s-15);
}

.extra-apply-btn {
  margin-top: var(--px-16);
  width: 100%;
  background: var(--bs-main);
  color: #fff;
  font: normal normal 700 var(--s-18);
  border-radius: var(--px-8);
  padding: var(--px-12) 0;
  border: none;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s;
}

.extra-apply-btn:disabled {
  background: var(--bs-main-100);
  color: #fff;
  cursor: not-allowed;
}

.extra-modal-heading {
  display: flex;
  align-items: center;
  gap: var(--px-8);
  min-width: 0;
}

.extra-modal-heading .modal-title {
  margin: 0;
  font: normal normal 700 var(--s-18);
  color: var(--bs-heading-color);
}

.extra-modal-heading-icon {
  display: inline-flex;
  color: var(--bs-main);
  flex-shrink: 0;
}

#extraPrice .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-8);
  border-bottom: 0;
  background: #fff;
}

#extraPrice .modal-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  background: #fff;
}

#extraPrice .extra-modal-container.extra-modal-flex {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  height: 100%;
  border-radius: 0;
}

/* extra item service — layout handled in quickSale.css grid */

/* open item */
#openItem .modal-content,
#quickSaleDiscount .modal-content,
#quickSaleCoupon .modal-content,
#extraPrice .modal-content,
#quickSaleTip .modal-content {
  border-radius: var(--px-24);
  border: none;
}

/* Tip modal – make it look like a single "app modal" card */
#quickSaleTip .modal-dialog {
  max-width: 840px;
  width: calc(100vw - 2rem);
  margin-left: auto;
  margin-right: auto;
}

#quickSaleTip .modal-content {
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1024px) {
  #quickSaleTip .modal-dialog {
    max-width: 1000px;
  }
}

#quickSaleTip .modal-body {
  padding: 0;
}

#quickSaleRedeem .modal-dialog {
  max-width: 28rem;
}

#quickSaleRedeem .modal-content {
  border-radius: var(--px-24);
  border: none;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#quickSaleRedeem .modal-header {
  display: none;
}

#quickSaleRedeem .modal-body.redeem-modal-body {
  min-height: unset;
  height: auto;
  flex: none;
  overflow: hidden;
  padding: 0;
  border-radius: var(--px-24);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-modal-container {
  height: auto;
  background: #ffffff;
  overflow: hidden;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9ca3af;
  transition: background-color 0.2s ease;
  padding: 0;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-close-btn:hover {
  background: #e5e7eb;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-close-btn svg {
  width: 20px;
  height: 20px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-summary {
  padding: 0 16px 16px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-reward-card {
  background-color: #f8f5ff;
  border: 1px solid #e9e1ff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-points-number {
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1;
  color: #9333ea;
  margin-bottom: 4px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-points-label {
  color: #a855f7;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-points-usd {
  color: #d8b4fe;
  font-weight: 500;
  font-size: 14px;
  margin-top: 2px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-reward-details {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-initials {
  color: #1f2937;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-tier-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-tier-text {
  color: #f97316;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-star {
  width: 16px;
  height: 16px;
  color: #fb923c;
  fill: currentColor;
  flex-shrink: 0;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 34px 24px 32px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-btn {
  border: 2px solid #3b82f6;
  background: #ffffff;
  color: #2563eb;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.05em;
  padding: 12px 48px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-btn:hover:not(:disabled) {
  background: #eff6ff;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-btn:disabled,
#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-btn--disabled {
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  background: #ffffff;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-warning {
  margin: 0 16px 16px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-warning-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-warning-text {
  margin: 0;
  font-size: 13px;
  color: #b45309;
  line-height: 1.5;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-progress {
  margin: 0 16px 16px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-progress-track {
  width: 100%;
  background: #e5e7eb;
  border-radius: 9999px;
  height: 12px;
  overflow: hidden;
}

#quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #7c3aed 0%, #8b5cf6 100%);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 640px) {
  #quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-points-number {
    font-size: 2.75rem;
  }

  #quickSaleRedeem .modal-body.redeem-modal-body .redeem-v2-btn {
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Open Item in the category strip is a cate-box card — see quickSale.css */

.sidebar-content .txt-item-default {
  font: normal normal 500 var(--s-13);
  color: var(--bs-text);
}

.item_input {
  display: flex;
  flex-flow: row;
  align-content: center;
  align-items: center;
  width: 94%;
  height: 33px;
  opacity: 1;
  margin: var(--px-12) var(--px-16);
}

.item_input .item_input_title {
  color: rgb(80, 80, 80);
  font: normal normal 500 var(--s-13);
  text-align: left;
}

.item_input input {
  z-index: 100;
  margin-left: var(--px-20);
  width: 100%;
  height: 30px;
  text-align: left;
  font: normal normal 500 var(--s-13);
  letter-spacing: 0px;
  color: var(--bs-text-muted);
  opacity: 1;
  border-top: unset;
  border-right: unset;
  border-left: unset;
  border-image: unset;
  border-bottom: 1px solid var(--bs-border-color);
  padding: var(--px-20) 0;
}

.item_input input:focus {
  border: none;
  outline: none;
}

.body_open_item {
  margin: var(--px-12) 0;
  display: flex;
  align-items: flex-start;
  flex-direction: row;
  background: white;
  width: 100%;
}

.body_open_item .leftAreaPriceContent {
  flex: 1;
  gap: 12px;
  height: 100% !important;
  padding-right: 0 !important;
  margin: var(--px-8) var(--px-16);
  max-width: 30%;
  margin-bottom: 0 !important;
  justify-content: flex-start !important;
  display: flex;
  flex-flow: column;
  place-content: flex-start space-around;
  align-items: flex-start;
  border-right: 1px solid;
}

.body_open_item .leftAreaPriceContent .txtCustomPriceBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--px-200);
  color: #444;
  font: normal normal 600 var(--s-16);
  letter-spacing: 0.07px;
  height: var(--px-80);
  justify-content: center;
  gap: 4px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 2px 6px;
  border-radius: 4px;
  background: 0% 0% no-repeat padding-box padding-box rgb(255, 255, 255);
  text-transform: uppercase;
  cursor: pointer;
}

.body_open_item .leftAreaPriceContent .btnCustom-selected {
  background: var(--bs-main-50);
  border: 2px solid var(--bs-main-400) !important;
}

.body_open_item .leftAreaPriceContent .btnCustom-selected .data-Change-Custom {
  color: var(--bs-text);
}

.btnCustom-ProductCharge {
  width: 248px;
  height: 75px;
  background: 0% 0% no-repeat padding-box padding-box rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 2px 6px;
  border: 1px solid rgb(167, 167, 167);
  border-radius: 4px;
  opacity: 1;
}

.btnCustom-Price {
  width: 248px;
  height: 100px;
  background: 0% 0% no-repeat padding-box padding-box rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 2px 6px;
  border: 1px solid rgb(167, 167, 167);
  border-radius: 4px;
  opacity: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btnCustom-Duration {
  width: 248px;
  height: 75px;
  background: 0% 0% no-repeat padding-box padding-box rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 2px 6px;
  border: 1px solid rgb(167, 167, 167);
  border-radius: 4px;
  opacity: 1;
}

.btnCustom-Turn {
  width: 248px;
  height: 75px;
  background: 0% 0% no-repeat padding-box padding-box rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 2px 6px;
  border: 1px solid rgb(167, 167, 167);
  border-radius: 4px;
  opacity: 1;
}

.body_open_item .rightAreaPriceContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--px-24);
  padding: 4px 0 !important;
  margin: 0 !important;
  gap: 4px !important;
  max-width: calc(100% - 40%);
  position: relative;
}

.body_open_item .rightAreaPriceContent .dualprice-open-item {
  display: flex;
  width: 100%;
  gap: var(--px-8);
}

.body_open_item .rightAreaPriceContent .dualprice-open-item .dualprice-box {
  flex: 1;
  display: grid;
  padding: var(--px-12) 4px;
  align-items: center;
  border-radius: 4px;
  grid-template-columns: max-content 1fr;
  grid-gap: 0 var(--px-8);
  cursor: pointer;
  border: 1.5px solid var(--bs-border-strong);
  min-width: var(--px-160);
}

.body_open_item .rightAreaPriceContent .dualprice-open-item .dualprice-box.active {
  border: 1px solid var(--bs-main-400);
  background: var(--bs-main-50);
}

.body_open_item .rightAreaPriceContent .dualprice-open-item .dualprice-box .price-label {
  color: #2e2e2e;
  text-align: center;
  font: normal normal 600 var(--s-16);
  line-height: 20px;
  width: 100%;
}

.body_open_item .rightAreaPriceContent .dualprice-open-item .dualprice-box .price-value {
  grid-column: span 2;
  color: #5c5c5c;
  font: normal normal 700 var(--s-20);
  text-align: center;
  line-height: 24px;
}

.body_open_item .rightAreaPriceContent .dualprice-open-item .dualprice-arrow {
  flex: 1;
  max-width: var(--px-24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--px-20);
}

.body_open_item .rightAreaPriceContent .customPrice_area {
  text-align: center;
  padding: 0;
  gap: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  justify-items: center;
  margin: var(--px-12) 0;
  align-self: center;
  width: 100%;
}

.body_open_item .rightAreaPriceContent .dualprice-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: 0px;
  background: 0px center;
  width: max-content;
  margin: auto;
}

.body_open_item .rightAreaPriceContent .dualprice-notice i {
  font-size: var(--px-16);
}

.body_open_item .rightAreaPriceContent .dualprice-notice span {
  color: #2e2e2e;
  font: normal normal 400 var(--s-14);
  line-height: 16px;
  text-transform: unset !important;
}

.body_open_item .rightAreaPriceContent .dualprice-notice .card-fee-present .lbl-card-fee {
  color: #2e2e2e;
  font-family: Montserrat;
  font-size: 15px !important;
  font-style: italic;
  line-height: 16px;
  text-transform: unset !important;
  font-weight: 500;
  text-align: left;
}

.body_open_item .rightAreaPriceContent .dualprice-notice .card-fee-present .lbl-card-fee strong {
  font: normal normal 600 var(--s-14);
  color: #000000;
}

.openitem-modal-container .footer_open_item {
  width: 100%;
  display: flex;
  background: white;
  align-items: center;
  justify-content: center;
  flex: 1 1 0%;
  padding: var(--px-16) 0;
}

.openitem-modal-container .footer_open_item .btnCustomP_add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  height: 50px;
  background: 0% 0% no-repeat padding-box padding-box var(--bs-main);
  border-radius: 4px;
  opacity: 1;
  color: #fff;
}

.openitem-modal-container .footer_open_item .btnCustomP_add:hover {
  transform: scale(1.1);
}

/* ✅ SERVICE MENU ICON HOVER EFFECT */
.card-header .service-menu-icon {
  cursor: pointer;
  padding: var(--px-4);
  border-radius: var(--px-4);
  transition: all 0.2s ease;
}

.card-header .service-menu-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

.card-header .service-menu-icon:active {
  background-color: rgba(0, 0, 0, 0.1);
  transform: scale(0.95);
}

.swal2-service-description {
  border-radius: var(--px-12) !important;
  padding: var(--px-16) !important;
}

.swal2-title-left {
  text-align: left !important;
  padding: 0 !important;
}

.swal2-html-left {
  text-align: left !important;
  padding: 0 !important;
  margin: 0 !important;
}

.swal2-service-description .swal2-icon {
  margin: var(--px-16) 0 !important;
}

.swal2-service-description .swal2-actions {
  margin-top: var(--px-20) !important;
  gap: var(--px-20) !important;
}

.swal2-service-description button {
  padding: var(--px-12) var(--px-24) !important;
  border-radius: var(--px-8) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

.swal2-confirm-custom {
  display: flex !important;
}

.swal-service-title {
  text-align: left;
}

.swal-service-name {
  margin: 0;
  font: normal normal 600 var(--s-18);
  color: var(--bs-text);
}

.swal-service-meta {
  font: normal normal 400 var(--s-14);
  color: var(--bs-text-muted);
  gap: var(--px-4);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.swal-service-content {
  text-align: left;
}

.swal-service-heading {
  font: normal normal 600 var(--s-14);
  color: var(--bs-text);
}

.swal-service-description {
  margin: 0;
  font: normal normal 400 var(--s-14);
  line-height: 1.6;
  color: var(--bs-text-muted);
}

/* Apply Coupon: shared voucher entry dialog for desktop and mobile. */
#quickSaleCoupon .modal-dialog {
  width: 392px;
  max-width: calc(100% - 32px);
  margin-right: auto;
  margin-left: auto;
}

#quickSaleCoupon .modal-content {
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid #e5ebf2;
  border-radius: 20px;
  background: #fff;
  color: #243044;
  box-shadow: 0 20px 60px rgb(16 24 40 / 18%);
}

#quickSaleCoupon .modal-header {
  flex: 0 0 auto;
  align-items: flex-start;
  padding: 24px 20px 12px;
  border: 0;
}

#quickSaleCoupon .modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: #243044;
}

#quickSaleCoupon .cpn-subtitle {
  display: block;
  margin: 2px 0 0;
  color: #8b9db8;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

#quickSaleCoupon .redeem-close-btn {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  margin: -2px 0 0 8px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: #f4f7fa;
  color: #8b9db8;
}

#quickSaleCoupon .redeem-close-icon {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

#quickSaleCoupon .modal-body {
  min-height: 0;
  padding: 0 20px 16px;
  overflow-y: auto;
}

#quickSaleCoupon .coupon-modal-container {
  height: auto;
  background: #fff;
}

#quickSaleCoupon .cpn-overflow-wrapper {
  flex: none;
  overflow: visible;
}

#quickSaleCoupon .cpn-content-padding {
  padding: 0;
}

#quickSaleCoupon .cpn-tab-switcher {
  height: 40px;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 14px;
  background: #f4f7fa;
}

#quickSaleCoupon .cpn-tab-btn {
  gap: 8px;
  min-height: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  color: #71839e;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

#quickSaleCoupon .cpn-tab-btn.cpn-tab-active {
  background: #fff;
  color: #243044;
  box-shadow: 0 1px 3px rgb(16 24 40 / 6%);
}

#quickSaleCoupon .cpn-tab-icon {
  width: 14px;
  height: 14px;
}

#quickSaleCoupon .cpn-tab-active .cpn-tab-icon {
  color: #009c74;
}

#quickSaleCoupon .cpn-input-wrapper {
  position: relative;
  margin-bottom: 14px;
}

#quickSaleCoupon .cpn-code-input {
  height: 86px;
  padding: 16px 48px 16px 64px;
  border: 2px solid #e5ecf4;
  border-radius: 14px;
  background: #fbfcfe;
  box-shadow: inset 0 1px 3px rgb(16 24 40 / 4%);
  color: #243044;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
}

#quickSaleCoupon .cpn-code-input::placeholder {
  color: #cbd6e5;
  font-weight: 700;
  letter-spacing: 2px;
}

#quickSaleCoupon .cpn-code-input:focus {
  border-color: #009c74;
  box-shadow: 0 0 0 3px rgb(0 156 116 / 10%);
}

#quickSaleCoupon .cpn-input-icon,
#quickSaleCoupon .cpn-input-clear {
  position: absolute;
  top: 27px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
}

#quickSaleCoupon .cpn-input-icon {
  left: 16px;
  background: #edf1f7;
  color: #8b9db8;
  pointer-events: none;
}

#quickSaleCoupon .cpn-input-clear {
  right: 14px;
  background: transparent;
  color: #c1cfe1;
}

#quickSaleCoupon .cpn-input-icon svg,
#quickSaleCoupon .cpn-input-clear svg,
#quickSaleCoupon .cpn-key svg {
  width: 16px;
  height: 16px;
}

#quickSaleCoupon .cpn-hint-text {
  display: none;
}

#quickSaleCoupon .cpn-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

#quickSaleCoupon .cpn-key {
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: #f4f7fa;
  color: #243044;
  font-size: 16px;
  font-weight: 600;
}

#quickSaleCoupon .cpn-key-clear {
  font-size: 12px;
}

#quickSaleCoupon .cpn-key:hover,
#quickSaleCoupon .cpn-input-clear:hover,
#quickSaleCoupon .redeem-close-btn:hover {
  background: #e9eef5;
  color: #243044;
}

#quickSaleCoupon .cpn-key:active {
  background: #dfe8f1;
}

#quickSaleCoupon .cpn-footer-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  border: 0;
}

#quickSaleCoupon .cpn-cancel-btn,
#quickSaleCoupon .cpn-apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

#quickSaleCoupon .cpn-cancel-btn {
  border: 1px solid #e5ecf4;
  background: #fff;
  color: #41526d;
}

#quickSaleCoupon .cpn-apply-btn {
  border: 0;
  background: #009c74;
  color: #fff;
  box-shadow: 0 2px 4px rgb(0 156 116 / 20%);
}

#quickSaleCoupon .cpn-apply-btn::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -3px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

#quickSaleCoupon .cpn-apply-btn:disabled {
  background: #009c74;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
}

#quickSaleCoupon .cpn-apply-btn:hover:not(:disabled) {
  background: #008563;
  transform: none;
}

#quickSaleCoupon button:focus-visible {
  outline: 2px solid #009c74;
  outline-offset: 2px;
}

@media (max-width: 359.98px) {
  #quickSaleCoupon .cpn-code-input {
    padding-right: 36px;
    padding-left: 48px;
    font-size: 16px;
    letter-spacing: 1px;
  }

  #quickSaleCoupon .cpn-code-input::placeholder {
    letter-spacing: 1px;
  }

  #quickSaleCoupon .cpn-input-icon {
    left: 8px;
  }

  #quickSaleCoupon .cpn-input-clear {
    right: 4px;
  }
}

/* ===== TICKET MODAL (Stitch redesign) ===== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

.close-ticket-modal .modal-content {
  background: transparent;
  border: none;
  box-shadow: none;
}

.close-ticket-modal .modal-dialog {
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
  margin: 16px auto;
}

.close-ticket-modal .modal-body.ticket-receipt-container {
  padding: 0;
  background: transparent;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  overflow-x: hidden;
}

.ticket-receipt-container {
  width: 100%;
  font-family: "Inter", sans-serif;
  color: #0b1c30;
}

@media (max-width: 768px) {
  .close-ticket-modal .modal-dialog {
    max-width: calc(100vw - 16px);
    margin: 8px auto;
  }

  .close-ticket-modal .modal-body.ticket-receipt-container {
    max-height: calc(100vh - 24px);
  }
}

.ticket-receipt-container .tr-icon {
  display: block;
  flex-shrink: 0;
}

.ticket-receipt-container .tr-icon-status {
  width: 20px;
  height: 20px;
}

.ticket-receipt-container .tr-icon-inline {
  width: 16px;
  height: 16px;
}

.ticket-receipt-container .tr-icon-btn {
  width: 18px;
  height: 18px;
}

.ticket-receipt-container .tr-receipt-card {
  background: #ffffff;
  border: 1px solid rgba(194, 198, 214, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 88, 190, 0.08);
  animation: tr-receipt-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tr-receipt-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ticket-receipt-container .tr-receipt-header {
  padding: 32px 32px 16px;
  text-align: center;
}

.ticket-receipt-container .tr-receipt-logo {
  margin-bottom: 16px;
}

.ticket-receipt-container .tr-receipt-logo img {
  max-width: 120px;
  height: auto;
}

.ticket-receipt-container .tr-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #6cf8bb;
  color: #00714d;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ticket-receipt-container .tr-store-info {
  margin-top: 16px;
}

.ticket-receipt-container .tr-store-name {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #0b1c30;
}

.ticket-receipt-container .tr-store-contact {
  margin-top: 8px;
}

.ticket-receipt-container .tr-contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: #424754;
}

.ticket-receipt-container .tr-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 16px 32px;
  background: rgba(239, 244, 255, 0.5);
}

.ticket-receipt-container .tr-meta-right {
  text-align: right;
}

.ticket-receipt-container .tr-meta-label {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #727785;
}

.ticket-receipt-container .tr-meta-value {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #0b1c30;
}

.ticket-receipt-container .tr-status-paid {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #006c49;
}

.ticket-receipt-container .tr-status-badge-open {
  background: #fef3c7;
  color: #92400e;
}

/* Illustration "done" ở đầu receipt Close Ticket: animation Lottie
   /lottie/close-ticket-success.json do CustomQuickSale.playReceiptSuccessAnimation vẽ
   vào — cùng animation và kích thước với "Payment complete" của PDA
   (#lottie-animation-success). Khung rỗng (lottie chưa nạp được) thì không chiếm chỗ. */
.ticket-receipt-container .tr-receipt-header:has(.tr-success-illustration) {
  padding-top: 16px;
}

.ticket-receipt-container .tr-success-illustration {
  width: 140px;
  height: 140px;
  margin: 0 auto;
}

.ticket-receipt-container .tr-success-illustration:empty {
  display: none;
}

.ticket-receipt-container .tr-status-open {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #b45309;
}

.ticket-receipt-container .tr-summary-outstanding span:last-child {
  color: #b45309;
  font-weight: 700;
}

/* Revert Trans selection modal (Swal) */
.rtm-swal-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #0b1c30 !important;
}

.rtm-swal-body {
  text-align: left !important;
  padding: 0 !important;
}

.rtm-desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 20px;
  color: #424754;
}

.rtm-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.rtm-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  cursor: pointer;
  margin: 0;
}

.rtm-item:hover {
  background: var(--bs-body-bg);
}

.rtm-check {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.rtm-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rtm-amount {
  font-size: 16px;
  font-weight: 700;
  color: #0b1c30;
}

.rtm-meta {
  font-size: 12px;
  line-height: 16px;
  color: #727785;
  word-break: break-all;
}

.rtm-footer {
  display: flex;
  gap: 10px;
  padding: 16px 0 24px;
  margin-top: 8px;
}

.rtm-cancel-btn,
.rtm-confirm-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.rtm-cancel-btn {
  background: #f1f5f9;
  color: #334155;
}

.rtm-confirm-btn {
  background: #0b1c30;
  color: #fff;
}

.ticket-receipt-container .tr-items-section {
  padding: 24px 32px;
}

.ticket-receipt-container .tr-items-table-head,
.ticket-receipt-container .tr-item-row {
  display: grid;
  grid-template-columns: 8fr 1fr 3fr;
  gap: 8px;
  align-items: start;
}

.ticket-receipt-container .tr-items-table-head {
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #c2c6d6;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #727785;
}

.ticket-receipt-container .tr-col-qty {
  text-align: center;
  padding-top: 4px;
  font-size: 14px;
  line-height: 20px;
}

.ticket-receipt-container .tr-col-amt {
  text-align: right;
  padding-top: 4px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.ticket-receipt-container .tr-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticket-receipt-container .tr-item-row {
  transition: transform 0.2s ease;
}

.ticket-receipt-container .tr-item-row:hover {
  transform: translateX(4px);
}

.ticket-receipt-container .tr-item-name {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0b1c30;
}

.ticket-receipt-container .tr-item-tech {
  margin: 0;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  color: #424754;
}

.ticket-receipt-container .tr-item-extra {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 14px;
  color: #424754;
}

.ticket-receipt-container .tr-items-empty {
  text-align: center;
  padding: 20px;
  color: #727785;
  font-size: 14px;
}

.ticket-receipt-container .tr-summary-section {
  padding: 24px 32px;
  background: rgba(248, 249, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-receipt-container .tr-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  line-height: 20px;
  color: #424754;
}

.ticket-receipt-container .tr-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px dashed #c2c6d6;
}

.ticket-receipt-container .tr-total-row > span:first-child {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0b1c30;
}

.ticket-receipt-container .tr-total-row > span:last-child {
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0058be;
}

.ticket-receipt-container .tr-footer-message {
  padding: 0 32px 24px;
  text-align: center;
}

.ticket-receipt-container .tr-footer-box {
  background: #e5eeff;
  border-radius: 8px;
  padding: 12px 16px;
}

.ticket-receipt-container .tr-footer-box p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  font-style: italic;
  color: #0058be;
}

/* ========================================================================
   Close bill — thanh nút nổi (port từ AVOSystem site-2.css
   .group-btn-left-side-popup). Nằm cạnh .tr-receipt-card, fixed dưới đáy
   màn hình; nút Exit (.btn-close-popover) treo bên phải thanh.
   z-index phải thấp hơn .tr-photo-viewer / .tr-camera (1080).
   ======================================================================== */
.close-ticket-modal {
  --tr-bar-h: calc(var(--px-48) + 8px);
  --tr-bar-gap: var(--px-16);
}

/* Card được kéo dài thêm ở đáy đúng bằng chiều cao thanh nút: cuộn tới cuối thì
   thanh nằm gọn TRONG vùng trắng đó (vẫn ở trên form), không che chữ nào. */
.close-ticket-modal .tr-receipt-card {
  padding-bottom: calc(var(--tr-bar-h) + 2 * var(--tr-bar-gap));
}

.close-ticket-modal .group-btn-left-side-popup {
  /* sticky trong .ticket-receipt-container (vùng scroll): dính đáy vùng nhìn thấy,
     đè lên receipt kèm shadow khi còn nội dung bên dưới. margin-top âm kéo thanh
     lên vào vùng padding-bottom của card, nên lúc cuộn hết nó nằm trên form. */
  position: sticky;
  bottom: var(--tr-bar-gap);
  z-index: 5;
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: fit-content;
  max-width: calc(100% - var(--px-16));
  margin: calc(-1 * (var(--tr-bar-h) + var(--tr-bar-gap))) auto 0;
  /* Exit treo bên phải thanh → dịch thanh sang trái nửa bề rộng Exit để cả cụm cân giữa. */
  translate: calc(-1 * var(--px-32)) 0;
  padding: 4px;
  border-radius: var(--px-32);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 0;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.28),
    0 2px 6px rgba(15, 23, 42, 0.16);
}

.close-ticket-modal .group-btn-left-side-popup .btn-left-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: unset;
  height: var(--px-48);
  width: 100%;
  min-width: var(--px-72);
  max-width: max-content;
  padding: 0 8px;
  border-radius: var(--px-24);
  border: 0;
  background: #ffffff;
  box-shadow: none !important;
  font-family: "Inter", sans-serif;
  font-size: var(--px-12);
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-ticket-modal .group-btn-left-side-popup .btn-left-side:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.close-ticket-modal .group-btn-left-side-popup .btn-left-side p {
  margin: 0;
  font-size: var(--px-12);
  line-height: 1;
  white-space: nowrap;
  color: #64748b;
}

.close-ticket-modal .group-btn-left-side-popup .btn-left-side:hover p {
  color: #0f172a;
}

.close-ticket-modal .group-btn-left-side-popup .btn-close-popover {
  position: absolute;
  left: unset;
  top: 0;
  right: calc(-1 * var(--px-64));
  bottom: auto;
  width: auto;
  min-width: var(--px-56);
  max-width: var(--px-56);
  height: var(--px-56);
  padding: 0;
  border-radius: var(--px-16);
  /* Treo ngoài thanh nút, ngay trên nền form: nền đặc theo màu theme (token
     --pos-primary-fill, đổi theo theme sáng/tối) + bóng như thanh để nổi khỏi form.
     Fallback đỏ khi không có theme. !important vì .btn-left-side tắt shadow. */
  background: var(--pos-primary-fill, #ef4444);
  border: 0;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.28),
    0 2px 6px rgba(15, 23, 42, 0.16) !important;
}

.close-ticket-modal .group-btn-left-side-popup .btn-close-popover:hover {
  background: var(--pos-primary-fill-hover, #dc2626);
}

.close-ticket-modal .group-btn-left-side-popup .btn-close-popover i {
  color: var(--pos-primary-fill-ink, #ffffff);
  font-size: 20px;
  font-weight: 300;
}

.close-ticket-modal .group-btn-left-side-popup .btn-close-popover .tr-icon-exit {
  width: 20px;
  height: 20px;
  color: var(--pos-primary-fill-ink, #ffffff);
}

@media (max-width: 768px) {
  #closeTicket.close-ticket-modal {
    --tr-bar-h: 56px;
    --tr-bar-gap: 12px;
  }

  #closeTicket.close-ticket-modal .modal-dialog {
    margin-top: calc(8px + env(safe-area-inset-top, 0px));
    margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  /* Keep the floating toolbar inside the receipt's frame. The card scrolls
     beneath it and reserves space at the end for the total and footer message. */
  #closeTicket.close-ticket-modal .modal-body.ticket-receipt-container {
    display: flex;
    flex-direction: column;
    min-height: 0 !important;
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  #closeTicket.close-ticket-modal .tr-receipt-card {
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: calc(var(--tr-bar-h) + 2 * var(--tr-bar-gap));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .close-ticket-modal .group-btn-left-side-popup {
    translate: none;
    border-radius: var(--px-24);
  }

  #closeTicket.close-ticket-modal .group-btn-left-side-popup {
    position: absolute;
    bottom: var(--tr-bar-gap);
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    margin: 0;
  }

  .close-ticket-modal .group-btn-left-side-popup .btn-left-side {
    min-width: var(--px-64);
    padding: 0 4px;
  }

  /* Màn hẹp không đủ chỗ treo bên phải: Exit vào chung thanh. */
  .close-ticket-modal .group-btn-left-side-popup .btn-close-popover {
    position: unset;
    min-width: var(--px-48);
    max-width: var(--px-48);
    height: var(--px-48);
    border-radius: var(--px-24);
  }

  #closeTicket.close-ticket-modal .group-btn-left-side-popup .tr-add-photos-wrap,
  #closeTicket.close-ticket-modal .group-btn-left-side-popup > .btn-left-side {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }

  #closeTicket.close-ticket-modal .group-btn-left-side-popup .btn-left-side {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 48px;
    min-height: 48px;
  }

  #closeTicket.close-ticket-modal .group-btn-left-side-popup .btn-left-side p {
    font-size: 10px;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }
}

/* ========================================================================
   Send Receipt. client.css gắn min-height: 600px lên mọi .modal-body (và
   ở <=768px còn flex: 1, padding, nền xám với !important). Ba dialog này
   chỉ có tiêu đề + nút nên phải co theo nội dung.
   ======================================================================== */
#sendReceiptMethodModal .modal-dialog,
#sendReceiptSMSModal .modal-dialog,
#sendReceiptEmailModal .modal-dialog {
  width: min(400px, calc(100% - 32px));
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Ngay trên thanh .group-btn-left-side-popup (sticky đáy, cao --px-48 + 8px,
   cách đáy --px-16), chừa thêm 12px giữa popup và thanh. */
#sendReceiptMethodModal .modal-dialog {
  align-items: flex-end;
  padding-bottom: calc(var(--px-48, 48px) + 32px + var(--px-16, 16px) + 12px);
}

#sendReceiptMethodModal .modal-content {
  width: 100%;
}

#sendReceiptMethodModal .modal-content,
#sendReceiptSMSModal .modal-content,
#sendReceiptEmailModal .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px -16px rgba(11, 28, 48, 0.35);
}

#sendReceiptMethodModal .modal-header,
#sendReceiptSMSModal .modal-header,
#sendReceiptEmailModal .modal-header {
  justify-content: center;
  border-bottom: 0;
  padding: 20px 20px 0;
}

#sendReceiptMethodModal .modal-title,
#sendReceiptSMSModal .modal-title,
#sendReceiptEmailModal .modal-title {
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

#sendReceiptMethodModal .modal-body,
#sendReceiptSMSModal .modal-body,
#sendReceiptEmailModal .modal-body {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 16px 20px 20px !important;
  background: #ffffff !important;
}

#sendReceiptMethodModal .modal-body > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#sendReceiptMethodModal .modal-body .btn,
#sendReceiptSMSModal .modal-body .btn,
#sendReceiptEmailModal .modal-body .btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

#sendReceiptMethodModal .modal-body .btn {
  width: 100%;
}

@media (max-width: 768px) {
  #sendReceiptMethodModal .modal-dialog,
  #sendReceiptSMSModal .modal-dialog,
  #sendReceiptEmailModal .modal-dialog {
    width: calc(100% - 32px);
  }

  #sendReceiptMethodModal .modal-header,
  #sendReceiptSMSModal .modal-header,
  #sendReceiptEmailModal .modal-header {
    padding: 18px 16px 0;
  }

  #sendReceiptMethodModal .modal-body,
  #sendReceiptSMSModal .modal-body,
  #sendReceiptEmailModal .modal-body {
    padding: 14px 16px 16px !important;
  }
}

/* ========================================================================
   Close bill — ảnh ticket
   .tr-add-photos: nút đầu thanh Send Receipt / Print / Edit / Exit.
   .tr-photos-grid: lưới kiểu bài đăng Facebook, bố cục theo data-count
   (1 · 2 · 3 · 4 · 5+; quá 5 thì ô thứ 5 phủ "+N").
   .tr-photo-viewer / .tr-camera: overlay gắn trong #closeTicket.
   ======================================================================== */
.ticket-receipt-container .tr-photos {
  padding: 0 32px 20px;
}

.ticket-receipt-container .tr-photos[hidden] {
  display: none;
}

.ticket-receipt-container .tr-photos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #424754;
}

.ticket-receipt-container .tr-photos-count {
  font-weight: 500;
  color: #727785;
  letter-spacing: 0;
}

/* Kích thước do lưới quyết định (aspect-ratio của cả lưới + track fr), ô chỉ
   lấp đầy vùng của nó. Không đặt aspect-ratio lên ô: grid item có tỉ lệ riêng
   sẽ không stretch theo track mà co về kích thước ảnh. */
.ticket-receipt-container .tr-photos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 3px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
}

.ticket-receipt-container .tr-photo-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #eef1f6;
  overflow: hidden;
  cursor: zoom-in;
  display: block;
}

.ticket-receipt-container .tr-photo-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease-out;
}

.ticket-receipt-container .tr-photo-cell:hover img {
  transform: scale(1.03);
}

.ticket-receipt-container .tr-photo-cell:focus-visible {
  outline: 2px solid var(--bs-main);
  outline-offset: -2px;
}

/* 1 ảnh: một ảnh ngang to (mặc định ở trên). */

/* 2 ảnh: hai ảnh đứng cạnh nhau. */
.ticket-receipt-container .tr-photos-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  aspect-ratio: 3 / 2;
}

/* 3 ảnh: 1 ảnh to bên trái, 2 ảnh xếp chồng bên phải. */
.ticket-receipt-container .tr-photos-grid[data-count="3"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  aspect-ratio: 3 / 2;
}

.ticket-receipt-container .tr-photos-grid[data-count="3"] .tr-photo-cell:first-child {
  grid-row: 1 / -1;
}

/* 4 ảnh: lưới 2x2, mỗi ảnh chiếm đúng 1/4. */
.ticket-receipt-container .tr-photos-grid[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  aspect-ratio: 1 / 1;
}

/* 5+ ảnh: 2 ảnh trên, 3 ảnh dưới; ảnh thứ 5 phủ "+N" nếu còn nữa. */
.ticket-receipt-container .tr-photos-grid[data-count="5"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: minmax(0, 3fr) minmax(0, 2fr);
  aspect-ratio: 1 / 1;
}

.ticket-receipt-container .tr-photos-grid[data-count="5"] .tr-photo-cell:nth-child(-n + 2) {
  grid-column: span 3;
}

.ticket-receipt-container .tr-photos-grid[data-count="5"] .tr-photo-cell:nth-child(n + 3) {
  grid-column: span 2;
}

.ticket-receipt-container .tr-photo-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 28, 48, 0.55);
  color: #ffffff;
  font-size: 26px;
  line-height: 32px;
  font-weight: 600;
  pointer-events: none;
}

/* Máy tính: lưới trải hết bề ngang card (~494px) là quá to so với receipt nên
   thu còn 260px, căn giữa. Chiều cao giảm theo vì lưới dùng aspect-ratio. */
@media (min-width: 769px) {
  .ticket-receipt-container .tr-photos-grid {
    max-width: 260px;
    margin: 0 auto;
    border-radius: 8px;
  }

  .ticket-receipt-container .tr-photo-more {
    font-size: 18px;
    line-height: 24px;
  }
}

.ticket-receipt-container .tr-photo-cell.is-uploading {
  cursor: progress;
}

.ticket-receipt-container .tr-photo-cell.is-uploading img {
  opacity: 0.45;
}

.ticket-receipt-container .tr-photo-cell.is-uploading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 2px solid rgba(0, 88, 190, 0.2);
  border-top-color: #0058be;
  animation: trPhotoSpin 0.8s linear infinite;
}

@keyframes trPhotoSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Nút Add Photos trên thanh nút nổi; menu chọn nguồn ảnh bật lên phía trên. */
.ticket-receipt-container .tr-add-photos-wrap {
  position: relative;
  display: flex;
}

/* Icon máy ảnh dùng màu chủ đạo để nút Add Photos nổi hơn 3 nút còn lại. */
.ticket-receipt-container .tr-add-photos .tr-icon {
  color: var(--bs-main, #3a9821);
}

.ticket-receipt-container .tr-btn-send .tr-icon {
  color: #3b82f6;
}

.ticket-receipt-container .tr-btn-print .tr-icon {
  color: #8b5cf6;
}

.ticket-receipt-container .tr-btn-edit .tr-icon {
  color: #f59e0b;
}

.ticket-receipt-container .tr-add-photos:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ticket-receipt-container .tr-add-photos:disabled:hover {
  background: #f1f5f9;
}

.ticket-receipt-container .tr-add-photos:disabled:hover p {
  color: #64748b;
}

.ticket-receipt-container .tr-add-photos:focus-visible,
.ticket-receipt-container .tr-add-menu-item:focus-visible {
  outline: 2px solid var(--bs-main);
  outline-offset: 2px;
}

.ticket-receipt-container .tr-add-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 256px;
  max-width: calc(100vw - 32px);
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid #c2c6d6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 24px -8px rgba(11, 28, 48, 0.18);
}

.ticket-receipt-container .tr-add-menu[hidden] {
  display: none;
}

.ticket-receipt-container .tr-add-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 80px;
  padding: 12px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: #424754;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.ticket-receipt-container .tr-add-menu-item:hover {
  border-color: var(--bs-main, #3a9821);
  background: #f1f5f9;
}

.ticket-receipt-container .tr-add-menu-item .tr-icon {
  width: 24px;
  height: 24px;
  color: var(--bs-main, #3a9821);
}

/* Xem ảnh lớn. Bố cục cột: thanh trên · ảnh · dải thumbnail.
   Back ở góc trái, menu 3 chấm ở góc phải chứa Download / Remove.
   Máy tính: mũi tên hai bên (+ lăn chuột). Điện thoại (<= 768px): ẩn mũi tên,
   vuốt ngang để chuyển ảnh. */
.close-ticket-modal .tr-photo-viewer,
.close-ticket-modal .tr-camera {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 14, 24, 0.92);
  animation: trOverlayIn 0.15s ease-out;
}

.close-ticket-modal .tr-photo-viewer {
  --tr-viewer-top: 64px;
  --tr-viewer-strip: 92px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  font-family: "Inter", sans-serif;
}

.close-ticket-modal .tr-photo-viewer.is-single {
  --tr-viewer-strip: 16px;
}

/* Các nút/khối trong viewer đặt display riêng nên phải ép lại cho [hidden]. */
.close-ticket-modal .tr-photo-viewer [hidden] {
  display: none !important;
}

.close-ticket-modal .tr-viewer-top {
  position: relative;
  z-index: 2;
  flex: 0 0 var(--tr-viewer-top);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.close-ticket-modal .tr-viewer-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.close-ticket-modal .tr-viewer-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease-out;
}

.close-ticket-modal .tr-viewer-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.close-ticket-modal .tr-viewer-btn:focus-visible,
.close-ticket-modal .tr-viewer-thumb:focus-visible,
.close-ticket-modal .tr-camera-btn:focus-visible,
.close-ticket-modal .tr-camera-shutter:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.close-ticket-modal .tr-viewer-counter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  pointer-events: none;
}

.close-ticket-modal .tr-viewer-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 72px;
}

.close-ticket-modal .tr-viewer-img {
  display: block;
  flex: 0 0 auto;
  max-width: calc(100vw - 144px);
  max-height: calc(100vh - var(--tr-viewer-top) - var(--tr-viewer-strip) - 16px);
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}

.close-ticket-modal .tr-viewer-prev,
.close-ticket-modal .tr-viewer-next {
  position: absolute;
  top: 50%;
  margin-top: -22px;
}

.close-ticket-modal .tr-viewer-prev {
  left: 12px;
}

.close-ticket-modal .tr-viewer-next {
  right: 12px;
}

/* Dải thumbnail: ảnh đang xem to hơn + viền xanh. Căn giữa bằng margin auto ở
   hai đầu (justify-content: center sẽ cắt mất phần tràn bên trái khi cuộn). */
.close-ticket-modal .tr-viewer-strip {
  position: relative;
  flex: 0 0 var(--tr-viewer-strip);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.close-ticket-modal .tr-viewer-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #1c2533;
  overflow: hidden;
  opacity: 0.5;
  cursor: pointer;
  transition:
    opacity 0.15s ease-out,
    width 0.15s ease-out;
}

.close-ticket-modal .tr-viewer-thumb:first-child {
  margin-left: auto;
}

.close-ticket-modal .tr-viewer-thumb:last-child {
  margin-right: auto;
}

.close-ticket-modal .tr-viewer-thumb img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

.close-ticket-modal .tr-viewer-thumb:hover {
  opacity: 0.85;
}

.close-ticket-modal .tr-viewer-thumb.is-active {
  width: 80px;
  border-color: #3b82f6;
  opacity: 1;
}

.close-ticket-modal .tr-photo-viewer.is-single .tr-viewer-prev,
.close-ticket-modal .tr-photo-viewer.is-single .tr-viewer-next,
.close-ticket-modal .tr-photo-viewer.is-single .tr-viewer-thumb {
  display: none;
}

/* Menu 3 chấm (chỉ điện thoại). */
.close-ticket-modal .tr-viewer-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 188px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.5);
}

.close-ticket-modal .tr-viewer-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #1f2937;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.close-ticket-modal .tr-viewer-menu-item:hover,
.close-ticket-modal .tr-viewer-menu-item:focus-visible {
  background: #eef1f6;
  outline: none;
}

.close-ticket-modal .tr-viewer-menu-item.is-danger {
  color: #dc2626;
}

/* Hộp xác nhận xoá + thông báo lỗi nằm trong viewer (Swal bị viewer che). */
.close-ticket-modal .tr-viewer-confirm {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 14, 24, 0.6);
}

.close-ticket-modal .tr-viewer-confirm-box {
  width: min(340px, 100%);
  padding: 20px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
}

.close-ticket-modal .tr-viewer-confirm-title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  color: #0b1c30;
}

.close-ticket-modal .tr-viewer-confirm-text {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 19px;
  color: #5b6272;
}

.close-ticket-modal .tr-viewer-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.close-ticket-modal .tr-viewer-confirm-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #c2c6d6;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: #424754;
  cursor: pointer;
}

.close-ticket-modal .tr-viewer-confirm-btn:hover:not(:disabled) {
  background: #eef1f6;
}

.close-ticket-modal .tr-viewer-confirm-btn.is-danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.close-ticket-modal .tr-viewer-confirm-btn.is-danger:hover:not(:disabled) {
  border-color: #b91c1c;
  background: #b91c1c;
}

.close-ticket-modal .tr-viewer-confirm-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.close-ticket-modal .tr-viewer-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.close-ticket-modal .tr-viewer-toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tr-viewer-strip) + 16px);
  z-index: 2;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: #b91c1c;
  text-align: center;
}

@media (max-width: 768px) {
  .close-ticket-modal .tr-photo-viewer {
    --tr-viewer-top: 56px;
    --tr-viewer-strip: 84px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #000000;
  }

  .close-ticket-modal .tr-viewer-top {
    padding: 0 4px;
  }

  .close-ticket-modal .tr-viewer-back,
  .close-ticket-modal .tr-viewer-more {
    background: transparent;
  }

  .close-ticket-modal .tr-viewer-prev,
  .close-ticket-modal .tr-viewer-next {
    display: none;
  }

  .close-ticket-modal .tr-viewer-counter {
    position: static;
    transform: none;
    margin-left: 4px;
    font-size: 15px;
    line-height: 20px;
  }

  .close-ticket-modal .tr-viewer-stage {
    padding: 0;
  }

  .close-ticket-modal .tr-viewer-img {
    max-width: 100vw;
    max-height: calc(100vh - var(--tr-viewer-top) - var(--tr-viewer-strip));
    max-height: calc(
      100dvh - var(--tr-viewer-top) - var(--tr-viewer-strip) - env(safe-area-inset-bottom, 0px)
    );
    border-radius: 0;
  }

  .close-ticket-modal .tr-viewer-strip {
    scrollbar-width: none;
  }

  .close-ticket-modal .tr-viewer-strip::-webkit-scrollbar {
    display: none;
  }

  .close-ticket-modal .tr-viewer-confirm-btn {
    flex: 1 1 0;
    min-height: 44px;
  }
}

/* Chụp bằng webcam (chỉ máy tính; điện thoại dùng camera của OS). */
.close-ticket-modal .tr-camera {
  padding: 16px;
}

.close-ticket-modal .tr-camera-panel {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.close-ticket-modal .tr-camera-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: calc(100vh - 140px);
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
}

.close-ticket-modal .tr-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.close-ticket-modal .tr-camera-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  text-align: center;
}

.close-ticket-modal .tr-camera-status[hidden] {
  display: none;
}

.close-ticket-modal .tr-camera.is-flash .tr-camera-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  pointer-events: none;
  animation: trCameraFlash 0.25s ease-out forwards;
}

.close-ticket-modal .tr-camera-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.close-ticket-modal .tr-camera-btn {
  justify-self: start;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.close-ticket-modal .tr-camera-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.close-ticket-modal .tr-camera-done {
  justify-self: end;
  background: var(--bs-main);
  border-color: var(--bs-main);
}

.close-ticket-modal .tr-camera-done:hover:not(:disabled) {
  background: var(--bs-main-hover);
}

.close-ticket-modal .tr-camera-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.close-ticket-modal .tr-camera-shutter {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 3px #0b1c30;
  cursor: pointer;
  transition: transform 0.1s ease-out;
}

.close-ticket-modal .tr-camera-shutter:active:not(:disabled) {
  transform: scale(0.92);
}

.close-ticket-modal .tr-camera-shutter:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@keyframes trOverlayIn {
  from {
    opacity: 0;
  }
}

@keyframes trCameraFlash {
  from {
    opacity: 0.8;
  }
  to {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticket-receipt-container .tr-photo-cell img,
  .close-ticket-modal .tr-viewer-thumb,
  .close-ticket-modal .tr-camera-shutter {
    transition: none;
  }

  .close-ticket-modal .tr-photo-viewer,
  .close-ticket-modal .tr-camera,
  .close-ticket-modal .tr-camera.is-flash .tr-camera-stage::after {
    animation: none;
  }
}

/* ========================================================================
   Extra modal — mobile
   Desktop keeps the left preset column + right keypad. The inner shell is
   min-width: 600px, so on a phone the chips and 124px keys overflow.
   Stack to match the compact Extra card: chips → cash/card → amount → pad → ADD.
   ======================================================================== */
@media (max-width: 767.98px) {
  #extraPrice .modal-dialog {
    max-width: min(400px, calc(100vw - 24px));
    width: calc(100vw - 24px);
    margin: 12px auto;
  }

  #extraPrice .modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 24px);
  }

  #extraPrice .modal-content {
    border-radius: 20px;
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #extraPrice .modal-header {
    flex-shrink: 0;
    padding: 14px 16px 4px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  #extraPrice .modal-body {
    flex: 1 1 auto;
    min-height: 0 !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 !important;
    background: #fff !important;
  }

  #extraPrice .extra-modal-container.extra-modal-flex,
  #extraPrice .extra-modal-flex {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100%;
    height: 100%;
    width: 100%;
    gap: 12px;
    overflow: visible;
    border-radius: 0;
    background: #fff;
    padding: 8px 16px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }

  #extraPrice .extra-preset-col {
    flex-direction: row;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
    padding: 0;
    gap: 6px;
    border-right: 0;
    align-items: stretch;
  }

  #extraPrice .extra-preset-col .extra-preset-btn {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    font: normal normal 600 var(--s-13);
    background: var(--bs-surface-bg);
    color: var(--bs-text);
  }

  #extraPrice .extra-keypad-col {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    gap: 12px;
  }

  #extraPrice .extra-price-switch-row {
    gap: 10px;
  }

  #extraPrice .extra-price-type {
    padding: 12px 8px;
    border-radius: 14px;
    gap: 6px;
    background: var(--bs-surface-bg);
  }

  #extraPrice .extra-price-type.active {
    border-width: 2px;
    background: var(--bs-main-50, #ecfdf3);
  }

  #extraPrice .extra-price-swap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  }

  #extraPrice .extra-keypad-main {
    width: 100%;
    margin-top: 0;
    align-items: stretch;
    gap: 0;
  }

  #extraPrice .extra-amount-block {
    margin-bottom: 10px;
  }

  #extraPrice .extra-keypad-amount {
    font: normal normal 700 var(--s-28);
    color: #f59e0b;
    margin-bottom: 0;
  }

  #extraPrice .extra-keypad-grid {
    width: 100%;
    gap: 8px;
    grid-auto-rows: unset;
  }

  #extraPrice .extra-keypad-grid .extra-key-btn {
    width: 100%;
    height: 52px;
    min-height: 52px;
    border-radius: 14px;
    font: normal normal 600 var(--s-20);
    background: var(--bs-surface-bg);
    color: var(--bs-heading-color);
    box-shadow: none;
  }

  #extraPrice .extra-keypad-grid .extra-key-btn--clear,
  #extraPrice .extra-keypad-grid .extra-key-btn--clear:hover,
  #extraPrice .extra-keypad-grid .extra-key-btn--clear:active {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
  }

  #extraPrice .extra-card-fee-info {
    margin-top: 10px;
    justify-content: center;
    font: normal normal 400 var(--s-13);
  }

  #extraPrice .extra-apply-btn {
    margin-top: 12px;
    height: 48px;
    min-height: 48px;
    border-radius: 12px;
    font: normal normal 700 var(--s-16);
    letter-spacing: 0.06em;
    background: var(--bs-main);
    color: #fff;
  }

  #extraPrice .extra-apply-btn:disabled {
    background: var(--bs-main-100);
    color: #fff;
  }

  #extraPrice .extra-apply-btn::before,
  #extraPrice .extra-key-btn::before,
  #extraPrice .extra-preset-btn::before {
    content: none;
    display: none;
  }
}

@media (max-width: 767.98px) and (max-height: 700px) {
  #extraPrice .extra-keypad-grid .extra-key-btn {
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  #extraPrice .extra-preset-col .extra-preset-btn {
    height: 32px;
  }

  #extraPrice .extra-price-type {
    padding: 8px 6px;
  }

  #extraPrice .extra-keypad-amount {
    font: normal normal 700 var(--s-24);
  }
}

/* ========================================================================
   Discount item modal
   client.css forces .modal-body { min-height: 600px; overflow-y: auto } and
   on phones padding + overflow !important. Cancel / Apply live inside that
   body, so the keypad pushes them off-screen. Pin the footer, compact the
   pad so a phone can tap Apply without scrolling.
   ======================================================================== */
#quickSaleDiscount {
  --qs-discount-radius: 8px;
}

#quickSaleDiscount .modal-dialog {
  max-width: 28rem;
}

#quickSaleDiscount .modal-content {
  display: flex;
  flex-direction: column;
  border-radius: var(--qs-discount-radius);
  overflow: hidden;
  max-height: calc(100dvh - 32px);
}

#quickSaleDiscount .modal-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
}

#quickSaleDiscount .discount-modal-container {
  display: flex;
  flex-direction: column;
  border-radius: var(--qs-discount-radius);
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-shadow: none;
  animation: none;
  background: #fff;
}

#quickSaleDiscount .discount-header-section {
  flex-shrink: 0;
  padding: 16px 16px 4px;
  border-bottom: 0;
  border-radius: 0;
  background: #fff;
}

#quickSaleDiscount .discount-header-top {
  margin-bottom: 0;
  align-items: flex-start;
  gap: 8px;
}

#quickSaleDiscount .discount-main-title {
  margin: 0;
  padding-right: 4px;
  font: normal normal 700 var(--s-16);
  line-height: 1.35;
  color: var(--bs-heading-color);
}

#quickSaleDiscount .discount-close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--bs-muted-bg, #f3f4f6);
  color: var(--bs-text-muted, #6b7280);
}

#quickSaleDiscount .discount-close-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

#quickSaleDiscount .discount-body-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 8px 16px 0;
  background: #fff;
}

#quickSaleDiscount .discount-body-section--loading {
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

#quickSaleDiscount .discount-content-stack {
  flex: 1 1 auto;
  min-height: 0;
  gap: 10px;
}

#quickSaleDiscount .dsc-provider-group,
#quickSaleDiscount .discount-toggle-wrapper,
#quickSaleDiscount .discount-summary-grid,
#quickSaleDiscount .input_discount {
  flex-shrink: 0;
}

#quickSaleDiscount .dsc-provider-label {
  font: normal normal 500 var(--s-13);
  color: var(--bs-text-muted, #6b7280);
}

#quickSaleDiscount .dsc-provider-segmented-control {
  padding: 4px;
  background: var(--bs-body-bg, #f3f4f6);
  border-radius: 14px;
}

#quickSaleDiscount .dsc-provider-tab {
  height: auto;
  min-height: 40px;
  padding: 8px 4px;
  border-radius: 12px;
  font: normal normal 600 var(--s-14);
  color: var(--bs-text-muted, #6b7280);
  background: transparent;
}

#quickSaleDiscount .dsc-provider-tab--active {
  background: #fff;
  color: var(--bs-heading-color);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

#quickSaleDiscount .discount-toggle-wrapper {
  gap: 10px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

#quickSaleDiscount .discount-toggle-btn {
  height: auto;
  min-height: 42px;
  padding: 10px 8px;
  border: 1.5px solid var(--bs-border-color, #e5e7eb);
  border-radius: 14px;
  background: #fff;
  color: var(--bs-text-muted, #6b7280);
  font: normal normal 600 var(--s-14);
  box-shadow: none;
}

#quickSaleDiscount .discount-toggle-btn.discount-toggle-active {
  border-color: var(--bs-main);
  background: #fff;
  color: var(--bs-main);
  box-shadow: none;
}

#quickSaleDiscount .discount-summary-grid {
  gap: 10px;
}

#quickSaleDiscount .discount-summary-card {
  padding: 10px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--bs-border-color, #e5e7eb);
  background: var(--bs-body-bg, #f8fafc);
}

#quickSaleDiscount .discount-summary-card.active {
  background: var(--bs-main-50, #ecfdf3);
  border-color: var(--bs-main-200, #a7f3d0);
}

#quickSaleDiscount .discount-summary-label {
  margin-bottom: 2px;
  font: normal normal 700 10px/1.2 inherit;
  letter-spacing: 0.06em;
}

#quickSaleDiscount .discount-summary-value {
  font: normal normal 700 var(--s-18);
  line-height: 1.25;
}

#quickSaleDiscount .discount-summary-value .txt_val_display {
  font: normal normal 500 var(--s-13);
}

#quickSaleDiscount .input_discount {
  padding: 4px 0;
  border: 0;
  font: normal normal 700 32px/1.1 inherit;
  color: var(--bs-heading-color);
}

#quickSaleDiscount .discount-keypad-grid {
  flex: 1 1 auto;
  min-height: 0;
  gap: 8px;
  align-content: stretch;
  grid-template-rows: repeat(5, minmax(0, 52px));
}

#quickSaleDiscount .discount-key-btn {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-shrink: 1;
  padding: 0;
  border-radius: 14px;
  background: var(--bs-muted-bg, #f3f4f6);
  color: var(--bs-heading-color);
  font: normal normal 600 var(--s-20);
  box-shadow: none;
}

#quickSaleDiscount .discount-backspace-btn,
#quickSaleDiscount .discount-clear-btn {
  background: var(--bs-muted-bg, #f3f4f6);
  color: var(--bs-heading-color);
  font: normal normal 600 var(--s-15);
}

#quickSaleDiscount .discount-backspace-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

#quickSaleDiscount .discount-footer-section {
  flex-shrink: 0;
  gap: 10px;
  padding: 12px 16px 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: #fff;
}

#quickSaleDiscount .discount-cancel-btn,
#quickSaleDiscount .discount-apply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  font: normal normal 600 var(--s-15);
  box-shadow: none;
  white-space: nowrap;
}

#quickSaleDiscount .discount-cancel-btn {
  background: #fff;
  color: var(--bs-text, #374151);
}

#quickSaleDiscount .discount-key-btn,
#quickSaleDiscount .discount-cancel-btn {
  border: 1.5px solid var(--bs-border-color, #e5e7eb);
}

#quickSaleDiscount .discount-apply-btn {
  background: var(--bs-main);
  color: #fff;
  border: 0;
}

#quickSaleDiscount .discount-apply-btn:hover:not(:disabled) {
  background: var(--bs-main-hover, #059669);
}

#quickSaleDiscount .discount-apply-btn:disabled {
  background: var(--bs-main);
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

#quickSaleDiscount .discount-apply-btn::after {
  content: "✓";
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  order: -1;
}

#quickSaleDiscount .discount-apply-btn::before,
#quickSaleDiscount .discount-cancel-btn::before,
#quickSaleDiscount .discount-key-btn::before,
#quickSaleDiscount .discount-toggle-btn::before,
#quickSaleDiscount .dsc-provider-tab::before,
#quickSaleDiscount .discount-close-btn::before {
  content: none;
  display: none;
}

@media (max-width: 767.98px) {
  #quickSaleDiscount .modal-dialog {
    max-width: min(400px, calc(100vw - 24px));
    width: calc(100vw - 24px);
    margin: 12px auto;
  }

  #quickSaleDiscount .modal-dialog.modal-dialog-centered {
    min-height: calc(100% - 24px);
  }

  #quickSaleDiscount .modal-content {
    border-radius: var(--qs-discount-radius);
    height: min(max-content, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
  }

  #quickSaleDiscount .discount-header-section {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }

  #quickSaleDiscount .input_discount {
    font-size: 28px;
  }
}

@media (max-width: 767.98px) and (max-height: 700px) {
  #quickSaleDiscount .dsc-provider-tab {
    min-height: 36px;
  }

  #quickSaleDiscount .discount-toggle-btn {
    min-height: 38px;
    padding: 8px;
  }

  #quickSaleDiscount .discount-summary-card {
    padding: 8px 6px;
  }

  #quickSaleDiscount .input_discount {
    font-size: 24px;
    padding: 0;
  }

  #quickSaleDiscount .discount-key-btn {
    border-radius: 12px;
    font-size: 18px;
  }

  #quickSaleDiscount .discount-content-stack {
    gap: 8px;
  }
}

/* Bill discount: compact layout from Apply all bill.html. */
#quickSaleDiscount.qs-bill-discount-modal {
  --bill-ink: #16261a;
  --bill-muted: #4e6153;
  --bill-ghost: #9aa99d;
  --bill-line: #e0e8dd;
  --bill-soft: #f4f7f2;
  --bill-green: #3a9821;
  --bill-danger: #c2303f;
}

#quickSaleDiscount.qs-bill-discount-modal .modal-dialog {
  width: calc(100% - 24px);
  max-width: 400px;
  margin: 12px auto;
  min-height: calc(100% - 24px);
}

#quickSaleDiscount.qs-bill-discount-modal .modal-content {
  border: 1px solid var(--bill-line);
  border-radius: 12px;
  max-height: calc(100dvh - 24px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .35);
}

#quickSaleDiscount .qs-bill-discount {
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: var(--bill-ink);
  background: #fff;
  font: 14px/1.4 "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}

#quickSaleDiscount .qs-bill-discount :where(button) {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: initial;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  box-shadow: none;
  font: inherit;
  cursor: pointer;
  transform: none;
  transition: background .08s, transform .08s;
}

#quickSaleDiscount .qs-bill-discount button::before,
#quickSaleDiscount .qs-bill-discount button::after { content: none; }
#quickSaleDiscount .qs-bill-discount button:focus-visible { outline: 2px solid var(--bill-green); outline-offset: 2px; }
#quickSaleDiscount .qs-bill-discount button:disabled { cursor: not-allowed; }
#quickSaleDiscount .qs-bill-discount__header { display: flex; flex-shrink: 0; align-items: flex-start; gap: 8px; padding: 12px 12px 0 16px; }
#quickSaleDiscount .qs-bill-discount__header h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--bill-ink); }
#quickSaleDiscount .qs-bill-discount__bills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1px; color: var(--bill-muted); font-size: 12.5px; }
#quickSaleDiscount .qs-bill-discount__bills b { color: var(--bill-ink); font-weight: 600; }
#quickSaleDiscount .qs-bill-discount__close { flex: 0 0 32px; width: 32px; height: 32px; margin-left: auto; color: var(--bill-muted); }
#quickSaleDiscount .qs-bill-discount__close:hover { background: var(--bill-soft); }
#quickSaleDiscount .qs-bill-discount__body { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 10px 16px 0; overflow-y: auto; }
#quickSaleDiscount .qs-bill-discount__body > * { flex-shrink: 0; }
#quickSaleDiscount .qs-bill-discount__controls { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 8px; }
#quickSaleDiscount .qs-bill-discount__label { margin-bottom: -4px; color: var(--bill-ghost); font-size: 12px; font-weight: 500; }
#quickSaleDiscount .qs-bill-discount__segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border: 1px solid var(--bill-line); border-radius: 8px; background: var(--bill-soft); }
#quickSaleDiscount .qs-bill-discount__segment button { height: 34px; border-radius: 5px; font-size: 13.5px; font-weight: 600; color: var(--bill-muted); white-space: nowrap; }
#quickSaleDiscount .qs-bill-discount__segment button[aria-checked="true"] { background: #fff; color: var(--bill-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--bill-line); }
#quickSaleDiscount .qs-bill-discount__type button { font-size: 16px; font-weight: 700; }
#quickSaleDiscount .qs-bill-discount__type button[aria-checked="true"] { background: var(--bill-green); color: #fff; box-shadow: none; }
/* Dual Price: chọn gõ discount `$` theo Cash hay Card. */
#quickSaleDiscount .qs-bill-discount__side { grid-auto-columns: auto; justify-content: start; gap: 2px; padding: 2px; margin-bottom: 3px; }
#quickSaleDiscount .qs-bill-discount__side button { height: 26px; padding: 0 12px; font-size: 12.5px; }
#quickSaleDiscount .qs-bill-discount__side[hidden],
#quickSaleDiscount .qs-bill-discount__input-label[hidden] { display: none; }
#quickSaleDiscount .qs-bill-discount__summary thead th.is-active { color: var(--bill-ink); font-weight: 700; }
#quickSaleDiscount .qs-bill-discount__presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
#quickSaleDiscount .qs-bill-discount__presets button { flex-direction: column; height: 46px; border: 1.5px solid var(--bill-line); border-radius: 8px; }
#quickSaleDiscount .qs-bill-discount__presets b { font-size: 15.5px; font-weight: 700; line-height: 1.1; }
#quickSaleDiscount .qs-bill-discount__presets small { font-size: 10.5px; color: var(--bill-ghost); }
#quickSaleDiscount .qs-bill-discount__presets button:hover { border-color: var(--bill-ghost); }
#quickSaleDiscount .qs-bill-discount__presets button[aria-pressed="true"] { border-color: var(--bill-green); background: #e6f3e0; }
#quickSaleDiscount .qs-bill-discount__presets button[aria-pressed="true"] small { color: #2f7e1a; }
#quickSaleDiscount .qs-bill-discount__presets button:disabled { opacity: .45; }
#quickSaleDiscount .qs-bill-discount__display { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 50px; padding: 4px 12px; border: 1.5px solid var(--bill-green); border-radius: 8px; }
#quickSaleDiscount .qs-bill-discount__hint { display: flex; flex-direction: column; font-size: 12px; line-height: 1.25; color: var(--bill-ghost); font-weight: 500; }
#quickSaleDiscount .qs-bill-discount__message.has-error { color: var(--bill-danger); font-size: 11.5px; font-weight: 600; }
#quickSaleDiscount .qs-bill-discount__value { text-align: right; font-size: 30px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
#quickSaleDiscount .qs-bill-discount__unit { font-size: 19px; font-weight: 600; color: var(--bill-muted); }
#quickSaleDiscount .qs-bill-discount__ghost { color: var(--bill-ghost); }
#quickSaleDiscount .qs-bill-discount__pad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, 46px); gap: 6px; }
#quickSaleDiscount .qs-bill-discount__pad button { width: 100%; height: 100%; background: #f2f5f0; font-size: 19px; font-weight: 600; user-select: none; }
#quickSaleDiscount .qs-bill-discount__pad button:hover { background: #e8eee5; }
#quickSaleDiscount .qs-bill-discount__pad button:active { background: #dce5d8; transform: scale(.97); }
#quickSaleDiscount .qs-bill-discount__pad .qs-bill-discount__back { grid-column: 4; grid-row: 1 / span 2; color: var(--bill-muted); }
#quickSaleDiscount .qs-bill-discount__back svg { width: 26px; height: 26px; }
#quickSaleDiscount .qs-bill-discount__pad .qs-bill-discount__clear { grid-column: 4; grid-row: 3 / span 2; background: #fff1e6; color: #c2410c; font-size: 15px; font-weight: 700; }
#quickSaleDiscount .qs-bill-discount__summary { border: 1px solid var(--bill-line); border-radius: 8px; overflow: hidden; }
#quickSaleDiscount .qs-bill-discount__summary table { width: 100%; border-collapse: collapse; }
#quickSaleDiscount .qs-bill-discount__summary th,
#quickSaleDiscount .qs-bill-discount__summary td { padding: 4px 12px; text-align: right; font-size: 13px; }
#quickSaleDiscount .qs-bill-discount__summary th:first-child { text-align: left; color: var(--bill-muted); font-weight: 500; }
#quickSaleDiscount .qs-bill-discount__summary thead th { padding-top: 5px; padding-bottom: 5px; background: var(--bill-soft); color: var(--bill-ghost); font-size: 11.5px; font-weight: 500; }
#quickSaleDiscount .qs-bill-discount__summary tr + tr > * { border-top: 1px solid var(--bill-line); }
#quickSaleDiscount .qs-bill-discount__deduction td { color: var(--bill-danger); font-weight: 600; }
#quickSaleDiscount .qs-bill-discount__summary .qs-bill-discount__total > * { font-size: 14px; color: var(--bill-ink); font-weight: 700; }
#quickSaleDiscount .qs-bill-discount__summary caption { caption-side: bottom; margin: 0; padding: 4px 12px; border-top: 1px solid var(--bill-line); font-size: 11.5px; color: var(--bill-ghost); text-align: left; }
#quickSaleDiscount .qs-bill-discount__footer { display: grid; flex: 0 0 auto; height: auto; max-height: none; grid-template-columns: 1fr 1.6fr; gap: 8px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border: 0; box-shadow: none; font: inherit; }
#quickSaleDiscount .qs-bill-discount__footer button { height: 46px; padding: 0 8px; font-size: 15px; font-weight: 700; }
#quickSaleDiscount .qs-bill-discount__cancel { border: 1px solid var(--bill-line); color: var(--bill-muted); }
#quickSaleDiscount .qs-bill-discount__cancel:hover { background: var(--bill-soft); }
#quickSaleDiscount .qs-bill-discount__apply { background: var(--bill-green); color: #fff; }
#quickSaleDiscount .qs-bill-discount__apply:hover { background: #2f7e1a; }
#quickSaleDiscount .qs-bill-discount__apply:disabled { background: #f2f5f0; color: var(--bill-ghost); }

@media (max-width: 440px) {
  #quickSaleDiscount .qs-bill-discount__presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #quickSaleDiscount .qs-bill-discount__presets button { height: 40px; }
}

@media (max-width: 360px) {
  #quickSaleDiscount .qs-bill-discount__controls { grid-template-columns: minmax(0, 1fr) 88px; gap: 6px; }
  #quickSaleDiscount .qs-bill-discount__segment { grid-auto-flow: initial; grid-template-columns: .8fr .85fr 1.35fr; gap: 2px; padding: 2px; }
  #quickSaleDiscount .qs-bill-discount__type { grid-template-columns: 1fr 1fr; }
  #quickSaleDiscount .qs-bill-discount__segment button { font-size: 11.5px; }
  #quickSaleDiscount .qs-bill-discount__type button { font-size: 16px; }
  #quickSaleDiscount .qs-bill-discount__footer button { font-size: 13px; }
}

/* Close Bill: Aivolit receipt, screen and 80mm paper views. */
#closeTicket .modal-dialog { width: calc(100% - 32px); max-width: 480px; }
#closeTicket .ticket-receipt-container {
  position: relative;
  min-height: 0 !important;
  max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  padding: 0 !important;
  border-radius: 14px;
  background: #eef0ec !important;
  font-family: Sora, sans-serif;
}
.tr-receipt-view-bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #dde2de;
  background: #eef0ec;
  font-size: 13px;
  font-weight: 700;
  color: #3f4a44;
}
.tr-receipt-view-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid #dde2de; border-radius: 12px; background: #fff; }
.tr-receipt-view-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #1b2620;
  font: 700 14px/1.3 Sora, sans-serif;
  cursor: pointer;
}
.tr-receipt-view-switch button.is-active { background: #1b2620; color: #fff; }
.tr-receipt-view-switch button:focus-visible { outline: 2px solid #2f6b3a; outline-offset: 2px; }
.ticket-receipt-container .tr-receipt-redesign {
  width: 100%;
  background: #fff;
  border: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: none;
  color: #1b2620;
  font-family: Sora, sans-serif;
  font-variant-numeric: tabular-nums;
}
.tr-receipt-redesign *, .tr-receipt-view-bar * { box-sizing: border-box; }
#closeTicket .tr-receipt-redesign { padding-bottom: calc(var(--tr-bar-h) + 2 * var(--tr-bar-gap)); }
.ticket-receipt-container .tr-receipt-redesign .tr-receipt-header { padding: 36px 32px 24px; }
.ticket-receipt-container .tr-receipt-redesign .tr-receipt-logo { margin: 0 0 16px; }
.ticket-receipt-container .tr-receipt-redesign .tr-receipt-logo img { max-width: 112px; max-height: 56px; object-fit: contain; }
.ticket-receipt-container .tr-receipt-redesign .tr-store-name { font-size: 22px; line-height: 1.4; font-weight: 800; letter-spacing: .04em; color: #1b2620; overflow-wrap: anywhere; }
.ticket-receipt-container .tr-receipt-redesign .tr-store-contact { margin-top: 10px; }
.ticket-receipt-container .tr-receipt-redesign .tr-contact-line { gap: 6px; margin-top: 4px; font-size: 13px; line-height: 1.5; color: #5b6560; }
.tr-receipt-redesign .tr-contact-line span { min-width: 0; overflow-wrap: anywhere; }
.tr-receipt-redesign .tr-contact-line .tr-icon { width: 14px; height: 14px; }
.tr-paid-summary { display: flex; flex-direction: column; gap: 12px; margin: 0 24px; padding: 20px 22px; border-radius: 16px; background: #eaf0e8; }
.tr-paid-summary-top, .tr-paid-summary-body { display: flex; justify-content: space-between; gap: 12px; }
.tr-paid-summary-top { align-items: center; flex-wrap: wrap; }
.tr-paid-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #2f6b3a; color: #fff; font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.tr-paid-badge .tr-icon { width: 14px; height: 14px; }
.tr-receipt-date { font-size: 12px; color: #3f4a44; }
.tr-paid-summary-body { align-items: flex-end; }
.tr-paid-label { display: block; font-size: 13px; line-height: 1.5; font-weight: 600; color: #3f4a44; }
.tr-paid-amount { display: block; font-size: 36px; line-height: 1.4; font-weight: 800; letter-spacing: -.02em; color: #2f6b3a; overflow-wrap: anywhere; }
.tr-paid-method { max-width: 45%; min-width: 0; text-align: right; }
.tr-paid-method strong { display: block; font-size: 16px; line-height: 1.5; font-weight: 700; overflow-wrap: anywhere; }
.ticket-receipt-container .tr-receipt-redesign .tr-meta-grid { margin: 0 24px; padding: 24px 8px; background: none; border: 0; border-bottom: 1px dashed #c9d0cb; border-radius: 0; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ticket-receipt-container .tr-receipt-redesign .tr-meta-label { margin: 0 0 3px; font-size: 11px; line-height: 1.5; font-weight: 700; letter-spacing: .08em; color: #5b6560; text-transform: uppercase; }
.ticket-receipt-container .tr-receipt-redesign .tr-meta-value { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 700; color: #1b2620; overflow-wrap: anywhere; }
.ticket-receipt-container .tr-receipt-redesign .tr-points-earned { color: #2f6b3a; }
.ticket-receipt-container .tr-receipt-redesign .tr-items-section { padding: 20px 32px 8px; }
.ticket-receipt-container .tr-receipt-redesign .tr-items-table-head,
.ticket-receipt-container .tr-receipt-redesign .tr-item-row { grid-template-columns: minmax(0, 1fr) 32px 88px; gap: 8px; }
.ticket-receipt-container .tr-receipt-redesign .tr-items-table-head { margin: 0; padding-bottom: 10px; border-color: #e3e7e4; font-size: 11px; line-height: 1.5; font-weight: 700; letter-spacing: .08em; color: #5b6560; }
.ticket-receipt-container .tr-receipt-redesign .tr-items-list { gap: 0; }
.ticket-receipt-container .tr-receipt-redesign .tr-item-row { padding: 14px 0; border-bottom: 1px solid #eef1ef; }
.ticket-receipt-container .tr-receipt-redesign .tr-item-row:hover { transform: none; }
.tr-receipt-redesign .tr-col-item { min-width: 0; }
.ticket-receipt-container .tr-receipt-redesign .tr-item-name { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 700; letter-spacing: 0; color: #1b2620; overflow-wrap: anywhere; }
.ticket-receipt-container .tr-receipt-redesign .tr-item-tech { margin: 3px 0 0; font-size: 12px; line-height: 1.5; font-weight: 400; color: #5b6560; overflow-wrap: anywhere; }
.ticket-receipt-container .tr-receipt-redesign .tr-col-qty,
.ticket-receipt-container .tr-receipt-redesign .tr-col-amt { padding-top: 1px; font-size: 14px; line-height: 1.5; font-weight: 700; white-space: nowrap; }
.ticket-receipt-container .tr-receipt-redesign .tr-items-table-head .tr-col-qty,
.ticket-receipt-container .tr-receipt-redesign .tr-items-table-head .tr-col-amt { padding-top: 0; font-size: inherit; }
.ticket-receipt-container .tr-receipt-redesign .tr-summary-section { margin: 20px 24px 0; padding: 20px 22px; border-radius: 16px; background: #f6f7f4; gap: 14px; }
.tr-receipt-redesign .tr-section-title { margin: 0; font-size: 11px; line-height: 1.5; font-weight: 700; letter-spacing: .08em; color: #5b6560; text-transform: uppercase; }
.ticket-receipt-container .tr-receipt-redesign .tr-summary-row { gap: 12px; align-items: baseline; font-size: 14px; line-height: 1.5; color: #1b2620; }
.tr-receipt-redesign .tr-summary-label { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.tr-receipt-redesign .tr-summary-label small { font-size: 12px; line-height: 1.4; font-weight: 400; color: #5b6560; }
.tr-receipt-redesign .tr-summary-value { flex: 0 0 auto; font-weight: 700; text-align: right; white-space: nowrap; }
.tr-receipt-redesign .tr-summary-value s { margin-right: 8px; color: #5b6560; font-size: 12px; font-weight: 400; }
.tr-receipt-redesign .tr-summary-discount .tr-summary-value,
.tr-receipt-redesign .tr-summary-tip .tr-summary-value { color: #2f6b3a; }
.tr-receipt-redesign .tr-price-note { margin: 0; font-size: 12px; line-height: 1.4; color: #5b6560; }
.tr-receipt-redesign .tr-summary-services-total { padding-top: 14px; border-top: 1px dashed #c9d0cb; }
.ticket-receipt-container .tr-receipt-redesign .tr-total-row { padding-top: 14px; margin: 0; gap: 12px; align-items: baseline; border-top: 1px solid #dde2de; }
.ticket-receipt-container .tr-receipt-redesign .tr-total-row > span:first-child { font-size: 16px; line-height: 1.5; font-weight: 800; color: #1b2620; letter-spacing: .02em; }
.ticket-receipt-container .tr-receipt-redesign .tr-total-row > span:last-child { font-size: 28px; line-height: 1.5; font-weight: 800; color: #2f6b3a; white-space: nowrap; }
.tr-receipt-redesign .tr-payment-section { display: flex; flex-direction: column; gap: 12px; margin: 16px 24px 0; padding: 18px 22px; border: 1px solid #dde2de; border-radius: 16px; }
.tr-receipt-redesign .tr-summary-outstanding { padding-top: 12px; border-top: 1px dashed #c9d0cb; font-weight: 800; }
.ticket-receipt-container .tr-receipt-redesign .tr-summary-outstanding span { color: #1b2620; }
.ticket-receipt-container .tr-receipt-redesign .tr-summary-outstanding.is-due span { color: #b45309; }
.tr-receipt-redesign .tr-savings { display: flex; align-items: flex-start; gap: 12px; margin: 16px 24px 0; padding: 14px 18px; border-radius: 14px; background: #eaf0e8; }
.tr-savings .tr-icon { width: 22px; height: 22px; color: #2f6b3a; }
.tr-savings p { min-width: 0; margin: 0; font-size: 13px; line-height: 1.45; }
.ticket-receipt-container .tr-receipt-redesign .tr-footer-message {
  position: static;
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-height: none !important;
  padding: 28px 32px 36px;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.ticket-receipt-container .tr-receipt-redesign .tr-footer-box { padding: 0; background: transparent; }
.ticket-receipt-container .tr-receipt-redesign .tr-footer-box p { font-size: 16px; line-height: 1.5; font-style: normal; font-weight: 700; color: #1b2620; white-space: pre-line; overflow-wrap: anywhere; }
.tr-receipt-redesign .tr-footer-box small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: #5b6560; overflow-wrap: anywhere; }
#closeTicket:has(.tr-receipt-redesign) .group-btn-left-side-popup .btn-left-side { font-family: Sora, sans-serif; color: #2f6b3a; }
#closeTicket:has(.tr-receipt-redesign) .group-btn-left-side-popup .btn-close-popover { color: #ef4444; }

/* The paper preview uses the same receipt values, with thermal-printer contrast. */
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] { width: 302px; max-width: 100%; margin-inline: auto; border-radius: 0; color: #000; }
.tr-receipt-redesign[data-receipt-view="thermal"] * { color: #000 !important; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-receipt-header { padding: 18px 15px 12px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-store-name { font-size: 18px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-receipt-logo { margin-bottom: 8px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-receipt-logo img { max-width: 88px; max-height: 40px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-contact-line { font-size: 12px; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-summary { margin: 0 15px; padding: 10px 12px; border: 2px solid #000; border-radius: 0; background: #fff; gap: 4px; text-align: center; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-summary-top,
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-summary-body { flex-direction: column; align-items: center; gap: 4px; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-badge { padding: 0; background: transparent; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-amount { font-size: 26px; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-method { max-width: none; text-align: center; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-method .tr-paid-label { display: none; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-paid-method strong { font-size: 12px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-meta-grid { display: flex; flex-direction: column; gap: 4px; margin: 0 15px; padding: 12px 0; border-color: #000; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-meta-grid > div { display: flex; justify-content: space-between; gap: 12px; text-align: right; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-meta-label { margin: 0; flex: 0 0 auto; font-size: 11px; letter-spacing: 0; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-meta-value { font-size: 12px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-items-section { padding: 12px 15px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-items-table-head,
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-item-row { grid-template-columns: minmax(0, 1fr) 24px 72px; gap: 6px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-item-row { padding: 10px 0; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-item-name { font-size: 13px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-item-tech { font-size: 11px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-col-amt,
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-col-qty { font-size: 12px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-summary-section,
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-payment-section { margin: 0 15px; padding: 12px 0; gap: 6px; background: #fff; border: 0; border-top: 1px dashed #000; border-radius: 0; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-summary-row { font-size: 12px; gap: 8px; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-summary-label small { font-size: 10px; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-summary-value s { display: block; margin-right: 0; font-size: 10px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-total-row { padding-top: 8px; border-top: 2px solid #000; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-total-row > span:first-child { font-size: 14px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-total-row > span:last-child { font-size: 22px; }
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-savings,
.tr-receipt-redesign[data-receipt-view="thermal"] .tr-photos { display: none !important; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-footer-message { padding: 14px 15px 24px; }
.ticket-receipt-container .tr-receipt-redesign[data-receipt-view="thermal"] .tr-footer-box p { font-size: 14px; }

@media (max-width: 768px) {
  #closeTicket .modal-dialog { width: calc(100% - 16px); max-width: 480px; }
  #closeTicket .ticket-receipt-container { max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  #closeTicket .tr-receipt-view-bar { position: relative; }
  #closeTicket .tr-receipt-redesign { overscroll-behavior: contain; }
}
@media (max-width: 400px) {
  .tr-receipt-view-bar { padding: 12px 16px; gap: 8px; }
  .tr-receipt-view-switch button { padding: 0 10px; font-size: 12px; }
  .ticket-receipt-container .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-receipt-header { padding: 28px 20px 20px; }
  .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-paid-summary { margin-inline: 16px; padding: 16px; }
  .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-paid-amount { font-size: 30px; }
  .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-paid-method strong { font-size: 14px; }
  .ticket-receipt-container .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-meta-grid { margin-inline: 16px; padding-inline: 4px; }
  .ticket-receipt-container .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-items-section { padding-inline: 20px; }
  .ticket-receipt-container .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-items-table-head,
  .ticket-receipt-container .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-item-row { grid-template-columns: minmax(0, 1fr) 24px 72px; gap: 6px; }
  .ticket-receipt-container .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-summary-section,
  .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-payment-section { margin-inline: 16px; padding: 16px; }
  .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-summary-value s { display: block; margin-right: 0; }
  .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-savings { margin-inline: 16px; padding: 14px; }
  .ticket-receipt-container .tr-receipt-redesign:not([data-receipt-view="thermal"]) .tr-total-row > span:last-child { font-size: 24px; }
}
@media print {
  .ticket-receipt-container .tr-receipt-redesign { animation: none; border-radius: 0; padding-bottom: 0 !important; }
  .tr-receipt-view-bar, .group-btn-left-side-popup { display: none !important; }
  .tr-receipt-redesign .tr-item-row { break-inside: avoid; }
  .tr-paid-summary, .tr-total-row, .tr-payment-section, .tr-footer-message { break-inside: avoid; }
}

/* Receipt view owns the full viewport: never pass backdrop clicks to Client. */
#closeTicket.close-ticket-modal.receipt-view-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto !important;
}
#closeTicket.receipt-view-overlay .modal-dialog {
  pointer-events: none;
}
#closeTicket.receipt-view-overlay .modal-content {
  pointer-events: auto;
}
