/* ==========================================================================
   10-reports: accounting reports (Reports menu) and Settings → Reports.
   Page: resources/views/reports/report.blade.php
   ========================================================================== */

/* Section heading line: "Income", "Assets", "Receipts" … */
.fin-table tr.row-section td { padding-top: 1.1rem; background: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); border-bottom: 2px solid var(--blue-soft); }
.fin-table tr.row-section:hover td { background: #fff; }

/* Group line (a folder of the chart of accounts) */
.fin-table tr.row-group td { font-weight: 700; background: #fbfcfe; }
.fin-table tr.row-group .acc a { font-weight: 700; }

/* Opening / closing balance lines of Receipts and Payments */
.fin-table tr.row-sub td { font-style: italic; color: var(--muted); }

/* "Total income", "Gross profit" … */
.fin-table tr.row-subtotal td { font-weight: 700; background: #f6f8fb; border-top: 1px solid var(--border); }
.fin-table tr.row-subtotal td.num { font-family: var(--mono); }

/* Clickable lines */
.fin-table tr.rep-link { cursor: pointer; }
.fin-table .acc a:hover { color: var(--blue); text-decoration: underline; }
.fin-table .acc .cr-code { margin-left: .15rem; }

.fin-table td.empty-row { text-align: center; padding: 2.25rem 1rem; color: var(--muted); }
.fin-table td.empty-row i { display: block; font-size: 1.6rem; margin-bottom: .35rem; }

/* Settings → Reports: the account pick lists */
.pick-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: .35rem; background: #fff; }
.pick-list label { display: flex; align-items: center; gap: .55rem; padding: .38rem .55rem; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.pick-list label:hover { background: var(--hover); }
.pick-list label.is-group { font-weight: 700; }
.pick-list .form-check-input { margin: 0; flex-shrink: 0; }
.pick-list .cr-code { margin-left: auto; }
.pick-tools { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.pick-tools input { max-width: 260px; }
.fin-table td.num.blank::after { content: none; }
/* heading inside a module menu (Accounting → Reports) */
.sp-list .sp-section { margin: .9rem .55rem .3rem; }

/* ---- Summary cards: change against the period compared with ---- */
.kpi-chg { display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .4rem; border-radius: 99px; font-weight: 700; background: var(--hover); color: var(--muted); }
.kpi-chg.up { background: var(--green-soft); color: #13804f; }
.kpi-chg.down { background: var(--red-soft); color: #b42318; }
.rep-kpi.main .kpi-chg { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---- Table tools: find box, level buttons, comparison note ---- */
.rep-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.rep-find { width: 240px; max-width: 100%; }
.rep-cmp { font-size: .8rem; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: .25rem .65rem; border-radius: 99px; }

/* open / close arrow on a group line */
.rep-caret { border: 0; background: transparent; width: 22px; height: 22px; margin-left: -4px; border-radius: 6px; color: var(--muted); display: inline-grid; place-items: center; transition: transform .15s; }
.rep-caret:hover { background: var(--hover); color: var(--text); }
tr.closed .rep-caret { transform: rotate(-90deg); }
.fin-table tr.rep-hidden, .fin-table tr.rep-nomatch { display: none; }
.fin-table tr.rep-match td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.fin-table tr.rep-match td { background: #f5f9ff; }

/* ---- Comparison columns ---- */
.fin-table td.chg { font-size: .8rem; }
.fin-table td.chg.pos { color: #13804f; }
.fin-table td.chg.neg { color: #b42318; }

/* ---- "% of income" column with a small bar ---- */
.fin-table th.share-col, .fin-table td.share-col { min-width: 120px; }
.fin-table td.share-col::after { content: none !important; }
.share { display: inline-flex; align-items: center; gap: .45rem; font-size: .76rem; color: var(--muted); }
.share-bar { width: 56px; height: 6px; border-radius: 3px; background: #edf0f4; overflow: hidden; }
.share-bar i { display: block; height: 100%; border-radius: 3px; background: #2a78d6; }

/* ---- Composition charts (one bar split into parts) ---- */
.comp-card { padding: 1rem 1.15rem; }
.comp-bar { display: flex; gap: 2px; height: 18px; }
.comp-seg { min-width: 3px; height: 100%; cursor: default; outline: none; transition: filter .15s; }
.comp-seg:first-child { border-radius: 4px 0 0 4px; }
.comp-seg:last-child { border-radius: 0 4px 4px 0; }
.comp-seg:only-child { border-radius: 4px; }
.comp-seg:hover, .comp-seg:focus-visible { filter: brightness(1.12); box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(24, 119, 242, .35); }
.comp-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .7rem; font-size: .82rem; color: var(--text); }
.comp-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.comp-legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.comp-legend small { color: var(--muted); }
.comp-tip { position: absolute; z-index: 2000; transform: translate(-50%, -100%); padding: .35rem .6rem; border-radius: 8px; background: #1c1e21; color: #fff; font-size: .78rem; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.comp-tip.on { opacity: 1; }

/* ---- Sticky column names while scrolling a long report (wide screens) ---- */
/* (the page script adds .can-stick only when the table fits the width, so wide tables keep their sideways scroll) */
#reportArea.can-stick, #reportArea.can-stick .table-responsive { overflow: visible; }
#reportArea.can-stick .fin-table thead th { position: sticky; top: 64px; z-index: 5; background: #fafbfc; box-shadow: 0 1px 0 var(--border); }

/* ---- About this report ---- */
.rep-help { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1.1rem; border-left: 3px solid var(--amber); }
.rep-help .rh-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--amber-soft); color: #9a6a00; flex-shrink: 0; }
.rep-help .rh-body { flex: 1; font-size: .87rem; }
.rep-help dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .4rem 1.25rem; margin: 0; }
.rep-help dt { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); }
.rep-help dd { margin: 0; color: var(--text); }
.rep-help .rh-close { border: 0; background: transparent; color: var(--muted); border-radius: 8px; width: 28px; height: 28px; }
.rep-help .rh-close:hover { background: var(--hover); color: var(--text); }

/* ---- Saved views menu ---- */
.views-menu { width: 300px; padding-top: .4rem; }
.views-item { display: flex; align-items: center; padding: 0 .4rem 0 0; }
.views-item a { flex: 1; padding: .45rem 1rem; color: var(--text); text-decoration: none; font-size: .88rem; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.views-item a:hover { background: var(--hover); }
.views-del { border: 0; background: transparent; color: var(--subtle); width: 26px; height: 26px; border-radius: 6px; font-size: .75rem; }
.views-del:hover { background: var(--red-soft); color: var(--red); }
.views-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--violet-soft); color: #7b3cff; font-size: .68rem; font-weight: 800; margin-left: .2rem; }

/* ---- Amount display and keyboard hint ---- */
.rep-amounts { width: auto; min-width: 104px; }
.rep-keys { font-size: .74rem; color: var(--subtle); white-space: nowrap; }
.rep-keys kbd { font-size: .68rem; padding: .05rem .35rem; border-radius: 4px; background: var(--hover); color: var(--muted); border: 1px solid var(--border); }
.set-heading { margin-top: .5rem; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---- Financial Ratios ---- */
.ratio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.ratio-card { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; }
.rc-name { font-weight: 700; }
.rc-value { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.rc-meaning { font-size: .84rem; color: var(--text); }
.rc-formula { margin-top: auto; padding-top: .4rem; font-size: .76rem; color: var(--subtle); }
.rc-status { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.rc-status.s-good { background: var(--green-soft); color: #13804f; }
.rc-status.s-fair { background: var(--amber-soft); color: #8a5a00; }
.rc-status.s-weak { background: var(--red-soft); color: #b42318; }

/* ---- Day Book ---- */
.db-day { margin-bottom: 1.4rem; }
.db-date { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.db-cal { display: grid; place-items: center; width: 46px; height: 50px; border-radius: 12px; background: #fff; border: 1px solid var(--border); font-size: .66rem; font-weight: 700; text-transform: uppercase; color: var(--red); line-height: 1.1; }
.db-cal b { font-size: 1.15rem; color: var(--text); }
.db-entry { margin: 0 0 .6rem 58px; overflow: hidden; }
.db-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid var(--border); background: #fafbfc; }
.db-narr { font-size: .85rem; color: var(--muted); }
.db-amt { font-family: var(--mono); font-weight: 700; }
.db-lines td { padding: .45rem 1rem; }
.db-lines td.db-cr { padding-left: 2.4rem; }   /* credits indented, as written in a journal */
.db-lines a { color: var(--text); text-decoration: none; }
.db-lines a:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 575px) { .db-entry { margin-left: 0; } }

/* ==========================================================================
   Compact report top: one header line, one filter row, one strip of figures
   ========================================================================== */
.rp-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; margin-bottom: .6rem; }
.rp-head h1 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.rp-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .95rem; flex-shrink: 0; }
.rp-when { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.rp-when i { font-size: .75rem; margin-right: .15rem; }
.rp-actions { margin-left: auto; display: flex; align-items: center; gap: .3rem; }
.rp-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: .95rem; text-decoration: none; transition: background .12s, color .12s; }
.rp-btn:hover, .rp-btn[aria-expanded="true"] { background: var(--blue-soft); color: var(--blue); border-color: #cfe2fd; }
.rp-btn .views-count { position: absolute; top: -6px; right: -6px; margin: 0; }

.rp-help { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .35rem 1.2rem; margin-bottom: .6rem; padding: .6rem .85rem; border-radius: 10px; background: var(--amber-soft); font-size: .82rem; }
.rp-help b { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #8a5a00; }

.rp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; padding: .45rem .75rem; margin-bottom: .6rem; border-radius: 12px; }
.rp-field { display: flex; align-items: center; gap: .35rem; }
.rp-field label { margin: 0; font-size: .72rem; font-weight: 700; color: var(--subtle); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.rp-field .form-control, .rp-field .form-select { width: auto; min-width: 0; height: 30px; padding-top: .15rem; padding-bottom: .15rem; font-size: .84rem; }
.rp-field input[type="date"] { width: 138px; }
.rp-check { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 0 auto; font-size: .82rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.rp-check .form-check-input { margin: 0; }

.rp-kpis { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.rp-kpi { display: inline-flex; align-items: baseline; gap: .45rem; padding: .3rem .7rem; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-size: .8rem; }
.rp-kpi .k { color: var(--muted); }
.rp-kpi b { font-family: var(--mono); font-size: .88rem; }
.rp-kpi b .side { font-family: var(--font); font-size: .64rem; margin-left: .2rem; color: var(--subtle); }
.rp-kpi.main { background: var(--blue-soft); border-color: #cfe2fd; }
.rp-kpi.main b { color: #0c5ec4; }
.rp-kpi .kpi-chg { font-size: .7rem; padding: 0 .35rem; }
.rp-alert { padding: .45rem .75rem; margin-bottom: .6rem; font-size: .85rem; }

/* slimmer table tools row */
.rep-tools { padding: .5rem .75rem; gap: .5rem; }
.rep-tools .form-control-sm, .rep-tools .form-select-sm { height: 30px; padding-top: .15rem; padding-bottom: .15rem; font-size: .84rem; line-height: 1.4; }
.rp-field .form-control, .rp-field .form-select { line-height: 1.4; }

/* denser report rows: more lines on screen */
.fin-table td { padding-top: .48rem; padding-bottom: .48rem; }
.fin-table tr.row-section td { padding-top: .8rem; }
.fin-table .acc .cr-ic { width: 22px; height: 22px; font-size: .78rem; }

/* Financial year chip in the top bar */
.fy-chip { display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .75rem; border-radius: 99px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.fy-chip:hover { border-color: #cfe2fd; background: var(--blue-soft); color: var(--blue); }
.fy-chip .bi-calendar3 { color: var(--blue); }
.fy-chip.past { background: var(--amber-soft); border-color: #f3dca0; color: #8a5a00; }   /* an earlier year is picked */
.fy-chip.past .bi-calendar3 { color: #c48a00; }
.fy-menu { min-width: 280px; }
.fy-menu form { margin: 0; }
.fy-menu .dropdown-item.active small { color: rgba(255,255,255,.8); }
.fy-now { background: var(--green-soft); color: #13804f; font-size: .66rem; }

/* Sidebar sections that fold (layouts/app + public/js/sidebar.js) */
.sp-sec-btn { width: auto; min-width: 0; border: 0; background: none; padding: .3rem .4rem; margin-left: .55rem; margin-right: .55rem; border-radius: 8px; cursor: pointer; text-align: left; }
.sp-sec-btn:hover { background: var(--blue-soft); color: var(--blue); }
.sp-sec-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.sp-sec-btn .sp-sec-chev { margin-left: auto; font-size: .7rem; color: var(--subtle); transition: transform .15s; }
.sp-sec-btn.shut .sp-sec-chev { transform: rotate(-90deg); }
.sp-sec-btn .sp-sec-count { display: none; font-size: .62rem; letter-spacing: 0; }
.sp-sec-btn.shut .sp-sec-count { display: inline-block; }   /* when folded: how many are waiting, so nothing is missed */
/* keep long page names inside the panel: the list column may not grow past it, and a section's pages are a grid too */
.sp-list { grid-template-columns: minmax(0, 1fr); }
.sp-sec-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; }
.sp-sec-body[hidden] { display: none; }

/* ===== Page panel sections, refreshed (layouts/app: .sp-sec > .sp-sec-btn + .sp-sec-body) =====
   Each section (Receive, Payments, Fund Transfer, Balance Transfer, Reports) is a card:
   folded → one row with a coloured icon; open → a soft card, its pages hanging off a guide line.
   --sc / --sc-soft: the section's colour (set inline from App\Models\Voucher::GROUPS). */
.sp-sec { margin: .35rem 0 0; border-radius: 12px; transition: background .15s, box-shadow .15s; }
.sp-sec + .sp-sec { margin-top: .2rem; }
.sp-row + .sp-sec, .sp-sec:first-child { margin-top: .7rem; }
.sp-sec.open { background: #f7f8fa; box-shadow: inset 0 0 0 1px #eceef2; padding-bottom: .3rem; }

.sp-list .sp-sec-btn { display: flex; align-items: center; gap: .55rem; width: 100%; margin: 0; padding: .4rem .5rem; border: 0; border-radius: 10px; background: transparent;
    font-size: .84rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: #3a3f47; text-align: left; cursor: pointer; }
.sp-list .sp-sec-btn:hover { background: #f1f3f6; color: var(--text); }
.sp-sec.open > .sp-sec-btn:hover { background: #eef0f4; }
.sp-list .sp-sec-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.sp-sec-ic { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--sc-soft, var(--blue-soft)); color: var(--sc, var(--blue)); font-size: .8rem; }
.sp-sec-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-sec-n { font-size: .68rem; font-weight: 600; color: var(--subtle); min-width: 1.1rem; text-align: right; }
.sp-list .sp-sec-btn .sp-sec-chev { margin-left: 0; font-size: .68rem; color: var(--subtle); transition: transform .15s; }
.sp-list .sp-sec-btn.shut .sp-sec-chev { transform: rotate(-90deg); }
.sp-sec-btn .sp-sec-count { font-size: .62rem; }
.sp-sec.open .sp-sec-count { display: none; }                 /* open: each page shows its own count */
.sp-sec:not(.open) .sp-sec-n { display: none; }               /* folded: the waiting badge says enough */
.sp-sec.open .sp-sec-n { display: inline; }

/* the pages of an open section: indented under a guide line in the section colour */
.sp-sec .sp-sec-body { position: relative; margin: .1rem .35rem 0 1.05rem; padding-left: .55rem; gap: 1px; }
.sp-sec .sp-sec-body::before { content: ""; position: absolute; left: 0; top: .2rem; bottom: .2rem; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--sc, #1877f2) 22%, transparent); }
.sp-sec .sp-item { padding-top: .32rem; padding-bottom: .32rem; font-size: .83rem; }
.sp-sec .sp-item .spi, .sp-sec .sp-item .spi.plain { width: 18px; height: 18px; font-size: .88rem; }
.sp-sec .sp-item.active { background: #fff; box-shadow: 0 1px 0 rgba(15, 23, 42, .04), 0 0 0 1px #e4e7ec; }
.sp-sec .sp-item.active::before { content: ""; position: absolute; left: calc(-.55rem - 1px); top: 22%; bottom: 22%; width: 4px; border-radius: 3px; background: var(--sc, var(--blue)); }
.sp-sec .sp-item.active .spi, .sp-sec .sp-item.active .spi.plain { color: var(--sc, var(--blue)); }

/* fold-all button beside the search */
.sp-tools .sp-fold-all { display: grid; }

/* ===== Module rail (1st sidebar), refreshed: icon + name, a calm look, the current module stands out =====
   layouts/app: .rail > .rail-brand, .rail-list > .rail-item (.rail-bar, .ri, .rl, .rail-badge), .rail-bottom.
   --g: the module colour. The "stacked" layout (rail on top) keeps icons only. */
.rail { width: 74px; padding: .8rem 0 .7rem; }
.rail-list { width: 60px; margin-top: .75rem; padding-top: .75rem; gap: .2rem; border-top: 1px solid var(--border); }
.rail-bottom { width: 60px; gap: .2rem; padding-top: .5rem; border-top: 1px solid var(--border); }

.rail .rail-item { width: 60px; height: auto; min-height: 56px; padding: .4rem 0 .35rem; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: .22rem; text-decoration: none; color: var(--muted); transition: background .15s, color .15s; }
.rail .rail-item .ri { width: 34px; height: 34px; border-radius: 10px; font-size: 1.02rem; box-shadow: none; transform: none;
    background: #f2f4f7 !important; color: color-mix(in srgb, var(--g, #1877f2) 75%, #3a3f47); transition: background .15s, color .15s; }
.rail .rail-item .rl { max-width: 58px; font-size: .62rem; font-weight: 600; line-height: 1.1; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .rail-item:hover { background: #f6f7f9; color: var(--text); }
.rail .rail-item:hover .ri { background: color-mix(in srgb, var(--g, #1877f2) 13%, #fff) !important; color: var(--g, #1877f2); transform: none; }

/* the current module */
.rail .rail-item.active { background: color-mix(in srgb, var(--g, #1877f2) 9%, #fff); color: var(--g, #1877f2); box-shadow: none; }
.rail .rail-item.active .ri { background: var(--g, #1877f2) !important; color: #fff; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--g, #1877f2) 70%, transparent); }
.rail .rail-item.active .rl { font-weight: 700; }
.rail .rail-bar { left: -7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--g, #1877f2); }
.rail .rail-item.active .rail-bar { height: 26px; }

/* plain items (Show menu) */
.rail .rail-item .ri.plain { background: transparent !important; color: var(--muted); }
.rail .rail-item:hover .ri.plain { background: #eef0f4 !important; color: var(--text); }

/* waiting badge: on the icon's corner */
.rail .rail-badge { top: 2px; right: 6px; animation: none; }

/* hover hint: only the shortcut, the name is already shown */
.rail .rail-item::after { content: attr(data-key); font-size: .7rem; padding: .3rem .55rem; border-radius: 8px; }

/* stacked layout (rail across the top): icons only */
html[data-side="stacked"] .shell:not(.side-collapsed) .rail .rail-item { width: 40px; min-height: 0; padding: 3px; }
html[data-side="stacked"] .shell:not(.side-collapsed) .rail .rl { display: none; }
html[data-side="stacked"] .shell:not(.side-collapsed) .rail-list, html[data-side="stacked"] .shell:not(.side-collapsed) .rail-bottom { width: auto; border-top: 0; padding-top: 0; }
@media (max-width: 991.98px) { .rail .rail-item::after { display: none; } }
/* "Show menu" only when the page panel is hidden */
.rail .rail-item.rail-expand { display: none; }
.shell.side-collapsed .rail .rail-item.rail-expand { display: flex; }

/* ===== Top bar, refreshed (layouts/app: .topbar) =====
   search pill · (test data) · + New · FY chip · | · user chip */
.topbar { gap: .75rem; padding: .55rem 1.25rem; min-height: 60px; }
.tb-search { display: flex; align-items: center; gap: .6rem; flex: 1; max-width: 440px; height: 38px; padding: 0 .5rem 0 .85rem; border: 1px solid var(--border); border-radius: 10px; background: #f6f7f9; color: var(--muted); font-size: .86rem; text-align: left; transition: border-color .15s, background .15s, box-shadow .15s; }
.tb-search:hover { background: #fff; border-color: var(--border-strong); box-shadow: 0 4px 14px -10px rgba(15, 23, 42, .4); color: var(--text); }
.tb-search:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.tb-search .tb-search-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-search .kbd { font-family: var(--mono); font-size: .66rem; font-weight: 600; color: var(--muted); background: #fff; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: .05rem .4rem; }
@media (max-width: 767.98px) { .tb-search { flex: 0 0 38px; padding: 0; justify-content: center; } .tb-search .tb-search-t, .tb-search .kbd { display: none; } }

/* small chips: test data */
.tb-chip { display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .7rem; border-radius: 99px; border: 1px dashed var(--border-strong); background: #fff; color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.tb-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

/* + New */
.tb-new { display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .9rem 0 .75rem; border: 0; border-radius: 99px; background: var(--blue); color: #fff; font-size: .84rem; font-weight: 700; box-shadow: 0 6px 14px -8px rgba(24, 119, 242, .8); }
.tb-new:hover { background: #1466d8; }
.tb-new[aria-expanded="true"] .bi-plus-lg { transform: rotate(45deg); }
.tb-new .bi-plus-lg { transition: transform .15s; }

/* menus */
.tb-menu { min-width: 240px; padding: .4rem; border-radius: 12px; border-color: var(--border); }
.tb-menu .dropdown-item { display: flex; align-items: center; gap: .55rem; border-radius: 8px; padding: .42rem .65rem; font-size: .86rem; }
.tb-menu .dropdown-item > .bi { width: 1.1rem; text-align: center; }
.tb-menu-h { padding: .35rem .65rem .2rem; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.tb-menu .dm-user { display: flex; align-items: center; gap: .6rem; padding: .4rem .55rem; }

/* divider and user chip */
.tb-sep { width: 1px; height: 24px; background: var(--border); margin: 0 .15rem; }
.tb-user { display: flex; align-items: center; gap: .5rem; height: 40px; padding: 0 .55rem 0 .25rem; border: 0; border-radius: 99px; background: transparent; }
.tb-user:hover, .tb-user[aria-expanded="true"] { background: #f1f3f6; }
.tb-user .avatar { width: 32px; height: 32px; font-size: .85rem; }
.tb-user-n { font-size: .86rem; font-weight: 600; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-search { position: relative; }
.tb-search .kbd { position: static; transform: none; inset: auto; margin-left: auto; flex: none; }

/* ===== Accounting Dashboard (home.blade.php) ===== */
.db-empty { display: flex; align-items: center; gap: 1rem; }
.db-empty > .bi { font-size: 1.6rem; color: var(--blue); }
.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 1199.98px) { .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .db-kpis { grid-template-columns: minmax(0, 1fr); } }
.db-kpi { position: relative; padding: .95rem 1rem .5rem; border-radius: 14px; background: #fff; border: 1px solid var(--border); overflow: hidden; }
.db-kpi-top { display: flex; align-items: center; gap: .5rem; }
.db-kpi-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--cs); color: var(--c); font-size: .95rem; }
.db-kpi-l { font-size: .82rem; font-weight: 600; color: var(--muted); }
.db-chg { margin-left: auto; display: inline-flex; align-items: center; gap: .15rem; font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 99px; }
.db-chg.good { background: var(--green-soft); color: #1d6b10; }
.db-chg.bad { background: var(--red-soft); color: #a3122b; }
.db-kpi-v { margin-top: .55rem; font-size: 1.45rem; font-weight: 700; color: var(--text); line-height: 1.15; }
.db-kpi-v.neg, .db-big.neg { color: #a3122b; }
.db-kpi-s { font-size: .74rem; color: var(--muted); margin-top: .1rem; }
.db-spark { height: 38px; margin: .4rem -.2rem 0; }

.db-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.db-action { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .85rem .4rem .45rem; border-radius: 99px; background: #fff; border: 1px solid var(--border); color: var(--text); font-size: .84rem; font-weight: 600; text-decoration: none; transition: border-color .15s, background .15s; }
.db-action span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--cs); color: var(--c); }
.db-action:hover { border-color: var(--c); background: var(--cs); color: var(--text); }

.dh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.db-big { font-size: 1.2rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.db-legend { display: flex; gap: .9rem; font-size: .78rem; color: var(--muted); }
.db-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.db-chart { height: 260px; }
.db-chart.sm { height: 200px; }
.db-table { margin-top: .6rem; font-size: .82rem; }
.db-table summary { cursor: pointer; color: var(--muted); font-size: .78rem; }

.db-party { display: flex; align-items: center; gap: .55rem; padding: .4rem .2rem; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .86rem; }
.db-party .bi { color: var(--c); }
.db-party .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-party:hover .n { color: var(--blue); }

.db-bar { display: grid; grid-template-columns: minmax(0, 9rem) 1fr auto; align-items: center; gap: .75rem; padding: .35rem 0; color: var(--text); text-decoration: none; font-size: .84rem; }
.db-bar .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-bar .track { height: 10px; border-radius: 99px; background: #f1f3f6; overflow: hidden; }
.db-bar .track i { display: block; height: 100%; border-radius: 99px; background: #e8710a; }
.db-bar:hover .n { color: var(--blue); }
.db-bar:hover .track i { background: #c75d00; }
.db-bar .v { min-width: 6.5rem; text-align: right; }
.db-bar.other { color: var(--muted); }
.db-bar.other .track { background: transparent; }

.db-wait { display: flex; align-items: center; gap: .6rem; padding: .5rem .3rem; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .86rem; }
.db-wait .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--cs); color: var(--c); }
.db-wait .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-wait .v { min-width: 6rem; text-align: right; color: var(--muted); }
.db-wait:hover .n { color: var(--blue); }
.db-allclear { padding: 1rem 0; color: #1d6b10; font-weight: 600; font-size: .9rem; }

.dh-entry { display: grid; grid-template-columns: 3.4rem auto minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .5rem .2rem; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .85rem; }
.dh-entry .d { color: var(--muted); font-size: .78rem; }
.dh-entry .n { min-width: 0; }
.dh-entry .n b, .dh-entry .n small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-entry .n b { font-weight: 600; }
.dh-entry .n small { color: var(--muted); font-size: .74rem; }
a.dh-entry:hover b { color: var(--blue); }
@media (max-width: 575.98px) { .dh-entry { grid-template-columns: auto minmax(0, 1fr) auto; } .dh-entry .d { display: none; } }
/* dashboard cards: the same look as the sidebar (white, light border, 14px corners, coloured icon tiles) */
.db-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; }
.db-title { display: flex; align-items: center; gap: .55rem; font-size: .95rem; }
.db-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--cs); color: var(--c); font-size: .9rem; }
.dh-head .text-muted.small { margin-left: calc(28px + .55rem); }
.db-books { display: inline-flex; align-items: center; gap: .3rem; margin-left: .6rem; padding: .1rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 600; text-decoration: none; }
.db-books.ok { background: var(--green-soft); color: #1d6b10; }
.db-books.bad { background: var(--red-soft); color: #a3122b; }
.db-kpi { border-radius: 14px; }
.db-empty { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; }
a.tb-btn, a.tb-btn:hover, a.tb-btn .lbl { text-decoration: none; }   /* toolbar buttons that are links: no underline */

/* ===== Bank Reconciliation (reports/bank-reconciliation) ===== */
.br-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.br-field { display: flex; flex-direction: column; gap: .25rem; min-width: 170px; }
.br-field.grow { flex: 1; min-width: 240px; }
.br-field label { font-size: .74rem; font-weight: 600; color: var(--muted); }
.br-lines { margin-top: .25rem; }
.br-line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .5rem .2rem; border-top: 1px solid var(--border); font-size: .9rem; }
.br-line small { color: var(--muted); font-size: .74rem; margin-left: .3rem; }
.br-line b { font-weight: 600; }
.br-line.minus b { color: #a3122b; }
.br-line.plus b { color: #1d6b10; }
.br-line.sub { font-weight: 600; background: #fafbfc; }
.br-line.total { font-weight: 700; font-size: 1rem; border-top: 2px solid var(--border-strong); }
.br-line.total.ok { background: var(--green-soft); color: #1d6b10; }
.br-line.total.bad { background: var(--red-soft); color: #a3122b; }
.br-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 99px; font-size: .78rem; font-weight: 700; }
.br-badge.ok { background: var(--green-soft); color: #1d6b10; }
.br-badge.bad { background: var(--red-soft); color: #a3122b; }
.br-badge.wait { background: var(--amber-soft); color: #8a5a00; }
.br-help { margin-top: .75rem; font-size: .8rem; color: var(--muted); }
.br-hist { display: flex; align-items: center; gap: .6rem; padding: .45rem .3rem; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .86rem; }
.br-hist .d { flex: 1; }
.br-hist:hover, .br-hist.on { background: #f6f7f9; }
.br-hist.on { font-weight: 600; }
.br-table tr.picked td { background: #f3fbf1 !important; }
.br-note { max-width: 260px; }
@media (max-width: 767.98px) { .br-note { display: none; } }
.br-hist { padding: 0 0 0 .3rem; gap: .3rem; }
.br-hist-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; padding: .45rem 0; color: var(--text); text-decoration: none; }
.br-hist-go .d { flex: 1; }
.br-hist-del { border: 0; background: transparent; color: var(--subtle); width: 28px; height: 28px; border-radius: 7px; }
.br-hist-del:hover { background: var(--red-soft); color: var(--red); }
