.promotion-management-page,
.promotion-form-panel,
.promotion-product-modal,
.package-items-detail-modal {
    --pm-accent: #ff7f3f;
    --pm-primary: #ff596f;
    --pm-ink: #303a58;
    --pm-muted: #929bad;
    --pm-line: #e3e8f0;
    --pm-soft: #f6f8fb;
    --pm-card: #fff;
}

/* List pages */
.promotion-management-page .account-wrapper { max-width: none; }
.promotion-management-page .promotion-list-card {
    overflow: hidden;
    border: 1px solid var(--pm-line);
    border-radius: 14px;
    background: var(--pm-card);
    box-shadow: 0 10px 30px rgba(40, 50, 82, 0.06);
}
.promotion-management-page .promotion-list-card > hr { display: none; }
.promotion-management-page .promotion-list-header {
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--pm-line) !important;
    border-radius: 0 !important;
    background: linear-gradient(135deg, #fff 0%, #fffaf7 100%);
    padding: 20px 22px 16px !important;
}
.quantity-discount-page .quantity-discount-hero.promotion-list-header {
    border-bottom: 1px solid var(--pm-line) !important;
}
.quantity-discount-page .account-box.is-form .form-body.quantity-discount-list-card {
    border-top: 0 !important;
}
.promotion-management-page .promotion-list-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 48px;
}
.promotion-management-page .promotion-list-title-wrap { min-width: 0; }
.promotion-management-page .promotion-list-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--pm-accent);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.promotion-management-page .promotion-list-heading h4 {
    margin: 0 !important;
    color: var(--pm-ink);
    font-size: 1.08rem !important;
    font-weight: 800;
    line-height: 1.25 !important;
}
.promotion-management-page .promotion-list-subtitle {
    margin: 4px 0 0;
    color: var(--pm-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}
.promotion-management-page .promotion-add-button {
    position: static !important;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 132px;
    height: 38px;
    border-radius: 9px;
    font-size: 0.75rem;
    font-weight: 800;
}
.package-management-page .package-items-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}
.package-management-page .package-items-page-size {
    display: flex;
    align-items: center;
}
.package-management-page .package-items-page-size .dataTables_length,
.package-management-page .package-items-page-size .dataTables_length label { margin: 0; }
.package-management-page .package-items-page-size .dataTables_length label {
    display: flex;
    align-items: center;
    color: transparent;
    font-size: 0;
}
.package-management-page .package-items-page-size .dataTables_length select {
    width: 78px;
    min-width: 78px;
    height: 38px;
    margin: 0 !important;
    border: 1px solid var(--pm-line);
    border-radius: 9px;
    background-color: #fff;
    color: var(--pm-ink);
    padding: 0 28px 0 12px;
    font-size: 0.75rem;
}
.package-management-page .package-items-result-summary {
    min-height: 1em;
    margin-top: 4px;
}
.package-management-page .package-items-result-summary .dataTables_info { padding: 0 !important; }
.promotion-management-page .promotion-print-tools {
    margin-top: 10px;
    color: var(--pm-muted);
    font-size: 0.68rem;
}
.promotion-management-page .promotion-list-card > .form-body {
    padding: 14px 18px 18px;
}
.promotion-management-page .promotion-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 10px !important;
    padding: 0 !important;
}
.promotion-management-page .promotion-list-toolbar > .column {
    width: auto;
    padding: 0 !important;
}
.promotion-management-page .promotion-list-toolbar > .column:first-child { flex: 1 1 auto; }
.promotion-management-page .promotion-list-toolbar > .column:nth-child(2) { flex: 0 0 auto; }
.promotion-management-page .promotion-list-toolbar > .column:last-child { display: none; }
.promotion-management-page .promotion-list-toolbar .right {
    float: none !important;
    margin: 0 !important;
}
.promotion-management-page .promotion-list-toolbar .field { margin: 0; }
.promotion-management-page .promotion-list-toolbar .button.is-static,
.promotion-management-page .promotion-list-toolbar select,
.promotion-management-page .promotion-list-toolbar .dataTables_length select {
    height: 36px;
    border-color: var(--pm-line);
    font-size: 0.72rem;
}
.promotion-management-page .promotion-list-toolbar .button.is-static {
    min-width: 62px;
    background: var(--pm-soft);
    color: #68728a;
    font-weight: 700;
}
.promotion-management-page .datatable-info {
    color: #69738a;
    font-size: 0.7rem;
}
.promotion-management-page .table-wrapper {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto;
    border: 1px solid var(--pm-line);
    border-radius: 11px;
    background: #fff;
}
.package-management-page .package-items-empty-state {
    display: flex;
    min-height: 330px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-top: 1px solid var(--pm-line);
    background: #fff;
    padding: 30px 20px 36px;
    text-align: center;
}
.package-management-page .package-items-empty-state[hidden] { display: none !important; }
.package-management-page .package-items-empty-state img {
    width: 156px;
    height: 156px;
    object-fit: contain;
}
.package-management-page .package-items-empty-state h3 {
    margin: 0;
    color: var(--pm-ink);
    font-size: 1.2rem;
    font-weight: 800;
}
.package-management-page .package-items-empty-state p {
    margin: -5px 0 0;
    color: #929bad;
    font-size: 0.99rem;
    line-height: 1.5;
}
.package-management-page.has-empty-package-items #users-datatable tbody { display: none; }
.package-management-page.has-empty-package-items .datatable-pagination { display: none; }
.package-management-page.has-no-package-items .promotion-list-toolbar { display: none !important; }
.package-management-page.has-no-package-items .table-wrapper {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.package-management-page.has-no-package-items #users-datatable,
.package-management-page.has-no-package-items #users-datatable_wrapper { display: none !important; }
.package-management-page.has-no-package-items .package-items-empty-state {
    border-top: 0;
    background: transparent;
}
.promotion-management-page table.dataTable,
.promotion-management-page #users-datatable {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    table-layout: fixed;
}
.promotion-management-page #users-datatable thead th {
    height: 42px;
    border: 0;
    border-bottom: 1px solid var(--pm-line);
    background: #f5f7fb;
    padding: 8px 10px;
    color: #657088;
    font-size: 0.68rem;
    font-weight: 800;
    vertical-align: middle;
}
.promotion-management-page #users-datatable thead tr + tr th {
    height: auto;
    background: #fafbfc;
    padding: 7px 5px;
}
.promotion-management-page #users-datatable thead tr + tr input,
.promotion-management-page #users-datatable thead tr + tr select {
    width: calc(100% - 8px) !important;
    height: 32px;
    margin: 0 4px !important;
    border: 1px solid #dfe4ec;
    border-radius: 7px;
    background: #fff;
    padding: 0 8px;
    font-size: 0.66rem;
}
.promotion-management-page #users-datatable tbody td {
    border: 0;
    border-bottom: 1px solid #edf0f5;
    padding: 10px;
    color: var(--pm-ink);
    font-size: 0.7rem;
    line-height: 1.38;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.promotion-management-page #users-datatable tbody tr:last-child td { border-bottom: 0; }
.promotion-management-page #users-datatable tbody tr:hover td { background: #fffaf8; }
.addon-management-page #users-datatable th:nth-child(1) { width: 16% !important; }
.addon-management-page #users-datatable th:nth-child(2) { width: 23% !important; }
.addon-management-page #users-datatable th:nth-child(3) { width: 22% !important; }
.addon-management-page #users-datatable th:nth-child(4) { width: 10% !important; }
.addon-management-page #users-datatable th:nth-child(5) { width: 23% !important; }
.addon-management-page #users-datatable th:last-child { width: 58px !important; }
.package-management-page #users-datatable th:nth-child(1) { width: 30% !important; }
.package-management-page #users-datatable th:nth-child(2) { width: auto !important; }
.package-management-page #users-datatable th:last-child { width: 58px !important; }
.package-management-page .package-items-summary-cell { text-align: left; }
.package-management-page .package-items-summary {
    position: relative;
    display: grid;
    align-items: center;
    grid-template-columns: 34px minmax(0, 1fr) auto 16px;
    gap: 9px;
    box-sizing: border-box;
    width: min(680px, 100%);
    max-width: 680px;
    min-height: 48px;
    border: 1px solid #e2e7ef;
    border-radius: 10px;
    background: #fff;
    padding: 7px 9px;
    color: var(--pm-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.package-management-page .package-items-summary:hover {
    z-index: 2;
    border-color: #f1c7aa;
    box-shadow: inset 0 0 0 1px #f1c7aa, 0 3px 10px rgba(40, 50, 82, 0.06);
    transform: none;
}
.package-management-page .package-items-summary__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #fff1e7;
    color: #d66f2c;
    font-size: 0.72rem;
    font-weight: 800;
}
.package-management-page .package-items-summary__copy { min-width: 0; }
.package-management-page .package-items-summary__copy strong,
.package-management-page .package-items-summary__preview { display: block; }
.package-management-page .package-items-summary__copy strong { font-size: 0.7rem; line-height: 1.2; }
.package-management-page .package-items-summary__preview {
    overflow: hidden;
    margin-top: 3px;
    color: #9099aa;
    font-size: 0.61rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.package-management-page .package-items-summary__action {
    color: #e27431;
    font-size: 0.62rem;
    font-weight: 800;
    white-space: nowrap;
}
.package-management-page .package-items-summary > svg { width: 15px; height: 15px; color: #b0b7c5; }
.promotion-management-page #users-datatable tfoot th {
    border: 0;
    border-top: 1px solid var(--pm-line);
    background: #fafbfc;
    padding: 7px 5px;
}
.promotion-management-page #users-datatable tfoot input,
.promotion-management-page #users-datatable tfoot select {
    width: calc(100% - 8px) !important;
    height: 32px;
    margin: 0 4px !important;
    border: 1px solid #dfe4ec;
    border-radius: 7px;
    background: #fff;
    padding: 0 8px;
    font-size: 0.66rem;
}
.promotion-management-page .row-action .is-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--pm-line);
    border-radius: 8px;
    background: #fff;
}
.promotion-management-page .datatable-pagination {
    display: flex;
    justify-content: flex-end;
    min-height: 38px;
    padding-top: 10px;
}

/* Add / edit panels */
.promotion-form-panel .right-panel {
    display: flex;
    flex-direction: column;
    width: min(640px, 100vw);
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden !important;
    background: #f5f7fa;
}
.promotion-form-panel .right-panel-head {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    flex: 0 0 58px;
    min-height: 58px;
    border-bottom: 1px solid var(--pm-line);
    background: #fff;
    padding: 0 18px;
}
.promotion-form-panel .right-panel-head h3 {
    margin: 0;
    color: var(--pm-ink);
    font-size: 1.12rem;
    font-weight: 700;
}
.promotion-form-panel .right-panel-head .clear_add_store_addon_product {
    margin-left: auto;
    color: var(--pm-primary);
    border-radius: 7px;
    padding: 5px 9px;
    font-size: 0.76rem;
    font-weight: 700;
}
.promotion-form-panel .right-panel-head .close-panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 10px;
    border: 1px solid var(--pm-line);
    border-radius: 9px;
    background: #fff;
    color: #737c91;
}
.promotion-form-panel .right-panel-head > h3 + .close-panel { margin-left: auto; }
.promotion-form-panel .right-panel-head .close-panel svg { width: 18px; height: 18px; }
.promotion-form-panel .right-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    overscroll-behavior: contain;
}
.promotion-form-panel .right-panel-body > .form-body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 14px 18px 0 !important;
}
.promotion-form-panel .promotion-form-section {
    margin: 0 0 12px;
    border: 1px solid var(--pm-line);
    border-radius: 12px;
    background: #fff;
    padding: 13px !important;
    box-shadow: 0 5px 18px rgba(40, 50, 82, 0.035);
}
.promotion-form-panel .promotion-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    color: #46516d;
    font-size: 0.8rem;
    font-weight: 700;
}
.promotion-form-panel .promotion-section-title::before {
    width: 4px;
    height: 14px;
    border-radius: 99px;
    background: var(--pm-accent);
    content: "";
}
.promotion-form-panel .promotion-form-section > .columns {
    margin: -5px;
}
.promotion-form-panel .promotion-form-section > .columns > .column {
    padding: 5px;
}
@media (min-width: 761px) {
    .store-addon-form-panel .promotion-form-section > .columns > .column {
        flex: none;
        width: 50%;
    }
    .store-addon-form-panel .promotion-form-section > .columns > .promotion-addon-limit-field {
        width: 33.3333%;
    }
    .store-addon-form-panel .promotion-form-section > .columns > .promotion-full-field,
    .store-addon-form-panel .promotion-form-section > .columns > .promotion-product-column {
        width: 100%;
    }
}
.promotion-form-panel h4 {
    margin: 0 0 5px;
    color: #4c5672;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.35;
}
.promotion-form-panel .field { margin-bottom: 0; }
.promotion-form-panel .input,
.promotion-form-panel select,
.promotion-form-panel .select {
    width: 100%;
}
.promotion-form-panel .input,
.promotion-form-panel select {
    height: 40px;
    border-color: #dfe3ea;
    border-radius: 8px;
    background: #fff;
    color: #3d4865;
    font-size: 0.86rem;
    box-shadow: none;
}
.promotion-form-panel .input:focus,
.promotion-form-panel select:focus {
    border-color: var(--pm-accent);
    box-shadow: 0 0 0 3px rgba(255, 127, 63, 0.1);
}
.promotion-form-panel .button.is-static {
    height: 40px;
    border-color: #dfe3ea;
    background: var(--pm-soft);
    color: #68728a;
    font-size: 0.7rem;
    font-weight: 700;
}
.promotion-form-panel .promotion-product-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 94px;
    gap: 8px;
    margin: 0 0 3px;
    border: 1px solid var(--pm-line);
    border-radius: 10px;
    background: #f8f9fb;
    padding: 9px !important;
}
.promotion-form-panel .promotion-product-section-head,
.promotion-form-panel .promotion-product-picker > .fieldset-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
    margin: 0 0 8px !important;
}
.promotion-form-panel .promotion-product-picker > .fieldset-heading {
    grid-column: 1 / -1;
    margin: 0 !important;
}
.promotion-form-panel .promotion-product-section-head h4,
.promotion-form-panel .promotion-product-picker > .fieldset-heading h4 { margin: 0; }
.promotion-form-panel .promotion-product-section-head .right,
.promotion-form-panel .promotion-product-picker > .fieldset-heading .right {
    float: none !important;
    margin: 0 !important;
}
.promotion-form-panel .promotion-product-section-head .select_purchase_product,
.promotion-form-panel .promotion-product-picker .select_purchase_product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #f0c8ac;
    border-radius: 8px;
    background: #fff7f1;
    color: #d87530;
}
.promotion-form-panel .promotion-product-section-head .select_purchase_product {
    width: auto;
    min-width: 34px;
    gap: 4px;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.promotion-form-panel .promotion-product-section-head .select_purchase_product .icon {
    width: 16px;
    height: 16px;
    margin: 0;
}
.promotion-form-panel .promotion-product-picker .select_purchase_product svg { width: 15px; height: 15px; }
.promotion-form-panel .promotion-product-section-head .select_purchase_product svg { width: 15px; height: 15px; }
.promotion-form-panel .promotion-product-picker > .promotion-product-scan {
    position: relative;
    grid-column: 1;
    min-width: 0;
}
.promotion-form-panel .promotion-product-scan .input {
    width: 100% !important;
    margin: 0 !important;
    padding-right: 72px;
    padding-left: 36px;
}
.promotion-form-panel .promotion-product-scan__icon,
.promotion-form-panel .promotion-product-scan__hint {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.promotion-form-panel .promotion-product-scan__icon {
    left: 11px;
    display: inline-flex;
    width: 17px;
    height: 17px;
    color: #929caf;
}
.promotion-form-panel .promotion-product-scan__icon svg { width: 100%; height: 100%; }
.promotion-form-panel .promotion-product-scan__hint {
    right: 9px;
    border: 1px solid #dfe3ea;
    border-radius: 6px;
    background: #f2f4f7;
    padding: 2px 6px;
    color: #8a94a8;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.2;
}
.promotion-form-panel .promotion-product-picker > input[id^="sub_barcode_add_"] {
    grid-column: 1;
    width: 100% !important;
    margin: 0 !important;
}
.promotion-form-panel .promotion-product-picker > input[id^="item_qty_add_"] {
    grid-column: 2;
    width: 100% !important;
    margin: 0 !important;
    text-align: center;
}
.store-addon-form-panel .promotion-target-picker { grid-template-columns: minmax(0, 1fr); }
.store-addon-form-panel .promotion-target-picker > input[id^="item_qty_add_"] { display: none; }
.promotion-form-panel .promotion-product-picker > .columns {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0 !important;
}
.promotion-form-panel .promotion-product-picker .flex-table {
    width: 100% !important;
    margin-top: 2px !important;
    overflow: hidden;
    border: 1px dashed #dce2eb;
    border-radius: 9px;
    background: #fff;
}
.promotion-form-panel .promotion-product-picker .flex-table-header,
.promotion-form-panel .promotion-product-picker .flex-table-item {
    min-height: 38px;
    padding: 7px 9px;
}
.promotion-form-panel .promotion-product-picker .flex-table-header {
    background: #f4f6f9;
    color: #758097;
    font-size: 0.64rem;
    font-weight: 800;
}
.promotion-form-panel .promotion-product-picker .flex-table-item {
    border-top: 1px solid #edf0f5;
    font-size: 0.68rem;
}
.promotion-form-panel .promotion-product-picker .flex-table-item input {
    width: 74px !important;
    height: 31px;
    border: 1px solid #dfe4ec;
    border-radius: 7px;
    padding: 0 7px;
    text-align: right;
}
.promotion-form-panel .promotion-product-picker [class^="remove_"],
.promotion-form-panel .promotion-product-picker [class*=" remove_"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    color: var(--pm-primary);
}
.promotion-form-panel .promotion-product-picker [class^="remove_"]:hover,
.promotion-form-panel .promotion-product-picker [class*=" remove_"]:hover { background: #fff0f3; }
.promotion-form-panel .promotion-product-empty {
    display: grid;
    align-items: center;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    min-height: 54px;
    padding: 8px 9px;
}
.promotion-form-panel .promotion-product-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eef1f5;
    color: #8d96a8;
}
.promotion-form-panel .promotion-product-empty__icon svg { display: block; width: 16px; height: 16px; }
.promotion-form-panel .promotion-product-empty__copy strong,
.promotion-form-panel .promotion-product-empty__copy span { display: block; }
.promotion-form-panel .promotion-product-empty__copy strong { color: #566079; font-size: 0.68rem; }
.promotion-form-panel .promotion-product-empty__copy > span { margin-top: 2px; color: #969eae; font-size: 0.61rem; }
.promotion-form-panel .promotion-selected-host {
    border: 0 !important;
    background: transparent !important;
    overflow: visible !important;
}
.promotion-form-panel .promotion-selected-list { width: 100%; }
.promotion-form-panel .promotion-selected-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 28px;
    padding: 0 2px 6px;
}
.promotion-form-panel .promotion-selected-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 650;
}
.promotion-form-panel .promotion-selected-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    border-radius: 999px;
    background: #fff0e6;
    padding: 0 6px;
    color: #d87530;
    font-size: 0.67rem;
    font-weight: 800;
}
.promotion-form-panel .promotion-selected-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    padding: 4px 6px;
    color: #e45f70;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
}
.promotion-form-panel .promotion-selected-clear:hover { background: #fff0f3; }
.promotion-form-panel .promotion-selected-clear svg { width: 13px; height: 13px; }
.promotion-form-panel .promotion-selected-items {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.promotion-form-panel .promotion-selected-item {
    display: grid;
    align-items: center;
    grid-template-columns: 28px minmax(0, 1fr) 30px;
    gap: 9px;
    min-height: 52px;
    border: 1px solid #e2e6ed;
    border-radius: 9px;
    background: #fff;
    padding: 7px 8px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.promotion-form-panel .promotion-selected-item.has-price {
    grid-template-columns: 28px minmax(0, 1fr) 82px 30px;
}
.promotion-form-panel .promotion-selected-item:hover {
    border-color: #f0c8ac;
    box-shadow: 0 4px 12px rgba(40, 50, 82, 0.05);
}
.promotion-form-panel .promotion-selected-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff3ea;
    color: #d87530;
    font-size: 0.66rem;
    font-weight: 800;
}
.promotion-form-panel .promotion-selected-content { min-width: 0; }
.promotion-form-panel .promotion-selected-name {
    overflow: hidden;
    color: #35405d;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.promotion-form-panel .promotion-selected-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    color: #929bad;
    font-size: 0.6rem;
    line-height: 1.25;
}
.promotion-form-panel .promotion-selected-meta span + span::before {
    margin-right: 8px;
    color: #d6dae2;
    content: "•";
}
.promotion-form-panel .promotion-selected-price-wrap {
    display: grid;
    gap: 2px;
    color: #8c95a8;
    font-size: 0.55rem;
    font-weight: 700;
}
.promotion-form-panel .promotion-selected-price-wrap .promotion-selected-price {
    width: 82px !important;
    height: 30px;
    border: 1px solid #dfe4ec;
    border-radius: 7px;
    background: #fff;
    padding: 0 7px;
    color: #3d4865;
    font-size: 0.68rem;
    text-align: right;
    box-shadow: none;
}
.promotion-form-panel .promotion-selected-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #e45f70;
    cursor: pointer;
}
.promotion-form-panel .promotion-selected-remove:hover { background: #fff0f3; color: #d93f55; }
.promotion-form-panel .promotion-selected-remove svg { width: 16px; height: 16px; }
.promotion-form-panel .promotion-selected-empty {
    display: grid;
    align-items: center;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    min-height: 54px;
    border: 1px dashed #dce2eb;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
    padding: 8px 9px;
}
.promotion-form-panel .promotion-selected-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eef1f5;
    color: #8d96a8;
}
.promotion-form-panel .promotion-selected-empty__icon svg { width: 16px; height: 16px; }
.promotion-form-panel .promotion-selected-empty__copy strong,
.promotion-form-panel .promotion-selected-empty__copy span { display: block; }
.promotion-form-panel .promotion-selected-empty__copy strong { color: #566079; font-size: 0.68rem; }
.promotion-form-panel .promotion-selected-empty__copy > span { margin-top: 2px; color: #969eae; font-size: 0.61rem; }
.promotion-form-panel .form-body > hr {
    display: none;
    border: 0;
}
.promotion-form-panel .promotion-form-actions {
    position: sticky;
    z-index: 15;
    bottom: 0;
    margin: auto -18px 0;
    border: 0;
    background: linear-gradient(180deg, rgba(246, 248, 251, 0) 0%, var(--pm-soft) 28%, var(--pm-soft) 100%);
    padding: 22px 18px 14px !important;
}
.promotion-form-panel .promotion-form-actions__row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 9px;
}
.promotion-form-panel .promotion-form-actions .button {
    width: 100%;
    height: 42px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 700;
}
.promotion-form-panel .promotion-form-cancel {
    border: 1px solid #dfe3ea;
    background: rgba(255, 255, 255, 0.82);
    color: #697287;
    box-shadow: none;
}
.promotion-form-panel .promotion-form-cancel:hover {
    border-color: #cfd5df;
    background: #fff;
    color: #414b66;
}
.promotion-form-panel .promotion-form-submit { box-shadow: 0 7px 16px rgba(254, 142, 60, 0.18); }

/* Package product selector */
.promotion-product-modal .modal-content {
    width: min(1120px, calc(100vw - 32px));
    height: min(820px, calc(100vh - 32px));
    max-height: none;
}
.promotion-product-modal .modal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--pm-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(27, 35, 58, 0.22);
}
.promotion-product-modal .modal-card-head {
    flex: 0 0 64px;
    min-height: 64px;
    border-bottom: 1px solid var(--pm-line);
    background: #fff;
    padding: 0 20px;
}
.promotion-product-modal .modal-card-head h3 { color: var(--pm-ink); font-weight: 800; }
.promotion-product-modal .modal-card-head .selecteds_product_stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border: 1px solid #ffd3da;
    border-radius: 999px;
    background: #fff4f6;
    padding: 0 7px;
    color: var(--pm-primary) !important;
    font-size: 0.68rem;
}
.promotion-product-modal .modal-card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: var(--pm-soft);
    padding: 16px;
}
.promotion-product-modal .inner-content,
.promotion-product-modal .placeholder-content,
.promotion-product-modal .form-body {
    width: 100%;
    height: 100%;
}
.promotion-product-modal .form-body { display: flex; flex-direction: column; }
.promotion-product-modal .info_top_area { flex: 0 0 auto; }
.promotion-product-modal .info_top_area .left {
    display: flex;
    align-items: center;
    gap: 10px;
    float: none !important;
    width: 100%;
    margin: 0 0 10px !important;
}
.promotion-product-modal .info_top_area h4 { margin: 0; color: #657088; font-size: 0.7rem; }
.promotion-product-modal .info_top_area .field { flex: 1 1 auto; margin: 0; }
.promotion-product-modal .info_top_area .select,
.promotion-product-modal .info_top_area select { width: 100%; }
.promotion-product-modal .table-wrapper {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--pm-line);
    border-radius: 11px;
    background: #fff;
}
.promotion-product-modal #search_product {
    position: sticky;
    z-index: 3;
    top: 0;
    flex: 0 0 40px;
    width: calc(100% - 20px) !important;
    height: 40px;
    margin: 10px !important;
    border-color: #dfe4ec;
    border-radius: 8px;
}
.promotion-product-modal #users-datatable1 { width: 100% !important; margin: 0 !important; }
.promotion-product-modal #users-datatable1 th {
    position: sticky;
    z-index: 2;
    top: 60px;
    height: 40px;
    border-bottom: 1px solid var(--pm-line);
    background: #f5f7fb;
    color: #657088;
    font-size: 0.68rem;
}
.promotion-product-modal #users-datatable1 td {
    border-bottom: 1px solid #edf0f5;
    padding: 8px 10px;
    color: var(--pm-ink);
    font-size: 0.7rem;
}
.promotion-product-modal .datatable1-pagination {
    position: sticky;
    z-index: 3;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    min-height: 42px;
    border-top: 1px solid var(--pm-line);
    background: rgba(255, 255, 255, 0.97);
    padding: 7px 10px;
}
.promotion-product-modal .modal-card-foot {
    flex: 0 0 66px;
    min-height: 66px;
    border-top: 1px solid var(--pm-line);
    background: #fff;
    padding: 10px 18px;
}
.promotion-product-modal .modal-card-foot .button {
    min-width: 112px;
    height: 40px;
    border-radius: 9px;
    font-weight: 800;
}

/* Package group product details */
.package-items-detail-modal .modal-content {
    width: min(760px, calc(100vw - 32px));
    height: min(760px, calc(100vh - 32px));
    max-height: none;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}
.package-items-detail-modal .modal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--pm-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(27, 35, 58, 0.22);
}
.package-items-detail-modal .modal-card-head {
    display: flex;
    align-items: center;
    flex: 0 0 68px;
    min-height: 68px;
    border-bottom: 1px solid var(--pm-line);
    background: #fff;
    padding: 10px 18px;
}
.package-items-detail-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.package-items-detail-heading__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff0f3;
    color: var(--pm-primary);
}
.package-items-detail-heading__icon svg { width: 19px; height: 19px; }
.package-items-detail-heading h3 {
    overflow: hidden;
    margin: 0;
    color: var(--pm-ink);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.package-items-detail-heading p { margin: 2px 0 0; color: var(--pm-muted); font-size: 0.62rem; }
.package-items-detail-heading p b { color: var(--pm-primary); }
.package-items-detail-modal .modal-card-head > .package-items-detail-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8f98aa;
    cursor: pointer;
}
.package-items-detail-modal .modal-card-head > .package-items-detail-close:hover { background: #f3f5f8; }
.package-items-detail-modal .modal-card-head > .package-items-detail-close svg { width: 18px; height: 18px; }
.package-items-detail-modal .modal-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: var(--pm-soft);
    padding: 14px;
}
.package-items-detail-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 40px;
    margin-bottom: 10px;
}
.package-items-detail-toolbar .input {
    height: 40px;
    border-color: var(--pm-line);
    border-radius: 9px;
    background: #fff;
    padding: 0 90px 0 38px;
    font-size: 0.7rem;
    box-shadow: none;
}
.package-items-detail-search-icon {
    position: absolute;
    z-index: 1;
    left: 12px;
    display: inline-flex;
    color: #9ba4b5;
    pointer-events: none;
}
.package-items-detail-search-icon svg { width: 16px; height: 16px; }
.package-items-detail-result {
    position: absolute;
    right: 12px;
    color: #9099aa;
    font-size: 0.6rem;
}
.package-items-detail-result b { color: var(--pm-ink); }
.package-items-detail-columns,
.package-items-detail-row {
    display: grid;
    align-items: center;
    grid-template-columns: 34px minmax(0, 1fr) 112px;
    gap: 10px;
}
.package-items-detail-columns {
    flex: 0 0 34px;
    min-height: 34px;
    border: 1px solid var(--pm-line);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #f1f4f8;
    padding: 0 10px;
    color: #707b92;
    font-size: 0.62rem;
    font-weight: 800;
}
.package-items-detail-columns span:last-child { text-align: right; }
.package-items-detail-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--pm-line);
    border-radius: 0 0 10px 10px;
    background: #fff;
}
.package-items-detail-row {
    min-height: 55px;
    border-bottom: 1px solid #edf0f5;
    padding: 7px 10px;
}
.package-items-detail-row:last-child { border-bottom: 0; }
.package-items-detail-row:hover { background: #fffaf8; }
.package-items-detail-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff1e7;
    color: #d66f2c;
    font-size: 0.62rem;
    font-weight: 800;
}
.package-items-detail-copy { min-width: 0; }
.package-items-detail-copy strong,
.package-items-detail-code { display: block; }
.package-items-detail-copy strong {
    overflow: hidden;
    color: #35405d;
    font-size: 0.7rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.package-items-detail-code { margin-top: 2px; color: #929bad; font-size: 0.6rem; }
.package-items-detail-code b { color: #768197; }
.package-items-detail-price { color: #35405d; font-size: 0.7rem; font-weight: 800; text-align: right; }
.package-items-detail-empty { padding: 38px 16px; color: #929bad; font-size: 0.7rem; text-align: center; }
.package-items-detail-modal .modal-card-foot {
    flex: 0 0 62px;
    min-height: 62px;
    border-top: 1px solid var(--pm-line);
    background: #fff;
    padding: 9px 16px;
}
.package-items-detail-modal .modal-card-foot .button { min-width: 112px; height: 40px; border-radius: 9px; font-weight: 800; }

/* Package items: add/edit panel spacing and single primary action. */
.right-panel-wrapper.is-activity.package-form-panel .right-panel .right-panel-body {
    padding: 0 20px;
}
.right-panel-wrapper.is-activity.package-form-panel .right-panel-body > .form-body {
    padding: 20px 0 0 !important;
}
.package-form-panel .promotion-form-actions {
    margin: auto 0 0;
    padding: 22px 0 14px !important;
}
.package-form-panel .promotion-form-actions__row {
    grid-template-columns: minmax(0, 1fr);
}

/* Package items: page-specific 30% typography increase. */
.package-management-page .promotion-list-eyebrow { font-size: 0.87rem; }
.package-management-page .promotion-list-heading h4 { font-size: 1.4rem !important; }
.package-management-page .promotion-list-subtitle,
.package-management-page .datatable-info { font-size: 0.94rem; }
.package-management-page .datatable-info .dataTables_info { font-size: inherit; }
.package-management-page .promotion-add-button,
.package-management-page .package-items-page-size .dataTables_length select { font-size: 0.98rem; }
.package-management-page #users-datatable thead th { font-size: 0.88rem; }
.package-management-page #users-datatable thead tr + tr input,
.package-management-page #users-datatable thead tr + tr select,
.package-management-page #users-datatable tfoot input,
.package-management-page #users-datatable tfoot select { font-size: 0.86rem; }
.package-management-page #users-datatable tbody td { font-size: 0.91rem; }
.package-management-page .package-items-summary__count { font-size: 0.94rem; }
.package-management-page .package-items-summary__copy strong { font-size: 0.91rem; }
.package-management-page .package-items-summary__preview { font-size: 0.79rem; }
.package-management-page .package-items-summary__action { font-size: 0.81rem; }
.package-management-page .dropdown-item,
.package-management-page .dropdown-item .meta span { font-size: 0.86rem; }
.package-management-page .datatable-pagination .paginate_button { font-size: 0.91rem !important; }
.package-management-page .package-items-empty-state h3 { font-size: 1.56rem; }
.package-management-page .package-items-empty-state p { font-size: 1.29rem; }

.package-form-panel .right-panel-head h3 { font-size: 1.46rem; }
.package-form-panel .right-panel-head .clear_add_store_addon_product { font-size: 0.99rem; }
.package-form-panel .message-body { font-size: 1.14rem; }
.package-form-panel .promotion-section-title { font-size: 1.04rem; }
.package-form-panel h4 { font-size: 1.01rem; }
.package-form-panel .input,
.package-form-panel select { font-size: 1.12rem; }
.package-form-panel .button.is-static { font-size: 0.91rem; }
.package-form-panel .promotion-product-section-head .select_purchase_product { font-size: 0.94rem; }
.package-form-panel .promotion-product-scan__hint { font-size: 0.75rem; }
.package-form-panel .promotion-product-picker .flex-table-header { font-size: 0.83rem; }
.package-form-panel .promotion-product-picker .flex-table-item,
.package-form-panel .promotion-product-empty__copy strong,
.package-form-panel .promotion-selected-count,
.package-form-panel .promotion-selected-price-wrap .promotion-selected-price,
.package-form-panel .promotion-selected-empty__copy strong { font-size: 0.88rem; }
.package-form-panel .promotion-product-empty__copy > span,
.package-form-panel .promotion-selected-empty__copy > span { font-size: 0.79rem; }
.package-form-panel .promotion-selected-badge { font-size: 0.87rem; }
.package-form-panel .promotion-selected-clear { font-size: 0.85rem; }
.package-form-panel .promotion-selected-marker { font-size: 0.86rem; }
.package-form-panel .promotion-selected-name { font-size: 0.99rem; }
.package-form-panel .promotion-selected-meta { font-size: 0.78rem; }
.package-form-panel .promotion-selected-price-wrap { font-size: 0.72rem; }
.package-form-panel .promotion-form-actions .button { font-size: 1.14rem; }

.package-items-detail-heading h3 { font-size: 1.17rem; }
.package-items-detail-heading p { font-size: 0.81rem; }
.package-items-detail-toolbar .input,
.package-items-detail-copy strong,
.package-items-detail-price,
.package-items-detail-empty { font-size: 0.91rem; }
.package-items-detail-result,
.package-items-detail-code { font-size: 0.78rem; }
.package-items-detail-columns,
.package-items-detail-index { font-size: 0.81rem; }
.package-items-detail-modal .modal-card-foot .button { font-size: 1rem; }

/* Shared reference template for promotion list and form pages. */
.promotion-reference-page .promotion-reference-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.promotion-reference-page .promotion-list-card {
    overflow: hidden !important;
    border-radius: 14px !important;
}
.promotion-reference-page .promotion-list-header {
    border-radius: 13px 13px 0 0 !important;
}
.store-discount-product-page .sdp-hero > .promotion-list-heading { width: 100%; }
.addon-management-page .promotion-list-toolbar { display: none !important; }
.promotion-reference-page .promotion-reference-result-summary {
    min-height: 1em;
    margin-top: 4px;
}
.promotion-reference-page .promotion-reference-result-summary .dataTables_info {
    padding: 0 !important;
    font-size: inherit;
}
.promotion-reference-page .promotion-reference-page-size,
.promotion-reference-page .promotion-reference-page-size .dataTables_length,
.promotion-reference-page .promotion-reference-page-size .dataTables_length label {
    display: flex;
    align-items: center;
    margin: 0;
}
.promotion-reference-page .promotion-reference-page-size .dataTables_length label {
    color: transparent;
    font-size: 0;
}
.promotion-reference-page .promotion-reference-page-size select {
    width: 78px;
    min-width: 78px;
    height: 38px;
    margin: 0 !important;
    border: 1px solid var(--pm-line);
    border-radius: 9px;
    background-color: #fff;
    color: var(--pm-ink);
    padding: 0 28px 0 12px;
    font-size: 0.98rem;
}
.promotion-reference-page .promotion-reference-warehouse {
    display: flex;
    align-items: stretch;
    height: 38px;
    margin: 0;
}
.promotion-reference-page .promotion-reference-warehouse .quantity-discount-control-label {
    display: inline-flex;
    align-items: center;
    min-width: 70px;
    border: 1px solid var(--pm-line);
    border-right: 0;
    border-radius: 9px 0 0 9px;
    background: var(--pm-soft);
    color: #68728a;
    padding: 0 10px;
    font-size: 0.83rem;
    font-weight: 700;
}
.promotion-reference-page .promotion-reference-warehouse select,
.promotion-reference-page .promotion-reference-warehouse .select2-container,
.promotion-reference-page .promotion-reference-warehouse .select2-selection {
    width: 150px !important;
    min-width: 150px;
    height: 38px !important;
    margin: 0 !important;
    border-radius: 0 9px 9px 0 !important;
}
.promotion-reference-page .promotion-reference-warehouse .select2-selection {
    display: flex;
    align-items: center;
    border-color: var(--pm-line) !important;
}
.promotion-reference-page .sdp-list-heading,
.promotion-reference-page .quantity-discount-list-heading {
    display: none !important;
}
.promotion-reference-page .promotion-reference-empty-state {
    min-height: 330px;
    border: 0;
    background: #fff;
    padding: 30px 20px 36px;
}
.promotion-reference-page .promotion-reference-empty-state .placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}
.promotion-reference-page .promotion-reference-empty-state img {
    display: block !important;
    width: 156px;
    height: 156px;
    margin: 0;
    object-fit: contain;
}
.promotion-reference-page .promotion-reference-empty-state h3 {
    margin: 0;
    color: var(--pm-ink);
    font-size: 1.56rem;
    font-weight: 800;
}
.promotion-reference-page .promotion-reference-empty-state p {
    margin: -5px 0 0;
    color: #929bad;
    font-size: 1.29rem;
    line-height: 1.45;
}
.promotion-reference-page.has-no-promotion-data #users-datatable,
.promotion-reference-page.has-no-promotion-data #users-datatable_wrapper,
.promotion-reference-page.has-no-promotion-data .datatable-pagination,
.promotion-reference-page.has-no-promotion-data .promotion-list-toolbar {
    display: none !important;
}
.promotion-reference-page.has-no-promotion-data .table-wrapper {
    min-height: 520px !important;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.promotion-reference-page.has-no-promotion-data .promotion-reference-empty-state {
    min-height: 520px;
    background: transparent;
}

/* One empty-data presentation across all four promotion management pages. */
.promotion-management-page .promotion-empty-state {
    display: flex;
    min-height: 330px;
    margin-top: 0 !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    background: transparent;
    padding: 30px 20px 36px;
    text-align: center;
}
.promotion-management-page .promotion-empty-state[hidden] { display: none !important; }
.promotion-management-page .promotion-empty-state > .placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.promotion-management-page .promotion-empty-state img {
    display: block !important;
    width: 156px;
    height: 156px;
    margin: 0;
    object-fit: contain;
}
.promotion-management-page .promotion-empty-state h3 {
    margin: 0;
    color: var(--pm-ink);
    font-size: 1.56rem;
    font-weight: 800;
}
.promotion-management-page .promotion-empty-state p {
    margin: -5px 0 0;
    color: #929bad;
    font-size: 1.29rem;
    line-height: 1.5;
}

/* Match the larger, clearer typography used by package_items. */
.promotion-reference-page .promotion-list-eyebrow,
.promotion-reference-page .sdp-eyebrow,
.promotion-reference-page .quantity-discount-eyebrow { font-size: 0.87rem; }
.promotion-reference-page .promotion-list-heading h4,
.promotion-reference-page .sdp-title,
.promotion-reference-page .quantity-discount-title { font-size: 1.4rem !important; }
.promotion-reference-page .promotion-list-subtitle,
.promotion-reference-page .sdp-subtitle,
.promotion-reference-page .quantity-discount-subtitle,
.promotion-reference-page .datatable-info { font-size: 0.94rem; }
.promotion-reference-page .promotion-add-button { font-size: 0.98rem; }
.promotion-reference-page #users-datatable thead th { font-size: 0.88rem; }
.promotion-reference-page #users-datatable thead tr + tr input,
.promotion-reference-page #users-datatable thead tr + tr select,
.promotion-reference-page #users-datatable tfoot input,
.promotion-reference-page #users-datatable tfoot select { font-size: 0.86rem; }
.promotion-reference-page #users-datatable tbody td { font-size: 0.91rem; }
.promotion-reference-page .datatable-pagination .paginate_button { font-size: 0.91rem !important; }

/* Quantity discount list: enlarge every table text tier by 20%. */
.quantity-discount-page #users-datatable thead th { font-size: 1.06rem !important; }
.quantity-discount-page #users-datatable thead input.qd-column-filter { font-size: 1.03rem !important; }
.quantity-discount-page #users-datatable tbody td { font-size: 1.09rem !important; }
.quantity-discount-page .qd-title-cell__name { font-size: 0.98rem !important; }
.quantity-discount-page .qd-title-cell__meta { font-size: 0.84rem !important; }
.quantity-discount-page .qd-metric__label { font-size: 0.82rem !important; }
.quantity-discount-page .qd-metric__value { font-size: 1.03rem !important; }
.quantity-discount-page .qd-metric__detail,
.quantity-discount-page .qd-warehouse-tag,
.quantity-discount-page .qd-validity-badge { font-size: 0.79rem !important; }
.quantity-discount-page .quantity-sort-handle { font-size: 1.2rem !important; }
.quantity-discount-page .quantity-sort-index { font-size: 0.91rem !important; }
.quantity-discount-page .qd-date-cell__updated { font-size: 0.82rem !important; }
.quantity-discount-page .qd-date-cell__range,
.quantity-discount-page .qd-status-select { font-size: 0.84rem !important; }

/* Shared add/edit drawer layout: close at the top and one primary footer action. */
.right-panel-wrapper.is-activity.promotion-reference-form-panel .right-panel .right-panel-body {
    padding: 0 20px !important;
}
.right-panel-wrapper.is-activity.promotion-reference-form-panel .right-panel-body > .form-body {
    padding: 20px 0 0 !important;
}
.promotion-reference-form-panel .promotion-form-actions,
.promotion-reference-form-panel .qd-form-actions,
.promotion-reference-form-panel .sdp-panel-actions {
    margin: auto 0 0 !important;
    padding: 22px 0 14px !important;
}
.promotion-reference-form-panel .promotion-form-actions__row,
.promotion-reference-form-panel .qd-form-actions__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
}
.promotion-reference-form-panel .qd-form-actions__row > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}
.promotion-reference-form-panel .promotion-form-submit,
.promotion-reference-form-panel .qd-form-submit {
    width: 100%;
}
.promotion-reference-form-panel .right-panel-head h3 { font-size: 1.46rem; }
.promotion-reference-form-panel .right-panel-head [class^="clear_add_"],
.promotion-reference-form-panel .right-panel-head [class*=" clear_add_"] { font-size: 0.99rem; }
.promotion-reference-form-panel .message-body { font-size: 1.14rem; }
.promotion-reference-form-panel .promotion-section-title,
.promotion-reference-form-panel .qd-form-section-title { font-size: 1.04rem; }
.promotion-reference-form-panel h4 { font-size: 1.01rem; }
.promotion-reference-form-panel .input,
.promotion-reference-form-panel select { font-size: 1.12rem; }
.promotion-reference-form-panel .button.is-static { font-size: 0.91rem; }
.promotion-reference-form-panel .promotion-product-section-head .select_purchase_product,
.promotion-reference-form-panel .qd-product-select-button,
.promotion-reference-form-panel .sdp-product-select-button { font-size: 0.94rem; }
.promotion-reference-form-panel .promotion-selected-count,
.promotion-reference-form-panel .promotion-selected-price,
.promotion-reference-form-panel .promotion-selected-empty__copy strong,
.promotion-reference-form-panel .qd-product-list-host,
.promotion-reference-form-panel .sdp-product-list-host { font-size: 0.88rem; }
.promotion-reference-form-panel .promotion-form-actions .button,
.promotion-reference-form-panel .qd-form-actions .button { font-size: 1.14rem; }

/* Keep every promotion add/edit panel on the package-items type scale. */
.promotion-reference-form-panel .right-panel-head h3,
.promotion-reference-form-panel .quantity-discount-panel__head h3 { font-size: 1.46rem !important; }
.promotion-reference-form-panel .right-panel-head [class^="clear_add_"],
.promotion-reference-form-panel .right-panel-head [class*=" clear_add_"],
.promotion-reference-form-panel .quantity-discount-panel__head [class^="clear_add_"],
.promotion-reference-form-panel .quantity-discount-panel__head [class*=" clear_add_"] { font-size: 0.99rem !important; }
.promotion-reference-form-panel .promotion-section-title,
.promotion-reference-form-panel .qd-form-section-title { font-size: 1.04rem !important; }
.promotion-reference-form-panel h4,
.promotion-reference-form-panel .qd-validity-copy h4,
.promotion-reference-form-panel .sdp-date-copy h4,
.promotion-reference-form-panel .sdp-repeat-copy h4 { font-size: 1.01rem !important; }
.promotion-reference-form-panel .required { font-size: 1.04rem !important; }
.promotion-reference-form-panel .input,
.promotion-reference-form-panel select,
.promotion-reference-form-panel select.form-control { font-size: 1.12rem !important; }
.promotion-reference-form-panel .button.is-static { font-size: 0.91rem !important; }
.promotion-reference-form-panel .promotion-product-section-head .select_purchase_product,
.promotion-reference-form-panel .qd-product-select-button,
.promotion-reference-form-panel .sdp-product-select-button { font-size: 0.94rem !important; }

/* Scanner, empty-state and selected-product copy. */
.promotion-reference-form-panel .promotion-product-scan__hint,
.promotion-reference-form-panel .qd-product-scan__hint,
.promotion-reference-form-panel .sdp-product-scan__hint { font-size: 0.75rem !important; }
.promotion-reference-form-panel .promotion-product-picker .flex-table-header { font-size: 0.83rem !important; }
.promotion-reference-form-panel .promotion-product-picker .flex-table-item,
.promotion-reference-form-panel .promotion-product-empty__copy strong,
.promotion-reference-form-panel .promotion-selected-count,
.promotion-reference-form-panel .promotion-selected-price-wrap .promotion-selected-price,
.promotion-reference-form-panel .promotion-selected-empty__copy strong,
.promotion-reference-form-panel .qd-product-list__count,
.promotion-reference-form-panel .qd-product-empty__copy strong,
.promotion-reference-form-panel .sdp-product-empty__copy strong { font-size: 0.88rem !important; }
.promotion-reference-form-panel .promotion-product-empty__copy > span,
.promotion-reference-form-panel .promotion-selected-empty__copy > span,
.promotion-reference-form-panel .qd-product-empty__copy > span,
.promotion-reference-form-panel .sdp-product-empty__copy > span { font-size: 0.79rem !important; }
.promotion-reference-form-panel .promotion-selected-badge,
.promotion-reference-form-panel .qd-product-list__badge { font-size: 0.87rem !important; }
.promotion-reference-form-panel .promotion-selected-clear,
.promotion-reference-form-panel .qd-product-clear { font-size: 0.85rem !important; }
.promotion-reference-form-panel .promotion-selected-marker,
.promotion-reference-form-panel .qd-product-item__marker,
.promotion-reference-form-panel .sdp-product-item__marker { font-size: 0.86rem !important; }
.promotion-reference-form-panel .promotion-selected-name,
.promotion-reference-form-panel .qd-product-item__name,
.promotion-reference-form-panel .sdp-product-item__name { font-size: 0.99rem !important; }
.promotion-reference-form-panel .promotion-selected-meta,
.promotion-reference-form-panel .qd-product-item__meta,
.promotion-reference-form-panel .sdp-product-item__meta { font-size: 0.78rem !important; }
.promotion-reference-form-panel .promotion-selected-price-wrap { font-size: 0.72rem !important; }

/* Date/repeat helpers use the same 30% scale as package-items secondary copy. */
.promotion-reference-form-panel .qd-validity-copy p,
.promotion-reference-form-panel .sdp-date-copy p,
.promotion-reference-form-panel .sdp-repeat-copy p,
.promotion-reference-form-panel .qd-date-field__label,
.promotion-reference-form-panel .sdp-date-label { font-size: 0.86rem !important; }
.promotion-reference-form-panel .qd-toggle__label,
.promotion-reference-form-panel .sdp-toggle__label { font-size: 0.91rem !important; }
.promotion-reference-form-panel .qd-date-range__separator,
.promotion-reference-form-panel .sdp-date-separator,
.promotion-reference-form-panel .qd-date-field .input,
.promotion-reference-form-panel .qd-date-field .datetimepicker-dummy-input,
.promotion-reference-form-panel .sdp-date-field .input,
.promotion-reference-form-panel .sdp-date-field .datetimepicker-dummy-input { font-size: 0.99rem !important; }
.promotion-reference-form-panel .promotion-form-actions .button,
.promotion-reference-form-panel .qd-form-actions .button,
.promotion-reference-form-panel .sdp-panel-actions .button { font-size: 1.14rem !important; }

.is-dark .promotion-management-page .promotion-list-card,
.is-dark .promotion-management-page .promotion-list-header,
.is-dark .promotion-form-panel .right-panel-head,
.is-dark .promotion-form-panel .promotion-form-section,
.is-dark .promotion-product-modal .modal-card,
.is-dark .promotion-product-modal .modal-card-head,
.is-dark .promotion-product-modal .modal-card-foot,
.is-dark .package-items-detail-modal .modal-card,
.is-dark .package-items-detail-modal .modal-card-head,
.is-dark .package-items-detail-modal .modal-card-foot { background: #252936; border-color: #363c4d; }
.is-dark .promotion-form-panel .right-panel,
.is-dark .promotion-form-panel .right-panel-body,
.is-dark .promotion-product-modal .modal-card-body,
.is-dark .package-items-detail-modal .modal-card-body { background: #20232e; }

@media (max-width: 760px) {
    .promotion-management-page .promotion-list-heading,
    .promotion-management-page .promotion-list-toolbar { align-items: stretch; flex-direction: column; }
    .promotion-management-page .promotion-add-button { width: 100%; }
    .package-management-page .package-items-header-actions { width: 100%; }
    .package-management-page .package-items-header-actions .promotion-add-button { flex: 1 1 auto; }
    .promotion-reference-page .promotion-reference-header-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: stretch;
    }
    .promotion-reference-page .promotion-reference-header-actions .promotion-add-button { flex: 1 1 150px; }
    .promotion-reference-page .promotion-reference-warehouse { flex: 1 1 230px; }
    .promotion-reference-page .promotion-reference-warehouse select,
    .promotion-reference-page .promotion-reference-warehouse .select2-container { flex: 1 1 auto; width: auto !important; }
    .promotion-management-page .promotion-list-toolbar > .column { width: 100%; }
    .promotion-management-page .promotion-list-toolbar .field.has-addons { display: grid; grid-template-columns: auto 1fr auto; }
    .promotion-form-panel .right-panel { width: 100vw; }
    .promotion-form-panel .right-panel-body { padding: 0; }
    .promotion-form-panel .right-panel-body > .form-body { padding: 12px 12px 0 !important; }
    .promotion-form-panel .promotion-product-picker { grid-template-columns: minmax(0, 1fr) 82px; }
    .promotion-form-panel .promotion-form-actions { margin: auto -12px 0; padding: 22px 12px 12px !important; }
}
@media (max-width: 480px) {
    .package-management-page .package-items-summary { grid-template-columns: 34px minmax(0, 1fr) 15px; }
    .package-management-page .package-items-summary__action { display: none; }
    .package-items-detail-columns,
    .package-items-detail-row { grid-template-columns: 30px minmax(0, 1fr) 82px; gap: 7px; }
    .promotion-form-panel .promotion-selected-item.has-price {
        grid-template-columns: 28px minmax(0, 1fr) 30px;
    }
    .promotion-form-panel .promotion-selected-price-wrap {
        grid-column: 2;
        width: 100%;
    }
    .promotion-form-panel .promotion-selected-price-wrap .promotion-selected-price {
        width: 100% !important;
    }
    .promotion-form-panel .promotion-selected-item.has-price .promotion-selected-remove {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}
