:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #66726e;
  --line: #dde4df;
  --panel: #ffffff;
  --panel-soft: #f6f8f5;
  --bg: #eef2ed;
  --accent: #0f8b6f;
  --accent-2: #1d5f99;
  --warn: #b85f14;
  --shadow: 0 18px 50px rgba(27, 44, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 24px;
  background: #101c19;
  color: #f4faf7;
  transition: padding 180ms ease;
}

body.sidebar-collapsed .sidebar {
  gap: 14px;
  padding: 18px 14px;
}

.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.sidebar-toggle {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-left: auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4faf7;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

body.sidebar-collapsed .brand {
  justify-content: center;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .login-panel,
body.sidebar-collapsed .sync-card,
body.sidebar-collapsed .nav-item span {
  display: none;
}

body.sidebar-collapsed .brand-mark {
  width: 40px;
  height: 40px;
}

body.sidebar-collapsed .sidebar-toggle {
  position: fixed;
  top: 76px;
  left: 21px;
  z-index: 5;
  margin-left: 0;
}

body.sidebar-collapsed .nav-list {
  margin-top: 54px;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  font-size: 24px;
  font-weight: 800;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle,
.session-label,
.sync-card code {
  color: #9fb0aa;
  font-size: 12px;
}

.login-panel {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.login-panel label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
}

.field-row input,
.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field-row input {
  height: 42px;
  padding: 0 11px;
}

.icon-button,
.tool-button,
.nav-item {
  border: 0;
  border-radius: 8px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.icon-button.primary {
  background: var(--accent);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  color: #d8e1dd;
  background: transparent;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sync-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sync-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.05;
}

.topbar p {
  margin-top: 7px;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.tool-button.accent {
  border-color: transparent;
  background: var(--accent-2);
  color: white;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.metric {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 26px rgba(27, 44, 38, 0.06);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 25px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 182px);
  margin-top: 16px;
}

.list-pane,
.detail-pane {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.list-pane {
  display: flex;
  flex-direction: column;
}

.filters {
  display: grid;
  gap: 9px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
}

.filters input,
.filters select {
  height: 40px;
  padding: 0 11px;
}

.filters input {
  padding-left: 38px;
}

.reports-list {
  overflow: auto;
  padding: 8px;
}

.report-row {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.report-row:hover,
.report-row.active {
  border-color: #c8d6cf;
  background: var(--panel-soft);
}

.report-row-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-row h3 {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.report-row .amount {
  white-space: nowrap;
  font-weight: 800;
}

.report-row-meta,
.detail-meta,
.chip-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e9efeb;
  color: #34413d;
}

.chip.status-open {
  background: #e7f5ed;
  color: #14633f;
}

.chip.status-closed {
  background: #eef1f5;
  color: #4b5964;
}

.detail-pane {
  min-width: 0;
  overflow: auto;
}

.empty-state {
  display: grid;
  min-height: 100%;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--accent);
}

.report-detail {
  padding: 18px;
}

.insights-view {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.settings-view {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.hidden {
  display: none !important;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.edit-field {
  display: grid;
  gap: 6px;
  min-width: 132px;
}

.edit-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.edit-field select,
.inline-select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.edit-field select {
  height: 40px;
  padding: 0 10px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.detail-head h2 {
  font-size: 24px;
  overflow-wrap: anywhere;
}

.detail-totals {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.detail-total {
  min-width: 160px;
  padding: 14px;
  border-radius: 8px;
  background: #edf6f2;
  text-align: right;
}

.detail-total-personal {
  background: #fff4df;
}

.detail-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-total strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.detail-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.info-strip span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  min-width: 0;
}

.info-strip b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  min-height: 72px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.summary-card.wide {
  grid-column: span 1;
}

.summary-card.wide strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
}

.summary-card.warn {
  border-color: #e8c2a4;
  background: #fff7ef;
}

.insights-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 240px;
  justify-content: center;
  color: var(--muted);
}

.insights-loading svg {
  animation: spin 1s linear infinite;
}

.insights-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.insights-head h2 {
  font-size: 25px;
}

.insights-head p {
  margin-top: 6px;
  color: var(--muted);
}

.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.settings-head h2 {
  font-size: 25px;
}

.settings-head p {
  margin-top: 6px;
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr);
  gap: 14px;
}

.settings-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.settings-panel.primary-setting {
  background: #f6fbf8;
  border-color: #c9dfd4;
}

.settings-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.settings-title > svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 8px;
  background: #dff3eb;
  color: var(--accent);
}

.settings-title h3 {
  font-size: 19px;
}

.settings-title p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.setting-current {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  padding: 16px;
  border-radius: 8px;
  background: #10251f;
  color: #f4faf7;
}

.setting-current span {
  grid-column: 1 / -1;
  color: #9fb0aa;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.setting-current strong {
  font-size: 38px;
  line-height: 1;
}

.setting-current em {
  align-self: end;
  color: #78e2c3;
  font-style: normal;
  font-weight: 800;
}

.setting-form {
  display: grid;
  gap: 8px;
}

.setting-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.setting-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.setting-input-row input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.setting-hint,
.setting-message,
.settings-facts {
  color: var(--muted);
  font-size: 13px;
}

.setting-message {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e8f6ef;
  color: #176244;
  font-weight: 800;
}

.setting-message.visible {
  display: block;
}

.settings-facts {
  display: grid;
  gap: 10px;
}

.settings-facts span {
  display: grid;
  gap: 3px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow-wrap: anywhere;
}

.settings-facts b {
  color: var(--ink);
}

.insight-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.insight-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.insight-kpi {
  display: grid;
  gap: 9px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  color: var(--ink);
  text-align: left;
}

.insight-kpi:hover,
.ranking-row:hover {
  border-color: #b9cbc2;
  background: #eef6f2;
}

.insight-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.insight-kpi strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.insight-kpi.warn {
  border-color: #e8c2a4;
  background: #fff7ef;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.insight-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.ranking-list {
  display: grid;
  gap: 8px;
}

.ranking-row {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.ranking-top,
.ranking-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ranking-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-top span {
  white-space: nowrap;
  font-weight: 800;
}

.ranking-meta {
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3eae6;
}

.bar-track div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-title h3 {
  font-size: 18px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.expenses-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.expense-row {
  display: grid;
  grid-template-columns: 34px 122px minmax(220px, 1fr) 88px 84px 118px 100px 82px;
  align-items: start;
  column-gap: 6px;
  row-gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.expense-row > span {
  min-width: 0;
}

.expense-row:last-child {
  border-bottom: 0;
}

.expense-row.header {
  min-height: 38px;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
  background: #f1f4f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.expense-row .concept {
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.expense-row .payment {
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-select,
.inline-input {
  height: 34px;
  min-width: 104px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}

.inline-input.date-input {
  width: 118px;
  min-width: 118px;
}

.inline-input.concept-input {
  width: 100%;
  min-width: 170px;
}

.expense-row .money {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.expense-row .actions {
  justify-self: end;
}

.expense-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
  font-size: 13px;
}

.expense-bulk-actions label,
.receipt-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bulk-hint {
  color: var(--muted);
  font-size: 12px;
}

.danger-link,
.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #f0b5ad;
  border-radius: 7px;
  background: #fff1ef;
  color: #a33a30;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.small-action {
  border-color: #b8d6cb;
  background: #eefaf6;
  color: #176b55;
}

.danger-link:hover {
  background: #ffe2de;
  border-color: #df7c70;
}

.small-action:hover {
  background: #dcf4ec;
  border-color: #73baa4;
}

.danger-link:disabled,
.small-action:disabled {
  cursor: default;
  opacity: 0.55;
}

.line-receipts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.line-receipt-thumb {
  width: 32px;
  height: 32px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #e7ece8;
  cursor: pointer;
}

.line-receipt-thumb:disabled {
  cursor: default;
  opacity: 0.55;
}

.line-receipt-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.line-receipt-thumb span {
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(135deg, #dbe3dd 0 6px, #eef2ef 6px 12px);
}

.receipt-extra,
.no-receipt {
  color: var(--muted);
  font-size: 12px;
}

.expense-row .money {
  text-align: right;
  font-weight: 800;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.receipt-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.receipt-card button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #e7ece8;
}

.receipt-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.receipt-card footer {
  display: grid;
  gap: 3px;
  padding: 9px;
  font-size: 12px;
}

.receipt-card footer strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-card footer .receipt-select {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.image-dialog {
  width: min(1120px, calc(100vw - 38px));
  max-height: calc(100vh - 38px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: white;
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.image-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 92px);
  object-fit: contain;
}

.image-dialog img.receipt-filter-enhanced {
  filter: grayscale(0.18) contrast(1.45) brightness(1.08) saturate(0.85);
}

.image-dialog img.receipt-filter-contrast {
  filter: grayscale(1) contrast(2.15) brightness(1.18);
}

.receipt-enhance-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 70px);
}

.receipt-enhance-controls button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.66);
  color: #eef7f3;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.receipt-enhance-controls button:hover,
.receipt-enhance-controls button.active {
  border-color: transparent;
  background: #0f8b6f;
  color: #fff;
}

.receipt-enhance-controls button.save-enhanced {
  background: #1d5f99;
  color: #fff;
}

.receipt-enhance-controls button:disabled {
  cursor: default;
  opacity: 0.5;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
}

.dialog-caption {
  padding: 12px 14px;
  color: #d7e0dc;
  font-size: 13px;
}

.empty-list,
.error-box {
  padding: 16px;
  color: var(--muted);
}

.error-box {
  color: #8b2d1b;
}

svg {
  width: 18px;
  height: 18px;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr);
  }

  .nav-list,
  .sync-card {
    grid-column: span 2;
  }

  .workbench {
    grid-template-columns: 1fr;
    height: auto;
  }

  .list-pane,
  .detail-pane {
    min-height: 430px;
  }
}

@media (max-width: 760px) {
  .main,
  .sidebar {
    padding: 16px;
  }

  .sidebar,
  .metrics-grid,
  .info-strip,
  .summary-panel {
    grid-template-columns: 1fr;
  }

  .nav-list,
  .sync-card {
    grid-column: auto;
  }

  .topbar,
  .detail-head,
  .insights-head,
  .settings-head {
    flex-direction: column;
  }

  .detail-totals {
    width: 100%;
  }

  .detail-total {
    flex: 1;
    min-width: 0;
  }

  .toolbar,
  .insight-actions {
    justify-content: flex-start;
  }

  .insight-kpis,
  .insights-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .setting-input-row {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    gap: 8px;
  }

  .expense-row {
    grid-template-columns: 76px minmax(0, 1fr) 76px 86px;
    min-height: 58px;
    gap: 10px;
    padding: 10px 12px;
  }

  .expense-row.header {
    display: none;
  }

  .expense-row .type,
  .expense-row .payment {
    display: none;
  }

  .line-receipts {
    justify-content: flex-start;
  }

  .line-receipt-thumb {
    width: 30px;
    height: 30px;
  }
}
