.history-route {
  min-height: 100svh;
  width: 100%;
  overflow-x: hidden;
  background: var(--a9-bg, #242424);
  color: var(--a9-text, #f3f3f3);
}

.br-page {
  box-sizing: border-box;
  width: 100%;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: calc(var(--a9-bottom-h, 52px) + env(safe-area-inset-bottom, 0px) + 12px);
  background: var(--a9-bg, #242424);
  color: var(--a9-text, #f3f3f3);
  font-family: var(--a9-font, Manrope, "Noto Sans Bengali", system-ui, sans-serif);
}

.br-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 55px;
  background: var(--a9-bg-2, #1a1a1a);
}

.br-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
}

.br-close,
.br-back,
.br-filter-btn {
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.br-close {
  position: absolute;
  right: 12px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
}

.br-icon {
  width: 21px;
  height: 21px;
  display: block;
}

.br-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--a9-bg, #242424);
}

.br-tab {
  min-height: 48px;
  color: #8c8c8c;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent !important;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.ninet6-root .br-tab.is-on,
.br-tab.is-on {
  color: var(--a9-gold, #f8bb25) !important;
  border-bottom: 2px solid var(--a9-gold, #f8bb25) !important;
  box-shadow: inset 0 -2px 0 var(--a9-gold, #f8bb25);
  font-weight: 600;
}

.br-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 55px;
  padding: 0 12px;
  background: var(--a9-bg-2, #1a1a1a);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.br-date-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 11px;
  border-radius: 3px;
  background: var(--a9-gold, #f8bb25);
  color: var(--a9-bg-2, #1a1a1a);
  font-size: 13px;
  line-height: 20px;
}

.br-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.85);
}

.br-cols {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr 1.5fr;
  align-items: center;
  min-height: 35px;
  padding: 0 28px 0 12px;
  background: var(--a9-gold, #f8bb25);
  color: #111;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.br-cols span {
  padding: 6px 8px;
  text-align: center;
}

.br-cols span + span {
  border-left: 1px dotted rgba(0, 0, 0, 0.25);
}

.br-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.br-row {
  background: #2a2a2a;
}

.br-row:nth-child(even) {
  background: #323232;
}

.br-row-main {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr 1.5fr;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 28px 0 8px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.br-cell {
  padding: 10px 6px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.br-cell + .br-cell {
  border-left: 1px dotted rgba(255, 255, 255, 0.2);
}

.br-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.45);
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
  transform: translateY(-50%) rotate(-45deg);
}

.br-row.is-open .br-chevron {
  transform: translateY(-70%) rotate(45deg);
}

.br-amt-pos {
  color: #22c55e;
}

.br-amt-neg {
  color: #ef4444;
}

.br-details {
  margin: 0;
  padding: 8px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.br-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}

.br-details dt {
  color: #9d9d9d;
  font-weight: 500;
}

.br-details dd {
  margin: 0;
  text-align: right;
  word-break: break-all;
}

.br-empty,
.br-loading,
.br-error {
  margin: 0;
  padding: 48px 16px;
  color: #9d9d9d;
  text-align: center;
}

.br-error {
  color: #fda4af;
}

.br-empty-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  display: block;
}

.br-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 8px;
  color: #9d9d9d;
  font-size: 13px;
}

.br-pager button {
  min-height: 40px;
  padding: 0 14px !important;
  border: 0;
  border-radius: 8px;
  background: var(--a9-gold, #f8bb25) !important;
  color: #111 !important;
  font-weight: 700;
  cursor: pointer;
}

.br-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.br-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
  background: var(--a9-bg-2, #1a1a1a);
}

.br-sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 55px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.br-sheet-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.br-back {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
}

.br-sheet-body {
  flex: 1;
  overflow: auto;
  padding: 16px 12px 88px;
}

.br-sheet-body h3 {
  margin: 8px 0 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
}

.br-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.br-chips-date {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.br-chip {
  min-height: 44px;
  padding: 8px 4px !important;
  border: 0;
  border-radius: 8px;
  background: #3a3a3a !important;
  color: #cfcfcf !important;
  font: inherit;
  font-size: 12px !important;
  line-height: 1.2;
  white-space: normal;
  cursor: pointer;
}

.ninet6-root .br-chip.is-on,
.br-chip.is-on {
  background: var(--a9-gold, #f8bb25) !important;
  color: var(--a9-bg-2, #1a1a1a) !important;
}

.br-confirm {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  width: auto;
  min-height: 52px;
  border: 0;
  border-radius: 4px;
  background: var(--a9-gold, #f8bb25) !important;
  color: var(--a9-bg-2, #1a1a1a) !important;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1023px) {
  .ninet6-root:has(.header.is-logged-in):has(.br-page) .header {
    display: none !important;
  }

  .ninet6-root:has(.br-sheet) .alfa9-bottom-nav {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .br-page {
    max-width: var(--a9-max, 1200px);
    min-height: calc(100svh - 72px);
    margin: 0 auto;
    padding: 0 24px 32px;
  }

  .br-title {
    font-size: 20px;
  }

  .br-tab {
    font-size: 16px;
  }

  .br-cols,
  .br-row-main {
    padding-right: 36px;
  }

  .br-cell {
    font-size: 14px;
    padding: 12px 8px;
  }

  .br-sheet {
    left: 50%;
    width: min(480px, 100%);
    transform: translateX(-50%);
    box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.45);
  }
}
