:root {
  --canvas: #f7f7fb; --surface: #fff; --surface-soft: #faf9ff;
  --ink: #171625; --muted: #6f7182; --muted-strong: #555768; --border: #e8e7ef;
  --brand: #6d45df; --brand-dark: #5734c7; --brand-soft: #f0ebff;
  --positive: #079455; --positive-soft: #e9f8f0;
  --negative: #e54861; --negative-soft: #fff0f2;
  --shadow: 0 7px 24px rgba(31, 28, 54, .055); --sidebar-width: 248px; --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 100; transform: translateY(-150%); border-radius: 8px; padding: .65rem .9rem; color: #fff; background: var(--brand); text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.auth-pending .app-shell { visibility: hidden; }
.login-page.auth-pending .v2-login-shell { visibility: hidden; }
.auth-unavailable .app-shell { display: none; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column; border-right: 1px solid var(--border); padding: 1.55rem 1rem 1rem; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: .72rem; padding: 0 .65rem; font-size: 1.08rem; font-weight: 760; letter-spacing: -.025em; }
.brand-mark { position: relative; width: 27px; height: 29px; display: inline-block; flex: 0 0 auto; }
.brand-mark span { position: absolute; left: 0; width: 19px; height: 14px; border-radius: 5px 11px 11px 5px; background: linear-gradient(135deg,#8c62f2,#5b35d4); }
.brand-mark span:first-child { top: 1px; }
.brand-mark span:last-child { bottom: 1px; width: 11px; border-radius: 4px 8px 8px 4px; opacity: .82; }
.main-nav { display: grid; gap: .35rem; margin-top: 2.8rem; }
.nav-item { width: 100%; min-height: 48px; display: flex; align-items: center; gap: .85rem; border: 0; border-radius: 11px; padding: .75rem .85rem; color: #3b3b4d; background: transparent; font-weight: 570; text-decoration: none; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease; }
.nav-item:hover { color: var(--brand); background: #f8f6ff; }
.nav-item.active { color: var(--brand); background: linear-gradient(110deg,#f4f0ff,#eee9fa); font-weight: 680; box-shadow: inset 3px 0 var(--brand); }
.nav-item svg { flex: 0 0 auto; }
.nav-item .soon { margin-left: auto; color: #9a96aa; font-size: .65rem; font-weight: 680; text-transform: uppercase; letter-spacing: .05em; }
.sidebar-footer { display: grid; gap: .65rem; margin-top: auto; border-top: 1px solid var(--border); padding-top: .9rem; }
.sidebar-user { display: flex; align-items: center; gap: .7rem; padding: .35rem .65rem; }
.sidebar-user > span:last-child { min-width: 0; display: grid; gap: .1rem; }
.sidebar-user strong { overflow: hidden; font-size: .87rem; text-overflow: ellipsis; }
.sidebar-user small { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { font-size: .9rem; }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: linear-gradient(145deg,#835ce9,#5e39d0); font-size: .82rem; font-weight: 750; box-shadow: 0 5px 12px rgba(109,69,223,.2); }
.avatar.large { width: 42px; height: 42px; font-size: .95rem; }

.page-column { min-height: 100vh; margin-left: var(--sidebar-width); }
.page-content { width: min(100%,1450px); margin: 0 auto; padding: 2.25rem 2.4rem 3rem; }
.mobile-header { display: none; }
.page-header { min-height: 58px; display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.8rem; }
.page-header h1 { margin: 0; font-size: clamp(1.8rem,2.7vw,2.25rem); letter-spacing: -.045em; line-height: 1.08; }
.eyebrow, .section-kicker { margin: 0 0 .38rem; color: var(--brand); font-size: .69rem; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.page-intro { margin: .52rem 0 0; color: var(--muted); font-size: .93rem; }
.welcome-user { display: flex; align-items: center; gap: .85rem; color: var(--muted-strong); font-size: .9rem; }

.panel, .transaction-summary { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.positive { color: var(--positive) !important; }
.negative { color: var(--negative) !important; }

.dashboard-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.analytics-stack { grid-template-columns: 1fr; }
.panel { min-width: 0; padding: 1.4rem; }
.panel-header { min-height: 39px; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.panel-header h2 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.select-compact select { min-height: 42px; border: 1px solid var(--border); border-radius: 9px; color: var(--ink); background: #fff; }
.select-compact select { padding: 0 .75rem; font-size: .78rem; }
.select-compact select:focus, .transaction-filters select:focus, .transaction-filters input:focus, .edit-form-grid input:focus, .edit-form-grid select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(109,69,223,.22); outline-offset: 2px; border-color: var(--brand); }
.text-link { border: 0; padding: .2rem 0; color: var(--brand); background: transparent; font-size: .78rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.text-link:hover { color: var(--brand-dark); }

.panel-header-actions { display: flex; align-items: center; gap: .85rem; }
.overall-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; margin-top: 1.25rem; border: 1px solid var(--border); border-radius: 12px; background: var(--border); }
.overall-grid > div { min-width: 0; display: grid; gap: .35rem; padding: 1rem; background: #fff; }
.overall-grid span { color: var(--muted); font-size: .68rem; font-weight: 640; letter-spacing: .025em; text-transform: uppercase; }
.overall-grid strong { overflow-wrap: anywhere; font-size: 1.06rem; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.overall-grid small { color: var(--muted); font-size: .66rem; }
.tile-note { display: flex; gap: .4rem; margin: .9rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.tags-section { min-width: 0; padding: .35rem .1rem 0; }
.tag-card-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: .75rem; margin-top: 1.1rem; }
.home-tag-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem; background: linear-gradient(145deg,#fff,#fdfcff); box-shadow: var(--shadow); }
.home-tag-card:hover { border-color: #dcd6ef; box-shadow: 0 10px 26px rgba(31,28,54,.09); }
.home-tag-name { display: flex; align-items: center; gap: .6rem; min-width: 0; font-size: .78rem; font-weight: 640; }
.home-tag-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--tag-color,var(--brand)); box-shadow: 0 0 0 4px color-mix(in srgb,var(--tag-color,var(--brand)) 12%,transparent); }
.tag-color-0 { --tag-color: #6d45df; }
.tag-color-1 { --tag-color: #e54861; }
.tag-color-2 { --tag-color: #f08a57; }
.tag-color-3 { --tag-color: #3685d6; }
.tag-color-4 { --tag-color: #079455; }
.tag-color-5 { --tag-color: #9966cc; }
.tag-color-6 { --tag-color: #7d8799; }
.tag-color-neutral { --tag-color: #9693a2; }
.home-tag-difference { display: grid; gap: .25rem; margin-top: 1.1rem; }
.home-tag-difference span, .tag-card-metrics span { color: var(--muted); font-size: .64rem; font-weight: 630; letter-spacing: .025em; text-transform: uppercase; }
.home-tag-difference strong { font-size: 1.28rem; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.tag-card-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .6rem; margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.tag-card-metrics > div { min-width: 0; display: grid; gap: .25rem; }
.tag-card-metrics strong { overflow-wrap: anywhere; font-size: .76rem; font-variant-numeric: tabular-nums; }

.transaction-page-header { align-items: center; }
.page-actions { display: flex; gap: .65rem; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: 10px; padding: .66rem .9rem; font-size: .8rem; font-weight: 680; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.button svg { width: 1rem; height: 1rem; }
.button:hover { transform: translateY(-1px); }
.primary-button { color: #fff; background: var(--brand); box-shadow: 0 6px 14px rgba(109,69,223,.18); }
.primary-button:hover { background: var(--brand-dark); }
.secondary-button { border-color: var(--border); background: #fff; }
.secondary-button:hover, .ghost-button:hover { background: var(--surface-soft); }
.ghost-button { border-color: var(--border); background: transparent; }
.transaction-summary { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 1rem; }
.transaction-summary > div { display: grid; gap: .38rem; border-right: 1px solid var(--border); padding: 1rem 1.2rem; }
.transaction-summary > div:last-child { border-right: 0; }
.transaction-summary span { color: var(--muted); font-size: .72rem; }
.transaction-summary strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.transaction-summary strong { overflow-wrap: anywhere; line-height: 1.35; }
.transaction-panel { padding: 0; overflow: hidden; }
.transaction-panel > .panel-header { padding: 1.25rem 1.35rem 0; }
.result-label { align-self: center; color: var(--muted); font-size: .75rem; }
.transaction-filters { display: grid; grid-template-columns: minmax(250px,1.5fr) repeat(4,minmax(135px,.75fr)); gap: .65rem; padding: 1.15rem 1.35rem; }
.transaction-filters input, .transaction-filters select, .transaction-filters .button { width: 100%; height: 42px; min-height: 42px; border: 1px solid var(--border); border-radius: 9px; padding-block: 0; font-size: .78rem; line-height: 1.2; }
.transaction-filters input, .transaction-filters select { color: var(--muted-strong); background: #fff; }
.transaction-filters select { padding-inline: .72rem 2rem; }
.search-field { position: relative; height: 42px; }
.search-field svg { position: absolute; top: 50%; left: .72rem; width: 1rem; height: 1rem; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.transaction-filters input { padding-inline: .72rem; }
.transaction-filters .search-field input { padding-inline: 2.2rem .75rem; }
.transaction-filters input::placeholder { color: #9b99a8; }
.transaction-tag-filter { margin: 0 1.35rem 1.15rem; border: 1px solid var(--border); border-radius: 11px; padding: .9rem; background: #fcfbff; }
.tag-filter-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.tag-filter-topline h3 { margin: 0; font-size: .8rem; }
.tag-filter-topline p { margin: .22rem 0 0; color: var(--muted); font-size: .68rem; }
.tag-mode-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; padding: 3px; background: #fff; }
.tag-mode-switch label { cursor: pointer; }
.tag-mode-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tag-mode-switch span { min-height: 30px; display: inline-flex; align-items: center; border-radius: 6px; padding: 0 .7rem; color: var(--muted); font-size: .7rem; font-weight: 650; }
.tag-mode-switch input:checked + span { color: var(--brand); background: var(--brand-soft); }
.tag-mode-switch input:focus-visible + span { outline: 2px solid rgba(109,69,223,.35); outline-offset: 1px; }
.transaction-tag-options { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.filter-tag-chip, .interactive-tag { border: 1px solid var(--border); border-radius: 999px; color: #55486d; background: #fff; font-size: .66rem; font-weight: 630; cursor: pointer; }
.filter-tag-chip { min-height: 30px; padding: .3rem .65rem; }
.filter-tag-chip:hover, .interactive-tag:hover { border-color: #cfc4f1; color: var(--brand); background: var(--brand-soft); }
.filter-tag-chip.active, .interactive-tag.active { border-color: #bcaaf0; color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(109,69,223,.08); }
.data-table-wrap { overflow-x: auto; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.data-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.data-table th, .data-table td { border-bottom: 1px solid var(--border); padding: .78rem .75rem; text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); background: #fbfafd; font-size: .68rem; font-weight: 670; letter-spacing: .025em; text-transform: uppercase; }
.data-table td { font-size: .76rem; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfbff; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.description-cell { display: grid; gap: .17rem; }
.description-cell strong { font-size: .78rem; }
.description-cell small { max-width: 210px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.category-pill, .tag-pill { display: inline-flex; align-items: center; border-radius: 99px; padding: .23rem .48rem; font-size: .66rem; font-weight: 630; white-space: nowrap; }
.category-pill { color: #4f436b; background: #f2eff7; }
.tag-list { display: flex; flex-wrap: wrap; gap: .25rem; }
.tag-pill, .interactive-tag { min-height: 26px; padding: .23rem .48rem; color: var(--brand); background: var(--brand-soft); }
.edit-transaction-button { min-height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: .35rem .65rem; color: var(--brand); background: #fff; font-size: .68rem; font-weight: 670; cursor: pointer; }
.edit-transaction-button:hover { border-color: #cfc4f1; background: var(--brand-soft); }
.empty-table { height: 180px; color: var(--muted); text-align: center !important; }
.table-footer { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1.35rem; color: var(--muted); font-size: .73rem; }
.pagination { display: flex; align-items: center; gap: .6rem; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: #fff; cursor: pointer; }
.icon-button:hover { color: var(--brand); background: var(--brand-soft); }
.icon-button:disabled { opacity: .42; cursor: not-allowed; }
.edit-dialog { width: min(92vw,620px); max-height: min(90vh,760px); margin: auto 0 auto auto; border: 0; border-left: 1px solid var(--border); padding: 0; color: var(--ink); background: #fff; box-shadow: -18px 0 45px rgba(31,28,54,.16); }
.edit-dialog::backdrop { background: rgba(23,22,37,.32); backdrop-filter: blur(2px); }
.edit-transaction-form { min-height: 100%; padding: 1.5rem; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.dialog-header h2 { margin: 0; font-size: 1.25rem; }
.edit-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .9rem; margin-top: 1.2rem; }
.edit-form-grid label { display: grid; gap: .35rem; color: var(--muted-strong); font-size: .72rem; font-weight: 620; }
.edit-form-grid label small { color: var(--muted); font-weight: 470; }
.edit-form-grid input, .edit-form-grid select { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 9px; padding: 0 .72rem; color: var(--ink); background: #fff; }
.edit-form-grid input[type="file"] { height: auto; min-height: 44px; padding: .4rem; }
.edit-form-grid .full-width { grid-column: 1/-1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .65rem; border-top: 1px solid var(--border); margin-top: 1.4rem; padding-top: 1rem; }
.workflow-dialog { width: min(94vw,680px); }
.workflow-dialog .edit-transaction-form { overflow-y: auto; }
.workflow-intro { display: flex; align-items: flex-start; gap: .8rem; border: 1px solid #e2dbf8; border-radius: 11px; margin-top: 1rem; padding: .85rem; background: #f8f5ff; }
.workflow-intro > div { display: grid; gap: .22rem; }
.workflow-intro strong { font-size: .8rem; }
.workflow-intro p, .workflow-placeholder p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.workflow-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: 1.1rem; }
.workflow-placeholder { display: grid; gap: .25rem; border: 1px dashed #d9d5e4; border-radius: 10px; margin-top: 1rem; padding: .85rem; background: #fdfcfe; }
.workflow-placeholder strong { font-size: .76rem; }
.export-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; margin-top: 1rem; background: var(--border); }
.export-summary > div { min-width: 0; display: grid; gap: .3rem; padding: .8rem; background: #fff; }
.export-summary span { color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .03em; }
.export-summary strong { overflow-wrap: anywhere; font-size: .75rem; }
.export-columns { margin-top: 1.1rem; }
.export-columns h3 { margin: 0 0 .55rem; font-size: .78rem; }
.export-columns > div { display: flex; flex-wrap: wrap; gap: .35rem; }
.export-columns > div span { border: 1px solid var(--border); border-radius: 6px; padding: .28rem .45rem; color: #564d69; background: #faf9fc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; }
.export-columns p { margin: .65rem 0 0; color: var(--muted); font-size: .66rem; }
.export-columns code { color: var(--brand); }
.accounts-panel { padding: 0; overflow: hidden; }
.accounts-panel-header { padding: 1.3rem 1.35rem; }
.accounts-table-wrap { border-bottom: 1px solid var(--border); }
.accounts-table { min-width: 820px; }
.account-name-cell { display: flex; align-items: center; gap: .7rem; }
.account-name-cell > span:last-child { display: grid; gap: .14rem; }
.account-name-cell strong { font-size: .79rem; }
.account-name-cell small { color: var(--muted); font-size: .65rem; }
.account-marker { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: .74rem; font-weight: 760; }
.account-type-pill, .account-mode-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .28rem .55rem; font-size: .66rem; font-weight: 650; white-space: nowrap; }
.account-type-pill { color: #504569; background: #f2eff7; }
.account-mode-pill.monetary { color: #087747; background: var(--positive-soft); }
.account-mode-pill.quantity { color: #4366a6; background: #edf3ff; }
.currency-code { font-size: .74rem; letter-spacing: .045em; }
.account-actions-cell { text-align: right !important; }
.account-actions { display: flex; justify-content: flex-end; gap: .35rem; }
.account-action-button { min-height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: .35rem .6rem; color: var(--brand); background: #fff; font-size: .67rem; font-weight: 670; cursor: pointer; }
.account-action-button:hover { border-color: #cfc4f1; background: var(--brand-soft); }
.account-action-button.delete { color: var(--negative); }
.account-action-button.delete:hover { border-color: #f3bdc5; background: var(--negative-soft); }
.form-note { margin: .85rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.form-status { border: 1px solid #ddd6f7; border-radius: 9px; margin: .85rem 0 0; padding: .65rem .75rem; color: #4b3b76; background: #f6f2ff; font-size: .7rem; line-height: 1.45; }
.form-status.error { border-color: #f4c4cb; color: #a6283d; background: var(--negative-soft); }
.error-text { color: var(--negative) !important; }
.muted-text { color: var(--muted); font-size: .68rem; }
.inline-loader { width: 15px; height: 15px; display: inline-block; margin-right: .35rem; border: 2px solid #d8d0f1; border-top-color: var(--brand); border-radius: 50%; vertical-align: -.18rem; animation: spin .75s linear infinite; }
.loading-panel { grid-column: 1/-1; min-height: 110px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); background: rgba(255,255,255,.55); font-size: .75rem; }
.analytics-status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .8rem; color: var(--muted); font-size: .68rem; }
.retry-inline { margin-left: .55rem; }
.import-error-list { max-height: 190px; overflow-y: auto; margin: .7rem 0 0; padding-left: 1.1rem; color: var(--negative); font-size: .67rem; line-height: 1.5; }
.account-detail-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; margin: 1.2rem 0 0; border: 1px solid var(--border); border-radius: 11px; background: var(--border); }
.account-detail-list > div { min-width: 0; display: grid; gap: .34rem; padding: .9rem; background: #fff; }
.account-detail-list dt { color: var(--muted); font-size: .64rem; font-weight: 670; letter-spacing: .035em; text-transform: uppercase; }
.account-detail-list dd { margin: 0; overflow-wrap: anywhere; font-size: .8rem; font-weight: 630; }
.confirm-dialog { width: min(92vw,440px); margin: auto; border: 0; border-radius: 15px; padding: 0; color: var(--ink); background: #fff; box-shadow: 0 24px 70px rgba(31,28,54,.22); }
.confirm-dialog::backdrop { background: rgba(23,22,37,.38); backdrop-filter: blur(2px); }
.confirm-dialog-content { padding: 1.4rem; }
.confirm-dialog-content > div:nth-child(2) { margin-top: .9rem; }
.confirm-dialog h2 { margin: 0; font-size: 1.2rem; }
.confirm-dialog p:not(.section-kicker) { margin: .55rem 0 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.danger-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--negative); background: var(--negative-soft); font-weight: 800; }
.danger-button { border-color: var(--negative); color: #fff; background: var(--negative); }
.danger-button:hover { background: #cf334c; }
.login-page { background: #fff; }
.v2-login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px,.92fr) minmax(440px,1.08fr); }
.login-brand-panel { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; padding: clamp(2rem,5vw,4.5rem); color: #fff; background: linear-gradient(145deg,#251846 0%,#5030aa 56%,#7651df 100%); }
.login-brand-panel::before, .login-brand-panel::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.login-brand-panel::before { top: -160px; right: -130px; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.13); box-shadow: 0 0 0 70px rgba(255,255,255,.025),0 0 0 140px rgba(255,255,255,.018); }
.login-brand-panel::after { right: -80px; bottom: -180px; width: 390px; height: 390px; background: radial-gradient(circle,rgba(255,255,255,.11),transparent 67%); }
.login-brand { position: relative; z-index: 1; padding: 0; color: #fff; }
.login-brand .brand-mark span { background: #fff; }
.login-brand-copy { position: relative; z-index: 1; max-width: 520px; margin: auto 0 2.6rem; }
.login-brand-copy .eyebrow { color: #d9ccff; }
.login-brand-copy h1 { margin: .7rem 0 1.15rem; font-size: clamp(2.45rem,5.2vw,4.5rem); letter-spacing: -.055em; line-height: .98; }
.login-brand-copy > p:last-child { max-width: 510px; margin: 0; color: rgba(255,255,255,.76); font-size: clamp(.9rem,1.4vw,1.05rem); line-height: 1.65; }
.login-feature-list { position: relative; z-index: 1; display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.login-feature-list li { display: flex; align-items: flex-start; gap: .72rem; }
.login-feature-list li > span:first-child { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: rgba(255,255,255,.14); font-size: .68rem; }
.login-feature-list li > span:last-child { display: grid; gap: .14rem; }
.login-feature-list strong { font-size: .78rem; }
.login-feature-list small { color: rgba(255,255,255,.65); font-size: .68rem; line-height: 1.4; }
.login-environment-note { position: relative; z-index: 1; margin: 2.4rem 0 0; color: rgba(255,255,255,.55); font-size: .66rem; }
.login-form-panel { display: grid; place-items: center; min-height: 100vh; padding: 2rem; background: var(--canvas); }
.login-form-wrap { width: min(100%,430px); }
.login-mobile-brand { display: none; }
.login-form-wrap > h2 { margin: 0; font-size: clamp(1.65rem,3vw,2rem); letter-spacing: -.04em; }
.login-intro { margin: .65rem 0 1.7rem; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.v2-login-form { display: grid; gap: 1rem; }
.login-field { display: grid; gap: .42rem; }
.v2-login-form label { color: var(--muted-strong); font-size: .73rem; font-weight: 650; }
.v2-login-form input { width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 10px; padding: 0 .8rem; color: var(--ink); background: #fff; }
.v2-login-form input:focus { outline: 3px solid rgba(109,69,223,.22); outline-offset: 2px; border-color: var(--brand); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 4.2rem; }
.password-field button { position: absolute; top: 50%; right: .45rem; min-width: 3.2rem; min-height: 34px; transform: translateY(-50%); border: 0; border-radius: 7px; color: var(--brand); background: transparent; font-size: .69rem; font-weight: 700; cursor: pointer; }
.password-field button:hover { background: var(--brand-soft); }
.login-submit { width: 100%; min-height: 46px; margin-top: .25rem; }
.login-submit:disabled, .password-field button:disabled { opacity: .62; cursor: wait; }
.login-notice { border: 1px solid #ddd6f7; border-radius: 9px; margin: 0 0 1rem; padding: .72rem .8rem; color: #4b3b76; background: #f6f2ff; font-size: .72rem; line-height: 1.45; }
.login-notice.error { border-color: #f4c4cb; color: #a6283d; background: var(--negative-soft); }
.login-notice.success { border-color: #b9e5ce; color: #087747; background: var(--positive-soft); }
.login-help { margin: 1.35rem 0 0; color: var(--muted); font-size: .7rem; text-align: center; }
.session-error { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--canvas); }
.session-error-card { width: min(100%,480px); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: #fff; box-shadow: var(--shadow); }
.session-error-card h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.session-error-card > p { margin: .65rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.sidebar-backdrop { display: none; }
.toast { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 80; max-width: min(390px,calc(100vw - 2rem)); border: 1px solid #ddd6f7; border-radius: 11px; padding: .8rem 1rem; color: #3f3262; background: #f7f3ff; box-shadow: 0 14px 35px rgba(38,28,70,.16); font-size: .8rem; animation: toast-in .2s ease-out; }
.toast[hidden] { display: none; }

@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1180px) { .transaction-filters { grid-template-columns: repeat(2,1fr); } .search-field { grid-column: 1/-1; } }
@media (max-width: 900px) {
  .v2-login-shell { grid-template-columns: minmax(300px,.8fr) minmax(390px,1.2fr); }
  .login-brand-panel { padding: 2rem; }
  .sidebar { transform: translateX(-102%); box-shadow: 18px 0 45px rgba(31,28,54,.13); transition: transform .22s ease; }
  body.nav-open { overflow: hidden; } body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 20; display: block; background: rgba(23,22,37,.32); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  body.nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .page-column { margin-left: 0; }
  .mobile-header { position: sticky; top: 0; z-index: 15; height: 64px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 0 1rem; background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
  .brand.compact { padding: 0; font-size: .95rem; } .brand.compact .brand-mark { transform: scale(.78); }
  .welcome-user { display: none; } .page-content { padding: 1.5rem 1.1rem 2.5rem; }
}
@media (max-width: 680px) {
  .v2-login-shell { display: block; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 1.4rem; }
  .login-mobile-brand { display: flex; margin-bottom: 3.2rem; padding: 0; }
  .page-header, .transaction-page-header { align-items: stretch; flex-direction: column; margin-bottom: 1.25rem; }
  .page-actions > * { flex: 1; } .panel { padding: 1rem; }
  .transaction-summary { grid-template-columns: repeat(2,1fr); } .transaction-summary > div:nth-child(2) { border-right: 0; } .transaction-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .transaction-filters { grid-template-columns: 1fr; padding: 1rem; } .search-field { grid-column: auto; } .transaction-panel > .panel-header { padding: 1rem 1rem 0; } .transaction-tag-filter { margin: 0 1rem 1rem; } .tag-filter-topline { flex-direction: column; } .edit-form-grid { grid-template-columns: 1fr; } .edit-form-grid .full-width { grid-column: auto; } .export-summary { grid-template-columns: 1fr; }
  .table-title-row { align-items: flex-start; flex-direction: column; } .table-footer { align-items: flex-start; flex-direction: column; } .pagination { width: 100%; justify-content: space-between; } .account-detail-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .panel-header-actions { align-items: flex-end; flex-direction: column; gap: .35rem; } .tag-card-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
