body.primer-orders-page {
    --pm-bg: #faf9f5;
    --pm-card: #ffffff;
    --pm-border: #e6e4dd;
    --pm-border-soft: #f0ede6;
    --pm-text: #1e1e1c;
    --pm-muted: #6f6d66;
    --pm-primary: #43629e;
    --pm-primary-dark: #37527f;
    --pm-cancel: #b9645d;
    --pm-cancel-dark: #a3544e;
    --pm-dark: #171b21;
    --pm-radius: 12px;
    --pm-radius-sm: 8px;
    --pm-radius-lg: 16px;
    --pm-pill-padding: 2px 15px;
    --pm-pill-radius: 999px;
    background: var(--pm-bg);
    color: var(--pm-text);
    font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.primer-orders-page #wpbody-content {
    background: var(--pm-bg);
    padding-bottom: 40px;
}

body.primer-orders-page .wrap {
    position: relative;
    padding: 0 20px 0 0;
    margin: 20px 0;
}

/* --- Admin notices --- */
body.primer-orders-page .wrap > .notice,
body.primer-orders-page .wrap > div.updated,
body.primer-orders-page .wrap > div.error {
    --pm-notice-accent: var(--pm-primary);
    --pm-notice-bg: var(--pm-card);
    --pm-notice-border: var(--pm-border);
    box-sizing: border-box;
    margin: 0 0 16px;
    padding: 14px 18px;
    background: var(--pm-notice-bg);
    border: 1px solid var(--pm-notice-border);
    border-radius: var(--pm-radius-lg);
    box-shadow: none;
    color: var(--pm-text);
    font-size: 14px;
    line-height: 1.5;
}

body.primer-orders-page .wrap > .notice p,
body.primer-orders-page .wrap > div.updated p,
body.primer-orders-page .wrap > div.error p {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 14px;
    line-height: 1.5;
}

body.primer-orders-page .wrap > .notice a,
body.primer-orders-page .wrap > div.updated a,
body.primer-orders-page .wrap > div.error a {
    color: var(--pm-primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

body.primer-orders-page .wrap > .notice a:hover,
body.primer-orders-page .wrap > div.updated a:hover,
body.primer-orders-page .wrap > div.error a:hover {
    color: var(--pm-primary-dark);
}

body.primer-orders-page .wrap > .notice-error,
body.primer-orders-page .wrap > div.error {
    --pm-notice-accent: #b02f2f;
    --pm-notice-bg: #fbe7e7;
    --pm-notice-border: #b03a3a;
}

body.primer-orders-page .wrap > .notice-success,
body.primer-orders-page .wrap > div.updated {
    --pm-notice-accent: #3f7a3a;
    --pm-notice-bg: #f7fbf5;
    --pm-notice-border: #d9ead3;
}

body.primer-orders-page .wrap > .notice-warning {
    --pm-notice-accent: #8a6a1c;
    --pm-notice-bg: #fdf3d5;
    --pm-notice-border: #8a6a1c;
}

body.primer-orders-page .wrap > .notice-info {
    --pm-notice-accent: #43629e;
    --pm-notice-bg: #f5f8fd;
    --pm-notice-border: #d8e2f2;
}

/* --- Search bar --- */
body.primer-orders-page .primer-orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 0 16px;
}

body.primer-orders-page .primer-orders-header h2 {
    margin: 0;
}

body.primer-orders-page .primer-orders-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

body.primer-orders-page .primer-orders-search input[type="search"] {
    min-width: 250px;
    height: 38px;
    padding: 0 14px;
    border: 2px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    background: #fff;
    font-size: 14px;
    color: var(--pm-text);
    box-shadow: none;
}

body.primer-orders-page .primer-orders-search input[type="search"]:focus {
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 3px rgba(67, 98, 158, .15);
    outline: 0;
}

body.primer-orders-page .primer-orders-search input[type="submit"] {
    height: 38px;
    padding: 0 22px;
    background: var(--pm-primary);
    border: 0;
    border-radius: var(--pm-radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-shadow: none;
}

body.primer-orders-page .primer-orders-search input[type="submit"]:hover {
    background: var(--pm-primary-dark);
}

/* --- Filter bar --- */
body.primer-orders-page #primer_order_table .tablenav {
    display: block;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
}

body.primer-orders-page #primer_order_table .tablenav > * {
    float: none;
}

body.primer-orders-page #primer_order_table .tablenav.top .alignleft.actions {
    width: 100%;
    clear: both;
    margin: 0;
    padding: 0;
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-lg);
}

body.primer-orders-page #primer_order_table .tablenav.top .alignleft.actions > h2,
body.primer-orders-page #primer_order_table .tablenav.top .alignleft.actions > h3 {
    display: none;
}

body.primer-orders-page #primer_order_table .tablenav.top .alignleft.actions > h4 {
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 400;
    font-style: italic;
    color: var(--pm-muted);
}

body.primer-orders-page #primer_order_table .filter_blocks_wrapper {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    gap: 22px;
    background: var(--pm-card);
    border: 1px solid var(--pm-border) !important;
    border-radius: var(--pm-radius-lg);
    padding: 10px 20px 20px;
    margin: 0;
    max-width: none;
    width: 100%;
    box-sizing: border-box;
}

body.primer-orders-page #primer_order_table .filter_blocks_wrapper > .left_wrap,
body.primer-orders-page #primer_order_table .filter_blocks_wrapper > .right_wrap {
    display: contents;
}

body.primer-orders-page #primer_order_table .filter_block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    margin: 0;
    padding: 0;
    min-width: 0;
    max-width: none;
    width: auto;
}

body.primer-orders-page #primer_order_table .filter_block label {
    width: auto;
    float: none !important;
    font-size: 12px;
    font-weight: 500;
    color: var(--pm-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.primer-orders-page #primer_order_table .filter_block:has(#order_date_from, #receipt_date_from) {
    grid-column: span 2;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: auto auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
    align-items: end;
}

body.primer-orders-page #primer_order_table .filter_block select,
body.primer-orders-page #primer_order_table .filter_block input[type="text"] {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--pm-radius-sm);
    background: #fff;
    font-size: 14px;
    color: var(--pm-text);
    vertical-align: middle;
}



body.primer-orders-page #primer_order_table .filter_blocks_wrapper .select2-container {
    width: 100% !important;
    max-width: none;
}

body.primer-orders-page :is(#tables-filter, #tables-receipt-filter) .select2-container .select2-selection--single {
    height: 38px;
    border-radius: var(--pm-radius-sm);
    background: #fff;
}

body.primer-orders-page :is(#tables-filter, #tables-receipt-filter) .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    padding-right: 26px;
    color: var(--pm-text);
}

body.primer-orders-page :is(#tables-filter, #tables-receipt-filter) .select2-container .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

body.primer-orders-page #primer_order_table .filter_blocks_wrapper .bootstrap-select {
    width: 100%;
    max-width: none;
}

body.primer-orders-page :is(#tables-filter, #tables-receipt-filter) .bootstrap-select .dropdown-toggle {
    height: 38px;
    line-height: 36px;
    padding: 0 12px;
    border-radius: var(--pm-radius-sm);
    background: #fff;
    color: var(--pm-text);
    font-size: 14px;
}

/* --- Apply / clear filter --- */
body.primer-orders-page #primer_order_table .apply_btn {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-self: end;
    align-self: end;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

body.primer-orders-page #primer_order_table .apply_btn .button {
    height: 38px;
    margin: 0;
    padding: 0 20px;
    border-radius: var(--pm-radius-sm);
    font-size: 14px;
    line-height: 36px;
    background: var(--pm-primary);
    border: 1px solid var(--pm-primary);
    color: #fff;
    font-weight: 500;
    box-shadow: none;
    text-shadow: none;
}

body.primer-orders-page #primer_order_table .apply_btn .button:hover {
    background: var(--pm-primary-dark);
    border-color: var(--pm-primary-dark);
    color: #fff;
}

body.primer-orders-page #primer_order_table .apply_btn .primer-clear-filter {
    height: 38px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--pm-radius-sm);
    background: #fff;
    border: 1px solid var(--pm-border);
    color: var(--pm-text);
    font-size: 14px;
    text-decoration: none;
    box-sizing: border-box;
    margin-left: 20px;
}

body.primer-orders-page #primer_order_table .apply_btn .primer-clear-filter:hover {
    border-color: var(--pm-primary);
    color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .bulkactions {
    display: none;
}

/* --- Pagination --- */
body.primer-orders-page #primer_order_table .tablenav-pages {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--pm-muted);
    background: var(--pm-card);
    padding: 10px;
    border-radius: var(--pm-radius);
    border: 2px solid var(--pm-border);
}

body.primer-orders-page #primer_order_table .tablenav-pages .displaying-num {
    margin: 0 10px 0 0;
}

body.primer-orders-page #primer_order_table .tablenav-pages a,
body.primer-orders-page #primer_order_table .tablenav-pages span.tablenav-pages-navspan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    background: #fff;
    color: var(--pm-text);
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1;
}

body.primer-orders-page #primer_order_table .tablenav-pages a:hover {
    border-color: var(--pm-primary);
    color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .tablenav-pages .current-page {
    width: 48px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    text-align: center;
    font-size: 13px;
    color: var(--pm-text);
}

body.primer-orders-page #primer_order_table .tablenav.bottom .tablenav-pages {
    margin-top: 0;
}

/* --- Table --- */
body.primer-orders-page #primer_order_table .wp-list-table {
    width: 100%;
    margin: 0;
    background: var(--pm-card);
    border: 2px solid var(--pm-border);
    border-radius: var(--pm-radius);
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: none;
    overflow: hidden;
    font-size: 14px;
    table-layout: auto;
}

body.primer-orders-page #primer_order_table .wp-list-table .column-order_hour,
body.primer-orders-page #primer_order_table .wp-list-table .column-credit_receipt,
body.primer-orders-page #primer_order_table .wp-list-table .column-credit_log,
body.primer-orders-page #primer_order_table .wp-list-table .column-accept_48 {
    display: none;
}

body.primer-orders-page #primer_order_table .wp-list-table thead th,
body.primer-orders-page #primer_order_table .wp-list-table thead td,
body.primer-orders-page #primer_order_table .wp-list-table tfoot th,
body.primer-orders-page #primer_order_table .wp-list-table tfoot td {
    background: var(--pm-card);
    border: 0;
    border-bottom: 1px solid var(--pm-border-soft);
    padding: 22px 12px;
    font-size: 13px;
    font-weight: 400;
    color: var(--pm-muted);
    text-align: left;
    white-space: nowrap;
    max-width: none;
}

body.primer-orders-page #primer_order_table .wp-list-table tbody td,
body.primer-orders-page #primer_order_table .wp-list-table tbody th {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--pm-border-soft);
    vertical-align: middle;
    color: var(--pm-text);
    background: transparent;
}

body.primer-orders-page #primer_order_table .wp-list-table tbody tr:last-child td,
body.primer-orders-page #primer_order_table .wp-list-table tbody tr:last-child th {
    border-bottom: 0;
}

body.primer-orders-page #primer_order_table .wp-list-table tbody tr:hover > td,
body.primer-orders-page #primer_order_table .wp-list-table tbody tr:hover > th {
    background: #fdfcfa;
}

body.primer-orders-page #primer_order_table .wp-list-table .check-column {
    width: 40px;
    padding-left: 18px;
    padding-right: 0;
    text-align: left;
}

body.primer-orders-page #primer_order_table .order-view {
    text-decoration: none;
    color: inherit;
}

body.primer-orders-page #primer_order_table .order-view:hover strong {
    color: var(--pm-primary);
}

/* --- Status pills --- */
body.primer-orders-page #primer_order_table .primer-status,
body.primer-orders-page #primer_order_table .primer-mydata {
    display: inline-block;
    padding: var(--pm-pill-padding);
    border-radius: var(--pm-pill-radius);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

body.primer-orders-page #primer_order_table .primer-status {
    line-height: 1.7;
}

body.primer-orders-page #primer_order_table .primer-status--on-hold {
    background: #fdf3d5;
    color: #8a6a1c;
}

body.primer-orders-page #primer_order_table .primer-status--processing {
    background: #e3ecf9;
    color: #3a6bb5;
}

body.primer-orders-page #primer_order_table .primer-status--completed,
body.primer-orders-page #primer_order_table .primer-mydata {
    background: #e6f2e2;
    color: #3f7a3a;
}

body.primer-orders-page #primer_order_table .primer-status--failed,
body.primer-orders-page #primer_order_table .primer-mydata--fail {
    background: #fbe7e7;
    color: #b03a3a;
}

body.primer-orders-page #primer_order_table .primer-status--pending,
body.primer-orders-page #primer_order_table .primer-status--cancelled,
body.primer-orders-page #primer_order_table .primer-status--refunded {
    background: #f1efe9;
    color: var(--pm-muted);
}

/* --- Receipt / credit buttons --- */
body.primer-orders-page #primer_order_table .column-receipt_date .primer-receipt-actions {
    display: grid;
    width: 100%;
    gap: 6px;
}

body.primer-orders-page #primer_order_table .column-receipt_date .primer-receipt-actions > .order-view {
    box-sizing: border-box;
    width: 85%;
    justify-content: center;
}

body.primer-orders-page #primer_order_table .column-receipt_date .order-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    padding: 6px 16px;
    border: 1px solid transparent;
    border-radius: var(--pm-radius-sm);
    background: var(--pm-primary);
    color: #fff;
    font-size: 12px;
    line-height: 1.7;
    font-weight: 500;
    white-space: nowrap;
    vertical-align: middle;
}

body.primer-orders-page #primer_order_table .column-receipt_date .order-view:hover {
    background: var(--pm-primary-dark);
    border-color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .column-receipt_date .order-view:focus {
    border-color: var(--pm-primary);
    outline: 2px solid var(--pm-primary);
    outline-offset: 0;
}

body.primer-orders-page #primer_order_table .column-receipt_date .order-view strong {
    color: #fff;
    font-weight: 500;
}

body.primer-orders-page #primer_order_table .column-receipt_date .primer-cancelled-receipt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    padding: 6px 16px;
    border: 1px solid transparent;
    border-radius: var(--pm-radius-sm);
    background: var(--pm-cancel);
    color: #fff;
    font-size: 12px;
    line-height: 1.7;
    font-weight: 500;
    white-space: nowrap;
    vertical-align: middle;
}

body.primer-orders-page #primer_order_table .column-receipt_date .primer-cancelled-receipt:hover {
    background: var(--pm-cancel-dark);
    border-color: var(--pm-cancel);
}

body.primer-orders-page #primer_order_table .column-receipt_date .primer-cancelled-receipt:focus {
    border-color: var(--pm-cancel);
    outline: 2px solid var(--pm-cancel);
    outline-offset: 0;
}

body.primer-orders-page #primer_order_table .column-receipt_date .primer-cancelled-receipt strong {
    color: #fff;
    font-weight: 500;
}

body.primer-orders-page #primer_order_table .column-receipt_status .order-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-sizing: border-box;
    width: 64px;
    min-width: 64px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    background: #fff;
    color: var(--pm-text);
    font-size: 13px;
    text-decoration: none;
}

body.primer-orders-page #primer_order_table .column-receipt_status .order-view:not(.primer-cancelled-log):hover {
    border-color: var(--pm-primary);
    color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .column-receipt_status .order-view:not(.primer-cancelled-log):focus {
    border-color: var(--pm-primary);
    color: var(--pm-primary);
    outline: 2px solid var(--pm-primary);
    outline-offset: 0;
}

body.primer-orders-page #primer_order_table .column-receipt_status .primer-cancelled-log {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-sizing: border-box;
    width: 64px;
    min-width: 64px;
    height: 34px;
    margin: 6px 0 0;
    padding: 0;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}

body.primer-orders-page #primer_order_table .column-receipt_status .primer-cancelled-log:hover {
    border-color: var(--pm-cancel);
}

body.primer-orders-page #primer_order_table .column-receipt_status .primer-cancelled-log:focus {
    border-color: var(--pm-cancel);
    outline: 2px solid var(--pm-cancel);
    outline-offset: 0;
}

body.primer-orders-page #primer_order_table .column-receipt_status .primer-cancelled-log strong {
    display: none;
}

/* --- Button icons --- */
body.primer-orders-page #primer_order_table .column-receipt_date .order-view::before,
body.primer-orders-page #primer_order_table .column-receipt_status .order-view::before,
body.primer-orders-page #primer_order_table .column-receipt_date .primer-cancelled-receipt::before,
body.primer-orders-page #primer_order_table .column-receipt_status .primer-cancelled-log::before {
    font-family: dashicons;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-block;
    text-align: center;
    speak: never;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.primer-orders-page #primer_order_table .column-receipt_date .order-view::before {
    content: "\f121";
}

body.primer-orders-page #primer_order_table .column-receipt_status .order-view:not(.primer-cancelled-log)::before {
    content: "\f481";
    color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .column-receipt_date .primer-cancelled-receipt::before {
    content: "\f121";
}

body.primer-orders-page #primer_order_table .column-receipt_status .primer-cancelled-log::before {
    content: "\f481";
    color: var(--pm-cancel);
}

/* --- Bottom action bar --- */
body.primer-orders-page .submit.convert_orders {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--pm-dark);
    border-radius: var(--pm-radius);
    padding: 14px 20px;
    margin: 18px 0 0 !important;
}

body.primer-orders-page .submit.convert_orders .send_receipts_wrap {
    order: 2;
    margin-right: 0;
}

body.primer-orders-page .submit.convert_orders .send_receipts_wrap .button {
    height: 38px;
    padding: 0 18px;
    line-height: 36px;
    margin: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--pm-radius-sm);
    color: #fff;
    box-shadow: none;
    text-shadow: none;
}

body.primer-orders-page .submit.convert_orders .send_receipts_wrap .button:hover {
    background: rgba(255, 255, 255, .1);
    border-color: #fff;
    color: #fff;
}

body.primer-orders-page .submit.convert_orders input[type="submit"] {
    height: 38px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--pm-radius-sm);
    background: #fff;
    color: var(--pm-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none;
    text-shadow: none;
}

body.primer-orders-page .submit.convert_orders input[type="submit"]:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* --- Selected rows --- */
body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name$="[]"]:checked) > td,
body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name$="[]"]:checked) > th {
    background: #e3f1e3 !important;
}

body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name$="[]"]:checked) > th.check-column {
    box-shadow: inset 3px 0 0 var(--pm-primary) !important;
}

body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name$="[]"]:checked):hover > td,
body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name$="[]"]:checked):hover > th {
    background: #e3f1e3 !important;
}

body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name="orders[]"]:checked) > th.check-column {
    box-shadow: inset 3px 0 0 var(--pm-primary) !important;
}

body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name="orders[]"]:checked):hover > td,
body.primer-orders-page #primer_order_table .wp-list-table tbody tr:has(input[name="orders[]"]:checked):hover > th {
    background: #e3f1e3 !important;
}

body.primer-orders-page #primer_order_table .wp-list-table .check-column input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    border-radius: 4px;
    accent-color: var(--pm-primary);
    box-shadow: none;
    vertical-align: middle;
    cursor: pointer;
}

.check-column label:hover,
.check-column input:hover + label {
    background: unset !important;
}

/* --- Table text helpers --- */
.payment_status a *,
.order_price a *,
.order_client a *,
.order_date a *,
.receipt_status a * {
    font-weight: 400 !important;
}

body.primer-orders-page #primer_order_table .primer-date,
body.primer-orders-page #primer_order_table .primer-hour {
    display: block;
}

body.primer-orders-page #primer_order_table .primer-date {
    font-weight: 400;
}

body.primer-orders-page #primer_order_table .primer-hour {
    font-size: 12px;
    color: var(--pm-muted);
}

body.primer-orders-page #primer_order_table .order_id strong {
    color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .order_id strong:hover {
    color: var(--pm-primary-dark);
}

/* --- Misc --- */
.primer-admin-menu-wrap {
    color: var(--pm-muted) !important;
}

.order-dos {
    color: var(--pm-muted);
    font-size: 15px;
    font-weight: 500;
}

.primer-version {
    color: #8f8888;
    font-size: 14px;
}

/* --- Pagination bars --- */
body.primer-orders-page #primer_order_table .tablenav.bottom {
    display: block;
    height: auto;
    margin-top: 14px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    background: var(--pm-card);
    padding: 10px;
    border: 2px solid var(--pm-border);
    border-radius: var(--pm-radius);
    margin-top: 12px;
    margin-bottom: 12px;
}

body.primer-orders-page #primer_order_table .tablenav.bottom .primer-tablenav-bar {
    margin-top: 0;
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .tablenav-pages {
    float: none;
    margin: 0 0 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders {
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 10px;
    margin: 0 !important;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders .send_receipts_wrap {
    order: 2;
    margin-right: 0;
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders .send_receipts_wrap .button {
    background: #fff;
    border-color: var(--pm-border);
    color: var(--pm-text);
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders .send_receipts_wrap .button:hover {
    background: #fff;
    border-color: var(--pm-primary);
    color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders input[type="submit"] {
    background: var(--pm-primary) !important;
    color: #fff !important;
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders input[type="submit"]:hover:not(:disabled) {
    background: var(--pm-primary-dark);
}

body.primer-orders-page #primer_order_table .tablenav > br.clear {
    display: none;
}

/* --- Modal --- */
body.primer-orders-page .primer_popup.popup_success,
body.primer-orders-page .primer_popup.popup_error {
    z-index: 100000;
    background: rgba(23, 27, 33, .3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(1px);
    animation: primerModalOverlayIn .3s ease-out;
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}

body.primer-orders-page .primer_popup.popup_success > div,
body.primer-orders-page .primer_popup.popup_error > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100% !important;
    max-width: 480px !important;
    max-height: calc(100vh - 48px) !important;
    padding: 32px !important;
    box-sizing: border-box !important;
    overflow-y: auto;
    position: relative !important;
    margin: 0 !important;
    background: #ffffff !important;
    -webkit-backdrop-filter: blur(24px) !important;
    backdrop-filter: blur(2px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 28px !important;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.1) !important;
    color: #1a1a1a;
    text-align: left;
    animation: primerModalCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

body.primer-orders-page .primer_popup.popup_success > div::before,
body.primer-orders-page .primer_popup.popup_error > div::before {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4) !important;
    animation: floatIcon 3s ease-in-out infinite !important;
}

body.primer-orders-page .primer_popup.popup_success > div::before {
    content: "\2713";
    margin-bottom: 18px !important;
    background: #10b981 !important;
    color: #fff !important;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.45) !important;
}

body.primer-orders-page .primer_popup.popup_error > div::before {
    content: "!";
    margin-bottom: 18px !important;
    background: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.45) !important;
}

body.primer-orders-page .primer_popup.popup_success > div > div {
    display: contents !important;
}

body.primer-orders-page .primer_popup.popup_error > div > div {
    width: 100% !important;
}

body.primer-orders-page .primer_popup.popup_success > div br,
body.primer-orders-page .primer_popup.popup_error > div br {
    display: none !important;
}

body.primer-orders-page .primer_popup.popup_success > div h3,
body.primer-orders-page .primer_popup.popup_error > div h3 {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #1a1a1a !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    letter-spacing: -.5px !important;
    text-align: center !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) !important;
}

body.primer-orders-page .primer_popup.popup_success > div h3 {
    max-height: 250px !important;
    padding: 22px !important;
    overflow-y: auto !important;
    background: rgb(102 207 158 / 18%) !important;
    border: 1px solid #ffffff !important;
    border-radius: 12px !important;
    color: #047857 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    scrollbar-width: thin !important;
    scrollbar-color: #a7d7c5 transparent !important;
    text-shadow: none !important;
}

body.primer-orders-page .primer_popup.popup_success > div h3::-webkit-scrollbar {
    width: 6px !important;
}

body.primer-orders-page .primer_popup.popup_success > div h3::-webkit-scrollbar-thumb {
    background: #a7d7c5 !important;
    border-radius: 999px !important;
}

body.primer-orders-page .primer_popup.popup_error > div h3 {
    padding: 22px !important;
    overflow-y: auto !important;
    background: rgb(115 65 65 / 8%) !important;
    border: 1px solid #ffffff !important;
    border-radius: 12px !important;
    color: #dc2626 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    scrollbar-width: thin !important;
    scrollbar-color: #dfb7b7 transparent !important;
    text-shadow: none !important;
    text-align: center !important;
    text-wrap: pretty;
    line-height: 1.3 !important;
    max-height: fit-content !important;
    align-items: center !important;
}

body.primer-orders-page .primer_popup.popup_error > div h3::-webkit-scrollbar {
    width: 6px !important;
}

body.primer-orders-page .primer_popup.popup_error > div h3::-webkit-scrollbar-thumb {
    background: #dfb7b7 !important;
    border-radius: 999px !important;
}

body.primer-orders-page .primer_popup.popup_success .popup_ok,
body.primer-orders-page .primer_popup.popup_error .popup_ok {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 52px !important;
    margin: 32px 0 0 !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
    background: #111827 !important;
    border: none !important;
    border-radius: 14px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
    cursor: pointer !important;
    transition: background-color .2s cubic-bezier(0.16, 1, 0.3, 1),
    transform .2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow .2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.primer-orders-page .primer_popup.popup_success .popup_ok:hover,
body.primer-orders-page .primer_popup.popup_error .popup_ok:hover {
    background: #1f2937 !important;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25) !important;
}

body.primer-orders-page .primer_popup.popup_success .popup_ok:active,
body.primer-orders-page .primer_popup.popup_error .popup_ok:active {
    transform: translateY(0) scale(0.98) !important;
}



body.primer-orders-page .primer_popup.popup_error .popup_ok {
    background: #ef4444 !important;
    box-shadow: none !important;
}

body.primer-orders-page .primer_popup.popup_error .popup_ok:hover {
    background: #dc2626 !important;
    box-shadow: none !important;
}

body.primer-orders-page .primer_popup.popup_success .popup_ok {
    background: #10b981 !important;
    box-shadow: none !important;
}

body.primer-orders-page .primer_popup.popup_success .popup_ok:hover {
    background: #059669 !important;
    box-shadow: none !important;
}



@keyframes primerModalOverlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes primerModalCardIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.popup_wrapper {
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    top: 0 !important;
}

/* --- Responsive --- */
@media screen and (max-width: 1500px) {
    body.primer-orders-page #primer_order_table .filter_blocks_wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.primer-orders-page #primer_order_table .apply_btn {
        grid-column: 1 / -1;
        justify-self: end;
    }
}

@media screen and (max-width: 1100px) {
    body.primer-orders-page #primer_order_table .filter_blocks_wrapper {
        grid-template-columns: 1fr;
    }

    body.primer-orders-page #primer_order_table .filter_block:has(#order_date_from, #receipt_date_from) {
        grid-column: auto;
        grid-auto-flow: row;
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 600px) {
    body.primer-orders-page .primer_popup.popup_success > div,
    body.primer-orders-page .primer_popup.popup_error > div {
        width: 100% !important;
        max-height: calc(100vh - 32px) !important;
        padding: 28px 24px 24px 24px !important;
        border-radius: 24px !important;
    }

    body.primer-orders-page .primer_popup.popup_success > div::before,
    body.primer-orders-page .primer_popup.popup_error > div::before {
        width: 64px !important;
        height: 64px !important;
        font-size: 28px !important;
    }

    body.primer-orders-page .primer_popup.popup_success .popup_ok,
    body.primer-orders-page .primer_popup.popup_error .popup_ok {
        margin-top: 24px !important;
        height: 48px !important;
    }
}

/* --- WP reset overrides for the filter area --- */
body.primer-orders-page :is(#tables-filter, #tables-receipt-filter),
body.primer-orders-page #primer_order_table .tablenav.top,
body.primer-orders-page #primer_order_table .tablenav.top .alignleft.actions,
body.primer-orders-page #primer_order_table .filter_blocks_wrapper {
    outline: 0 !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}

body.primer-orders-page #primer_order_table .filter_blocks_wrapper::before,
body.primer-orders-page #primer_order_table .filter_blocks_wrapper::after,
body.primer-orders-page #primer_order_table .tablenav.top::before,
body.primer-orders-page #primer_order_table .tablenav.top::after,
body.primer-orders-page #primer_order_table .tablenav.top .alignleft.actions::before,
body.primer-orders-page #primer_order_table .tablenav.top .alignleft.actions::after {
    outline: 0 !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
}

body.primer-orders-page #primer_order_table .filter_blocks_wrapper select,
body.primer-orders-page #primer_order_table .filter_blocks_wrapper input[type="text"],
body.primer-orders-page #primer_order_table .filter_blocks_wrapper .select2-container .select2-selection--single,
body.primer-orders-page #primer_order_table .filter_blocks_wrapper .bootstrap-select .dropdown-toggle {
    border: 1px solid var(--pm-border) !important;
    outline: 0 !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

body.primer-orders-page #primer_order_table .filter_blocks_wrapper a:focus,
body.primer-orders-page #primer_order_table .filter_blocks_wrapper button:focus,
body.primer-orders-page #primer_order_table .filter_blocks_wrapper input[type="submit"]:focus {
    border-color: var(--pm-border) !important;
    outline: 0 !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {

    body.primer-orders-page .primer_popup.popup_success,
    body.primer-orders-page .primer_popup.popup_error,
    body.primer-orders-page .primer_popup.popup_success > div,
    body.primer-orders-page .primer_popup.popup_error > div,
    body.primer-orders-page .primer_popup.popup_success .popup_ok,
    body.primer-orders-page .primer_popup.popup_error .popup_ok {
        animation: none !important;
        transition: none !important;
    }

    body.primer-orders-page .primer_popup.popup_success .popup_ok:hover,
    body.primer-orders-page .primer_popup.popup_error .popup_ok:hover {
        transform: none !important;
    }
}


body.primer-orders-page #primer_order_table .tablenav.top .primer-tablenav-bar .send_receipts_wrap--log {
    display: none !important;
}

/* --- Modern date picker --- */
body.primer-orders-page #primer_order_table .filter_block input.hasDatepicker {
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f6d66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    cursor: pointer;
}

body.primer-orders-page .ui-datepicker {
    width: 316px;
    padding: 14px;
    background: var(--pm-card);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-lg);
    /*box-shadow: 0 20px 45px -18px rgba(23, 27, 33, .35), 0 6px 16px -8px rgba(23, 27, 33, .18);*/
    color: var(--pm-text);
    font-family: inherit;
    font-size: 13px;
    z-index: 100000 !important;
}


body.primer-orders-page .ui-datepicker .ui-datepicker-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0 0 10px;
    padding: 0 42px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--pm-text);
    font-weight: 400;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-title {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 0;
    color: var(--pm-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-title .ui-datepicker-year {
    color: var(--pm-muted);
    font-weight: 500;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-prev,
body.primer-orders-page .ui-datepicker .ui-datepicker-next {
    position: absolute;
    top: 50%;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-prev {
    left: 0;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-next {
    right: 0;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-prev span,
body.primer-orders-page .ui-datepicker .ui-datepicker-next span {
    display: none;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-prev::before,
body.primer-orders-page .ui-datepicker .ui-datepicker-next::before {
    content: "";
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 18px 18px;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-prev::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231e1e1c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
}

body.primer-orders-page .ui-datepicker .ui-datepicker-next::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231e1e1c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
}

body.primer-orders-page .ui-datepicker .ui-datepicker-prev:hover,
body.primer-orders-page .ui-datepicker .ui-datepicker-next:hover {
    background-color: #f4f5f7;
    border-color: var(--pm-border);
}

body.primer-orders-page .ui-datepicker .ui-datepicker-prev.ui-state-disabled,
body.primer-orders-page .ui-datepicker .ui-datepicker-next.ui-state-disabled {
    background: transparent;
    border-color: transparent;
    opacity: .35;
    cursor: default;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

/* restore the weekday row hidden in primer-admin.css */
body.primer-orders-page .ui-datepicker .ui-datepicker-calendar thead {
    display: table-header-group !important;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar thead th {
    padding: 4px 0 8px;
    background: transparent;
    border: 0;
    color: var(--pm-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td {
    padding: 1px;
    background: transparent;
    border: 0;
    text-align: center;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td a,
body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td span.ui-state-default {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--pm-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td a:hover {
    background-color: #eef2f9;
    border-color: #dde5f2;
    color: var(--pm-primary);
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-today a:not(.ui-state-active) {
    background-color: transparent;
    border-color: var(--pm-primary);
    color: var(--pm-primary);
    font-weight: 600;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td a.ui-state-active,
body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-current-day a {
    background-color: var(--pm-primary);
    border-color: var(--pm-primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 14px -6px rgba(67, 98, 158, .7);
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-other-month a,
body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-other-month span.ui-state-default {
    color: #bfc3ca;
    font-weight: 400;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-calendar tbody td.ui-state-disabled span.ui-state-default {
    color: #d6d8dd;
    cursor: default;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-buttonpane {
    display: none;
}

body.primer-orders-page .ui-datepicker .ui-datepicker-title select {
    width: auto !important;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 3px 22px 3px 8px;
    border: 1px solid var(--pm-border);
    border-radius: 8px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f6d66' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px 12px;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    font-size: 13px;
    color: var(--pm-text);
    cursor: pointer;
}

/* --- Modals for filter confirm --- */
body.primer-orders-page .submit.convert_orders .convert_orders_actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

body.primer-orders-page.primer-modal-open,
body.primer-orders-page:has(.primer_popup) {
    overflow-y: hidden;
    padding-right: 15px;
}

body.primer-orders-page .popup_confirm {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    background: rgba(23, 27, 33, .3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(1px);
    animation: primerModalOverlayIn .3s ease-out;
}

body.primer-orders-page .popup_confirm.is-open {
    display: flex;
}

body.primer-orders-page .popup_confirm > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100% !important;
    max-width: 480px !important;
    max-height: calc(100vh - 48px) !important;
    padding: 32px !important;
    box-sizing: border-box !important;
    overflow-y: auto;
    position: relative !important;
    margin: 0 !important;
    background: #ffff !important;
    -webkit-backdrop-filter: blur(24px) !important;
    backdrop-filter: blur(2px) !important;
    border: 1px solid rgba(255, 255, 255, .4) !important;
    border-top: 1px solid rgba(255, 255, 255, .6) !important;
    border-left: 1px solid rgba(255, 255, 255, .6) !important;
    border-radius: 28px !important;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, .3),
    inset 0 0 20px rgba(255, 255, 255, .1) !important;
    color: #1a1a1a;
    text-align: left;
    animation: primerModalCardIn .4s cubic-bezier(.16, 1, .3, 1) forwards !important;
}

body.primer-orders-page .popup_confirm > div::before {
    content: "?";
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto;
    width: 72px !important;
    height: 72px !important;
    margin: 0 auto 18px !important;
    border-radius: 50% !important;
    background: var(--pm-primary-dark) !important;
    border: 2px solid var(--pm-primary-dark);
    color: #fff !important;
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-shadow: 0 10px 20px -5px var(--pm-primary-dark) !important;
    animation: floatIcon 3s ease-in-out infinite !important;
}

body.primer-orders-page .popup_confirm h3 {
    width: 100%;
    margin: 0 0 16px !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    color: var(--pm-primary-dark) !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    letter-spacing: -.5px !important;
    text-align: center !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, .3) !important;
}

body.primer-orders-page .popup_confirm_div {
    width: 100%;
    margin: 0 !important;
    padding: 16px !important;
    box-sizing: border-box;
    background: rgb(55 82 127 / 18%) !important;
    border: 1px solid #fff !important;
    border-radius: 12px !important;
    color: var(--pm-primary-dark) !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    text-align: center !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
}

/* Same bordered message box as the success modal */
body.primer-orders-page .popup_confirm .popup_confirm_message {
    width: 100%;
    margin: 0 !important;
    color: var(--pm-primary-dark) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
}

body.primer-orders-page .popup_confirm .popup_confirm_note {
    width: 100%;
    margin: 12px 0 0 !important;
    color: #4f678f !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-align: center !important;
}

body.primer-orders-page .popup_confirm .popup_confirm_warning {
    width: 100%;
    margin: 20px 0 0 !important;
    box-sizing: border-box;
    background: rgba(253, 243, 213, .75) !important;
    border: 1px solid #f0dfae !important;
    border-radius: 12px !important;
    color: #8a6a1c !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    text-align: center !important;
    padding: 8px 6px;

}

body.primer-orders-page .popup_confirm_actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 28px;
}

body.primer-orders-page .popup_confirm_actions .button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0;
    height: 52px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background-color .2s cubic-bezier(.16, 1, .3, 1),
    transform .2s cubic-bezier(.16, 1, .3, 1),
    box-shadow .2s cubic-bezier(.16, 1, .3, 1);
}

body.primer-orders-page .popup_confirm_cancel {
    background: #fff !important;
    border: 1px solid var(--pm-border) !important;
    color: var(--pm-text) !important;
}

body.primer-orders-page .popup_confirm_cancel:hover {
    background: #ffffff !important;
    border-color: var(--pm-primary-dark) 1 !important;
    color: var(--pm-primary-dark) !important;
}

/* Same green as the success modal's OK button */
body.primer-orders-page .popup_confirm_ok {
    background: var(--pm-primary) !important;
    border: 1px solid var(--pm-primary-dark) !important;
    color: #fff !important;
}

body.primer-orders-page .popup_confirm_ok:hover {
    background: #283e64 !important;
    border-color: #283e64 !important;
    color: #fff !important;
}

body.primer-orders-page .popup_confirm_ok:active,
body.primer-orders-page .popup_confirm_cancel:active {
    transform: translateY(0) scale(.98);
}

body.primer-orders-page .popup_confirm_ok:focus {
    outline: 0 !important;
}

body.primer-orders-page .popup_confirm_cancel:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 4px rgba(67, 98, 158, .2) !important;
}


@media screen and (max-width: 600px) {
    body.primer-orders-page .popup_confirm {
        padding: 16px !important;
    }

    body.primer-orders-page .popup_confirm > div {
        max-height: calc(100vh - 32px) !important;
        padding: 28px 24px 24px !important;
        border-radius: 24px !important;
    }

    body.primer-orders-page .popup_confirm > div::before {
        width: 64px !important;
        height: 64px !important;
        font-size: 28px !important;
    }

    body.primer-orders-page .popup_confirm_actions {
        flex-direction: column-reverse;
    }

    body.primer-orders-page .popup_confirm_actions .button {
        flex: 0 0 auto;
        width: 100%;
        height: 48px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.primer-orders-page .popup_confirm,
    body.primer-orders-page .popup_confirm > div,
    body.primer-orders-page .popup_confirm > div::before,
    body.primer-orders-page .popup_confirm_actions .button {
        animation: none !important;
        transition: none !important;
    }

    body.primer-orders-page .popup_confirm > div::before {
        transform: none !important;
    }
}

/* Receipt page new look */
.primer-admin-menu-wrap .column-invoice_type strong,
.primer-admin-menu-wrap .column-receipt_client strong,
.primer-admin-menu-wrap .column-email_status strong,
.primer-admin-menu-wrap .column-receipt_price strong {
    font-weight: 400 !important;
    font-size: 14px;
}

.column-receipt_id strong {
    color: var(--pm-primary);
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders .send_receipts_wrap .cancel_receipt.is-visible {
    background: var(--pm-primary);
    border-color: var(--pm-primary);
    color: #fff;
}

body.primer-orders-page #primer_order_table .primer-tablenav-bar .submit.convert_orders .send_receipts_wrap .cancel_receipt.is-visible:hover {
    background: var(--pm-primary-dark);
    border-color: var(--pm-primary-dark);
    color: #fff;
}

.send_receipts_wrap--log {
    order: 10 !important;
}
.primer-status--completed {
    padding: 2px 22px !important;
}

body.primer-orders-page #primer_order_table .column-receipt_error_status .order-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 64px;
    min-width: 64px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius-sm);
    background: #fff;
    color: var(--pm-text);
    font-size: 13px;
    text-decoration: none;
}

body.primer-orders-page #primer_order_table .column-receipt_error_status .order-view::before {
    content: "\f481";
    font-family: dashicons;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    width: 16px;
    height: 16px;
    display: inline-block;
    text-align: center;
    color: var(--pm-primary);
    speak: never;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.primer-orders-page #primer_order_table .column-receipt_error_status .order-view strong {
    display: none;
}

body.primer-orders-page #primer_order_table .column-receipt_error_status .order-view:hover,
body.primer-orders-page #primer_order_table .column-receipt_error_status .order-view:focus {
    border-color: var(--pm-primary);
    color: var(--pm-primary);
    outline: 2px solid var(--pm-primary);
    outline-offset: 0;
}

/* Loader */
body.primer-orders-page .primer-loader {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(23, 27, 33, .3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

body.primer-orders-page .primer-loader.is-open {
    display: flex;
}

body.primer-orders-page .primer-loader__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 32px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 28px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, .3),
    inset 0 0 20px rgba(255, 255, 255, .1);
    text-align: center;
    animation: primerModalCardIn .4s cubic-bezier(.16, 1, .3, 1) forwards;
}

body.primer-orders-page .primer-loader__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--pm-primary-dark);
    box-shadow: 0 10px 20px -5px var(--pm-primary-dark);
    animation: floatIcon 3s ease-in-out infinite;
}

body.primer-orders-page .primer-loader__ring {
    display: block;
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: primerLoaderSpin .8s linear infinite;
}

body.primer-orders-page .primer-loader__title {
    margin: 0 0 8px;
    color: var(--pm-primary-dark);
    font-size: 20px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -.5px;
}

body.primer-orders-page .primer-loader__text {
    margin: 0;
    color: #4f678f;
    font-size: 14px;
    line-height: 1.5;
}

body.primer-orders-page .primer-loader__bar {
    position: relative;
    width: 100%;
    height: 6px;
    margin-top: 22px;
    overflow: hidden;
    background: #eef2f9;
    border-radius: 999px;
}

body.primer-orders-page .primer-loader__bar span {
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: var(--pm-primary);
    border-radius: 999px;
    animation: primerLoaderBar 1.2s ease-in-out infinite;
}

@keyframes primerLoaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes primerLoaderBar {
    0% {
        left: -40%;
    }
    50% {
        left: 30%;
    }
    100% {
        left: 100%;
    }
}


body.primer-orders-page .primer-loader__check {
    display: none;
    width: 34px;
    height: 34px;
    color: #fff;
}

body.primer-orders-page .primer-loader__check path {
    fill: none;
    stroke: currentColor;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

body.primer-orders-page .primer-loader.is-done .primer-loader__ring {
    display: none;
}

body.primer-orders-page .primer-loader.is-done .primer-loader__check {
    display: block;
}

body.primer-orders-page .primer-loader.is-done .primer-loader__check path {
    animation: primerLoaderCheckDraw .45s ease-out .05s forwards;
}

body.primer-orders-page .primer-loader.is-done .primer-loader__icon {
    background: #10b981;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, .45);
    animation: primerLoaderDonePop .35s cubic-bezier(.2, .8, .3, 1) forwards;
}

body.primer-orders-page .primer-loader.is-done .primer-loader__title {
    color: #047857;
}

body.primer-orders-page .primer-loader.is-done .primer-loader__bar {
    background: #d9f2e6;
}

body.primer-orders-page .primer-loader.is-done .primer-loader__bar span {
    left: 0;
    width: 100%;
    background: #10b981;
    animation: none;
}

@keyframes primerLoaderCheckDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes primerLoaderDonePop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

/* Icons receipts */
body.primer-orders-page #primer_order_table .column-receipt_id .primer-receipt-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

body.primer-orders-page #primer_order_table .column-receipt_id .primer-receipt-icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    color: var(--pm-primary);
}

@media (min-width: 1200px) {
    .primer-receipts_page_primer_page_permissions .primer-orders-header h2 {
        font-size: 2rem;
    }
}

/* --- Permissions page user column --- */
body.primer-orders-page .primer-permissions-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.primer-orders-page .primer-permissions-avatar {
    flex: 0 0 auto;
    line-height: 0;
}

body.primer-orders-page .primer-permissions-avatar img {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

body.primer-orders-page .primer-permissions-user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

body.primer-orders-page .primer-permissions-user-details strong {
    color: var(--pm-text);
    font-weight: 600;
}

body.primer-orders-page .primer-permissions-user-details .description {
    color: var(--pm-muted);
    font-size: 12px;
}

/* --- Permissions page: green only while the user is selecting --- */
body.primer-orders-page #primer_order_table.primer-permissions-table .wp-list-table tbody tr:not(.primer-permissions-row-active):has(input[name$="[]"]:checked) > td,
body.primer-orders-page #primer_order_table.primer-permissions-table .wp-list-table tbody tr:not(.primer-permissions-row-active):has(input[name$="[]"]:checked) > th,
body.primer-orders-page #primer_order_table.primer-permissions-table .wp-list-table tbody tr:not(.primer-permissions-row-active):has(input[name$="[]"]:checked):hover > td,
body.primer-orders-page #primer_order_table.primer-permissions-table .wp-list-table tbody tr:not(.primer-permissions-row-active):has(input[name$="[]"]:checked):hover > th {
    background: transparent !important;
    box-shadow: none !important;
}