/* 05-lists.css — Customers / employees pages, standard data grid, shortened text, compact filter bar.
   Loaded after the files with a smaller number (later rules win). */

/* ---------- Customers ---------- */
.th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.th-sort:hover { color: var(--blue); }
.cust-name { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); }
.cust-name b { display: block; font-weight: 600; line-height: 1.2; }
.cust-name small { display: block; color: var(--muted); font-size: .76rem; }
.cust-name:hover b { color: var(--blue); }
.cust-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex: none; }
.row-muted td:not(.st):not(.col-act) { opacity: .6; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state > i { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto .8rem; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 1.8rem; }
.empty-state h6 { font-weight: 800; color: var(--text); }
.cust-av.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.cust-preview { text-align: center; padding: 1.4rem 1rem; border-radius: 18px; color: #fff; background: var(--grad-ai); box-shadow: 0 16px 34px -18px rgba(123, 60, 255, .7); }
.cust-preview .cust-av { margin: 0 auto .6rem; background: rgba(255, 255, 255, .25); color: #fff; }
.cust-preview .pv-n { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cust-preview .pv-c { opacity: .8; font-size: .8rem; }
.cust-preview .tag { background: rgba(255, 255, 255, .22); color: #fff; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem 1.5rem; }
.pf-grid.one { grid-template-columns: 1fr; }
.pf-row { display: flex; gap: .7rem; align-items: flex-start; }
.pf-row > i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--blue); flex: none; }
.pf-row span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--subtle); }
.pf-row b, .pf-row a { font-weight: 600; overflow-wrap: anywhere; }
.pf-addr { line-height: 1.55; }
.seg label { margin: 0; cursor: pointer; color: var(--muted); font-size: .86rem; font-weight: 600; padding: .45rem 1rem; border-radius: 6px; white-space: nowrap; transition: background .15s, color .15s; }
.seg label:hover { color: var(--text); }
.seg label.on { background: #fff; color: var(--blue); box-shadow: var(--shadow); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 1px; }
.cust-table .tag, .cust-table .cust-name b, .cust-table td .small, .cust-table .status-pill { white-space: nowrap; }
.cust-table .cust-name small { white-space: nowrap; }
.cust-table th, .cust-table td { padding-left: .7rem; padding-right: .7rem; }
.cust-table th:first-child, .cust-table td:first-child { padding-left: 1.1rem; }

/* ---------- Employees ---------- */
.status-pill.muted { background: var(--hover); color: var(--muted); }
.status-pill.left { background: var(--red-soft); color: #a3122b; }
.team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .3rem; margin: 0 -.5rem; }
.team-list .cust-av { width: 32px; height: 32px; font-size: .72rem; }

/* ---------- Standard data grid (Customers, Suppliers, Employees) ---------- */
.rep-card .table-responsive:has(.data-grid) { border-top: 1px solid var(--border); }
.data-grid { font-size: .86rem; }
.data-grid thead th { background: #f3f5f8; color: #4b4f56; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .6rem .75rem; border-bottom: 1px solid var(--border-strong); border-right: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.data-grid td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); border-right: 1px solid #eef0f3; vertical-align: middle; }
.data-grid th:last-child, .data-grid td:last-child { border-right: 0; }
.data-grid th:first-child, .data-grid td:first-child { padding-left: .75rem; }
.data-grid tbody tr:nth-child(even):not(.row-total):not(.row-subtotal):not(.row-group) td { background: #fafbfc; }
.data-grid tbody tr:not(.row-total):not(.row-subtotal):hover td { background: #eef4ff; }
.data-grid .sl { width: 52px; text-align: center; color: var(--subtle); font-family: var(--mono); font-size: .78rem; }
.data-grid th.sl { color: #4b4f56; font-family: var(--font); font-size: .7rem; }
.data-grid .col-act { width: 1%; text-align: center; }
.data-grid .jn-actions { justify-content: center; }
.data-grid .cust-name b { font-weight: 600; }
.data-grid .th-sort { display: inline-flex; align-items: center; gap: .25rem; }
.data-grid .tag { font-size: .7rem; padding: .15rem .45rem; }
.data-grid .status-pill { font-size: .7rem; padding: .18rem .5rem; }
.grid-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 1rem; border-top: 1px solid var(--border); font-size: .84rem; color: var(--muted); }
.grid-foot b { color: var(--text); }
.grid-foot nav, .grid-foot .pagination { margin: 0; }
.grid-foot nav > div:first-child.d-sm-none, .grid-foot nav .d-sm-flex > div:first-child { display: none !important; }

.data-grid tr.picked td { background: var(--blue-soft) !important; }
.data-grid td.empty-row { border-right: 0; }
.data-grid .flow { flex-wrap: nowrap; white-space: nowrap; gap: .25rem; }
.data-grid .flow-led { max-width: 130px; padding: .1rem .45rem; font-size: .76rem; }
.data-grid td.col-details { min-width: 120px; }
.data-grid td.col-against { min-width: 160px; }
.data-grid .col-act { width: auto; white-space: nowrap; }
.data-grid .flow-led { max-width: 112px; }
.data-grid td, .data-grid thead th { padding-left: .6rem; padding-right: .6rem; }
.data-grid th.num, .data-grid td.num { min-width: 88px; }
.data-grid td.col-details { min-width: 96px; }
.data-grid .flow-led { max-width: 98px; }
.data-grid .tag { white-space: nowrap; }
.data-grid th.sl, .data-grid td.sl { padding-left: .35rem; padding-right: .35rem; width: 40px; }

/* Shortened text in tables (full text on hover, in print and in Excel) */
.cut { cursor: help; }
.rep-table tr.row-flash td { animation: rowFlash 2.6s ease-out; }

/* Row action buttons inside grids: flat, square-ish, no floating shadow */
.data-grid .jn-actions { gap: .25rem; }
.data-grid .ca { box-shadow: none; border-radius: 6px; width: 28px; height: 26px; padding: 0; justify-content: center; background: transparent; border-color: var(--border); }
.data-grid .ca:hover { background: var(--blue-soft); }
.data-grid .ca.danger:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.data-grid .ca.ca-post:hover { color: var(--green); border-color: var(--green); background: var(--green-soft); }
/* a disabled action (unbalanced journal, posted journal) does not light up on hover */
.data-grid .ca:disabled, .data-grid .ca:disabled:hover { opacity: .45; cursor: not-allowed; color: var(--muted); background: transparent; border-color: var(--border); }
.page-head .dropdown-menu { min-width: 250px; }
.dropdown-item-text { white-space: normal; }

/* ---------- Compact filter bar ---------- */
.filter-card { padding: .7rem .9rem .75rem; border-radius: 14px; background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%); }
.filter-card .type-tabs { gap: .3rem; padding-bottom: 0; margin-bottom: .6rem !important; }
.filter-card .type-tabs a, .filter-card .type-tabs span.on { padding: .2rem .62rem; font-size: .76rem; gap: .35rem; }
.filter-card .type-tabs a { background: #f1f3f6; }
.filter-card .type-tabs a:hover { background: #e6e9ee; }
.filter-card .type-tabs a em { font-size: .66rem; font-weight: 700; padding: 0 .35rem; border-radius: 999px; background: rgba(0, 0, 0, .06); opacity: 1; line-height: 1.5; }
.filter-card .type-tabs a.on em { background: rgba(255, 255, 255, .25); }
.filter-card .filter-label { font-size: .64rem; margin-bottom: .3rem; }
.filter-card .row { --bs-gutter-x: .6rem; --bs-gutter-y: .5rem; }
.filter-card .form-label, .filter-card .form-label.small { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); margin-bottom: .2rem; }
.filter-card .form-label a { text-transform: none; letter-spacing: 0; font-size: .7rem; }
.filter-card .form-control, .filter-card .form-select { min-height: 34px; padding: .3rem .7rem; font-size: .84rem; line-height: 1.4; border-radius: 9px; background-color: #f3f5f8; border: 1px solid transparent; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.filter-card .form-select { padding-right: 1.9rem; background-position: right .6rem center; background-size: 12px 10px; }
.filter-card .form-control::placeholder { color: #9aa0a8; }
.filter-card .form-control:hover, .filter-card .form-select:hover { border-color: var(--border-strong); }
.filter-card .form-control:focus, .filter-card .form-select:focus { background-color: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.filter-card .input-icon > .form-control { padding-left: 2.1rem; }
.filter-card .input-icon > i { left: .7rem; font-size: .85rem; }
.filter-card .dt-wrap > .form-control { padding-left: .7rem; padding-right: 2rem; }
.filter-card .dt-btn { width: 26px; height: 26px; right: .25rem; font-size: .85rem; }
.filter-card .btn { min-height: 34px; padding: .25rem .8rem; font-size: .84rem; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }
.filter-card .btn[title] { width: 34px; padding: 0; flex: none; }
.filter-card .input-icon { min-width: 0; }
.filter-card .input-icon > .form-control { min-width: 0; width: 100%; }
.filter-card .btn { flex: none; }
.filter-card .btn.btn-ghost { background: #f3f5f8; border-color: transparent; }
.filter-card .btn.btn-ghost:hover { background: #e6e9ee; }
.filter-card .btn i.me-1 { margin-right: .25rem !important; }
.filter-card .seg { padding: 2px; border-radius: 9px; background: #f1f3f6; }
.filter-card .seg a { padding: .22rem .65rem; font-size: .76rem; border-radius: 7px; }
.filter-card .seg label { padding: .22rem .65rem; font-size: .76rem; border-radius: 7px; }
.filter-card .seg a.on { box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
@media (max-width: 575.98px) { .filter-card { padding: .6rem .7rem; } }
.filter-card .type-tabs a.on, .filter-card .type-tabs a.on:hover { background: var(--blue); color: #fff; }

.input-group .ob-side { max-width: 80px; flex: 0 0 80px; }

/* Balance strip on a customer / supplier / employee profile */
.party-bal { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: .9rem 1.2rem; }
.party-bal .pb-item { display: flex; flex-direction: column; }
.party-bal .pb-k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--subtle); }
.party-bal .pb-v { font-family: var(--mono); font-size: 1.35rem; letter-spacing: -0.01em; }
.party-bal .pb-v.small-v { font-size: 1rem; margin-top: .25rem; }
.party-bal .pb-s { font-size: .78rem; color: var(--muted); }
.party-bal .pb-s.warn { color: #a86f00; font-weight: 600; }
.party-bal .pb-s.ok { color: #13804f; font-weight: 600; }
.party-bal .pb-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
