/* Shared finance workspace. Scoped to leave navigation and other modules intact. */
.finance-workspace {
    --primary:#383838; --primary-dark:#222; --dark:#262626; --muted:#686868;
    --border:#e2e2e2; --bg-light:#f5f5f5;
    color:#333; background:#f5f5f5; padding:24px; min-width:0;
    font-family:"Segoe UI",Arial,sans-serif; line-height:1.5;
}
.finance-workspace *, .finance-workspace *::before, .finance-workspace *::after { box-sizing:border-box; }
.finance-workspace :is([class$="-shell"],.qb-register,.ledger-page,.ledger-wrap,.page-wrap,.liability-page,.container,.container-fluid) { max-width:1450px; margin:0 auto; background:transparent; padding:0 0 24px; min-width:0; }
.finance-workspace :is(h1,h2,h3,h4,h5) { color:#262626!important; font-weight:600; letter-spacing:normal; }
.finance-workspace h1,.finance-workspace h2 { line-height:1.25; }
.finance-workspace :is(.account-hero,.accounts-hero,.aging-hero,.bs-hero,.ca-hero,.capital-hero,.cf-hero,.detail-hero,.expense-hero,.expenses-hero,.finance-hero,.gl-hero,.is-hero,.ledger-hero,.liability-hero,.opening-hero,.pressure-hero,.profit-hero,.recon-hero,.tb-hero,.unpaid-hero,.withdrawal-hero,.hero,.payment-header,.page-header-card,.ledger-head) { background:#fafafa!important; color:#333!important; border:1px solid #e5e5e5!important; border-radius:8px!important; box-shadow:none!important; padding:24px; }
.finance-workspace :is(.account-hero,.accounts-hero,.aging-hero,.bs-hero,.ca-hero,.capital-hero,.cf-hero,.detail-hero,.expense-hero,.expenses-hero,.finance-hero,.gl-hero,.is-hero,.ledger-hero,.liability-hero,.opening-hero,.pressure-hero,.profit-hero,.recon-hero,.tb-hero,.unpaid-hero,.withdrawal-hero,.hero,.ledger-head)::before,
.finance-workspace :is(.account-hero,.accounts-hero,.aging-hero,.bs-hero,.ca-hero,.capital-hero,.cf-hero,.detail-hero,.expense-hero,.expenses-hero,.finance-hero,.gl-hero,.is-hero,.ledger-hero,.liability-hero,.opening-hero,.pressure-hero,.profit-hero,.recon-hero,.tb-hero,.unpaid-hero,.withdrawal-hero,.hero,.ledger-head)::after { display:none; }
.finance-workspace :is(.account-hero,.accounts-hero,.aging-hero,.bs-hero,.ca-hero,.capital-hero,.cf-hero,.detail-hero,.expense-hero,.expenses-hero,.finance-hero,.gl-hero,.is-hero,.ledger-hero,.liability-hero,.opening-hero,.pressure-hero,.profit-hero,.recon-hero,.tb-hero,.unpaid-hero,.withdrawal-hero,.hero,.payment-header,.ledger-head) p { color:#666!important; }
.finance-workspace :is(.hero-actions,.section-actions,.account-actions,.qb-actions,.form-actions,.top-actions,.action-wrap,.filter-actions,.table-actions,.issue-actions,.expense-row-actions) { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.finance-workspace :is(.btn,.btn-ui,.btn-modern,.qb-button,.premium-btn,.subscription-btn,button:not([class]),input[type=submit]) { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:8px 14px; font:600 12px/1.4 "Segoe UI",Arial,sans-serif; white-space:nowrap; text-decoration:none; cursor:pointer; border:1px solid #dedede!important; border-radius:5px!important; background:#f2f2f2!important; color:#333!important; box-shadow:none!important; }
.finance-workspace :is(.btn-dark,.btn-success,.btn-primary,.btn-korido-primary,.qb-primary,.btn-ui.dark,.btn-ui.green,button[type=submit],input[type=submit]) { background:#383838!important; color:#fff!important; border-color:#383838!important; }
.finance-workspace :is(.btn,.btn-ui,.btn-modern,.qb-button,.premium-btn,button):hover { background:#e5e5e5!important; color:#222!important; border-color:#bdbdbd!important; }
.finance-workspace :is(a,button,input,select,textarea,summary):focus-visible { outline:2px solid #555!important; outline-offset:3px; }
.finance-workspace :is(.panel,.panel-card,.card,.form-card,.side-card,.filter-card,.table-card,.table-shell,.main-card,.ledger-card,.qb-panel,.detail-card,.equation-panel,.net-panel,.pl-statement,.payment-card,.drawer-card) { background:#fff!important; color:#333!important; border:1px solid #e5e5e5!important; border-radius:7px!important; box-shadow:none!important; min-width:0; }
.finance-workspace :is(.metric-card,.summary-card,.stat-card,.account-card,.mini-stat,.bucket-card,.insight-card,.quick-action-card,.qb-stat,.equation-item) { background:#fff!important; color:#333!important; border:1px solid #e5e5e5!important; border-radius:7px!important; box-shadow:none!important; padding:18px 20px; min-width:0; }
.finance-workspace :is(.metric-value,.summary-value,.stat-value,.account-balance,.bucket-value,.mini-stat-value,.balance-amount,.qb-stat strong,.net-amount,.line-amount,.pl-amount,.flow-amount) { color:#292929!important; font-weight:600; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.finance-workspace :is(.metric-label,.summary-label,.stat-label,.bucket-label,.mini-stat-label,.summary-title,.qb-eyebrow) { color:#686868!important; font-size:11px; font-weight:600; letter-spacing:.3px; }
.finance-workspace :is(.metric-note,.summary-note,.stat-note,.bucket-note,.metric-note,.field-help,.help-text,.muted,.muted-text,.text-muted,.qb-muted,.subtext,.side-copy,.card-copy,.panel-copy,.account-sub,.ledger-hero-sub) { color:#686868!important; }
.finance-workspace :is(.panel-head,.card-header,.table-card-header,.table-header,.table-toolbar,.main-card-header,.filter-head,.qb-panel>.qb-header) { background:#fafafa!important; color:#333!important; border-bottom:1px solid #e8e8e8; padding:16px 20px; }
.finance-workspace :is(.table-wrap,.table-responsive,.qb-table-wrap) { overflow-x:auto; max-width:100%; }
.finance-workspace table { width:100%; border-collapse:collapse; background:#fff; font-size:12px; }
.finance-workspace table th { padding:12px 16px; background:#f0f0f0!important; color:#555!important; border:0!important; border-bottom:1px solid #dedede!important; font-size:11px; font-weight:600; white-space:nowrap; }
.finance-workspace table td { padding:13px 16px; color:#444; border:0!important; border-bottom:1px solid #ededed!important; vertical-align:middle; }
.finance-workspace table tbody tr:hover { background:#f7f7f7!important; }
.finance-workspace table :is(.money,.money-cell,.qb-number,.text-end,.balance,.amount,.running-balance) { font-variant-numeric:tabular-nums; }
.finance-workspace :is(a,.qb-link,.account-link,.supplier-link,.source-link,.gl-link,.liability-link) { color:#333; }
.finance-workspace table a:not(.btn):not(.btn-ui):not(.qb-button) { color:#333!important; font-weight:600; text-underline-offset:3px; }
.finance-workspace table a:hover { text-decoration:underline; }
.finance-workspace :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]),select,textarea) { background:#fafafa!important; color:#333!important; border:1px solid #d9d9d9!important; border-radius:5px!important; padding:10px 12px; min-height:40px; max-width:100%; box-shadow:none!important; font:inherit; font-size:13px; }
.finance-workspace :is(input,select,textarea):disabled { background:#ededed!important; color:#777!important; }
.finance-workspace :is(input[type=checkbox],input[type=radio]) { accent-color:#444; }
.finance-workspace :is(label,.form-label,.filter-label) { color:#444; font-size:12px; font-weight:600; }
.finance-workspace :is(.hero-chip,.hero-badge,.type-badge,.method-badge,.source-badge,.badge,.badge-ui,.badge-soft,.status-pill,.status-badge,.bucket-badge,.level-badge,.count-pill,.qb-tag,.ledger-badge,.customer-chip,.page-status,.recon-badge) { background:#ededed!important; color:#4a4a4a!important; border:1px solid #e1e1e1!important; border-radius:4px!important; font-size:11px; box-shadow:none; }
.finance-workspace :is(.alert,.alert-card,.notice,.notice-card,.status-banner,.alert-modern,.message-box,.error-box,.balance-box,.account-warning,.summary-strip,.report-strip,.type-preview,.expense-preview,.summary-icon) { background:#efefef!important; color:#444!important; border-color:#ddd!important; box-shadow:none!important; }
.finance-workspace :is(.text-success,.text-danger,.text-primary,.text-warning,.green,.red,.amber,.blue,.money-danger,.money-success,.qb-negative,.amount-in,.amount-out,.amount-debit,.amount-credit,.amount-balance,.preview-mark,.type-mark) { color:#333!important; }
.finance-workspace :is(.line-item.total,.flow-row.total,.pl-total,.pl-subtotal,.section-total) { background:#f1f1f1!important; color:#262626!important; border-color:#ddd!important; }
.finance-workspace .hero-actions { max-width:100%; }
.finance-workspace .expense-register-row { cursor:pointer; }
.finance-workspace .expense-register-row.is-expanded { background:#f0f0f0; }
.finance-workspace .expense-register-detail[hidden] { display:none; }
.finance-workspace .expense-register-detail>td { padding:0; }
.finance-workspace .expense-detail-panel { background:#fafafa; padding:20px 24px; border-left:3px solid #555; }
.finance-workspace .expense-detail-heading { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; color:#555; }
.finance-workspace .expense-detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:16px 24px; margin:20px 0; }
.finance-workspace .expense-detail-grid dt { font-size:11px; color:#686868; margin-bottom:4px; }
.finance-workspace .expense-detail-grid dd { margin:0; color:#333; overflow-wrap:anywhere; }
.finance-workspace .expense-detail-toggle { border:0!important; background:transparent!important; color:#292929!important; padding:0; min-height:32px; font-size:12px; text-align:left; }
.finance-workspace .expense-chevron { display:inline-block; font-size:20px; margin-left:8px; transition:transform .15s; }
.finance-workspace .expense-detail-toggle[aria-expanded=true] .expense-chevron { transform:rotate(90deg); }
.finance-workspace .expense-note-preview { max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.finance-workspace .expense-full-notes { border-top:1px solid #e5e5e5; padding-top:14px; margin-bottom:16px; overflow-wrap:anywhere; }
.finance-workspace .expense-full-notes p { margin:6px 0 0; color:#555; white-space:normal; }
.finance-workspace .expense-row-actions { flex-wrap:nowrap; white-space:nowrap; }
.finance-workspace .expense-row-actions a { padding:6px 9px; border:1px solid #dedede; border-radius:4px; background:#fafafa; font-size:11px; }
.finance-workspace .cash-drawer-open-form { max-width:580px; padding:24px; display:grid; gap:12px; }
.finance-workspace .cash-drawer-open-form button { justify-self:start; margin-top:8px; }
.finance-workspace .quick-action-card:hover { background:#f7f7f7!important; border-color:#bbb!important; }
@media(max-width:900px) {
    .finance-workspace { padding:18px; }
    .finance-workspace :is(.metric-grid,.summary-grid,.stats-grid,.accounts-grid,.quick-action-grid,.bucket-grid,.qb-stats) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
    .finance-workspace { padding:12px; }
    .finance-workspace :is(.account-hero,.accounts-hero,.aging-hero,.bs-hero,.ca-hero,.capital-hero,.cf-hero,.detail-hero,.expense-hero,.expenses-hero,.finance-hero,.gl-hero,.is-hero,.ledger-hero,.liability-hero,.opening-hero,.pressure-hero,.profit-hero,.recon-hero,.tb-hero,.unpaid-hero,.withdrawal-hero,.hero,.ledger-head) { padding:18px; }
    .finance-workspace :is(.metric-grid,.summary-grid,.stats-grid,.accounts-grid,.quick-action-grid,.bucket-grid,.qb-stats,.content-grid,.statement-grid,.filter-grid,.form-grid) { grid-template-columns:minmax(0,1fr); }
    .finance-workspace :is(.hero-actions,.form-actions,.top-actions) { width:100%; }
    .finance-workspace table :is(th,td) { padding:11px 12px; }
}
@media print {
    .finance-workspace { padding:0; background:#fff; }
    .finance-workspace :is(.hero-actions,.form-actions,.filter-actions,.no-print) { display:none!important; }
    .finance-workspace :is(.table-wrap,.table-responsive,.qb-table-wrap) { overflow:visible; }
}
