/* ==========================================================================
   TRANSACTION RECORDS / BATCH TRANSACTIONS STYLES
   Tailored to prototype "Batch giao dịch - Mobile.html"
   Supports Mobile (<= 768px) and Desktop (> 768px)
   ========================================================================== */

:root {
  --tr-bg: var(--pos-canvas, var(--bs-body-bg, #f7f8f6));
  --tr-surface: var(--pos-surface, var(--bs-surface-bg, #ffffff));
  --tr-surface-2: var(--pos-surface2, #f0f3f1);
  --tr-border: var(--pos-border, var(--bs-border-color, #d5ddd8));
  --tr-border-subtle: color-mix(in srgb, var(--tr-border) 60%, transparent);
  --tr-text: var(--pos-text, var(--bs-text, #263238));
  --tr-muted: var(--pos-muted, #586571);
  --tr-submuted: color-mix(in srgb, var(--tr-muted) 70%, transparent);
  --tr-green: var(--pos-primary, var(--bs-main, #3a9821));
  --tr-green-light: var(--pos-primary-soft, var(--bs-main-50, #eaf5e6));
  --tr-green-btn: var(--pos-main-400, var(--bs-main-400, #71d256));
  --tr-green-hover: var(--pos-primary-hover, var(--bs-main-hover, #2f7d1b));
  --tr-green-dark: #163020;
  --tr-green-dark-text: #ffffff;
  --tr-green-dark-muted: #a3c2a9;
  --tr-hero-bg: var(--tr-green-dark);
  --tr-hero-text: var(--tr-green-dark-text);
  --tr-hero-sub: var(--tr-green-dark-muted);
  --tr-warning: var(--pos-pending-color, #f2a65a);
  --tr-danger: var(--pos-noShow-color, #b42318);
  --tr-card-mc: #1f2937;
  --tr-card-visa: #1a3a8f;
  --tr-card-amex: #0077a6;
  --tr-max-width: 1480px;
}

[data-pos-appearance="dark"],
[data-pos-appearance="dark"] .transaction-records-root,
html[data-pos-appearance="dark"] .transaction-records-root {
  --tr-bg: var(--pos-canvas, #0f1216);
  --tr-surface: var(--pos-surface, #151a20);
  --tr-surface-2: var(--pos-surface2, #1b222b);
  --tr-border: var(--pos-border, #3a4450);
  --tr-border-subtle: #252c35;
  --tr-text: var(--pos-text, #e6e9ee);
  --tr-muted: var(--pos-muted, #a4afbb);
  --tr-submuted: #64748b;
  --tr-green-dark: #122416;
  --tr-green-dark-text: #e6e9ee;
  --tr-green-dark-muted: #82a88a;
  --tr-hero-bg: var(--tr-green-dark);
  --tr-hero-text: var(--tr-green-dark-text);
  --tr-hero-sub: var(--tr-green-dark-muted);
  --tr-card-mc: #1a222d;
  --tr-card-visa: #1c356e;
  --tr-card-amex: #0a5270;
}

._transaction-records-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.transaction-records-root {
  width: 100%;
  min-height: 100%;
  background-color: var(--tr-bg);
  color: var(--tr-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ──────────────────────────────────────────────────────────────────────────
   HEADER & TOP ACTIONS
   ────────────────────────────────────────────────────────────────────────── */
.tr-header {
  background: var(--tr-surface);
  border-bottom: 1px solid var(--tr-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.tr-header-inner {
  /* max-width: var(--tr-max-width); */
  max-width: 100%;
  /* margin: 0 auto; */
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 769px) {
  .tr-header-inner {
    padding: 16px 32px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
}

.tr-header-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tr-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tr-title {
  margin: 0;
  font: normal normal 700 var(--s-20);
  letter-spacing: -0.01em;
  color: var(--tr-text);
  line-height: 1.25;
}

.tr-subtitle {
  margin: 0;
  font: normal normal 400 var(--s-14);
  color: var(--tr-muted);
}

.tr-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search Box */
.tr-search-box {
  display: none;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  border-radius: 10px;
  color: var(--tr-muted);
  min-width: 240px;
}

.tr-search-box input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--tr-text);
  font: 500 13px Inter, system-ui, sans-serif;
  width: 100%;
}

.tr-search-btn-mobile {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tr-text);
  cursor: pointer;
}

@media (min-width: 769px) {
  .tr-search-box {
    display: flex;
  }

  .tr-search-btn-mobile {
    display: none;
  }

  .tr-search-box-mobile {
    display: none !important;
  }
}

.tr-search-box-mobile {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  border-radius: 10px;
  color: var(--tr-muted);
  width: 100%;
  box-sizing: border-box;
}

.tr-search-box-mobile input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--tr-text);
  font: 500 13px Inter, system-ui, sans-serif;
  width: 100%;
}

.tr-search-mobile-close {
  background: transparent;
  border: 0;
  color: var(--tr-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
}

/* Batch Dropdown Button */
.tr-batch-menu-wrap {
  position: relative;
}

.tr-more-menu-wrap {
  position: relative;
  display: inline-flex;
}

.tr-more-btn-mobile {
  width: 40px;
  height: 40px;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tr-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-more-btn-mobile:hover {
  background: var(--tr-surface-2);
  border-color: var(--tr-border);
}

/* Export Dropdown Popup */
.tr-export-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  width: 230px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 4px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.tr-export-dropdown.dis-none {
  display: none !important;
}

.tr-export-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--tr-text);
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.tr-export-item:hover {
  background-color: var(--tr-surface-2);
}

.tr-export-icon-box {
  position: relative;
  width: 24px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--tr-muted);
}

.tr-export-file-icon {
  width: 20px;
  height: 24px;
  stroke: var(--tr-muted);
}

.tr-export-badge-tag {
  position: absolute;
  bottom: 0px;
  left: -2px;
  font-size: 7.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.5px;
  color: var(--tr-text);
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--tr-surface);
  padding: 1px 1px;
}

.tr-export-text {
  font: normal normal 500 var(--s-12);
  letter-spacing: 0.4px;
  color: var(--tr-text);
  white-space: nowrap;
}

.tr-export-divider {
  height: 1px;
  background-color: var(--tr-border-subtle);
  margin: 2px 6px;
}

.tr-batch-btn {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--tr-green-btn);
  color: #0e2a12;
  font: 600 14px Inter, system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.tr-batch-btn:hover {
  opacity: 0.92;
}

.tr-batch-btn-text {
  display: none;
}

.tr-batch-btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--tr-green-light);
  color: var(--tr-green);
  justify-content: center;
}

@media (min-width: 769px) {
  .tr-batch-btn-icon-only {
    width: auto;
    padding: 0 14px;
    background: var(--tr-green-btn);
    color: #0e2a12;
  }

  .tr-batch-btn-text {
    display: inline !important;
  }
}

.tr-batch-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  width: 300px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 32, 0.16);
  padding: 6px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
}

.tr-batch-dropdown.dis-none {
  display: none !important;
}

.tr-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tr-text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-family: Inter, system-ui, sans-serif;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.tr-menu-item:hover {
  background: var(--tr-surface-2);
}

.tr-menu-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--tr-green-light);
  color: var(--tr-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-menu-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-menu-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tr-text);
}

.tr-menu-desc {
  font-size: 12px;
  color: var(--tr-muted);
}

.tr-menu-divider {
  height: 1px;
  background: var(--tr-border-subtle);
  margin: 4px 8px;
}

/* ──────────────────────────────────────────────────────────────────────────
   MAIN CONTAINER
   ────────────────────────────────────────────────────────────────────────── */
.tr-main {
  width: 100%;
  max-width: var(--tr-max-width);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 16px;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .tr-main {
    padding: 24px 32px 40px;
    gap: 12px;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   DATE & FILTER CONTROLS BAR
   ────────────────────────────────────────────────────────────────────────── */
.tr-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (min-width: 769px) {
  .tr-controls-bar {
    gap: 12px;
  }
}

.tr-date-stepper-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Quick range segmented control */
.tr-date-seg {
  display: inline-flex;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 12px;
  padding: 3px;
  box-sizing: border-box;
}

.tr-date-seg button {
  height: auto;
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 9px;
  color: var(--tr-muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.tr-date-seg button:hover {
  color: var(--tr-text);
}

.tr-date-seg button[aria-pressed="true"] {
  background: var(--tr-green);
  color: #ffffff;
  font-weight: 600;
}

/* Range trigger button */
.tr-date-range-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 12px;
  padding: 6px 12px;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  min-width: 220px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  text-align: left;
}

.tr-date-range-btn:hover {
  border-color: var(--tr-green);
}

.tr-date-range-btn[aria-expanded="true"] {
  border-color: var(--tr-green);
  box-shadow: 0 0 0 3px var(--tr-green-light);
}

.tr-date-range-btn svg:first-child {
  width: 17px;
  height: 17px;
  color: var(--tr-green);
  flex: none;
}

.tr-date-range-btn .tr-date-chev {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--tr-muted);
  transition: transform 0.15s ease;
  flex: none;
}

.tr-date-range-btn[aria-expanded="true"] .tr-date-chev {
  transform: rotate(180deg);
}

.tr-date-center-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tr-date-text {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--tr-text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.tr-date-sub {
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  color: var(--tr-muted);
  line-height: 1.2;
}

.tr-today-pill-mobile {
  display: none;
}

/* ==========================================================================
   Modern Date Range Picker Popover (Adapted from Date range picker.html)
   ========================================================================== */
/* Backdrop for mobile bottom sheet */
.tr-calendar-backdrop {
  display: none;
}

.tr-cal-mobile-handle {
  display: none;
}

.tr-calendar-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: flex;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 16px;
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  box-sizing: border-box;
}

.tr-calendar-popover.dis-none {
  display: none !important;
}

/* Presets Sidebar */
.tr-cal-presets {
  width: 168px;
  flex: none;
  border-right: 1px solid var(--tr-border);
  background: var(--tr-surface-2);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
}

.tr-cal-presets .tr-ph {
  font-size: 12px;
  color: var(--tr-muted);
  font-weight: 600;
  padding: 4px 10px 6px;
}

.tr-cal-presets button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--tr-text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.tr-cal-presets button:hover {
  background: var(--tr-surface);
  color: var(--tr-text);
}

.tr-cal-presets button.on {
  background: var(--tr-green-light);
  color: var(--tr-green);
  font-weight: 600;
}

.tr-cal-presets button.on::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tr-green);
}

/* Main Area */
.tr-cal-main {
  padding: 14px 16px 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Fields Header */
.tr-cal-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.tr-cal-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--tr-border);
  border-radius: 10px;
  padding: 6px 11px;
  cursor: text;
  background: var(--tr-surface);
  transition: border-color 0.12s, box-shadow 0.12s;
  box-sizing: border-box;
}

.tr-cal-field span {
  font-size: 11px;
  color: var(--tr-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tr-cal-field input {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 600;
  font-size: 13.5px;
  width: 100%;
  outline: none;
  color: var(--tr-text);
}

.tr-cal-field input::placeholder {
  color: var(--tr-muted);
  font-weight: 500;
  opacity: 0.7;
}

.tr-cal-field.active {
  border-color: var(--tr-green);
  box-shadow: 0 0 0 3px var(--tr-green-light);
}

.tr-cal-field.active span {
  color: var(--tr-green);
}

.tr-cal-field.bad {
  border-color: #d23a4a;
}

.tr-cal-dash {
  color: var(--tr-muted);
  font-weight: 600;
}

.tr-cal-num {
  font-variant-numeric: tabular-nums;
}

/* Months Grids */
.tr-cal-months {
  display: flex;
  gap: 22px;
}

.tr-cal-month {
  width: 266px;
}

.tr-cal-mh {
  display: flex;
  align-items: center;
  height: 34px;
  margin-bottom: 4px;
}

.tr-cal-mh h3 {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--tr-text);
}

.tr-cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  display: grid;
  place-items: center;
  color: var(--tr-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.tr-cal-nav:hover {
  border-color: var(--tr-green);
  color: var(--tr-green);
}

.tr-cal-nav svg {
  width: 16px;
  height: 16px;
}

.tr-cal-month.m0 .next,
.tr-cal-month.m1 .prev {
  visibility: hidden;
}

/* Tables & Grid for Days */
.tr-cal-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

.tr-cal-table th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tr-muted);
  height: 28px;
  text-align: center;
}

.tr-cal-table td {
  position: relative;
  padding: 2px 0;
  text-align: center;
  height: 40px;
}

.tr-cal-table td.in::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  right: 0;
  background: var(--pos-primary-soft, var(--bs-main-50, #e6f3e0));
}

.tr-cal-table td.in.pv::before {
  background: rgba(58, 152, 33, 0.08);
  border-top: 1px dashed var(--tr-green);
  border-bottom: 1px dashed var(--tr-green);
}

.tr-cal-table td.in.lo::before {
  left: 50%;
}

.tr-cal-table td.in.hi::before {
  right: 50%;
}

.tr-cal-table td.in:first-child:not(.lo)::before,
.tr-cal-table td.in.ms:not(.lo)::before {
  left: 2px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.tr-cal-table td.in:last-child:not(.hi)::before,
.tr-cal-table td.in.me:not(.hi)::before {
  right: 2px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.tr-cal-day-btn {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  font-weight: 500;
  font-size: 13px;
  color: var(--tr-text);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.1s;
  padding: 0;
}

.tr-cal-day-btn:hover {
  background: var(--tr-surface-2);
  box-shadow: inset 0 0 0 1px var(--tr-border);
}

/* Hover inside in-range date cell */
.tr-cal-table td.in .tr-cal-day-btn:hover {
  background: var(--tr-surface);
  box-shadow: inset 0 0 0 1.5px var(--tr-green);
  color: var(--tr-text);
}

/* Selected start/end day */
.tr-cal-table td.sel .tr-cal-day-btn {
  background: var(--tr-green) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 6px -2px rgba(58, 152, 33, 0.6);
}

.tr-cal-table td.sel .tr-cal-day-btn:hover {
  background: var(--tr-green-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px -2px rgba(58, 152, 33, 0.6);
}

.tr-cal-day-btn.today {
  font-weight: 700;
  color: var(--tr-green);
}

.tr-cal-day-btn.today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--tr-green);
}

.tr-cal-table td.sel .tr-cal-day-btn.today::after {
  background: #ffffff;
}

/* Keyboard / Preview Hover outline */
.tr-cal-table td.hv .tr-cal-day-btn {
  box-shadow: inset 0 0 0 1.5px var(--tr-green);
  background: var(--tr-surface);
}

/* Footer & Hints */
.tr-cal-hint {
  font-size: 11.5px;
  color: var(--tr-muted);
  margin: 6px 0 0;
}

.tr-cal-hint kbd {
  font: inherit;
  font-size: 11px;
  border: 1px solid var(--tr-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 4px;
  color: var(--tr-text);
  background: var(--tr-surface-2);
}

.tr-cal-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--tr-border);
  margin: 10px -16px 0;
  padding: 11px 16px;
  flex-wrap: wrap;
  background: var(--tr-surface);
}

.tr-cal-summary {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.tr-cal-summary b {
  font-weight: 600;
  font-size: 13px;
  color: var(--tr-text);
}

.tr-cal-summary small {
  color: var(--tr-muted);
  font-size: 11.5px;
}

.tr-cal-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.tr-cal-btn {
  border-radius: 10px;
  padding: 8px 14px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  color: var(--tr-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-cal-btn:hover {
  border-color: var(--tr-muted);
}

.tr-cal-btn.ghost {
  border-color: transparent;
  color: var(--tr-muted);
}

.tr-cal-btn.ghost:hover {
  background: var(--tr-surface-2);
  color: var(--tr-text);
}

.tr-cal-btn.primary {
  background: var(--tr-green);
  border-color: var(--tr-green);
  color: #ffffff;
}

.tr-cal-btn.primary:hover {
  background: var(--tr-green-hover);
  border-color: var(--tr-green-hover);
}

.tr-cal-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Responsive for small screens */
@media (max-width: 760px) {
  .tr-date-stepper-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tr-date-seg {
    display: flex;
    width: 100%;
  }

  .tr-date-seg button {
    flex: 1;
    padding: 8px 4px;
    font-size: 13px;
    text-align: center;
  }

  .tr-date-range-btn {
    width: 100%;
    min-width: unset;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--tr-surface);
  }

  .tr-date-text {
    font-size: 13.5px;
  }

  /* Bottom sheet backdrop */
  .tr-calendar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1050;
    transition: opacity 0.25s ease;
  }

  .tr-calendar-backdrop.dis-none {
    display: none !important;
  }

  /* Bottom sheet modal for calendar */
  .tr-calendar-popover {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 1060;
    flex-direction: column;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--tr-border);
    border-bottom: 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: trSheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes trSheetSlideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  /* Mobile pull handle */
  .tr-cal-mobile-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0 4px;
    background: var(--tr-surface);
    cursor: pointer;
  }

  .tr-cal-mobile-handle span {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--tr-border-strong, #cbd5e1);
  }

  .tr-cal-presets {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-right: 0;
    border-bottom: 1px solid var(--tr-border);
    padding: 8px 12px;
    gap: 6px;
    scrollbar-width: none;
  }

  .tr-cal-presets::-webkit-scrollbar {
    display: none;
  }

  .tr-cal-presets .tr-ph {
    display: none;
  }

  .tr-cal-presets button {
    white-space: nowrap;
    flex: none;
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 8px;
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
  }

  .tr-cal-presets button.on {
    background: var(--tr-green);
    color: #ffffff;
    border-color: var(--tr-green);
  }

  .tr-cal-presets button.on::after {
    display: none;
  }

  .tr-cal-main {
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .tr-cal-fields {
    gap: 6px;
    margin-bottom: 10px;
  }

  .tr-cal-field {
    padding: 5px 8px;
  }

  .tr-cal-field span {
    font-size: 10.5px;
  }

  .tr-cal-field input {
    font-size: 13px;
    padding: 1px 0;
  }

  .tr-cal-month {
    width: 100%;
  }

  .tr-cal-month.m1 {
    display: none;
  }

  .tr-cal-month.m0 .next {
    visibility: visible;
  }

  .tr-cal-table th {
    font-size: 12px;
    height: 26px;
  }

  .tr-cal-table td {
    height: 38px;
    padding: 2px 0;
  }

  .tr-cal-day-btn {
    width: 35px;
    height: 35px;
    font-size: 13px;
    border-radius: 9px;
  }

  .tr-cal-hint {
    display: none;
  }

  .tr-cal-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 10px -14px 0;
    padding: 12px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .tr-cal-summary {
    text-align: center;
    align-items: center;
  }

  .tr-cal-actions {
    margin-left: 0;
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .tr-cal-actions .tr-cal-btn {
    flex: 1;
    height: 40px;
    font-size: 13.5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .tr-cal-actions #tr-cal-clear-btn {
    flex: 0.7;
  }
}

.tr-pill-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  color: var(--tr-text);
  font-family: Inter, system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tr-pill-btn:hover {
  border-color: var(--tr-border);
  background: var(--tr-surface-2);
}

.tr-pill-btn:focus-visible,
.tr-pill-btn[aria-expanded="true"] {
  border-color: var(--tr-green);
  outline: none;
}

.tr-pill-btn.active {
  border-color: var(--tr-green);
  color: var(--tr-green);
  font-weight: 600;
}

.tr-pill-label {
  color: var(--tr-muted);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
}

.tr-pill-val {
  font-weight: 700;
  font-size: 14px;
  color: var(--tr-text);
  line-height: 1;
}

.tr-pill-chevron {
  margin-left: 2px;
  color: var(--tr-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tr-pill-btn[aria-expanded="true"] .tr-pill-chevron {
  transform: rotate(180deg);
}

/* View Mode, Terminal & Status Filter Dropdowns */
.tr-view-mode-wrap,
.tr-terminal-filter-wrap,
.tr-status-filter-wrap {
  position: relative;
  display: inline-flex;
}

.tr-view-dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  min-width: 170px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
  animation: trFadeIn 0.15s ease-out;
}

.tr-view-opt,
.tr-terminal-opt,
.tr-status-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  font: 600 13px Inter, system-ui, sans-serif;
  color: var(--tr-text);
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.tr-view-opt:hover,
.tr-terminal-opt:hover,
.tr-status-opt:hover {
  background: var(--tr-surface-2);
  color: var(--tr-text);
}

.tr-view-opt.active,
.tr-terminal-opt.active,
.tr-status-opt.active {
  background: var(--tr-green-light);
  color: var(--tr-green);
  font-weight: 700;
}

.tr-view-opt .tr-view-check-icon,
.tr-terminal-opt .tr-view-check-icon,
.tr-status-opt .tr-view-check-icon {
  display: none;
  stroke: var(--tr-green);
  stroke-width: 2.8;
  flex-shrink: 0;
}

.tr-view-opt.active .tr-view-check-icon,
.tr-terminal-opt.active .tr-view-check-icon,
.tr-status-opt.active .tr-view-check-icon {
  display: block;
}

/* ──────────────────────────────────────────────────────────────────────────
   SUMMARY CARDS SECTION
   ────────────────────────────────────────────────────────────────────────── */
.tr-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .tr-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tr-summary-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.tr-sum-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.tr-sum-card.primary {
  background: var(--tr-green-dark);
  color: #ffffff;
  border: 0;
  padding: 10px 14px;
}

.tr-sum-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 18px;
}

.tr-sum-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--tr-muted);
  text-transform: capitalize;
  letter-spacing: 0.01em;
}

.tr-sum-card.primary .tr-sum-title {
  color: var(--tr-hero-sub);
}

.tr-sum-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--tr-surface-2);
  color: var(--tr-muted);
  transition: all 0.15s ease;
}

.tr-sum-icon.charged {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.tr-sum-icon.tip {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.tr-sum-icon.refunded {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.tr-sum-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  color: var(--tr-hero-text);
  border-radius: 50%;
  line-height: 1;
}

/* Row layout: Đưa biểu đồ lên ngang hàng cùng amount & desc */
.tr-sum-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.tr-sum-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex-shrink: 0;
}

.tr-sum-amount {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.tr-sum-card.primary .tr-sum-amount {
  font-size: 20px;
  color: var(--tr-hero-text);
}

.tr-sum-desc {
  font-size: 11px;
  color: var(--tr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.tr-sum-card.primary .tr-sum-desc {
  color: var(--tr-hero-sub);
}

.tr-sum-desc.warning {
  color: var(--pos-warning-color, #b54708);
}

/* Sparkline in Summary Cards */
.tr-sum-sparkline {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-sum-body .tr-sum-sparkline {
  margin-top: 0;
  flex: 1;
  min-width: 0;
  max-width: 52%;
}

.tr-sum-sparkline svg {
  width: 100%;
  height: 20px;
  overflow: visible;
  display: block;
}

.tr-sparkline-hover-wrap {
  position: relative;
  width: 100%;
  cursor: crosshair;
}

.tr-spark-tooltip {
  position: absolute;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.tr-sum-card.primary .tr-spark-tooltip {
  background: #ffffff;
  color: #064e3b;
}

.tr-spark-tooltip.active {
  opacity: 1;
}

.tr-spark-hover-dot {
  pointer-events: none;
  transition: cx 0.08s ease, cy 0.08s ease;
}

.tr-spark-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tr-spark-meta .tr-spark-label {
  margin-right: auto;
  font-size: 10px;
}

.tr-spark-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tr-spark-badge.up {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
}

.tr-spark-badge.down {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.tr-spark-badge.flat {
  color: var(--tr-muted);
  background: rgba(107, 114, 128, 0.12);
}

.tr-sum-card.primary .tr-spark-badge.up {
  color: #34d399;
  background: rgba(52, 211, 153, 0.2);
}

.tr-sum-card.primary .tr-spark-badge.down {
  color: #f87171;
  background: rgba(248, 113, 113, 0.2);
}

.tr-sum-card.primary .tr-spark-badge.flat {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

.tr-spark-label {
  font-size: 11px;
  color: var(--tr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tr-sum-card.primary .tr-spark-label {
  color: var(--tr-hero-sub);
}

/* Primary card mobile breakdown */
.tr-primary-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
  margin-top: 4px;
}

.tr-mini-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-mini-lbl {
  font-size: 12px;
  color: var(--tr-hero-sub);
}

.tr-mini-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--tr-hero-text);
}

.tr-batch-btn-main {
  margin-top: 10px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--tr-green-btn, var(--pos-main-400, #71d256));
  color: #0e2a12;
  font: 600 14px Inter, system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.tr-batch-btn-main:hover {
  opacity: 0.92;
}

@media (min-width: 1024px) {

  .tr-primary-mini-stats,
  .tr-batch-btn-main {
    display: none;
    /* In desktop, this info is shown in the other 3 cards */
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   CONTENT SECTION: DESKTOP TABLE & ASIDE BREAKDOWN
   ────────────────────────────────────────────────────────────────────────── */
.tr-content-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
}

@media (min-width: 1024px) {
  .tr-content-layout {
    flex-direction: row;
    gap: 20px;
    align-items: flex-start; /* Giữ sidebar và các thành phần khác đứng yên theo nội dung tự nhiên */
  }
}

.tr-table-panel {
  flex: 999 1 640px;
  min-width: 0;
  height: calc(100dvh - 360px);
  max-height: calc(100vh - 360px);
  min-height: 360px;
  margin-bottom: 120px;
  display: flex;
  flex-direction: column;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 16px;
  overflow: hidden;
}

.tr-table-panel .tr-table-responsive {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tr-table-panel .tr-pagination {
  margin-top: auto;
  flex-shrink: 0;
  background: var(--tr-surface);
  z-index: 5;
}

.tr-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--tr-border-subtle);
  flex-shrink: 0;
  background: var(--tr-surface);
  z-index: 5;
}

.tr-panel-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tr-panel-count {
  font-size: 12px;
  color: var(--tr-muted);
}

/* Desktop Table View */
.tr-table-responsive {
  width: 100%;
}

.tr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  text-align: left;
}

.tr-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.tr-table th {
  position: sticky;
  top: 0;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tr-muted);
  background: var(--tr-surface-2);
  border-bottom: 1px solid var(--tr-border);
  white-space: nowrap;
  z-index: 10;
}

.tr-table th:first-child {
  padding-left: 16px;
}

.tr-table th:last-child {
  padding-right: 16px;
}

.tr-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--tr-border-subtle);
  color: var(--tr-text);
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.35;
}

.tr-table td:first-child {
  padding-left: 16px;
}

.tr-table td:last-child {
  padding-right: 16px;
}

.tr-table tr:hover {
  background: var(--tr-surface-2);
  cursor: pointer;
}

.tr-text-right {
  text-align: right !important;
}

/* Card Brand Tag */
.tr-brand-tag {
  width: 30px;
  height: 18px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex: none;
}

.tr-brand-tag.mc {
  background: #1f242e;
}

.tr-brand-tag.visa {
  background: #193c8d;
}

.tr-brand-tag.amex {
  background: #0077a6;
}

.tr-brand-tag.disc {
  background: #d96b27;
}

.tr-brand-tag.other {
  background: #475569;
}

/* Status Badges - Using theme tokens */
.tr-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.tr-status-badge.captured {
  background: var(--pos-confirmed-background, var(--tr-green-light));
  color: var(--pos-confirmed-ink, var(--tr-green));
}

.tr-status-badge.voided {
  background: var(--pos-pending-background, #fef3c7);
  color: var(--pos-pending-ink, #b45309);
}

.tr-status-badge.refunded {
  background: var(--pos-noShow-background, #fee2e2);
  color: var(--pos-noShow-ink, #b91c1c);
}

/* Table Pagination */
.tr-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--tr-border-subtle);
  gap: 12px;
  flex-wrap: wrap;
}

.tr-pg-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--tr-border);
  border-radius: 8px;
  background: var(--tr-surface);
  color: var(--tr-text);
  font: 500 13px Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tr-pg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tr-pg-btn:not(:disabled):hover {
  background: var(--tr-surface-2);
}

/* Mobile Transaction List View */
.tr-mobile-list {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.tr-date-group {
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 16px;
  overflow: hidden;
}

.tr-date-group-header {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tr-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fafbfc;
  border-bottom: 1px solid var(--tr-border-subtle);
}

.tr-mobile-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--tr-text);
  border-bottom: 1px solid var(--tr-border-subtle);
  cursor: pointer;
  transition: background 0.15s ease;
}

.tr-mobile-card:last-child {
  border-bottom: 0;
}

.tr-mobile-card:hover {
  background: #f8fafc;
}

.tr-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tr-card-row-1 {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.tr-card-last4 {
  font-weight: 600;
  font-size: 15px;
}

.tr-card-ticket {
  font-size: 13px;
  color: var(--tr-muted);
}

.tr-card-sub {
  font-size: 13px;
  color: var(--tr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tr-card-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.tr-card-amount-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  flex: none;
}

.tr-card-total {
  font-weight: 700;
  font-size: 16px;
}

.tr-card-tip,
.tr-card-batch {
  font-size: 12px;
  color: var(--tr-muted);
}

@media (max-width: 768px) {

  .tr-table-panel .tr-table-responsive,
  .tr-table-panel .tr-pagination {
    display: none;
  }

  .tr-mobile-list {
    display: flex;
    touch-action: pan-y;
  }

  .tr-table-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .tr-table-panel .tr-panel-head {
    padding: 0 4px 8px;
    border: 0;
  }

  .tr-main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    touch-action: pan-y;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   SIDEBAR BREAKDOWN (Status & Card Type)
   ────────────────────────────────────────────────────────────────────────── */
.tr-breakdown-aside {
  flex: 1 1 300px;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.tr-aside-title {
  margin: 0;
  font: normal normal 600 var(--s-16);
}

.tr-prog-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
  background: var(--tr-border-subtle);
}

.tr-prog-fill.captured {
  background: var(--tr-green-btn);
}

.tr-prog-fill.voided {
  background: var(--tr-warning);
}

.tr-prog-fill.refunded {
  background: #c7cdd4;
}

.tr-status-list {
  display: flex;
  flex-direction: column;
}

.tr-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  border-bottom: 1px solid var(--tr-border-subtle);
  font-size: 14px;
}

.tr-status-row:last-child {
  border-bottom: 0;
}

.tr-status-row-label {
  font: normal normal 500 var(--s-13);
}

.tr-status-bullet {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 8px;
}

.tr-status-bullet.captured {
  background: var(--tr-green-btn);
}

.tr-status-bullet.voided {
  background: var(--tr-warning);
}

.tr-status-bullet.refunded {
  background: #c7cdd4;
}

.tr-card-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 768px) {
  .tr-card-type-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.tr-card-type-item {
  background: var(--tr-surface-2);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .tr-card-type-item {
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
}

.tr-card-type-lbl {
  font-size: 13px;
  color: var(--tr-muted);
}

.tr-card-type-count {
  font-size: 17px;
  font-weight: 600;
  color: var(--tr-text);
}

/* ──────────────────────────────────────────────────────────────────────────
   DETAIL MODAL / BOTTOM SHEET (Transaction Detail)
   ────────────────────────────────────────────────────────────────────────── */
.tr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.tr-modal-backdrop.dis-none {
  display: none !important;
}

.tr-detail-sheet {
  width: 100%;
  max-width: 440px;
  max-height: 94vh;
  background: var(--tr-bg);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.25);
  animation: trSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes trSlideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@media (min-width: 769px) {
  .tr-modal-backdrop {
    align-items: center;
  }

  .tr-detail-sheet {
    max-width: 480px;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    animation: trFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

.tr-sheet-header {
  background: var(--tr-surface);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--tr-border-subtle);
  gap: 12px;
}

.tr-sheet-btn-back {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tr-text);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.tr-sheet-btn-back:hover {
  background: var(--tr-surface-2);
}

.tr-sheet-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--tr-text);
  flex: 1;
}

.tr-sheet-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tr-sheet-btn-action,
.tr-sheet-close-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tr-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.tr-sheet-btn-action:hover,
.tr-sheet-close-btn:hover {
  background: var(--tr-surface-2);
  color: var(--tr-text);
}

.tr-sheet-body {
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--tr-bg);
}

/* Hero Summary Card */
.tr-sheet-hero {
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 20px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.tr-sheet-hero .tr-status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--tr-green-light);
  color: var(--tr-green);
}

.tr-hero-amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tr-text);
  line-height: 1.1;
  margin: 2px 0;
}

.tr-hero-sub {
  font-size: 13px;
  color: var(--tr-muted);
  font-weight: 500;
}

.tr-hero-card-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.tr-hero-card-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--tr-text);
  letter-spacing: 0.02em;
}

/* Info Details Card */
.tr-sheet-info-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 20px;
  padding: 6px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.tr-sheet-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--tr-border-subtle);
  font-size: 14px;
  gap: 12px;
}

.tr-sheet-info-row:last-child {
  border-bottom: 0;
}

.tr-sheet-info-lbl {
  color: var(--tr-muted);
  font-weight: 500;
}

.tr-sheet-info-lbl.bold {
  font-weight: 700;
  color: var(--tr-text);
  font-size: 15px;
}

.tr-sheet-info-val {
  font-weight: 600;
  color: var(--tr-text);
  text-align: right;
}

.tr-sheet-info-val.total-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--tr-text);
}

/* Bottom Actions */
.tr-sheet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
  background: var(--tr-surface-2);
  border-top: 1px solid var(--tr-border);
}

.tr-btn-void {
  height: 48px;
  border: 1.5px solid var(--tr-border);
  border-radius: 14px;
  background: var(--tr-surface);
  color: var(--pos-cancelled-color, #b42318);
  font: 700 15px Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.tr-btn-void:hover {
  background: var(--pos-cancelled-background, #fef3f2);
  border-color: var(--pos-cancelled-border, #fda29b);
}

.tr-btn-void:active {
  transform: scale(0.98);
}

.tr-btn-refund {
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--tr-hero-bg);
  color: var(--tr-hero-text);
  font: 700 15px Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.tr-btn-refund:hover {
  opacity: 0.92;
}

.tr-btn-refund:active {
  transform: scale(0.98);
}

/* ==========================================================================
   Screen 2: Batch Record – Modal Dialog (Desktop & Mobile)
   ========================================================================== */
.tr-br-dialog {
  width: 96%;
  max-width: 1080px;
  max-height: 90vh;
  background: var(--tr-surface);
  border-radius: 20px;
  box-shadow: var(--tr-shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: trFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.tr-br-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--tr-border);
  background: var(--tr-surface);
}

.tr-br-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-br-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tr-text);
}

.tr-br-subtitle {
  font-size: 13px;
  color: var(--tr-muted);
}

.tr-br-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tr-br-btn-terminal {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--tr-text);
  font: 500 13px Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-br-btn-terminal:hover {
  background: var(--tr-surface-2);
}

.tr-br-btn-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  color: var(--tr-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-br-btn-close:hover {
  background: var(--tr-surface-2);
}

/* Scrollable Body Content for Batch records */
.tr-br-body-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  background: var(--tr-surface);
}

/* Desktop 5 KPI Grid */
.tr-br-kpi-grid {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  background: var(--tr-surface);
  border-bottom: 1px solid var(--tr-border);
}

.tr-br-kpi-card {
  background: var(--tr-surface-2);
  border: 1px solid var(--tr-border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
  box-sizing: border-box;
}

.tr-br-kpi-card.highlight {
  background: var(--tr-hero-bg);
  border-color: var(--tr-hero-bg);
}

.tr-br-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--tr-muted);
}

.tr-br-kpi-card.highlight .tr-br-kpi-label {
  color: var(--tr-hero-sub);
}

.tr-br-kpi-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--tr-text);
  line-height: 1.1;
}

.tr-br-kpi-card.highlight .tr-br-kpi-value {
  color: var(--tr-hero-text);
}

/* Desktop Table Container with sticky thead and scrollable tbody */
.tr-br-table-wrap {
  flex: 1;
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  position: relative;
  background: var(--tr-surface);
}

.tr-br-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.tr-br-table th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tr-muted);
  background: var(--tr-surface);
  border-bottom: 1px solid var(--tr-border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--tr-border);
}

.tr-br-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--tr-border);
  color: var(--tr-text);
  font-variant-numeric: tabular-nums;
  background: var(--tr-surface);
}

.tr-br-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.tr-br-row:hover td {
  background: var(--tr-surface-2);
}

.tr-br-terminal-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--tr-text);
  background: var(--tr-surface-2);
  border: 1px solid var(--tr-border-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

/* Footer for Desktop */
.tr-br-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--tr-surface);
  border-top: 1px solid var(--tr-border);
}

.tr-br-footer-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--tr-muted);
}

.tr-br-footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tr-br-footer-sum {
  font-size: 20px;
  font-weight: 800;
  color: var(--tr-text);
}

.tr-br-btn-done {
  height: 42px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--pos-primary, var(--tr-hero-bg));
  color: var(--pos-primary-ink, #ffffff);
  font: 700 15px Inter, system-ui, sans-serif;
  border: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tr-br-btn-done:hover {
  opacity: 0.92;
}

/* Mobile-only elements default hidden on desktop */
.tr-br-mobile-summary-card,
.tr-br-mobile-batches-header,
.tr-br-mobile-list {
  display: none;
}

/* ==========================================================================
   Screen 2 Mobile Styles (<= 768px - Matching Image 2 Prototype)
   ========================================================================== */
@media (max-width: 768px) {
  #tr-batch-records-modal.tr-modal-backdrop {
    align-items: flex-end;
  }

  .tr-br-dialog {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }

  .tr-br-header .tr-br-actions #tr-br-terminal-btn {
    display: none;
    /* Mobile terminal filter is located next to "Batches" title */
  }

  .tr-br-kpi-grid,
  .tr-br-table-wrap,
  .tr-br-footer {
    display: none !important;
  }

  .tr-br-body-content {
    padding: 16px 20px 24px;
    gap: 16px;
    background: var(--tr-bg);
  }

  /* Dark Green Summary Card on Mobile */
  .tr-br-mobile-summary-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--tr-hero-bg);
    border-radius: 20px;
    padding: 20px;
    color: var(--tr-hero-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }

  .tr-br-mobile-summary-lbl {
    font-size: 13px;
    font-weight: 500;
    color: var(--tr-hero-sub);
  }

  .tr-br-mobile-summary-amount {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tr-hero-text);
    line-height: 1.1;
    margin: 4px 0 10px;
  }

  .tr-br-mobile-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .tr-br-mobile-mini-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tr-br-mobile-mini-lbl {
    font-size: 12px;
    color: var(--tr-hero-sub);
  }

  .tr-br-mobile-mini-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-hero-text);
  }

  /* Mobile Batches Header */
  .tr-br-mobile-batches-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
  }

  .tr-br-mobile-batches-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-br-mobile-terminal-wrap .tr-br-btn-terminal {
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--tr-border);
    background: var(--tr-surface);
  }

  /* Mobile Date-grouped Batch Cards List */
  .tr-br-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .tr-br-mobile-group {
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .tr-br-mobile-group-header {
    padding: 12px 16px 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tr-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--tr-border-subtle);
  }

  .tr-br-mobile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--tr-border-subtle);
    cursor: pointer;
    transition: background 0.12s ease;
  }

  .tr-br-mobile-item:last-child {
    border-bottom: 0;
  }

  .tr-br-mobile-item:active {
    background: var(--tr-surface-2);
  }

  .tr-br-mobile-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .tr-br-mobile-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tr-br-mobile-batch-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-br-mobile-batch-sub {
    font-size: 12px;
    color: var(--tr-muted);
  }

  .tr-br-mobile-item-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--tr-text);
  }
}

/* ==========================================================================
   Screen 4: Batch Details – Desktop Modal Dialog
   ========================================================================== */
.tr-bd-dialog {
  width: 96%;
  max-width: 1080px;
  max-height: 90vh;
  background: var(--tr-surface);
  border-radius: 20px;
  box-shadow: var(--tr-shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: trFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tr-bd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--tr-border);
  background: var(--tr-surface);
}

.tr-bd-btn-back {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tr-text);
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-bd-btn-back:hover {
  background: var(--tr-surface-2);
}

.tr-bd-title-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-bd-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tr-text);
}

.tr-bd-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--tr-muted);
}

.tr-meta-dot {
  color: var(--tr-muted);
}

.tr-terminal-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--tr-text);
  background: var(--tr-surface-2);
  border: 1px solid var(--tr-border-subtle);
  padding: 2px 7px;
  border-radius: 6px;
}

.tr-bd-btn-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tr-text);
  border: 1px solid var(--tr-border);
  background: var(--tr-surface);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-bd-btn-close:hover {
  background: var(--tr-surface-2);
}

/* Scrollable Body Content for Batch Details */
.tr-bd-body-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  background: var(--tr-surface);
}

/* Desktop 5 KPI Grid */
.tr-bd-kpi-grid {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  background: var(--tr-surface);
  border-bottom: 1px solid var(--tr-border);
}

.tr-bd-kpi-card {
  background: var(--tr-surface-2);
  border: 1px solid var(--tr-border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
  box-sizing: border-box;
}

.tr-bd-kpi-card.highlight {
  background: var(--tr-hero-bg);
  border-color: var(--tr-hero-bg);
}

.tr-bd-kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--tr-muted);
}

.tr-bd-kpi-card.highlight .tr-bd-kpi-label {
  color: var(--tr-hero-sub);
}

.tr-bd-kpi-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--tr-text);
  line-height: 1.1;
}

.tr-bd-kpi-card.highlight .tr-bd-kpi-value {
  color: var(--tr-hero-text);
}

/* Desktop Table Container with sticky thead and scrollable tbody */
.tr-bd-table-wrap {
  flex: 1;
  min-height: 280px;
  max-height: 520px;
  overflow-y: auto;
  position: relative;
  background: var(--tr-surface);
}

.tr-bd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.tr-bd-table th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tr-muted);
  background: var(--tr-surface);
  border-bottom: 1px solid var(--tr-border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--tr-border);
}

.tr-bd-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--tr-border);
  color: var(--tr-text);
  font-variant-numeric: tabular-nums;
  background: var(--tr-surface);
}

.tr-bd-table tbody tr:hover td {
  background: var(--tr-surface-2);
}

.tr-bd-action-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}

.tr-bd-action-badge.sale {
  background: var(--pos-completed-background, #eaf8e5);
  color: var(--pos-completed-color, #2d7a1f);
}

.tr-bd-action-badge.void {
  background: var(--pos-cancelled-background, #ffedd5);
  color: var(--pos-cancelled-color, #c2410c);
}

/* Mobile-only elements default hidden on desktop */
.tr-bd-mobile-summary-card,
.tr-bd-mobile-tx-header,
.tr-bd-mobile-list {
  display: none;
}

/* ==========================================================================
   Screen 4 Mobile Styles (<= 768px - Matching Image 1 Mobile Prototype)
   ========================================================================== */
@media (max-width: 768px) {
  #tr-batch-details-modal.tr-modal-backdrop {
    align-items: flex-end;
  }

  .tr-bd-dialog {
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
  }

  .tr-bd-kpi-grid,
  .tr-bd-table-wrap {
    display: none !important;
  }

  .tr-bd-body-content {
    padding: 16px 20px 24px;
    gap: 16px;
    background: var(--tr-bg);
  }

  /* Dark Green Summary Card on Mobile */
  .tr-bd-mobile-summary-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--tr-hero-bg);
    border-radius: 20px;
    padding: 20px;
    color: var(--tr-hero-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }

  .tr-bd-mobile-summary-lbl {
    font-size: 13px;
    font-weight: 500;
    color: var(--tr-hero-sub);
  }

  .tr-bd-mobile-summary-amount {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tr-hero-text);
    line-height: 1.1;
    margin: 4px 0 10px;
  }

  .tr-bd-mobile-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .tr-bd-mobile-mini-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tr-bd-mobile-mini-lbl {
    font-size: 12px;
    color: var(--tr-hero-sub);
  }

  .tr-bd-mobile-mini-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-hero-text);
  }

  .tr-bd-mobile-mini-val.warning {
    color: var(--pos-warning-color, #ffc58a);
  }

  /* Mobile Transactions Section Header */
  .tr-bd-mobile-tx-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
  }

  .tr-bd-mobile-tx-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-bd-mobile-tx-showing {
    font-size: 13px;
    color: var(--tr-muted);
  }

  /* Mobile Transactions Date-Grouped List */
  .tr-bd-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .tr-bd-mobile-group {
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .tr-bd-mobile-group-header {
    padding: 12px 16px 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tr-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--tr-border-subtle);
  }

  .tr-bd-mobile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--tr-border-subtle);
  }

  .tr-bd-mobile-item:last-child {
    border-bottom: 0;
  }

  .tr-bd-mobile-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .tr-bd-mobile-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .tr-bd-mobile-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .tr-bd-mobile-card-num {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-bd-mobile-id {
    font-size: 12px;
    color: var(--tr-muted);
  }

  .tr-bd-mobile-ticket {
    font-size: 13px;
    color: var(--tr-muted);
  }

  .tr-bd-mobile-action-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    width: fit-content;
    margin-top: 2px;
  }

  .tr-bd-mobile-action-tag.sale {
    background: var(--pos-completed-background, #eaf8e5);
    color: var(--pos-completed-color, #2d7a1f);
  }

  .tr-bd-mobile-action-tag.void {
    background: var(--pos-cancelled-background, #ffedd5);
    color: var(--pos-cancelled-color, #c2410c);
  }

  .tr-bd-mobile-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .tr-bd-mobile-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-bd-mobile-tip {
    font-size: 12px;
    color: var(--tr-muted);
  }
}

/* ==========================================================================
   Screen 3: Batch Record Group – Modal / Mobile Bottom Sheet
   ========================================================================== */
.tr-bg-dialog {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  background: var(--tr-surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: var(--tr-shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: trFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .tr-bg-dialog {
    max-width: 920px;
    border-radius: 20px;
  }
}

.tr-modal-handle-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 2px;
}

@media (min-width: 769px) {
  .tr-modal-handle-bar {
    display: none;
  }
}

.tr-modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--tr-border);
}

.tr-bg-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--tr-border);
  background: var(--tr-surface);
}

.tr-bg-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tr-bg-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--tr-text);
}

.tr-bg-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--tr-muted);
}

.tr-bg-btn-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tr-text);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tr-bg-btn-close:hover {
  background: var(--tr-surface-2);
}

/* Scrollable Body Content */
.tr-bg-body-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--tr-surface);
}

/* Desktop 5 KPI Cards Grid (Matching Desktop Prototype) */
.tr-bg-desktop-kpi-grid {
  display: none;
}

@media (min-width: 769px) {
  .tr-bg-desktop-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }

  .tr-bg-summary-card {
    display: none !important;
  }
}

.tr-bg-desktop-kpi-card {
  background: var(--tr-surface-2);
  border: 1px solid var(--tr-border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 80px;
  box-sizing: border-box;
}

.tr-bg-desktop-kpi-card.highlight {
  background: var(--tr-hero-bg);
  border-color: var(--tr-hero-bg);
}

.tr-bg-desktop-kpi-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--tr-muted);
}

.tr-bg-desktop-kpi-card.highlight .tr-bg-desktop-kpi-lbl {
  color: var(--tr-hero-sub);
}

.tr-bg-desktop-kpi-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--tr-text);
  line-height: 1.1;
}

.tr-bg-desktop-kpi-card.highlight .tr-bg-desktop-kpi-val {
  color: var(--tr-hero-text);
}

.tr-bg-desktop-kpi-val.warning {
  color: var(--pos-warning-color, #c25e00);
}

/* Primary Dark Green Summary Card (Mobile) */
.tr-bg-summary-card {
  background: var(--tr-hero-bg);
  border-radius: 20px;
  padding: 20px;
  color: var(--tr-hero-text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tr-bg-summary-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--tr-hero-sub);
}

.tr-bg-summary-amount {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tr-hero-text);
  line-height: 1.1;
  margin: 4px 0 2px;
}

.tr-bg-summary-sub {
  font-size: 13px;
  color: var(--tr-hero-sub);
}

.tr-bg-mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  padding-top: 16px;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tr-bg-mini-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tr-bg-mini-label {
  font-size: 12px;
  color: var(--tr-hero-sub);
}

.tr-bg-mini-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--tr-hero-text);
}

.tr-bg-mini-val.warning {
  color: var(--pos-warning-color, #ffc58a);
}

/* Groups Section */
.tr-bg-groups-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tr-bg-groups-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--tr-text);
}

/* Mobile Group Cards List */
.tr-bg-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tr-bg-group-card {
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tr-bg-group-card:hover {
  border-color: var(--pos-primary, #6fda54);
  box-shadow: var(--tr-shadow-md);
}

.tr-bg-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tr-bg-card-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--tr-text);
  line-height: 1.25;
}

.tr-bg-card-sub {
  font-size: 13px;
  color: var(--tr-muted);
  margin-top: 2px;
}

.tr-bg-card-badge-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tr-bg-card-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--tr-muted);
}

.tr-bg-card-dash {
  font-size: 16px;
  font-weight: 700;
  color: var(--tr-text);
  line-height: 1;
}

.tr-bg-card-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.tr-bg-metric-item {
  background: var(--tr-surface-2);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tr-bg-metric-lbl {
  font-size: 13px;
  color: var(--tr-muted);
}

.tr-bg-metric-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--tr-text);
}

.tr-bg-metric-val.warning {
  color: var(--pos-warning-color, #b54708);
}

/* Desktop Table (hidden on mobile, visible on desktop) */
.tr-bg-table-wrap {
  display: none;
  background: var(--tr-surface);
  border: 1px solid var(--tr-border);
  border-radius: 14px;
  overflow: hidden;
}

@media (min-width: 769px) {
  .tr-bg-cards-list {
    display: none;
  }

  .tr-bg-table-wrap {
    display: block;
  }
}

.tr-bg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tr-bg-table th {
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tr-muted);
  background: var(--tr-surface);
  border-bottom: 1px solid var(--tr-border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.tr-bg-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--tr-border);
  color: var(--tr-text);
  background: var(--tr-surface);
}

.tr-bg-clickable-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.tr-bg-clickable-row:hover td {
  background: var(--tr-surface-2);
}

.tr-count-badge {
  background: var(--pos-completed-background, #eaf8e5);
  color: var(--pos-completed-color, #2d7a1f);
  font-weight: 600;
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 999px;
  display: inline-block;
}

/* Footer: Sticky bottom action button matching prototype */
.tr-bg-footer {
  display: flex;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--tr-border);
  background: var(--tr-surface);
}

.tr-bg-btn-done {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: var(--pos-primary, var(--tr-hero-bg));
  color: var(--pos-primary-ink, #ffffff);
  font: 700 16px Inter, system-ui, sans-serif;
  border: 0;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tr-bg-btn-done:hover {
  opacity: 0.92;
}

.tr-bg-btn-done:active {
  transform: scale(0.99);
}

@media (min-width: 769px) {
  .tr-bg-footer {
    justify-content: flex-end;
  }

  .tr-bg-btn-done {
    width: auto;
    min-width: 120px;
    height: 42px;
    padding: 0 24px;
    border-radius: 10px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {

  .tr-br-kpi-grid,
  .tr-bd-kpi-grid,
  .tr-bg-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── 1. Top Header on Mobile ── */
  .tr-header {
    background: var(--tr-surface);
    border-bottom: 1px solid var(--tr-border);
  }

  .tr-header-inner {
    padding: 12px 16px;
  }

  .tr-title {
    font: normal normal 700 var(--s-20);
  }

  .tr-search-btn-mobile {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    border-radius: 12px;
    color: var(--tr-text);
  }

  .tr-batch-btn-icon-only {
    width: 44px;
    height: 44px;
    background: var(--pos-completed-background, #eaf8e5);
    color: var(--pos-completed-color, #2d7a1f);
    border-radius: 12px;
  }

  .tr-batch-dropdown {
    top: 52px;
    right: -48px;
    width: 300px;
    z-index: 100;
  }

  .tr-more-btn-mobile {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tr-text);
    cursor: pointer;
  }

  /* ── 2. Date Stepper Row on Mobile ── */
  .tr-main {
    padding: 16px;
    gap: 16px;
  }

  .tr-controls-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .tr-date-stepper-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tr-date-stepper {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    gap: 12px;
  }

  .tr-date-step-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--tr-border);
    border-radius: 12px;
    background: var(--tr-surface);
    color: var(--tr-text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
  }

  .tr-date-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    flex: 1;
    min-width: 0;
  }

  .tr-date-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--tr-text);
    line-height: 1.25;
  }

  .tr-date-sub {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--tr-muted);
    margin-top: 2px;
  }

  /* ── 3. Filter Pills Row on Mobile ── */
  .tr-today-btn {
    display: none;
    /* In prototype, Today is in the pills list */
  }

  .tr-filter-pills-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .tr-filter-pills-row>.tr-view-mode-wrap,
  .tr-filter-pills-row>.tr-terminal-filter-wrap,
  .tr-filter-pills-row>.tr-status-filter-wrap {
    display: inline-flex;
  }

  .tr-view-mode-wrap .tr-pill-label {
    display: none;
    /* In prototype, view mode pill shows 'Month' directly without 'View:' prefix */
  }

  .tr-date-stepper-wrap {
    width: 100%;
  }

  .tr-pill-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--tr-border);
    background: var(--tr-surface);
    font-size: 13px;
    font-weight: 500;
    color: var(--tr-text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  }

  .tr-today-pill-mobile {
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid var(--pos-primary, #2d7a1f);
    background: var(--pos-primary-soft, #eaf8e5);
    color: var(--pos-primary, #2d7a1f);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
  }

  /* ── 4. Summary Card: Primary Only ── */
  .tr-summary-grid {
    display: block;
  }

  .tr-sum-card:not(.primary) {
    display: none !important;
  }

  .tr-sum-card.primary {
    border-radius: 20px;
    padding: 20px;
    background: var(--tr-hero-bg);
  }

  .tr-sum-card.primary .tr-sum-header {
    margin-bottom: 2px;
  }

  .tr-sum-card.primary .tr-sum-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--tr-hero-sub);
  }

  .tr-sum-badge {
    background: rgba(255, 255, 255, 0.15);
    color: var(--tr-hero-text);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
  }

  .tr-sum-card.primary .tr-sum-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .tr-sum-card.primary .tr-sum-amount {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 4px 0 2px;
    color: var(--tr-hero-text);
  }

  .tr-sum-desc {
    font-size: 12px;
    color: var(--tr-hero-sub);
  }

  .tr-sum-card.primary .tr-sum-sparkline {
    max-width: 100%;
    margin-top: 8px;
    margin-bottom: 2px;
  }

  .tr-primary-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .tr-mini-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tr-mini-lbl {
    font-size: 12px;
    color: var(--tr-hero-sub);
  }

  .tr-mini-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-hero-text);
  }

  .tr-batch-btn-main {
    margin-top: 16px;
    height: 48px;
    border-radius: 14px;
    background: var(--tr-green-btn, var(--pos-main-400, #71d256));
    color: #0e2a12;
    font-size: 15px;
    font-weight: 700;
  }

  /* ── 5. Re-ordering: Breakdown First, Transactions Second ── */
  .tr-content-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .tr-breakdown-aside {
    order: 1;
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .tr-table-panel {
    order: 2;
  }

  /* Status breakdown 3 horizontal columns */
  .tr-prog-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--tr-surface-2);
  }

  .tr-status-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border-bottom: 0;
  }

  .tr-status-row {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border-bottom: 0;
    height: auto;
    padding: 0;
    gap: 4px;
  }

  .tr-status-row-label {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--tr-muted);
  }

  .tr-status-row-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-aside-divider {
    height: 1px;
    background: var(--tr-border-subtle);
    margin: 4px 0;
  }

  /* Card Type 4 columns */
  .tr-card-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .tr-card-type-item {
    background: var(--tr-surface-2);
    border-radius: 12px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  .tr-card-type-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-card-type-lbl {
    font-size: 12px;
    color: var(--tr-muted);
  }

  /* ── 6. Transactions Header & Card List ── */
  .tr-table-panel .tr-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 4px 6px;
  }

  .tr-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-panel-count {
    font-size: 13px;
    color: var(--tr-muted);
  }

  .tr-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .tr-date-group {
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  }

  .tr-date-group-header {
    background: var(--tr-surface-2);
    padding: 9px 14px;
    font-size: 11px;
    font-weight: 700;
    color: var(--tr-muted);
    border-bottom: 1px solid var(--tr-border-subtle);
  }

  .tr-mobile-card {
    padding: 12px 14px;
    border-bottom: 1px solid var(--tr-border-subtle);
  }

  .tr-mobile-card:last-child {
    border-bottom: 0;
  }

  .tr-brand-tag {
    width: 44px;
    height: 28px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
  }

  .tr-brand-tag.mc {
    background: #1f2937;
    color: #ffffff;
  }

  .tr-brand-tag.visa {
    background: #1a3a8f;
    color: #ffffff;
  }

  .tr-brand-tag.other {
    background: var(--tr-surface-2);
    color: var(--tr-text);
    border: 1px solid var(--tr-border);
  }

  .tr-card-row-1 {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .tr-card-last4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-card-ticket {
    font-size: 13px;
    color: var(--tr-muted);
  }

  .tr-card-sub {
    font-size: 12px;
    color: var(--tr-muted);
    margin-top: 1px;
  }

  .tr-card-tags {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .tr-status-badge {
    height: 18px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
  }

  .tr-card-amount-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
  }

  .tr-card-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--tr-text);
  }

  .tr-card-tip,
  .tr-card-batch {
    font-size: 11px;
    color: var(--tr-muted);
  }

  /* ── 7. Load More Button ── */
  .tr-mobile-load-more-btn {
    width: 100%;
    height: 48px;
    margin-top: 14px;
    border: 1px solid var(--tr-border);
    border-radius: 14px;
    background: var(--tr-surface);
    color: var(--pos-primary, #2d7a1f);
    font-size: 15px;
    font-weight: 600;
    font-family: Inter, system-ui, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
  }

  .tr-mobile-load-more-btn:active {
    background: var(--tr-surface-2);
    transform: scale(0.99);
  }
}