@charset "UTF-8";
.finance-modal > form {
  display: contents;
}
[hidden] {
  display: none !important;
}
.category-inline {
  max-width: 158px;
  font-size: 9px;
  padding: 4px 19px 4px 7px;
  min-height: 25px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}
.category-inline.uncategorized {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: transparent;
}
.category-inline:focus {
  border-color: var(--primary);
}
.row-badge.possible {
  background: var(--amber-soft);
  color: var(--amber);
}
:root {
  --bg: #f6f8fa;
  --surface: #fff;
  --surface-soft: #f9fafb;
  --ink: #172b36;
  --muted: #6c7c88;
  --border: #e5eaee;
  --primary: #0c8173;
  --primary-hover: #08695e;
  --primary-soft: #e9f5f1;
  --navy: #15343a;
  --red: #ca5262;
  --red-soft: #fcf0f1;
  --amber: #b88425;
  --amber-soft: #fff7e6;
  --blue: #628abb;
  --shadow: 0 3px 18px rgba(24, 44, 56, 0.025);
  --radius: 13px;
  --sidebar: 238px;
  --body-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-body-font-family: var(--body-font);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
  --bs-primary: #0c8173;
  --bs-link-color: var(--primary);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--ink);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #4bb5a8 !important;
  outline-offset: 3px;
  box-shadow: none !important;
}
::selection {
  background: #bfe6df;
}
.icon {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  stroke-width: 1.7;
  fill: none;
  flex-shrink: 0;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  background: var(--primary);
  color: white;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.initial-loading {
  height: 100vh;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
}
.brand-mark {
  display: inline-flex;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -3px;
  position: relative;
  padding-right: 4px;
}
.brand-mark span {
  font-size: 17px;
  margin-left: 0;
  margin-top: -13px;
}
.loading-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.workspace {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 29px 17px 17px;
  z-index: 100;
  transition: transform 0.2s;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.7px;
  color: var(--ink);
  margin-bottom: 31px;
}
.brand small {
  font-size: 9px;
  font-weight: 650;
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 2px;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.nav-section-label {
  font-size: 9px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 700;
  color: #97a2ac;
  padding: 0 15px;
  margin: 16px 0 8px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 540;
  color: #71808b;
  min-height: 39px;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-item:hover {
  background: var(--surface-soft);
  color: var(--ink);
}
.nav-item.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 650;
}
.nav-item.active:after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  margin-left: auto;
}
.nav-item .icon {
  width: 17px;
  height: 17px;
}
.nav-count {
  margin-left: auto;
  background: var(--surface-soft);
  font-size: 10px;
  padding: 0 5px;
  border-radius: 4px;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 19px;
}
.local-badge {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px 12px;
  margin: 14px 3px 0;
}
.local-badge > .icon {
  width: 16px;
  color: var(--primary);
  margin-top: 1px;
}
.local-badge strong {
  display: block;
  font-weight: 600;
  font-size: 11px;
}
.local-badge p {
  font-size: 10px;
  color: var(--muted);
  margin: 3px 0 0;
  line-height: 1.6;
}
.main-shell {
  margin-left: var(--sidebar);
}
.topbar {
  height: 79px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 35px;
  gap: 24px;
}
.book-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.book-avatar {
  height: 34px;
  width: 34px;
  background: #e9f1eb;
  border: 1px solid #dce7de;
  color: var(--primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 650;
}
.book-select {
  border: 0 !important;
  padding: 2px 22px 1px 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  background: transparent;
  max-width: 180px;
  cursor: pointer;
}
.book-select-wrap small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  line-height: 1.1;
  letter-spacing: 0.1px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}
.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 11px;
  color: var(--muted);
  max-width: 270px;
}
.global-search input {
  background: transparent;
  border: 0;
  width: 165px;
  outline: none;
  font-size: 11px;
  color: var(--ink);
}
.global-search .icon {
  width: 15px;
}
.shortcut {
  font-size: 9px;
  border: 1px solid var(--border);
  padding: 0px 4px;
  border-radius: 3px;
  background: var(--surface);
  white-space: nowrap;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px;
  border-radius: 7px;
  position: relative;
  min-height: 34px;
  min-width: 34px;
}
.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-soft);
}
.notification-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cc8c54;
  border: 1px solid var(--surface);
}
.topbar-divider {
  height: 25px;
  width: 1px;
  background: var(--border);
  margin: 0 3px;
}
.avatar {
  width: 33px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eee6d9;
  font-size: 11px;
  color: #75634c;
  border: 2px solid var(--surface);
  font-weight: 650;
}
.user-button {
  display: flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 11px;
  padding: 0;
}
.user-button small {
  font-weight: 400;
  color: var(--muted);
  display: block;
  text-align: left;
  font-size: 9px;
}
.page-content {
  max-width: 1670px;
  margin: auto;
  padding: 30px 35px 24px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 5px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 18px;
}
.page-heading h1 {
  font-size: 25px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.9px;
  margin: 0;
}
.page-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.btn {
  border-radius: 7px;
  font-size: 11px;
  font-weight: 550;
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 35px;
  white-space: nowrap;
  transition:
    background 0.15s,
    border 0.15s;
}
.btn .icon {
  width: 15px;
  height: 15px;
}
.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-hover);
  --bs-btn-hover-border-color: var(--primary-hover);
  --bs-btn-active-bg: var(--primary-hover);
  --bs-btn-active-border-color: var(--primary-hover);
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
  color: #fff;
}
.btn-light {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}
.btn-light:hover {
  background: var(--surface-soft);
  border-color: #bcc9d0;
  color: var(--ink);
}
.btn-subtle {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid transparent;
}
.btn-subtle:hover {
  background: #dceddf;
  color: var(--primary-hover);
}
.btn-danger-soft {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #f1d6da;
}
.btn-xs {
  font-size: 10px;
  padding: 5px 8px;
  min-height: 28px;
}
.btn-link {
  color: var(--primary);
  text-decoration: none;
  padding: 0;
  min-height: 25px;
}
.period-select {
  border: 0;
  font-size: 11px;
  color: var(--ink);
  background: transparent;
  font-weight: 550;
  cursor: pointer;
  padding: 0 20px 0 0;
}
.date-filter {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  gap: 8px;
  padding: 7px 11px;
}
.date-filter .icon {
  width: 14px;
  color: var(--muted);
}
.period-label {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 17px;
}
.period-label .dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: var(--primary);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 21px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 19px 20px 16px;
  min-height: 137px;
  position: relative;
  box-shadow: var(--shadow);
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  gap: 7px;
}
.stat-icon {
  width: 30px;
  height: 30px;
  background: var(--primary-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.stat-icon .icon {
  width: 16px;
  height: 16px;
}
.stat-card.expense .stat-icon {
  color: var(--red);
  background: var(--red-soft);
}
.stat-card.net .stat-icon {
  color: #6186af;
  background: #eef3fa;
}
.stat-card.balance {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.stat-card.balance .stat-label {
  color: #c3d3d5;
}
.stat-card.balance .stat-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #aedbcf;
}
.stat-value {
  font-weight: 650;
  font-size: 27px;
  letter-spacing: -1.1px;
  margin-top: 9px;
  line-height: 1.3;
  white-space: nowrap;
}
.stat-note {
  font-size: 9px;
  color: var(--muted);
  margin-top: 9px;
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.stat-note .icon {
  width: 12px;
  height: 12px;
}
.stat-note.positive {
  color: var(--primary);
}
.stat-card.balance .stat-note {
  color: #acc4c5;
}
.stat-note .subtle {
  color: var(--muted);
  margin-left: 1px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel-header {
  padding: 21px 22px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.panel-title {
  font-size: 13px;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.2px;
}
.panel-subtitle {
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0 0;
}
.panel-body {
  padding: 0 22px 21px;
}
.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(270px, 1fr);
  gap: 21px;
  margin-bottom: 21px;
}
.chart-holder {
  height: 236px;
  position: relative;
}
.chart-holder canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 9px;
  color: var(--muted);
}
.legend-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 5px;
}
.legend-dot.green {
  background: var(--primary);
}
.legend-dot.blue {
  background: #a9c5d4;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.segment-control {
  display: flex;
  padding: 3px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.segment-control button {
  padding: 3px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  border-radius: 4px;
}
.segment-control .active {
  background: var(--surface);
  box-shadow: 0 1px 3px #0000000b;
  color: var(--ink);
}
.donut-holder {
  position: relative;
  height: 165px;
  max-width: 210px;
  margin: 0 auto 18px;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-center strong {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.donut-center span {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.category-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 14px;
}
.category-legend-item {
  font-size: 9px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.category-legend-item .legend-dot {
  margin: 0;
  flex-shrink: 0;
}
.category-legend-item strong {
  margin-left: auto;
  color: var(--ink);
  font-weight: 550;
}
.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(270px, 1fr);
  gap: 21px;
  margin-bottom: 21px;
}
.transaction-table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
  text-align: left;
}
.transaction-table th {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  font-weight: 550;
  color: var(--muted);
  background: var(--surface-soft);
  padding: 10px 17px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.transaction-table td {
  padding: 13px 17px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
.transaction-table tr:last-child td {
  border-bottom: 0;
}
.transaction-table tbody tr[data-tx] {
  cursor: pointer;
}
.transaction-table tbody tr[data-tx]:hover {
  background: var(--surface-soft);
}
.transaction-table .amount {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.15px;
}
.vendor-statement-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
  text-align: left;
}
.vendor-statement-table th {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  padding: 10px 13px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.vendor-statement-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}
.vendor-statement-table tr:hover td {
  background: var(--surface-soft);
}
.vendor-statement-table tr:last-child td {
  border-bottom: 0;
}
.vendor-statement-table .cell-date {
  width: 88px;
  font-size: 11.5px;
  white-space: nowrap;
  color: var(--ink);
}
.vendor-statement-table .cell-account {
  width: 155px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vendor-statement-table .cell-desc {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  line-height: 1.42;
  font-size: 11px;
  color: var(--ink);
}
.vendor-statement-table .cell-ref {
  width: 130px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono, monospace);
}
.vendor-statement-table .cell-amount {
  width: 115px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.debit {
  color: var(--ink);
}
.credit {
  color: var(--primary);
}
.merchant-cell {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 140px;
}
.merchant-logo {
  height: 32px;
  width: 32px;
  border-radius: 9px;
  background: #f0f3f4;
  color: #6f828a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
}
.merchant-logo .icon {
  height: 15px;
  width: 15px;
}
.merchant-info {
  max-width: 230px;
  overflow: hidden;
}
.merchant-info strong {
  display: block;
  font-weight: 550;
  font-size: 11px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.merchant-info small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.category-pill {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--border);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-pill.uncategorized {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: transparent;
}
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  gap: 10px;
}
.account-mini {
  padding: 12px 22px;
  display: flex;
  gap: 11px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.account-mini:last-child {
  border-bottom: 0;
}
.account-mark {
  width: 33px;
  height: 33px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 750;
  color: var(--primary);
}
.account-mini h3 {
  font-size: 10px;
  font-weight: 550;
  margin: 0;
}
.account-mini p {
  font-size: 9px;
  color: var(--muted);
  margin: 2px 0 0;
}
.account-mini strong {
  font-size: 12px;
  font-weight: 650;
  margin-left: auto;
}
.account-total {
  margin: 8px 22px 18px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}
.account-total strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 21px;
}
.mini-metric {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mini-metric > .icon {
  width: 20px;
  color: var(--primary);
}
.mini-metric strong {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.5px;
  display: block;
}
.mini-metric span {
  font-size: 9px;
  color: var(--muted);
}
.insight-strip {
  border: 1px solid #dbeae4;
  background: #f0f7f2;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 21px;
}
.insight-strip > .icon {
  color: var(--primary);
  width: 20px;
  flex-shrink: 0;
}
.insight-strip h3 {
  font-size: 11px;
  font-weight: 650;
  margin: 0;
}
.insight-strip p {
  font-size: 10px;
  color: #6f847a;
  margin: 3px 0 0;
}
.insight-strip .btn {
  margin-left: auto;
}
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #98a4ad;
  font-size: 9px;
  padding-top: 8px;
  gap: 15px;
}
.page-footer .icon {
  height: 11px;
  width: 11px;
  margin-right: 4px;
}
.empty-state {
  text-align: center;
  padding: 42px 20px;
  color: var(--muted);
  font-size: 11px;
}
.empty-state.compact {
  padding: 25px 15px;
}
.empty-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--primary);
}
.empty-icon .icon {
  width: 23px;
  height: 23px;
}
.empty-state h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 5px;
}
.empty-state p {
  max-width: 320px;
  margin: 0 auto 16px;
  font-size: 10px;
  line-height: 1.7;
}
.empty-chart {
  position: absolute;
  inset: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  pointer-events: none;
}
.empty-chart strong {
  font-size: 12px;
  font-weight: 550;
  color: var(--ink);
}
.notice {
  display: flex;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 13px 15px;
  margin-bottom: 16px;
  font-size: 11px;
  color: var(--muted);
}
.notice > .icon {
  color: var(--primary);
  width: 17px;
  flex-shrink: 0;
}
.notice.warning {
  background: var(--amber-soft);
  border-color: #f1e4c5;
  color: #93723a;
}
.notice.warning > .icon {
  color: var(--amber);
}
.notice.error {
  background: var(--red-soft);
  border-color: #f0d6da;
  color: var(--red);
}
.notice strong {
  color: var(--ink);
  font-weight: 600;
}
.entity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
}
.entity-card {
  padding: 23px;
  position: relative;
}
.entity-card .entity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.entity-card h3 {
  font-size: 15px;
  font-weight: 650;
  margin: 0 0 4px;
}
.entity-card p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.entity-card .entity-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
}
.entity-balance {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.9px;
  margin: 19px 0 7px;
}
.entity-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: var(--muted);
  margin-top: 12px;
}
.account-record-range {
  background: var(--panel-subtle, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  margin: 14px 0 10px;
}
.record-range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.record-range-title {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.record-range-duration {
  font-size: 8.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
}
.record-range-dates {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.record-range-dates .range-arrow {
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
}
.entity-actions {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.entity-actions .btn:last-child {
  margin-left: auto;
}
.tag-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tag-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 20px;
  min-width: 220px;
}
.tag-card .tag-color {
  height: 13px;
  width: 13px;
  border-radius: 4px;
}
.tag-card strong {
  font-size: 12px;
  font-weight: 550;
}
.tag-card .icon-btn {
  margin-left: auto;
}
.filter-bar {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar .form-control,
.filter-bar .form-select {
  font-size: 10px;
  min-height: 34px;
  padding: 7px 10px;
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  border-radius: 6px;
}
.filter-search {
  position: relative;
  min-width: 220px;
  flex: 1;
}
.filter-search .icon {
  position: absolute;
  top: 9px;
  left: 10px;
  width: 15px;
  color: var(--muted);
}
.filter-search .form-control {
  padding-left: 33px;
}
.filter-select {
  max-width: 170px;
}
.filters-expanded {
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.filters-expanded .form-label {
  font-size: 9px;
  margin-bottom: 5px;
  color: var(--muted);
}
.form-control,
.form-select {
  font-size: 12px;
  min-height: 39px;
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--ink);
  border-radius: 7px;
}
.form-control:focus,
.form-select:focus {
  background-color: var(--surface);
  color: var(--ink);
  border-color: #79b6ac;
  box-shadow: 0 0 0 3px #0c817316;
}
.form-control::placeholder {
  color: #9aa5ae;
  font-size: 11px;
}
.form-label {
  font-size: 11px;
  font-weight: 550;
  margin-bottom: 7px;
  color: var(--ink);
}
.form-text {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.65;
}
/* Custom Modern Checkbox System */
input[type="checkbox"],
.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #b8c4cb;
  background-color: var(--surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  position: relative;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] .form-check-input {
  border-color: #425866;
  background-color: var(--surface-soft);
}

input[type="checkbox"]:hover,
.form-check-input:hover {
  border-color: var(--primary);
  background-color: var(--primary-soft);
}

input[type="checkbox"]:focus-visible,
.form-check-input:focus-visible {
  outline: none !important;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 129, 115, 0.22) !important;
}

[data-theme="dark"] input[type="checkbox"]:focus-visible,
[data-theme="dark"] .form-check-input:focus-visible {
  box-shadow: 0 0 0 3px rgba(103, 196, 174, 0.25) !important;
}

input[type="checkbox"]:checked,
.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 11px 11px !important;
}

input[type="checkbox"]:indeterminate,
.form-check-input:indeterminate {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round'%3E%3Cline x1='3.5' y1='8' x2='12.5' y2='8'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 10px 10px !important;
}

input[type="checkbox"]:disabled,
.form-check-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border);
  background-color: var(--surface-soft);
}
.form-check-label {
  font-size: 11px;
  color: var(--muted);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.form-row.single {
  grid-template-columns: 1fr;
}
.form-field {
  min-width: 0;
}
.form-field.full {
  grid-column: 1/-1;
}
.form-field textarea {
  resize: vertical;
}
.bulk-bar {
  padding: 11px 18px;
  background: var(--primary-soft);
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
}
.bulk-bar strong {
  margin-right: auto;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
}
.ledger-table {
  min-width: 850px;
}
.ledger-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.ledger-table td {
  padding: 13px 14px;
}
.ledger-table th {
  padding: 11px 14px;
}
.ledger-table th:first-child,
.ledger-table td:first-child {
  width: 42px;
  padding-left: 14px;
  padding-right: 10px;
  text-align: center;
  vertical-align: middle;
}
.ledger-table input[type="checkbox"] {
  display: block;
  margin: 0 auto;
}
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: var(--muted);
}
.status-dot:before {
  content: "";
  width: 5px;
  height: 5px;
  background: #a9b4bc;
  border-radius: 50%;
}
.status-dot.good:before {
  background: var(--primary);
}
.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pagination-buttons button {
  height: 28px;
  min-width: 28px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  font-size: 10px;
  color: var(--ink);
}
.pagination-buttons button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pagination-buttons .current {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 22px;
}
.upload-drop {
  border: 1.5px dashed #bbd2ce;
  border-radius: 11px;
  padding: 38px 20px;
  text-align: center;
  background: #f9fcfb;
  cursor: pointer;
  transition: background 0.15s;
}
.upload-drop:hover,
.upload-drop.dragover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.upload-drop .upload-icon {
  width: 49px;
  height: 49px;
  border-radius: 13px;
  border: 1px solid #dce9e4;
  background: var(--surface);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 3px 6px #0c817308;
}
.upload-drop h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 7px;
}
.upload-drop p {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 14px;
}
.file-types {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 17px;
}
.file-types span {
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 8px;
  background: var(--surface);
  font-weight: 550;
}
.selected-files {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}
.selected-file {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 10px;
}
.selected-file .icon {
  color: var(--primary);
  width: 16px;
}
.selected-file small {
  margin-left: auto;
  color: var(--muted);
}
.step-list {
  display: flex;
  gap: 0;
  align-items: center;
  margin: 0 0 28px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 550;
  color: var(--muted);
  flex: 1;
}
.step:after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
  margin: 0 15px;
}
.step:last-child {
  flex: 0;
  white-space: nowrap;
}
.step:last-child:after {
  display: none;
}
.step span {
  height: 23px;
  width: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 9px;
  background: var(--surface);
}
.step.active {
  color: var(--primary);
}
.step.active span {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-list li {
  display: flex;
  gap: 11px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.help-list li:last-child {
  border: 0;
  padding-bottom: 0;
}
.help-list .icon {
  width: 17px;
  color: var(--primary);
  margin-top: 2px;
}
.help-list strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
}
.help-list p {
  font-size: 10px;
  color: var(--muted);
  margin: 3px 0 0;
  line-height: 1.7;
}
.import-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}
.import-summary span {
  font-size: 9px;
  color: var(--muted);
  display: block;
}
.import-summary strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-top: 3px;
}
.mapping-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.mapping-grid label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.mapping-grid select {
  font-size: 11px;
}
.import-file-panel {
  margin-top: 20px;
}
.import-file-panel + .import-file-panel {
  margin-top: 20px;
}
.row-badge {
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-flex;
  background: var(--primary-soft);
  color: var(--primary);
}
.row-badge.error,
.row-badge.failed {
  background: var(--red-soft);
  color: var(--red);
}
.row-badge.duplicate,
.row-badge.possible_duplicate,
.row-badge.warning {
  background: var(--amber-soft);
  color: var(--amber);
}
.rule-description {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin: 12px 0;
}
.rule-description code {
  font-size: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 3px 5px;
  border-radius: 4px;
}
.rule-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
.budget-progress {
  height: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin: 13px 0 8px;
}
.budget-progress > div {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
}
.budget-progress.over > div {
  background: var(--red);
}
.budget-details {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  color: var(--muted);
}
.budget-values {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 18px;
}
.budget-values strong {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.budget-values span {
  font-size: 10px;
  color: var(--muted);
}
.recurring-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 21px;
  border-bottom: 1px solid var(--border);
}
.recurring-card:last-child {
  border-bottom: 0;
}
.recurring-card .recurring-info {
  flex: 1;
  min-width: 0;
}
.recurring-card h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}
.recurring-card p {
  font-size: 10px;
  color: var(--muted);
  margin: 3px 0 0;
}
.recurring-amount {
  text-align: right;
  min-width: 90px;
}
.recurring-amount strong {
  font-size: 15px;
  font-weight: 600;
  display: block;
}
.recurring-amount small {
  font-size: 9px;
  color: var(--muted);
}
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.insight-card {
  display: flex;
  gap: 15px;
  padding: 23px;
}
.insight-card .insight-icon {
  width: 37px;
  height: 37px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.insight-card h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}
.insight-card p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 12px;
}
.insight-card.warning .insight-icon {
  background: var(--amber-soft);
  color: var(--amber);
}
.report-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 17px;
  overflow: auto;
}
.report-tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  border-radius: 6px;
  padding: 7px 13px;
  white-space: nowrap;
}
.report-tabs .active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
  font-weight: 600;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
  gap: 21px;
}
.settings-section {
  margin-bottom: 21px;
}
.settings-section .panel-body {
  padding-top: 4px;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child {
  border: 0;
  padding-bottom: 2px;
}
.settings-row strong {
  font-size: 11px;
  font-weight: 550;
  display: block;
}
.settings-row p {
  font-size: 10px;
  color: var(--muted);
  max-width: 350px;
  margin: 3px 0 0;
  line-height: 1.65;
}
.settings-row input,
.settings-row select {
  max-width: 160px;
  font-size: 10px;
  min-height: 33px;
}
.dependency-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-size: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.dependency-row:last-child {
  border: 0;
}
.dependency-row .icon {
  width: 14px;
}
.dependency-row strong {
  margin-left: auto;
  font-size: 9px;
  font-weight: 550;
}
.dependency-row .available {
  color: var(--primary);
}
.dependency-row .unavailable {
  color: var(--amber);
}
.backup-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.backup-row:last-child {
  border: 0;
}
.backup-row > .icon {
  color: var(--primary);
  width: 16px;
}
.backup-row div {
  flex: 1;
  min-width: 0;
}
.backup-row strong {
  font-size: 10px;
  font-weight: 550;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.backup-row small {
  font-size: 9px;
  color: var(--muted);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 36, 45, 0.43);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  backdrop-filter: blur(3px);
  animation: fade 0.12s;
}
.finance-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 570px;
  border-radius: 15px;
  box-shadow: 0 20px 90px #12242d33;
  max-height: calc(100vh - 50px);
  display: flex;
  flex-direction: column;
  animation: modal-in 0.16s;
}
.finance-modal.wide {
  max-width: 860px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 25px 16px;
  border-bottom: 1px solid var(--border);
  gap: 15px;
}
.modal-head h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.4px;
  margin: 0;
}
.modal-head p {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0 0;
}
.modal-body {
  padding: 23px 25px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-foot {
  padding: 15px 25px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: var(--surface-soft);
  border-radius: 0 0 15px 15px;
}
.modal-error {
  font-size: 11px;
  padding: 11px 13px;
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid #efcdd2;
  border-radius: 7px;
  margin-bottom: 17px;
}
.drawer-overlay {
  justify-content: flex-end;
  padding: 0;
}
.drawer {
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  width: min(600px, 100%);
  animation: drawer-in 0.2s;
}
.drawer .modal-head {
  padding: 25px;
}
.drawer .modal-foot {
  border-radius: 0;
}
.detail-value {
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.detail-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-amount {
  font-size: 35px;
  font-weight: 650;
  letter-spacing: -1.4px;
  margin: 8px 0 4px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
  padding: 23px 0;
  border-bottom: 1px solid var(--border);
}
.detail-section {
  margin-top: 20px;
}
.detail-section h3 {
  font-size: 12px;
  font-weight: 650;
  margin: 0 0 12px;
}
.detail-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.detail-tag {
  font-size: 9px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
}
.audit-item {
  font-size: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.audit-item strong {
  font-weight: 550;
  color: var(--ink);
}
.split-row {
  display: grid;
  grid-template-columns: 1fr 110px 29px;
  gap: 8px;
  margin: 8px 0;
}
.split-row .form-control,
.split-row .form-select {
  min-height: 34px;
  font-size: 10px;
}
.tags-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px;
  min-height: 41px;
}
.tag-option {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  background: var(--surface-soft);
  border-radius: 4px;
}
.tag-option input {
  accent-color: var(--primary);
}
.toast-stack {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(390px, calc(100vw - 40px));
}
.finance-toast {
  background: var(--surface);
  box-shadow: 0 5px 30px #152d3820;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px 17px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 11px;
  animation: modal-in 0.18s;
}
.finance-toast > .icon {
  color: var(--primary);
  width: 16px;
  margin-top: 1px;
}
.finance-toast.error > .icon {
  color: var(--red);
}
.finance-toast button {
  border: 0;
  background: transparent;
  margin-left: 10px;
  color: var(--muted);
  padding: 0;
  display: flex;
}
.finance-toast button .icon {
  width: 13px;
}
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
}
.auth-story {
  background: #133a3f;
  position: relative;
  overflow: hidden;
  padding: 50px 62px;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.auth-story:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 60% 70%,
    #2f706344 0%,
    transparent 60%
  );
  pointer-events: none;
}
.auth-story .brand {
  padding: 0;
  color: #fff;
  margin: 0;
}
.auth-story .brand-mark {
  background: #2b6e64;
}
.auth-story h1 {
  font-size: 42px;
  font-weight: 550;
  line-height: 1.17;
  letter-spacing: -1.8px;
  margin: 70px 0 18px;
  max-width: 420px;
}
.auth-story h1 em {
  color: #a4d2c0;
  font-style: normal;
}
.auth-story > p {
  font-size: 13px;
  line-height: 1.9;
  color: #aac3c2;
  max-width: 360px;
}
.auth-art {
  position: relative;
  width: 90%;
  max-width: 380px;
  align-self: center;
  margin: 47px 0 35px;
  min-height: 205px;
}
.art-card {
  background: #f9faf5;
  color: #264249;
  border-radius: 14px;
  padding: 23px;
  transform: rotate(-5deg);
  box-shadow: 0 20px 50px #0000001a;
  border: 1px solid #ffffff44;
  width: 100%;
}
.art-card-label {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #769087;
}
.art-card-value {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-top: 7px;
}
.art-bars {
  display: flex;
  gap: 13px;
  align-items: flex-end;
  height: 75px;
  margin: 20px 0 0;
}
.art-bars span {
  flex: 1;
  background: #b8d5c4;
  border-radius: 4px 4px 0 0;
}
.art-bars span:nth-child(2n) {
  background: #589988;
}
.art-mini {
  background: #fff;
  border: 1px solid #e5eee7;
  border-radius: 10px;
  padding: 13px 16px;
  position: absolute;
  right: -20px;
  bottom: -18px;
  transform: rotate(5deg);
  box-shadow: 0 5px 30px #00000015;
  display: flex;
  gap: 11px;
  align-items: center;
  color: #254447;
  font-size: 10px;
}
.art-mini > .icon {
  color: #0c8173;
  width: 22px;
}
.art-mini strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
}
.art-mini span {
  color: #7a8b89;
  font-size: 9px;
}
.story-bottom {
  font-size: 10px;
  color: #8cb1aa;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 30px;
}
.story-bottom .icon {
  width: 14px;
}
.auth-form-wrap {
  padding: 70px 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-form {
  width: 100%;
  max-width: 365px;
}
.auth-form .eyebrow {
  color: var(--primary);
  font-size: 9px;
  letter-spacing: 1.4px;
  margin: 0 0 11px;
}
.auth-form h2 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.25;
  margin: 0 0 12px;
}
.auth-form > p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 29px;
}
.auth-form .form-field {
  margin-bottom: 17px;
}
.auth-form .form-label {
  font-size: 10px;
}
.auth-form .form-control {
  min-height: 43px;
  font-size: 12px;
}
.auth-form .btn-primary {
  width: 100%;
  min-height: 43px;
  margin-top: 9px;
  font-size: 11px;
}
.auth-footer {
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
  margin-top: 22px;
}
.auth-footer > .icon {
  width: 12px;
  color: var(--primary);
  margin-right: 4px;
}
.auth-status {
  display: flex;
  gap: 6px;
  font-size: 9px;
  color: var(--primary);
  padding-bottom: 23px;
  align-items: center;
}
.auth-status .dot {
  height: 5px;
  width: 5px;
  background: var(--primary);
  border-radius: 50%;
}
.mobile-menu {
  display: none;
}
.mobile-scrim {
  display: none;
}
.subsection-title {
  font-size: 14px;
  font-weight: 600;
  margin: 27px 0 16px;
}
.report-kpi-grid {
  margin-bottom: 21px;
}
.link-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 22px 0;
}
.alert-list {
  padding: 8px 0 0;
  font-size: 9px;
  color: var(--amber);
}
.color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-muted {
  color: var(--muted) !important;
}
.text-primary {
  color: var(--primary) !important;
}
.text-danger {
  color: var(--red) !important;
}
.border-bottom {
  border-color: var(--border) !important;
}
.bg-light {
  background: var(--surface-soft) !important;
}
.mb-0 {
  margin-bottom: 0 !important;
}
.muted {
  color: var(--muted);
}
.small-text {
  font-size: 10px;
}
.mt-18 {
  margin-top: 18px;
}
.chart-table-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.financial-disclaimer {
  font-size: 9px;
  color: var(--muted);
  padding: 12px 2px;
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--border) 25%,
    var(--surface-soft) 50%,
    var(--border) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 5px;
}
.skeleton-line {
  height: 15px;
  margin-bottom: 16px;
}
.skeleton-card {
  height: 137px;
}
.skeleton-panel {
  height: 310px;
  margin-bottom: 20px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes modal-in {
  from {
    transform: translateY(9px);
    opacity: 0;
  }
}
@keyframes drawer-in {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
}
[data-theme="dark"] {
  --bg: #101c25;
  --surface: #172630;
  --surface-soft: #1c2e3a;
  --ink: #e4edf2;
  --muted: #98acb8;
  --border: #293d49;
  --primary: #67c4ae;
  --primary-hover: #8ddac7;
  --primary-soft: #213e3e;
  --navy: #1a4549;
  --red: #ed9ba8;
  --red-soft: #3e2935;
  --amber: #dab873;
  --amber-soft: #393528;
  --shadow: none;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
}
[data-theme="dark"] .btn-primary {
  background: #138c7b;
  border-color: #138c7b;
  color: #fff;
}
[data-theme="dark"] .btn-primary:hover {
  background: #0eaa91;
  border-color: #0eaa91;
  color: white;
}
[data-theme="dark"] .stat-card.balance {
  background: #164b4b;
  border-color: #2a6261;
}
[data-theme="dark"] .stat-card.balance .stat-label {
  color: #c2d8d7;
}
[data-theme="dark"] .insight-strip {
  background: #1b3331;
  border-color: #2b4940;
}
[data-theme="dark"] .insight-strip p {
  color: #a7bdb4;
}
[data-theme="dark"] .upload-drop {
  background: #192f32;
  border-color: #3d655e;
}
[data-theme="dark"] .book-avatar {
  background: #243f3a;
  border-color: #385449;
}
[data-theme="dark"] .avatar {
  background: #554d43;
  color: #eddbc5;
}
[data-theme="dark"] .merchant-logo {
  background: #263b45;
  color: #abc2cd;
}
[data-theme="dark"] .stat-card.net .stat-icon {
  background: #2b3c4f;
  color: #a5bedc;
}
[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2398acb8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
[data-theme="dark"] .brand-mark {
  background: #147f70;
  color: white;
}
[data-theme="dark"] .art-card {
  background: #e8eee7;
}
[data-theme="dark"] .btn-subtle:hover {
  background: #294b46;
  color: #9edecf;
}
@media (min-width: 1600px) {
  .page-content {
    padding: 36px 44px;
  }
  .topbar {
    padding: 0 44px;
  }
  .stat-card {
    padding: 23px;
  }
  .chart-holder {
    height: 270px;
  }
  .panel-header {
    padding: 23px 25px 19px;
  }
  .panel-body {
    padding: 0 25px 23px;
  }
  .stats-grid {
    gap: 21px;
  }
  .stat-value {
    font-size: 31px;
  }
  .stat-card {
    min-height: 149px;
  }
  .transaction-table td {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .donut-holder {
    height: 185px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 207px;
  }
  .sidebar {
    padding: 25px 12px 14px;
  }
  .brand {
    font-size: 17px;
    padding: 0 10px;
    gap: 8px;
  }
  .brand small {
    display: none;
  }
  .nav-item {
    font-size: 11px;
    gap: 10px;
    padding: 9px 12px;
  }
  .nav-item .icon {
    width: 16px;
  }
  .topbar {
    padding: 0 25px;
  }
  .page-content {
    padding: 25px;
  }
  .global-search input {
    width: 120px;
  }
  .user-button > div:not(.avatar) {
    display: none;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-value {
    font-size: 24px;
  }
  .chart-grid,
  .dashboard-lower {
    grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
    gap: 17px;
  }
  .chart-legend {
    gap: 10px;
  }
  .panel-header {
    padding: 18px;
  }
  .panel-body {
    padding: 0 18px 18px;
  }
  .entity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-story {
    padding: 40px;
  }
  .auth-story h1 {
    font-size: 36px;
  }
  .auth-form-wrap {
    padding: 50px 35px;
  }
  .auth-art {
    width: 90%;
  }
  .stats-grid {
    gap: 12px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-icon {
    height: 27px;
    width: 27px;
  }
  .topbar-actions {
    gap: 7px;
  }
  .category-legend {
    gap: 10px;
  }
  .table-scroll.dashboard-table .transaction-table th:nth-child(3),
  .table-scroll.dashboard-table .transaction-table td:nth-child(3) {
    display: none;
  }
}
@media (max-width: 991px) {
  :root {
    --sidebar: 190px;
  }
  .page-content {
    padding: 24px 20px;
  }
  .topbar {
    padding: 0 20px;
    height: 70px;
  }
  .topbar-actions {
    gap: 3px;
  }
  .global-search {
    display: none;
  }
  .chart-grid,
  .dashboard-lower {
    grid-template-columns: 1fr;
  }
  .chart-grid > .panel:last-child .panel-body {
    display: flex;
    gap: 35px;
    align-items: center;
    padding: 0 25px 20px;
  }
  .donut-holder {
    min-width: 175px;
    margin: 0;
  }
  .category-legend {
    width: 100%;
  }
  .dashboard-lower > .panel:last-child .account-mini {
    padding-left: 22px;
    padding-right: 22px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .stat-card {
    min-height: 130px;
  }
  .stat-value {
    font-size: 28px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    justify-content: flex-end;
  }
  .heading-actions .btn {
    font-size: 10px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .mini-metrics {
    gap: 12px;
  }
  .mini-metric {
    padding: 14px;
    gap: 8px;
  }
  .mini-metric strong {
    font-size: 15px;
  }
  .mini-metric > .icon {
    width: 17px;
  }
  .upload-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .upload-layout > .panel:last-child {
    order: 2;
  }
  .filters-expanded {
    grid-template-columns: repeat(2, 1fr);
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 35px;
  }
  .auth-story h1 {
    font-size: 32px;
    margin-top: 85px;
  }
  .auth-art {
    margin-top: 50px;
  }
  .auth-form-wrap {
    padding: 40px 25px;
  }
  .auth-story .brand {
    font-size: 17px;
  }
  .auth-story > p {
    font-size: 12px;
  }
  .auth-story .art-mini {
    right: -15px;
  }
  .art-card {
    padding: 20px;
  }
  .art-card-value {
    font-size: 27px;
  }
  .auth-screen {
    grid-template-columns: 0.9fr 1fr;
  }
  .book-select-wrap {
    min-width: 150px;
  }
  .book-select {
    max-width: 140px;
  }
}
@media (max-width: 767px) {
  :root {
    --sidebar: 238px;
  }
  .sidebar {
    transform: translateX(-100%);
    padding: 26px 17px 17px;
    box-shadow: 10px 0 50px #152e3820;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-shell {
    margin: 0;
  }
  .mobile-scrim.open {
    display: block;
    position: fixed;
    inset: 0;
    background: #102b3155;
    z-index: 90;
    backdrop-filter: blur(2px);
  }
  .mobile-menu {
    display: inline-flex;
  }
  .topbar {
    height: 66px;
    padding: 0 16px;
    gap: 10px;
  }
  .book-select-wrap {
    gap: 8px;
    min-width: 0;
  }
  .book-avatar {
    width: 29px;
    height: 29px;
    border-radius: 7px;
    font-size: 12px;
  }
  .book-select {
    font-size: 11px;
    max-width: 133px;
  }
  .book-select-wrap small {
    font-size: 8px;
  }
  .topbar-actions .topbar-divider {
    display: none;
  }
  .topbar-actions .user-button {
    display: none;
  }
  .icon-btn {
    padding: 7px;
    min-width: 31px;
    min-height: 31px;
  }
  .topbar-actions .icon-btn .icon {
    width: 17px;
  }
  .page-content {
    padding: 24px 17px 20px;
  }
  .page-heading {
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 10px;
    line-height: 1.7;
    margin-top: 6px;
  }
  .heading-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 7px;
  }
  .heading-actions .btn {
    font-size: 10px;
    padding: 8px 11px;
  }
  .period-select {
    font-size: 10px;
  }
  .date-filter {
    padding: 7px 10px;
  }
  .period-label {
    font-size: 9px;
    margin-bottom: 13px;
  }
  .stat-card {
    padding: 16px 15px;
    min-height: 124px;
    border-radius: 10px;
  }
  .stat-value {
    font-size: 25px;
    margin-top: 9px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-icon {
    height: 25px;
    width: 25px;
    border-radius: 7px;
  }
  .stat-icon .icon {
    width: 14px;
  }
  .stat-note {
    font-size: 8px;
    line-height: 1.5;
  }
  .stat-note .subtle {
    display: none;
  }
  .stats-grid {
    gap: 11px;
    margin-bottom: 17px;
  }
  .chart-grid,
  .dashboard-lower {
    gap: 17px;
    margin-bottom: 17px;
  }
  .panel {
    border-radius: 10px;
  }
  .panel-header {
    padding: 18px 16px 15px;
  }
  .panel-title {
    font-size: 12px;
  }
  .panel-subtitle {
    font-size: 9px;
  }
  .panel-body {
    padding: 0 16px 18px;
  }
  .chart-holder {
    height: 220px;
  }
  .chart-toolbar {
    gap: 9px;
  }
  .chart-legend {
    font-size: 8px;
    gap: 8px;
  }
  .segment-control button {
    padding: 3px 5px;
    font-size: 8px;
  }
  .chart-grid > .panel:last-child .panel-body {
    padding: 0 18px 20px;
    gap: 22px;
  }
  .donut-holder {
    height: 145px;
    min-width: 145px;
    max-width: 145px;
  }
  .donut-center strong {
    font-size: 18px;
  }
  .category-legend {
    grid-template-columns: 1fr;
  }
  .category-legend-item:nth-child(n + 5) {
    display: none;
  }
  .mini-metrics {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 17px;
  }
  .mini-metric {
    padding: 12px 16px;
    gap: 13px;
  }
  .mini-metric > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .mini-metric strong {
    font-size: 15px;
    order: 2;
  }
  .mini-metric span {
    font-size: 10px;
  }
  .mini-metric > .icon {
    width: 17px;
    height: 17px;
  }
  .insight-strip {
    padding: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .insight-strip > .icon {
    width: 18px;
  }
  .insight-strip > div {
    flex: 1;
  }
  .insight-strip h3 {
    font-size: 11px;
  }
  .insight-strip p {
    font-size: 9px;
  }
  .insight-strip .btn {
    margin-left: 28px;
    padding: 0;
    min-height: 24px;
  }
  .page-footer {
    font-size: 8px;
  }
  .page-footer span:last-child {
    display: none;
  }
  .table-footer {
    padding: 12px 15px;
    font-size: 9px;
  }
  .transaction-table th {
    padding: 9px 13px;
    font-size: 8px;
  }
  .transaction-table td {
    padding: 12px 13px;
    font-size: 10px;
  }
  .merchant-info strong {
    font-size: 10px;
    max-width: 150px;
  }
  .merchant-info small {
    font-size: 8px;
  }
  .merchant-logo {
    height: 29px;
    width: 29px;
    font-size: 10px;
  }
  .merchant-cell {
    gap: 8px;
    min-width: 130px;
  }
  .transaction-table .amount {
    font-size: 10px;
  }
  .category-pill {
    font-size: 8px;
    padding: 3px 6px;
  }
  .entity-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .entity-card {
    padding: 21px;
  }
  .tag-card {
    min-width: 100%;
    padding: 14px 18px;
  }
  .auth-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .auth-story {
    padding: 25px 27px 29px;
    min-height: auto;
  }
  .auth-story .brand {
    font-size: 18px;
  }
  .auth-story h1 {
    font-size: 29px;
    line-height: 1.22;
    margin: 28px 0 10px;
    max-width: 330px;
  }
  .auth-story > p {
    font-size: 11px;
    max-width: 330px;
    line-height: 1.8;
    margin-bottom: 0;
  }
  .auth-art,
  .story-bottom {
    display: none;
  }
  .auth-form-wrap {
    padding: 32px 27px 40px;
  }
  .auth-form {
    max-width: 410px;
  }
  .auth-form h2 {
    font-size: 25px;
  }
  .auth-form > p {
    font-size: 10px;
    margin-bottom: 23px;
  }
  .auth-form .eyebrow {
    font-size: 8px;
    margin-bottom: 8px;
  }
  .auth-form .form-control {
    min-height: 42px;
  }
  .auth-status {
    padding-bottom: 18px;
  }
  .auth-form .form-field {
    margin-bottom: 16px;
  }
  .auth-footer {
    font-size: 8px;
  }
  .step-list {
    margin-bottom: 22px;
  }
  .step {
    font-size: 9px;
    gap: 5px;
  }
  .step:after {
    margin: 0 9px;
  }
  .step span {
    height: 21px;
    width: 21px;
    font-size: 8px;
  }
  .upload-drop {
    padding: 30px 15px;
  }
  .upload-drop h3 {
    font-size: 12px;
  }
  .upload-drop p {
    font-size: 9px;
  }
  .upload-drop .upload-icon {
    height: 44px;
    width: 44px;
    margin-bottom: 14px;
  }
  .form-row {
    gap: 12px;
    margin-bottom: 14px;
  }
  .form-label {
    font-size: 10px;
  }
  .form-control,
  .form-select {
    font-size: 11px;
    min-height: 38px;
  }
  .filter-bar {
    padding: 13px;
    gap: 8px;
  }
  .filter-search {
    min-width: 100%;
    flex: 1;
  }
  .filter-select {
    max-width: calc(50% - 4px);
    flex: 1;
  }
  .filter-bar > .btn {
    flex: 1;
    min-width: 30%;
  }
  .filters-expanded {
    padding: 14px;
    gap: 12px;
  }
  .filter-bar .form-control,
  .filter-bar .form-select {
    font-size: 10px;
  }
  .import-summary {
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
    padding: 14px;
  }
  .import-summary strong {
    font-size: 15px;
  }
  .import-summary span {
    font-size: 8px;
  }
  .mapping-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
  }
  .mapping-grid label {
    font-size: 9px;
  }
  .preview-actions {
    flex-wrap: wrap;
    margin: 17px 0;
  }
  .preview-actions .btn {
    font-size: 10px;
    flex: 1;
  }
  .modal-overlay {
    padding: 14px;
  }
  .finance-modal {
    border-radius: 12px;
    max-height: calc(100dvh - 28px);
  }
  .modal-head {
    padding: 19px 19px 16px;
  }
  .modal-head h2 {
    font-size: 16px;
  }
  .modal-head p {
    font-size: 9px;
  }
  .modal-body {
    padding: 20px 19px;
  }
  .modal-foot {
    padding: 14px 19px;
  }
  .drawer-overlay {
    padding: 0;
  }
  .drawer {
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .drawer .modal-head {
    padding: 21px;
  }
  .detail-grid {
    gap: 17px;
  }
  .detail-amount {
    font-size: 32px;
  }
  .toast-stack {
    right: 16px;
    bottom: 16px;
  }
  .finance-toast {
    font-size: 10px;
    padding: 12px 14px;
  }
  .settings-row {
    gap: 15px;
  }
  .settings-row input,
  .settings-row select {
    max-width: 130px;
    font-size: 9px;
  }
  .settings-row strong {
    font-size: 10px;
  }
  .settings-row p {
    font-size: 9px;
  }
  .recurring-card {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .recurring-card .recurring-info {
    min-width: 120px;
  }
  .recurring-amount strong {
    font-size: 13px;
  }
  .recurring-card .entity-actions {
    width: 100%;
    margin: 5px 0 0;
    padding-top: 10px;
  }
  .recurring-card .entity-actions .btn {
    flex: 1;
  }
  .recurring-card h3 {
    font-size: 11px;
  }
  .recurring-card p {
    font-size: 9px;
  }
  .report-tabs {
    gap: 2px;
    padding-bottom: 13px;
  }
  .report-tabs button {
    font-size: 10px;
    padding: 7px 10px;
  }
  .insight-card {
    padding: 19px;
    gap: 12px;
  }
  .insight-card h3 {
    font-size: 12px;
  }
  .insight-card p {
    font-size: 10px;
  }
  .insight-card .insight-icon {
    width: 33px;
    height: 33px;
  }
  .chart-table-grid {
    grid-template-columns: 1fr;
  }
  .upload-layout {
    gap: 17px;
  }
  .small-text {
    font-size: 9px;
  }
  .modal-foot .btn {
    font-size: 10px;
  }
  .topbar .mobile-menu {
    margin-left: -7px;
  }
  .mobile-search {
    display: flex;
  }
  .bulk-bar {
    flex-wrap: wrap;
    font-size: 9px;
  }
  .bulk-bar strong {
    width: 100%;
  }
  .bulk-bar .btn {
    font-size: 9px;
    padding: 5px 8px;
  }
  .auth-form .form-row {
    display: block;
  }
  .segment-control {
    display: none;
  }
  .stats-grid.report-kpi-grid .stat-card:nth-child(n + 3) {
    display: block;
  }
}
@media (max-width: 370px) {
  .page-content {
    padding: 20px 13px;
  }
  .stat-value {
    font-size: 22px;
  }
  .stat-card {
    padding: 14px 12px;
  }
  .stat-label {
    font-size: 9px;
  }
  .stat-icon {
    height: 23px;
    width: 23px;
  }
  .topbar {
    padding: 0 12px;
  }
  .book-select {
    max-width: 115px;
  }
  .topbar-actions {
    gap: 0;
  }
  .chart-grid > .panel:last-child .panel-body {
    gap: 15px;
  }
  .donut-holder {
    height: 130px;
    min-width: 130px;
    max-width: 130px;
  }
  .category-legend-item {
    font-size: 8px;
  }
  .heading-actions .btn {
    padding: 7px 9px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .mapping-grid {
    grid-template-columns: 1fr;
  }
  .import-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .skeleton {
    animation: none;
  }
  .loading-spinner {
    animation: spin 1.4s linear infinite;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading-actions,
  .page-footer,
  .filter-bar,
  .report-tabs,
  .icon-btn,
  .btn,
  .modal-overlay,
  .toast-stack,
  .financial-disclaimer {
    display: none !important;
  }
  .main-shell {
    margin: 0;
  }
  .page-content {
    padding: 0;
  }
  .workspace {
    background: white;
  }
  .panel,
  .stat-card {
    box-shadow: none;
    break-inside: avoid;
    border: 1px solid #ddd;
  }
  .stat-card.balance {
    background: white;
    color: #172b36;
  }
  .stat-card.balance .stat-label,
  .stat-card.balance .stat-note {
    color: #6c7c88;
  }
  .chart-grid {
    grid-template-columns: 1.5fr 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .transaction-table {
    font-size: 9px;
  }
  .panel-header {
    padding: 12px;
  }
  .panel-body {
    padding: 0 12px 12px;
  }
  .table-scroll {
    overflow: visible;
  }
  .ledger-table {
    min-width: 0;
  }
  .page-heading {
    margin-top: 0;
  }
  .table-footer {
    display: none;
  }
}
@media screen and (max-width: 640px) {
  .icon-btn,
  .mobile-menu {
    min-width: 44px;
    min-height: 44px;
  }
  .btn,
  .btn-xs,
  .form-control,
  .form-select,
  .category-inline,
  .pagination-buttons button {
    min-height: 44px;
  }
  .pagination-buttons button {
    min-width: 44px;
  }
  .date-filter {
    min-height: 44px;
  }
  .book-select {
    max-width: 133px;
    min-height: 44px;
  }
  .report-tabs button {
    min-height: 44px;
  }
  .tag-option {
    min-height: 36px;
    padding: 6px 8px;
  }
  .tag-option input,
  .ledger-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
  }
}
@media screen and (max-width: 370px) {
  .book-select {
    max-width: 105px;
  }
}

/* Multi-pattern smart rules & rule suggestions */
.rule-patterns-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  align-items: center;
}
.rule-pattern-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e6f4ea;
  color: #0d652d;
  border: 1px solid #b7e1cd;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.rule-pattern-del {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.7;
}
.rule-pattern-del:hover {
  opacity: 1;
}
.rule-pattern-badge {
  display: inline-block;
  padding: 2px 7px;
  background: var(--surface-soft, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  font-size: 11px;
  color: var(--ink, #1e293b);
  margin: 1px 2px;
}
.rule-suggest-card {
  border-radius: 8px;
  transition: box-shadow 0.15s ease;
}
.rule-suggest-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.statement-detect-banner {
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel-subtle, #f8fafc);
  transition: all 0.2s ease;
}
.statement-detect-banner.scanning {
  background: var(--panel-subtle, #f8fafc);
  color: var(--muted);
}
.statement-detect-banner.matched {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.statement-detect-banner.unadded {
  background: var(--panel-subtle, #f8fafc);
  border-left: 4px solid var(--primary, #0d9488) !important;
}
.statement-detect-banner .badge {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 3px 7px;
}

/* Rule pattern auto-suggestions & autocomplete */
.rule-pattern-suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 110px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1060;
  margin-top: 3px;
}
.rule-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  font-size: 12px;
  color: var(--ink, #1e293b);
  transition: background 0.15s ease;
}
.rule-suggestion-item:last-child {
  border-bottom: none;
}
.rule-suggestion-item:hover,
.rule-suggestion-item.active {
  background: var(--surface-hover, #f8fafc);
}
.rule-suggestion-match {
  font-weight: 600;
  color: var(--primary, #0d9488);
}
.rule-suggestion-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.rule-suggestion-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  background: #e0f2fe;
  color: #0369a1;
}
.rule-suggestion-badge.token {
  background: #fef3c7;
  color: #92400e;
}
.rule-suggestion-badge.desc {
  background: #f1f5f9;
  color: #475569;
}
.rule-suggestion-badge.account {
  background: #fef3c7;
  color: #92400e;
}
.rule-suggestion-badge.upi {
  background: #dcfce7;
  color: #166534;
}
.rule-suggestion-badge.payee {
  background: #ede9fe;
  color: #6b21a8;
}
.rule-suggestion-badge.ifsc {
  background: #fce7f3;
  color: #9d174d;
}
.rule-suggestion-count {
  color: var(--muted, #64748b);
  font-size: 10px;
}
.rule-quick-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rule-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--border, #cbd5e1);
  color: var(--ink, #334155);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rule-quick-pill:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}
.rule-quick-pill small {
  color: var(--muted, #64748b);
  font-size: 10px;
}



