/* ===== BASE - applies to ALL resolutions ===== */
.generalledgermainTable {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Truncate long text columns */
.generalledgermainTable .gl-Name span,
.generalledgermainTable .gl-memo span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* ===== ABOVE 1800px - Boxed Layout ===== */
@media (min-width: 1800px) {
    .generalledgermainTable .gl-date         { width: 7% !important; }
    .generalledgermainTable .gl-tranType     { width: 10% !important; }
    .generalledgermainTable .gl-otherDetails { width: 8% !important; }
    .generalledgermainTable .gl-Name         { width: 13% !important; }
    .generalledgermainTable .gl-memo         { width: 20% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 17% !important; }
    .generalledgermainTable .gl-debit        { width: 8% !important; }
    .generalledgermainTable .gl-credit       { width: 8% !important; }
    .generalledgermainTable .gl-balance      { width: 8% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 270px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 190px !important; }
    /* Total = 102% intentional slight overflow handles rounding */
}

/* ===== 1700px to 1799px ===== */
@media (min-width: 1700px) and (max-width: 1799px) {
    .generalledgermainTable .gl-date         { width: 7% !important; }
    .generalledgermainTable .gl-tranType     { width: 10% !important; }
    .generalledgermainTable .gl-otherDetails { width: 9% !important; }
    .generalledgermainTable .gl-Name         { width: 13% !important; }
    .generalledgermainTable .gl-memo         { width: 20% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 17% !important; }
    .generalledgermainTable .gl-debit        { width: 8% !important; }
    .generalledgermainTable .gl-credit       { width: 8% !important; }
    .generalledgermainTable .gl-balance      { width: 8% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 270px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 190px !important; }
    /* Total = 102% */
}

/* ===== 1600px to 1699px ===== */
@media (min-width: 1600px) and (max-width: 1699px) {
    .generalledgermainTable .gl-date         { width: 7% !important; }
    .generalledgermainTable .gl-tranType     { width: 11% !important; }
    .generalledgermainTable .gl-otherDetails { width: 9% !important; }
    .generalledgermainTable .gl-Name         { width: 13% !important; }
    .generalledgermainTable .gl-memo         { width: 20% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 18% !important; }
    .generalledgermainTable .gl-debit        { width: 7% !important; }
    .generalledgermainTable .gl-credit       { width: 7% !important; }
    .generalledgermainTable .gl-balance      { width: 7% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 240px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 170px !important; }
    /* Total = 102% */
}

/* ===== 1440px to 1599px ===== */
@media (min-width: 1440px) and (max-width: 1599px) {
    .generalledgermainTable .gl-date         { width: 7% !important; }
    .generalledgermainTable .gl-tranType     { width: 10% !important; }
    .generalledgermainTable .gl-otherDetails { width: 9% !important; }
    .generalledgermainTable .gl-Name         { width: 13% !important; }
    .generalledgermainTable .gl-memo         { width: 20% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 17% !important; }
    .generalledgermainTable .gl-debit        { width: 7% !important; }
    .generalledgermainTable .gl-credit       { width: 7% !important; }
    .generalledgermainTable .gl-balance      { width: 7% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 210px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 155px !important; }
    /* Total = 101% */
}

/* ===== 1400px to 1439px ===== */
@media (min-width: 1400px) and (max-width: 1439px) {
    .generalledgermainTable .gl-date         { width: 7% !important; }
    .generalledgermainTable .gl-tranType     { width: 11% !important; }
    .generalledgermainTable .gl-otherDetails { width: 9% !important; }
    .generalledgermainTable .gl-Name         { width: 11% !important; }
    .generalledgermainTable .gl-memo         { width: 20% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 17% !important; }
    .generalledgermainTable .gl-debit        { width: 8% !important; }
    .generalledgermainTable .gl-credit       { width: 8% !important; }
    .generalledgermainTable .gl-balance      { width: 7% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 190px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 140px !important; }
    /* Total = 102% */
}

/* ===== 1367px to 1399px ===== */
@media (min-width: 1366px) and (max-width: 1399px) {
    .generalledgermainTable .gl-date         { width: 8% !important; }
    .generalledgermainTable .gl-tranType     { width: 10% !important; }
    .generalledgermainTable .gl-otherDetails { width: 9% !important; }
    .generalledgermainTable .gl-Name         { width: 11% !important; }
    .generalledgermainTable .gl-memo         { width: 20% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 17% !important; }
    .generalledgermainTable .gl-debit        { width: 8% !important; }
    .generalledgermainTable .gl-credit       { width: 8% !important; }
    .generalledgermainTable .gl-balance      { width: 7% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 190px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 120px !important; }
    /* Total = 102% */
}

/* ===== 1281px to 1366px ===== */
@media (min-width: 1280px) and (max-width: 1365px) {
    .generalledgermainTable .gl-date         { width: 8% !important; }
    .generalledgermainTable .gl-tranType     { width: 11% !important; }
    .generalledgermainTable .gl-otherDetails { width: 9% !important; }
    .generalledgermainTable .gl-Name         { width: 11% !important; }
    .generalledgermainTable .gl-memo         { width: 18% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 17% !important; }
    .generalledgermainTable .gl-debit        { width: 8% !important; }
    .generalledgermainTable .gl-credit       { width: 8% !important; }
    .generalledgermainTable .gl-balance      { width: 8% !important; }
    .generalledgermainTable .gl-edit         { width: 5% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 170px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 125px !important; }
    /* Total = 101% */
}

/* ===== 1181px to 1280px ===== */
@media (min-width: 1181px) and (max-width: 1279px) {
    .generalledgermainTable .gl-date         { width: 7% !important; }
    .generalledgermainTable .gl-tranType     { width: 11% !important; }
    .generalledgermainTable .gl-otherDetails { width: 8% !important; }
    .generalledgermainTable .gl-Name         { width: 10% !important; }
    .generalledgermainTable .gl-memo         { width: 19% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 17% !important; }
    .generalledgermainTable .gl-debit        { width: 9% !important; }
    .generalledgermainTable .gl-credit       { width: 9% !important; }
    .generalledgermainTable .gl-balance      { width: 7% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 150px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 110px !important; }
    /* Total = 101% */
}

/* ===== 1024px to 1180px ===== */
@media (min-width: 1024px) and (max-width: 1180px) {
    .generalledgermainTable .gl-date         { width: 7% !important; }
    .generalledgermainTable .gl-tranType     { width: 11% !important; }
    .generalledgermainTable .gl-otherDetails { width: 0% !important; display: none !important; }
    .generalledgermainTable .gl-Name         { width: 12% !important; }
    .generalledgermainTable .gl-memo         { width: 21% !important; }
    .generalledgermainTable .gl-OffAcc       { width: 18% !important; }
    .generalledgermainTable .gl-debit        { width: 9% !important; }
    .generalledgermainTable .gl-credit       { width: 9% !important; }
    .generalledgermainTable .gl-balance      { width: 9% !important; }
    .generalledgermainTable .gl-edit         { width: 4% !important; }
    .generalledgermainTable .gl-memo-full    { max-width: 130px !important; }
    .generalledgermainTable .gl-Name-full    { max-width: 95px !important; }
    /* Total = 100% (otherDetails hidden, space redistributed) */
}





/* ===== BASE ===== */
/* ===== BASE ===== */
/* ===== BASE ===== */
.registermainTable {
    table-layout: fixed !important;
    width: 100% !important;
}

/*
    Fixed columns (never change, pixel-locked via calc):
      rg-debit   = 9%
      rg-credit  = 9%
      rg-balance = 9%
      rg-action  = 40px fixed (not %)

    Variable columns share the remaining width.
    All % breakpoints below are computed as:
      100% minus debit(9) minus credit(9) minus balance(9) = 73% to share
      among rg-date + rg-type + rg-name [+ rg-loc-cat when on]

    WITH loc-cat:  date + type + name + loc-cat = 73%
    WITHOUT loc-cat: date + type + name = 73%

    rg-action uses a fixed pixel width set on the <th> in JSP (style="width:40px")
    The % columns share 100% of remaining width after action is subtracted by the browser.
    Because table-layout:fixed honours the first-row widths, we size rg-action on the <th>
    with px and let % columns fill the rest — but we still declare % for all to keep
    DataTables happy. We use calc() on rg-name to absorb the action column pixel.

    Simplest reliable approach: declare all 8 (or 7) columns in %, make them sum to 100%,
    and keep rg-action very small (3%). The browser will not expand it beyond its content
    when table-layout:fixed is set — the icon is ~20px wide so 3% (~43px at 1440px) is fine.
    The previous bug was the totals not summing to 100%, leaving free space the browser
    distributed proportionally — making every column slightly wider than declared.
*/

/* ── loc-cat text ── */
.rg-loc-cat .text-dark,
.rg-loc-cat .text-secondary {
    font-size: 0.78rem;
    line-height: 1.4;
}

/* ── Action column ── */
tr.ledger-row td.rg-action-cell {
    vertical-align: middle;
    text-align: center;
    overflow: visible;
    position: relative;
}

.row-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.row-action-btn:hover {
    background: #f0f0f0;
    color: #343a40;
}

.row-action-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1050;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 130px;
    padding: 4px 0;
}

.row-action-dropdown.show { display: block; }

.row-action-dropdown .dropdown-item-delete {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #dc3545;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.12s;
}

.row-action-dropdown .dropdown-item-delete:hover { background: #fff5f5; }

/* Delete confirm modal */
#deleteConfirmModal .modal-footer .btn { min-width: 80px; }

/* ═══════════════════════════════════════════════════════
   WITH loc-cat column  (locationAndClass = 1)  — 8 cols
   debit = credit = balance = 9%  |  action = 3%
   date + type + name + loc-cat share the remaining 70%
   All rows sum to exactly 100%
   ═══════════════════════════════════════════════════════ */

/* ≥ 1800px */
@media (min-width: 1800px) {
    .registermainTable .rg-date    { width: 6% !important; }
    .registermainTable .rg-type    { width: 10% !important; }
    .registermainTable .rg-name    { width: 45% !important; }
    .registermainTable .rg-loc-cat { width: 9% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 6+10+45+9+9+9+9+3 = 100 */
}

/* 1700–1799 */
@media (min-width: 1700px) and (max-width: 1799px) {
    .registermainTable .rg-date    { width: 6% !important; }
    .registermainTable .rg-type    { width: 11% !important; }
    .registermainTable .rg-name    { width: 44% !important; }
    .registermainTable .rg-loc-cat { width: 9% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 6+11+44+9+9+9+9+3 = 100 */
}

/* 1600–1699 */
@media (min-width: 1600px) and (max-width: 1699px) {
    .registermainTable .rg-date    { width: 7% !important; }
    .registermainTable .rg-type    { width: 11% !important; }
    .registermainTable .rg-name    { width: 43% !important; }
    .registermainTable .rg-loc-cat { width: 9% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 7+11+43+9+9+9+9+3 = 100 */
}

/* 1440–1599 */
@media (min-width: 1440px) and (max-width: 1599px) {
    .registermainTable .rg-date    { width: 7% !important; }
    .registermainTable .rg-type    { width: 12% !important; }
    .registermainTable .rg-name    { width: 42% !important; }
    .registermainTable .rg-loc-cat { width: 9% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 7+12+42+9+9+9+9+3 = 100 */
}

/* 1400–1439 */
@media (min-width: 1400px) and (max-width: 1439px) {
    .registermainTable .rg-date    { width: 7% !important; }
    .registermainTable .rg-type    { width: 13% !important; }
    .registermainTable .rg-name    { width: 41% !important; }
    .registermainTable .rg-loc-cat { width: 9% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 7+13+41+9+9+9+9+3 = 100 */
}

/* 1367–1399 */
@media (min-width: 1367px) and (max-width: 1399px) {
    .registermainTable .rg-date    { width: 8% !important; }
    .registermainTable .rg-type    { width: 13% !important; }
    .registermainTable .rg-name    { width: 40% !important; }
    .registermainTable .rg-loc-cat { width: 9% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 8+13+40+9+9+9+9+3 = 100 */
}

/* 1281–1366 */
@media (min-width: 1281px) and (max-width: 1366px) {
    .registermainTable .rg-date    { width: 8% !important; }
    .registermainTable .rg-type    { width: 14% !important; }
    .registermainTable .rg-name    { width: 39% !important; }
    .registermainTable .rg-loc-cat { width: 9% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 8+14+39+9+9+9+9+3 = 100 */
}

/* 1181–1280 */
@media (min-width: 1181px) and (max-width: 1280px) {
    .registermainTable .rg-date    { width: 8% !important; }
    .registermainTable .rg-type    { width: 14% !important; }
    .registermainTable .rg-name    { width: 38% !important; }
    .registermainTable .rg-loc-cat { width: 10% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 3% !important; }
    /* 8+14+38+10+9+9+9+3 = 100 */
}

/* 1024–1180 */
@media (min-width: 1024px) and (max-width: 1180px) {
    .registermainTable .rg-date    { width: 9% !important; }
    .registermainTable .rg-type    { width: 15% !important; }
    .registermainTable .rg-name    { width: 35% !important; }
    .registermainTable .rg-loc-cat { width: 10% !important; }
    .registermainTable .rg-debit   { width: 9% !important; }
    .registermainTable .rg-credit  { width: 9% !important; }
    .registermainTable .rg-balance { width: 9% !important; }
    .registermainTable .rg-action  { width: 4% !important; }
    /* 9+15+35+10+9+9+9+4 = 100 */
}

/* ═══════════════════════════════════════════════════════
   WITHOUT loc-cat column  (locationAndClass = 0) — 7 cols
   debit = credit = balance = 9%  |  action = 3%
   date + type + name share the remaining 70%
   All rows sum to exactly 100%
   ═══════════════════════════════════════════════════════ */

.no-loc-cat .registermainTable .rg-loc-cat { display: none !important; }

/* ≥ 1800px */
@media (min-width: 1800px) {
    .no-loc-cat .registermainTable .rg-date  { width: 6% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 10% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 54% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 6+10+54+9+9+9+3 = 100 */
}

/* 1700–1799 */
@media (min-width: 1700px) and (max-width: 1799px) {
    .no-loc-cat .registermainTable .rg-date  { width: 6% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 11% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 53% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 6+11+53+9+9+9+3 = 100 */
}

/* 1600–1699 */
@media (min-width: 1600px) and (max-width: 1699px) {
    .no-loc-cat .registermainTable .rg-date  { width: 7% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 11% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 52% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 7+11+52+9+9+9+3 = 100 */
}

/* 1440–1599  ← your reported problem resolution */
@media (min-width: 1440px) and (max-width: 1599px) {
    .no-loc-cat .registermainTable .rg-date  { width: 7% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 12% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 51% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 7+12+51+9+9+9+3 = 100 */
}

/* 1400–1439 */
@media (min-width: 1400px) and (max-width: 1439px) {
    .no-loc-cat .registermainTable .rg-date  { width: 7% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 13% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 50% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 7+13+50+9+9+9+3 = 100 */
}

/* 1367–1399 */
@media (min-width: 1367px) and (max-width: 1399px) {
    .no-loc-cat .registermainTable .rg-date  { width: 8% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 13% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 49% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 8+13+49+9+9+9+3 = 100 */
}

/* 1281–1366 */
@media (min-width: 1281px) and (max-width: 1366px) {
    .no-loc-cat .registermainTable .rg-date  { width: 8% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 14% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 48% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 8+14+48+9+9+9+3 = 100 */
}

/* 1181–1280 */
@media (min-width: 1181px) and (max-width: 1280px) {
    .no-loc-cat .registermainTable .rg-date  { width: 8% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 14% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 48% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 3% !important; }
    /* 8+14+48+9+9+9+3 = 100 */
}

/* 1024–1180 */
@media (min-width: 1024px) and (max-width: 1180px) {
    .no-loc-cat .registermainTable .rg-date  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-type  { width: 15% !important; }
    .no-loc-cat .registermainTable .rg-name  { width: 45% !important; }
    .no-loc-cat .registermainTable .rg-debit   { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-credit  { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-balance { width: 9% !important; }
    .no-loc-cat .registermainTable .rg-action  { width: 4% !important; }
    /* 9+15+45+9+9+9+4 = 100 */
}

/* ===== Below 1024px — horizontal scroll ===== */
@media (max-width: 1023px) {
    .table-responsive-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .registermainTable {
        table-layout: auto !important;
        min-width: 900px !important;
    }
}





.modal-dynamic-height .modal-content {
  min-height: 60vh !important;
}

@media (min-width: 768px) {
  .modal-dynamic-height .modal-content {
    min-height: 70vh !important;
  }
}

@media (min-width: 992px) {
  .modal-dynamic-height .modal-content {
    min-height: 80vh !important;
  }
}

@media (min-width: 1200px) {
  .modal-dynamic-height .modal-content {
    min-height: 85vh !important;
  }
}

@media (min-width: 1400px) {
  .modal-dynamic-height .modal-content {
    min-height: 90vh !important;
  }
}



.allTranmainTable {
    table-layout: fixed !important;
    width: 100% !important;
}

.allTranmainTable .allTran-Name span,
.allTranmainTable .allTran-memo span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Sort button styles */
.allTranmainTable th {
    white-space: nowrap;
}

.allTranmainTable .sort-btn {
    background: none;
    border: none;
    padding: 0 0 0 4px;
    cursor: pointer;
    color: inherit;
    opacity: 0.45;
    font-size: 13px;
    vertical-align: middle;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
}

.allTranmainTable .sort-btn:hover,
.allTranmainTable .sort-btn.asc,
.allTranmainTable .sort-btn.desc {
    opacity: 1;
}

.allTranmainTable .sort-btn.asc  i::before { content: "\ea78"; }
.allTranmainTable .sort-btn.desc i::before { content: "\ea75"; }


/* ===== ABOVE 1800px ===== */
/* Freed: view 10→7, viewDetails 8→6, edit 8→6 = +7% redistributed */
@media (min-width: 1800px) {
    .allTranmainTable .allTran-date         { width: 9% !important; }
    .allTranmainTable .allTran-tranType     { width: 9% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 16% !important; }
    .allTranmainTable .allTran-memo         { width: 21% !important; }
    .allTranmainTable .allTran-amt          { width: 15% !important; }
    .allTranmainTable .allTran-view         { width: 7% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 6% !important; }
    .allTranmainTable .allTran-edit         { width: 6% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 450px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 240px !important; }
}

/* ===== 1700px to 1799px ===== */
/* Freed: view 10→7, viewDetails 9→6, edit 9→7 = +8% redistributed */
@media (min-width: 1700px) and (max-width: 1799px) {
    .allTranmainTable .allTran-date         { width: 9% !important; }
    .allTranmainTable .allTran-tranType     { width: 9% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 16% !important; }
    .allTranmainTable .allTran-memo         { width: 21% !important; }
    .allTranmainTable .allTran-amt          { width: 14% !important; }
    .allTranmainTable .allTran-view         { width: 7% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 6% !important; }
    .allTranmainTable .allTran-edit         { width: 7% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 420px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 220px !important; }
}

/* ===== 1600px to 1699px ===== */
/* Freed: view 10→7, viewDetails 10→7, edit 10→7 = +9% redistributed */
@media (min-width: 1600px) and (max-width: 1699px) {
    .allTranmainTable .allTran-date         { width: 11% !important; }
    .allTranmainTable .allTran-tranType     { width: 11% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 14% !important; }
    .allTranmainTable .allTran-memo         { width: 18% !important; }
    .allTranmainTable .allTran-amt          { width: 14% !important; }
    .allTranmainTable .allTran-view         { width: 7% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 7% !important; }
    .allTranmainTable .allTran-edit         { width: 7% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 310px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 170px !important; }
}

/* ===== 1440px to 1599px ===== */
/* Freed: view 10→7, viewDetails 11→8, edit 11→8 = +9% redistributed */
@media (min-width: 1440px) and (max-width: 1599px) {
    .allTranmainTable .allTran-date         { width: 11% !important; }
    .allTranmainTable .allTran-tranType     { width: 11% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 14% !important; }
    .allTranmainTable .allTran-memo         { width: 17% !important; }
    .allTranmainTable .allTran-amt          { width: 13% !important; }
    .allTranmainTable .allTran-view         { width: 7% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 8% !important; }
    .allTranmainTable .allTran-edit         { width: 8% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 260px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 150px !important; }
}

/* ===== 1400px to 1439px ===== */
/* Freed: view 11→8, viewDetails 11→8, edit 11→8 = +9% redistributed */
@media (min-width: 1400px) and (max-width: 1439px) {
    .allTranmainTable .allTran-date         { width: 11% !important; }
    .allTranmainTable .allTran-tranType     { width: 11% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 15% !important; }
    .allTranmainTable .allTran-memo         { width: 17% !important; }
    .allTranmainTable .allTran-amt          { width: 11% !important; }
    .allTranmainTable .allTran-view         { width: 8% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 8% !important; }
    .allTranmainTable .allTran-edit         { width: 8% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 230px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 140px !important; }
}

/* ===== 1366px to 1399px ===== */
/* Freed: view 11→8, viewDetails 11→8, edit 12→9 = +9% redistributed */
@media (min-width: 1366px) and (max-width: 1399px) {
    .allTranmainTable .allTran-date         { width: 11% !important; }
    .allTranmainTable .allTran-tranType     { width: 11% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 15% !important; }
    .allTranmainTable .allTran-memo         { width: 16% !important; }
    .allTranmainTable .allTran-amt          { width: 11% !important; }
    .allTranmainTable .allTran-view         { width: 8% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 8% !important; }
    .allTranmainTable .allTran-edit         { width: 9% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 200px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 110px !important; }
}

/* ===== 1280px to 1365px ===== */
/* Freed: view 12→8, viewDetails 12→9, edit 12→9 = +10% redistributed */
@media (min-width: 1280px) and (max-width: 1365px) {
    .allTranmainTable .allTran-date         { width: 11% !important; }
    .allTranmainTable .allTran-tranType     { width: 11% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 14% !important; }
    .allTranmainTable .allTran-memo         { width: 16% !important; }
    .allTranmainTable .allTran-amt          { width: 11% !important; }
    .allTranmainTable .allTran-view         { width: 8% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 9% !important; }
    .allTranmainTable .allTran-edit         { width: 9% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 180px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 90px !important; }
}

/* ===== 1181px to 1279px ===== */
/* Freed: view 12→8, viewDetails 13→9, edit 13→9 = +12% redistributed */
@media (min-width: 1181px) and (max-width: 1279px) {
    .allTranmainTable .allTran-date         { width: 9% !important; }
    .allTranmainTable .allTran-tranType     { width: 10% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 14% !important; }
    .allTranmainTable .allTran-memo         { width: 16% !important; }
    .allTranmainTable .allTran-amt          { width: 14% !important; }
    .allTranmainTable .allTran-view         { width: 8% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 9% !important; }
    .allTranmainTable .allTran-edit         { width: 9% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 220px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 155px !important; }
}

/* ===== 1024px to 1180px ===== */
/* Freed: view 13→8, viewDetails 13→9, edit 14→9 = +14% redistributed */
@media (min-width: 1024px) and (max-width: 1180px) {
    .allTranmainTable .allTran-date         { width: 9% !important; }
    .allTranmainTable .allTran-tranType     { width: 10% !important; }
    .allTranmainTable .allTran-otherDetails { width: 11% !important; }
    .allTranmainTable .allTran-Name         { width: 14% !important; }
    .allTranmainTable .allTran-memo         { width: 16% !important; }
    .allTranmainTable .allTran-amt          { width: 14% !important; }
    .allTranmainTable .allTran-view         { width: 8% !important; }
    .allTranmainTable .allTran-viewDetails  { width: 9% !important; }
    .allTranmainTable .allTran-edit         { width: 9% !important; }
    .allTranmainTable .allTran-memo-full    { max-width: 220px !important; }
    .allTranmainTable .allTran-Name-full    { max-width: 135px !important; }
}



#linkSelect8coa {
    display: none !important;
}
@media (min-width: 1440px) {
    #linkSelect8coa {
        display: block !important;
    }
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

/* ===== BASE - applies to ALL resolutions ===== */
.reconProcessmainTable {
    table-layout: fixed !important;
    width: 100% !important;
}

/* Allow header text to wrap (table has text-nowrap globally) */
.reconProcessmainTable thead th {
    white-space: normal !important;
}

/* Truncate long text columns (Payee, Memo) */
.reconProcessmainTable .rp-payee-full,
.reconProcessmainTable .rp-memo-full {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* ===== ABOVE 1800px ===== */
@media (min-width: 1800px) {
    .reconProcessmainTable .rp-date    { width: 7% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 13% !important; }
    .reconProcessmainTable .rp-memo    { width: 20% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 13% !important; }
    .reconProcessmainTable .rp-select  { width: 11% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 260px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 190px !important; }
    /* Total = 101% */
}

/* ===== 1700px to 1799px ===== */
@media (min-width: 1700px) and (max-width: 1799px) {
    .reconProcessmainTable .rp-date    { width: 7% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 13% !important; }
    .reconProcessmainTable .rp-memo    { width: 19% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 13% !important; }
    .reconProcessmainTable .rp-select  { width: 12% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 250px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 180px !important; }
    /* Total = 101% */
}

/* ===== 1600px to 1699px ===== */
@media (min-width: 1600px) and (max-width: 1699px) {
    .reconProcessmainTable .rp-date    { width: 7% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 12% !important; }
    .reconProcessmainTable .rp-memo    { width: 19% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 14% !important; }
    .reconProcessmainTable .rp-select  { width: 12% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 230px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 170px !important; }
    /* Total = 101% */
}

/* ===== 1440px to 1599px ===== */
@media (min-width: 1440px) and (max-width: 1599px) {
    .reconProcessmainTable .rp-date    { width: 7% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 12% !important; }
    .reconProcessmainTable .rp-memo    { width: 18% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 14% !important; }
    .reconProcessmainTable .rp-select  { width: 13% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 210px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 155px !important; }
    /* Total = 101% */
}

/* ===== 1400px to 1439px ===== */
@media (min-width: 1400px) and (max-width: 1439px) {
    .reconProcessmainTable .rp-date    { width: 8% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 11% !important; }
    .reconProcessmainTable .rp-memo    { width: 18% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 14% !important; }
    .reconProcessmainTable .rp-select  { width: 13% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 190px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 140px !important; }
    /* Total = 101% */
}

/* ===== 1366px to 1399px ===== */
@media (min-width: 1366px) and (max-width: 1399px) {
    .reconProcessmainTable .rp-date    { width: 8% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 11% !important; }
    .reconProcessmainTable .rp-memo    { width: 17% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 14% !important; }
    .reconProcessmainTable .rp-select  { width: 14% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 180px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 130px !important; }
    /* Total = 101% */
}

/* ===== 1280px to 1365px ===== */
@media (min-width: 1280px) and (max-width: 1365px) {
    .reconProcessmainTable .rp-date    { width: 8% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 11% !important; }
    .reconProcessmainTable .rp-memo    { width: 16% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 14% !important; }
    .reconProcessmainTable .rp-select  { width: 15% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 160px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 120px !important; }
    /* Total = 101% */
}

/* ===== 1181px to 1279px ===== */
@media (min-width: 1181px) and (max-width: 1279px) {
    .reconProcessmainTable .rp-date    { width: 8% !important; }
    .reconProcessmainTable .rp-type    { width: 9% !important; }
    .reconProcessmainTable .rp-payee   { width: 10% !important; }
    .reconProcessmainTable .rp-memo    { width: 16% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 10% !important; }
    .reconProcessmainTable .rp-action  { width: 15% !important; }
    .reconProcessmainTable .rp-select  { width: 15% !important; }
    .reconProcessmainTable .rp-memo-full  { max-width: 145px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 105px !important; }
    /* Total = 101% */
}

/* ===== 1024px to 1180px - Type column hidden ===== */
@media (min-width: 1024px) and (max-width: 1180px) {
    .reconProcessmainTable .rp-date    { width: 9% !important; }
    .reconProcessmainTable .rp-type    { width: 0% !important; display: none !important; }
    .reconProcessmainTable .rp-payee   { width: 12% !important; }
    .reconProcessmainTable .rp-memo    { width: 19% !important; }
    .reconProcessmainTable .rp-deposit { width: 9% !important; }
    .reconProcessmainTable .rp-payment { width: 9% !important; }
    .reconProcessmainTable .rp-status  { width: 11% !important; }
    .reconProcessmainTable .rp-action  { width: 16% !important; }
    .reconProcessmainTable .rp-select  { width: 15% !important; }

    /* Hide the matching body cells too (Type is always the 2nd td) */
    .reconProcessmainTable tbody td:nth-child(2) {
        display: none !important;
    }

    .reconProcessmainTable .rp-memo-full  { max-width: 130px !important; }
    .reconProcessmainTable .rp-payee-full { max-width: 95px !important; }
    /* Total = 100% (Type hidden, space redistributed) */
}