/* Layer: components — split from public/styles.css (P0.1). No selector/declaration edits. */

.recon-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}



.recon-metric-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, var(--text-secondary));
}



.recon-metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}



/* Design P3.4 — zero difference is the goal state, so it reads as resolved money, not
   as an arbitrary green. Both figures now come from tokens instead of a literal rgba. */
.recon-metric-value--zero {
    color: var(--money-positive);
}



.recon-metric-value--nonzero {
    color: var(--badge-orange);
}



/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-current);
    max-width: 100vw;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 0 2rem;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-sizing: border-box;
}



.logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 1rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}



.logo-title {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    min-width: 0;
}



.logo-emoji {
    flex-shrink: 0;
}



.logo-word {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.sidebar-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}



.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}



.sidebar-toggle-chevron {
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent currentColor;
    margin-left: 2px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}



.nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}



.nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}



.nav-group-label {
    margin: 0.55rem 0 0;
    padding: 0 0.75rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted, var(--text-secondary));
}



.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
}



.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
}



.nav-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}



/* Nav glyphs are `.nav-icon`; see the sizing rule in the app-shell block. */

.reports-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}



.report-export-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}



.reports-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}



.report-picker-item {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.7rem 0.8rem;
    text-align: left;
    cursor: pointer;
}



.report-picker-item span {
    display: block;
    font-weight: 600;
}



.report-picker-item small {
    color: var(--text-secondary);
    display: block;
    margin-top: 0.2rem;
    line-height: 1.35;
}



.report-picker-item.active,
.report-picker-item:hover {
    border-color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.14);
}



.reports-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}



.reports-toolbar {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    flex-wrap: wrap;
}



.reports-timeframe-control {
    min-width: 10rem;
    margin-bottom: 0;
}



.report-filter-summary {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
    min-width: min(100%, 18rem);
}



.report-filter-chip {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
    line-height: 1;
    white-space: nowrap;
}



.reports-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}



.reports-modal-grid select[multiple] {
    min-height: 12rem;
}



.reports-modal-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.25rem;
    margin-top: 1rem;
}



.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}



.report-result-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}



.report-totals {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}



.report-totals span {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}



.report-warnings {
    border-left: 3px solid var(--badge-orange);
    background: rgba(245, 158, 11, 0.1);
    color: var(--text-primary);
    padding: 0.65rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}



.report-table-scroll {
    overflow: auto;
    max-width: 100%;
}



.report-table th,
.report-table td {
    white-space: nowrap;
}



/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-current);
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 2rem 1.25rem;
    overflow-x: hidden;
    overflow-y: auto;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}



.main-content-inner {
    width: 100%;
    max-width: 90%;
    margin-inline: auto;
    box-sizing: border-box;
}



.view {
    display: none;
}



.view.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}



/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.page-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}



.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}



/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}



.stat-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}



.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.2);
}



.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}



.stat-content {
    flex: 1;
}



.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}



.stat-value {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}



/* Summary strip (P2.1) — stat-card row above filterable tables */
.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}



.summary-strip .stat-card {
    margin: 0;
}



/* Pager (P2.5) — consumer-agnostic list pagination */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}



.pager-range {
    font-size: 0.85rem;
    color: var(--text-secondary);
}



.pager-page-label,
.pager-size-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
}



.pager-page-input {
    width: 4rem;
    padding: 0.25rem 0.35rem;
}



.pager-size-label {
    margin-left: auto;
}



.pager-page-size {
    min-width: 4rem;
}



/* Icon toggle (P2.2) — bare icon control; chrome only on hover/focus */
.icon-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: none;
}

.icon-toggle:hover:not(:disabled),
.icon-toggle:focus-visible {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    outline: none;
}

.icon-toggle:focus-visible {
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.icon-toggle.is-pressed {
    color: var(--badge-green);
}

.icon-toggle .icon {
    pointer-events: none;
}



/* Overflow menu (P2.3) — secondary/destructive actions behind more-horizontal */
.overflow-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.overflow-menu-panel {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 40;
    min-width: 12rem;
    padding: 0.35rem;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

.overflow-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.overflow-menu-item:hover:not(:disabled),
.overflow-menu-item:focus-visible {
    background: var(--bg-tertiary);
    outline: none;
}

.overflow-menu-item:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.overflow-menu-item-danger {
    color: var(--badge-red);
}

.overflow-menu-item-danger:hover:not(:disabled),
.overflow-menu-item-danger:focus-visible {
    background: var(--accent-soft);
}

.overflow-menu-separator {
    height: 1px;
    margin: 0.35rem 0.4rem;
    background: var(--border-color);
}



/* Filter chips (P2.4) — applied filters shown as removable chips next to a
   disclosure toggle, replacing an always-open filter card. */
.filter-chip-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    padding: 0.16rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    box-sizing: border-box;
}

.filter-chip-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-chip-remove {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
}

.filter-chip-remove:hover,
.filter-chip-remove:focus-visible {
    background: var(--bg-secondary);
    outline: none;
}

.filter-chip-remove .icon {
    pointer-events: none;
}



/* Context bar (P2.6) — persistent scope/mode indicator: title, key figures, way
   out. Used when a view is reconciling an account, filtered to one entity, etc. */
.context-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--accent-soft);
}

.context-bar-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.context-bar-title {
    font-weight: 600;
    color: var(--text-primary);
}

.context-bar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.context-bar-actions {
    display: flex;
    flex-wrap: wrap;
    flex: 0 0 auto;
    gap: 0.5rem;
}



/* ===== CARDS ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}



.card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: relative;
}



.card.combobox-layer-active {
    z-index: 25;
}



.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}



/* ===== ACCOUNT TYPES LIST ===== */


.account-type-item:hover {
    background: rgba(255, 255, 255, 0.06);
}



.count {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}



/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* P1.2: colour badge-* and badge-role-* removed — use status-chip variants instead.
   .badge base (padding/weight) retained for any non-state label wrappers still in markup. */



/* Reusable inline help affordance (Portfolio Settings + Rebalance de-clutter). Sits next
   to a heading, table header, or label; the browser's native title tooltip handles the
   pointer/hover case, `role="note"` + `aria-label` (see PortfolioViews.helpTip) cover
   assistive tech, and the focus outline below covers keyboard users tabbing to it. */
.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95em;
    height: 0.95em;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-muted, var(--text-secondary));
    font-size: 0.72em;
    line-height: 1;
    cursor: help;
    margin-left: 0.35rem;
    user-select: none;
    vertical-align: middle;
}



.help-tip:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}



/* Lucide subset icons (P0.5) — inherit colour; scale with text via 1em default */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    min-width: 1em;
    min-height: 1em;
    vertical-align: -0.125em;
    fill: none;
    stroke: currentColor;
    flex-shrink: 0;
    overflow: visible;
}

.icon-16 {
    width: 16px;
    height: 16px;
}

.icon-20 {
    width: 20px;
    height: 20px;
}

.icon-24 {
    width: 24px;
    height: 24px;
}



/* Households card (Settings): each household groups an "Organizations" sub-section and a
   "Members" sub-section, each with its own labeled heading — replaces the previous
   unlabeled stack of inline checkboxes/labels. */
.household-subsection {
    margin-top: 1rem;
}



.household-subsection-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}



.household-header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



.household-header-row .household-name-display {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



.household-header-row .household-name-input {
    flex: 1 1 auto;
    min-width: 0;
}



/* The household card's destructive action moved into a P2.3 overflowMenu() (P10.1
   follow-up), so the trailing-edge placement follows the menu, not the old button. */
.household-header-row .overflow-menu {
    margin-left: auto;
}



.household-org-microcopy {
    margin-top: 0.35rem;
    font-size: 0.85rem;
}



.household-org-table th,
.household-org-table td,
.household-members-table th,
.household-members-table td {
    padding: 0.5rem 0.75rem;
}



.household-org-table td:first-child,
.household-org-table th:first-child {
    width: 2rem;
    text-align: center;
    padding-right: 0;
}



.household-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}



/* Text controls inside the households card (rename input, org-role selects, add-member
   row) previously relied on the global `* { padding: 0 }` reset with no rule of their own,
   so text sat flush against the input edge. Match the app's standard control padding/size
   (see .form-group input above) instead of inventing a smaller one-off. */
.household-header-row .household-name-input,
.household-org-table select,
.household-add-member-row input,
.household-add-member-row select {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
}



.household-add-member-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
}



.household-add-member-row input[data-household-member="fullName"] {
    flex: 2 1 14rem;
}



.household-add-member-row select[data-household-member="memberRole"] {
    flex: 1 1 8rem;
}



.household-add-member-row input[data-household-member="birthYear"] {
    flex: 1 1 10rem;
}



.household-add-member-row button {
    flex: 0 0 auto;
}



.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}


.tab-btn.active {
    border-bottom: 2px solid var(--accent-primary) !important;
    color: var(--text-primary) !important;
}


.tab-btn:hover {
    color: var(--text-primary);
}



/* ===== BUTTONS ===== */
/* P1.1 hierarchy: primary | secondary | ghost | danger (+ sm). Legacy
   btn-create / btn-delete / btn-danger-subtle alias into this set (P5 cleanup). */
/* `.btn` sets `display: inline-flex`, which outranks the user-agent `[hidden] { display: none }`
   (author > UA), so a hidden button kept painting — Unlock beside Lock on an open period
   (design P6 capture, 2026-08-28), and the same on the invoice-import and bill-detail
   controls. One attribute selector restores the contract app-wide. */
.btn[hidden] {
    display: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    background: transparent;
    color: var(--text-primary);
}

.btn:focus {
    outline: none;
}

.btn:focus-visible {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn-sm,
.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--on-dark);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled):not([disabled]) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled:hover,
.btn-primary[disabled]:hover {
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-secondary:hover:not(:disabled):not([disabled]) {
    background: var(--surface-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border-color: transparent;
    box-shadow: none;
    font-weight: 600;
}

.btn-ghost:hover:not(:disabled):not([disabled]),
.btn-ghost:focus-visible {
    background: var(--bg-tertiary);
}

.btn-danger {
    background: var(--badge-red);
    color: var(--on-dark);
    border-color: transparent;
    box-shadow: none;
}

.btn-danger:hover:not(:disabled):not([disabled]) {
    filter: brightness(0.92);
}

.btn-danger:focus-visible {
    outline-color: var(--badge-red);
}

/* Legacy aliases → hierarchy (keep class names working; retire in P5) */
.btn-create {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--on-dark);
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.btn-create:hover:not(:disabled):not([disabled]) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-delete,
.btn-danger-subtle {
    background: var(--badge-red);
    color: var(--on-dark);
    border-color: transparent;
    box-shadow: none;
}

.btn-delete:hover:not(:disabled):not([disabled]),
.btn-danger-subtle:hover:not(:disabled):not([disabled]) {
    filter: brightness(0.92);
}

.btn-delete:focus-visible,
.btn-danger-subtle:focus-visible {
    outline-color: var(--badge-red);
}


/* ===== DATA TABLE ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}



.resizable-table {
    table-layout: fixed;
}



.resizable-table th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



.resizable-th {
    position: relative;
}



.column-resizer {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
}



.column-resizer::after {
    content: '';
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
}



.resizable-table.is-resizing .column-resizer::after,
.resizable-th:hover .column-resizer::after {
    background: var(--accent-primary);
}



.data-table thead {
    background: rgba(255, 255, 255, 0.05);
}



.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



.data-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}



.data-table tbody tr {
    transition: var(--transition);
}



.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}



.loading-row td {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}



.btn-create-vendor {
    flex-shrink: 0;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
    border: 1px solid rgba(118,75,162,0.3);
    color: var(--accent-light);
    font-weight: 500;
}



.btn-create-vendor:hover {
    background: linear-gradient(135deg, rgba(102,126,234,0.2) 0%, rgba(118,75,162,0.2) 100%);
    border-color: rgba(118,75,162,0.5);
    color: var(--on-dark);
}



.combobox-dropdown.combobox-dropdown--txn-fixed {
    position: fixed !important;
    border-radius: 8px;
    border-top: 1px solid rgba(102, 126, 234, 0.65);
    z-index: 10050;
}



/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}



.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}



.modal.modal-stacked {
    z-index: 1100;
}



.modal-content {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    max-height: calc(100dvh - 2rem);
    width: 90%;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}



.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}



.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}



.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}



.modal-close:hover {
    color: var(--text-primary);
}



/* Close control that does not use .modal-close (avoids global "close all modals" handler). */
.modal-close-alt {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}



.modal-close-alt:hover {
    color: var(--text-primary);
}



.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}



.account-detail-actions {
    justify-content: space-between;
    align-items: center;
}



.account-detail-actions-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}



.exclude-toggle-label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0 !important;
    color: var(--text-primary);
}



.exclude-toggle-label input[type='checkbox'] {
    width: auto;
    margin: 0;
}



.tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}



.tooltip-icon {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    cursor: help;
}



.tooltip-content {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    transform: translateX(-50%);
    width: 320px;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    background: rgba(10, 12, 24, 0.98);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.35;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 50;
}



.tooltip-wrap:hover .tooltip-content,
.tooltip-icon:focus + .tooltip-content {
    opacity: 1;
    visibility: visible;
}



/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}



.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
}



.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}



.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}



.form-group textarea {
    resize: vertical;
}



.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    align-self: center;
}



.form-group.form-group-checkbox .form-checkbox-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
}



.form-group.form-group-checkbox .form-checkbox-label span {
    flex: 0 1 auto;
}



/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}



.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}



.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}



.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}



/* Design P1.4 — the empty-state adopted inside an entity table spans the row and
   drops the short-message row chrome (dashed border/centred cell padding) so the
   component supplies the whole presentation. */
.empty-state-row td {
    border: none;
    background: transparent;
    padding: 0;
}

/* A wide table (e.g. Transactions) can be wider than its horizontal scroll port,
   so centring on the cell would push the empty-state off-screen. Sticky-pin it to
   the scroll port's left edge and cap the width so the whole {heading, line,
   action} block stays visible without horizontal scrolling; text stays centred
   inside the capped box. */
.empty-state-row .empty-state {
    position: sticky;
    left: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    padding: 3rem 2rem;
}

/* The action carries the p's 1.5rem gap already; keep a single primary and no
   trailing margin so a heading+line-only empty-state doesn't reserve dead space. */
.empty-state > .empty-state-action:last-child {
    margin-bottom: 0;
}


/* ===== UTILITIES ===== */
.grid { display: grid; gap: 1.5rem; }


.grid-2 { grid-template-columns: repeat(2, 1fr); }


.text-error { color: var(--badge-red); font-size: 0.875rem; margin-top: 0.5rem; }


.text-muted { color: var(--text-secondary); font-size: 0.875rem; }


.text-success { color: var(--badge-green); font-size: 0.875rem; }


.input-readonly { background: rgba(255, 255, 255, 0.02) !important; cursor: not-allowed; }


.hr { border: 0; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }



/* ===== MODAL SIZING ===== */
.modal-lg { max-width: 800px; }


.modal-xl { max-width: 1000px; }



/* ===== LEDGER ===== */
.ledger-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}



/* ===== TRANSACTION EDIT ===== */
.transaction-info-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}



.txn-header-view-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
}



.txn-header-create-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    width: 100%;
    align-items: flex-end;
}



.txn-header-input {
    width: 100%;
    max-width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-input, rgba(0, 0, 0, 0.25));
    color: var(--text-primary);
    font-size: 0.95rem;
}



.info-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}



.amount-large {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
}



/* Normal-balance semantics: increase = natural to account type, decrease = opposite */
.amount-increase {
    color: var(--money-positive);
}



.amount-decrease {
    color: var(--money-negative);
}



/* Legacy aliases (prefer amount-increase / amount-decrease) */
.amount-credit {
    color: var(--money-positive);
}



.amount-debit {
    color: var(--money-negative);
}



.amount-neutral {
    color: var(--text-secondary);
}



.split-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}



.split-table th {
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}



.split-table td {
    padding: 0.5rem;
}



.split-table input, .split-table select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: white;
}



/* ===== DATABASE STATUS ===== */
.db-pulse {
    width: 20px;
    height: 20px;
    background: var(--badge-red);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}



/* ===== COMBOBOX ===== */
.combobox-container {
    position: relative;
    width: 100%;
    z-index: 1;
}



.combobox-container.combobox-open {
    z-index: 3000;
}



.combobox-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(18, 20, 34, 0.985);
    border: 1px solid rgba(102, 126, 234, 0.65);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1100;
    display: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}



.combobox-dropdown.active {
    display: block;
}



.combobox-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}



.combobox-item:last-child {
    border-bottom: none;
}



.combobox-item:hover, .combobox-item.active {
    background: rgba(102, 126, 234, 0.3);
    color: var(--bg-secondary);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}



.combobox-create {
    color: var(--accent-primary);
    font-style: italic;
    border-top: 1px solid var(--border-color);
}



.combobox-item.combobox-heading {
    cursor: default;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.25);
    font-weight: 600;
    border-left-color: transparent;
}



.combobox-item.combobox-heading:hover {
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-secondary);
    font-weight: 600;
}



.combobox-item.combobox-transfer-row {
    color: var(--accent-primary);
    font-weight: 600;
    border-bottom: 1px solid rgba(102, 126, 234, 0.35);
}



.combobox-item.combobox-item--row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
}



.combobox-item-primary {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



/* P1.2: combobox type labels use status-chip; colour type-badge rules removed. */

.combobox-item.combobox-item-current-category,
.combobox-item.combobox-item-current-payee,
.combobox-item.combobox-item-current-selection {
    background: rgba(46, 204, 113, 0.14);
    border-left: 3px solid rgba(46, 204, 113, 0.9);
    font-weight: 600;
    color: var(--on-dark);
}



.combobox-item.combobox-item-current-category:hover,
.combobox-item.combobox-item-current-payee:hover,
.combobox-item.combobox-item-current-selection:hover {
    background: rgba(46, 204, 113, 0.24);
    color: var(--bg-secondary);
}



/* ===== CHARTS ===== */
.chart-card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}



.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}



/* `.card-header` is already a space-between flex row, so a right-hand action cluster
   just needs its own alignment - the status text sits beside its button rather than
   above the card, where it would be read apart from the control that produced it. */
.card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}



.chart-container {
    flex: 1;
    position: relative;
    min-height: 300px;
}



.chart-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}




/* ===== BANNERS ===== */
.banner {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}



.banner-error {
    background: rgba(239, 68, 68, 0.15);
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--money-negative);
    backdrop-filter: blur(10px);
}



.client-update-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 10001;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 0.5rem;
    background: rgba(102, 126, 234, 0.2);
    border-top: 1px solid rgba(102, 126, 234, 0.45);
    border-bottom: none;
    color: var(--text-primary);
    backdrop-filter: blur(12px);
}



.client-update-banner .message {
    flex: 1 1 12rem;
    min-width: 0;
}



.client-update-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}



.pulse {
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s infinite;
}



/* ===== ATTACHMENTS ===== */
.attachment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}



.attachment-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}



.attachment-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}



.attachment-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}



.attachment-actions {
    display: flex;
    gap: 0.5rem;
}



.attachment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    color: var(--text-secondary);
}



.attachment-actions button:hover {
    opacity: 1;
}



.attachment-actions .btn-delete:hover {
    filter: brightness(0.92);
    color: var(--on-dark);
}



.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}



.upload-zone:hover {
    border-color: var(--accent-primary);
}



.upload-zone.drag-over {
    background: rgba(102, 126, 234, 0.12);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.22);
}



.upload-zone-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.85rem;
    color: var(--text-primary);
}



.upload-zone-copy span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}



/* ===== COMBOBOX EXTENSIONS ===== */
.combobox-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}



.combobox-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.18);
}



.combobox-create {
    color: var(--accent-primary);
    font-weight: 600;
    border-top: 1px solid var(--border-color);
    background: rgba(102, 126, 234, 0.05);
}



.combobox-create:hover {
    background: rgba(102, 126, 234, 0.15) !important;
}



/* ===== MULTI-SELECT COMBOBOX ===== */
.multi-select-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 42px;
    cursor: pointer;
}



.multi-select-container:focus-within {
    border-color: var(--accent-primary);
}



.multi-select-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
}



.multi-select-tag .remove {
    cursor: pointer;
    font-weight: 600;
    opacity: 0.7;
}



.multi-select-tag .remove:hover {
    opacity: 1;
}



.multi-select-placeholder {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 26px;
}



.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-primary);
    border-radius: 0 0 8px 8px;
    z-index: 1200;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
}



.multi-select-dropdown.active {
    display: block;
}



.multi-select-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}



.multi-select-item:hover {
    background: rgba(255, 255, 255, 0.1);
}



.multi-select-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}



/* ===== PROFILE & DEVELOPER DETAIL ===== */
.profile-local-login-form .form-group {
    margin-bottom: 1rem;
}



.txn-plaid-developer-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}



.txn-plaid-developer-section summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0.5rem;
}



.dev-json-pre {
    font-family: var(--font-data);
    font-size: 0.78rem;
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.35);
    padding: 1rem;
    border-radius: 8px;
    overflow: auto;
    max-height: 28rem;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}



/* ===== SSO TOGGLE SWITCH ===== */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}



.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}



.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}



.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}



input:checked + .slider {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}



input:focus + .slider {
  box-shadow: 0 0 1px var(--accent-primary);
}



input:checked + .slider:before {
  transform: translateX(22px);
}



.slider.round {
  border-radius: 24px;
}



.slider.round:before {
  border-radius: 50%;
}



/* ===== GRANULAR PERMISSIONS MODAL ===== */
.permissions-tabs {
    border-bottom: 1px solid var(--border-color);
}


.permissions-tab-btn {
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    border-radius: 6px 6px 0 0 !important;
    margin-bottom: -1px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}


.permissions-tab-btn:hover {
    color: var(--text-primary) !important;
    background: var(--surface-light) !important;
}


.permissions-tab-btn.active {
    color: var(--accent-primary) !important;
    border-color: var(--border-color) var(--border-color) transparent var(--border-color) !important;
    background: var(--surface-light) !important;
    border-bottom: 2px solid var(--accent-primary) !important;
}


.permissions-grant-table td {
    vertical-align: middle;
}


.permissions-grant-table th,
.permissions-grant-table td {
    padding: 0.6rem 0.75rem;
}


.permissions-grant-table input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}



/* ===== ORANGE QUIET PRO VISUAL REFRESH ===== */
.app-shell {
    background:
        radial-gradient(circle at 82% 8%, var(--shell-radial-accent), transparent 30rem),
        linear-gradient(180deg, var(--shell-gradient-top) 0%, var(--bg-primary) 38%, var(--shell-gradient-bottom) 100%);
    color: var(--text-primary);
}



.app-shell .sidebar {
    background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-secondary));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 12px 0 34px rgba(36, 27, 20, 0.12);
}



.app-shell .logo {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}



.logo-mark {
    width: 2.125rem;
    height: 2.125rem;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--sidebar-logo-bg);
    color: var(--on-dark);
    font-weight: 850;
    font-size: 1rem;
    flex: 0 0 auto;
}



.app-shell .logo-word {
    background: none;
    -webkit-text-fill-color: var(--on-sidebar);
    color: var(--on-sidebar);
}



.app-shell .sidebar-toggle {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--on-sidebar-muted);
    border-radius: 8px;
}



.app-shell .nav {
    gap: 0.35rem;
}



.app-shell .nav-item {
    border-radius: 8px;
    color: var(--on-sidebar-muted);
    padding: 0.72rem 0.75rem;
    gap: 0.75rem;
    font-size: 0.91rem;
}



.app-shell .nav-item:hover {
    background: rgba(248, 232, 216, 0.08);
    color: var(--on-sidebar-hover);
    transform: none;
}



.app-shell .nav-item.active {
    background: var(--accent-soft);
    color: var(--on-accent-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}



.nav-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-grid;
    place-items: center;
    border-radius: 5px;
    border: 1px solid currentColor;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
    opacity: 0.9;
}



.app-shell .main-content {
    background: transparent;
    padding: 1.5rem 1.75rem 2.4rem;
}



.app-shell .main-content-inner {
    max-width: min(1180px, 94vw);
}



.app-shell .page-header {
    margin-bottom: 1.4rem;
    gap: 1rem;
}



.section-eyebrow {
    margin: 0 0 0.15rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}



.app-shell .page-header h2 {
    font-size: 1.8rem;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}



.app-shell .subtitle,
.app-shell .text-muted {
    color: var(--text-secondary);
}






.app-shell .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}



.app-shell .summary-strip {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}



.app-shell .stat-card,
.app-shell .card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
}



.app-shell .stat-card {
    padding: 0.95rem;
    align-items: flex-start;
    gap: 0.85rem;
}



.app-shell .stat-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}



.app-shell .stat-icon {
    width: 2.3rem;
    height: 2.3rem;
    font-size: 0.9rem;
    font-weight: 850;
    border-radius: 8px;
    color: var(--accent-secondary);
    background: var(--accent-soft);
    border: 1px solid var(--border-color);
}



.app-shell .stat-label {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}



.app-shell .stat-value {
    font-size: 1.55rem;
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: currentColor;
}



.stat-meta,
.card-kicker {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}



.app-shell .grid {
    gap: 1rem;
}



.app-shell .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}



.app-shell .card {
    padding: 1rem;
}



.app-shell .card h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}



.app-shell .card-header {
    margin-bottom: 0.75rem;
    gap: 1rem;
}



.app-shell .card-header.compact {
    align-items: flex-start;
}



.app-shell .chart-card {
    min-height: 360px;
    box-shadow: var(--shadow-lg);
}



.app-shell .chart-container {
    min-height: 260px;
    background: linear-gradient(180deg, var(--on-dark), var(--shell-gradient-top));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.35rem;
}



.app-shell .chart-select,
.app-shell select,
.app-shell input,
.app-shell textarea,
.app-shell .combobox-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
}



.app-shell .chart-select {
    color: var(--text-secondary);
}



.app-shell .btn {
    border-radius: 8px;
    font-weight: 750;
    box-shadow: none;
}

.app-shell .btn-primary {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    color: var(--on-dark);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-primary) 24%, transparent);
}

.app-shell .btn-primary:hover:not(:disabled):not([disabled]) {
    transform: none;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--accent-primary) 28%, transparent);
}

.app-shell .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.app-shell .btn-secondary:hover:not(:disabled):not([disabled]) {
    background: var(--surface-light);
}

.app-shell .btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border-color: transparent;
}

.app-shell .btn-ghost:hover:not(:disabled):not([disabled]),
.app-shell .btn-ghost:focus-visible {
    background: var(--bg-tertiary);
}

.app-shell .btn-danger,
.app-shell .btn-danger-subtle,
.app-shell .btn-delete {
    background: var(--badge-red);
    color: var(--on-dark);
    border-color: transparent;
}

.app-shell .btn-create {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    color: var(--on-dark);
}




.app-shell .account-type-item,







.app-shell .badge {
    border-radius: 999px;
    letter-spacing: 0.04em;
}



.app-shell .data-table {
    border-collapse: separate;
    border-spacing: 0;
}



.app-shell .data-table thead {
    background: var(--surface-muted);
}



.app-shell .data-table th {
    color: var(--text-secondary);
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.06em;
}



.app-shell .data-table td {
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}



.app-shell .data-table tbody tr:hover {
    background: var(--bg-primary);
}



.app-shell .entity-page-header {
    align-items: center;
    margin-bottom: 1rem;
}



.entity-page-eyebrow {
    color: var(--accent-secondary);
}



.entity-directory-card,
.entity-table-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--border-color);
    box-shadow: 0 10px 26px rgba(68, 43, 24, 0.08);
}



.entity-table-card {
    padding: 0.85rem 0.95rem;
    overflow-x: auto;
}



.entity-directory-card {
    padding: 0.85rem 0.95rem;
}



.entity-card-note {
    margin: 0 0 0.7rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}



.app-shell .entity-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.42rem;
}



.app-shell .entity-table thead th {
    background: transparent;
    border-bottom: 0;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    padding: 0.35rem 0.75rem;
    text-transform: uppercase;
}



.app-shell .entity-table tbody td {
    background: var(--bg-secondary);
    border-color: var(--entity-row-border);
    border-style: solid;
    border-width: 1px 0;
    padding: 0.78rem 0.75rem;
    vertical-align: middle;
}



.app-shell .entity-table tbody tr.entity-record-row > td:first-child {
    border-left-width: 1px;
    border-radius: 8px 0 0 8px;
}



.app-shell .entity-table tbody tr.entity-record-row > td:last-child {
    border-right-width: 1px;
    border-radius: 0 8px 8px 0;
}



.app-shell .entity-table tbody tr.entity-record-row:hover > td {
    background: var(--entity-row-hover);
    border-color: var(--border-color);
}



.app-shell .entity-table .empty-row td,
.app-shell .entity-table .loading-row td {
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-align: center;
}



.app-shell .entity-table .entity-root-drop-row td {
    background: var(--accent-soft);
    color: var(--accent-secondary);
}



.entity-name-stack,
.entity-contact-stack {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}



.entity-name-stack strong {
    color: var(--text-primary);
    font-size: 0.93rem;
}



.entity-name-stack span,
.entity-contact-stack span,
.entity-description-text {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}



/* Legacy entity-status-* aliases → status-chip (P1.2). Prefer statusChip() in new markup. */
.entity-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
    min-width: 0;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.2;
    padding: 0.16rem 0.5rem;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.entity-status-active {
    background: color-mix(in srgb, var(--badge-green) 8%, var(--bg-secondary));
    color: var(--badge-green);
    border-color: color-mix(in srgb, var(--badge-green) 28%, var(--border-color));
}

.entity-status-inactive {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}



.app-shell .entity-row-action {
    min-width: 3.8rem;
    padding-inline: 0.75rem;
}



.app-shell .reports-picker-card h3 {
    margin-bottom: 0.7rem;
}



.app-shell .report-picker-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    box-shadow: 0 1px 1px rgba(68, 43, 24, 0.03);
}



.app-shell .report-picker-item.active,
.app-shell .report-picker-item:hover {
    background: var(--accent-soft);
    border-color: var(--badge-orange);
    color: var(--text-primary);
}



.app-shell .report-filter-chip,
.app-shell .report-totals span {
    background: var(--accent-soft);
    border-color: var(--border-color);
    color: var(--text-secondary);
    border-radius: 999px;
}



.app-shell .report-result-header {
    align-items: flex-start;
}



.app-shell .report-warnings {
    background: var(--accent-soft);
    border-left-color: var(--badge-orange);
    color: var(--text-primary);
    border-radius: 8px;
}



.auth-landing-view {
    min-height: 100vh;
    padding: clamp(1.5rem, 4vw, 4rem);
    background:
        linear-gradient(135deg, rgba(36, 27, 22, 0.92), rgba(70, 48, 34, 0.82)),
        var(--bg-primary);
}



.auth-landing-shell {
    min-height: calc(100vh - clamp(3rem, 8vw, 8rem));
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 30rem);
    gap: clamp(1.5rem, 5vw, 5rem);
    align-items: center;
    max-width: 72rem;
    margin: 0 auto;
}



.auth-landing-brand {
    color: var(--accent-soft);
}



.auth-landing-brand .section-eyebrow,
.auth-landing-brand .subtitle {
    color: rgba(255, 248, 240, 0.76);
}



.auth-landing-brand h2 {
    margin: 0.4rem 0 0.75rem;
    color: var(--accent-soft);
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1;
}



.auth-landing-logo {
    margin-bottom: 1.5rem;
}



.auth-landing-card {
    padding: clamp(1.25rem, 3vw, 2rem);
}



.app-shell .profile-local-login-form {
    max-width: 28rem;
}



.app-shell .form-checkbox-label {
    background: var(--accent-soft);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.58rem 0.65rem;
}



@media (max-width: 760px) {
    .auth-landing-shell {
        grid-template-columns: 1fr;
        align-content: center;
    }
}



/* ===== MORE DIRECTORY ===== */
.more-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}



.more-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1.15rem;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}



.more-card:hover,
.more-card:focus-visible {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md, var(--shadow-sm));
}



.more-card__icon {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}



.more-card__label {
    font-size: 1rem;
    font-weight: 650;
}



.more-card__description {
    color: var(--text-secondary);
    font-size: 0.85rem;
}



.more-card .nav-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.95rem;
}



.extensions-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0.85rem 0.95rem;
}



.extension-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--entity-row-border);
    border-radius: 8px;
    background: var(--bg-secondary);
}



.extension-card__label {
    margin: 0;
    font-size: 0.98rem;
}



.extension-card__description {
    grid-column: 1;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
}



.extension-toggle-btn {
    grid-row: 1 / span 2;
    grid-column: 2;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 750;
    padding: 0.55rem 0.85rem;
}



.extension-toggle-btn:hover {
    background: var(--accent-soft);
    border-color: var(--badge-orange);
}



.bank-accounts-sublist {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.8rem;
}



.bank-account-record {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    font-size: 0.85rem;
}



.app-shell .empty-state {
    padding: 3rem 1.5rem;
}



.app-shell .empty-icon {
    display: inline-grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 8px;
    background: var(--accent-soft);
    border: 1px solid var(--border-color);
    color: var(--accent-secondary);
    font-size: 1.1rem;
    font-weight: 850;
    opacity: 1;
}



.app-shell .entity-tabs {
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    background: var(--accent-soft);
    padding: 0.25rem !important;
    margin-bottom: 1rem !important;
    gap: 0.25rem !important;
    display: inline-flex !important;
}



.app-shell .tab-btn {
    border: 0;
    border-radius: 6px;
    color: var(--text-secondary);
    padding: 0.55rem 0.8rem;
}



.app-shell .tab-btn.active {
    background: var(--bg-secondary);
    border-bottom: 0 !important;
    color: var(--text-primary) !important;
    box-shadow: 0 1px 2px rgba(68, 43, 24, 0.08);
}



.app-shell .role-select {
    min-height: 2rem;
}



.app-shell .entity-directory-table td:first-child {
    width: 26%;
}



.app-shell .entity-directory-table td:nth-child(2) {
    width: 24%;
}



.app-shell .entity-directory-table td:nth-child(4),
.app-shell .entity-directory-table td:nth-child(5) {
    width: 7rem;
    white-space: nowrap;
}



/* Status chip — Design P1.2. Six variants; colour + text together; never opacity. */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.16rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: none;
    white-space: nowrap;
    max-width: 100%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

/* Default size (chip-sm). Larger sizes can be added later without renaming. */
.status-chip.chip-sm,
.status-chip {
    padding: 0.16rem 0.5rem;
    font-size: 0.6875rem;
}

.status-chip .icon {
    flex: 0 0 auto;
    color: currentColor;
}

.status-chip-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Soft wash ≈ 8% badge hue on white — keeps text/bg contrast ≥ 4.5:1 (incl. orange/red). */
.status-chip-green {
    background: color-mix(in srgb, var(--badge-green) 8%, var(--bg-secondary));
    color: var(--badge-green);
    border-color: color-mix(in srgb, var(--badge-green) 28%, var(--border-color));
}

.status-chip-red {
    background: color-mix(in srgb, var(--badge-red) 8%, var(--bg-secondary));
    color: var(--badge-red);
    border-color: color-mix(in srgb, var(--badge-red) 28%, var(--border-color));
}

.status-chip-blue {
    background: color-mix(in srgb, var(--badge-blue) 8%, var(--bg-secondary));
    color: var(--badge-blue);
    border-color: color-mix(in srgb, var(--badge-blue) 28%, var(--border-color));
}

.status-chip-orange {
    background: color-mix(in srgb, var(--badge-orange) 8%, var(--bg-secondary));
    color: var(--badge-orange);
    border-color: color-mix(in srgb, var(--badge-orange) 28%, var(--border-color));
}

.status-chip-purple {
    background: color-mix(in srgb, var(--badge-purple) 8%, var(--bg-secondary));
    color: var(--badge-purple);
    border-color: color-mix(in srgb, var(--badge-purple) 28%, var(--border-color));
}

.status-chip-neutral,
.status-chip-gray {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

/* Reconciled / selected rows tint the row; chip keeps its own opaque wash so contrast holds. */
tr.tx-row-reconciled .status-chip,
tr[aria-selected="true"] .status-chip,
.tx-row-reconciled .status-chip {
    background-clip: padding-box;
}



.dashboard-bills-due-card {
    cursor: pointer;
}



.dashboard-bills-due-card:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}









.dashboard-bills-due-split-item strong {
    display: block;
    font-size: 1.1rem;
}



.dashboard-bills-due-split-item span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}



/* Categorization rules list: priority up/down and the Preview/Edit/Delete
   group, same layout language as .bills-row-actions -- no new tokens. */
.rule-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}



.app-shell .amount-credit,
.app-shell .text-success {
    color: var(--money-positive);
}



.app-shell .amount-decrease,
.app-shell .amount-debit,
.app-shell .text-error,
.app-shell .text-danger {
    color: var(--money-negative);
}



/* NOTE: no .app-shell override for .tx-save-toast — the base rules (~line 1800)
   own the toast's look, including its state variants. A white .app-shell
   override here once beat every state rule by source order, making the toast
   invisible against the ivory workspace. */

.app-shell .modal {
    background: rgba(36, 27, 20, 0.48);
}



.app-shell .modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}



.app-shell .modal-actions .btn.modal-close {
    font-size: 0.875rem;
    line-height: 1.2;
}



.app-shell .transaction-info-header,
.app-shell .attachment-item,
.app-shell .multi-select-container {
    background: var(--surface-light);
    border-color: var(--border-color);
}



.app-shell .combobox-item {
    border-bottom-color: var(--border-color);
}



.app-shell .combobox-item.combobox-heading {
    background: var(--surface-muted);
    color: var(--text-secondary);
}



.app-shell .combobox-item.combobox-item-current-category,
.app-shell .combobox-item.combobox-item-current-payee,
.app-shell .combobox-item.combobox-item-current-selection {
    background: var(--accent-soft);
    border-left-color: var(--accent-primary);
    color: var(--text-primary);
}



.app-shell .client-update-banner {
    background: var(--accent-soft);
    border-top-color: var(--badge-orange);
    color: var(--text-primary);
}



.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}



/* ===== Accounts Payable review surface (Stage 4 Task 5) ===================
   One dialog carries every state of a bill, so it is wider than the default
   modal and its sections are separated by rules rather than by cards — the
   whole point is to read the document against the proposal without scrolling
   past chrome. Every colour and radius below is an existing token. */

.modal-content-wide {
    max-width: 720px;
}



.bill-detail-status {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}



.bill-detail-body[aria-busy="true"] {
    opacity: 0.6;
}



.bill-detail-section {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}



.bill-detail-section:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}



.bill-detail-section h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}



.bill-detail-source-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}



/* The document's own words, labelled as such — never mistaken for the Vendor. */
.bill-detail-snapshot {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}



.bill-detail-warnings {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
    color: var(--badge-orange);
    font-size: 0.85rem;
}



.bill-detail-form {
    margin-top: 1rem;
}



.bill-detail-readonly {
    display: grid;
    grid-template-columns: minmax(7rem, auto) 1fr;
    gap: 0.4rem 1rem;
    margin: 1rem 0 0;
}



.bill-detail-readonly dt {
    color: var(--text-secondary);
    font-size: 0.85rem;
}



.bill-detail-readonly dd {
    margin: 0;
}



.bill-detail-payment-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.35rem;
}



.bill-detail-payment-row:last-child {
    margin-bottom: 0;
    font-weight: 600;
}



.bill-detail-inventory-state {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}



.bill-detail-raw {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}



.bill-detail-raw-text {
    max-height: 16rem;
    overflow: auto;
    margin: 0.5rem 0 0;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
}



.transaction-file-import-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}



.transaction-file-import-controls {
    display: grid;
    grid-template-columns: minmax(16rem, 1.25fr) minmax(14rem, 1fr) minmax(11rem, auto);
    gap: 0.75rem;
    align-items: end;
}



.transaction-file-import-controls .form-group {
    margin-bottom: 0;
}



.transaction-file-import-controls select,
.transaction-file-import-controls input[type='file'],
.transaction-file-import-controls .btn {
    min-height: 3.15rem;
}



.transaction-file-import-controls .btn {
    width: 100%;
    align-self: end;
    white-space: nowrap;
}



.transaction-file-import-panel {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    background: var(--surface-light);
    color: var(--text-secondary);
}



.transaction-file-import-mapping {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}



.transaction-file-import-profile-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}



.transaction-file-import-profile-controls input {
    flex: 1 1 14rem;
    min-height: 2.35rem;
}



.transaction-file-import-map-chip {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}



.transaction-file-import-map-chip select {
    min-width: 8rem;
}



.transaction-file-import-table-scroll {
    max-height: 24rem;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}



.transaction-file-import-table {
    margin: 0;
}



.transaction-file-import-status {
    min-height: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
}



/* ===== FORM GRID (portfolio settings + shared inline forms) =====
   .form-grid previously had NO styles at all: fields rendered at native
   size with default fonts, butted against each other (owner dogfood
   feedback 2026-08-24). Give it a real layout and share .form-group's
   field look (see .form-group input above) instead of inventing one. */
.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}



.form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-grid select {
    flex: 1 1 160px;
    min-width: 0;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
    transition: var(--transition);
}



.form-grid input[type="date"] {
    flex: 0 1 170px;
}



.form-grid input:focus,
.form-grid select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}



.form-grid .btn {
    flex: 0 0 auto;
}



/* Shared flex layout must never override the semantic hidden state. */
.form-grid[hidden] {
    display: none !important;
}
/* ===== List row (design/components.md) ===== */
/*
 * A single row inside a vertical list of records that is not a data-table:
 * title/meta on one side, a status or figure, actions on the other, with a
 * hairline divider between siblings. Promoted on its third occurrence — the
 * shape already exists twice as .bills-suggestion-item and .bills-recurring-item
 * (4-views.css), which Bills' own redesign folds in; Receipts adopts it here.
 */
.list-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
}

.list-row:first-child {
    border-top: none;
    padding-top: 0;
}
