/* Expenses > Classification */
.ex-bar { padding: 12px 16px; }
.ex-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
.ex-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.ex-filters select, .ex-filters input { font: inherit; font-size: 13px; color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: #fff; min-width: 130px; }
.ex-filters #exAccount { min-width: 230px; }
.ex-filters .ex-btn:first-of-type { margin-left: auto; }
.ex-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ex-ms { position: relative; }
.ex-ms-btn { font: inherit; font-size: 13px; color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 6px 28px 6px 8px; background: #fff; min-width: 250px; text-align: left; cursor: pointer; position: relative; }
.ex-ms-btn::after { content: ""; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); }
.ex-ms-panel { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 8px; }
.ex-ms-panel input[type=search] { width: 100%; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; margin-bottom: 6px; min-width: 0; }
.ex-ms-item { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; padding: 5px 6px; border-radius: 6px; font-size: 13px !important; color: var(--text) !important; cursor: pointer; }
.ex-ms-item:hover { background: #f1f4f9; }
.ex-ms-item input { min-width: 0 !important; width: auto !important; padding: 0 !important; }
.ex-ms-item small { color: var(--muted); margin-left: auto; }
.ex-ms-item.all { border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px; }
.ex-ms-list { max-height: 260px; overflow: auto; }
.ex-table .ex-acc { display: none; font-size: 12px; color: var(--muted); }
.ex-table.ex-multi .ex-acc { display: table-cell; }
.ex-sub-note { color: var(--muted); font-size: 12px; margin-top: 8px; min-height: 14px; }

.ex-btn { background: var(--navy); color: #fff; border: 1px solid var(--navy); border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; }
.ex-btn:hover { background: #18406a; }
.ex-btn:disabled { opacity: .6; cursor: default; }
.ex-btn.ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.ex-btn.ghost:hover { background: #f1f4f9; }
.ex-btn.sm { padding: 4px 10px; font-size: 12px; }
.ex-link { background: none; border: 0; color: var(--blue); font-size: 12px; cursor: pointer; padding: 0 4px; text-decoration: none; font-family: inherit; }
.ex-link:hover { text-decoration: underline; }

.ex-main { padding: 0; overflow: hidden; }
.ex-tabs-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.ex-tabs { display: flex; gap: 4px; }
.ex-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 13px 12px 10px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; }
.ex-tabs button span { background: #e9eef6; color: var(--navy); border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.ex-tabs button.active { color: var(--navy); border-bottom-color: var(--blue); }
.ex-search input { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; width: 260px; }
.ex-bulk { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: #eaf2fb; border-bottom: 1px solid var(--line); font-size: 13px; }

.ex-main .table-wrap { overflow-x: auto; }
.ex-table { width: 100%; font-size: 13px; }
.ex-table th { background: #f7f9fc; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; text-align: left; position: static; border-bottom: 1px solid var(--line); }
.ex-table th.num, .ex-table td.num { text-align: right; }
.ex-table td { text-align: left; white-space: normal; vertical-align: middle; padding: 8px 10px; }
.ex-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-table td.neg { color: var(--text); }
.ex-table td.pos { color: var(--green); }
.ex-table th:first-child, .ex-table td:first-child { text-align: center; }
.ex-table tr.sel { background: #f2f7fd; }
.ex-table tr.excluded { opacity: .55; }
.ex-table .ex-chk { width: 34px; }
.ex-desc { min-width: 220px; max-width: 340px; }
.ex-desc small { display: block; color: var(--muted); font-size: 11px; }
.ex-status { min-width: 130px; }
.ex-cat { min-width: 260px; }
.ex-ven { min-width: 170px; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.ex-hint { color: var(--muted); font-size: 12px; }
.ex-empty { text-align: center !important; color: var(--muted); padding: 28px 10px !important; }
.ex-foot { padding: 10px 16px; color: var(--muted); font-size: 12px; }

.ex-in { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; width: 100%; background: #fff; }
.ex-in:focus { outline: 2px solid #b9d3ee; border-color: var(--blue); }
.ex-cat .ex-in { width: calc(100% - 58px); }
.ex-suggest { margin-top: 3px; font-size: 12px; color: var(--muted); }

.ex-pill { display: inline-block; border-radius: 10px; padding: 2px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; text-decoration: none; margin: 1px 0; }
.ex-pill.blue { background: #e1eefb; color: var(--navy); }
.ex-pill.green { background: #e3f3e5; color: var(--green); }
.ex-pill.amber { background: var(--amber); color: #7a5c00; }
.ex-pill.grey { background: #eceff4; color: var(--muted); }
.ex-conf { display: inline-block; border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; margin-left: 4px; }
.ex-conf.high { background: #e3f3e5; color: var(--green); }
.ex-conf.medium { background: var(--amber); color: #7a5c00; }
.ex-conf.low, .ex-conf.none { background: #f8e3e3; color: var(--red); }

.ex-paste { width: 100%; font-family: Consolas, monospace; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; resize: vertical; }
.ex-modal-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.ex-grow { flex: 1; }
.ex-file { cursor: pointer; }
.ex-result { margin-top: 8px; }
.ex-confirm { width: 100%; font-size: 12px; }
.ex-confirm th, .ex-confirm td { white-space: normal; text-align: left; }
.ex-confirm th.num, .ex-confirm td.num { text-align: right; white-space: nowrap; }

/* Expenses > Dashboard (uses the bk-* KPI, segment and chart styles from banks.css) */
.exd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; }
.exd-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.exd-ym { display: inline-flex; gap: 4px; }
.exd-ym select { font: inherit; font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; background: #fff; color: var(--text); }
.exd-spacer { flex: 1; }
.exd-src { font-size: 11px; color: var(--muted); }
#exdBody { transition: opacity .15s; }
#exdBody.exd-busy { opacity: .45; pointer-events: none; }
.bk-hero.exd-hero { grid-template-columns: 1.5fr repeat(4, 1fr); }
.exd-hero .bk-kpi-sub { white-space: normal; }
.exd-kpi-name { font-size: 17px !important; line-height: 1.25; margin-top: 8px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exd-prog { margin-top: 6px !important; opacity: .85; font-style: italic; }
.exd-chart { height: 320px; }
.exd-d { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exd-d small { font-weight: 500; opacity: .8; }
.exd-d.bad { color: #b45309; }
.exd-d.good { color: var(--green); }
.exd-d.flat { color: var(--muted); }
.exd-h, .exd-table-card .bk-chart-head > small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.exd-table th { background: #f4f6fa; }
.exd-table tfoot td { border-top: 2px solid var(--line); background: #f7f9fc; }
.exd-dept { cursor: pointer; }
.exd-dept td { background: #fff; }
.exd-dept.open td { background: #f7f9fc; }
.exd-caret { display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; font-size: 11px; }
.exd-dept.open .exd-caret { transform: rotate(90deg); }
.exd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }
.exd-acc { cursor: pointer; font-size: 12px; }
.exd-acc td { background: #fbfcfe; }
.exd-acc:hover td { background: #eef4fb !important; }
.exd-sub { padding-left: 32px; display: inline-block; color: var(--text); }
.exd-share { display: inline-block; width: 70px; height: 6px; background: #edf0f5; border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.exd-share span { display: block; height: 100%; border-radius: 3px; }
.exd-spark { vertical-align: middle; }
.exd-link { background: none; border: 0; color: var(--blue); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; margin-left: 6px; padding: 0; }
.exd-link:hover { text-decoration: underline; }
.exd-tag { display: inline-block; background: #eef2f8; color: var(--navy); border-radius: 6px; padding: 0 5px; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.exd-tag.warn { background: #fff4e0; color: #b45309; }
.exd-co { display: inline-block; background: #f1f1f1; color: var(--muted); border-radius: 5px; padding: 0 4px; font-size: 10px; font-weight: 600; }
.exd-foot { margin: 10px 0 0; }
.exd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.exd-grid > .card { min-width: 0; overflow: hidden; }
.exd-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.exd-card-head h3 { margin: 0; }
.exd-search { font: inherit; font-size: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; width: 180px; }
.exd-row { cursor: pointer; }
.exd-row:hover td { background: #eef4fb !important; }
.exd-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.exd-name small { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.exd-desc { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.exd-more { background: none; border: 0; color: var(--blue); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 8px; padding: 0; }
.exd-ins-wrap { max-height: 470px; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.exd-ins-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 12px 0 5px; }
.exd-ins-group:first-child { margin-top: 0; }
.exd-ins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.exd-ins li { display: flex; align-items: center; gap: 10px; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; transition: background .12s, border-color .12s; }
.exd-ins li:hover { background: #f5f8fc; border-color: var(--blue); }
.exd-ins li > div { flex: 1; min-width: 0; }
.exd-ins b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exd-ins small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exd-ins-ic { width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.exd-ins .bad .exd-ins-ic, .exd-ins li.bad .exd-ins-ic { background: #fff4e0; color: #b45309; }
.exd-ins li.good .exd-ins-ic { background: #e7f5ec; color: var(--green); }
.exd-ins li.new .exd-ins-ic { background: #eef2fb; color: #2f75b5; }
.exd-ins li.warn .exd-ins-ic { background: #fdecea; color: #c0504d; }
.exd-ins-v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.exd-ins li.bad .exd-ins-v { color: #b45309; }
.exd-ins li.good .exd-ins-v { color: var(--green); }
.modal.wide.exd-modal { width: min(1100px, calc(100vw - 48px)); height: min(640px, 88vh); }
.modal-body .result-table.exd-drill .col-date { white-space: nowrap; width: 7.2em; }
.modal-body .result-table.exd-drill .col-co { width: 3.5em; }
.exd-drill-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.exd-drill-head .note { margin: 0 0 10px; }
@media (max-width: 1100px) {
  .bk-hero.exd-hero { grid-template-columns: repeat(2, 1fr); }
  .exd-grid { grid-template-columns: 1fr; }
}
