.review-card { border-top: 3px solid var(--forest); margin-bottom: 1rem; }
.review-card h2 { font-size: 1.45rem; }
.review-grid { margin-top: 1rem; align-items: center; }
.review-actions, .list-toolbar { display: flex; gap: .75rem; align-items: center; }
.review-actions { margin-top: 1rem; }
.list-toolbar { justify-content: flex-end; margin-bottom: .75rem; }
.list-toolbar label { display: flex; gap: .5rem; align-items: center; }
.list-toolbar select, .review-card input, .table-panel select, .table-panel input { border: 1px solid #bccbc5; border-radius: 8px; padding: .55rem; }
.starting-balance-editor { display:flex; flex-direction:column; align-items:flex-start; gap:.35rem; margin-top:.65rem; max-width:10rem; }
.starting-balance-editor label { color:var(--muted); font-size:.72rem; font-weight:700; }
.starting-balance-editor input { width:100%; padding:.35rem .45rem; }
.starting-balance-editor .btn { padding:.22rem .55rem; font-size:.78rem; }
.hidden-row { opacity: .62; background: #f1f3f2; }
.error-text { color: #a12d2d !important; }
@media (max-width: 600px) { .review-actions, .list-toolbar { align-items: stretch; flex-direction: column; } }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.9rem 1rem; margin:1rem 0; }
.form-grid label, .panel > label { display:flex; flex-direction:column; gap:.35rem; }
.form-grid input, .form-grid select, .panel textarea, .panel > label select { border:1px solid #bccbc5; border-radius:8px; padding:.65rem; width:100%; }
.inline-editor { display:flex; gap:.4rem; flex-wrap:wrap; }
.inline-editor input { width:8rem; }
.notice-success { background:#dcefe7; border:1px solid #9bcdbb; border-radius:8px; padding:.75rem; }
.advisor-item { border-bottom:1px solid #d8e0dd; padding:.9rem 0; }
.advisor-item h3 { margin:.35rem 0; }
.advisor-item p { margin:.25rem 0; }
.advisor-note { background:#f2eee2; border-radius:8px; padding:.75rem; }
.letter-draft { white-space:pre-wrap; font:inherit; background:#f5f7f6; padding:1rem; border-radius:8px; }
details { border-bottom:1px solid #d8e0dd; padding:.75rem 0; }
@media (max-width: 800px) { .form-grid { grid-template-columns:1fr; } }
.advisor-ask { display:flex; gap:.75rem; }
.advisor-ask input { flex:1; border:1px solid #bccbc5; border-radius:8px; padding:.8rem; }
.advisor-answer { margin-top:1rem; padding:1rem; border-radius:10px; background:#eef5f2; }
.connection-action { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1.25rem; align-items:center; padding:1rem 0; border-bottom:1px solid var(--border); }
.connection-copy { display:flex; flex-direction:column; gap:.35rem; min-width:0; }
.connection-copy small { color:var(--muted); line-height:1.45; }
.connection-controls { display:flex; align-items:center; gap:.65rem; white-space:nowrap; }
.status-row { gap:1rem; }
.status-row > span { min-width:0; }
.status-row span small { display:block; color:var(--muted); line-height:1.4; margin-top:.25rem; }
.panel-title { gap:1rem; }
.panel-title > div { min-width:0; }
.panel-title > a { white-space:nowrap; align-self:flex-start; }
@media (max-width:700px) { .connection-action { grid-template-columns:1fr; } .connection-controls { white-space:normal; flex-wrap:wrap; } }
.sync-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.sync-status-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d9e1dd;
    border-radius: 0.65rem;
    background: #f8faf9;
}

.sync-progress {
    border-left: 4px solid #3d6be8;
    margin-bottom: 1rem;
}

.sync-progress-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.sync-progress-heading p {
    color: var(--muted);
    margin-bottom: .5rem;
}

.sync-progress progress {
    display: block;
    width: 100%;
    height: .65rem;
    margin: .75rem 0 1rem;
    accent-color: #3d6be8;
}

.sync-pulse {
    background: #e7edff;
    color: #27499e;
    border-radius: 999px;
    padding: .4rem .75rem;
    font-weight: 700;
    animation: sync-pulse 1.25s ease-in-out infinite alternate;
}

.sync-progress-sources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem;
    margin-bottom: .75rem;
}

.sync-progress-sources > div {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    background: #f5f7ff;
    border: 1px solid #d8e0fb;
    border-radius: 10px;
    padding: .8rem;
}

.sync-progress-sources small,
.sync-progress > small {
    color: var(--muted);
}

@keyframes sync-pulse {
    from { opacity: .55; }
    to { opacity: 1; }
}

.sync-status-grid span {
    font-size: 1.05rem;
}

.accounts-panel {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-gutter: stable;
}

.accounts-panel table {
    width: 100%;
    min-width: 1400px;
    table-layout: fixed;
}

.accounts-panel th,
.accounts-panel td {
    box-sizing: border-box;
    min-width: 0;
    padding: .8rem .55rem;
    vertical-align: top;
    overflow-wrap: break-word;
}

.accounts-panel th:nth-child(1), .accounts-panel td:nth-child(1) { width: 12.5%; }
.accounts-panel th:nth-child(2), .accounts-panel td:nth-child(2) { width: 9.5%; }
.accounts-panel th:nth-child(3), .accounts-panel td:nth-child(3) { width: 6%; }
.accounts-panel th:nth-child(4), .accounts-panel td:nth-child(4) { width: 14%; }
.accounts-panel th:nth-child(5), .accounts-panel td:nth-child(5) { width: 12%; }
.accounts-panel th:nth-child(6), .accounts-panel td:nth-child(6) { width: 7%; }
.accounts-panel th:nth-child(7), .accounts-panel td:nth-child(7) { width: 8%; }
.accounts-panel th:nth-child(8), .accounts-panel td:nth-child(8) { width: 10.5%; }
.accounts-panel th:nth-child(9), .accounts-panel td:nth-child(9) { width: 20.5%; }

.accounts-panel td:nth-child(4) select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.accounts-panel td:nth-child(4) small,
.accounts-panel td:nth-child(5) strong,
.accounts-panel td:nth-child(5) small {
    overflow-wrap: anywhere;
}

.account-controls-cell {
    min-width: 280px;
}

.account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(125px, 1fr));
    gap: .45rem;
    align-content: start;
    margin: 0;
    white-space: normal;
}

.account-actions button,
.account-actions .btn {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: .45rem .55rem;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: center;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.dashboard-section { margin-bottom: 1rem; }
.dashboard-section .panel-title p { margin: .3rem 0 0; color: var(--muted); }
.value-overview-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
}
.value-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: .8rem;
}
.value-summary-grid .metric { min-height: 132px; }
.value-summary-grid .metric strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(1.55rem, 1.7vw, 2rem);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.value-metric { border-top: 5px solid var(--series-color); }
.value-metric.net-worth { border-top: 5px solid #1d3b70; background: #f5f8ff; }
.value-metric.debt strong { color: #b4233d; }
.metric[href] { color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.metric[href]:hover, .metric[href]:focus-visible { color: inherit; text-decoration: none; transform: translateY(-2px); box-shadow: 0 9px 24px rgba(27,54,46,.10); }
.report-range-panel { display:grid; grid-template-columns:minmax(260px,1fr) repeat(2,minmax(150px,210px)) auto; gap:1rem; align-items:end; margin-bottom:1rem; }
.report-range-panel label { display:flex; flex-direction:column; gap:.4rem; color:var(--muted); }
.report-range-panel input { border:1px solid #bccbc5; border-radius:8px; padding:.65rem; background:#fff; }
.account-inventory-grid, .spending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .8rem;
    margin-top: 1rem;
}
.inventory-card, .spending-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8faf9;
    color: var(--ink);
    text-decoration: none;
}
.spending-card { border-left: 5px solid var(--series-color); }
.inventory-card:hover, .spending-card:hover { border-color: var(--forest); background: #f1f7f4; }
.inventory-card > span, .spending-card > span { color: var(--muted); font-size: .86rem; }
.spending-card > span { display:flex; align-items:center; gap:.45rem; }
.series-swatch { width:.75rem; height:.75rem; border-radius:3px; flex:0 0 auto; background:var(--series-color); }
.inventory-card > strong { font-size: 1.8rem; }
.inventory-card small { display: block; color: var(--muted); line-height: 1.35; }
.inventory-card small b { color: var(--ink); }
.inventory-card small em { color: #8b5b1e; font-style: normal; }
.spending-card > strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.spending-card small { color: var(--muted); }
.report-grid { margin-bottom: 1rem; }
.timeline-list { margin-top: .6rem; }
.timeline-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .85rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    text-decoration: none;
}
.timeline-list a:hover strong { text-decoration: underline; }
.timeline-list span { display: flex; flex-direction: column; min-width: 0; }
.timeline-list small { color: var(--muted); }
.timeline-list b { white-space: nowrap; }
.action-center { border-top:3px solid #b75b45; margin:1rem 0; }
.site-table-panel { overflow-x:auto; }
.site-table { min-width:1180px; table-layout:fixed; }
.site-table th:nth-child(1) { width:27%; }
.site-table th:nth-child(2) { width:11%; }
.site-table th:nth-child(3) { width:10%; }
.site-table th:nth-child(4) { width:12%; }
.site-table th:nth-child(5) { width:13%; }
.site-table th:nth-child(6) { width:27%; }
.site-table td { vertical-align:top; border-bottom:1px solid var(--border); }
.site-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.4rem; margin-top:0; }
.site-actions button { min-width:0; width:100%; white-space:normal; }
.report-metric { color:var(--ink); text-decoration:none; }
.report-metric:hover { border-color:var(--forest); background:#f8fbfa; }
.report-section { margin-bottom:1rem; scroll-margin-top:1rem; }
.report-section tfoot th { font-size:.9rem; color:var(--ink); }
.property-grid { display:grid; gap:1rem; margin:1rem 0; }
.property-card { overflow-x:auto; }
.property-card table { min-width:760px; }
.property-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:.75rem; margin:1rem 0; }
.property-facts div { padding:.75rem; border:1px solid var(--border); border-radius:.65rem; background:#f8fbfa; }
.property-facts dt { color:var(--muted); font-size:.82rem; }
.property-facts dd { margin:.25rem 0 0; font-size:1.1rem; font-weight:700; }
.property-facts dd small { display:block; margin-top:.25rem; color:var(--muted); font-size:.75rem; font-weight:400; }
.value-action { padding:0; border:0; background:transparent; color:var(--link); font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; }
.report-range-controls { display:flex; flex-wrap:wrap; align-items:end; gap:.65rem; }
.report-range-controls label { display:flex; flex-direction:column; gap:.3rem; color:var(--muted); font-size:.82rem; }
.report-range-controls input { min-width:145px; }
.merchant-report-controls { justify-content:flex-end; }
.merchant-report-controls select { min-width:190px; border:1px solid #bccbc5; border-radius:8px; padding:.55rem; background:#fff; }
.merchant-report-controls a { align-self:flex-end; white-space:nowrap; padding-bottom:.55rem; }
.multi-filter { flex:1 1 100%; border:1px solid var(--border); border-radius:.65rem; background:#f8fbfa; }
.multi-filter summary { display:flex; justify-content:space-between; gap:1rem; padding:.7rem .85rem; cursor:pointer; color:var(--ink); }
.multi-filter summary span { color:var(--muted); font-size:.85rem; }
.multi-filter-actions { display:flex; gap:.45rem; padding:0 .85rem .6rem; }
.multi-filter-actions button { padding:.35rem .65rem; }
.multi-filter-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:.4rem .8rem; max-height:220px; overflow:auto; padding:.15rem .85rem .85rem; }
.multi-filter-options label { display:grid; grid-template-columns:auto 1fr; align-items:center; min-width:0; gap:.45rem; padding:.3rem; color:var(--ink); }
.multi-filter-options label small { grid-column:2; color:var(--muted); }
.category-options { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }
.ledger-pie-panel { margin-bottom:1rem; }
.pie-legend-row { display:grid; grid-template-columns:14px minmax(0,1fr) auto auto; gap:.55rem; align-items:center; padding:.55rem; color:var(--ink); border-bottom:1px solid var(--border); text-decoration:none; }
.pie-legend-row:hover, .pie-legend-row:focus-visible { background:#f2f7f5; text-decoration:underline; }
.property-net-worth-title { margin-top:1.5rem; }
.category-report-layout { display:grid; grid-template-columns:minmax(240px,340px) 1fr; gap:2rem; align-items:center; margin:1.25rem 0 1.5rem; }
.category-pie { width:min(100%,320px); aspect-ratio:1; border-radius:50%; display:grid; place-items:center; box-shadow:inset 0 0 0 1px rgba(23,35,41,.08); }
.category-pie > div { width:52%; aspect-ratio:1; border-radius:50%; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; box-shadow:0 2px 12px rgba(23,35,41,.12); }
.category-pie strong { font-size:1.35rem; }
.category-pie span { color:var(--muted); font-size:.78rem; }
.pie-legend { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem 1rem; }
.pie-legend a { display:grid; grid-template-columns:14px minmax(0,1fr) auto auto; gap:.55rem; align-items:center; padding:.55rem; color:var(--ink); text-decoration:none; border-bottom:1px solid var(--border); }
.pie-legend a:hover { background:#f4f8f6; }
.pie-legend small { color:var(--muted); min-width:3.2rem; text-align:right; }
.pie-key { width:12px; height:12px; border-radius:3px; }
.embedded-table { box-shadow:none; border:0; padding:0; }
.activity-chart-list { display:grid; gap:1rem; margin-top:1rem; }
.account-activity-chart { border:1px solid var(--border); border-radius:12px; padding:1rem; background:#fbfcfc; }
.activity-chart-heading { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.activity-chart-heading > div:first-child { display:flex; flex-direction:column; }
.activity-chart-heading small { color:var(--muted); }
.activity-summary { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.5rem 1.1rem; font-size:.82rem; color:var(--muted); }
.activity-summary strong { color:var(--ink); margin-left:.25rem; }
.monthly-bars { display:grid; grid-template-columns:repeat(auto-fit,minmax(52px,1fr)); gap:.35rem; align-items:end; min-height:125px; margin-top:1rem; border-bottom:1px solid #aebdb7; overflow-x:auto; }
.month-column { min-width:42px; height:118px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; color:var(--muted); text-decoration:none; }
.monthly-bar { display:block; width:min(30px,72%); min-height:2px; background:#4f897d; border-radius:5px 5px 0 0; transition:filter .15s; }
.month-column:hover .monthly-bar { filter:brightness(.85); }
.month-column.peak .monthly-bar { background:var(--amber); }
.bar-value { min-height:1rem; font-size:.68rem; color:var(--ink); white-space:nowrap; }
.month-label { margin:.25rem 0 .35rem; font-size:.7rem; text-transform:uppercase; }
.report-filter-banner { display:flex; justify-content:space-between; gap:1rem; }
@media (max-width: 700px) {
    body.mobile-nav-lock { overflow:hidden; }
    .account-inventory-grid, .spending-grid { grid-template-columns: 1fr; }
    .value-overview-layout { grid-template-columns:1fr; }
    .value-pie { margin:auto; }
    .value-summary-grid { grid-template-columns:1fr; }
    .timeline-list a { align-items: flex-start; flex-direction: column; }
    .category-report-layout { grid-template-columns:1fr; }
    .category-pie { margin:auto; }
    .pie-legend { grid-template-columns:1fr; }
    .activity-chart-heading { flex-direction:column; }
    .activity-summary { justify-content:flex-start; }
    .report-range-panel { grid-template-columns:1fr; }
}

.workspace-search { display:flex; align-items:center; gap:.45rem; min-width:0; flex:1 1 auto; }
.workspace-search input { width:min(22vw,320px); border:1px solid var(--border); border-radius:8px; padding:.45rem .6rem; }
.workspace-search select { max-width:190px; border:1px solid var(--border); border-radius:8px; padding:.45rem .5rem; background:#fff; }
.workspace-search button { padding:.42rem .7rem; }
.workspace-search .account-picker { position:relative; flex:0 0 auto; }
.workspace-search .account-picker > summary { min-width:110px; cursor:pointer; list-style:none; border:1px solid var(--border); border-radius:8px; padding:.45rem .65rem; background:#fff; }
.workspace-search .account-picker > summary::-webkit-details-marker { display:none; }
.workspace-search .account-picker > summary::after { content:"▾"; float:right; margin-left:.75rem; }
.workspace-search .account-picker[open] > summary::after { content:"▴"; }
.workspace-search .account-picker-menu { position:absolute; right:0; top:calc(100% + .35rem); z-index:120; width:min(420px,80vw); max-height:60vh; overflow:auto; display:flex; flex-direction:column; gap:.45rem; padding:.8rem; border:1px solid var(--border); border-radius:10px; background:#fff; box-shadow:0 12px 28px rgba(15,35,31,.18); }
.workspace-search .account-picker-menu > span { color:var(--muted); font-size:.82rem; }
.workspace-search .account-picker-menu label { display:grid; grid-template-columns:auto 1fr; gap:.5rem; align-items:start; cursor:pointer; }
.workspace-search .account-picker-menu input { width:auto; margin-top:.2rem; }
@media (max-width:900px) { .environment-label, .signed-in-user { display:none; } .workspace-search input { width:38vw; } }

.search-filter-grid { display:grid; grid-template-columns:minmax(260px,2fr) minmax(260px,1.5fr) minmax(150px,.7fr) minmax(150px,.7fr) auto; gap:.75rem; align-items:end; }
.search-filter-grid label { display:flex; flex-direction:column; gap:.35rem; }
.search-filter-grid input,.search-filter-grid select { width:100%; border:1px solid var(--border); border-radius:8px; padding:.58rem .65rem; background:#fff; }
.search-filter-grid button { min-height:42px; }
.search-account-selection { display:flex; flex-direction:column; gap:.35rem; min-width:0; }
.search-account-selection details { border:1px solid var(--border); border-radius:8px; background:#fff; }
.search-account-selection summary { cursor:pointer; padding:.58rem .65rem; font-weight:600; }
.search-account-list { max-height:300px; overflow:auto; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem .8rem; padding:.25rem .75rem .75rem; }
.search-account-list label { display:grid; grid-template-columns:auto 1fr; align-items:start; gap:.45rem; }
.search-account-list input { width:auto; margin-top:.2rem; }
.search-account-actions { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:.45rem; padding:.2rem 0 .35rem; }
.search-account-actions button { min-height:auto; padding:.35rem .55rem; }
.filter-help { color:var(--muted); margin:.85rem 0 0; font-size:.88rem; }
@media (max-width:1100px) { .search-filter-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:700px) { .search-account-list { grid-template-columns:1fr; } }
