.wr_w_25{width: 25% !important;}
.wooreport_hide{
    display: none;
}
.greenColor,.redColor{
    background: transparent;
}
.greenColor{
    color: green;
}
.redColor{
    color:red;
}
.brownColor{
    color: #dc6b26;
}
.order-status {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    line-height: 2.5em;
    color: #777;
    background: #e5e5e5;
    border-radius: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    margin: -.25em 0;
    cursor: inherit!important;
    white-space: nowrap;
    max-width: 100%
}
.order-status.status-completed {
    background: #c8d7e1;
    color: #2e4453
}
.order-status.status-on-hold {
    background: #f8dda7;
    color: #94660c
}

.order-status.status-failed {
    background: #eba3a3;
    color: #761919
}

.order-status.status-processing {
    background: #c6e1c6;
    color: #5b841b
}

.order-status.status-trash {
    background: #eba3a3;
    color: #761919
}

.order-status>span {
    margin: 0 1em;
    overflow: hidden;
    text-overflow: ellipsis
}
table.wp-list-table mark.instock, table.wp-list-table mark.onbackorder, table.wp-list-table mark.outofstock {
    font-weight: 700;
    background: transparent none;
    line-height: 1;
}
table.wp-list-table mark.onbackorder {
    color: #eaa600;
}
table.wp-list-table mark.instock {
    color: #7ad03a;
}
table.wp-list-table mark.outofstock {
    color: #a44;
}

/*Overview admin page style*/
#WR_overviewOrders{
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border: 1px none;
    margin: 0 0 10px;
}
#WR_overviewOrders tbody tr th span {
    color: #21759B !important;
    font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
    font-size: 18px;
}
.WR_overviewTableStyle{
    border: none !important;
}
.WR_overviewTableStyle thead tr th{
    font-weight: bold;
    border-bottom: none !important;
    color: #555;
    font-size: 13px;
}
.WR_filterBox{
    background: #fff;
    padding: 15px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border: 1px solid #e5e5e5;
}
.WR_filterBox .form-field{
    width: 50%;
    float: left;
    margin-bottom: 16px;
    overflow: hidden;
}
.WR_filterBox .form-field label{
    display: block;
    padding-bottom: 4px;
}
.WR_filterBox .form-field input {
    padding: 5px;
}
.WR_filterBox .form-field select {
    width: 95%;
}
.dt-buttons{
    margin-bottom: 12px;
}
.dt-buttons .dt-button{
    text-decoration: none;
    border-radius: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    padding: 7px;
    margin: 2px;
}
.dt-buttons .dt-button:first-child,.dt-buttons .dt-button:last-child{
    margin: 0;
}
.dt-buttons .dt-button:hover,.dt-buttons .dt-button:active,.dt-buttons .dt-button:visited{
    border-bottom: 1px solid rgba(0, 0, 0, .05) !important;
    border-top: none !important;
    border-right: none !important;
    border-left: none !important;
    box-shadow: none !important;
}
.dt-buttons .buttons-copy,.dt-buttons .buttons-excel:hover{
    background: #e5e5e5 !important;
    color: #777;
}
.dt-buttons .buttons-copy:before {
    content: "";
    display: block;
    background-image: url(../images/copy.svg);
    background-size: 17px 17px;
    height: 17px;
    width: 17px;
    float: left;
    margin-right: 10px;
    vertical-align: middle;
    margin-top: 2px;
}
.dt-buttons .buttons-excel,.dt-buttons .buttons-excel:hover{
    background: #c6e1c6 !important;
    color: #5b841b;
}
.dt-buttons .buttons-excel:before {
    content: "";
    display: block;
    background-image: url(../images/excel.svg);
    background-size: 17px 17px;
    height: 17px;
    width: 17px;
    float: left;
    margin-right: 10px;
    vertical-align: middle;
    margin-top: 2px;
}
.dt-buttons .buttons-csv,.dt-buttons .buttons-csv:hover{
    background: #eba3a3 !important;;
    color: #761919;
}
.dt-buttons .buttons-csv:before {
    content: "";
    display: block;
    background-image: url(../images/csv.svg);
    background-size: 17px 17px;
    height: 17px;
    width: 17px;
    float: left;
    margin-right: 10px;
    vertical-align: middle;
    margin-top: 2px;
}
.dt-buttons .buttons-pdf,.dt-buttons .buttons-pdf:hover{
    background: #f8dda7 !important;
    color: #94660c;
}
.dt-buttons .buttons-pdf:before {
    content: "";
    display: block;
    background-image: url(../images/pdf.svg);
    background-size: 17px 17px;
    height: 17px;
    width: 17px;
    float: left;
    margin-right: 10px;
    vertical-align: middle;
    margin-top: 2px;
}
.dt-buttons .buttons-print,.dt-buttons .buttons-print:hover{
    background: #c8d7e1 !important;
    color: #2e4453;
}
.dt-buttons .buttons-print:before {
    content: "";
    display: block;
    background-image: url(../images/printer.svg);
    background-size: 17px 17px;
    height: 17px;
    width: 17px;
    float: left;
    margin-right: 10px;
    vertical-align: middle;
    margin-top: 2px;
}
.wr-settings-container ul.tabs {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wr-settings-container ul.tabs li {
    background: none;
    color: #222;
    display: inline-block;
    padding: 10px 8px;
    cursor: pointer;
    border: 1px solid #f1f1f1;
    margin: 0;
}

.wr-settings-container ul.tabs li.current {
    background: #ffffff;
    color: #222;
    border-right-color: #e5e5e5;
    border-left-color: #e5e5e5;
    border-bottom-color: #ffffff;
    border-top-color: #e5e5e5;
    padding-bottom: 11px;
}

.wr-settings-container .tab-content {
    display: none;
    background: #ffffff;
    padding: 15px;
    -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: -1px 0 0 0;
}

.wr-settings-container .tab-content.current {
    display: inherit;
}
.WR_email_form_settings{
    display: none;
}
.wr_customer_products_list{display: none}
.wr_customer_products_list {
    background: #dfedf5;
    padding: 7px;
    border-radius: 3px;
    margin-top: 10px;
    margin-bottom: 8px;
}
.w-70{width: 70%;}
.w-30{width: 30%;}
.d-flex{display: flex;}
.mr-3{margin-right: 1.5em;}
.ml-3{margin-left: 1.5em;}
.table-striped tbody tr:nth-of-type(odd) {background-color: rgba(0,0,0,.05);}
.table td, .table th {padding: .75rem;vertical-align: top;border-top: 1px solid #dee2e6;}
.table {width: 100%;max-width: 100%;margin-bottom: 1rem;background-color: transparent;}
.select2-container .select2-search--inline .select2-search__field {box-sizing: border-box;border: none;font-size: 100%;margin-top: 0;margin-left: 5px;padding: 0;max-width: 100%;resize: none;height: 18px;vertical-align: bottom;font-family: sans-serif;overflow: hidden;word-break: keep-all;}
.nw_export_button{ text-decoration: none; border-radius: 4px; border-bottom: 1px solid rgba(0, 0, 0, .05); padding: 7px; margin: 2px 2px 10px 2px; position: relative; display: inline-block; box-sizing: border-box; cursor: pointer; font-size: 13px; line-height: 1.6em;  }
.nw_export_excel{ background: #c6e1c6 !important; color: #5b841b; }
.nw_export_pdf{ background: #f8dda7 !important; color: #94660c; }
.nw_export_excel:before { content: ""; display: block; background-image: url(../images/excel.svg); background-size: 17px 17px; height: 17px; width: 17px; float: left; margin-right: 10px; vertical-align: middle; margin-top: 2px; }
.nw_export_pdf:before { content: ""; display: block; background-image: url(../images/pdf.svg); background-size: 17px 17px; height: 17px; width: 17px; float: left; margin-right: 10px; vertical-align: middle; margin-top: 2px; }

/* Consistent hover for export buttons (all reports) */
.nw_export_excel:hover {
  background: #b7d8b7 !important;
  color: #4c6f16;
}
.nw_export_pdf:hover {
  background: #f0d08a !important;
  color: #7a5208;
}
.tablenav{ height: 55px; }
@media (max-width: 768px) {
    .wr-before-report-table{flex-direction: column;gap:10px;}
    .wr-before-report-table > .w-70,.wr-before-report-table > .w-30,.wr-before-report-table .WR_filterBox .form-field{width: 100% !important;}
    .wr-before-report-table > .w-30{padding: 0}
}

/* ========== WooReports: shared report pages (Overview and others) ========== */
/* Dark topbar, light content area, white cards. Single CSS for all report menus. */

body.wr-report-admin {
  overflow-x: hidden;
}

.wr-report-page {
  --wr-topbar-bg: #1e2a38;
  --wr-topbar-text: #ffffff;
  --wr-topbar-muted: rgba(255, 255, 255, 0.85);
  --wr-content-bg: #f0f2f5;
  --wr-card-bg: #ffffff;
  --wr-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --wr-card-radius: 8px;
  --wr-text: #202124;
  --wr-text-secondary: #5f6368;
  --wr-accent: #1a73e8;
  --wr-border: #dadce0;
  --wr-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  padding: 0;
  font-family: var(--wr-font);
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--wr-content-bg);
}

/* Constrain width and align with report cards */
.wr-report-page__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
}

/* Single card containing filter + KPIs + quick links */
.wr-report-top-card {
  background: var(--wr-card-bg);
  border-radius: var(--wr-card-radius);
  box-shadow: var(--wr-card-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.wr-report-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 56px;
  padding: 0 24px;
  background: var(--wr-topbar-bg);
  color: var(--wr-topbar-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.wr-report-topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wr-report-topbar__logo {
  width: 24px;
  height: 24px;
  background: var(--wr-accent);
  border-radius: 6px;
  flex-shrink: 0;
}

.wr-report-topbar__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--wr-topbar-text);
}

.wr-report-topbar__page {
  font-size: 14px;
  color: var(--wr-topbar-muted);
  font-weight: 500;
}

.wr-report-topbar__center {
  display: flex;
  align-items: center;
}

.wr-report-topbar__center .daterangeactions {
  margin: 0;
}

/* Filter bar — inside top card */
.wr-report-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  margin: 0;
  background: #f8f9fa;
  border-bottom: 1px solid var(--wr-border);
  border-left: 3px solid var(--wr-accent);
  font-family: var(--wr-font);
}

/* Insights trigger in filter bar (opens slide-out panel) */
.wr-insights-trigger {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  margin-right: 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  letter-spacing: 0.2px;
}

.wr-insights-trigger:hover {
  color: #78350f;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.wr-insights-trigger:focus {
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.4);
  outline: none;
}

.wr-insights-trigger:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
}

.wr-insights-trigger__icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.wr-report-filter-bar__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--wr-text-secondary);
  margin-left: 0;
  margin-right: 10px;
}

.wr-date-input {
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid var(--wr-border);
  border-radius: 4px;
  background: var(--wr-card-bg);
}

.wr-report-filter-bar__sep {
  color: var(--wr-text-secondary);
  font-size: 13px;
}

.wr-compare-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--wr-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.wr-report-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--wr-font);
}

/* Report filter layout (all pages) */
.wr-report-filter-form .WR_filterBox {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 12px 16px;
}

.wr-report-filter-form .form-field {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.wr-report-filter-form input[name="WR_fromDate"],
.wr-report-filter-form input[name="WR_toDate"] {
  width: 170px;
}

.wr-report-filter-form select[name="WR_orderStatuses[]"] {
  min-width: 280px;
  max-width: 320px;
}

.wr-report-filter-form input[name="order_number"] {
  width: 180px;
}

.wr-report-filter-form .wr-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* KPI row — Orders, Sales, AOV, Items sold (clickable, optional % change) */
.wr-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px;
  margin: 0;
  background: var(--wr-card-bg);
  border-bottom: 1px solid var(--wr-border);
}

.wr-kpi-card {
  position: relative;
  padding: 20px 20px 16px;
  background: var(--wr-content-bg);
  border-radius: 12px;
  border: 1px solid var(--wr-border);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.wr-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wr-accent), rgba(26,115,232,0.3));
  border-radius: 12px 12px 0 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.wr-kpi-card:hover::before {
  opacity: 1;
}

.wr-kpi-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.wr-kpi-card--link:hover,
.wr-kpi-card--nolink:hover {
  border-color: rgba(26,115,232,0.35);
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.10), 0 1px 4px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

.wr-kpi-card__label {
  font-size: 12px;
  color: var(--wr-text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.3;
  order: -1;
}

.wr-kpi-card__value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--wr-text);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.wr-kpi-card__value .woocommerce-Price-currencySymbol {
  font-size: 0.7em;
  font-weight: 600;
  opacity: 0.6;
  margin-inline-end: 1px;
}

.wr-kpi-card__change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 20px;
  width: fit-content;
}

.wr-kpi-card__change--up {
  color: #0d7c43;
  background: rgba(52, 168, 83, 0.12);
}

.wr-kpi-card__change--up::before {
  content: '↑';
  font-size: 11px;
}

.wr-kpi-card__change--down {
  color: #c5221f;
  background: rgba(234, 67, 53, 0.10);
}

.wr-kpi-card__change--down::before {
  content: '↓';
  font-size: 11px;
}

.wr-kpi-card__period {
  font-weight: 400;
  opacity: 0.7;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}

/* Styled tooltip for KPI period (replaces native title on hover) */
.wr-kpi-card__tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 8px 14px;
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.wr-kpi-card__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #1e293b;
}

.wr-kpi-card--link:hover .wr-kpi-card__tooltip,
.wr-kpi-card--nolink:hover .wr-kpi-card__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Report card footer: link to full report page */
.wr-report-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--wr-border);
  background: var(--wr-card-bg);
  border-radius: 0 0 var(--wr-card-radius) var(--wr-card-radius);
}

.wr-report-card__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--wr-accent);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(26, 115, 232, 0.25);
  border-radius: 8px;
  background: rgba(26, 115, 232, 0.06);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
  letter-spacing: 0.15px;
}

.wr-report-card__footer-link:hover {
  text-decoration: none;
  background: rgba(26, 115, 232, 0.12);
  border-color: rgba(26, 115, 232, 0.45);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.12);
  transform: translateY(-1px);
  color: var(--wr-accent);
}

.wr-report-card__footer-link:active {
  transform: translateY(0);
  box-shadow: none;
}

.wr-report-card__footer-link-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.wr-export-csv-link::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  flex-shrink: 0;
}

/* Native select (fallback when Select2 not yet init) */
.wr-report-filter-form select {
  background: #fff;
  border: 1px solid var(--wr-border);
  color: var(--wr-text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  min-width: 200px;
  height: 38px;
  line-height: 1.4;
}

.wr-report-filter-form select:focus {
  border-color: var(--wr-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.wr-report-filter-form option {
  background: #fff;
  color: var(--wr-text);
}

/* Select2 container — fixed height to match button (38px) */
.wr-report-filter-form .select2-container {
  min-width: 220px;
  height: 38px !important;
}

.wr-report-filter-form .select2-container .select2-selection--multiple {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 8px;
  border: 1px solid var(--wr-border);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  overflow: hidden;
}

.wr-report-filter-form .select2-container .select2-selection--single {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 8px;
  border: 1px solid var(--wr-border);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
}

.wr-report-filter-form .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 36px;
  color: var(--wr-text);
  font-size: 13px;
}

.wr-report-filter-form .select2-container .select2-selection--single .select2-selection__arrow {
  height: 36px;
  top: 0;
}

.wr-report-filter-form .select2-container.select2-container--focus .select2-selection--multiple,
.wr-report-filter-form .select2-container.select2-container--open .select2-selection--multiple,
.wr-report-filter-form .select2-container.select2-container--focus .select2-selection--single,
.wr-report-filter-form .select2-container.select2-container--open .select2-selection--single {
  border-color: var(--wr-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.wr-report-filter-form .select2-container .select2-selection__rendered {
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 36px;
}

.wr-report-filter-form .select2-container .select2-search__field {
  margin: 0;
  padding: 4px 4px;
  font-size: 13px;
  color: var(--wr-text);
  height: 28px;
  line-height: 28px;
  min-height: 0;
}

.wr-report-filter-form .select2-container .select2-selection__choice {
  background: var(--wr-content-bg);
  border: 1px solid var(--wr-border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--wr-text);
}

/* Filter button — same height as Select2 (38px) */
.wr-report-filter-form .button {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  line-height: 36px !important;
  font-size: 13px !important;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wr-report-filter-form .button-primary {
  border-color: var(--wr-accent);
  background: var(--wr-accent);
}

.wr-report-filter-form .button-primary:hover {
  background: #1557b0;
  border-color: #1557b0;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.35);
}

.wr-report-filter-form .button-primary:focus {
  border-color: var(--wr-accent);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.35);
}

.wr-report-topbar__btn {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: var(--wr-topbar-text) !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
}

.wr-report-topbar__btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
}

.wr-report-topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wr-report-topbar__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--wr-topbar-text);
  cursor: pointer;
}

.wr-report-topbar__icon:hover {
  background: rgba(255, 255, 255, 0.2);
}

.wr-report-topbar__icon--help:before {
  content: "?";
  font-size: 16px;
  font-weight: 600;
}

/* Trend chart block */
#wr-card-trend .wr-report-card__body {
  min-height: 200px;
}

.wr-sales-by-source-chart-wrap {
  max-width: 320px;
  margin: 0 auto;
  padding: 8px 0 0;
  position: relative;
}

#wr-card-trend #WR_ChartTrend {
  max-width: 100%;
}

/* Insights slide-out panel (right side, like Google Analytics) */
.wr-insights-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s ease;
}

.wr-insights-panel--open {
  pointer-events: auto;
  visibility: visible;
}

.wr-insights-panel__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 0;
}

.wr-insights-panel--open .wr-insights-panel__backdrop {
  opacity: 1;
}

.wr-insights-panel__drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.wr-insights-panel--open .wr-insights-panel__drawer {
  transform: translateX(0);
}

.wr-insights-panel__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--wr-border);
  background: var(--wr-card-bg);
}

.wr-insights-panel__header-icon {
  flex-shrink: 0;
  color: var(--wr-accent);
}

.wr-insights-panel__header-text {
  flex: 1;
  min-width: 0;
}

.wr-insights-panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--wr-text);
  font-family: var(--wr-font);
}

.wr-insights-panel__context {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--wr-text-secondary);
  line-height: 1.3;
}

.wr-insights-panel__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--wr-text-secondary);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.wr-insights-panel__close:hover {
  background: var(--wr-content-bg);
  color: var(--wr-text);
}

.wr-insights-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #ffffff;
}

.wr-insights-panel__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--wr-text-secondary);
}

.wr-insights-panel__loading .spinner {
  float: none;
  margin: 0;
}

.wr-insights-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.wr-insight-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--wr-border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: baseline;
}

.wr-insight-item:last-child {
  border-bottom: none;
}

.wr-insight-item__label {
  font-weight: 500;
  color: var(--wr-text-secondary);
}

.wr-insight-item__value {
  color: var(--wr-text);
}

.wr-report-content {
  background: transparent;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  width: 100%;
}

/* 2 columns max so cards are wide; prevents horizontal scroll from grid */
.wr-report-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  min-width: 0;
}

/* Top row: Sales trend then Overview Orders, both full width stacked */
.wr-report-cards__top-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  min-width: 0;
}
.wr-report-cards__top-row--stack {
  grid-template-columns: 1fr;
}

/* Two-column row: Overview Orders + Sales by source side by side */
.wr-report-cards__two-col {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  min-width: 0;
}

/* Section heading above "Top" report cards */
.wr-report-cards__heading {
  grid-column: 1 / -1;
  margin: 32px 0 8px;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--wr-text);
  font-family: var(--wr-font);
}
.wr-report-cards__heading:first-child {
  margin-top: 0;
}

.wr-report-card {
  background: var(--wr-card-bg);
  border-radius: var(--wr-card-radius);
  box-shadow: var(--wr-card-shadow);
  overflow: hidden;
  min-width: 0;
}

.wr-report-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 16px 20px;
  background: var(--wr-card-bg);
  border-bottom: 1px solid var(--wr-border);
  font-size: 15px;
  font-weight: 600;
  color: var(--wr-text);
  font-family: var(--wr-font);
}

.wr-report-card__title {
  margin: 0;
}

.wr-report-card__description {
  width: 100%;
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--wr-text-secondary);
  line-height: 1.4;
}

.wr-report-card__header:has(.wr-report-card__description) {
  flex-direction: column;
  align-items: flex-start;
}

.wr-report-card__header:has(.wr-report-card__description) .wr-report-card__actions {
  margin-top: 4px;
}

.wr-report-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card actions: make Export + Summary buttons same size in one row */
.wr-report-card__actions .nw_export_button,
.wr-report-card__actions .wr-summary-trigger {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}

/* Remove old margins/line-height from generic export style inside card header */
.wr-report-card__actions .nw_export_button {
  margin: 0;
  border-bottom: none;
}

.wr-report-card__actions .wr-chart-btn,
.wr-report-card__actions .wr-table-btn {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--wr-text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.wr-report-card__actions .wr-chart-btn:hover,
.wr-report-card__actions .wr-table-btn:hover {
  color: var(--wr-accent);
  background: rgba(26, 115, 232, 0.08);
}

.wr-report-card__actions .wr-chart-btn.is-active,
.wr-report-card__actions .wr-table-btn.is-active {
  color: var(--wr-accent);
  background: rgba(26, 115, 232, 0.10);
  border-color: var(--wr-accent);
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.15);
}

/* Segment card chart wrapper */
.wr-report-card__body .wr-segment-chart-wrap {
  position: relative;
  padding: 16px 20px 12px;
  min-height: 260px;
}
.wr-report-card__body .wr-segment-chart-wrap canvas {
  max-width: 100%;
}

.wr-report-card__body {
  padding: 20px;
  font-size: 14px;
  color: var(--wr-text);
}

.wr-report-card--full {
  grid-column: 1 / -1;
}

/* Empty state for report tables with no data */
.wr-report-page .wr-report-table-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--wr-text-secondary);
  font-size: 14px;
}

.wr-report-page .wr-report-error {
  padding: 16px;
  color: var(--wr-text-secondary);
  background: rgba(0, 0, 0, 0.04);
  border-left: 4px solid var(--wr-accent);
  border-radius: 0 4px 4px 0;
  margin: 8px 0;
}

/* Tables inside report cards; contain overflow to prevent horizontal scroll */
.wr-report-page .wr-report-card__body {
  overflow-x: auto;
}
.wr-report-page .WR_overviewTableStyle,
.wr-report-page .widefat.table-stats,
.wr-report-page #WR_overviewOrders {
  border: none;
  border-bottom: none;
  margin: 0;
  width: 100%;
  max-width: 100%;
  background: transparent;
}

/* Remove any gray border at bottom of Overview Orders table (override WP .widefat) */
#wr-card-overview-orders #WR_overviewOrders,
#wr-card-overview-orders #WR_overviewOrders thead,
#wr-card-overview-orders #WR_overviewOrders tbody,
#wr-card-overview-orders #WR_overviewOrders th,
#wr-card-overview-orders #WR_overviewOrders td,
#wr-card-overview-orders #WR_overviewOrders thead th,
#wr-card-overview-orders #WR_overviewOrders tbody th,
#wr-card-overview-orders #WR_overviewOrders tbody td,
#wr-card-overview-orders #WR_overviewOrders tbody tr:last-child th,
#wr-card-overview-orders #WR_overviewOrders tbody tr:last-child td {
  border-bottom: none !important;
  border-top: none !important;
}

#wr-card-overview-orders #WR_overviewOrders {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Remove bottom border from Overview Orders card body (in case line is from container) */
#wr-card-overview-orders .wr-report-card__body {
  border-bottom: none !important;
}
.wr-report-page .wr-report-card__body canvas {
  max-width: 100%;
}

.wr-report-page .WR_overviewTableStyle thead th,
.wr-report-page #WR_overviewOrders thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wr-text-secondary);
  padding: 10px 14px;
  border: none;
  background: transparent;
}

.wr-report-page .WR_overviewTableStyle thead th {
  border-bottom: none;
}

.wr-report-page .WR_overviewTableStyle tbody td,
.wr-report-page #WR_overviewOrders tbody th,
.wr-report-page #WR_overviewOrders tbody td {
  padding: 12px 14px;
  border: none;
  border-bottom: none;
  font-size: 14px;
  color: var(--wr-text);
  background: transparent;
}

/* Simple tables in cards: no row background, no border-bottom */
.wr-report-page .wr-report-card .WR_overviewTableStyle tbody tr,
.wr-report-page .wr-report-card .widefat tbody tr {
  background: transparent;
}

/* No gray border at end of table or on last row */
.wr-report-page .wr-report-card .wr-report-card__body .widefat,
.wr-report-page .wr-report-card .wr-report-card__body .WR_overviewTableStyle,
.wr-report-page .wr-report-card .wr-report-card__body .widefat tbody tr:last-child td,
.wr-report-page .wr-report-card .wr-report-card__body .WR_overviewTableStyle tbody tr:last-child td {
  border-bottom: none !important;
}

/* Odd rows (1st, 3rd, 5th…): very light gray for clearer tables */
.wr-report-page .wr-report-card .WR_overviewTableStyle tbody tr:nth-of-type(odd),
.wr-report-page .wr-report-card .widefat.striped tbody tr:nth-of-type(odd),
.wr-report-page .wr-report-card .widefat tbody tr:nth-of-type(odd),
.wr-report-page #WR_overviewOrders tbody tr:nth-of-type(odd) {
  background: rgba(0, 0, 0, 0.02);
}

.wr-report-page .WR_overviewTableStyle tbody tr:hover,
.wr-report-page .wr-report-card .WR_overviewTableStyle tbody tr:hover,
.wr-report-page .wr-report-card .widefat tbody tr:hover,
.wr-report-page #WR_overviewOrders tbody tr:hover {
  background: transparent;
}

.wr-report-page #WR_overviewOrders tbody th span {
  color: var(--wr-accent) !important;
  font-size: 16px !important;
  font-weight: 600;
}

.wr-report-page .wr-report-filter-bar__label--small {
  font-size: 12px;
  margin-left: 12px;
}

.wr-report-page .wr-select--small {
  min-width: 100px;
  max-width: 140px;
  padding: 2px 6px;
  font-size: 13px;
}

.wr-report-page .wr-export-csv-link {
  margin-left: 8px;
}

.wr-report-page .wr-report-card__footer .wr-export-csv-link {
  margin-right: 0;
}

.wr-report-page .wr-kpi-card--nolink {
  cursor: default;
  text-decoration: none;
}

.wr-report-page .wr-kpi-card--nolink:hover {
  text-decoration: none;
  transform: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.wr-report-page .wr-report-card__loading {
  padding: 24px;
  text-align: center;
  color: var(--wr-text-secondary);
  font-size: 14px;
}

.wr-report-page .wr-report-card .widefat a {
  color: var(--wr-accent);
  text-decoration: none;
}

.wr-report-page .wr-report-card .widefat a:hover {
  text-decoration: underline;
}

/* ----- Report filter bar: modern style for all pages ----- */
.wr-report-page .wr-report-filter-bar {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wr-report-page .wr-report-filter-bar form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 20px;
  margin: 0;
  background: #f8f9fa;
  border: none;
  border-left: 3px solid var(--wr-accent);
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1;
}

.wr-report-page .wr-report-filter-bar .WR_filterBox {
  padding: 0;
  margin: 0;
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
}

.wr-report-page .wr-report-filter-bar .form-field {
  width: auto;
  float: none;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wr-report-page .wr-report-filter-bar .form-field label {
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--wr-text);
  white-space: nowrap;
}

/* Filter labels above inputs */
.wr-report-page .wr-report-filter-bar form.wr-report-filter-form .form-field {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* Search + Reset actions on one horizontal row */
.wr-report-page .wr-report-filter-bar form.wr-report-filter-form .wr-filter-actions {
  flex-direction: row;
  align-items: center;
  margin-top: 22px; /* پایین‌تر تا هم‌تراز با inputها شود */
}

/* Orders filter: same input/select/button style as Overview (.wr-report-filter-form) */
.wr-report-page .wr-report-filter-bar form input[type="text"],
.wr-report-page .wr-report-filter-bar form input[type="number"] {
  background: #fff;
  border: 1px solid var(--wr-border);
  color: var(--wr-text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  min-width: 120px;
  height: 38px;
  line-height: 1.4;
  box-sizing: border-box;
}

.wr-report-page .wr-report-filter-bar form input:focus {
  border-color: var(--wr-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.wr-report-page .wr-report-filter-bar form select {
  background: #fff;
  border: 1px solid var(--wr-border);
  color: var(--wr-text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  min-width: 200px;
  height: 38px;
  line-height: 1.4;
}

.wr-report-page .wr-report-filter-bar form select:focus {
  border-color: var(--wr-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.wr-report-page .wr-report-filter-bar form .select2-container {
  min-width: 220px;
  height: 38px !important;
}

.wr-report-page .wr-report-filter-bar form .select2-container .select2-selection--multiple {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 8px;
  border: 1px solid var(--wr-border);
  border-radius: 6px;
  background: #fff;
}

.wr-report-page .wr-report-filter-bar form .select2-container .select2-selection--single {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 8px;
  border: 1px solid var(--wr-border);
  border-radius: 6px;
  background: #fff;
  display: flex !important;
  align-items: center;
}

.wr-report-page .wr-report-filter-bar form .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 36px;
  color: var(--wr-text, #1e1e1e);
  font-size: 13px;
}

.wr-report-page .wr-report-filter-bar form .select2-container .select2-selection--single .select2-selection__arrow {
  height: 36px;
  top: 0;
}

.wr-report-page .wr-report-filter-bar form .select2-container.select2-container--focus .select2-selection--single,
.wr-report-page .wr-report-filter-bar form .select2-container.select2-container--open .select2-selection--single {
  border-color: var(--wr-accent, #1a73e8);
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.wr-report-page .wr-report-filter-bar form .button {
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 18px !important;
  line-height: 36px !important;
  font-size: 13px !important;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
}

.wr-report-page .wr-report-filter-bar form .button-primary {
  border-color: var(--wr-accent);
  background: var(--wr-accent);
  margin-left: 0;
}

.wr-report-page .wr-report-filter-bar form .button-primary:hover {
  background: #1557b0;
  border-color: #1557b0;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.35);
}

.wr-report-page .wr-report-filter-bar form .button-primary:focus {
  border-color: var(--wr-accent);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.35);
}

/* Modern filter form layout for all report pages */
.wr-report-filter-form--modern .WR_filterBox {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.wr-report-filter-form--modern .form-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.wr-report-filter-form--modern .form-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wr-text-secondary);
  white-space: nowrap;
}

.wr-report-filter-form--modern .wr-filter-actions {
  flex-direction: row !important;
  align-items: flex-end !important;
  gap: 8px !important;
  margin-top: 0;
}

.wr-report-filter-form--modern .clear {
  display: none;
}

/* Keep Summary trigger aligned on the right side of Orders filter bar */
.wr-report-page .wr-report-filter-bar--orders .wr-orders-summary-trigger {
  flex-shrink: 0;
}

/* Chart card (all reports) */
.wr-report-page .wr-report-card .wr-report-card__body--chart {
  position: relative;
  padding: 16px 20px 12px;
  height: 320px;
}
.wr-report-page .wr-report-card .wr-report-card__body--chart canvas {
  max-width: 100%;
}

/* ── Generic report table card ── */
.wr-report-page .wr-report-card .wr-report-card__body--table {
  padding: 0;
  overflow-x: auto;
  border-radius: 0 0 var(--wr-card-radius) var(--wr-card-radius);
}

.wr-report-page .wr-report-card .wp-list-table.widefat {
  border: none;
  box-shadow: none;
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 13px;
}

.wr-report-page .wr-report-card .wp-list-table.fixed {
  table-layout: auto;
}

.wr-report-page .wr-report-card .wp-list-table.widefat thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wr-text-secondary);
  padding: 14px 16px;
  border: none;
  border-bottom: 2px solid var(--wr-border);
  background: #f8f9fa;
  white-space: nowrap;
}

.wr-report-page .wr-report-card .wp-list-table.widefat thead th a {
  color: var(--wr-accent);
  text-decoration: none;
  font-weight: 600;
}

.wr-report-page .wr-report-card .wp-list-table.widefat thead th a:hover {
  text-decoration: underline;
}

.wr-report-page .wr-report-card .wp-list-table.widefat tfoot {
  display: none;
}

.wr-report-page .wr-report-card .wp-list-table.widefat tbody td {
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--wr-text);
  vertical-align: middle;
  white-space: nowrap;
}

.wr-report-page .wr-report-card .wp-list-table.widefat tbody tr {
  transition: background 0.15s ease;
}

.wr-report-page .wr-report-card .wp-list-table.widefat tbody tr:nth-of-type(odd) {
  background: rgba(0, 0, 0, 0.02);
}

.wr-report-page .wr-report-card .wp-list-table.widefat tbody tr:hover {
  background: rgba(26, 115, 232, 0.04);
}

.wr-report-page .wr-report-card .wp-list-table.widefat tbody tr:last-child td {
  border-bottom: none;
}

.wr-report-page .wr-report-card .wp-list-table.widefat tbody td a {
  color: var(--wr-accent);
  text-decoration: none;
  font-weight: 500;
}

.wr-report-page .wr-report-card .wp-list-table.widefat tbody td a:hover {
  text-decoration: underline;
}

.wr-report-page .wr-report-card .wp-list-table.widefat .order-status {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  border: none;
  line-height: 1.3;
}

.wr-report-page .wr-report-card .wp-list-table.widefat .order-status span {
  border: none;
  padding: 0;
  background: none;
}

/* Modern buttons inside report tables */
.wr-report-page .wr-report-card .wp-list-table.widefat td .button,
.wr-report-page .wr-report-card .wp-list-table.widefat td .button.button-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid var(--wr-accent);
  border-radius: 6px;
  background: rgba(26, 115, 232, 0.06);
  color: var(--wr-accent);
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.wr-report-page .wr-report-card .wp-list-table.widefat td .button:hover,
.wr-report-page .wr-report-card .wp-list-table.widefat td .button.button-primary:hover {
  background: var(--wr-accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.25);
  text-decoration: none;
}
.wr-report-page .wr-report-card .wp-list-table.widefat td .button:focus,
.wr-report-page .wr-report-card .wp-list-table.widefat td .button.button-primary:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.3);
}

/* Stock action buttons (Edit/View) */
.wr-report-page .wr-report-card .wp-list-table.widefat td .button.tips {
  padding: 4px 10px;
  font-size: 12px;
  margin-right: 4px;
}

/* ── Products Popover ── */
.wr-products-popover-wrap {
  display: inline-block;
}

.wr-products-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--wr-accent);
  background: rgba(26, 115, 232, 0.06);
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.5;
}

.wr-products-trigger:hover {
  background: rgba(26, 115, 232, 0.12);
  border-color: rgba(26, 115, 232, 0.35);
}

.wr-products-trigger[aria-expanded="true"] {
  background: var(--wr-accent);
  color: #fff;
  border-color: var(--wr-accent);
}

.wr-products-trigger__count {
  font-weight: 700;
}

.wr-products-trigger__chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.wr-products-trigger[aria-expanded="true"] .wr-products-trigger__chevron {
  transform: rotate(180deg);
}

/* Popover card */
.wr-products-popover {
  display: none;
  position: fixed;
  z-index: 100000;
  min-width: 260px;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--wr-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  animation: wr-popover-in 0.15s ease-out;
}

.wr-products-popover[aria-hidden="false"] {
  display: block;
}

@keyframes wr-popover-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wr-products-popover--above {
  animation: wr-popover-in-above 0.15s ease-out;
}
@keyframes wr-popover-in-above {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Arrow */
.wr-products-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: var(--wr-popover-arrow, 50%);
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: #fff;
  border-top: 1px solid var(--wr-border);
  border-left: 1px solid var(--wr-border);
}
.wr-products-popover--above::before {
  top: auto;
  bottom: -6px;
  border-top: none;
  border-left: none;
  border-bottom: 1px solid var(--wr-border);
  border-right: 1px solid var(--wr-border);
}

.wr-products-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--wr-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--wr-text-secondary);
}

.wr-products-popover__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--wr-text-secondary);
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.wr-products-popover__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--wr-text);
}

.wr-products-popover__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 220px;
  overflow-y: auto;
}

.wr-products-popover__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  transition: background 0.1s ease;
}

.wr-products-popover__item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.wr-products-popover__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--wr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wr-products-popover__meta {
  font-size: 12px;
  color: var(--wr-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Tablenav: generic for all report pages ── */
.wr-report-page .wr-report-card .tablenav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 16px;
  margin: 0;
  background: transparent;
  border: none;
}

.wr-report-page .wr-report-card .tablenav.top {
  display: none;
}

.wr-report-page .wr-report-card .tablenav.bottom {
  justify-content: flex-end;
  border-top: 1px solid var(--wr-border);
  margin-top: 0;
  padding: 10px 16px;
  background: #ffffff;
  border-radius: 0 0 var(--wr-card-radius) var(--wr-card-radius);
}

.wr-report-page .wr-report-card .tablenav .actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wr-report-page .wr-report-card .tablenav .bulkactions {
  display: none;
}

.wr-report-page .wr-report-card .nw_export_button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--wr-border);
  background: #fff;
  color: var(--wr-text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wr-report-page .wr-report-card .nw_export_button:hover {
  border-color: var(--wr-accent);
  background: rgba(26, 115, 232, 0.06);
  color: var(--wr-accent);
}

.wr-report-page .wr-report-card .nw_export_excel:hover {
  background: #b7d8b7 !important;
  color: #4c6f16 !important;
  border-color: #9ac29a !important;
}
.wr-report-page .wr-report-card .nw_export_pdf:hover {
  background: #f0d08a !important;
  color: #7a5208 !important;
  border-color: #d8b96d !important;
}

/* Orders summary side panel: show totals as stacked list, not table */
#wr-orders-summary-panel .table.table-striped {
  width: 100%;
  border: none;
  border-collapse: collapse;
  margin: 0;
  font-size: 13px;
}

#wr-orders-summary-panel .table.table-striped tbody tr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--wr-border);
  background: transparent !important;
}

#wr-orders-summary-panel .table.table-striped tbody tr:last-child {
  border-bottom: none;
}

#wr-orders-summary-panel .table.table-striped td {
  padding: 0;
  border: none;
  background: transparent;
}

#wr-orders-summary-panel .table.table-striped td:first-child {
  font-size: 12px;
  font-weight: 500;
  color: var(--wr-text-secondary);
}

#wr-orders-summary-panel .table.table-striped td:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--wr-text);
  text-align: right;
}

/* ── Modern Pagination (all report pages) ── */
.wr-report-page .wr-report-card .tablenav .tablenav-pages {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wr-report-page .wr-report-card .tablenav-pages .displaying-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--wr-text-secondary);
  margin-right: 4px;
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .tablenav-paging-text {
  font-size: 13px;
  color: var(--wr-text-secondary);
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .button,
.wr-report-page .wr-report-card .tablenav-pages .pagination-links a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wr-text);
  background: #ffffff;
  border: 1px solid var(--wr-border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: none;
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .button:hover,
.wr-report-page .wr-report-card .tablenav-pages .pagination-links a.button:hover {
  background: var(--wr-accent);
  color: #ffffff;
  border-color: var(--wr-accent);
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .button.disabled,
.wr-report-page .wr-report-card .tablenav-pages .pagination-links .button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  background: #f5f5f5;
  color: var(--wr-text-secondary);
  border-color: var(--wr-border);
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .button.disabled:hover,
.wr-report-page .wr-report-card .tablenav-pages .pagination-links .button[disabled]:hover {
  background: #f5f5f5;
  color: var(--wr-text-secondary);
  border-color: var(--wr-border);
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .paging-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--wr-text-secondary);
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .paging-input .current-page {
  width: 48px;
  height: 32px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--wr-text);
  background: #ffffff;
  border: 1px solid var(--wr-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .paging-input .current-page:focus {
  border-color: var(--wr-accent);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

.wr-report-page .wr-report-card .tablenav-pages .pagination-links .total-pages {
  font-weight: 600;
  color: var(--wr-text);
}

/* Orders summary card: small table */
.wr-report-page .wr-report-card .table.table-striped {
  width: 100%;
  border: none;
  border-collapse: collapse;
  margin: 0;
  font-size: 13px;
}

.wr-report-page .wr-report-card .table.table-striped td {
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--wr-border);
}

.wr-report-page .wr-report-card .table.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(0, 0, 0, 0.02);
}

.wr-report-page .wr-report-card .table.table-striped tbody tr:last-child td {
  border-bottom: none;
}

.wr-report-page .wr-report-cards--orders {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.wr-report-page .wr-report-cards__two-col--orders {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media screen and (max-width: 782px) {
  .wr-report-filter-form--modern .WR_filterBox {
    gap: 8px;
  }
  .wr-report-filter-form--modern .form-field {
    width: 100%;
  }
  .wr-report-page .wr-report-filter-bar--orders .wr-orders-summary-trigger {
    align-self: flex-end;
  }
  .wr-report-page .wr-report-cards__two-col--orders {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 960px) {
  .wr-report-topbar {
    padding: 12px 16px;
  }
  .wr-report-topbar__center {
    order: 3;
    width: 100%;
  }
  .wr-report-page__inner {
    padding-left: 16px;
    padding-right: 16px;
  }
  .wr-report-filter-bar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .wr-report-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }
  .wr-report-filter-form {
    width: 100%;
  }
  .wr-report-cards {
    grid-template-columns: 1fr;
  }
  .wr-report-cards__top-row {
    grid-template-columns: 1fr;
  }
  .wr-report-cards__two-col {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 480px) {
  .wr-report-kpis {
    grid-template-columns: 1fr;
  }
}
