/* QuickFA-Web — modern UI */
:root {
  --bg: #f1f4f9;
  --panel: #ffffff;
  --ink: #1a2233;
  --muted: #67718a;
  --line: #e3e8f0;
  --accent: #3b5bdb;
  --accent-2: #2b4acb;
  --accent-soft: #e7ecff;
  --green: #0c8a4d;
  --red: #ce2d4f;
  --amber: #b97509;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 30, 60, .08), 0 8px 24px -12px rgba(20, 30, 60, .12);
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink);
  overflow-x: hidden;
}
#app { min-height: 100%; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-rows: 52px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.topbar {
  grid-column: 1 / 3; display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: linear-gradient(90deg, #1d2c5e, #2b4acb); color: #fff; box-shadow: var(--shadow); z-index: 5;
}
.topbar .brand { font-weight: 700; font-size: 16px; letter-spacing: .4px; display: flex; gap: 8px; align-items: center; }
.topbar .brand small { opacity: .7; font-weight: 400; }
.topbar .grow { flex: 1; }
.topbar select, .topbar .chip {
  background: rgba(255,255,255,.13); color: #fff; border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px; padding: 5px 10px; font-size: 13px;
}
.topbar select option { color: #1a2233; }
.topbar .chip { display: inline-flex; gap: 6px; align-items: center; }
.topbar button.link { background: none; border: none; color: #cfd8ff; cursor: pointer; font-size: 13px; }
.topbar button.link:hover { color: #fff; }

.sidebar {
  background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px 30px;
}
.sidebar .group { margin-top: 10px; }
.sidebar .group > .gtitle {
  font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted);
  padding: 6px 10px 4px; font-weight: 700;
}
.sidebar a {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: 13.5px; margin: 1px 0;
}
.sidebar a:hover { background: #f2f5fb; }
.sidebar a.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.sidebar a .ico { width: 18px; text-align: center; opacity: .75; }

.main { min-width: 0; overflow-y: auto; padding: 18px 22px 60px; }
.page-title { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; flex-wrap: wrap; }
.page-title h1 { font-size: 20px; margin: 0; font-weight: 650; }
.page-title .sub { color: var(--muted); font-size: 13px; }
.page-title .spacer { flex: 1; }

/* ---------- cards / panels ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-h { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card .card-b { padding: 14px 16px; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.kpi { padding: 14px 16px; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; }
.kpi .val { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .val.green { color: var(--green); } .kpi .val.red { color: var(--red); }

/* ---------- forms ---------- */
label.f { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #cdd5e1; border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink); outline: none;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,91,219,.15); }
input[type=checkbox] { width: auto; }
input.num, td.num input { text-align: right; font-variant-numeric: tabular-nums; }
.frow { display: grid; gap: 10px; margin-bottom: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 8px;
  border: 1px solid #cdd5e1; background: #fff; color: var(--ink); cursor: pointer; font: inherit; font-weight: 600;
}
.btn:hover { background: #f4f6fb; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--red); border-color: #f3c2cd; }
.btn.danger:hover { background: #fdf0f3; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.2px; }
.tbl th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); background: #fafbfe;
  position: sticky; top: 0;
}
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.tbl tr:hover td { background: #f7f9fd; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.total td { font-weight: 700; background: #f4f6fb; border-top: 2px solid var(--line); }
.tbl tr.clickable { cursor: pointer; }
.tbl .dr { color: var(--ink); } .tbl .cr { color: var(--red); }
.scroll { overflow: auto; max-height: calc(100vh - 240px); max-width: 100%; -webkit-overflow-scrolling: touch; }
.scroll > .tbl { min-width: 760px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; }
.badge.green { background: #e2f6ec; color: var(--green); }
.badge.red { background: #fdeaee; color: var(--red); }
.badge.blue { background: var(--accent-soft); color: var(--accent-2); }
.badge.gray { background: #eef1f6; color: var(--muted); }

.pay-toggle {
  display: inline-flex; align-items: center; gap: 7px; min-width: 88px;
  color: var(--red); font-size: 12px; font-weight: 700; cursor: pointer; user-select: none;
}
.pay-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pay-toggle span {
  width: 34px; height: 18px; border-radius: 99px; background: #f6c8d2; border: 1px solid #f0a8b7;
  position: relative; flex: 0 0 auto; transition: background .15s ease, border-color .15s ease;
}
.pay-toggle span::after {
  content: ''; position: absolute; width: 14px; height: 14px; top: 1px; left: 1px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 60, .24);
  transition: transform .15s ease;
}
.pay-toggle.is-paid { color: var(--green); }
.pay-toggle.is-paid span { background: #bdebd4; border-color: #8ed8b5; }
.pay-toggle.is-paid span::after { transform: translateX(16px); }
.pay-toggle input:focus + span { box-shadow: 0 0 0 3px rgba(59,91,219,.15); }
.pay-toggle input:disabled + span { opacity: .55; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 9px; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .fld { min-width: 130px; }
.toolbar .fld.w { min-width: 230px; }
.toolbar .fld.status-filter { min-width: 210px; }
.seg {
  display: inline-grid; grid-auto-flow: column; border: 1px solid #cdd5e1; border-radius: 8px;
  overflow: hidden; background: #fff; height: 34px;
}
.seg button {
  border: 0; border-right: 1px solid #dce2ec; background: #fff; color: var(--muted);
  padding: 0 12px; font: inherit; font-weight: 700; cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: #f4f6fb; color: var(--ink); }
.seg button.active { background: var(--accent); color: #fff; }

.voucher-summary {
  display: flex; gap: 10px; flex-wrap: wrap; margin: -2px 0 12px;
}
.vsum-item {
  min-width: 190px; display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 14px;
}
.vsum-item span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .45px; }
.vsum-item b { font-size: 18px; font-variant-numeric: tabular-nums; }
.vsum-item b.green { color: var(--green); }
.vsum-item b.blue { color: var(--accent-2); }
.vsum-item b.red { color: var(--red); }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex;
  align-items: flex-start; justify-content: center; padding: 4vh 16px; z-index: 50; overflow-y: auto;
}
.modal {
  background: var(--panel); border-radius: 14px; box-shadow: 0 24px 64px rgba(0,0,0,.25);
  width: 640px; max-width: 96vw; animation: pop .14s ease-out;
}
.modal.wide { width: 1080px; max-width: 96vw; }
.modal .m-h { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15.5px; display: flex; align-items: center; }
.modal .m-h .x { margin-left: auto; cursor: pointer; border: 0; background: none; font-size: 18px; color: var(--muted); }
.modal .m-b { padding: 16px 18px; }
.modal .m-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; }
@keyframes pop { from { transform: scale(.97); opacity: .4; } }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.toast {
  background: #16213e; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow);
  font-size: 13.5px; animation: pop .15s;
}
.toast.err { background: #8e1f3a; }

/* ---------- autocomplete ---------- */
.ac { position: relative; }
.ac-list {
  position: fixed; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; z-index: 9999;
}
.ac-list div {
  padding: 7px 10px; cursor: pointer; font-size: 13px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-list div:hover, .ac-list div.sel { background: var(--accent-soft); }
.ac-list .meta { color: var(--muted); font-size: 11.5px; margin-left: 6px; }

/* ---------- login ---------- */
.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1000px 500px at 20% 0%, #2b4acb22, transparent), var(--bg); }
.login-card { width: 420px; max-width: calc(100vw - 28px); }
.login-card .logo { text-align: center; font-size: 34px; }
.login-card h2 { text-align: center; margin: 4px 0 2px; }
.login-card .sub { text-align: center; color: var(--muted); margin-bottom: 16px; }

/* ---------- voucher entry grid ---------- */
.vgrid td { padding: 4px 6px; }
.vgrid input, .vgrid select { padding: 5px 7px; border-radius: 6px; }
.vgrid td.rm { width: 30px; text-align: center; cursor: pointer; color: var(--red); }

.totbar { display: flex; gap: 26px; justify-content: flex-end; align-items: center; padding: 10px 6px; font-size: 14px; flex-wrap: wrap; }
.totbar > span { display: inline-flex; align-items: center; gap: 6px; }
.totbar b { font-variant-numeric: tabular-nums; }
.totbar .big { font-size: 17px; color: var(--accent-2); }
.totbar input { padding: 4px 7px; }

/* ---------- print ---------- */
.print-doc { background: #fff; padding: 26px 30px; max-width: 880px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; }
.print-doc h2 { margin: 0; }
.print-doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-doc th, .print-doc td { border: 1px solid #9aa4b8; padding: 5px 8px; }
.print-doc .nohead td { border: none; padding: 2px 0; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; }
  .sidebar, .topbar, .toolbar, .no-print { display: none !important; }
  .main { padding: 0; overflow: visible; }
  .scroll { max-height: none; overflow: visible; }
  .card { box-shadow: none; border: none; }
  .tbl th { position: static; }
}
/* ---------- invoice replica (original QUICKFA bill format) ---------- */
.inv {
  background: #fff; color: #000; width: 720px; margin: 0 auto;   /* A4 printable width @96dpi */
  max-width: 100%;
  border: 1.6px solid #000; font: 13px/1.35 Arial, Helvetica, sans-serif;
}
/* auto-fit-to-one-page: JS adds .c1/.c2 to compress row spacing when many items */
.inv.c1 .inv-items td { padding-top: 1px; padding-bottom: 1px; font-size: 11.5px; }
.inv.c1 .inv-items .sm { font-size: 9.5px; line-height: 1.15; }
.inv.c2 .inv-items td { padding-top: 0; padding-bottom: 0; font-size: 10.5px; line-height: 1.12; }
.inv.c2 .inv-items .sm { font-size: 9px; line-height: 1.05; }
.inv.c2 .inv-items th { padding-top: 1px; padding-bottom: 1px; }
.inv-fill td { padding: 0 !important; }
.inv .c { text-align: center; }
.inv .rt { text-align: right; }
.inv .b { font-weight: 700; }
.inv .sm { font-size: 10.5px; }
.inv .r3 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; }
.inv .r2 { display: flex; justify-content: space-between; gap: 8px; }
.inv-head { padding: 6px 10px 4px; }
.inv-name { text-align: center; font-size: 30px; font-weight: 800; font-style: italic; font-family: Arial, sans-serif; margin: 2px 0 6px; }
.inv-party { display: grid; grid-template-columns: 53% 47%; border-top: 1.4px solid #000; }
.inv-party .lft { padding: 5px 10px; border-right: 1.4px solid #000; }
.inv-party .lft > div, .inv-party .rgt > div { margin: 3px 0; }
.inv-party .rgt { padding: 5px 10px; }
.inv-party .rgt > div { border-bottom: 1px solid #000; padding-bottom: 4px; }
.inv-party .rgt > div:last-child { border-bottom: none; }
/* shift the right-side date fields (Dated / Dt) one inch left of the edge */
.inv-party .rgt .r2 > span:last-child { padding-right: 1in; }
.inv-party .strow { display: flex; gap: 0; align-items: center; }
.inv-party .strow span:first-child { flex: 1; }
.inv-party .stbox { border: 1px solid #000; padding: 1px 14px; font-weight: 700; text-align: center; }
.inv-party .stbox.w { min-width: 150px; }
.inv-items { width: 100%; border-collapse: collapse; border-top: 1.4px solid #000; }
.inv-items th {
  border: 1px solid #000; border-top: none; padding: 3px 4px; font-size: 11.5px; text-align: center; font-weight: 700;
}
.inv-items th .split { display: flex; justify-content: space-between; padding: 0 4px; font-size: 10.5px; }
.inv-items td { border-left: 1px solid #000; border-right: 1px solid #000; padding: 2px 5px; font-size: 12px; vertical-align: top; }
.inv-items tbody tr:first-child td { padding-top: 5px; }
.inv-items tfoot td { border: 1px solid #000; padding: 4px 5px; }
.inv-foot { display: grid; grid-template-columns: 60% 40%; border-top: 1.4px solid #000; }
.inv-foot .lft { border-right: 1.4px solid #000; }
.inv-foot .rc { padding: 4px 10px; border-bottom: 1px solid #000; }
.inv-foot .bank { padding: 5px 10px; line-height: 1.45; }
.inv-foot .sums { width: 100%; border-collapse: collapse; height: 100%; }
.inv-foot .sums td { padding: 4px 8px; border-bottom: 1px solid #000; }
.inv-foot .sums tr.gt td { border-bottom: none; border-top: 1.4px solid #000; font-size: 14px; }
.inv-words { border-top: 1.4px solid #000; padding: 5px 10px; }
.inv-sign { display: grid; grid-template-columns: 1fr auto; border-top: 1.4px solid #000; padding: 5px 10px 4px; }
.inv-sign .mt8 { margin-top: 8px; }
.inv-sign .eoe { margin-top: 14px; }
.inv-sign .rgt { text-align: right; display: flex; flex-direction: column; justify-content: space-between; }
.inv-sign .forco { font-size: 15px; }
.inv-sign .authsig { margin-top: 30px; font-size: 14px; }
.inv-mail { border-top: 1.4px solid #000; padding: 3px 10px 5px; }
.inv-page { margin: 0 auto 26px; }                 /* batch: gap between bills on screen */
@media print {
  .inv { width: 720px; border-width: 1.2px; }      /* keep fixed width so fit matches screen */
  @page { size: A4 portrait; margin: 8mm; }
  .inv-page { margin: 0; }
  .inv-page { break-after: page; page-break-after: always; }
  .inv-page:last-child { break-after: auto; page-break-after: auto; }
}

/* ---------- account statement (ledger print, FoxPro layout) ---------- */
.stmt { padding: 14px 18px 6px; color: #000; }
.stmt-co { text-align: center; line-height: 1.4; }
.stmt-co .co-name { font-size: 18px; font-weight: 700; }
.stmt-co .co-period { margin-top: 4px; }
.stmt-party { margin: 10px 0 6px; line-height: 1.4; }
.stmt-tbl { width: 100%; }
.stmt-tbl th { background: #f2f2f2; border-top: 1px solid #000; border-bottom: 1px solid #000; }
/* keep date / amounts on one line (only Particulars may wrap) — matches FoxPro */
.stmt-tbl th, .stmt-tbl td { white-space: nowrap; }
.stmt-tbl th:nth-child(2), .stmt-tbl td:nth-child(2) { white-space: normal; }
.stmt-foot { text-align: center; font-weight: 700; margin-top: 22px;
  border-top: 1px solid #000; padding-top: 8px; }
@media print {
  .stmt-tbl th { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* line-entry grids (voucher/bill items) scroll sideways instead of crushing */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .tblwrap > #v-lines { min-width: 640px; }
  .tblwrap > #b-lines { min-width: 1020px; }
}

.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 12px; }
.empty { text-align: center; color: var(--muted); padding: 36px 0; }

@media (max-width: 900px) {
  body { font-size: 13.5px; }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    height: auto;
  }

  .topbar {
    grid-column: 1;
    min-height: 58px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .topbar .brand {
    flex: 1 1 100%;
  }

  .topbar .chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar select {
    width: auto;
    max-width: 46vw;
  }

  .sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scroll-snap-type: x proximity;
  }

  .sidebar .group {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
    margin-top: 0;
  }

  .sidebar .group > .gtitle {
    display: none;
  }

  .sidebar a {
    flex: 0 0 auto;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    white-space: nowrap;
    scroll-snap-align: start;
    background: #f8fafc;
  }

  .main {
    padding: 14px 12px 48px;
  }

  .page-title {
    align-items: flex-start;
  }

  .page-title h1 {
    flex: 1 1 100%;
    font-size: 18px;
  }

  .grid.c2,
  .grid.c3,
  .grid.c4 {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar .fld,
  .toolbar .fld.w,
  .toolbar .fld.status-filter {
    flex: 1 1 180px;
    min-width: min(100%, 180px);
  }

  .toolbar .btn,
  .toolbar a.btn {
    min-height: 38px;
  }

  .vsum-item {
    flex: 1 1 220px;
    min-width: 0;
  }

  .scroll {
    max-height: none;
    margin-right: -12px;
    padding-right: 12px;
  }

  table.tbl {
    font-size: 12.6px;
  }

  .tbl th,
  .tbl td {
    padding: 7px 8px;
  }

  .modal-back {
    align-items: stretch;
    padding: 10px;
  }

  .modal,
  .modal.wide {
    width: 100%;
    max-width: none;
    border-radius: 12px;
  }

  .modal .m-b {
    overflow-x: auto;
  }

  .modal .m-f {
    flex-wrap: wrap;
  }
}

/* entry forms set their columns via inline styles, so overriding needs !important:
   collapse to 2 columns; any field the desktop marks as spanning gets a full row */
@media (max-width: 700px) {
  .frow { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .frow > [style*="grid-column"], .frow > .ac { grid-column: 1 / -1 !important; }
  input, select, textarea { font-size: 16px; }  /* <16px makes iOS Safari zoom on focus */
}

@media (max-width: 560px) {
  body { font-size: 13px; }

  .topbar .brand small {
    display: none;
  }

  .topbar select,
  .topbar .chip,
  .topbar button.link {
    flex: 1 1 auto;
  }

  .btn {
    min-height: 40px;
    justify-content: center;
  }

  .toolbar .fld,
  .toolbar .fld.w,
  .toolbar .fld.status-filter,
  .toolbar .btn,
  .toolbar a.btn {
    flex-basis: 100%;
    width: 100%;
  }

  .seg {
    width: 100%;
    grid-auto-flow: initial;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    height: auto;
  }

  .seg button {
    min-height: 38px;
  }

  .card .card-h,
  .card .card-b,
  .modal .m-h,
  .modal .m-b,
  .modal .m-f {
    padding-left: 12px;
    padding-right: 12px;
  }

  .kpi .val {
    font-size: 19px;
    overflow-wrap: anywhere;
  }

  .vsum-item {
    flex-basis: 100%;
  }

  .totbar {
    justify-content: stretch;
    gap: 10px;
  }

  .totbar > span {
    width: 100%;
    justify-content: space-between;
  }

  #toast-root {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .toast {
    width: 100%;
  }

  .print-doc {
    padding: 16px 12px;
  }

  .inv-party,
  .inv-foot,
  .inv-sign,
  .inv .r3 {
    grid-template-columns: 1fr;
  }

  .inv-party .lft,
  .inv-foot .lft {
    border-right: 0;
  }
}
