.loading-overlay{position:fixed;inset:0;z-index:var(--app-z-toast);display:grid;place-items:center;background:rgba(255,255,255,.72);color:var(--app-text);font-weight:900}
.empty-state{padding:32px 16px;text-align:center;color:var(--app-muted)}
.page-template[aria-busy="true"]{min-height:160px}
.toast-success{border-color:#86efac}
.toast-error{border-color:#fca5a5}
.toast-warning{border-color:#fcd34d}

/* Customer detail history tabs */
.customer-history-tabs{
  display:inline-flex;
  max-width:100%;
  gap:6px;
  margin-bottom:16px;
  padding:4px;
  overflow-x:auto;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f8fafc;
  scrollbar-width:thin;
}
.customer-history-tabs .customer-history-tab{
  display:inline-flex;
  flex:0 0 auto;
  height:38px!important;
  min-height:38px!important;
  align-items:center;
  justify-content:center;
  padding:0 17px;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#64748b!important;
  font-size:14px!important;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  transition:background-color .16s ease,color .16s ease,box-shadow .16s ease;
}
.customer-history-tabs .customer-history-tab:hover{
  background:#F9EBDD!important;
  color:var(--masta-primary-dark,#A84F12)!important;
}
.customer-history-tabs .customer-history-tab.active,
.customer-history-tabs .customer-history-tab[aria-selected="true"]{
  background:var(--masta-primary,#B95C1B)!important;
  color:#fff!important;
  box-shadow:0 2px 8px rgba(185, 92, 27,.18)!important;
}
.customer-history-tabs .customer-history-tab:focus-visible{
  outline:3px solid rgba(185, 92, 27,.22);
  outline-offset:2px;
}

/* Customer and coupon list actions */
.crm-list-table{
  table-layout:fixed;
}
.crm-list-table th{
  background:#f8fafc;
  color:#475569;
  font-weight:600;
  white-space:nowrap;
}
.crm-list-table .crm-primary-cell{
  min-width:180px;
}
.crm-list-table .crm-primary-cell strong{
  display:block;
  overflow:hidden;
  color:#172033;
  font-size:13px;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.crm-list-table .crm-primary-cell small{
  display:block;
  margin-top:3px;
  overflow:hidden;
  color:#8490a3;
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.crm-list-table .crm-text-link{
  display:block;
  color:inherit;
  text-decoration:none;
}
.crm-list-table .crm-text-link:hover strong,
.crm-list-table .crm-text-link:focus-visible strong{
  color:#b45309;
  text-decoration:underline;
  text-underline-offset:3px;
}
.crm-list-table .crm-action-column{
  width:112px;
  text-align:right;
}
.table-row-clickable{
  cursor:pointer;
  transition:background-color .16s ease;
}
.table-row-clickable:hover{
  background:#f8fafc;
}
.table-row-clickable:focus-visible{
  position:relative;
  outline:2px solid #7c8da8;
  outline-offset:-2px;
}
.table-actions-modern{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  margin:0;
  white-space:nowrap;
}
.table-action-primary{
  display:inline-flex;
  height:34px;
  min-height:34px;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border:1px solid #dbe2ea;
  border-radius:8px;
  background:#fff;
  color:#344054;
  font-size:12px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease;
}
.table-action-primary:hover{
  border-color:#c5ceda;
  background:#f4f6f8;
  color:#172033;
}
.table-action-primary:focus-visible,
.action-menu-toggle:focus-visible,
.action-menu-item:focus-visible{
  outline:2px solid #7c8da8;
  outline-offset:2px;
}
.action-menu-toggle{
  display:inline-grid;
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
  place-items:center;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#667085;
  font-size:20px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}
.action-menu-toggle:hover,
.action-menu-toggle[aria-expanded="true"]{
  background:#eef1f5;
  color:#172033;
}
.action-menu{
  position:fixed;
  z-index:var(--app-z-modal,1100);
  display:none;
  min-width:176px;
  padding:6px;
  border:1px solid #e4e8ee;
  border-radius:10px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.16);
}
.action-menu.open{
  display:block;
}
.action-menu-item{
  display:flex;
  width:100%;
  min-height:38px;
  align-items:center;
  gap:9px;
  padding:0 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#344054;
  font-size:12px;
  font-weight:600;
  text-align:left;
  cursor:pointer;
}
.action-menu-item:hover,
.action-menu-item[aria-selected="true"]{
  background:#f4f6f8;
  color:#172033;
}
.action-menu-item-icon{
  display:inline-grid;
  width:17px;
  place-items:center;
  color:#7a8699;
  font-size:15px;
}
.action-menu-separator{
  height:1px;
  margin:5px 4px;
  background:#edf0f3;
}
.action-menu-danger{
  color:#b42318;
}
.action-menu-danger .action-menu-item-icon{
  color:#d92d20;
}
.action-menu-danger:hover{
  background:#fff2f1;
  color:#912018;
}
.status-badge{
  display:inline-flex;
  min-height:24px;
  align-items:center;
  justify-content:center;
  padding:2px 9px;
  border:0;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  cursor:default;
  white-space:nowrap;
}
.status-badge-success{background:#eaf7ef;color:#247044}
.status-badge-neutral{background:#eef1f5;color:#596579}
.status-badge-warning{background:#fff5db;color:#8a6214}
.status-badge-danger{background:#fff0ef;color:#b42318}
.status-badge-info{background:#edf4ff;color:#365e9d}
.status-valid{background:#eaf7ef;color:#247044}
.status-warning{background:#fff5db;color:#8a6214}
.status-error{background:#fff0ef;color:#b42318}
.excel-import-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 16px;padding:0;list-style:none}
.excel-import-steps li{padding:9px 12px;border-radius:8px;background:#eef1f5;color:#596579;text-align:center;font-weight:700}
.excel-import-steps li.active{background:#edf4ff;color:#365e9d}
.excel-import-actions{justify-content:flex-start;flex-wrap:wrap}
.excel-import-result{margin-top:12px}
.excel-preview-toolbar,.excel-commit-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;flex-wrap:wrap}
.excel-preview-toolbar>div{display:flex;gap:6px;flex-wrap:wrap}
.excel-preview-table{max-height:45vh;overflow:auto}
.excel-preview-table thead{position:sticky;top:0;z-index:1;background:#fff}
.excel-preview-table details{min-width:180px;max-width:420px}
.excel-preview-table details ul{margin:8px 0 0;padding-left:18px;white-space:normal}
.excel-import-pagination{display:flex!important;justify-content:center;align-items:center;gap:6px;padding:12px}
.excel-import-pagination button,.excel-import-pagination span{min-width:32px;height:32px;border:1px solid #d7dde6;border-radius:6px;background:#fff;color:#344054}
.excel-import-pagination span{display:inline-flex;align-items:center;justify-content:center;background:#365e9d;color:#fff}
.excel-commit-actions{border-top:1px solid #eaecf0}
@media(max-width:760px){.excel-import-steps{grid-template-columns:1fr 1fr}.excel-preview-table table{min-width:760px}.excel-preview-toolbar,.excel-commit-actions{align-items:stretch;flex-direction:column}}

/* Shared enabled switch for external integration settings. */
.form-grid .fg.integration-use-field{
  display:flex!important;
  min-height:40px;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}
.integration-use-label{
  min-width:0;
  color:var(--masta-text-sub,#596579);
  font-size:11.5px;
  font-weight:700;
  line-height:1.25;
}
.fg label.integration-use-toggle{
  display:inline-flex!important;
  width:auto!important;
  min-width:94px;
  flex:0 0 auto;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  margin:0!important;
  cursor:pointer;
  color:var(--masta-text,#172033)!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;
}
.integration-use-toggle input[type="checkbox"]{
  position:absolute!important;
  width:1px!important;
  min-width:1px!important;
  height:1px!important;
  min-height:1px!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden;
  opacity:0;
}
.integration-use-switch{
  position:relative;
  display:inline-block;
  width:44px;
  min-width:44px;
  height:24px;
  border:1px solid var(--masta-border,#d7dde6);
  border-radius:999px;
  background:var(--masta-bg-soft,#eef1f5);
  box-sizing:border-box;
  transition:background-color .16s ease,border-color .16s ease,opacity .16s ease;
}
.integration-use-switch::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(15,23,42,.24);
  transition:transform .16s ease;
}
.integration-use-toggle input:checked + .integration-use-switch{
  border-color:var(--masta-primary,#B95C1B);
  background:var(--masta-primary,#B95C1B);
}
.integration-use-toggle input:checked + .integration-use-switch::after{transform:translateX(20px)}
.integration-use-status{min-width:38px;white-space:nowrap;text-align:left}
.integration-use-status-on{display:none}
.integration-use-toggle input:checked ~ .integration-use-status .integration-use-status-on{display:inline}
.integration-use-toggle input:checked ~ .integration-use-status .integration-use-status-off{display:none}
.integration-use-toggle input:focus-visible + .integration-use-switch{
  outline:2px solid var(--masta-primary,#B95C1B);
  outline-offset:2px;
}
.integration-use-toggle input:disabled + .integration-use-switch,
.integration-use-toggle input:disabled ~ .integration-use-status{opacity:.48}
.fg label.integration-use-toggle:has(input:disabled){cursor:not-allowed}
@media(max-width:430px){
  .form-grid .fg.integration-use-field{grid-column:1/-1;flex-wrap:nowrap!important}
}

@media(max-width:760px){
  .customer-history-tabs{
    display:flex;
    width:100%;
  }
  table.data.crm-list-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
  }
  .crm-list-table th,
  .crm-list-table td{
    overflow:hidden;
    padding:6px 4px!important;
    text-overflow:ellipsis;
  }
  .crm-list-table .crm-col-secondary,
  .crm-list-table .crm-col-mobile-secondary{
    display:none!important;
  }
  .crm-list-table .crm-primary-cell{
    min-width:0;
  }
  .crm-list-table .crm-action-column{
    width:42px!important;
    padding-right:4px!important;
  }
  .customer-list-table th:nth-child(1),
  .customer-list-table td:nth-child(1){width:38%!important}
  .customer-list-table th:nth-child(2),
  .customer-list-table td:nth-child(2){width:27%!important}
  .customer-list-table th:nth-child(8),
  .customer-list-table td:nth-child(8){width:22%!important}
  .coupon-list-table{min-width:1180px!important;table-layout:auto!important}
  .table-actions-modern{
    gap:0;
  }
  .action-menu-toggle{
    width:32px;
    min-width:32px;
    height:32px;
    min-height:32px;
  }
  .table-actions-modern .table-action-primary{
    display:none!important;
  }
}
.coupon-memo-cell{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.coupon-date-range{min-width:300px}.coupon-date-range .date-range{display:flex;align-items:center;gap:8px}.coupon-date-range .date-range input{min-width:135px}
.product-badge-assets{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-top:12px}.product-badge-asset{display:grid;gap:8px;align-content:start;padding:12px;border:1px solid var(--border,#dde3ea);border-radius:10px;background:#fff}.product-badge-preview{height:72px;display:grid;place-items:center;background:#f7f8fa;border-radius:8px;color:#6b7280}.product-badge-preview img,.product-badge-asset>img{max-width:100%;max-height:72px;object-fit:contain}.listing-option-name,.listing-option-price,.listing-component-qty,.listing-item-memo{min-width:100px}@media(max-width:720px){.product-badge-assets{grid-template-columns:repeat(2,minmax(0,1fr))}.product-badge-preview{height:56px}}
