/* Transaction history, design A (Filter sidebar). The list and the drawer are in /css/txlist.css. */
.pa { padding: 30px 32px 70px; max-width: 1240px; }
.pa-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.pa-head h1 { margin: 0; font-family: "titles", sans-serif !important; font-weight: 400; font-size: 32px; color: #E4E8EF; }
.pa-head p { margin: 8px 0 0; font-size: 15px; color: #A5ACB9; }
.pa-phonebar, .pa-quick { display: none; }
.pa-grid { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; align-items: start; }

/* inputs: a search field and two date fields that look like the design's boxes */
.ycp .input { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--muted); font-size: 14px; cursor: text; }
.ycp .input:focus-within { border-color: #6B6BFF; }
.ycp .input input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; color-scheme: dark; }
.ycp .input input::placeholder { color: var(--muted-2); }
.ycp .input input[type="search"]::-webkit-search-cancel-button { filter: invert(.6); }

.pa-rail { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.pa-rail > .input { margin-bottom: 8px; height: 40px; background: var(--bg); }
.pa-rail fieldset { margin: 0; padding: 12px 2px 10px; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.pa-rail > .input + fieldset { border-top: 0; }
.pa-rail legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2); }
.pa-rail legend + * { clear: both; }
.pa-opt { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 4px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.pa-opt:hover { background: var(--surface-2); }
.pa-opt em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted-2); }
.pa-opt input, .pa-cur input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pa-box { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #3A4257; display: flex; align-items: center; justify-content: center; color: #fff; }
.pa-box .i { visibility: hidden; }
.pa-opt input:checked + .pa-box { border: 0; background: var(--grad); }
.pa-opt input:checked + .pa-box .i { visibility: visible; }
.pa-radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #3A4257; }
.pa-opt input:checked + .pa-radio { border: 5px solid #7E7BFF; }
.pa-opt input:focus-visible + .pa-box, .pa-opt input:focus-visible + .pa-radio, .pa-cur:has(input:focus-visible) { outline: 2px solid #7E7BFF; outline-offset: 2px; }
.pa-tic { flex: none; width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.pa-st { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: none !important; }
.pa-st i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pa-curs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pa-cur { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--bg); cursor: pointer; user-select: none; }
.pa-cur:hover { border-color: #3A4257; }
.pa-cur.on { color: #fff; border: 1.5px solid transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; }
.pa-range { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pa-range .input { gap: 8px; height: 38px; padding: 0 10px; font-size: 12.5px; background: var(--bg); border-radius: 9px; }
.pa-range-l { flex: none; width: 34px; font-size: 12px; color: var(--muted); }
.pa-range .input input { font-size: 13px; }
.ycp .pa-reset { margin-top: 6px; height: 36px; border: 0; background: none; color: var(--link); font-size: 13px; font-weight: 500; border-top: 1px solid var(--line); padding-top: 4px; }

.pa-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; margin-bottom: 14px; }
.pa-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.pa-count { font-size: 14px; color: var(--muted); }
.pa-count b { color: var(--text); font-weight: 600; }
.ycp .pa-clear { border: 0; background: none; color: var(--link); font-size: 13px; font-weight: 500; padding: 0 6px; }
.ycp .pa-sort { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--text-2); }
.ycp .pa-sort:hover { border-color: #3A4257; }

.ycp .chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.ycp .chip.on { color: #fff; border-color: transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.ycp .chip.removable { padding-right: 8px; color: #D9D3FF; background: rgba(155, 123, 255, .14); border-color: rgba(155, 123, 255, .35); height: 30px; font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

.pa-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.pa-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pa-tile:first-child { background: linear-gradient(135deg, rgba(155, 123, 255, .13), rgba(58, 141, 240, .07)), var(--surface); border-color: #2E3150; }
.pa-tile > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pa-tile em { position: relative; display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 12px; color: var(--text-2); padding: 3px 8px 3px 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.pa-pick select { appearance: none; -webkit-appearance: none; border: 0; background: none; color: inherit; font: inherit; font-size: 12px; padding: 0 14px 0 0; margin-right: -14px; cursor: pointer; }
.pa-pick select option { background: var(--surface-2); color: var(--text); }
.pa-pick .i { pointer-events: none; }
.pa-tile b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-tile b.in { color: var(--in); }
.pa-tile small { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--hold); }
.pa-tile:last-child small { color: var(--muted); }
#list { transition: opacity .15s; }
#list.is-busy { opacity: .5; pointer-events: none; }
.pa-more { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 22px; font-size: 13px; color: var(--muted); }

.pa-sheet .pa-rail.in-sheet { position: static; display: flex; max-height: none; overflow: visible; padding: 0; border: 0; background: none; }
.pa-sheet-foot { position: sticky; bottom: -28px; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 14px 0 4px; background: var(--surface); }
.pa-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 600; }

@media (max-width: 1180px) { .pa-grid { grid-template-columns: 240px minmax(0, 1fr); } }
@media (max-width: 750px) {
  .pa { padding: 22px 14px 120px; }
  .pa-head { margin-bottom: 16px; }
  .pa-head h1 { font-size: 26px; }
  .pa-head p { font-size: 14px; }
  .pa-head .btn { display: none; }
  .pa-phonebar { display: flex; gap: 8px; }
  .pa-phonebar .input { flex: 1; min-width: 0; height: 42px; }
  .pa-filter-btn { height: 42px; }
  .pa-quick { display: flex; gap: 8px; overflow-x: auto; margin: 12px -14px 0; padding: 0 14px 2px; scrollbar-width: none; }
  .pa-quick::-webkit-scrollbar { display: none; }
  .pa-grid { display: block; margin-top: 16px; }
  .pa-rail:not(.in-sheet) { display: none; }
  .pa-bar { display: none; }
  .pa-sum { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
  .pa-tile { padding: 12px; border-radius: 14px; }
  .pa-tile:last-child { display: none; }
  .pa-tile b { font-size: 19px; }
  .pa-sheet { padding-bottom: 20px; }
  .pa-sheet .pa-rail > .input { display: none; }
  .pa-sheet .pa-rail fieldset:first-of-type { border-top: 0; }
  .pa-sheet .pa-opt { height: 40px; font-size: 14px; }
}
